os/persistentdata/persistentstorage/sqlite3api/TEST/TCL/tcldistribution/unix/configure
Update contrib.
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated automatically using autoconf version 2.13
5 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
12 ac_default_prefix=/usr/local
13 # Any additions from configure.in:
15 --enable-man-symlinks use symlinks for the manpages"
17 --enable-man-compression=PROG
18 compress the manpages with PROG"
20 --enable-man-suffix=STRING
21 use STRING as a suffix to manpage file names
24 --enable-threads build with threads"
26 --enable-shared build and link with shared libraries [--enable-shared]"
28 --enable-64bit enable 64bit support (where applicable)"
30 --enable-64bit-vis enable 64bit Sparc VIS support"
32 --enable-corefoundation use CoreFoundation API [--enable-corefoundation]"
34 --disable-load disallow dynamic loading and "load" command"
36 --enable-symbols build with debugging symbols [--disable-symbols]"
38 --enable-langinfo use nl_langinfo if possible to determine
39 encoding at startup, otherwise use old heuristic"
41 --enable-framework package shared libraries in MacOSX frameworks [--disable-framework]"
43 # Initialize some variables set by options.
44 # The variables have the same names as the options, with
45 # dashes changed to underlines.
47 cache_file=./config.cache
56 program_transform_name=s,x,x,
64 bindir='${exec_prefix}/bin'
65 sbindir='${exec_prefix}/sbin'
66 libexecdir='${exec_prefix}/libexec'
67 datadir='${prefix}/share'
68 sysconfdir='${prefix}/etc'
69 sharedstatedir='${prefix}/com'
70 localstatedir='${prefix}/var'
71 libdir='${exec_prefix}/lib'
72 includedir='${prefix}/include'
73 oldincludedir='/usr/include'
74 infodir='${prefix}/info'
75 mandir='${prefix}/man'
77 # Initialize some other variables.
80 SHELL=${CONFIG_SHELL-/bin/sh}
81 # Maximum number of lines to put in a shell here document.
88 # If the previous option needs an argument, assign it.
89 if test -n "$ac_prev"; then
90 eval "$ac_prev=\$ac_option"
96 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
100 # Accept the important Cygnus configure options, so we can diagnose typos.
104 -bindir | --bindir | --bindi | --bind | --bin | --bi)
106 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
107 bindir="$ac_optarg" ;;
109 -build | --build | --buil | --bui | --bu)
111 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
112 build="$ac_optarg" ;;
114 -cache-file | --cache-file | --cache-fil | --cache-fi \
115 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
116 ac_prev=cache_file ;;
117 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
118 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
119 cache_file="$ac_optarg" ;;
121 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
123 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
125 datadir="$ac_optarg" ;;
127 -disable-* | --disable-*)
128 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
129 # Reject names that are not valid shell variable names.
130 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
131 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
133 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
134 eval "enable_${ac_feature}=no" ;;
136 -enable-* | --enable-*)
137 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
138 # Reject names that are not valid shell variable names.
139 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
140 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
142 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
147 eval "enable_${ac_feature}='$ac_optarg'" ;;
149 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
150 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
151 | --exec | --exe | --ex)
152 ac_prev=exec_prefix ;;
153 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
154 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
155 | --exec=* | --exe=* | --ex=*)
156 exec_prefix="$ac_optarg" ;;
158 -gas | --gas | --ga | --g)
159 # Obsolete; use --with-gas.
162 -help | --help | --hel | --he)
163 # Omit some internal or obsolete options to make the list less imposing.
164 # This message is too long to be a string in the A/UX 3.1 sh.
166 Usage: configure [options] [host]
167 Options: [defaults in brackets after descriptions]
169 --cache-file=FILE cache test results in FILE
170 --help print this message
171 --no-create do not create output files
172 --quiet, --silent do not print \`checking...' messages
173 --version print the version of autoconf that created configure
174 Directory and file names:
175 --prefix=PREFIX install architecture-independent files in PREFIX
177 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
179 --bindir=DIR user executables in DIR [EPREFIX/bin]
180 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
181 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
182 --datadir=DIR read-only architecture-independent data in DIR
184 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
185 --sharedstatedir=DIR modifiable architecture-independent data in DIR
187 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
188 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
189 --includedir=DIR C header files in DIR [PREFIX/include]
190 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
191 --infodir=DIR info documentation in DIR [PREFIX/info]
192 --mandir=DIR man documentation in DIR [PREFIX/man]
193 --srcdir=DIR find the sources in DIR [configure dir or ..]
194 --program-prefix=PREFIX prepend PREFIX to installed program names
195 --program-suffix=SUFFIX append SUFFIX to installed program names
196 --program-transform-name=PROGRAM
197 run sed PROGRAM on installed program names
201 --build=BUILD configure for building on BUILD [BUILD=HOST]
202 --host=HOST configure for HOST [guessed]
203 --target=TARGET configure for TARGET [TARGET=HOST]
204 Features and packages:
205 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
206 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
207 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
208 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
209 --x-includes=DIR X include files are in DIR
210 --x-libraries=DIR X library files are in DIR
212 if test -n "$ac_help"; then
213 echo "--enable and --with options recognized:$ac_help"
217 -host | --host | --hos | --ho)
219 -host=* | --host=* | --hos=* | --ho=*)
222 -includedir | --includedir | --includedi | --included | --include \
223 | --includ | --inclu | --incl | --inc)
224 ac_prev=includedir ;;
225 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
226 | --includ=* | --inclu=* | --incl=* | --inc=*)
227 includedir="$ac_optarg" ;;
229 -infodir | --infodir | --infodi | --infod | --info | --inf)
231 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
232 infodir="$ac_optarg" ;;
234 -libdir | --libdir | --libdi | --libd)
236 -libdir=* | --libdir=* | --libdi=* | --libd=*)
237 libdir="$ac_optarg" ;;
239 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
240 | --libexe | --libex | --libe)
241 ac_prev=libexecdir ;;
242 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
243 | --libexe=* | --libex=* | --libe=*)
244 libexecdir="$ac_optarg" ;;
246 -localstatedir | --localstatedir | --localstatedi | --localstated \
247 | --localstate | --localstat | --localsta | --localst \
248 | --locals | --local | --loca | --loc | --lo)
249 ac_prev=localstatedir ;;
250 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
251 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
252 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
253 localstatedir="$ac_optarg" ;;
255 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
257 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
258 mandir="$ac_optarg" ;;
261 # Obsolete; use --without-fp.
264 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
268 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
269 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
272 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
273 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
274 | --oldin | --oldi | --old | --ol | --o)
275 ac_prev=oldincludedir ;;
276 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
277 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
278 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
279 oldincludedir="$ac_optarg" ;;
281 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
283 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
284 prefix="$ac_optarg" ;;
286 -program-prefix | --program-prefix | --program-prefi | --program-pref \
287 | --program-pre | --program-pr | --program-p)
288 ac_prev=program_prefix ;;
289 -program-prefix=* | --program-prefix=* | --program-prefi=* \
290 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
291 program_prefix="$ac_optarg" ;;
293 -program-suffix | --program-suffix | --program-suffi | --program-suff \
294 | --program-suf | --program-su | --program-s)
295 ac_prev=program_suffix ;;
296 -program-suffix=* | --program-suffix=* | --program-suffi=* \
297 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
298 program_suffix="$ac_optarg" ;;
300 -program-transform-name | --program-transform-name \
301 | --program-transform-nam | --program-transform-na \
302 | --program-transform-n | --program-transform- \
303 | --program-transform | --program-transfor \
304 | --program-transfo | --program-transf \
305 | --program-trans | --program-tran \
306 | --progr-tra | --program-tr | --program-t)
307 ac_prev=program_transform_name ;;
308 -program-transform-name=* | --program-transform-name=* \
309 | --program-transform-nam=* | --program-transform-na=* \
310 | --program-transform-n=* | --program-transform-=* \
311 | --program-transform=* | --program-transfor=* \
312 | --program-transfo=* | --program-transf=* \
313 | --program-trans=* | --program-tran=* \
314 | --progr-tra=* | --program-tr=* | --program-t=*)
315 program_transform_name="$ac_optarg" ;;
317 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
318 | -silent | --silent | --silen | --sile | --sil)
321 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
323 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
325 sbindir="$ac_optarg" ;;
327 -sharedstatedir | --sharedstatedir | --sharedstatedi \
328 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
329 | --sharedst | --shareds | --shared | --share | --shar \
331 ac_prev=sharedstatedir ;;
332 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
333 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
334 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
336 sharedstatedir="$ac_optarg" ;;
338 -site | --site | --sit)
340 -site=* | --site=* | --sit=*)
343 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
345 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
346 srcdir="$ac_optarg" ;;
348 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
349 | --syscon | --sysco | --sysc | --sys | --sy)
350 ac_prev=sysconfdir ;;
351 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
352 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
353 sysconfdir="$ac_optarg" ;;
355 -target | --target | --targe | --targ | --tar | --ta | --t)
357 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
358 target="$ac_optarg" ;;
360 -v | -verbose | --verbose | --verbos | --verbo | --verb)
363 -version | --version | --versio | --versi | --vers)
364 echo "configure generated by autoconf version 2.13"
368 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
369 # Reject names that are not valid shell variable names.
370 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
371 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
373 ac_package=`echo $ac_package| sed 's/-/_/g'`
378 eval "with_${ac_package}='$ac_optarg'" ;;
380 -without-* | --without-*)
381 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
382 # Reject names that are not valid shell variable names.
383 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
384 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
386 ac_package=`echo $ac_package| sed 's/-/_/g'`
387 eval "with_${ac_package}=no" ;;
390 # Obsolete; use --with-x.
393 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
394 | --x-incl | --x-inc | --x-in | --x-i)
395 ac_prev=x_includes ;;
396 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
397 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
398 x_includes="$ac_optarg" ;;
400 -x-libraries | --x-libraries | --x-librarie | --x-librari \
401 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
402 ac_prev=x_libraries ;;
403 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
404 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
405 x_libraries="$ac_optarg" ;;
407 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
411 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
412 echo "configure: warning: $ac_option: invalid host type" 1>&2
414 if test "x$nonopt" != xNONE; then
415 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
423 if test -n "$ac_prev"; then
424 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
427 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
429 # File descriptor usage:
432 # 2 errors and warnings
433 # 3 some systems may open it to /dev/tty
434 # 4 used on the Kubota Titan
435 # 6 checking for... messages and results
436 # 5 compiler messages saved in config.log
437 if test "$silent" = yes; then
445 This file contains any messages produced by compilers while
446 running configure, to aid debugging if configure makes a mistake.
449 # Strip out --no-create and --no-recursion so they do not pile up.
450 # Also quote any args containing shell metacharacters.
455 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
456 | --no-cr | --no-c) ;;
457 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
458 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
459 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
460 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
461 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
466 # Only set these to C if already set. These must not be set unconditionally
467 # because not all systems understand e.g. LANG=C (notably SCO).
468 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
469 # Non-C LC_CTYPE values break the ctype check.
470 if test "${LANG+set}" = set; then LANG=C; export LANG; fi
471 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
472 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
473 if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
475 # confdefs.h avoids OS command line length limits that DEFS can exceed.
476 rm -rf conftest* confdefs.h
477 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
480 # A filename unique to this package, relative to the directory that
481 # configure is in, which we can look for to find out if srcdir is correct.
482 ac_unique_file=../generic/tcl.h
484 # Find the source files, if location was not specified.
485 if test -z "$srcdir"; then
486 ac_srcdir_defaulted=yes
487 # Try the directory containing this script, then its parent.
489 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
490 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
492 if test ! -r $srcdir/$ac_unique_file; then
496 ac_srcdir_defaulted=no
498 if test ! -r $srcdir/$ac_unique_file; then
499 if test "$ac_srcdir_defaulted" = yes; then
500 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
502 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
505 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
507 # Prefer explicitly selected file to automatically selected ones.
508 if test -z "$CONFIG_SITE"; then
509 if test "x$prefix" != xNONE; then
510 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
512 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
515 for ac_site_file in $CONFIG_SITE; do
516 if test -r "$ac_site_file"; then
517 echo "loading site script $ac_site_file"
522 if test -r "$cache_file"; then
523 echo "loading cache $cache_file"
526 echo "creating cache $cache_file"
531 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
532 ac_cpp='$CPP $CPPFLAGS'
533 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
534 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
535 cross_compiling=$ac_cv_prog_cc_cross
539 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
540 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
541 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
548 ac_n= ac_c='\c' ac_t=
557 TCL_PATCH_LEVEL=".15"
558 VERSION=${TCL_VERSION}
560 #------------------------------------------------------------------------
561 # Handle the --prefix=... option
562 #------------------------------------------------------------------------
564 if test "${prefix}" = "NONE"; then
567 if test "${exec_prefix}" = "NONE"; then
570 # Make sure srcdir is fully qualified!
571 srcdir=`cd $srcdir ; pwd`
572 TCL_SRC_DIR=`cd $srcdir/..; pwd`
574 #------------------------------------------------------------------------
575 # Compress and/or soft link the manpages?
576 #------------------------------------------------------------------------
579 echo $ac_n "checking whether to use symlinks for manpages""... $ac_c" 1>&6
580 echo "configure:581: checking whether to use symlinks for manpages" >&5
581 # Check whether --enable-man-symlinks or --disable-man-symlinks was given.
582 if test "${enable_man_symlinks+set}" = set; then
583 enableval="$enable_man_symlinks"
584 test "$enableval" != "no" && MAN_FLAGS="$MAN_FLAGS --symlinks"
589 echo "$ac_t""$enableval" 1>&6
591 echo $ac_n "checking whether to compress the manpages""... $ac_c" 1>&6
592 echo "configure:593: checking whether to compress the manpages" >&5
593 # Check whether --enable-man-compression or --disable-man-compression was given.
594 if test "${enable_man_compression+set}" = set; then
595 enableval="$enable_man_compression"
597 yes) { echo "configure: error: missing argument to --enable-man-compression" 1>&2; exit 1; };;
599 *) MAN_FLAGS="$MAN_FLAGS --compress $enableval";;
605 echo "$ac_t""$enableval" 1>&6
606 if test "$enableval" != "no"; then
607 echo $ac_n "checking for compressed file suffix""... $ac_c" 1>&6
608 echo "configure:609: checking for compressed file suffix" >&5
611 Z=`ls TeST* | sed 's/^....//'`
613 MAN_FLAGS="$MAN_FLAGS --extension $Z"
614 echo "$ac_t""$Z" 1>&6
617 echo $ac_n "checking whether to add a package name suffix for the manpages""... $ac_c" 1>&6
618 echo "configure:619: checking whether to add a package name suffix for the manpages" >&5
619 # Check whether --enable-man-suffix or --disable-man-suffix was given.
620 if test "${enable_man_suffix+set}" = set; then
621 enableval="$enable_man_suffix"
623 yes) enableval="tcl" MAN_FLAGS="$MAN_FLAGS --suffix $enableval";;
625 *) MAN_FLAGS="$MAN_FLAGS --suffix $enableval";;
631 echo "$ac_t""$enableval" 1>&6
636 #------------------------------------------------------------------------
637 # Standard compiler checks
638 #------------------------------------------------------------------------
640 # If the user did not set CFLAGS, set it now to keep
641 # the AC_PROG_CC macro from adding "-g -O2".
642 if test "${CFLAGS+set}" != "set" ; then
646 # Extract the first word of "gcc", so it can be a program name with args.
647 set dummy gcc; ac_word=$2
648 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
649 echo "configure:650: checking for $ac_word" >&5
650 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
651 echo $ac_n "(cached) $ac_c" 1>&6
653 if test -n "$CC"; then
654 ac_cv_prog_CC="$CC" # Let the user override the test.
656 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
658 for ac_dir in $ac_dummy; do
659 test -z "$ac_dir" && ac_dir=.
660 if test -f $ac_dir/$ac_word; then
669 if test -n "$CC"; then
670 echo "$ac_t""$CC" 1>&6
672 echo "$ac_t""no" 1>&6
675 if test -z "$CC"; then
676 # Extract the first word of "cc", so it can be a program name with args.
677 set dummy cc; ac_word=$2
678 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
679 echo "configure:680: checking for $ac_word" >&5
680 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
681 echo $ac_n "(cached) $ac_c" 1>&6
683 if test -n "$CC"; then
684 ac_cv_prog_CC="$CC" # Let the user override the test.
686 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
689 for ac_dir in $ac_dummy; do
690 test -z "$ac_dir" && ac_dir=.
691 if test -f $ac_dir/$ac_word; then
692 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
701 if test $ac_prog_rejected = yes; then
702 # We found a bogon in the path, so make sure we never use it.
703 set dummy $ac_cv_prog_CC
705 if test $# -gt 0; then
706 # We chose a different compiler from the bogus one.
707 # However, it has the same basename, so the bogon will be chosen
708 # first if we set CC to just the basename; use the full file name.
710 set dummy "$ac_dir/$ac_word" "$@"
718 if test -n "$CC"; then
719 echo "$ac_t""$CC" 1>&6
721 echo "$ac_t""no" 1>&6
724 if test -z "$CC"; then
727 # Extract the first word of "cl", so it can be a program name with args.
728 set dummy cl; ac_word=$2
729 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
730 echo "configure:731: checking for $ac_word" >&5
731 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
732 echo $ac_n "(cached) $ac_c" 1>&6
734 if test -n "$CC"; then
735 ac_cv_prog_CC="$CC" # Let the user override the test.
737 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
739 for ac_dir in $ac_dummy; do
740 test -z "$ac_dir" && ac_dir=.
741 if test -f $ac_dir/$ac_word; then
750 if test -n "$CC"; then
751 echo "$ac_t""$CC" 1>&6
753 echo "$ac_t""no" 1>&6
758 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
761 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
762 echo "configure:763: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
765 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
766 ac_cpp='$CPP $CPPFLAGS'
767 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
768 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
769 cross_compiling=$ac_cv_prog_cc_cross
771 cat > conftest.$ac_ext << EOF
773 #line 774 "configure"
774 #include "confdefs.h"
778 if { (eval echo configure:779: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
779 ac_cv_prog_cc_works=yes
780 # If we can't run a trivial program, we are probably using a cross compiler.
781 if (./conftest; exit) 2>/dev/null; then
782 ac_cv_prog_cc_cross=no
784 ac_cv_prog_cc_cross=yes
787 echo "configure: failed program was:" >&5
788 cat conftest.$ac_ext >&5
789 ac_cv_prog_cc_works=no
793 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
794 ac_cpp='$CPP $CPPFLAGS'
795 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
796 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
797 cross_compiling=$ac_cv_prog_cc_cross
799 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
800 if test $ac_cv_prog_cc_works = no; then
801 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
803 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
804 echo "configure:805: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
805 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
806 cross_compiling=$ac_cv_prog_cc_cross
808 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
809 echo "configure:810: checking whether we are using GNU C" >&5
810 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
811 echo $ac_n "(cached) $ac_c" 1>&6
813 cat > conftest.c <<EOF
818 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:819: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
825 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
827 if test $ac_cv_prog_gcc = yes; then
833 ac_test_CFLAGS="${CFLAGS+set}"
834 ac_save_CFLAGS="$CFLAGS"
836 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
837 echo "configure:838: checking whether ${CC-cc} accepts -g" >&5
838 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
839 echo $ac_n "(cached) $ac_c" 1>&6
841 echo 'void f(){}' > conftest.c
842 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
851 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
852 if test "$ac_test_CFLAGS" = set; then
853 CFLAGS="$ac_save_CFLAGS"
854 elif test $ac_cv_prog_cc_g = yes; then
855 if test "$GCC" = yes; then
861 if test "$GCC" = yes; then
869 #--------------------------------------------------------------------
870 # Supply substitutes for missing POSIX header files. Special notes:
871 # - stdlib.h doesn't define strtol, strtoul, or
872 # strtod insome versions of SunOS
873 # - some versions of string.h don't declare procedures such
875 # Do this early, otherwise an autoconf bug throws errors on configure
876 #--------------------------------------------------------------------
878 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
879 echo "configure:880: checking how to run the C preprocessor" >&5
880 # On Suns, sometimes $CPP names a directory.
881 if test -n "$CPP" && test -d "$CPP"; then
884 if test -z "$CPP"; then
885 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
886 echo $ac_n "(cached) $ac_c" 1>&6
888 # This must be in double quotes, not single quotes, because CPP may get
889 # substituted into the Makefile and "${CC-cc}" will confuse make.
891 # On the NeXT, cc -E runs the code through the compiler's parser,
892 # not just through cpp.
893 cat > conftest.$ac_ext <<EOF
894 #line 895 "configure"
895 #include "confdefs.h"
899 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
900 { (eval echo configure:901: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
901 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
902 if test -z "$ac_err"; then
906 echo "configure: failed program was:" >&5
907 cat conftest.$ac_ext >&5
909 CPP="${CC-cc} -E -traditional-cpp"
910 cat > conftest.$ac_ext <<EOF
911 #line 912 "configure"
912 #include "confdefs.h"
916 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
917 { (eval echo configure:918: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
918 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
919 if test -z "$ac_err"; then
923 echo "configure: failed program was:" >&5
924 cat conftest.$ac_ext >&5
926 CPP="${CC-cc} -nologo -E"
927 cat > conftest.$ac_ext <<EOF
928 #line 929 "configure"
929 #include "confdefs.h"
933 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
934 { (eval echo configure:935: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
935 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
936 if test -z "$ac_err"; then
940 echo "configure: failed program was:" >&5
941 cat conftest.$ac_ext >&5
950 ac_cv_prog_CPP="$CPP"
952 CPP="$ac_cv_prog_CPP"
954 ac_cv_prog_CPP="$CPP"
956 echo "$ac_t""$CPP" 1>&6
959 echo $ac_n "checking dirent.h""... $ac_c" 1>&6
960 echo "configure:961: checking dirent.h" >&5
961 if eval "test \"`echo '$''{'tcl_cv_dirent_h'+set}'`\" = set"; then
962 echo $ac_n "(cached) $ac_c" 1>&6
965 cat > conftest.$ac_ext <<EOF
966 #line 967 "configure"
967 #include "confdefs.h"
968 #include <sys/types.h>
972 #ifndef _POSIX_SOURCE
975 * Generate compilation error to make the test fail: Lynx headers
976 * are only valid if really in the POSIX environment.
983 struct dirent *entryPtr;
985 d = opendir("foobar");
986 entryPtr = readdir(d);
987 p = entryPtr->d_name;
992 if { (eval echo configure:993: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
996 echo "configure: failed program was:" >&5
997 cat conftest.$ac_ext >&5
1004 echo "$ac_t""$tcl_cv_dirent_h" 1>&6
1006 if test $tcl_cv_dirent_h = no; then
1007 cat >> confdefs.h <<\EOF
1008 #define NO_DIRENT_H 1
1013 ac_safe=`echo "errno.h" | sed 'y%./+-%__p_%'`
1014 echo $ac_n "checking for errno.h""... $ac_c" 1>&6
1015 echo "configure:1016: checking for errno.h" >&5
1016 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1017 echo $ac_n "(cached) $ac_c" 1>&6
1019 cat > conftest.$ac_ext <<EOF
1020 #line 1021 "configure"
1021 #include "confdefs.h"
1024 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1025 { (eval echo configure:1026: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1026 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1027 if test -z "$ac_err"; then
1029 eval "ac_cv_header_$ac_safe=yes"
1032 echo "configure: failed program was:" >&5
1033 cat conftest.$ac_ext >&5
1035 eval "ac_cv_header_$ac_safe=no"
1039 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1040 echo "$ac_t""yes" 1>&6
1043 echo "$ac_t""no" 1>&6
1044 cat >> confdefs.h <<\EOF
1045 #define NO_ERRNO_H 1
1050 ac_safe=`echo "float.h" | sed 'y%./+-%__p_%'`
1051 echo $ac_n "checking for float.h""... $ac_c" 1>&6
1052 echo "configure:1053: checking for float.h" >&5
1053 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1054 echo $ac_n "(cached) $ac_c" 1>&6
1056 cat > conftest.$ac_ext <<EOF
1057 #line 1058 "configure"
1058 #include "confdefs.h"
1061 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1062 { (eval echo configure:1063: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1063 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1064 if test -z "$ac_err"; then
1066 eval "ac_cv_header_$ac_safe=yes"
1069 echo "configure: failed program was:" >&5
1070 cat conftest.$ac_ext >&5
1072 eval "ac_cv_header_$ac_safe=no"
1076 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1077 echo "$ac_t""yes" 1>&6
1080 echo "$ac_t""no" 1>&6
1081 cat >> confdefs.h <<\EOF
1082 #define NO_FLOAT_H 1
1087 ac_safe=`echo "values.h" | sed 'y%./+-%__p_%'`
1088 echo $ac_n "checking for values.h""... $ac_c" 1>&6
1089 echo "configure:1090: checking for values.h" >&5
1090 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1091 echo $ac_n "(cached) $ac_c" 1>&6
1093 cat > conftest.$ac_ext <<EOF
1094 #line 1095 "configure"
1095 #include "confdefs.h"
1098 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1099 { (eval echo configure:1100: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1100 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1101 if test -z "$ac_err"; then
1103 eval "ac_cv_header_$ac_safe=yes"
1106 echo "configure: failed program was:" >&5
1107 cat conftest.$ac_ext >&5
1109 eval "ac_cv_header_$ac_safe=no"
1113 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1114 echo "$ac_t""yes" 1>&6
1117 echo "$ac_t""no" 1>&6
1118 cat >> confdefs.h <<\EOF
1119 #define NO_VALUES_H 1
1124 ac_safe=`echo "limits.h" | sed 'y%./+-%__p_%'`
1125 echo $ac_n "checking for limits.h""... $ac_c" 1>&6
1126 echo "configure:1127: checking for limits.h" >&5
1127 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1128 echo $ac_n "(cached) $ac_c" 1>&6
1130 cat > conftest.$ac_ext <<EOF
1131 #line 1132 "configure"
1132 #include "confdefs.h"
1135 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1136 { (eval echo configure:1137: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1137 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1138 if test -z "$ac_err"; then
1140 eval "ac_cv_header_$ac_safe=yes"
1143 echo "configure: failed program was:" >&5
1144 cat conftest.$ac_ext >&5
1146 eval "ac_cv_header_$ac_safe=no"
1150 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1151 echo "$ac_t""yes" 1>&6
1152 cat >> confdefs.h <<\EOF
1153 #define HAVE_LIMITS_H 1
1157 echo "$ac_t""no" 1>&6
1158 cat >> confdefs.h <<\EOF
1159 #define NO_LIMITS_H 1
1164 ac_safe=`echo "stdlib.h" | sed 'y%./+-%__p_%'`
1165 echo $ac_n "checking for stdlib.h""... $ac_c" 1>&6
1166 echo "configure:1167: checking for stdlib.h" >&5
1167 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1168 echo $ac_n "(cached) $ac_c" 1>&6
1170 cat > conftest.$ac_ext <<EOF
1171 #line 1172 "configure"
1172 #include "confdefs.h"
1175 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1176 { (eval echo configure:1177: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1177 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1178 if test -z "$ac_err"; then
1180 eval "ac_cv_header_$ac_safe=yes"
1183 echo "configure: failed program was:" >&5
1184 cat conftest.$ac_ext >&5
1186 eval "ac_cv_header_$ac_safe=no"
1190 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1191 echo "$ac_t""yes" 1>&6
1194 echo "$ac_t""no" 1>&6
1198 cat > conftest.$ac_ext <<EOF
1199 #line 1200 "configure"
1200 #include "confdefs.h"
1203 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1204 egrep "strtol" >/dev/null 2>&1; then
1212 cat > conftest.$ac_ext <<EOF
1213 #line 1214 "configure"
1214 #include "confdefs.h"
1217 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1218 egrep "strtoul" >/dev/null 2>&1; then
1226 cat > conftest.$ac_ext <<EOF
1227 #line 1228 "configure"
1228 #include "confdefs.h"
1231 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1232 egrep "strtod" >/dev/null 2>&1; then
1240 if test $tcl_ok = 0; then
1241 cat >> confdefs.h <<\EOF
1242 #define NO_STDLIB_H 1
1246 ac_safe=`echo "string.h" | sed 'y%./+-%__p_%'`
1247 echo $ac_n "checking for string.h""... $ac_c" 1>&6
1248 echo "configure:1249: checking for string.h" >&5
1249 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1250 echo $ac_n "(cached) $ac_c" 1>&6
1252 cat > conftest.$ac_ext <<EOF
1253 #line 1254 "configure"
1254 #include "confdefs.h"
1257 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1258 { (eval echo configure:1259: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1259 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1260 if test -z "$ac_err"; then
1262 eval "ac_cv_header_$ac_safe=yes"
1265 echo "configure: failed program was:" >&5
1266 cat conftest.$ac_ext >&5
1268 eval "ac_cv_header_$ac_safe=no"
1272 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1273 echo "$ac_t""yes" 1>&6
1276 echo "$ac_t""no" 1>&6
1280 cat > conftest.$ac_ext <<EOF
1281 #line 1282 "configure"
1282 #include "confdefs.h"
1285 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1286 egrep "strstr" >/dev/null 2>&1; then
1294 cat > conftest.$ac_ext <<EOF
1295 #line 1296 "configure"
1296 #include "confdefs.h"
1299 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1300 egrep "strerror" >/dev/null 2>&1; then
1309 # See also memmove check below for a place where NO_STRING_H can be
1312 if test $tcl_ok = 0; then
1313 cat >> confdefs.h <<\EOF
1314 #define NO_STRING_H 1
1319 ac_safe=`echo "sys/wait.h" | sed 'y%./+-%__p_%'`
1320 echo $ac_n "checking for sys/wait.h""... $ac_c" 1>&6
1321 echo "configure:1322: checking for sys/wait.h" >&5
1322 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1323 echo $ac_n "(cached) $ac_c" 1>&6
1325 cat > conftest.$ac_ext <<EOF
1326 #line 1327 "configure"
1327 #include "confdefs.h"
1328 #include <sys/wait.h>
1330 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1331 { (eval echo configure:1332: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1332 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1333 if test -z "$ac_err"; then
1335 eval "ac_cv_header_$ac_safe=yes"
1338 echo "configure: failed program was:" >&5
1339 cat conftest.$ac_ext >&5
1341 eval "ac_cv_header_$ac_safe=no"
1345 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1346 echo "$ac_t""yes" 1>&6
1349 echo "$ac_t""no" 1>&6
1350 cat >> confdefs.h <<\EOF
1351 #define NO_SYS_WAIT_H 1
1356 ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
1357 echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
1358 echo "configure:1359: checking for dlfcn.h" >&5
1359 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1360 echo $ac_n "(cached) $ac_c" 1>&6
1362 cat > conftest.$ac_ext <<EOF
1363 #line 1364 "configure"
1364 #include "confdefs.h"
1367 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1368 { (eval echo configure:1369: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1369 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1370 if test -z "$ac_err"; then
1372 eval "ac_cv_header_$ac_safe=yes"
1375 echo "configure: failed program was:" >&5
1376 cat conftest.$ac_ext >&5
1378 eval "ac_cv_header_$ac_safe=no"
1382 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1383 echo "$ac_t""yes" 1>&6
1386 echo "$ac_t""no" 1>&6
1387 cat >> confdefs.h <<\EOF
1388 #define NO_DLFCN_H 1
1394 # OS/390 lacks sys/param.h (and doesn't need it, by chance).
1395 for ac_hdr in unistd.h sys/param.h
1397 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1398 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1399 echo "configure:1400: checking for $ac_hdr" >&5
1400 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1401 echo $ac_n "(cached) $ac_c" 1>&6
1403 cat > conftest.$ac_ext <<EOF
1404 #line 1405 "configure"
1405 #include "confdefs.h"
1408 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1409 { (eval echo configure:1410: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1410 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1411 if test -z "$ac_err"; then
1413 eval "ac_cv_header_$ac_safe=yes"
1416 echo "configure: failed program was:" >&5
1417 cat conftest.$ac_ext >&5
1419 eval "ac_cv_header_$ac_safe=no"
1423 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1424 echo "$ac_t""yes" 1>&6
1425 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1426 cat >> confdefs.h <<EOF
1427 #define $ac_tr_hdr 1
1431 echo "$ac_t""no" 1>&6
1437 #------------------------------------------------------------------------
1438 # If we're using GCC, see if the compiler understands -pipe. If so, use it.
1439 # It makes compiling go faster. (This is only a performance feature.)
1440 #------------------------------------------------------------------------
1442 if test -z "$no_pipe" && test -n "$GCC"; then
1443 echo $ac_n "checking if the compiler understands -pipe""... $ac_c" 1>&6
1444 echo "configure:1445: checking if the compiler understands -pipe" >&5
1445 if eval "test \"`echo '$''{'tcl_cv_cc_pipe'+set}'`\" = set"; then
1446 echo $ac_n "(cached) $ac_c" 1>&6
1449 hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -pipe"
1450 cat > conftest.$ac_ext <<EOF
1451 #line 1452 "configure"
1452 #include "confdefs.h"
1458 if { (eval echo configure:1459: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1462 echo "configure: failed program was:" >&5
1463 cat conftest.$ac_ext >&5
1471 echo "$ac_t""$tcl_cv_cc_pipe" 1>&6
1472 if test $tcl_cv_cc_pipe = yes; then
1473 CFLAGS="$CFLAGS -pipe"
1477 #------------------------------------------------------------------------
1479 #------------------------------------------------------------------------
1482 # Check whether --enable-threads or --disable-threads was given.
1483 if test "${enable_threads+set}" = set; then
1484 enableval="$enable_threads"
1491 if test "${TCL_THREADS}" = 1; then
1492 tcl_threaded_core=1;
1495 if test "$tcl_ok" = "yes" -o "${TCL_THREADS}" = 1; then
1497 # USE_THREAD_ALLOC tells us to try the special thread-based
1498 # allocator that significantly reduces lock contention
1499 cat >> confdefs.h <<\EOF
1500 #define USE_THREAD_ALLOC 1
1503 cat >> confdefs.h <<\EOF
1504 #define _REENTRANT 1
1507 if test "`uname -s`" = "SunOS" ; then
1508 cat >> confdefs.h <<\EOF
1509 #define _POSIX_PTHREAD_SEMANTICS 1
1513 cat >> confdefs.h <<\EOF
1514 #define _THREAD_SAFE 1
1517 echo $ac_n "checking for pthread_mutex_init in -lpthread""... $ac_c" 1>&6
1518 echo "configure:1519: checking for pthread_mutex_init in -lpthread" >&5
1519 ac_lib_var=`echo pthread'_'pthread_mutex_init | sed 'y%./+-%__p_%'`
1520 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1521 echo $ac_n "(cached) $ac_c" 1>&6
1523 ac_save_LIBS="$LIBS"
1524 LIBS="-lpthread $LIBS"
1525 cat > conftest.$ac_ext <<EOF
1526 #line 1527 "configure"
1527 #include "confdefs.h"
1528 /* Override any gcc2 internal prototype to avoid an error. */
1529 /* We use char because int might match the return type of a gcc2
1530 builtin and then its argument prototype would still apply. */
1531 char pthread_mutex_init();
1534 pthread_mutex_init()
1537 if { (eval echo configure:1538: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1539 eval "ac_cv_lib_$ac_lib_var=yes"
1541 echo "configure: failed program was:" >&5
1542 cat conftest.$ac_ext >&5
1544 eval "ac_cv_lib_$ac_lib_var=no"
1547 LIBS="$ac_save_LIBS"
1550 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1551 echo "$ac_t""yes" 1>&6
1554 echo "$ac_t""no" 1>&6
1558 if test "$tcl_ok" = "no"; then
1559 # Check a little harder for __pthread_mutex_init in the same
1560 # library, as some systems hide it there until pthread.h is
1561 # defined. We could alternatively do an AC_TRY_COMPILE with
1562 # pthread.h, but that will work with libpthread really doesn't
1563 # exist, like AIX 4.2. [Bug: 4359]
1564 echo $ac_n "checking for __pthread_mutex_init in -lpthread""... $ac_c" 1>&6
1565 echo "configure:1566: checking for __pthread_mutex_init in -lpthread" >&5
1566 ac_lib_var=`echo pthread'_'__pthread_mutex_init | sed 'y%./+-%__p_%'`
1567 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1568 echo $ac_n "(cached) $ac_c" 1>&6
1570 ac_save_LIBS="$LIBS"
1571 LIBS="-lpthread $LIBS"
1572 cat > conftest.$ac_ext <<EOF
1573 #line 1574 "configure"
1574 #include "confdefs.h"
1575 /* Override any gcc2 internal prototype to avoid an error. */
1576 /* We use char because int might match the return type of a gcc2
1577 builtin and then its argument prototype would still apply. */
1578 char __pthread_mutex_init();
1581 __pthread_mutex_init()
1584 if { (eval echo configure:1585: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1586 eval "ac_cv_lib_$ac_lib_var=yes"
1588 echo "configure: failed program was:" >&5
1589 cat conftest.$ac_ext >&5
1591 eval "ac_cv_lib_$ac_lib_var=no"
1594 LIBS="$ac_save_LIBS"
1597 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1598 echo "$ac_t""yes" 1>&6
1601 echo "$ac_t""no" 1>&6
1607 if test "$tcl_ok" = "yes"; then
1608 # The space is needed
1609 THREADS_LIBS=" -lpthread"
1611 echo $ac_n "checking for pthread_mutex_init in -lpthreads""... $ac_c" 1>&6
1612 echo "configure:1613: checking for pthread_mutex_init in -lpthreads" >&5
1613 ac_lib_var=`echo pthreads'_'pthread_mutex_init | sed 'y%./+-%__p_%'`
1614 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1615 echo $ac_n "(cached) $ac_c" 1>&6
1617 ac_save_LIBS="$LIBS"
1618 LIBS="-lpthreads $LIBS"
1619 cat > conftest.$ac_ext <<EOF
1620 #line 1621 "configure"
1621 #include "confdefs.h"
1622 /* Override any gcc2 internal prototype to avoid an error. */
1623 /* We use char because int might match the return type of a gcc2
1624 builtin and then its argument prototype would still apply. */
1625 char pthread_mutex_init();
1628 pthread_mutex_init()
1631 if { (eval echo configure:1632: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1633 eval "ac_cv_lib_$ac_lib_var=yes"
1635 echo "configure: failed program was:" >&5
1636 cat conftest.$ac_ext >&5
1638 eval "ac_cv_lib_$ac_lib_var=no"
1641 LIBS="$ac_save_LIBS"
1644 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1645 echo "$ac_t""yes" 1>&6
1648 echo "$ac_t""no" 1>&6
1652 if test "$tcl_ok" = "yes"; then
1653 # The space is needed
1654 THREADS_LIBS=" -lpthreads"
1656 echo $ac_n "checking for pthread_mutex_init in -lc""... $ac_c" 1>&6
1657 echo "configure:1658: checking for pthread_mutex_init in -lc" >&5
1658 ac_lib_var=`echo c'_'pthread_mutex_init | sed 'y%./+-%__p_%'`
1659 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1660 echo $ac_n "(cached) $ac_c" 1>&6
1662 ac_save_LIBS="$LIBS"
1664 cat > conftest.$ac_ext <<EOF
1665 #line 1666 "configure"
1666 #include "confdefs.h"
1667 /* Override any gcc2 internal prototype to avoid an error. */
1668 /* We use char because int might match the return type of a gcc2
1669 builtin and then its argument prototype would still apply. */
1670 char pthread_mutex_init();
1673 pthread_mutex_init()
1676 if { (eval echo configure:1677: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1678 eval "ac_cv_lib_$ac_lib_var=yes"
1680 echo "configure: failed program was:" >&5
1681 cat conftest.$ac_ext >&5
1683 eval "ac_cv_lib_$ac_lib_var=no"
1686 LIBS="$ac_save_LIBS"
1689 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1690 echo "$ac_t""yes" 1>&6
1693 echo "$ac_t""no" 1>&6
1697 if test "$tcl_ok" = "no"; then
1698 echo $ac_n "checking for pthread_mutex_init in -lc_r""... $ac_c" 1>&6
1699 echo "configure:1700: checking for pthread_mutex_init in -lc_r" >&5
1700 ac_lib_var=`echo c_r'_'pthread_mutex_init | sed 'y%./+-%__p_%'`
1701 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1702 echo $ac_n "(cached) $ac_c" 1>&6
1704 ac_save_LIBS="$LIBS"
1706 cat > conftest.$ac_ext <<EOF
1707 #line 1708 "configure"
1708 #include "confdefs.h"
1709 /* Override any gcc2 internal prototype to avoid an error. */
1710 /* We use char because int might match the return type of a gcc2
1711 builtin and then its argument prototype would still apply. */
1712 char pthread_mutex_init();
1715 pthread_mutex_init()
1718 if { (eval echo configure:1719: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1720 eval "ac_cv_lib_$ac_lib_var=yes"
1722 echo "configure: failed program was:" >&5
1723 cat conftest.$ac_ext >&5
1725 eval "ac_cv_lib_$ac_lib_var=no"
1728 LIBS="$ac_save_LIBS"
1731 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1732 echo "$ac_t""yes" 1>&6
1735 echo "$ac_t""no" 1>&6
1739 if test "$tcl_ok" = "yes"; then
1740 # The space is needed
1741 THREADS_LIBS=" -pthread"
1744 echo "configure: warning: Don't know how to find pthread lib on your system - you must disable thread support or edit the LIBS in the Makefile..." 1>&2
1750 # Does the pthread-implementation provide
1751 # 'pthread_attr_setstacksize' ?
1754 LIBS="$LIBS $THREADS_LIBS"
1755 for ac_func in pthread_attr_setstacksize
1757 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1758 echo "configure:1759: checking for $ac_func" >&5
1759 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1760 echo $ac_n "(cached) $ac_c" 1>&6
1762 cat > conftest.$ac_ext <<EOF
1763 #line 1764 "configure"
1764 #include "confdefs.h"
1765 /* System header to define __stub macros and hopefully few prototypes,
1766 which can conflict with char $ac_func(); below. */
1768 /* Override any gcc2 internal prototype to avoid an error. */
1769 /* We use char because int might match the return type of a gcc2
1770 builtin and then its argument prototype would still apply. */
1775 /* The GNU C library defines this for functions which it implements
1776 to always fail with ENOSYS. Some functions are actually named
1777 something starting with __ and the normal name is an alias. */
1778 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1786 if { (eval echo configure:1787: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1788 eval "ac_cv_func_$ac_func=yes"
1790 echo "configure: failed program was:" >&5
1791 cat conftest.$ac_ext >&5
1793 eval "ac_cv_func_$ac_func=no"
1798 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1799 echo "$ac_t""yes" 1>&6
1800 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1801 cat >> confdefs.h <<EOF
1802 #define $ac_tr_func 1
1806 echo "$ac_t""no" 1>&6
1810 for ac_func in pthread_atfork
1812 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1813 echo "configure:1814: checking for $ac_func" >&5
1814 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1815 echo $ac_n "(cached) $ac_c" 1>&6
1817 cat > conftest.$ac_ext <<EOF
1818 #line 1819 "configure"
1819 #include "confdefs.h"
1820 /* System header to define __stub macros and hopefully few prototypes,
1821 which can conflict with char $ac_func(); below. */
1823 /* Override any gcc2 internal prototype to avoid an error. */
1824 /* We use char because int might match the return type of a gcc2
1825 builtin and then its argument prototype would still apply. */
1830 /* The GNU C library defines this for functions which it implements
1831 to always fail with ENOSYS. Some functions are actually named
1832 something starting with __ and the normal name is an alias. */
1833 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1841 if { (eval echo configure:1842: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1843 eval "ac_cv_func_$ac_func=yes"
1845 echo "configure: failed program was:" >&5
1846 cat conftest.$ac_ext >&5
1848 eval "ac_cv_func_$ac_func=no"
1853 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1854 echo "$ac_t""yes" 1>&6
1855 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1856 cat >> confdefs.h <<EOF
1857 #define $ac_tr_func 1
1861 echo "$ac_t""no" 1>&6
1869 # Do checking message here to not mess up interleaved configure output
1870 echo $ac_n "checking for building with threads""... $ac_c" 1>&6
1871 echo "configure:1872: checking for building with threads" >&5
1872 if test "${TCL_THREADS}" = 1; then
1873 cat >> confdefs.h <<\EOF
1874 #define TCL_THREADS 1
1877 if test "${tcl_threaded_core}" = 1; then
1878 echo "$ac_t""yes (threaded core)" 1>&6
1880 echo "$ac_t""yes" 1>&6
1883 echo "$ac_t""no (default)" 1>&6
1889 #--------------------------------------------------------------------
1890 # Look for libraries that we will need when compiling the Tcl shell
1891 #--------------------------------------------------------------------
1894 #--------------------------------------------------------------------
1895 # On a few very rare systems, all of the libm.a stuff is
1896 # already in libc.a. Set compiler flags accordingly.
1897 # Also, Linux requires the "ieee" library for math to work
1898 # right (and it must appear before "-lm").
1899 #--------------------------------------------------------------------
1901 echo $ac_n "checking for sin""... $ac_c" 1>&6
1902 echo "configure:1903: checking for sin" >&5
1903 if eval "test \"`echo '$''{'ac_cv_func_sin'+set}'`\" = set"; then
1904 echo $ac_n "(cached) $ac_c" 1>&6
1906 cat > conftest.$ac_ext <<EOF
1907 #line 1908 "configure"
1908 #include "confdefs.h"
1909 /* System header to define __stub macros and hopefully few prototypes,
1910 which can conflict with char sin(); below. */
1912 /* Override any gcc2 internal prototype to avoid an error. */
1913 /* We use char because int might match the return type of a gcc2
1914 builtin and then its argument prototype would still apply. */
1919 /* The GNU C library defines this for functions which it implements
1920 to always fail with ENOSYS. Some functions are actually named
1921 something starting with __ and the normal name is an alias. */
1922 #if defined (__stub_sin) || defined (__stub___sin)
1930 if { (eval echo configure:1931: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1932 eval "ac_cv_func_sin=yes"
1934 echo "configure: failed program was:" >&5
1935 cat conftest.$ac_ext >&5
1937 eval "ac_cv_func_sin=no"
1942 if eval "test \"`echo '$ac_cv_func_'sin`\" = yes"; then
1943 echo "$ac_t""yes" 1>&6
1946 echo "$ac_t""no" 1>&6
1950 echo $ac_n "checking for main in -lieee""... $ac_c" 1>&6
1951 echo "configure:1952: checking for main in -lieee" >&5
1952 ac_lib_var=`echo ieee'_'main | sed 'y%./+-%__p_%'`
1953 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1954 echo $ac_n "(cached) $ac_c" 1>&6
1956 ac_save_LIBS="$LIBS"
1958 cat > conftest.$ac_ext <<EOF
1959 #line 1960 "configure"
1960 #include "confdefs.h"
1966 if { (eval echo configure:1967: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1968 eval "ac_cv_lib_$ac_lib_var=yes"
1970 echo "configure: failed program was:" >&5
1971 cat conftest.$ac_ext >&5
1973 eval "ac_cv_lib_$ac_lib_var=no"
1976 LIBS="$ac_save_LIBS"
1979 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1980 echo "$ac_t""yes" 1>&6
1981 MATH_LIBS="-lieee $MATH_LIBS"
1983 echo "$ac_t""no" 1>&6
1987 #--------------------------------------------------------------------
1988 # Interactive UNIX requires -linet instead of -lsocket, plus it
1989 # needs net/errno.h to define the socket-related error codes.
1990 #--------------------------------------------------------------------
1992 echo $ac_n "checking for main in -linet""... $ac_c" 1>&6
1993 echo "configure:1994: checking for main in -linet" >&5
1994 ac_lib_var=`echo inet'_'main | sed 'y%./+-%__p_%'`
1995 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1996 echo $ac_n "(cached) $ac_c" 1>&6
1998 ac_save_LIBS="$LIBS"
2000 cat > conftest.$ac_ext <<EOF
2001 #line 2002 "configure"
2002 #include "confdefs.h"
2008 if { (eval echo configure:2009: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2010 eval "ac_cv_lib_$ac_lib_var=yes"
2012 echo "configure: failed program was:" >&5
2013 cat conftest.$ac_ext >&5
2015 eval "ac_cv_lib_$ac_lib_var=no"
2018 LIBS="$ac_save_LIBS"
2021 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2022 echo "$ac_t""yes" 1>&6
2025 echo "$ac_t""no" 1>&6
2028 ac_safe=`echo "net/errno.h" | sed 'y%./+-%__p_%'`
2029 echo $ac_n "checking for net/errno.h""... $ac_c" 1>&6
2030 echo "configure:2031: checking for net/errno.h" >&5
2031 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2032 echo $ac_n "(cached) $ac_c" 1>&6
2034 cat > conftest.$ac_ext <<EOF
2035 #line 2036 "configure"
2036 #include "confdefs.h"
2037 #include <net/errno.h>
2039 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2040 { (eval echo configure:2041: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2041 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2042 if test -z "$ac_err"; then
2044 eval "ac_cv_header_$ac_safe=yes"
2047 echo "configure: failed program was:" >&5
2048 cat conftest.$ac_ext >&5
2050 eval "ac_cv_header_$ac_safe=no"
2054 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2055 echo "$ac_t""yes" 1>&6
2056 cat >> confdefs.h <<\EOF
2057 #define HAVE_NET_ERRNO_H 1
2061 echo "$ac_t""no" 1>&6
2065 #--------------------------------------------------------------------
2066 # Check for the existence of the -lsocket and -lnsl libraries.
2067 # The order here is important, so that they end up in the right
2068 # order in the command line generated by make. Here are some
2069 # special considerations:
2070 # 1. Use "connect" and "accept" to check for -lsocket, and
2071 # "gethostbyname" to check for -lnsl.
2072 # 2. Use each function name only once: can't redo a check because
2073 # autoconf caches the results of the last check and won't redo it.
2074 # 3. Use -lnsl and -lsocket only if they supply procedures that
2075 # aren't already present in the normal libraries. This is because
2076 # IRIX 5.2 has libraries, but they aren't needed and they're
2077 # bogus: they goof up name resolution if used.
2078 # 4. On some SVR4 systems, can't use -lsocket without -lnsl too.
2079 # To get around this problem, check for both libraries together
2080 # if -lsocket doesn't work by itself.
2081 #--------------------------------------------------------------------
2084 echo $ac_n "checking for connect""... $ac_c" 1>&6
2085 echo "configure:2086: checking for connect" >&5
2086 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
2087 echo $ac_n "(cached) $ac_c" 1>&6
2089 cat > conftest.$ac_ext <<EOF
2090 #line 2091 "configure"
2091 #include "confdefs.h"
2092 /* System header to define __stub macros and hopefully few prototypes,
2093 which can conflict with char connect(); below. */
2095 /* Override any gcc2 internal prototype to avoid an error. */
2096 /* We use char because int might match the return type of a gcc2
2097 builtin and then its argument prototype would still apply. */
2102 /* The GNU C library defines this for functions which it implements
2103 to always fail with ENOSYS. Some functions are actually named
2104 something starting with __ and the normal name is an alias. */
2105 #if defined (__stub_connect) || defined (__stub___connect)
2113 if { (eval echo configure:2114: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2115 eval "ac_cv_func_connect=yes"
2117 echo "configure: failed program was:" >&5
2118 cat conftest.$ac_ext >&5
2120 eval "ac_cv_func_connect=no"
2125 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
2126 echo "$ac_t""yes" 1>&6
2129 echo "$ac_t""no" 1>&6
2133 if test "$tcl_checkSocket" = 1; then
2134 echo $ac_n "checking for setsockopt""... $ac_c" 1>&6
2135 echo "configure:2136: checking for setsockopt" >&5
2136 if eval "test \"`echo '$''{'ac_cv_func_setsockopt'+set}'`\" = set"; then
2137 echo $ac_n "(cached) $ac_c" 1>&6
2139 cat > conftest.$ac_ext <<EOF
2140 #line 2141 "configure"
2141 #include "confdefs.h"
2142 /* System header to define __stub macros and hopefully few prototypes,
2143 which can conflict with char setsockopt(); below. */
2145 /* Override any gcc2 internal prototype to avoid an error. */
2146 /* We use char because int might match the return type of a gcc2
2147 builtin and then its argument prototype would still apply. */
2152 /* The GNU C library defines this for functions which it implements
2153 to always fail with ENOSYS. Some functions are actually named
2154 something starting with __ and the normal name is an alias. */
2155 #if defined (__stub_setsockopt) || defined (__stub___setsockopt)
2163 if { (eval echo configure:2164: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2165 eval "ac_cv_func_setsockopt=yes"
2167 echo "configure: failed program was:" >&5
2168 cat conftest.$ac_ext >&5
2170 eval "ac_cv_func_setsockopt=no"
2175 if eval "test \"`echo '$ac_cv_func_'setsockopt`\" = yes"; then
2176 echo "$ac_t""yes" 1>&6
2179 echo "$ac_t""no" 1>&6
2180 echo $ac_n "checking for setsockopt in -lsocket""... $ac_c" 1>&6
2181 echo "configure:2182: checking for setsockopt in -lsocket" >&5
2182 ac_lib_var=`echo socket'_'setsockopt | sed 'y%./+-%__p_%'`
2183 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2184 echo $ac_n "(cached) $ac_c" 1>&6
2186 ac_save_LIBS="$LIBS"
2187 LIBS="-lsocket $LIBS"
2188 cat > conftest.$ac_ext <<EOF
2189 #line 2190 "configure"
2190 #include "confdefs.h"
2191 /* Override any gcc2 internal prototype to avoid an error. */
2192 /* We use char because int might match the return type of a gcc2
2193 builtin and then its argument prototype would still apply. */
2200 if { (eval echo configure:2201: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2202 eval "ac_cv_lib_$ac_lib_var=yes"
2204 echo "configure: failed program was:" >&5
2205 cat conftest.$ac_ext >&5
2207 eval "ac_cv_lib_$ac_lib_var=no"
2210 LIBS="$ac_save_LIBS"
2213 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2214 echo "$ac_t""yes" 1>&6
2215 LIBS="$LIBS -lsocket"
2217 echo "$ac_t""no" 1>&6
2224 if test "$tcl_checkBoth" = 1; then
2226 LIBS="$LIBS -lsocket -lnsl"
2227 echo $ac_n "checking for accept""... $ac_c" 1>&6
2228 echo "configure:2229: checking for accept" >&5
2229 if eval "test \"`echo '$''{'ac_cv_func_accept'+set}'`\" = set"; then
2230 echo $ac_n "(cached) $ac_c" 1>&6
2232 cat > conftest.$ac_ext <<EOF
2233 #line 2234 "configure"
2234 #include "confdefs.h"
2235 /* System header to define __stub macros and hopefully few prototypes,
2236 which can conflict with char accept(); below. */
2238 /* Override any gcc2 internal prototype to avoid an error. */
2239 /* We use char because int might match the return type of a gcc2
2240 builtin and then its argument prototype would still apply. */
2245 /* The GNU C library defines this for functions which it implements
2246 to always fail with ENOSYS. Some functions are actually named
2247 something starting with __ and the normal name is an alias. */
2248 #if defined (__stub_accept) || defined (__stub___accept)
2256 if { (eval echo configure:2257: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2258 eval "ac_cv_func_accept=yes"
2260 echo "configure: failed program was:" >&5
2261 cat conftest.$ac_ext >&5
2263 eval "ac_cv_func_accept=no"
2268 if eval "test \"`echo '$ac_cv_func_'accept`\" = yes"; then
2269 echo "$ac_t""yes" 1>&6
2272 echo "$ac_t""no" 1>&6
2277 echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
2278 echo "configure:2279: checking for gethostbyname" >&5
2279 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
2280 echo $ac_n "(cached) $ac_c" 1>&6
2282 cat > conftest.$ac_ext <<EOF
2283 #line 2284 "configure"
2284 #include "confdefs.h"
2285 /* System header to define __stub macros and hopefully few prototypes,
2286 which can conflict with char gethostbyname(); below. */
2288 /* Override any gcc2 internal prototype to avoid an error. */
2289 /* We use char because int might match the return type of a gcc2
2290 builtin and then its argument prototype would still apply. */
2291 char gethostbyname();
2295 /* The GNU C library defines this for functions which it implements
2296 to always fail with ENOSYS. Some functions are actually named
2297 something starting with __ and the normal name is an alias. */
2298 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
2306 if { (eval echo configure:2307: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2308 eval "ac_cv_func_gethostbyname=yes"
2310 echo "configure: failed program was:" >&5
2311 cat conftest.$ac_ext >&5
2313 eval "ac_cv_func_gethostbyname=no"
2318 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
2319 echo "$ac_t""yes" 1>&6
2322 echo "$ac_t""no" 1>&6
2323 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
2324 echo "configure:2325: checking for gethostbyname in -lnsl" >&5
2325 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
2326 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2327 echo $ac_n "(cached) $ac_c" 1>&6
2329 ac_save_LIBS="$LIBS"
2331 cat > conftest.$ac_ext <<EOF
2332 #line 2333 "configure"
2333 #include "confdefs.h"
2334 /* Override any gcc2 internal prototype to avoid an error. */
2335 /* We use char because int might match the return type of a gcc2
2336 builtin and then its argument prototype would still apply. */
2337 char gethostbyname();
2343 if { (eval echo configure:2344: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2345 eval "ac_cv_lib_$ac_lib_var=yes"
2347 echo "configure: failed program was:" >&5
2348 cat conftest.$ac_ext >&5
2350 eval "ac_cv_lib_$ac_lib_var=no"
2353 LIBS="$ac_save_LIBS"
2356 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2357 echo "$ac_t""yes" 1>&6
2360 echo "$ac_t""no" 1>&6
2366 # Don't perform the eval of the libraries here because DL_LIBS
2367 # won't be set until we call SC_CONFIG_CFLAGS
2369 TCL_LIBS='${DL_LIBS} ${LIBS} ${MATH_LIBS}'
2374 # Add the threads support libraries
2375 LIBS="$LIBS$THREADS_LIBS"
2378 echo $ac_n "checking how to build libraries""... $ac_c" 1>&6
2379 echo "configure:2380: checking how to build libraries" >&5
2380 # Check whether --enable-shared or --disable-shared was given.
2381 if test "${enable_shared+set}" = set; then
2382 enableval="$enable_shared"
2389 if test "${enable_shared+set}" = set; then
2390 enableval="$enable_shared"
2396 if test "$tcl_ok" = "yes" ; then
2397 echo "$ac_t""shared" 1>&6
2400 echo "$ac_t""static" 1>&6
2402 cat >> confdefs.h <<\EOF
2403 #define STATIC_BUILD 1
2409 #--------------------------------------------------------------------
2410 # The statements below define a collection of compile flags. This
2411 # macro depends on the value of SHARED_BUILD, and should be called
2412 # after SC_ENABLE_SHARED checks the configure switches.
2413 #--------------------------------------------------------------------
2415 # Extract the first word of "ranlib", so it can be a program name with args.
2416 set dummy ranlib; ac_word=$2
2417 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2418 echo "configure:2419: checking for $ac_word" >&5
2419 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
2420 echo $ac_n "(cached) $ac_c" 1>&6
2422 if test -n "$RANLIB"; then
2423 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2425 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2427 for ac_dir in $ac_dummy; do
2428 test -z "$ac_dir" && ac_dir=.
2429 if test -f $ac_dir/$ac_word; then
2430 ac_cv_prog_RANLIB="ranlib"
2435 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2438 RANLIB="$ac_cv_prog_RANLIB"
2439 if test -n "$RANLIB"; then
2440 echo "$ac_t""$RANLIB" 1>&6
2442 echo "$ac_t""no" 1>&6
2447 # Step 0.a: Enable 64 bit support?
2449 echo $ac_n "checking if 64bit support is requested""... $ac_c" 1>&6
2450 echo "configure:2451: checking if 64bit support is requested" >&5
2451 # Check whether --enable-64bit or --disable-64bit was given.
2452 if test "${enable_64bit+set}" = set; then
2453 enableval="$enable_64bit"
2459 echo "$ac_t""$do64bit" 1>&6
2461 # Step 0.b: Enable Solaris 64 bit VIS support?
2463 echo $ac_n "checking if 64bit Sparc VIS support is requested""... $ac_c" 1>&6
2464 echo "configure:2465: checking if 64bit Sparc VIS support is requested" >&5
2465 # Check whether --enable-64bit-vis or --disable-64bit-vis was given.
2466 if test "${enable_64bit_vis+set}" = set; then
2467 enableval="$enable_64bit_vis"
2468 do64bitVIS=$enableval
2473 echo "$ac_t""$do64bitVIS" 1>&6
2475 if test "$do64bitVIS" = "yes"; then
2476 # Force 64bit on with VIS
2480 # Step 1: set the variable "system" to hold the name and version number
2484 echo $ac_n "checking system version""... $ac_c" 1>&6
2485 echo "configure:2486: checking system version" >&5
2486 if eval "test \"`echo '$''{'tcl_cv_sys_version'+set}'`\" = set"; then
2487 echo $ac_n "(cached) $ac_c" 1>&6
2490 if test -f /usr/lib/NextStep/software_version; then
2491 tcl_cv_sys_version=NEXTSTEP-`awk '/3/,/3/' /usr/lib/NextStep/software_version`
2493 tcl_cv_sys_version=`uname -s`-`uname -r`
2494 if test "$?" -ne 0 ; then
2495 echo "configure: warning: can't find uname command" 1>&2
2496 tcl_cv_sys_version=unknown
2498 # Special check for weird MP-RAS system (uname returns weird
2499 # results, and the version is kept in special file).
2501 if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then
2502 tcl_cv_sys_version=MP-RAS-`awk '{print $3}' /etc/.relid`
2504 if test "`uname -s`" = "AIX" ; then
2505 tcl_cv_sys_version=AIX-`uname -v`.`uname -r`
2512 echo "$ac_t""$tcl_cv_sys_version" 1>&6
2513 system=$tcl_cv_sys_version
2516 # Step 2: check for existence of -ldl library. This is needed because
2517 # Linux can use either -ldl or -ldld for dynamic loading.
2519 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
2520 echo "configure:2521: checking for dlopen in -ldl" >&5
2521 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
2522 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2523 echo $ac_n "(cached) $ac_c" 1>&6
2525 ac_save_LIBS="$LIBS"
2527 cat > conftest.$ac_ext <<EOF
2528 #line 2529 "configure"
2529 #include "confdefs.h"
2530 /* Override any gcc2 internal prototype to avoid an error. */
2531 /* We use char because int might match the return type of a gcc2
2532 builtin and then its argument prototype would still apply. */
2539 if { (eval echo configure:2540: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2541 eval "ac_cv_lib_$ac_lib_var=yes"
2543 echo "configure: failed program was:" >&5
2544 cat conftest.$ac_ext >&5
2546 eval "ac_cv_lib_$ac_lib_var=no"
2549 LIBS="$ac_save_LIBS"
2552 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2553 echo "$ac_t""yes" 1>&6
2556 echo "$ac_t""no" 1>&6
2561 # Require ranlib early so we can override it in special cases below.
2565 # Step 3: set configuration options based on system name and version.
2568 LDFLAGS_ORIG="$LDFLAGS"
2569 TCL_EXPORT_FILE_SUFFIX=""
2570 UNSHARED_LIB_SUFFIX=""
2571 TCL_TRIM_DOTS='`echo ${VERSION} | tr -d .`'
2572 ECHO_VERSION='`echo ${VERSION}`'
2573 TCL_LIB_VERSIONS_OK=ok
2576 if test "$GCC" = "yes" ; then
2577 CFLAGS_WARNING="-Wall -Wno-implicit-int -fno-strict-aliasing"
2581 TCL_NEEDS_EXP_FILE=0
2582 TCL_BUILD_EXP_FILE=""
2584 # Extract the first word of "ar", so it can be a program name with args.
2585 set dummy ar; ac_word=$2
2586 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2587 echo "configure:2588: checking for $ac_word" >&5
2588 if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
2589 echo $ac_n "(cached) $ac_c" 1>&6
2591 if test -n "$AR"; then
2592 ac_cv_prog_AR="$AR" # Let the user override the test.
2594 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2596 for ac_dir in $ac_dummy; do
2597 test -z "$ac_dir" && ac_dir=.
2598 if test -f $ac_dir/$ac_word; then
2607 if test -n "$AR"; then
2608 echo "$ac_t""$AR" 1>&6
2610 echo "$ac_t""no" 1>&6
2613 if test "${AR}" = "" ; then
2614 { echo "configure: error: Required archive tool 'ar' not found on PATH." 1>&2; exit 1; }
2617 LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH"
2622 if test "${TCL_THREADS}" = "1" -a "$GCC" != "yes" ; then
2623 # AIX requires the _r compiler when gcc isn't being used
2632 echo "$ac_t""Using $CC for compiling with threads" 1>&6
2636 # Note: need the LIBS below, otherwise Tk won't find Tcl's
2637 # symbols when dynamically loaded into tclsh.
2638 SHLIB_LD_LIBS='${LIBS}'
2641 DL_OBJS="tclLoadDl.o"
2642 LD_LIBRARY_PATH_VAR="LIBPATH"
2644 # Check to enable 64-bit flags for compiler/linker on AIX 4+
2645 if test "$do64bit" = "yes" -a "`uname -v`" -gt "3" ; then
2646 if test "$GCC" = "yes" ; then
2647 echo "configure: warning: 64bit mode not supported with GCC on $system" 1>&2
2650 CFLAGS="$CFLAGS -q64"
2651 LDFLAGS="$LDFLAGS -q64"
2652 RANLIB="${RANLIB} -X64"
2654 SHLIB_LD_FLAGS="-b64"
2658 if test "`uname -m`" = "ia64" ; then
2659 # AIX-5 uses ELF style dynamic libraries on IA-64, but not PPC
2660 SHLIB_LD="/usr/ccs/bin/ld -G -z text"
2661 # AIX-5 has dl* in libc.so
2663 if test "$GCC" = "yes" ; then
2664 CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
2666 CC_SEARCH_FLAGS='-R${LIB_RUNTIME_DIR}'
2668 LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
2670 if test "$GCC" = "yes" ; then
2671 SHLIB_LD="gcc -shared"
2673 SHLIB_LD="/bin/ld -bhalt:4 -bM:SRE -bE:lib.exp -H512 -T512 -bnoentry"
2675 SHLIB_LD="${TCL_SRC_DIR}/unix/ldAix ${SHLIB_LD} ${SHLIB_LD_FLAGS}"
2677 CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
2678 LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
2679 TCL_NEEDS_EXP_FILE=1
2680 TCL_EXPORT_FILE_SUFFIX='${VERSION}\$\{DBGX\}.exp'
2683 # AIX v<=4.1 has some different flags than 4.2+
2684 if test "$system" = "AIX-4.1" -o "`uname -v`" -lt "4" ; then
2685 LIBOBJS="$LIBOBJS tclLoadAix.o"
2689 # On AIX <=v4 systems, libbsd.a has to be linked in to support
2690 # non-blocking file IO. This library has to be linked in after
2691 # the MATH_LIBS or it breaks the pow() function. The way to
2692 # insure proper sequencing, is to add it to the tail of MATH_LIBS.
2693 # This library also supplies gettimeofday.
2695 # AIX does not have a timezone field in struct tm. When the AIX
2696 # bsd library is used, the timezone global and the gettimeofday
2697 # methods are to be avoided for timezone deduction instead, we
2698 # deduce the timezone by comparing the localtime result on a
2701 echo $ac_n "checking for gettimeofday in -lbsd""... $ac_c" 1>&6
2702 echo "configure:2703: checking for gettimeofday in -lbsd" >&5
2703 ac_lib_var=`echo bsd'_'gettimeofday | sed 'y%./+-%__p_%'`
2704 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2705 echo $ac_n "(cached) $ac_c" 1>&6
2707 ac_save_LIBS="$LIBS"
2709 cat > conftest.$ac_ext <<EOF
2710 #line 2711 "configure"
2711 #include "confdefs.h"
2712 /* Override any gcc2 internal prototype to avoid an error. */
2713 /* We use char because int might match the return type of a gcc2
2714 builtin and then its argument prototype would still apply. */
2715 char gettimeofday();
2721 if { (eval echo configure:2722: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2723 eval "ac_cv_lib_$ac_lib_var=yes"
2725 echo "configure: failed program was:" >&5
2726 cat conftest.$ac_ext >&5
2728 eval "ac_cv_lib_$ac_lib_var=no"
2731 LIBS="$ac_save_LIBS"
2734 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2735 echo "$ac_t""yes" 1>&6
2738 echo "$ac_t""no" 1>&6
2742 if test $libbsd = yes; then
2743 MATH_LIBS="$MATH_LIBS -lbsd"
2744 cat >> confdefs.h <<\EOF
2745 #define USE_DELTA_FOR_TZ 1
2751 SHLIB_CFLAGS="-fPIC"
2752 SHLIB_LD="${CC} -nostart"
2753 SHLIB_LD_LIBS='${LIBS}'
2755 DL_OBJS="tclLoadDl.o"
2758 #-----------------------------------------------------------
2759 # Check for inet_ntoa in -lbind, for BeOS (which also needs
2760 # -lsocket, even if the network functions are in -lnet which
2761 # is always linked to, for compatibility.
2762 #-----------------------------------------------------------
2763 echo $ac_n "checking for inet_ntoa in -lbind""... $ac_c" 1>&6
2764 echo "configure:2765: checking for inet_ntoa in -lbind" >&5
2765 ac_lib_var=`echo bind'_'inet_ntoa | sed 'y%./+-%__p_%'`
2766 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2767 echo $ac_n "(cached) $ac_c" 1>&6
2769 ac_save_LIBS="$LIBS"
2771 cat > conftest.$ac_ext <<EOF
2772 #line 2773 "configure"
2773 #include "confdefs.h"
2774 /* Override any gcc2 internal prototype to avoid an error. */
2775 /* We use char because int might match the return type of a gcc2
2776 builtin and then its argument prototype would still apply. */
2783 if { (eval echo configure:2784: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2785 eval "ac_cv_lib_$ac_lib_var=yes"
2787 echo "configure: failed program was:" >&5
2788 cat conftest.$ac_ext >&5
2790 eval "ac_cv_lib_$ac_lib_var=no"
2793 LIBS="$ac_save_LIBS"
2796 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2797 echo "$ac_t""yes" 1>&6
2798 LIBS="$LIBS -lbind -lsocket"
2800 echo "$ac_t""no" 1>&6
2804 BSD/OS-2.1*|BSD/OS-3*)
2806 SHLIB_LD="shlicc -r"
2807 SHLIB_LD_LIBS='${LIBS}'
2809 DL_OBJS="tclLoadDl.o"
2815 SHLIB_CFLAGS="-export-dynamic -fPIC"
2816 SHLIB_LD="cc -shared"
2817 SHLIB_LD_LIBS='${LIBS}'
2819 DL_OBJS="tclLoadDl.o"
2821 LDFLAGS="$LDFLAGS -export-dynamic"
2826 SHLIB_CFLAGS="-K PIC"
2830 DL_OBJS="tclLoadDl.o"
2836 # Use updated header definitions where possible
2837 cat >> confdefs.h <<\EOF
2838 #define _XOPEN_SOURCE 1
2840 # Use the XOPEN network library
2841 cat >> confdefs.h <<\EOF
2842 #define _XOPEN_SOURCE_EXTENDED 1
2844 # Use the XOPEN network library
2845 LIBS="$LIBS -lxnet" # Use the XOPEN network library
2847 if test "`uname -m`" = "ia64" ; then
2852 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
2853 echo "configure:2854: checking for shl_load in -ldld" >&5
2854 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
2855 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2856 echo $ac_n "(cached) $ac_c" 1>&6
2858 ac_save_LIBS="$LIBS"
2860 cat > conftest.$ac_ext <<EOF
2861 #line 2862 "configure"
2862 #include "confdefs.h"
2863 /* Override any gcc2 internal prototype to avoid an error. */
2864 /* We use char because int might match the return type of a gcc2
2865 builtin and then its argument prototype would still apply. */
2872 if { (eval echo configure:2873: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2874 eval "ac_cv_lib_$ac_lib_var=yes"
2876 echo "configure: failed program was:" >&5
2877 cat conftest.$ac_ext >&5
2879 eval "ac_cv_lib_$ac_lib_var=no"
2882 LIBS="$ac_save_LIBS"
2885 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2886 echo "$ac_t""yes" 1>&6
2889 echo "$ac_t""no" 1>&6
2893 if test "$tcl_ok" = yes; then
2896 SHLIB_LD_LIBS='${LIBS}'
2897 DL_OBJS="tclLoadShl.o"
2899 LDFLAGS="$LDFLAGS -Wl,-E"
2900 CC_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.'
2901 LD_SEARCH_FLAGS='+s +b ${LIB_RUNTIME_DIR}:.'
2902 LD_LIBRARY_PATH_VAR="SHLIB_PATH"
2904 if test "$GCC" = "yes" ; then
2905 SHLIB_LD="gcc -shared"
2906 SHLIB_LD_LIBS='${LIBS}'
2907 LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
2910 # Users may want PA-RISC 1.1/2.0 portable code - needs HP cc
2911 #CFLAGS="$CFLAGS +DAportable"
2913 # Check to enable 64-bit flags for compiler/linker
2914 if test "$do64bit" = "yes" ; then
2915 if test "$GCC" = "yes" ; then
2916 hpux_arch=`${CC} -dumpmachine`
2919 # 64-bit gcc in use. Fix flags for GNU ld.
2921 SHLIB_LD="${CC} -shared"
2922 SHLIB_LD_LIBS='${LIBS}'
2923 CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
2924 LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
2927 echo "configure: warning: 64bit mode not supported with GCC on $system" 1>&2
2932 CFLAGS="$CFLAGS +DD64"
2933 LDFLAGS="$LDFLAGS +DD64"
2937 HP-UX-*.08.*|HP-UX-*.09.*|HP-UX-*.10.*)
2939 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
2940 echo "configure:2941: checking for shl_load in -ldld" >&5
2941 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
2942 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2943 echo $ac_n "(cached) $ac_c" 1>&6
2945 ac_save_LIBS="$LIBS"
2947 cat > conftest.$ac_ext <<EOF
2948 #line 2949 "configure"
2949 #include "confdefs.h"
2950 /* Override any gcc2 internal prototype to avoid an error. */
2951 /* We use char because int might match the return type of a gcc2
2952 builtin and then its argument prototype would still apply. */
2959 if { (eval echo configure:2960: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2961 eval "ac_cv_lib_$ac_lib_var=yes"
2963 echo "configure: failed program was:" >&5
2964 cat conftest.$ac_ext >&5
2966 eval "ac_cv_lib_$ac_lib_var=no"
2969 LIBS="$ac_save_LIBS"
2972 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2973 echo "$ac_t""yes" 1>&6
2976 echo "$ac_t""no" 1>&6
2980 if test "$tcl_ok" = yes; then
2984 DL_OBJS="tclLoadShl.o"
2986 LDFLAGS="$LDFLAGS -Wl,-E"
2987 CC_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.'
2988 LD_SEARCH_FLAGS='+s +b ${LIB_RUNTIME_DIR}:.'
2989 LD_LIBRARY_PATH_VAR="SHLIB_PATH"
2995 SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0"
2996 SHLIB_LD_LIBS='${LIBS}'
2997 DL_OBJS="tclLoadAout.o"
2999 LDFLAGS="$LDFLAGS -Wl,-D,08000000"
3000 CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
3001 LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
3002 SHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}.a'
3006 SHLIB_LD="ld -shared -rdata_shared"
3007 SHLIB_LD_LIBS='${LIBS}'
3009 DL_OBJS="tclLoadDl.o"
3011 CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
3012 LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
3016 SHLIB_LD="ld -n32 -shared -rdata_shared"
3017 SHLIB_LD_LIBS='${LIBS}'
3019 DL_OBJS="tclLoadDl.o"
3021 CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
3022 LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
3023 if test "$GCC" = "yes" ; then
3024 CFLAGS="$CFLAGS -mabi=n32"
3025 LDFLAGS="$LDFLAGS -mabi=n32"
3029 # Use to build 6.2 compatible binaries on 6.3.
3030 CFLAGS="$CFLAGS -n32 -D_OLD_TERMIOS"
3033 CFLAGS="$CFLAGS -n32"
3036 LDFLAGS="$LDFLAGS -n32"
3041 SHLIB_LD="ld -n32 -shared -rdata_shared"
3042 SHLIB_LD_LIBS='${LIBS}'
3044 DL_OBJS="tclLoadDl.o"
3046 CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
3047 LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
3049 # Check to enable 64-bit flags for compiler/linker
3051 if test "$do64bit" = "yes" ; then
3052 if test "$GCC" = "yes" ; then
3053 echo "configure: warning: 64bit mode not supported by gcc" 1>&2
3056 SHLIB_LD="ld -64 -shared -rdata_shared"
3057 CFLAGS="$CFLAGS -64"
3058 LDFLAGS="$LDFLAGS -64"
3063 SHLIB_CFLAGS="-fPIC"
3064 SHLIB_LD_LIBS='${LIBS}'
3068 # egcs-2.91.66 on Redhat Linux 6.0 generates lots of warnings
3069 # when you inline the string and math operations. Turn this off to
3070 # get rid of the warnings.
3071 #CFLAGS_OPTIMIZE="${CFLAGS_OPTIMIZE} -D__NO_STRING_INLINES -D__NO_MATH_INLINES"
3073 if test "$have_dl" = yes; then
3074 SHLIB_LD='${CC} -shared ${CFLAGS} ${LDFLAGS}'
3075 DL_OBJS="tclLoadDl.o"
3077 LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
3078 CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
3079 LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
3081 ac_safe=`echo "dld.h" | sed 'y%./+-%__p_%'`
3082 echo $ac_n "checking for dld.h""... $ac_c" 1>&6
3083 echo "configure:3084: checking for dld.h" >&5
3084 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3085 echo $ac_n "(cached) $ac_c" 1>&6
3087 cat > conftest.$ac_ext <<EOF
3088 #line 3089 "configure"
3089 #include "confdefs.h"
3092 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3093 { (eval echo configure:3094: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3094 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3095 if test -z "$ac_err"; then
3097 eval "ac_cv_header_$ac_safe=yes"
3100 echo "configure: failed program was:" >&5
3101 cat conftest.$ac_ext >&5
3103 eval "ac_cv_header_$ac_safe=no"
3107 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3108 echo "$ac_t""yes" 1>&6
3110 SHLIB_LD="ld -shared"
3111 DL_OBJS="tclLoadDld.o"
3116 echo "$ac_t""no" 1>&6
3120 if test "`uname -m`" = "alpha" ; then
3121 CFLAGS="$CFLAGS -mieee"
3123 if test $do64bit = yes; then
3124 echo $ac_n "checking if compiler accepts -m64 flag""... $ac_c" 1>&6
3125 echo "configure:3126: checking if compiler accepts -m64 flag" >&5
3126 if eval "test \"`echo '$''{'tcl_cv_cc_m64'+set}'`\" = set"; then
3127 echo $ac_n "(cached) $ac_c" 1>&6
3131 CFLAGS="$CFLAGS -m64"
3132 cat > conftest.$ac_ext <<EOF
3133 #line 3134 "configure"
3134 #include "confdefs.h"
3140 if { (eval echo configure:3141: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3144 echo "configure: failed program was:" >&5
3145 cat conftest.$ac_ext >&5
3153 echo "$ac_t""$tcl_cv_cc_m64" 1>&6
3154 if test $tcl_cv_cc_m64 = yes; then
3155 CFLAGS="$CFLAGS -m64"
3160 # The combo of gcc + glibc has a bug related
3161 # to inlining of functions like strtod(). The
3162 # -fno-builtin flag should address this problem
3163 # but it does not work. The -fno-inline flag
3164 # is kind of overkill but it works.
3165 # Disable inlining only when one of the
3166 # files in compat/*.c is being linked in.
3167 if test x"${LIBOBJS}" != x ; then
3168 CFLAGS="$CFLAGS -fno-inline"
3171 # XIM peeking works under XFree86.
3172 cat >> confdefs.h <<\EOF
3173 #define PEEK_XCLOSEIM 1
3179 SHLIB_CFLAGS="-fPIC"
3180 SHLIB_LD_LIBS='${LIBS}'
3183 if test "$have_dl" = yes; then
3184 SHLIB_LD="${CC} -shared"
3187 LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
3191 ac_safe=`echo "dld.h" | sed 'y%./+-%__p_%'`
3192 echo $ac_n "checking for dld.h""... $ac_c" 1>&6
3193 echo "configure:3194: checking for dld.h" >&5
3194 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3195 echo $ac_n "(cached) $ac_c" 1>&6
3197 cat > conftest.$ac_ext <<EOF
3198 #line 3199 "configure"
3199 #include "confdefs.h"
3202 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3203 { (eval echo configure:3204: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3204 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3205 if test -z "$ac_err"; then
3207 eval "ac_cv_header_$ac_safe=yes"
3210 echo "configure: failed program was:" >&5
3211 cat conftest.$ac_ext >&5
3213 eval "ac_cv_header_$ac_safe=no"
3217 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3218 echo "$ac_t""yes" 1>&6
3220 SHLIB_LD="ld -shared"
3226 echo "$ac_t""no" 1>&6
3230 if test "`uname -m`" = "alpha" ; then
3231 CFLAGS="$CFLAGS -mieee"
3235 SHLIB_CFLAGS="-fPIC"
3236 SHLIB_LD_LIBS='${LIBS}'
3239 SHLIB_LD="${CC} -shared "
3240 DL_OBJS="tclLoadDl.o"
3241 DL_LIBS="-mshared -ldl"
3242 LD_FLAGS="-Wl,--export-dynamic"
3243 CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
3244 LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
3247 SHLIB_CFLAGS="-K PIC"
3251 DL_OBJS="tclLoadDl.o"
3257 SHLIB_CFLAGS="-K PIC"
3261 DL_OBJS="tclLoadDl.o"
3263 LDFLAGS="$LDFLAGS -Wl,-Bexport"
3267 NetBSD-*|FreeBSD-[1-2].*)
3268 # Not available on all versions: check for include file.
3269 ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
3270 echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
3271 echo "configure:3272: checking for dlfcn.h" >&5
3272 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3273 echo $ac_n "(cached) $ac_c" 1>&6
3275 cat > conftest.$ac_ext <<EOF
3276 #line 3277 "configure"
3277 #include "confdefs.h"
3280 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3281 { (eval echo configure:3282: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3282 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3283 if test -z "$ac_err"; then
3285 eval "ac_cv_header_$ac_safe=yes"
3288 echo "configure: failed program was:" >&5
3289 cat conftest.$ac_ext >&5
3291 eval "ac_cv_header_$ac_safe=no"
3295 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3296 echo "$ac_t""yes" 1>&6
3298 # NetBSD/SPARC needs -fPIC, -fpic will not do.
3299 SHLIB_CFLAGS="-fPIC"
3300 SHLIB_LD="ld -Bshareable -x"
3301 SHLIB_LD_LIBS='${LIBS}'
3303 DL_OBJS="tclLoadDl.o"
3305 CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
3306 LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
3307 echo $ac_n "checking for ELF""... $ac_c" 1>&6
3308 echo "configure:3309: checking for ELF" >&5
3309 if eval "test \"`echo '$''{'tcl_cv_ld_elf'+set}'`\" = set"; then
3310 echo $ac_n "(cached) $ac_c" 1>&6
3313 cat > conftest.$ac_ext <<EOF
3314 #line 3315 "configure"
3315 #include "confdefs.h"
3322 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3323 egrep "yes" >/dev/null 2>&1; then
3334 echo "$ac_t""$tcl_cv_ld_elf" 1>&6
3335 if test $tcl_cv_ld_elf = yes; then
3336 SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so'
3338 SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1.0'
3342 echo "$ac_t""no" 1>&6
3345 SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r"
3346 SHLIB_LD_LIBS='${LIBS}'
3348 DL_OBJS="tclLoadAout.o"
3350 CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
3351 LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
3352 SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
3357 # FreeBSD doesn't handle version numbers with dots.
3359 UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
3360 TCL_LIB_VERSIONS_OK=nodots
3366 SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r"
3367 SHLIB_LD_LIBS='${LIBS}'
3369 DL_OBJS="tclLoadAout.o"
3372 CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
3373 LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
3374 SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
3377 # OpenBSD/SPARC[64] needs -fPIC, -fpic will not do.
3380 SHLIB_CFLAGS="-fPIC";;
3382 SHLIB_CFLAGS="-fpic";;
3384 SHLIB_LD="${CC} -shared ${SHLIB_CFLAGS}"
3385 SHLIB_LD_LIBS='${LIBS}'
3387 DL_OBJS="tclLoadDl.o"
3389 CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
3390 LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
3391 SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1.0'
3392 echo $ac_n "checking for ELF""... $ac_c" 1>&6
3393 echo "configure:3394: checking for ELF" >&5
3394 if eval "test \"`echo '$''{'tcl_cv_ld_elf'+set}'`\" = set"; then
3395 echo $ac_n "(cached) $ac_c" 1>&6
3398 cat > conftest.$ac_ext <<EOF
3399 #line 3400 "configure"
3400 #include "confdefs.h"
3407 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3408 egrep "yes" >/dev/null 2>&1; then
3419 echo "$ac_t""$tcl_cv_ld_elf" 1>&6
3420 if test $tcl_cv_ld_elf = yes; then
3421 LDFLAGS=-Wl,-export-dynamic
3428 # OpenBSD doesn't do version numbers with dots.
3429 UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
3430 TCL_LIB_VERSIONS_OK=nodots
3433 # FreeBSD 3.* and greater have ELF.
3434 SHLIB_CFLAGS="-fPIC"
3435 SHLIB_LD="ld -Bshareable -x"
3436 SHLIB_LD_LIBS='${LIBS}'
3438 DL_OBJS="tclLoadDl.o"
3440 LDFLAGS="$LDFLAGS -export-dynamic"
3441 CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
3442 LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
3443 if test "${TCL_THREADS}" = "1" ; then
3444 # The -pthread needs to go in the CFLAGS, not LIBS
3445 LIBS=`echo $LIBS | sed s/-pthread//`
3446 CFLAGS="$CFLAGS -pthread"
3447 LDFLAGS="$LDFLAGS -pthread"
3451 # FreeBSD-3 doesn't handle version numbers with dots.
3452 UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
3453 SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so'
3454 TCL_LIB_VERSIONS_OK=nodots
3459 CFLAGS_OPTIMIZE="-Os"
3460 SHLIB_CFLAGS="-fno-common"
3461 # To avoid discrepancies between what headers configure sees during
3462 # preprocessing tests and compiling tests, move any -isysroot and
3463 # -mmacosx-version-min flags from CFLAGS to CPPFLAGS:
3464 CPPFLAGS="${CPPFLAGS} `echo " ${CFLAGS}" | \
3465 awk 'BEGIN {FS=" +-";ORS=" "}; {for (i=2;i<=NF;i++) \
3466 if ($i~/^(isysroot|mmacosx-version-min)/) print "-"$i}'`"
3467 CFLAGS="`echo " ${CFLAGS}" | \
3468 awk 'BEGIN {FS=" +-";ORS=" "}; {for (i=2;i<=NF;i++) \
3469 if (!($i~/^(isysroot|mmacosx-version-min)/)) print "-"$i}'`"
3470 if test $do64bit = yes; then
3473 echo $ac_n "checking if compiler accepts -arch ppc64 flag""... $ac_c" 1>&6
3474 echo "configure:3475: checking if compiler accepts -arch ppc64 flag" >&5
3475 if eval "test \"`echo '$''{'tcl_cv_cc_arch_ppc64'+set}'`\" = set"; then
3476 echo $ac_n "(cached) $ac_c" 1>&6
3480 CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5"
3481 cat > conftest.$ac_ext <<EOF
3482 #line 3483 "configure"
3483 #include "confdefs.h"
3489 if { (eval echo configure:3490: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3491 tcl_cv_cc_arch_ppc64=yes
3493 echo "configure: failed program was:" >&5
3494 cat conftest.$ac_ext >&5
3496 tcl_cv_cc_arch_ppc64=no
3502 echo "$ac_t""$tcl_cv_cc_arch_ppc64" 1>&6
3503 if test $tcl_cv_cc_arch_ppc64 = yes; then
3504 CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5"
3508 echo $ac_n "checking if compiler accepts -arch x86_64 flag""... $ac_c" 1>&6
3509 echo "configure:3510: checking if compiler accepts -arch x86_64 flag" >&5
3510 if eval "test \"`echo '$''{'tcl_cv_cc_arch_x86_64'+set}'`\" = set"; then
3511 echo $ac_n "(cached) $ac_c" 1>&6
3515 CFLAGS="$CFLAGS -arch x86_64"
3516 cat > conftest.$ac_ext <<EOF
3517 #line 3518 "configure"
3518 #include "confdefs.h"
3524 if { (eval echo configure:3525: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3526 tcl_cv_cc_arch_x86_64=yes
3528 echo "configure: failed program was:" >&5
3529 cat conftest.$ac_ext >&5
3531 tcl_cv_cc_arch_x86_64=no
3537 echo "$ac_t""$tcl_cv_cc_arch_x86_64" 1>&6
3538 if test $tcl_cv_cc_arch_x86_64 = yes; then
3539 CFLAGS="$CFLAGS -arch x86_64"
3543 echo "configure: warning: Don't know how enable 64-bit on architecture `arch`" 1>&2;;
3546 # Check for combined 32-bit and 64-bit fat build
3547 echo "$CFLAGS " | grep -E -q -- '-arch (ppc64|x86_64) ' && \
3548 echo "$CFLAGS " | grep -E -q -- '-arch (ppc|i386) ' && \
3551 SHLIB_LD='${CC} -dynamiclib ${CFLAGS} ${LDFLAGS}'
3552 echo $ac_n "checking if ld accepts -single_module flag""... $ac_c" 1>&6
3553 echo "configure:3554: checking if ld accepts -single_module flag" >&5
3554 if eval "test \"`echo '$''{'tcl_cv_ld_single_module'+set}'`\" = set"; then
3555 echo $ac_n "(cached) $ac_c" 1>&6
3558 hold_ldflags=$LDFLAGS
3559 LDFLAGS="$LDFLAGS -dynamiclib -Wl,-single_module"
3560 cat > conftest.$ac_ext <<EOF
3561 #line 3562 "configure"
3562 #include "confdefs.h"
3568 if { (eval echo configure:3569: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3570 tcl_cv_ld_single_module=yes
3572 echo "configure: failed program was:" >&5
3573 cat conftest.$ac_ext >&5
3575 tcl_cv_ld_single_module=no
3578 LDFLAGS=$hold_ldflags
3581 echo "$ac_t""$tcl_cv_ld_single_module" 1>&6
3582 if test $tcl_cv_ld_single_module = yes; then
3583 SHLIB_LD="${SHLIB_LD} -Wl,-single_module"
3585 SHLIB_LD_LIBS='${LIBS}'
3586 SHLIB_SUFFIX=".dylib"
3587 DL_OBJS="tclLoadDyld.o"
3589 # Don't use -prebind when building for Mac OS X 10.4 or later only:
3590 test "`echo "${MACOSX_DEPLOYMENT_TARGET}" | awk -F '10\\.' '{print int($2)}'`" -lt 4 -a \
3591 "`echo "${CPPFLAGS}" | awk -F '-mmacosx-version-min=10\\.' '{print int($2)}'`" -lt 4 && \
3592 LDFLAGS="$LDFLAGS -prebind"
3593 LDFLAGS="$LDFLAGS -headerpad_max_install_names"
3594 echo $ac_n "checking if ld accepts -search_paths_first flag""... $ac_c" 1>&6
3595 echo "configure:3596: checking if ld accepts -search_paths_first flag" >&5
3596 if eval "test \"`echo '$''{'tcl_cv_ld_search_paths_first'+set}'`\" = set"; then
3597 echo $ac_n "(cached) $ac_c" 1>&6
3600 hold_ldflags=$LDFLAGS
3601 LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
3602 cat > conftest.$ac_ext <<EOF
3603 #line 3604 "configure"
3604 #include "confdefs.h"
3610 if { (eval echo configure:3611: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3612 tcl_cv_ld_search_paths_first=yes
3614 echo "configure: failed program was:" >&5
3615 cat conftest.$ac_ext >&5
3617 tcl_cv_ld_search_paths_first=no
3620 LDFLAGS=$hold_ldflags
3623 echo "$ac_t""$tcl_cv_ld_search_paths_first" 1>&6
3624 if test $tcl_cv_ld_search_paths_first = yes; then
3625 LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
3629 LD_LIBRARY_PATH_VAR="DYLD_LIBRARY_PATH"
3630 PLAT_OBJS=\$\(MAC\_OSX_OBJS\)
3631 PLAT_SRCS=\$\(MAC\_OSX_SRCS\)
3632 echo $ac_n "checking whether to use CoreFoundation""... $ac_c" 1>&6
3633 echo "configure:3634: checking whether to use CoreFoundation" >&5
3634 # Check whether --enable-corefoundation or --disable-corefoundation was given.
3635 if test "${enable_corefoundation+set}" = set; then
3636 enableval="$enable_corefoundation"
3637 tcl_corefoundation=$enableval
3639 tcl_corefoundation=yes
3642 echo "$ac_t""$tcl_corefoundation" 1>&6
3643 if test $tcl_corefoundation = yes; then
3644 echo $ac_n "checking for CoreFoundation.framework""... $ac_c" 1>&6
3645 echo "configure:3646: checking for CoreFoundation.framework" >&5
3646 if eval "test \"`echo '$''{'tcl_cv_lib_corefoundation'+set}'`\" = set"; then
3647 echo $ac_n "(cached) $ac_c" 1>&6
3650 hold_libs=$LIBS; hold_cflags=$CFLAGS
3651 if test "$fat_32_64" = yes; then
3652 # On Tiger there is no 64-bit CF, so remove 64-bit archs
3653 # from CFLAGS while testing for presence of CF.
3654 # 64-bit CF is disabled in tclUnixPort.h if necessary.
3655 CFLAGS="`echo "$CFLAGS " | sed -e 's/-arch ppc64 / /g' -e 's/-arch x86_64 / /g'`"
3657 LIBS="$LIBS -framework CoreFoundation"
3658 cat > conftest.$ac_ext <<EOF
3659 #line 3660 "configure"
3660 #include "confdefs.h"
3661 #include <CoreFoundation/CoreFoundation.h>
3663 CFBundleRef b = CFBundleGetMainBundle();
3666 if { (eval echo configure:3667: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3668 tcl_cv_lib_corefoundation=yes
3670 echo "configure: failed program was:" >&5
3671 cat conftest.$ac_ext >&5
3673 tcl_cv_lib_corefoundation=no
3676 LIBS=$hold_libs; CFLAGS=$hold_cflags
3679 echo "$ac_t""$tcl_cv_lib_corefoundation" 1>&6
3680 if test $tcl_cv_lib_corefoundation = yes; then
3681 LIBS="$LIBS -framework CoreFoundation"
3682 cat >> confdefs.h <<\EOF
3683 #define HAVE_COREFOUNDATION 1
3687 tcl_corefoundation=no
3689 if test "$fat_32_64" = yes -a $tcl_corefoundation = yes; then
3690 echo $ac_n "checking for 64-bit CoreFoundation""... $ac_c" 1>&6
3691 echo "configure:3692: checking for 64-bit CoreFoundation" >&5
3692 if eval "test \"`echo '$''{'tcl_cv_lib_corefoundation_64'+set}'`\" = set"; then
3693 echo $ac_n "(cached) $ac_c" 1>&6
3697 CFLAGS="`echo "$CFLAGS " | sed -e 's/-arch ppc / /g' -e 's/-arch i386 / /g'`"
3698 cat > conftest.$ac_ext <<EOF
3699 #line 3700 "configure"
3700 #include "confdefs.h"
3701 #include <CoreFoundation/CoreFoundation.h>
3703 CFBundleRef b = CFBundleGetMainBundle();
3706 if { (eval echo configure:3707: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3708 tcl_cv_lib_corefoundation_64=yes
3710 echo "configure: failed program was:" >&5
3711 cat conftest.$ac_ext >&5
3713 tcl_cv_lib_corefoundation_64=no
3719 echo "$ac_t""$tcl_cv_lib_corefoundation_64" 1>&6
3720 if test $tcl_cv_lib_corefoundation_64 = no; then
3721 cat >> confdefs.h <<\EOF
3722 #define NO_COREFOUNDATION_64 1
3728 cat >> confdefs.h <<\EOF
3729 #define MAC_OSX_TCL 1
3735 SHLIB_LD="cc -nostdlib -r"
3738 DL_OBJS="tclLoadNext.o"
3744 CFLAGS_OPTIMIZE="" # Optimizer is buggy
3745 cat >> confdefs.h <<\EOF
3746 #define _OE_SOCKETS 1
3748 # needed in sys/socket.h
3750 OSF1-1.0|OSF1-1.1|OSF1-1.2)
3751 # OSF/1 1.[012] from OSF, and derivatives, including Paragon OSF/1
3753 # Hack: make package name same as library name
3754 SHLIB_LD='ld -R -export :'
3757 DL_OBJS="tclLoadOSF.o"
3763 # OSF/1 1.3 from OSF using ELF, and derivatives, including AD2
3764 SHLIB_CFLAGS="-fPIC"
3765 if test "$SHARED_BUILD" = "1" ; then
3766 SHLIB_LD="ld -shared"
3768 SHLIB_LD="ld -non_shared"
3772 DL_OBJS="tclLoadDl.o"
3780 if test "$SHARED_BUILD" = "1" ; then
3781 SHLIB_LD='ld -shared -expect_unresolved "*"'
3783 SHLIB_LD='ld -non_shared -expect_unresolved "*"'
3787 DL_OBJS="tclLoadDl.o"
3789 CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
3790 LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
3791 if test "$GCC" = "yes" ; then
3792 CFLAGS="$CFLAGS -mieee"
3794 CFLAGS="$CFLAGS -DHAVE_TZSET -std1 -ieee"
3796 # see pthread_intro(3) for pthread support on osf1, k.furukawa
3797 if test "${TCL_THREADS}" = "1" ; then
3798 CFLAGS="$CFLAGS -DHAVE_PTHREAD_ATTR_SETSTACKSIZE"
3799 CFLAGS="$CFLAGS -DTCL_THREAD_STACK_MIN=PTHREAD_STACK_MIN*64"
3800 LIBS=`echo $LIBS | sed s/-lpthreads//`
3801 if test "$GCC" = "yes" ; then
3802 LIBS="$LIBS -lpthread -lmach -lexc"
3804 CFLAGS="$CFLAGS -pthread"
3805 LDFLAGS="$LDFLAGS -pthread"
3812 # This may work for all QNX, but it was only reported for v6.
3813 SHLIB_CFLAGS="-fPIC"
3814 SHLIB_LD="ld -Bshareable -x"
3817 DL_OBJS="tclLoadDl.o"
3818 # dlopen is in -lc on QNX
3825 SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0"
3826 SHLIB_LD_LIBS='${LIBS}'
3828 DL_OBJS="tclLoadAout.o"
3830 LDFLAGS="$LDFLAGS -Wl,-D,08000000"
3831 CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
3832 LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
3835 # Note, dlopen is available only on SCO 3.2.5 and greater. However,
3836 # this test works, since "uname -s" was non-standard in 3.2.4 and
3838 if test "$GCC" = "yes" ; then
3839 SHLIB_CFLAGS="-fPIC -melf"
3840 LDFLAGS="$LDFLAGS -melf -Wl,-Bexport"
3842 SHLIB_CFLAGS="-Kpic -belf"
3843 LDFLAGS="$LDFLAGS -belf -Wl,-Bexport"
3848 DL_OBJS="tclLoadDl.o"
3854 SHLIB_CFLAGS="-K PIC"
3858 DL_OBJS="tclLoadDl.o"
3868 DL_OBJS="tclLoadDl.o"
3870 CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
3871 LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
3873 # SunOS can't handle version numbers with dots in them in library
3874 # specs, like -ltcl7.5, so use -ltcl75 instead. Also, it
3875 # requires an extra version number at the end of .so file names.
3876 # So, the library has to have a name like libtcl75.so.1.0
3878 SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1.0'
3879 UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
3880 TCL_LIB_VERSIONS_OK=nodots
3883 # Careful to not let 5.10+ fall into this case
3885 # Note: If _REENTRANT isn't defined, then Solaris
3886 # won't define thread-safe library routines.
3888 cat >> confdefs.h <<\EOF
3889 #define _REENTRANT 1
3892 cat >> confdefs.h <<\EOF
3893 #define _POSIX_PTHREAD_SEMANTICS 1
3897 SHLIB_CFLAGS="-KPIC"
3899 # Note: need the LIBS below, otherwise Tk won't find Tcl's
3900 # symbols when dynamically loaded into tclsh.
3902 SHLIB_LD_LIBS='${LIBS}'
3904 DL_OBJS="tclLoadDl.o"
3906 if test "$GCC" = "yes" ; then
3907 SHLIB_LD="$CC -shared"
3908 CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
3909 LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
3911 SHLIB_LD="/usr/ccs/bin/ld -G -z text"
3912 CC_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
3913 LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
3917 # Note: If _REENTRANT isn't defined, then Solaris
3918 # won't define thread-safe library routines.
3920 cat >> confdefs.h <<\EOF
3921 #define _REENTRANT 1
3924 cat >> confdefs.h <<\EOF
3925 #define _POSIX_PTHREAD_SEMANTICS 1
3929 SHLIB_CFLAGS="-KPIC"
3931 # Check to enable 64-bit flags for compiler/linker
3932 if test "$do64bit" = "yes" ; then
3934 if test "$arch" = "sparcv9 sparc" ; then
3935 if test "$GCC" = "yes" ; then
3936 if test "`gcc -dumpversion | awk -F. '{print $1}'`" -lt "3" ; then
3937 echo "configure: warning: 64bit mode not supported with GCC < 3.2 on $system" 1>&2
3940 CFLAGS="$CFLAGS -m64 -mcpu=v9"
3941 LDFLAGS="$LDFLAGS -m64 -mcpu=v9"
3942 SHLIB_CFLAGS="-fPIC"
3946 if test "$do64bitVIS" = "yes" ; then
3947 CFLAGS="$CFLAGS -xarch=v9a"
3948 LDFLAGS="$LDFLAGS -xarch=v9a"
3950 CFLAGS="$CFLAGS -xarch=v9"
3951 LDFLAGS="$LDFLAGS -xarch=v9"
3953 # Solaris 64 uses this as well
3954 #LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH_64"
3956 elif test "$arch" = "amd64 i386" ; then
3957 if test "$GCC" = "yes" ; then
3958 echo "configure: warning: 64bit mode not supported with GCC on $system" 1>&2
3961 CFLAGS="$CFLAGS -xarch=amd64"
3962 LDFLAGS="$LDFLAGS -xarch=amd64"
3965 echo "configure: warning: 64bit mode not supported for $arch" 1>&2
3969 # Note: need the LIBS below, otherwise Tk won't find Tcl's
3970 # symbols when dynamically loaded into tclsh.
3972 SHLIB_LD_LIBS='${LIBS}'
3974 DL_OBJS="tclLoadDl.o"
3976 if test "$GCC" = "yes" ; then
3977 SHLIB_LD="$CC -shared"
3978 CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
3979 LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
3980 if test "$do64bit_ok" = "yes" ; then
3981 # We need to specify -static-libgcc or we need to
3982 # add the path to the sparv9 libgcc.
3983 SHLIB_LD="$SHLIB_LD -m64 -mcpu=v9 -static-libgcc"
3984 # for finding sparcv9 libgcc, get the regular libgcc
3985 # path, remove so name and append 'sparcv9'
3986 #v9gcclibdir="`gcc -print-file-name=libgcc_s.so` | ..."
3987 #CC_SEARCH_FLAGS="${CC_SEARCH_FLAGS},-R,$v9gcclibdir"
3990 SHLIB_LD="/usr/ccs/bin/ld -G -z text"
3991 CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
3992 LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
3998 SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0"
3999 SHLIB_LD_LIBS='${LIBS}'
4000 DL_OBJS="tclLoadAout.o"
4002 LDFLAGS="$LDFLAGS -Wl,-D,08000000"
4003 CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
4004 LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
4005 if test "$GCC" != "yes" ; then
4006 CFLAGS="$CFLAGS -DHAVE_TZSET -std1"
4009 UNIX_SV* | UnixWare-5*)
4010 SHLIB_CFLAGS="-KPIC"
4014 DL_OBJS="tclLoadDl.o"
4016 # Some UNIX_SV* systems (unixware 1.1.2 for example) have linkers
4017 # that don't grok the -Bexport option. Test that it does.
4018 echo $ac_n "checking for ld accepts -Bexport flag""... $ac_c" 1>&6
4019 echo "configure:4020: checking for ld accepts -Bexport flag" >&5
4020 if eval "test \"`echo '$''{'tcl_cv_ld_Bexport'+set}'`\" = set"; then
4021 echo $ac_n "(cached) $ac_c" 1>&6
4024 hold_ldflags=$LDFLAGS
4025 LDFLAGS="$LDFLAGS -Wl,-Bexport"
4026 cat > conftest.$ac_ext <<EOF
4027 #line 4028 "configure"
4028 #include "confdefs.h"
4034 if { (eval echo configure:4035: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4036 tcl_cv_ld_Bexport=yes
4038 echo "configure: failed program was:" >&5
4039 cat conftest.$ac_ext >&5
4041 tcl_cv_ld_Bexport=no
4044 LDFLAGS=$hold_ldflags
4047 echo "$ac_t""$tcl_cv_ld_Bexport" 1>&6
4048 if test $tcl_cv_ld_Bexport = yes; then
4049 LDFLAGS="$LDFLAGS -Wl,-Bexport"
4056 if test "$do64bit" = "yes" -a "$do64bit_ok" = "no" ; then
4057 echo "configure: warning: 64bit support being disabled -- don't know magic for this platform" 1>&2
4063 # Step 4: If pseudo-static linking is in use (see K. B. Kenny, "Dynamic
4064 # Loading for Tcl -- What Became of It?". Proc. 2nd Tcl/Tk Workshop,
4065 # New Orleans, LA, Computerized Processes Unlimited, 1994), then we need
4066 # to determine which of several header files defines the a.out file
4067 # format (a.out.h, sys/exec.h, or sys/exec_aout.h). At present, we
4068 # support only a file format that is more or less version-7-compatible.
4070 # - a.out files must begin with `struct exec'.
4071 # - the N_TXTOFF on the `struct exec' must compute the seek address
4072 # of the text segment
4073 # - The `struct exec' must contain a_magic, a_text, a_data, a_bss
4074 # and a_entry fields.
4075 # The following compilation should succeed if and only if either sys/exec.h
4076 # or a.out.h is usable for the purpose.
4078 # Note that the modified COFF format used on MIPS Ultrix 4.x is usable; the
4079 # `struct exec' includes a second header that contains information that
4080 # duplicates the v7 fields that are needed.
4082 if test "x$DL_OBJS" = "xtclLoadAout.o" ; then
4083 echo $ac_n "checking sys/exec.h""... $ac_c" 1>&6
4084 echo "configure:4085: checking sys/exec.h" >&5
4085 if eval "test \"`echo '$''{'tcl_cv_sysexec_h'+set}'`\" = set"; then
4086 echo $ac_n "(cached) $ac_c" 1>&6
4089 cat > conftest.$ac_ext <<EOF
4090 #line 4091 "configure"
4091 #include "confdefs.h"
4092 #include <sys/exec.h>
4098 #if defined(__mips) || defined(mips)
4099 seek = N_TXTOFF (foo.ex_f, foo.ex_o);
4101 seek = N_TXTOFF (foo);
4103 flag = (foo.a_magic == OMAGIC);
4104 return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry;
4108 if { (eval echo configure:4109: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4110 tcl_cv_sysexec_h=usable
4112 echo "configure: failed program was:" >&5
4113 cat conftest.$ac_ext >&5
4115 tcl_cv_sysexec_h=unusable
4120 echo "$ac_t""$tcl_cv_sysexec_h" 1>&6
4121 if test $tcl_cv_sysexec_h = usable; then
4122 cat >> confdefs.h <<\EOF
4123 #define USE_SYS_EXEC_H 1
4127 echo $ac_n "checking a.out.h""... $ac_c" 1>&6
4128 echo "configure:4129: checking a.out.h" >&5
4129 if eval "test \"`echo '$''{'tcl_cv_aout_h'+set}'`\" = set"; then
4130 echo $ac_n "(cached) $ac_c" 1>&6
4133 cat > conftest.$ac_ext <<EOF
4134 #line 4135 "configure"
4135 #include "confdefs.h"
4142 #if defined(__mips) || defined(mips)
4143 seek = N_TXTOFF (foo.ex_f, foo.ex_o);
4145 seek = N_TXTOFF (foo);
4147 flag = (foo.a_magic == OMAGIC);
4148 return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry;
4152 if { (eval echo configure:4153: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4154 tcl_cv_aout_h=usable
4156 echo "configure: failed program was:" >&5
4157 cat conftest.$ac_ext >&5
4159 tcl_cv_aout_h=unusable
4164 echo "$ac_t""$tcl_cv_aout_h" 1>&6
4165 if test $tcl_cv_aout_h = usable; then
4166 cat >> confdefs.h <<\EOF
4167 #define USE_A_OUT_H 1
4171 echo $ac_n "checking sys/exec_aout.h""... $ac_c" 1>&6
4172 echo "configure:4173: checking sys/exec_aout.h" >&5
4173 if eval "test \"`echo '$''{'tcl_cv_sysexecaout_h'+set}'`\" = set"; then
4174 echo $ac_n "(cached) $ac_c" 1>&6
4177 cat > conftest.$ac_ext <<EOF
4178 #line 4179 "configure"
4179 #include "confdefs.h"
4180 #include <sys/exec_aout.h>
4186 #if defined(__mips) || defined(mips)
4187 seek = N_TXTOFF (foo.ex_f, foo.ex_o);
4189 seek = N_TXTOFF (foo);
4191 flag = (foo.a_midmag == OMAGIC);
4192 return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry;
4196 if { (eval echo configure:4197: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4198 tcl_cv_sysexecaout_h=usable
4200 echo "configure: failed program was:" >&5
4201 cat conftest.$ac_ext >&5
4203 tcl_cv_sysexecaout_h=unusable
4208 echo "$ac_t""$tcl_cv_sysexecaout_h" 1>&6
4209 if test $tcl_cv_sysexecaout_h = usable; then
4210 cat >> confdefs.h <<\EOF
4211 #define USE_SYS_EXEC_AOUT_H 1
4221 # Step 5: disable dynamic loading if requested via a command-line switch.
4223 # Check whether --enable-load or --disable-load was given.
4224 if test "${enable_load+set}" = set; then
4225 enableval="$enable_load"
4231 if test "$tcl_ok" = "no"; then
4235 if test "x$DL_OBJS" != "x" ; then
4236 BUILD_DLTEST="\$(DLTEST_TARGETS)"
4238 echo "Can't figure out how to do dynamic loading or shared libraries"
4239 echo "on this system."
4243 DL_OBJS="tclLoadNone.o"
4245 LDFLAGS="$LDFLAGS_ORIG"
4251 # If we're running gcc, then change the C flags for compiling shared
4252 # libraries to the right flags for gcc, instead of those for the
4253 # standard manufacturer compiler.
4255 if test "$DL_OBJS" != "tclLoadNone.o" ; then
4256 if test "$GCC" = "yes" ; then
4264 NetBSD-*|FreeBSD-*|OpenBSD-*)
4275 SHLIB_CFLAGS="-fPIC"
4281 if test "$SHARED_LIB_SUFFIX" = "" ; then
4282 SHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}${SHLIB_SUFFIX}'
4284 if test "$UNSHARED_LIB_SUFFIX" = "" ; then
4285 UNSHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}.a'
4288 if test "${SHARED_BUILD}" = "1" && test "${SHLIB_SUFFIX}" != "" ; then
4289 LIB_SUFFIX=${SHARED_LIB_SUFFIX}
4290 MAKE_LIB='${SHLIB_LD} -o $@ ${OBJS} ${SHLIB_LD_LIBS} ${TCL_SHLIB_LD_EXTRAS} ${TK_SHLIB_LD_EXTRAS} ${LD_SEARCH_FLAGS}'
4291 INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) $(LIB_INSTALL_DIR)/$(LIB_FILE)'
4293 LIB_SUFFIX=${UNSHARED_LIB_SUFFIX}
4295 if test "$RANLIB" = "" ; then
4296 MAKE_LIB='$(STLIB_LD) $@ ${OBJS}'
4297 INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) $(LIB_INSTALL_DIR)/$(LIB_FILE)'
4299 MAKE_LIB='${STLIB_LD} $@ ${OBJS} ; ${RANLIB} $@'
4300 INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) $(LIB_INSTALL_DIR)/$(LIB_FILE) ; (cd $(LIB_INSTALL_DIR) ; $(RANLIB) $(LIB_FILE))'
4306 # Stub lib does not depend on shared/static configuration
4307 if test "$RANLIB" = "" ; then
4308 MAKE_STUB_LIB='${STLIB_LD} $@ ${STUB_LIB_OBJS}'
4309 INSTALL_STUB_LIB='$(INSTALL_LIBRARY) $(STUB_LIB_FILE) $(LIB_INSTALL_DIR)/$(STUB_LIB_FILE)'
4311 MAKE_STUB_LIB='${STLIB_LD} $@ ${STUB_LIB_OBJS} ; ${RANLIB} $@'
4312 INSTALL_STUB_LIB='$(INSTALL_LIBRARY) $(STUB_LIB_FILE) $(LIB_INSTALL_DIR)/$(STUB_LIB_FILE) ; (cd $(LIB_INSTALL_DIR) ; $(RANLIB) $(STUB_LIB_FILE))'
4348 echo $ac_n "checking for build with symbols""... $ac_c" 1>&6
4349 echo "configure:4350: checking for build with symbols" >&5
4350 # Check whether --enable-symbols or --disable-symbols was given.
4351 if test "${enable_symbols+set}" = set; then
4352 enableval="$enable_symbols"
4358 # FIXME: Currently, LDFLAGS_DEFAULT is not used, it should work like CFLAGS_DEFAULT.
4359 if test "$tcl_ok" = "no"; then
4360 CFLAGS_DEFAULT='$(CFLAGS_OPTIMIZE)'
4361 LDFLAGS_DEFAULT='$(LDFLAGS_OPTIMIZE)'
4363 echo "$ac_t""no" 1>&6
4365 CFLAGS_DEFAULT='$(CFLAGS_DEBUG)'
4366 LDFLAGS_DEFAULT='$(LDFLAGS_DEBUG)'
4368 if test "$tcl_ok" = "yes"; then
4369 echo "$ac_t""yes (standard debugging)" 1>&6
4375 if test "$tcl_ok" = "mem" -o "$tcl_ok" = "all"; then
4376 cat >> confdefs.h <<\EOF
4377 #define TCL_MEM_DEBUG 1
4382 if test "$tcl_ok" = "compile" -o "$tcl_ok" = "all"; then
4383 cat >> confdefs.h <<\EOF
4384 #define TCL_COMPILE_DEBUG 1
4387 cat >> confdefs.h <<\EOF
4388 #define TCL_COMPILE_STATS 1
4393 if test "$tcl_ok" != "yes" -a "$tcl_ok" != "no"; then
4394 if test "$tcl_ok" = "all"; then
4395 echo "$ac_t""enabled symbols mem compile debugging" 1>&6
4397 echo "$ac_t""enabled $tcl_ok debugging" 1>&6
4404 #--------------------------------------------------------------------
4405 # Detect what compiler flags to set for 64-bit support.
4406 #--------------------------------------------------------------------
4409 echo $ac_n "checking for required early compiler flags""... $ac_c" 1>&6
4410 echo "configure:4411: checking for required early compiler flags" >&5
4413 if eval "test \"`echo '$''{'tcl_cv_flag__isoc99_source'+set}'`\" = set"; then
4414 echo $ac_n "(cached) $ac_c" 1>&6
4416 cat > conftest.$ac_ext <<EOF
4417 #line 4418 "configure"
4418 #include "confdefs.h"
4421 char *p = (char *)strtoll; char *q = (char *)strtoull;
4424 if { (eval echo configure:4425: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4426 tcl_cv_flag__isoc99_source=no
4428 echo "configure: failed program was:" >&5
4429 cat conftest.$ac_ext >&5
4431 cat > conftest.$ac_ext <<EOF
4432 #line 4433 "configure"
4433 #include "confdefs.h"
4434 #define _ISOC99_SOURCE 1
4437 char *p = (char *)strtoll; char *q = (char *)strtoull;
4440 if { (eval echo configure:4441: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4442 tcl_cv_flag__isoc99_source=yes
4444 echo "configure: failed program was:" >&5
4445 cat conftest.$ac_ext >&5
4447 tcl_cv_flag__isoc99_source=no
4454 if test "x${tcl_cv_flag__isoc99_source}" = "xyes" ; then
4455 cat >> confdefs.h <<\EOF
4456 #define _ISOC99_SOURCE 1
4459 tcl_flags="$tcl_flags _ISOC99_SOURCE"
4463 if eval "test \"`echo '$''{'tcl_cv_flag__largefile64_source'+set}'`\" = set"; then
4464 echo $ac_n "(cached) $ac_c" 1>&6
4466 cat > conftest.$ac_ext <<EOF
4467 #line 4468 "configure"
4468 #include "confdefs.h"
4469 #include <sys/stat.h>
4471 struct stat64 buf; int i = stat64("/", &buf);
4474 if { (eval echo configure:4475: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4476 tcl_cv_flag__largefile64_source=no
4478 echo "configure: failed program was:" >&5
4479 cat conftest.$ac_ext >&5
4481 cat > conftest.$ac_ext <<EOF
4482 #line 4483 "configure"
4483 #include "confdefs.h"
4484 #define _LARGEFILE64_SOURCE 1
4485 #include <sys/stat.h>
4487 struct stat64 buf; int i = stat64("/", &buf);
4490 if { (eval echo configure:4491: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4492 tcl_cv_flag__largefile64_source=yes
4494 echo "configure: failed program was:" >&5
4495 cat conftest.$ac_ext >&5
4497 tcl_cv_flag__largefile64_source=no
4504 if test "x${tcl_cv_flag__largefile64_source}" = "xyes" ; then
4505 cat >> confdefs.h <<\EOF
4506 #define _LARGEFILE64_SOURCE 1
4509 tcl_flags="$tcl_flags _LARGEFILE64_SOURCE"
4513 if eval "test \"`echo '$''{'tcl_cv_flag__largefile_source64'+set}'`\" = set"; then
4514 echo $ac_n "(cached) $ac_c" 1>&6
4516 cat > conftest.$ac_ext <<EOF
4517 #line 4518 "configure"
4518 #include "confdefs.h"
4519 #include <sys/stat.h>
4521 char *p = (char *)open64;
4524 if { (eval echo configure:4525: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4526 tcl_cv_flag__largefile_source64=no
4528 echo "configure: failed program was:" >&5
4529 cat conftest.$ac_ext >&5
4531 cat > conftest.$ac_ext <<EOF
4532 #line 4533 "configure"
4533 #include "confdefs.h"
4534 #define _LARGEFILE_SOURCE64 1
4535 #include <sys/stat.h>
4537 char *p = (char *)open64;
4540 if { (eval echo configure:4541: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4542 tcl_cv_flag__largefile_source64=yes
4544 echo "configure: failed program was:" >&5
4545 cat conftest.$ac_ext >&5
4547 tcl_cv_flag__largefile_source64=no
4554 if test "x${tcl_cv_flag__largefile_source64}" = "xyes" ; then
4555 cat >> confdefs.h <<\EOF
4556 #define _LARGEFILE_SOURCE64 1
4559 tcl_flags="$tcl_flags _LARGEFILE_SOURCE64"
4562 if test "x${tcl_flags}" = "x" ; then
4563 echo "$ac_t""none" 1>&6
4565 echo "$ac_t""${tcl_flags}" 1>&6
4570 echo $ac_n "checking for 64-bit integer type""... $ac_c" 1>&6
4571 echo "configure:4572: checking for 64-bit integer type" >&5
4572 if eval "test \"`echo '$''{'tcl_cv_type_64bit'+set}'`\" = set"; then
4573 echo $ac_n "(cached) $ac_c" 1>&6
4576 tcl_cv_type_64bit=none
4577 # See if the compiler knows natively about __int64
4578 cat > conftest.$ac_ext <<EOF
4579 #line 4580 "configure"
4580 #include "confdefs.h"
4583 __int64 value = (__int64) 0;
4586 if { (eval echo configure:4587: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4588 tcl_type_64bit=__int64
4590 echo "configure: failed program was:" >&5
4591 cat conftest.$ac_ext >&5
4593 tcl_type_64bit="long long"
4596 # See if we should use long anyway Note that we substitute in the
4597 # type that is our current guess for a 64-bit type inside this check
4598 # program, so it should be modified only carefully...
4599 cat > conftest.$ac_ext <<EOF
4600 #line 4601 "configure"
4601 #include "confdefs.h"
4605 case 1: case (sizeof(${tcl_type_64bit})==sizeof(long)): ;
4609 if { (eval echo configure:4610: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4611 tcl_cv_type_64bit=${tcl_type_64bit}
4613 echo "configure: failed program was:" >&5
4614 cat conftest.$ac_ext >&5
4619 if test "${tcl_cv_type_64bit}" = none ; then
4620 cat >> confdefs.h <<\EOF
4621 #define TCL_WIDE_INT_IS_LONG 1
4624 echo "$ac_t""using long" 1>&6
4626 cat >> confdefs.h <<EOF
4627 #define TCL_WIDE_INT_TYPE ${tcl_cv_type_64bit}
4630 echo "$ac_t""${tcl_cv_type_64bit}" 1>&6
4632 # Now check for auxiliary declarations
4633 echo $ac_n "checking for struct dirent64""... $ac_c" 1>&6
4634 echo "configure:4635: checking for struct dirent64" >&5
4635 if eval "test \"`echo '$''{'tcl_cv_struct_dirent64'+set}'`\" = set"; then
4636 echo $ac_n "(cached) $ac_c" 1>&6
4639 cat > conftest.$ac_ext <<EOF
4640 #line 4641 "configure"
4641 #include "confdefs.h"
4642 #include <sys/types.h>
4643 #include <sys/dirent.h>
4648 if { (eval echo configure:4649: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4650 tcl_cv_struct_dirent64=yes
4652 echo "configure: failed program was:" >&5
4653 cat conftest.$ac_ext >&5
4655 tcl_cv_struct_dirent64=no
4660 echo "$ac_t""$tcl_cv_struct_dirent64" 1>&6
4661 if test "x${tcl_cv_struct_dirent64}" = "xyes" ; then
4662 cat >> confdefs.h <<\EOF
4663 #define HAVE_STRUCT_DIRENT64 1
4668 echo $ac_n "checking for struct stat64""... $ac_c" 1>&6
4669 echo "configure:4670: checking for struct stat64" >&5
4670 if eval "test \"`echo '$''{'tcl_cv_struct_stat64'+set}'`\" = set"; then
4671 echo $ac_n "(cached) $ac_c" 1>&6
4674 cat > conftest.$ac_ext <<EOF
4675 #line 4676 "configure"
4676 #include "confdefs.h"
4677 #include <sys/stat.h>
4683 if { (eval echo configure:4684: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4685 tcl_cv_struct_stat64=yes
4687 echo "configure: failed program was:" >&5
4688 cat conftest.$ac_ext >&5
4690 tcl_cv_struct_stat64=no
4695 echo "$ac_t""$tcl_cv_struct_stat64" 1>&6
4696 if test "x${tcl_cv_struct_stat64}" = "xyes" ; then
4697 cat >> confdefs.h <<\EOF
4698 #define HAVE_STRUCT_STAT64 1
4703 for ac_func in open64 lseek64
4705 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4706 echo "configure:4707: checking for $ac_func" >&5
4707 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4708 echo $ac_n "(cached) $ac_c" 1>&6
4710 cat > conftest.$ac_ext <<EOF
4711 #line 4712 "configure"
4712 #include "confdefs.h"
4713 /* System header to define __stub macros and hopefully few prototypes,
4714 which can conflict with char $ac_func(); below. */
4716 /* Override any gcc2 internal prototype to avoid an error. */
4717 /* We use char because int might match the return type of a gcc2
4718 builtin and then its argument prototype would still apply. */
4723 /* The GNU C library defines this for functions which it implements
4724 to always fail with ENOSYS. Some functions are actually named
4725 something starting with __ and the normal name is an alias. */
4726 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4734 if { (eval echo configure:4735: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4736 eval "ac_cv_func_$ac_func=yes"
4738 echo "configure: failed program was:" >&5
4739 cat conftest.$ac_ext >&5
4741 eval "ac_cv_func_$ac_func=no"
4746 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4747 echo "$ac_t""yes" 1>&6
4748 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4749 cat >> confdefs.h <<EOF
4750 #define $ac_tr_func 1
4754 echo "$ac_t""no" 1>&6
4758 echo $ac_n "checking for off64_t""... $ac_c" 1>&6
4759 echo "configure:4760: checking for off64_t" >&5
4760 if eval "test \"`echo '$''{'tcl_cv_type_off64_t'+set}'`\" = set"; then
4761 echo $ac_n "(cached) $ac_c" 1>&6
4764 cat > conftest.$ac_ext <<EOF
4765 #line 4766 "configure"
4766 #include "confdefs.h"
4767 #include <sys/types.h>
4773 if { (eval echo configure:4774: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4775 tcl_cv_type_off64_t=yes
4777 echo "configure: failed program was:" >&5
4778 cat conftest.$ac_ext >&5
4780 tcl_cv_type_off64_t=no
4785 if test "x${tcl_cv_type_off64_t}" = "xyes" && \
4786 test "x${ac_cv_func_lseek64}" = "xyes" && \
4787 test "x${ac_cv_func_open64}" = "xyes" ; then
4788 cat >> confdefs.h <<\EOF
4789 #define HAVE_TYPE_OFF64_T 1
4792 echo "$ac_t""yes" 1>&6
4794 echo "$ac_t""no" 1>&6
4799 #--------------------------------------------------------------------
4800 # Check endianness because we can optimize comparisons of
4801 # Tcl_UniChar strings to memcmp on big-endian systems.
4802 #--------------------------------------------------------------------
4804 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
4805 echo "configure:4806: checking whether byte ordering is bigendian" >&5
4806 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
4807 echo $ac_n "(cached) $ac_c" 1>&6
4809 ac_cv_c_bigendian=unknown
4810 # See if sys/param.h defines the BYTE_ORDER macro.
4811 cat > conftest.$ac_ext <<EOF
4812 #line 4813 "configure"
4813 #include "confdefs.h"
4814 #include <sys/types.h>
4815 #include <sys/param.h>
4818 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
4823 if { (eval echo configure:4824: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4825 # It does; now see whether it defined to BIG_ENDIAN or not.
4826 cat > conftest.$ac_ext <<EOF
4827 #line 4828 "configure"
4828 #include "confdefs.h"
4829 #include <sys/types.h>
4830 #include <sys/param.h>
4833 #if BYTE_ORDER != BIG_ENDIAN
4838 if { (eval echo configure:4839: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4840 ac_cv_c_bigendian=yes
4842 echo "configure: failed program was:" >&5
4843 cat conftest.$ac_ext >&5
4845 ac_cv_c_bigendian=no
4849 echo "configure: failed program was:" >&5
4850 cat conftest.$ac_ext >&5
4853 if test $ac_cv_c_bigendian = unknown; then
4854 if test "$cross_compiling" = yes; then
4855 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
4857 cat > conftest.$ac_ext <<EOF
4858 #line 4859 "configure"
4859 #include "confdefs.h"
4861 /* Are we little or big endian? From Harbison&Steele. */
4865 char c[sizeof (long)];
4868 exit (u.c[sizeof (long) - 1] == 1);
4871 if { (eval echo configure:4872: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4873 ac_cv_c_bigendian=no
4875 echo "configure: failed program was:" >&5
4876 cat conftest.$ac_ext >&5
4878 ac_cv_c_bigendian=yes
4886 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
4887 if test $ac_cv_c_bigendian = yes; then
4888 cat >> confdefs.h <<\EOF
4889 #define WORDS_BIGENDIAN 1
4895 #--------------------------------------------------------------------
4896 # Supply substitutes for missing POSIX library procedures, or
4897 # set flags so Tcl uses alternate procedures.
4898 #--------------------------------------------------------------------
4900 # Check if Posix compliant getcwd exists, if not we'll use getwd.
4901 for ac_func in getcwd
4903 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4904 echo "configure:4905: checking for $ac_func" >&5
4905 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4906 echo $ac_n "(cached) $ac_c" 1>&6
4908 cat > conftest.$ac_ext <<EOF
4909 #line 4910 "configure"
4910 #include "confdefs.h"
4911 /* System header to define __stub macros and hopefully few prototypes,
4912 which can conflict with char $ac_func(); below. */
4914 /* Override any gcc2 internal prototype to avoid an error. */
4915 /* We use char because int might match the return type of a gcc2
4916 builtin and then its argument prototype would still apply. */
4921 /* The GNU C library defines this for functions which it implements
4922 to always fail with ENOSYS. Some functions are actually named
4923 something starting with __ and the normal name is an alias. */
4924 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4932 if { (eval echo configure:4933: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4934 eval "ac_cv_func_$ac_func=yes"
4936 echo "configure: failed program was:" >&5
4937 cat conftest.$ac_ext >&5
4939 eval "ac_cv_func_$ac_func=no"
4944 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4945 echo "$ac_t""yes" 1>&6
4946 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4947 cat >> confdefs.h <<EOF
4948 #define $ac_tr_func 1
4952 echo "$ac_t""no" 1>&6
4953 cat >> confdefs.h <<\EOF
4960 # Nb: if getcwd uses popen and pwd(1) (like SunOS 4) we should really
4961 # define USEGETWD even if the posix getcwd exists. Add a test ?
4963 for ac_func in opendir strstr strtol strtoll strtoull tmpnam waitpid
4965 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4966 echo "configure:4967: checking for $ac_func" >&5
4967 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4968 echo $ac_n "(cached) $ac_c" 1>&6
4970 cat > conftest.$ac_ext <<EOF
4971 #line 4972 "configure"
4972 #include "confdefs.h"
4973 /* System header to define __stub macros and hopefully few prototypes,
4974 which can conflict with char $ac_func(); below. */
4976 /* Override any gcc2 internal prototype to avoid an error. */
4977 /* We use char because int might match the return type of a gcc2
4978 builtin and then its argument prototype would still apply. */
4983 /* The GNU C library defines this for functions which it implements
4984 to always fail with ENOSYS. Some functions are actually named
4985 something starting with __ and the normal name is an alias. */
4986 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4994 if { (eval echo configure:4995: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4996 eval "ac_cv_func_$ac_func=yes"
4998 echo "configure: failed program was:" >&5
4999 cat conftest.$ac_ext >&5
5001 eval "ac_cv_func_$ac_func=no"
5006 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5007 echo "$ac_t""yes" 1>&6
5008 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5009 cat >> confdefs.h <<EOF
5010 #define $ac_tr_func 1
5014 echo "$ac_t""no" 1>&6
5015 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
5020 echo $ac_n "checking for strerror""... $ac_c" 1>&6
5021 echo "configure:5022: checking for strerror" >&5
5022 if eval "test \"`echo '$''{'ac_cv_func_strerror'+set}'`\" = set"; then
5023 echo $ac_n "(cached) $ac_c" 1>&6
5025 cat > conftest.$ac_ext <<EOF
5026 #line 5027 "configure"
5027 #include "confdefs.h"
5028 /* System header to define __stub macros and hopefully few prototypes,
5029 which can conflict with char strerror(); below. */
5031 /* Override any gcc2 internal prototype to avoid an error. */
5032 /* We use char because int might match the return type of a gcc2
5033 builtin and then its argument prototype would still apply. */
5038 /* The GNU C library defines this for functions which it implements
5039 to always fail with ENOSYS. Some functions are actually named
5040 something starting with __ and the normal name is an alias. */
5041 #if defined (__stub_strerror) || defined (__stub___strerror)
5049 if { (eval echo configure:5050: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5051 eval "ac_cv_func_strerror=yes"
5053 echo "configure: failed program was:" >&5
5054 cat conftest.$ac_ext >&5
5056 eval "ac_cv_func_strerror=no"
5061 if eval "test \"`echo '$ac_cv_func_'strerror`\" = yes"; then
5062 echo "$ac_t""yes" 1>&6
5065 echo "$ac_t""no" 1>&6
5066 cat >> confdefs.h <<\EOF
5067 #define NO_STRERROR 1
5072 echo $ac_n "checking for getwd""... $ac_c" 1>&6
5073 echo "configure:5074: checking for getwd" >&5
5074 if eval "test \"`echo '$''{'ac_cv_func_getwd'+set}'`\" = set"; then
5075 echo $ac_n "(cached) $ac_c" 1>&6
5077 cat > conftest.$ac_ext <<EOF
5078 #line 5079 "configure"
5079 #include "confdefs.h"
5080 /* System header to define __stub macros and hopefully few prototypes,
5081 which can conflict with char getwd(); below. */
5083 /* Override any gcc2 internal prototype to avoid an error. */
5084 /* We use char because int might match the return type of a gcc2
5085 builtin and then its argument prototype would still apply. */
5090 /* The GNU C library defines this for functions which it implements
5091 to always fail with ENOSYS. Some functions are actually named
5092 something starting with __ and the normal name is an alias. */
5093 #if defined (__stub_getwd) || defined (__stub___getwd)
5101 if { (eval echo configure:5102: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5103 eval "ac_cv_func_getwd=yes"
5105 echo "configure: failed program was:" >&5
5106 cat conftest.$ac_ext >&5
5108 eval "ac_cv_func_getwd=no"
5113 if eval "test \"`echo '$ac_cv_func_'getwd`\" = yes"; then
5114 echo "$ac_t""yes" 1>&6
5117 echo "$ac_t""no" 1>&6
5118 cat >> confdefs.h <<\EOF
5124 echo $ac_n "checking for wait3""... $ac_c" 1>&6
5125 echo "configure:5126: checking for wait3" >&5
5126 if eval "test \"`echo '$''{'ac_cv_func_wait3'+set}'`\" = set"; then
5127 echo $ac_n "(cached) $ac_c" 1>&6
5129 cat > conftest.$ac_ext <<EOF
5130 #line 5131 "configure"
5131 #include "confdefs.h"
5132 /* System header to define __stub macros and hopefully few prototypes,
5133 which can conflict with char wait3(); below. */
5135 /* Override any gcc2 internal prototype to avoid an error. */
5136 /* We use char because int might match the return type of a gcc2
5137 builtin and then its argument prototype would still apply. */
5142 /* The GNU C library defines this for functions which it implements
5143 to always fail with ENOSYS. Some functions are actually named
5144 something starting with __ and the normal name is an alias. */
5145 #if defined (__stub_wait3) || defined (__stub___wait3)
5153 if { (eval echo configure:5154: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5155 eval "ac_cv_func_wait3=yes"
5157 echo "configure: failed program was:" >&5
5158 cat conftest.$ac_ext >&5
5160 eval "ac_cv_func_wait3=no"
5165 if eval "test \"`echo '$ac_cv_func_'wait3`\" = yes"; then
5166 echo "$ac_t""yes" 1>&6
5169 echo "$ac_t""no" 1>&6
5170 cat >> confdefs.h <<\EOF
5176 echo $ac_n "checking for uname""... $ac_c" 1>&6
5177 echo "configure:5178: checking for uname" >&5
5178 if eval "test \"`echo '$''{'ac_cv_func_uname'+set}'`\" = set"; then
5179 echo $ac_n "(cached) $ac_c" 1>&6
5181 cat > conftest.$ac_ext <<EOF
5182 #line 5183 "configure"
5183 #include "confdefs.h"
5184 /* System header to define __stub macros and hopefully few prototypes,
5185 which can conflict with char uname(); below. */
5187 /* Override any gcc2 internal prototype to avoid an error. */
5188 /* We use char because int might match the return type of a gcc2
5189 builtin and then its argument prototype would still apply. */
5194 /* The GNU C library defines this for functions which it implements
5195 to always fail with ENOSYS. Some functions are actually named
5196 something starting with __ and the normal name is an alias. */
5197 #if defined (__stub_uname) || defined (__stub___uname)
5205 if { (eval echo configure:5206: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5207 eval "ac_cv_func_uname=yes"
5209 echo "configure: failed program was:" >&5
5210 cat conftest.$ac_ext >&5
5212 eval "ac_cv_func_uname=no"
5217 if eval "test \"`echo '$ac_cv_func_'uname`\" = yes"; then
5218 echo "$ac_t""yes" 1>&6
5221 echo "$ac_t""no" 1>&6
5222 cat >> confdefs.h <<\EOF
5229 if test "`uname -s`" = "Darwin" && test "${TCL_THREADS}" = 1 && \
5230 test "`uname -r | awk -F. '{print $1}'`" -lt 7; then
5231 # prior to Darwin 7, realpath is not threadsafe, so don't
5232 # use it when threads are enabled, c.f. bug # 711232
5233 ac_cv_func_realpath=no
5235 echo $ac_n "checking for realpath""... $ac_c" 1>&6
5236 echo "configure:5237: checking for realpath" >&5
5237 if eval "test \"`echo '$''{'ac_cv_func_realpath'+set}'`\" = set"; then
5238 echo $ac_n "(cached) $ac_c" 1>&6
5240 cat > conftest.$ac_ext <<EOF
5241 #line 5242 "configure"
5242 #include "confdefs.h"
5243 /* System header to define __stub macros and hopefully few prototypes,
5244 which can conflict with char realpath(); below. */
5246 /* Override any gcc2 internal prototype to avoid an error. */
5247 /* We use char because int might match the return type of a gcc2
5248 builtin and then its argument prototype would still apply. */
5253 /* The GNU C library defines this for functions which it implements
5254 to always fail with ENOSYS. Some functions are actually named
5255 something starting with __ and the normal name is an alias. */
5256 #if defined (__stub_realpath) || defined (__stub___realpath)
5264 if { (eval echo configure:5265: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5266 eval "ac_cv_func_realpath=yes"
5268 echo "configure: failed program was:" >&5
5269 cat conftest.$ac_ext >&5
5271 eval "ac_cv_func_realpath=no"
5276 if eval "test \"`echo '$ac_cv_func_'realpath`\" = yes"; then
5277 echo "$ac_t""yes" 1>&6
5280 echo "$ac_t""no" 1>&6
5281 cat >> confdefs.h <<\EOF
5282 #define NO_REALPATH 1
5288 #--------------------------------------------------------------------
5289 # Look for thread-safe variants of some library functions.
5290 #--------------------------------------------------------------------
5292 if test "${TCL_THREADS}" = 1; then
5293 echo $ac_n "checking for getpwuid_r""... $ac_c" 1>&6
5294 echo "configure:5295: checking for getpwuid_r" >&5
5295 if eval "test \"`echo '$''{'ac_cv_func_getpwuid_r'+set}'`\" = set"; then
5296 echo $ac_n "(cached) $ac_c" 1>&6
5298 cat > conftest.$ac_ext <<EOF
5299 #line 5300 "configure"
5300 #include "confdefs.h"
5301 /* System header to define __stub macros and hopefully few prototypes,
5302 which can conflict with char getpwuid_r(); below. */
5304 /* Override any gcc2 internal prototype to avoid an error. */
5305 /* We use char because int might match the return type of a gcc2
5306 builtin and then its argument prototype would still apply. */
5311 /* The GNU C library defines this for functions which it implements
5312 to always fail with ENOSYS. Some functions are actually named
5313 something starting with __ and the normal name is an alias. */
5314 #if defined (__stub_getpwuid_r) || defined (__stub___getpwuid_r)
5322 if { (eval echo configure:5323: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5324 eval "ac_cv_func_getpwuid_r=yes"
5326 echo "configure: failed program was:" >&5
5327 cat conftest.$ac_ext >&5
5329 eval "ac_cv_func_getpwuid_r=no"
5334 if eval "test \"`echo '$ac_cv_func_'getpwuid_r`\" = yes"; then
5335 echo "$ac_t""yes" 1>&6
5337 echo $ac_n "checking for getpwuid_r with 5 args""... $ac_c" 1>&6
5338 echo "configure:5339: checking for getpwuid_r with 5 args" >&5
5339 if eval "test \"`echo '$''{'tcl_cv_api_getpwuid_r_5'+set}'`\" = set"; then
5340 echo $ac_n "(cached) $ac_c" 1>&6
5343 cat > conftest.$ac_ext <<EOF
5344 #line 5345 "configure"
5345 #include "confdefs.h"
5347 #include <sys/types.h>
5353 struct passwd pw, *pwp;
5357 (void) getpwuid_r(uid, &pw, buf, buflen, &pwp);
5361 if { (eval echo configure:5362: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5363 tcl_cv_api_getpwuid_r_5=yes
5365 echo "configure: failed program was:" >&5
5366 cat conftest.$ac_ext >&5
5368 tcl_cv_api_getpwuid_r_5=no
5373 echo "$ac_t""$tcl_cv_api_getpwuid_r_5" 1>&6
5374 tcl_ok=$tcl_cv_api_getpwuid_r_5
5375 if test "$tcl_ok" = yes; then
5376 cat >> confdefs.h <<\EOF
5377 #define HAVE_GETPWUID_R_5 1
5381 echo $ac_n "checking for getpwuid_r with 4 args""... $ac_c" 1>&6
5382 echo "configure:5383: checking for getpwuid_r with 4 args" >&5
5383 if eval "test \"`echo '$''{'tcl_cv_api_getpwuid_r_4'+set}'`\" = set"; then
5384 echo $ac_n "(cached) $ac_c" 1>&6
5387 cat > conftest.$ac_ext <<EOF
5388 #line 5389 "configure"
5389 #include "confdefs.h"
5391 #include <sys/types.h>
5401 (void)getpwnam_r(uid, &pw, buf, buflen);
5405 if { (eval echo configure:5406: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5407 tcl_cv_api_getpwuid_r_4=yes
5409 echo "configure: failed program was:" >&5
5410 cat conftest.$ac_ext >&5
5412 tcl_cv_api_getpwuid_r_4=no
5417 echo "$ac_t""$tcl_cv_api_getpwuid_r_4" 1>&6
5418 tcl_ok=$tcl_cv_api_getpwuid_r_4
5419 if test "$tcl_ok" = yes; then
5420 cat >> confdefs.h <<\EOF
5421 #define HAVE_GETPWUID_R_4 1
5426 if test "$tcl_ok" = yes; then
5427 cat >> confdefs.h <<\EOF
5428 #define HAVE_GETPWUID_R 1
5434 echo "$ac_t""no" 1>&6
5437 echo $ac_n "checking for getpwnam_r""... $ac_c" 1>&6
5438 echo "configure:5439: checking for getpwnam_r" >&5
5439 if eval "test \"`echo '$''{'ac_cv_func_getpwnam_r'+set}'`\" = set"; then
5440 echo $ac_n "(cached) $ac_c" 1>&6
5442 cat > conftest.$ac_ext <<EOF
5443 #line 5444 "configure"
5444 #include "confdefs.h"
5445 /* System header to define __stub macros and hopefully few prototypes,
5446 which can conflict with char getpwnam_r(); below. */
5448 /* Override any gcc2 internal prototype to avoid an error. */
5449 /* We use char because int might match the return type of a gcc2
5450 builtin and then its argument prototype would still apply. */
5455 /* The GNU C library defines this for functions which it implements
5456 to always fail with ENOSYS. Some functions are actually named
5457 something starting with __ and the normal name is an alias. */
5458 #if defined (__stub_getpwnam_r) || defined (__stub___getpwnam_r)
5466 if { (eval echo configure:5467: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5468 eval "ac_cv_func_getpwnam_r=yes"
5470 echo "configure: failed program was:" >&5
5471 cat conftest.$ac_ext >&5
5473 eval "ac_cv_func_getpwnam_r=no"
5478 if eval "test \"`echo '$ac_cv_func_'getpwnam_r`\" = yes"; then
5479 echo "$ac_t""yes" 1>&6
5481 echo $ac_n "checking for getpwnam_r with 5 args""... $ac_c" 1>&6
5482 echo "configure:5483: checking for getpwnam_r with 5 args" >&5
5483 if eval "test \"`echo '$''{'tcl_cv_api_getpwnam_r_5'+set}'`\" = set"; then
5484 echo $ac_n "(cached) $ac_c" 1>&6
5487 cat > conftest.$ac_ext <<EOF
5488 #line 5489 "configure"
5489 #include "confdefs.h"
5491 #include <sys/types.h>
5497 struct passwd pw, *pwp;
5501 (void) getpwnam_r(name, &pw, buf, buflen, &pwp);
5505 if { (eval echo configure:5506: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5507 tcl_cv_api_getpwnam_r_5=yes
5509 echo "configure: failed program was:" >&5
5510 cat conftest.$ac_ext >&5
5512 tcl_cv_api_getpwnam_r_5=no
5517 echo "$ac_t""$tcl_cv_api_getpwnam_r_5" 1>&6
5518 tcl_ok=$tcl_cv_api_getpwnam_r_5
5519 if test "$tcl_ok" = yes; then
5520 cat >> confdefs.h <<\EOF
5521 #define HAVE_GETPWNAM_R_5 1
5525 echo $ac_n "checking for getpwnam_r with 4 args""... $ac_c" 1>&6
5526 echo "configure:5527: checking for getpwnam_r with 4 args" >&5
5527 if eval "test \"`echo '$''{'tcl_cv_api_getpwnam_r_4'+set}'`\" = set"; then
5528 echo $ac_n "(cached) $ac_c" 1>&6
5531 cat > conftest.$ac_ext <<EOF
5532 #line 5533 "configure"
5533 #include "confdefs.h"
5535 #include <sys/types.h>
5545 (void)getpwnam_r(name, &pw, buf, buflen);
5549 if { (eval echo configure:5550: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5551 tcl_cv_api_getpwnam_r_4=yes
5553 echo "configure: failed program was:" >&5
5554 cat conftest.$ac_ext >&5
5556 tcl_cv_api_getpwnam_r_4=no
5561 echo "$ac_t""$tcl_cv_api_getpwnam_r_4" 1>&6
5562 tcl_ok=$tcl_cv_api_getpwnam_r_4
5563 if test "$tcl_ok" = yes; then
5564 cat >> confdefs.h <<\EOF
5565 #define HAVE_GETPWNAM_R_4 1
5570 if test "$tcl_ok" = yes; then
5571 cat >> confdefs.h <<\EOF
5572 #define HAVE_GETPWNAM_R 1
5578 echo "$ac_t""no" 1>&6
5581 echo $ac_n "checking for getgrgid_r""... $ac_c" 1>&6
5582 echo "configure:5583: checking for getgrgid_r" >&5
5583 if eval "test \"`echo '$''{'ac_cv_func_getgrgid_r'+set}'`\" = set"; then
5584 echo $ac_n "(cached) $ac_c" 1>&6
5586 cat > conftest.$ac_ext <<EOF
5587 #line 5588 "configure"
5588 #include "confdefs.h"
5589 /* System header to define __stub macros and hopefully few prototypes,
5590 which can conflict with char getgrgid_r(); below. */
5592 /* Override any gcc2 internal prototype to avoid an error. */
5593 /* We use char because int might match the return type of a gcc2
5594 builtin and then its argument prototype would still apply. */
5599 /* The GNU C library defines this for functions which it implements
5600 to always fail with ENOSYS. Some functions are actually named
5601 something starting with __ and the normal name is an alias. */
5602 #if defined (__stub_getgrgid_r) || defined (__stub___getgrgid_r)
5610 if { (eval echo configure:5611: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5612 eval "ac_cv_func_getgrgid_r=yes"
5614 echo "configure: failed program was:" >&5
5615 cat conftest.$ac_ext >&5
5617 eval "ac_cv_func_getgrgid_r=no"
5622 if eval "test \"`echo '$ac_cv_func_'getgrgid_r`\" = yes"; then
5623 echo "$ac_t""yes" 1>&6
5625 echo $ac_n "checking for getgrgid_r with 5 args""... $ac_c" 1>&6
5626 echo "configure:5627: checking for getgrgid_r with 5 args" >&5
5627 if eval "test \"`echo '$''{'tcl_cv_api_getgrgid_r_5'+set}'`\" = set"; then
5628 echo $ac_n "(cached) $ac_c" 1>&6
5631 cat > conftest.$ac_ext <<EOF
5632 #line 5633 "configure"
5633 #include "confdefs.h"
5635 #include <sys/types.h>
5641 struct group gr, *grp;
5645 (void) getgrgid_r(gid, &gr, buf, buflen, &grp);
5649 if { (eval echo configure:5650: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5651 tcl_cv_api_getgrgid_r_5=yes
5653 echo "configure: failed program was:" >&5
5654 cat conftest.$ac_ext >&5
5656 tcl_cv_api_getgrgid_r_5=no
5661 echo "$ac_t""$tcl_cv_api_getgrgid_r_5" 1>&6
5662 tcl_ok=$tcl_cv_api_getgrgid_r_5
5663 if test "$tcl_ok" = yes; then
5664 cat >> confdefs.h <<\EOF
5665 #define HAVE_GETGRGID_R_5 1
5669 echo $ac_n "checking for getgrgid_r with 4 args""... $ac_c" 1>&6
5670 echo "configure:5671: checking for getgrgid_r with 4 args" >&5
5671 if eval "test \"`echo '$''{'tcl_cv_api_getgrgid_r_4'+set}'`\" = set"; then
5672 echo $ac_n "(cached) $ac_c" 1>&6
5675 cat > conftest.$ac_ext <<EOF
5676 #line 5677 "configure"
5677 #include "confdefs.h"
5679 #include <sys/types.h>
5689 (void)getgrgid_r(gid, &gr, buf, buflen);
5693 if { (eval echo configure:5694: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5695 tcl_cv_api_getgrgid_r_4=yes
5697 echo "configure: failed program was:" >&5
5698 cat conftest.$ac_ext >&5
5700 tcl_cv_api_getgrgid_r_4=no
5705 echo "$ac_t""$tcl_cv_api_getgrgid_r_4" 1>&6
5706 tcl_ok=$tcl_cv_api_getgrgid_r_4
5707 if test "$tcl_ok" = yes; then
5708 cat >> confdefs.h <<\EOF
5709 #define HAVE_GETGRGID_R_4 1
5714 if test "$tcl_ok" = yes; then
5715 cat >> confdefs.h <<\EOF
5716 #define HAVE_GETGRGID_R 1
5722 echo "$ac_t""no" 1>&6
5725 echo $ac_n "checking for getgrnam_r""... $ac_c" 1>&6
5726 echo "configure:5727: checking for getgrnam_r" >&5
5727 if eval "test \"`echo '$''{'ac_cv_func_getgrnam_r'+set}'`\" = set"; then
5728 echo $ac_n "(cached) $ac_c" 1>&6
5730 cat > conftest.$ac_ext <<EOF
5731 #line 5732 "configure"
5732 #include "confdefs.h"
5733 /* System header to define __stub macros and hopefully few prototypes,
5734 which can conflict with char getgrnam_r(); below. */
5736 /* Override any gcc2 internal prototype to avoid an error. */
5737 /* We use char because int might match the return type of a gcc2
5738 builtin and then its argument prototype would still apply. */
5743 /* The GNU C library defines this for functions which it implements
5744 to always fail with ENOSYS. Some functions are actually named
5745 something starting with __ and the normal name is an alias. */
5746 #if defined (__stub_getgrnam_r) || defined (__stub___getgrnam_r)
5754 if { (eval echo configure:5755: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5756 eval "ac_cv_func_getgrnam_r=yes"
5758 echo "configure: failed program was:" >&5
5759 cat conftest.$ac_ext >&5
5761 eval "ac_cv_func_getgrnam_r=no"
5766 if eval "test \"`echo '$ac_cv_func_'getgrnam_r`\" = yes"; then
5767 echo "$ac_t""yes" 1>&6
5769 echo $ac_n "checking for getgrnam_r with 5 args""... $ac_c" 1>&6
5770 echo "configure:5771: checking for getgrnam_r with 5 args" >&5
5771 if eval "test \"`echo '$''{'tcl_cv_api_getgrnam_r_5'+set}'`\" = set"; then
5772 echo $ac_n "(cached) $ac_c" 1>&6
5775 cat > conftest.$ac_ext <<EOF
5776 #line 5777 "configure"
5777 #include "confdefs.h"
5779 #include <sys/types.h>
5785 struct group gr, *grp;
5789 (void) getgrnam_r(name, &gr, buf, buflen, &grp);
5793 if { (eval echo configure:5794: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5795 tcl_cv_api_getgrnam_r_5=yes
5797 echo "configure: failed program was:" >&5
5798 cat conftest.$ac_ext >&5
5800 tcl_cv_api_getgrnam_r_5=no
5805 echo "$ac_t""$tcl_cv_api_getgrnam_r_5" 1>&6
5806 tcl_ok=$tcl_cv_api_getgrnam_r_5
5807 if test "$tcl_ok" = yes; then
5808 cat >> confdefs.h <<\EOF
5809 #define HAVE_GETGRNAM_R_5 1
5813 echo $ac_n "checking for getgrnam_r with 4 args""... $ac_c" 1>&6
5814 echo "configure:5815: checking for getgrnam_r with 4 args" >&5
5815 if eval "test \"`echo '$''{'tcl_cv_api_getgrnam_r_4'+set}'`\" = set"; then
5816 echo $ac_n "(cached) $ac_c" 1>&6
5819 cat > conftest.$ac_ext <<EOF
5820 #line 5821 "configure"
5821 #include "confdefs.h"
5823 #include <sys/types.h>
5833 (void)getgrnam_r(name, &gr, buf, buflen);
5837 if { (eval echo configure:5838: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5839 tcl_cv_api_getgrnam_r_4=yes
5841 echo "configure: failed program was:" >&5
5842 cat conftest.$ac_ext >&5
5844 tcl_cv_api_getgrnam_r_4=no
5849 echo "$ac_t""$tcl_cv_api_getgrnam_r_4" 1>&6
5850 tcl_ok=$tcl_cv_api_getgrnam_r_4
5851 if test "$tcl_ok" = yes; then
5852 cat >> confdefs.h <<\EOF
5853 #define HAVE_GETGRNAM_R_4 1
5858 if test "$tcl_ok" = yes; then
5859 cat >> confdefs.h <<\EOF
5860 #define HAVE_GETGRNAM_R 1
5866 echo "$ac_t""no" 1>&6
5869 if test "`uname -s`" = "Darwin" && \
5870 test "`uname -r | awk -F. '{print $1}'`" -gt 5; then
5871 # Starting with Darwin 6 (Mac OSX 10.2), gethostbyX
5872 # are actually MT-safe as they always return pointers
5873 # from the TSD instead of the static storage.
5874 cat >> confdefs.h <<\EOF
5875 #define HAVE_MTSAFE_GETHOSTBYNAME 1
5878 cat >> confdefs.h <<\EOF
5879 #define HAVE_MTSAFE_GETHOSTBYADDR 1
5882 elif test "`uname -s`" = "HP-UX" && \
5883 test "`uname -r|sed -e 's|B\.||' -e 's|\..*$||'`" -gt 10; then
5884 # Starting with HPUX 11.00 (we believe), gethostbyX
5885 # are actually MT-safe as they always return pointers
5886 # from TSD instead of static storage.
5887 cat >> confdefs.h <<\EOF
5888 #define HAVE_MTSAFE_GETHOSTBYNAME 1
5891 cat >> confdefs.h <<\EOF
5892 #define HAVE_MTSAFE_GETHOSTBYADDR 1
5896 echo $ac_n "checking for gethostbyname_r""... $ac_c" 1>&6
5897 echo "configure:5898: checking for gethostbyname_r" >&5
5898 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname_r'+set}'`\" = set"; then
5899 echo $ac_n "(cached) $ac_c" 1>&6
5901 cat > conftest.$ac_ext <<EOF
5902 #line 5903 "configure"
5903 #include "confdefs.h"
5904 /* System header to define __stub macros and hopefully few prototypes,
5905 which can conflict with char gethostbyname_r(); below. */
5907 /* Override any gcc2 internal prototype to avoid an error. */
5908 /* We use char because int might match the return type of a gcc2
5909 builtin and then its argument prototype would still apply. */
5910 char gethostbyname_r();
5914 /* The GNU C library defines this for functions which it implements
5915 to always fail with ENOSYS. Some functions are actually named
5916 something starting with __ and the normal name is an alias. */
5917 #if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r)
5925 if { (eval echo configure:5926: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5927 eval "ac_cv_func_gethostbyname_r=yes"
5929 echo "configure: failed program was:" >&5
5930 cat conftest.$ac_ext >&5
5932 eval "ac_cv_func_gethostbyname_r=no"
5937 if eval "test \"`echo '$ac_cv_func_'gethostbyname_r`\" = yes"; then
5938 echo "$ac_t""yes" 1>&6
5940 echo $ac_n "checking for gethostbyname_r with 6 args""... $ac_c" 1>&6
5941 echo "configure:5942: checking for gethostbyname_r with 6 args" >&5
5942 if eval "test \"`echo '$''{'tcl_cv_api_gethostbyname_r_6'+set}'`\" = set"; then
5943 echo $ac_n "(cached) $ac_c" 1>&6
5946 cat > conftest.$ac_ext <<EOF
5947 #line 5948 "configure"
5948 #include "confdefs.h"
5955 struct hostent *he, *res;
5960 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop);
5964 if { (eval echo configure:5965: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5966 tcl_cv_api_gethostbyname_r_6=yes
5968 echo "configure: failed program was:" >&5
5969 cat conftest.$ac_ext >&5
5971 tcl_cv_api_gethostbyname_r_6=no
5976 echo "$ac_t""$tcl_cv_api_gethostbyname_r_6" 1>&6
5977 tcl_ok=$tcl_cv_api_gethostbyname_r_6
5978 if test "$tcl_ok" = yes; then
5979 cat >> confdefs.h <<\EOF
5980 #define HAVE_GETHOSTBYNAME_R_6 1
5984 echo $ac_n "checking for gethostbyname_r with 5 args""... $ac_c" 1>&6
5985 echo "configure:5986: checking for gethostbyname_r with 5 args" >&5
5986 if eval "test \"`echo '$''{'tcl_cv_api_gethostbyname_r_5'+set}'`\" = set"; then
5987 echo $ac_n "(cached) $ac_c" 1>&6
5990 cat > conftest.$ac_ext <<EOF
5991 #line 5992 "configure"
5992 #include "confdefs.h"
6004 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop);
6008 if { (eval echo configure:6009: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6010 tcl_cv_api_gethostbyname_r_5=yes
6012 echo "configure: failed program was:" >&5
6013 cat conftest.$ac_ext >&5
6015 tcl_cv_api_gethostbyname_r_5=no
6020 echo "$ac_t""$tcl_cv_api_gethostbyname_r_5" 1>&6
6021 tcl_ok=$tcl_cv_api_gethostbyname_r_5
6022 if test "$tcl_ok" = yes; then
6023 cat >> confdefs.h <<\EOF
6024 #define HAVE_GETHOSTBYNAME_R_5 1
6028 echo $ac_n "checking for gethostbyname_r with 3 args""... $ac_c" 1>&6
6029 echo "configure:6030: checking for gethostbyname_r with 3 args" >&5
6030 if eval "test \"`echo '$''{'tcl_cv_api_gethostbyname_r_3'+set}'`\" = set"; then
6031 echo $ac_n "(cached) $ac_c" 1>&6
6034 cat > conftest.$ac_ext <<EOF
6035 #line 6036 "configure"
6036 #include "confdefs.h"
6044 struct hostent_data data;
6046 (void) gethostbyname_r(name, he, &data);
6050 if { (eval echo configure:6051: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6052 tcl_cv_api_gethostbyname_r_3=yes
6054 echo "configure: failed program was:" >&5
6055 cat conftest.$ac_ext >&5
6057 tcl_cv_api_gethostbyname_r_3=no
6062 echo "$ac_t""$tcl_cv_api_gethostbyname_r_3" 1>&6
6063 tcl_ok=$tcl_cv_api_gethostbyname_r_3
6064 if test "$tcl_ok" = yes; then
6065 cat >> confdefs.h <<\EOF
6066 #define HAVE_GETHOSTBYNAME_R_3 1
6072 if test "$tcl_ok" = yes; then
6073 cat >> confdefs.h <<\EOF
6074 #define HAVE_GETHOSTBYNAME_R 1
6080 echo "$ac_t""no" 1>&6
6083 echo $ac_n "checking for gethostbyaddr_r""... $ac_c" 1>&6
6084 echo "configure:6085: checking for gethostbyaddr_r" >&5
6085 if eval "test \"`echo '$''{'ac_cv_func_gethostbyaddr_r'+set}'`\" = set"; then
6086 echo $ac_n "(cached) $ac_c" 1>&6
6088 cat > conftest.$ac_ext <<EOF
6089 #line 6090 "configure"
6090 #include "confdefs.h"
6091 /* System header to define __stub macros and hopefully few prototypes,
6092 which can conflict with char gethostbyaddr_r(); below. */
6094 /* Override any gcc2 internal prototype to avoid an error. */
6095 /* We use char because int might match the return type of a gcc2
6096 builtin and then its argument prototype would still apply. */
6097 char gethostbyaddr_r();
6101 /* The GNU C library defines this for functions which it implements
6102 to always fail with ENOSYS. Some functions are actually named
6103 something starting with __ and the normal name is an alias. */
6104 #if defined (__stub_gethostbyaddr_r) || defined (__stub___gethostbyaddr_r)
6112 if { (eval echo configure:6113: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6114 eval "ac_cv_func_gethostbyaddr_r=yes"
6116 echo "configure: failed program was:" >&5
6117 cat conftest.$ac_ext >&5
6119 eval "ac_cv_func_gethostbyaddr_r=no"
6124 if eval "test \"`echo '$ac_cv_func_'gethostbyaddr_r`\" = yes"; then
6125 echo "$ac_t""yes" 1>&6
6127 echo $ac_n "checking for gethostbyaddr_r with 7 args""... $ac_c" 1>&6
6128 echo "configure:6129: checking for gethostbyaddr_r with 7 args" >&5
6129 if eval "test \"`echo '$''{'tcl_cv_api_gethostbyaddr_r_7'+set}'`\" = set"; then
6130 echo $ac_n "(cached) $ac_c" 1>&6
6133 cat > conftest.$ac_ext <<EOF
6134 #line 6135 "configure"
6135 #include "confdefs.h"
6144 struct hostent *result;
6149 (void) gethostbyaddr_r(addr, length, type, result, buffer, buflen,
6154 if { (eval echo configure:6155: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6156 tcl_cv_api_gethostbyaddr_r_7=yes
6158 echo "configure: failed program was:" >&5
6159 cat conftest.$ac_ext >&5
6161 tcl_cv_api_gethostbyaddr_r_7=no
6166 echo "$ac_t""$tcl_cv_api_gethostbyaddr_r_7" 1>&6
6167 tcl_ok=$tcl_cv_api_gethostbyaddr_r_7
6168 if test "$tcl_ok" = yes; then
6169 cat >> confdefs.h <<\EOF
6170 #define HAVE_GETHOSTBYADDR_R_7 1
6174 echo $ac_n "checking for gethostbyaddr_r with 8 args""... $ac_c" 1>&6
6175 echo "configure:6176: checking for gethostbyaddr_r with 8 args" >&5
6176 if eval "test \"`echo '$''{'tcl_cv_api_gethostbyaddr_r_8'+set}'`\" = set"; then
6177 echo $ac_n "(cached) $ac_c" 1>&6
6180 cat > conftest.$ac_ext <<EOF
6181 #line 6182 "configure"
6182 #include "confdefs.h"
6191 struct hostent *result, *resultp;
6196 (void) gethostbyaddr_r(addr, length, type, result, buffer, buflen,
6197 &resultp, &h_errnop);
6201 if { (eval echo configure:6202: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6203 tcl_cv_api_gethostbyaddr_r_8=yes
6205 echo "configure: failed program was:" >&5
6206 cat conftest.$ac_ext >&5
6208 tcl_cv_api_gethostbyaddr_r_8=no
6213 echo "$ac_t""$tcl_cv_api_gethostbyaddr_r_8" 1>&6
6214 tcl_ok=$tcl_cv_api_gethostbyaddr_r_8
6215 if test "$tcl_ok" = yes; then
6216 cat >> confdefs.h <<\EOF
6217 #define HAVE_GETHOSTBYADDR_R_8 1
6222 if test "$tcl_ok" = yes; then
6223 cat >> confdefs.h <<\EOF
6224 #define HAVE_GETHOSTBYADDR_R 1
6230 echo "$ac_t""no" 1>&6
6236 #---------------------------------------------------------------------------
6237 # Determine which interface to use to talk to the serial port.
6238 # Note that #include lines must begin in leftmost column for
6239 # some compilers to recognize them as preprocessor directives.
6240 #---------------------------------------------------------------------------
6243 for ac_hdr in sys/modem.h
6245 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6246 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6247 echo "configure:6248: checking for $ac_hdr" >&5
6248 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6249 echo $ac_n "(cached) $ac_c" 1>&6
6251 cat > conftest.$ac_ext <<EOF
6252 #line 6253 "configure"
6253 #include "confdefs.h"
6256 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6257 { (eval echo configure:6258: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6258 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6259 if test -z "$ac_err"; then
6261 eval "ac_cv_header_$ac_safe=yes"
6264 echo "configure: failed program was:" >&5
6265 cat conftest.$ac_ext >&5
6267 eval "ac_cv_header_$ac_safe=no"
6271 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6272 echo "$ac_t""yes" 1>&6
6273 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6274 cat >> confdefs.h <<EOF
6275 #define $ac_tr_hdr 1
6279 echo "$ac_t""no" 1>&6
6283 echo $ac_n "checking termios vs. termio vs. sgtty""... $ac_c" 1>&6
6284 echo "configure:6285: checking termios vs. termio vs. sgtty" >&5
6285 if eval "test \"`echo '$''{'tcl_cv_api_serial'+set}'`\" = set"; then
6286 echo $ac_n "(cached) $ac_c" 1>&6
6289 if test "$cross_compiling" = yes; then
6290 tcl_cv_api_serial=no
6292 cat > conftest.$ac_ext <<EOF
6293 #line 6294 "configure"
6294 #include "confdefs.h"
6296 #include <termios.h>
6300 if (tcgetattr(0, &t) == 0) {
6302 t.c_cflag |= PARENB | PARODD | CSIZE | CSTOPB;
6308 if { (eval echo configure:6309: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6310 tcl_cv_api_serial=termios
6312 echo "configure: failed program was:" >&5
6313 cat conftest.$ac_ext >&5
6315 tcl_cv_api_serial=no
6320 if test $tcl_cv_api_serial = no ; then
6321 if test "$cross_compiling" = yes; then
6322 tcl_cv_api_serial=no
6324 cat > conftest.$ac_ext <<EOF
6325 #line 6326 "configure"
6326 #include "confdefs.h"
6332 if (ioctl(0, TCGETA, &t) == 0) {
6333 t.c_cflag |= CBAUD | PARENB | PARODD | CSIZE | CSTOPB;
6339 if { (eval echo configure:6340: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6341 tcl_cv_api_serial=termio
6343 echo "configure: failed program was:" >&5
6344 cat conftest.$ac_ext >&5
6346 tcl_cv_api_serial=no
6352 if test $tcl_cv_api_serial = no ; then
6353 if test "$cross_compiling" = yes; then
6354 tcl_cv_api_serial=no
6356 cat > conftest.$ac_ext <<EOF
6357 #line 6358 "configure"
6358 #include "confdefs.h"
6364 if (ioctl(0, TIOCGETP, &t) == 0) {
6366 t.sg_flags |= ODDP | EVENP | RAW;
6372 if { (eval echo configure:6373: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6374 tcl_cv_api_serial=sgtty
6376 echo "configure: failed program was:" >&5
6377 cat conftest.$ac_ext >&5
6379 tcl_cv_api_serial=no
6385 if test $tcl_cv_api_serial = no ; then
6386 if test "$cross_compiling" = yes; then
6387 tcl_cv_api_serial=no
6389 cat > conftest.$ac_ext <<EOF
6390 #line 6391 "configure"
6391 #include "confdefs.h"
6393 #include <termios.h>
6398 if (tcgetattr(0, &t) == 0
6399 || errno == ENOTTY || errno == ENXIO || errno == EINVAL) {
6401 t.c_cflag |= PARENB | PARODD | CSIZE | CSTOPB;
6407 if { (eval echo configure:6408: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6409 tcl_cv_api_serial=termios
6411 echo "configure: failed program was:" >&5
6412 cat conftest.$ac_ext >&5
6414 tcl_cv_api_serial=no
6420 if test $tcl_cv_api_serial = no; then
6421 if test "$cross_compiling" = yes; then
6422 tcl_cv_api_serial=no
6424 cat > conftest.$ac_ext <<EOF
6425 #line 6426 "configure"
6426 #include "confdefs.h"
6433 if (ioctl(0, TCGETA, &t) == 0
6434 || errno == ENOTTY || errno == ENXIO || errno == EINVAL) {
6435 t.c_cflag |= CBAUD | PARENB | PARODD | CSIZE | CSTOPB;
6441 if { (eval echo configure:6442: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6443 tcl_cv_api_serial=termio
6445 echo "configure: failed program was:" >&5
6446 cat conftest.$ac_ext >&5
6448 tcl_cv_api_serial=no
6454 if test $tcl_cv_api_serial = no; then
6455 if test "$cross_compiling" = yes; then
6456 tcl_cv_api_serial=none
6458 cat > conftest.$ac_ext <<EOF
6459 #line 6460 "configure"
6460 #include "confdefs.h"
6467 if (ioctl(0, TIOCGETP, &t) == 0
6468 || errno == ENOTTY || errno == ENXIO || errno == EINVAL) {
6470 t.sg_flags |= ODDP | EVENP | RAW;
6476 if { (eval echo configure:6477: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6478 tcl_cv_api_serial=sgtty
6480 echo "configure: failed program was:" >&5
6481 cat conftest.$ac_ext >&5
6483 tcl_cv_api_serial=none
6491 echo "$ac_t""$tcl_cv_api_serial" 1>&6
6492 case $tcl_cv_api_serial in
6493 termios) cat >> confdefs.h <<\EOF
6494 #define USE_TERMIOS 1
6497 termio) cat >> confdefs.h <<\EOF
6498 #define USE_TERMIO 1
6501 sgtty) cat >> confdefs.h <<\EOF
6508 #--------------------------------------------------------------------
6509 # Include sys/select.h if it exists and if it supplies things
6510 # that appear to be useful and aren't already in sys/types.h.
6511 # This appears to be true only on the RS/6000 under AIX. Some
6512 # systems like OSF/1 have a sys/select.h that's of no use, and
6513 # other systems like SCO UNIX have a sys/select.h that's
6514 # pernicious. If "fd_set" isn't defined anywhere then set a
6516 #--------------------------------------------------------------------
6518 echo $ac_n "checking for fd_set in sys/types""... $ac_c" 1>&6
6519 echo "configure:6520: checking for fd_set in sys/types" >&5
6520 if eval "test \"`echo '$''{'tcl_cv_type_fd_set'+set}'`\" = set"; then
6521 echo $ac_n "(cached) $ac_c" 1>&6
6524 cat > conftest.$ac_ext <<EOF
6525 #line 6526 "configure"
6526 #include "confdefs.h"
6527 #include <sys/types.h>
6529 fd_set readMask, writeMask;
6532 if { (eval echo configure:6533: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6534 tcl_cv_type_fd_set=yes
6536 echo "configure: failed program was:" >&5
6537 cat conftest.$ac_ext >&5
6539 tcl_cv_type_fd_set=no
6544 echo "$ac_t""$tcl_cv_type_fd_set" 1>&6
6545 tcl_ok=$tcl_cv_type_fd_set
6546 if test $tcl_ok = no; then
6547 echo $ac_n "checking for fd_mask in sys/select""... $ac_c" 1>&6
6548 echo "configure:6549: checking for fd_mask in sys/select" >&5
6549 if eval "test \"`echo '$''{'tcl_cv_grep_fd_mask'+set}'`\" = set"; then
6550 echo $ac_n "(cached) $ac_c" 1>&6
6553 cat > conftest.$ac_ext <<EOF
6554 #line 6555 "configure"
6555 #include "confdefs.h"
6556 #include <sys/select.h>
6558 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6559 egrep "fd_mask" >/dev/null 2>&1; then
6561 tcl_cv_grep_fd_mask=present
6564 tcl_cv_grep_fd_mask=missing
6570 echo "$ac_t""$tcl_cv_grep_fd_mask" 1>&6
6571 if test $tcl_cv_grep_fd_mask = present; then
6572 cat >> confdefs.h <<\EOF
6573 #define HAVE_SYS_SELECT_H 1
6579 if test $tcl_ok = no; then
6580 cat >> confdefs.h <<\EOF
6586 #------------------------------------------------------------------------------
6587 # Find out all about time handling differences.
6588 #------------------------------------------------------------------------------
6590 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
6591 echo "configure:6592: checking whether struct tm is in sys/time.h or time.h" >&5
6592 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
6593 echo $ac_n "(cached) $ac_c" 1>&6
6595 cat > conftest.$ac_ext <<EOF
6596 #line 6597 "configure"
6597 #include "confdefs.h"
6598 #include <sys/types.h>
6601 struct tm *tp; tp->tm_sec;
6604 if { (eval echo configure:6605: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6606 ac_cv_struct_tm=time.h
6608 echo "configure: failed program was:" >&5
6609 cat conftest.$ac_ext >&5
6611 ac_cv_struct_tm=sys/time.h
6616 echo "$ac_t""$ac_cv_struct_tm" 1>&6
6617 if test $ac_cv_struct_tm = sys/time.h; then
6618 cat >> confdefs.h <<\EOF
6619 #define TM_IN_SYS_TIME 1
6625 for ac_hdr in sys/time.h
6627 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6628 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6629 echo "configure:6630: checking for $ac_hdr" >&5
6630 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6631 echo $ac_n "(cached) $ac_c" 1>&6
6633 cat > conftest.$ac_ext <<EOF
6634 #line 6635 "configure"
6635 #include "confdefs.h"
6638 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6639 { (eval echo configure:6640: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6640 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6641 if test -z "$ac_err"; then
6643 eval "ac_cv_header_$ac_safe=yes"
6646 echo "configure: failed program was:" >&5
6647 cat conftest.$ac_ext >&5
6649 eval "ac_cv_header_$ac_safe=no"
6653 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6654 echo "$ac_t""yes" 1>&6
6655 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6656 cat >> confdefs.h <<EOF
6657 #define $ac_tr_hdr 1
6661 echo "$ac_t""no" 1>&6
6665 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
6666 echo "configure:6667: checking whether time.h and sys/time.h may both be included" >&5
6667 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
6668 echo $ac_n "(cached) $ac_c" 1>&6
6670 cat > conftest.$ac_ext <<EOF
6671 #line 6672 "configure"
6672 #include "confdefs.h"
6673 #include <sys/types.h>
6674 #include <sys/time.h>
6680 if { (eval echo configure:6681: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6682 ac_cv_header_time=yes
6684 echo "configure: failed program was:" >&5
6685 cat conftest.$ac_ext >&5
6687 ac_cv_header_time=no
6692 echo "$ac_t""$ac_cv_header_time" 1>&6
6693 if test $ac_cv_header_time = yes; then
6694 cat >> confdefs.h <<\EOF
6695 #define TIME_WITH_SYS_TIME 1
6700 echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
6701 echo "configure:6702: checking for tm_zone in struct tm" >&5
6702 if eval "test \"`echo '$''{'ac_cv_struct_tm_zone'+set}'`\" = set"; then
6703 echo $ac_n "(cached) $ac_c" 1>&6
6705 cat > conftest.$ac_ext <<EOF
6706 #line 6707 "configure"
6707 #include "confdefs.h"
6708 #include <sys/types.h>
6709 #include <$ac_cv_struct_tm>
6711 struct tm tm; tm.tm_zone;
6714 if { (eval echo configure:6715: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6716 ac_cv_struct_tm_zone=yes
6718 echo "configure: failed program was:" >&5
6719 cat conftest.$ac_ext >&5
6721 ac_cv_struct_tm_zone=no
6726 echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
6727 if test "$ac_cv_struct_tm_zone" = yes; then
6728 cat >> confdefs.h <<\EOF
6729 #define HAVE_TM_ZONE 1
6733 echo $ac_n "checking for tzname""... $ac_c" 1>&6
6734 echo "configure:6735: checking for tzname" >&5
6735 if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then
6736 echo $ac_n "(cached) $ac_c" 1>&6
6738 cat > conftest.$ac_ext <<EOF
6739 #line 6740 "configure"
6740 #include "confdefs.h"
6742 #ifndef tzname /* For SGI. */
6743 extern char *tzname[]; /* RS6000 and others reject char **tzname. */
6749 if { (eval echo configure:6750: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6751 ac_cv_var_tzname=yes
6753 echo "configure: failed program was:" >&5
6754 cat conftest.$ac_ext >&5
6761 echo "$ac_t""$ac_cv_var_tzname" 1>&6
6762 if test $ac_cv_var_tzname = yes; then
6763 cat >> confdefs.h <<\EOF
6764 #define HAVE_TZNAME 1
6771 for ac_func in gmtime_r localtime_r
6773 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6774 echo "configure:6775: checking for $ac_func" >&5
6775 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6776 echo $ac_n "(cached) $ac_c" 1>&6
6778 cat > conftest.$ac_ext <<EOF
6779 #line 6780 "configure"
6780 #include "confdefs.h"
6781 /* System header to define __stub macros and hopefully few prototypes,
6782 which can conflict with char $ac_func(); below. */
6784 /* Override any gcc2 internal prototype to avoid an error. */
6785 /* We use char because int might match the return type of a gcc2
6786 builtin and then its argument prototype would still apply. */
6791 /* The GNU C library defines this for functions which it implements
6792 to always fail with ENOSYS. Some functions are actually named
6793 something starting with __ and the normal name is an alias. */
6794 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6802 if { (eval echo configure:6803: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6804 eval "ac_cv_func_$ac_func=yes"
6806 echo "configure: failed program was:" >&5
6807 cat conftest.$ac_ext >&5
6809 eval "ac_cv_func_$ac_func=no"
6814 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6815 echo "$ac_t""yes" 1>&6
6816 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6817 cat >> confdefs.h <<EOF
6818 #define $ac_tr_func 1
6822 echo "$ac_t""no" 1>&6
6827 echo $ac_n "checking tm_tzadj in struct tm""... $ac_c" 1>&6
6828 echo "configure:6829: checking tm_tzadj in struct tm" >&5
6829 if eval "test \"`echo '$''{'tcl_cv_member_tm_tzadj'+set}'`\" = set"; then
6830 echo $ac_n "(cached) $ac_c" 1>&6
6833 cat > conftest.$ac_ext <<EOF
6834 #line 6835 "configure"
6835 #include "confdefs.h"
6838 struct tm tm; tm.tm_tzadj;
6841 if { (eval echo configure:6842: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6843 tcl_cv_member_tm_tzadj=yes
6845 echo "configure: failed program was:" >&5
6846 cat conftest.$ac_ext >&5
6848 tcl_cv_member_tm_tzadj=no
6853 echo "$ac_t""$tcl_cv_member_tm_tzadj" 1>&6
6854 if test $tcl_cv_member_tm_tzadj = yes ; then
6855 cat >> confdefs.h <<\EOF
6856 #define HAVE_TM_TZADJ 1
6861 echo $ac_n "checking tm_gmtoff in struct tm""... $ac_c" 1>&6
6862 echo "configure:6863: checking tm_gmtoff in struct tm" >&5
6863 if eval "test \"`echo '$''{'tcl_cv_member_tm_gmtoff'+set}'`\" = set"; then
6864 echo $ac_n "(cached) $ac_c" 1>&6
6867 cat > conftest.$ac_ext <<EOF
6868 #line 6869 "configure"
6869 #include "confdefs.h"
6872 struct tm tm; tm.tm_gmtoff;
6875 if { (eval echo configure:6876: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6877 tcl_cv_member_tm_gmtoff=yes
6879 echo "configure: failed program was:" >&5
6880 cat conftest.$ac_ext >&5
6882 tcl_cv_member_tm_gmtoff=no
6887 echo "$ac_t""$tcl_cv_member_tm_gmtoff" 1>&6
6888 if test $tcl_cv_member_tm_gmtoff = yes ; then
6889 cat >> confdefs.h <<\EOF
6890 #define HAVE_TM_GMTOFF 1
6896 # Its important to include time.h in this check, as some systems
6897 # (like convex) have timezone functions, etc.
6899 echo $ac_n "checking long timezone variable""... $ac_c" 1>&6
6900 echo "configure:6901: checking long timezone variable" >&5
6901 if eval "test \"`echo '$''{'tcl_cv_timezone_long'+set}'`\" = set"; then
6902 echo $ac_n "(cached) $ac_c" 1>&6
6905 cat > conftest.$ac_ext <<EOF
6906 #line 6907 "configure"
6907 #include "confdefs.h"
6910 extern long timezone;
6915 if { (eval echo configure:6916: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6917 tcl_cv_timezone_long=yes
6919 echo "configure: failed program was:" >&5
6920 cat conftest.$ac_ext >&5
6922 tcl_cv_timezone_long=no
6927 echo "$ac_t""$tcl_cv_timezone_long" 1>&6
6928 if test $tcl_cv_timezone_long = yes ; then
6929 cat >> confdefs.h <<\EOF
6930 #define HAVE_TIMEZONE_VAR 1
6935 # On some systems (eg IRIX 6.2), timezone is a time_t and not a long.
6937 echo $ac_n "checking time_t timezone variable""... $ac_c" 1>&6
6938 echo "configure:6939: checking time_t timezone variable" >&5
6939 if eval "test \"`echo '$''{'tcl_cv_timezone_time'+set}'`\" = set"; then
6940 echo $ac_n "(cached) $ac_c" 1>&6
6943 cat > conftest.$ac_ext <<EOF
6944 #line 6945 "configure"
6945 #include "confdefs.h"
6948 extern time_t timezone;
6953 if { (eval echo configure:6954: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6955 tcl_cv_timezone_time=yes
6957 echo "configure: failed program was:" >&5
6958 cat conftest.$ac_ext >&5
6960 tcl_cv_timezone_time=no
6965 echo "$ac_t""$tcl_cv_timezone_time" 1>&6
6966 if test $tcl_cv_timezone_time = yes ; then
6967 cat >> confdefs.h <<\EOF
6968 #define HAVE_TIMEZONE_VAR 1
6975 #--------------------------------------------------------------------
6976 # Some systems (e.g., IRIX 4.0.5) lack the st_blksize field
6977 # in struct stat. But we might be able to use fstatfs instead.
6978 #--------------------------------------------------------------------
6979 echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6
6980 echo "configure:6981: checking for st_blksize in struct stat" >&5
6981 if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then
6982 echo $ac_n "(cached) $ac_c" 1>&6
6984 cat > conftest.$ac_ext <<EOF
6985 #line 6986 "configure"
6986 #include "confdefs.h"
6987 #include <sys/types.h>
6988 #include <sys/stat.h>
6990 struct stat s; s.st_blksize;
6993 if { (eval echo configure:6994: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6995 ac_cv_struct_st_blksize=yes
6997 echo "configure: failed program was:" >&5
6998 cat conftest.$ac_ext >&5
7000 ac_cv_struct_st_blksize=no
7005 echo "$ac_t""$ac_cv_struct_st_blksize" 1>&6
7006 if test $ac_cv_struct_st_blksize = yes; then
7007 cat >> confdefs.h <<\EOF
7008 #define HAVE_ST_BLKSIZE 1
7013 echo $ac_n "checking for fstatfs""... $ac_c" 1>&6
7014 echo "configure:7015: checking for fstatfs" >&5
7015 if eval "test \"`echo '$''{'ac_cv_func_fstatfs'+set}'`\" = set"; then
7016 echo $ac_n "(cached) $ac_c" 1>&6
7018 cat > conftest.$ac_ext <<EOF
7019 #line 7020 "configure"
7020 #include "confdefs.h"
7021 /* System header to define __stub macros and hopefully few prototypes,
7022 which can conflict with char fstatfs(); below. */
7024 /* Override any gcc2 internal prototype to avoid an error. */
7025 /* We use char because int might match the return type of a gcc2
7026 builtin and then its argument prototype would still apply. */
7031 /* The GNU C library defines this for functions which it implements
7032 to always fail with ENOSYS. Some functions are actually named
7033 something starting with __ and the normal name is an alias. */
7034 #if defined (__stub_fstatfs) || defined (__stub___fstatfs)
7042 if { (eval echo configure:7043: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7044 eval "ac_cv_func_fstatfs=yes"
7046 echo "configure: failed program was:" >&5
7047 cat conftest.$ac_ext >&5
7049 eval "ac_cv_func_fstatfs=no"
7054 if eval "test \"`echo '$ac_cv_func_'fstatfs`\" = yes"; then
7055 echo "$ac_t""yes" 1>&6
7058 echo "$ac_t""no" 1>&6
7059 cat >> confdefs.h <<\EOF
7060 #define NO_FSTATFS 1
7066 #--------------------------------------------------------------------
7067 # Some system have no memcmp or it does not work with 8 bit
7068 # data, this checks it and add memcmp.o to LIBOBJS if needed
7069 #--------------------------------------------------------------------
7070 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
7071 echo "configure:7072: checking for 8-bit clean memcmp" >&5
7072 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then
7073 echo $ac_n "(cached) $ac_c" 1>&6
7075 if test "$cross_compiling" = yes; then
7076 ac_cv_func_memcmp_clean=no
7078 cat > conftest.$ac_ext <<EOF
7079 #line 7080 "configure"
7080 #include "confdefs.h"
7084 char c0 = 0x40, c1 = 0x80, c2 = 0x81;
7085 exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
7089 if { (eval echo configure:7090: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7091 ac_cv_func_memcmp_clean=yes
7093 echo "configure: failed program was:" >&5
7094 cat conftest.$ac_ext >&5
7096 ac_cv_func_memcmp_clean=no
7103 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
7104 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
7107 #--------------------------------------------------------------------
7108 # Some system like SunOS 4 and other BSD like systems
7109 # have no memmove (we assume they have bcopy instead).
7110 # {The replacement define is in compat/string.h}
7111 #--------------------------------------------------------------------
7112 echo $ac_n "checking for memmove""... $ac_c" 1>&6
7113 echo "configure:7114: checking for memmove" >&5
7114 if eval "test \"`echo '$''{'ac_cv_func_memmove'+set}'`\" = set"; then
7115 echo $ac_n "(cached) $ac_c" 1>&6
7117 cat > conftest.$ac_ext <<EOF
7118 #line 7119 "configure"
7119 #include "confdefs.h"
7120 /* System header to define __stub macros and hopefully few prototypes,
7121 which can conflict with char memmove(); below. */
7123 /* Override any gcc2 internal prototype to avoid an error. */
7124 /* We use char because int might match the return type of a gcc2
7125 builtin and then its argument prototype would still apply. */
7130 /* The GNU C library defines this for functions which it implements
7131 to always fail with ENOSYS. Some functions are actually named
7132 something starting with __ and the normal name is an alias. */
7133 #if defined (__stub_memmove) || defined (__stub___memmove)
7141 if { (eval echo configure:7142: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7143 eval "ac_cv_func_memmove=yes"
7145 echo "configure: failed program was:" >&5
7146 cat conftest.$ac_ext >&5
7148 eval "ac_cv_func_memmove=no"
7153 if eval "test \"`echo '$ac_cv_func_'memmove`\" = yes"; then
7154 echo "$ac_t""yes" 1>&6
7157 echo "$ac_t""no" 1>&6
7158 cat >> confdefs.h <<\EOF
7159 #define NO_MEMMOVE 1
7161 cat >> confdefs.h <<\EOF
7162 #define NO_STRING_H 1
7168 #--------------------------------------------------------------------
7169 # On some systems strstr is broken: it returns a pointer even
7170 # even if the original string is empty.
7171 #--------------------------------------------------------------------
7172 if test "x${ac_cv_func_strstr}" = "xyes"; then
7173 echo $ac_n "checking proper strstr implementation""... $ac_c" 1>&6
7174 echo "configure:7175: checking proper strstr implementation" >&5
7175 if eval "test \"`echo '$''{'tcl_cv_strstr_unbroken'+set}'`\" = set"; then
7176 echo $ac_n "(cached) $ac_c" 1>&6
7179 if test "$cross_compiling" = yes; then
7180 tcl_cv_strstr_unbroken=broken
7182 cat > conftest.$ac_ext <<EOF
7183 #line 7184 "configure"
7184 #include "confdefs.h"
7186 extern int strstr();
7189 exit(strstr("\0test", "test") ? 1 : 0);
7192 if { (eval echo configure:7193: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7194 tcl_cv_strstr_unbroken=ok
7196 echo "configure: failed program was:" >&5
7197 cat conftest.$ac_ext >&5
7199 tcl_cv_strstr_unbroken=broken
7206 echo "$ac_t""$tcl_cv_strstr_unbroken" 1>&6
7207 if test $tcl_cv_strstr_unbroken = broken; then
7208 LIBOBJS="$LIBOBJS strstr.o"
7212 #--------------------------------------------------------------------
7213 # Check for strtoul function. This is tricky because under some
7214 # versions of AIX strtoul returns an incorrect terminator
7215 # pointer for the string "0".
7216 #--------------------------------------------------------------------
7218 echo $ac_n "checking for strtoul""... $ac_c" 1>&6
7219 echo "configure:7220: checking for strtoul" >&5
7220 if eval "test \"`echo '$''{'ac_cv_func_strtoul'+set}'`\" = set"; then
7221 echo $ac_n "(cached) $ac_c" 1>&6
7223 cat > conftest.$ac_ext <<EOF
7224 #line 7225 "configure"
7225 #include "confdefs.h"
7226 /* System header to define __stub macros and hopefully few prototypes,
7227 which can conflict with char strtoul(); below. */
7229 /* Override any gcc2 internal prototype to avoid an error. */
7230 /* We use char because int might match the return type of a gcc2
7231 builtin and then its argument prototype would still apply. */
7236 /* The GNU C library defines this for functions which it implements
7237 to always fail with ENOSYS. Some functions are actually named
7238 something starting with __ and the normal name is an alias. */
7239 #if defined (__stub_strtoul) || defined (__stub___strtoul)
7247 if { (eval echo configure:7248: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7249 eval "ac_cv_func_strtoul=yes"
7251 echo "configure: failed program was:" >&5
7252 cat conftest.$ac_ext >&5
7254 eval "ac_cv_func_strtoul=no"
7259 if eval "test \"`echo '$ac_cv_func_'strtoul`\" = yes"; then
7260 echo "$ac_t""yes" 1>&6
7263 echo "$ac_t""no" 1>&6
7267 if test $tcl_ok = 1; then
7268 echo $ac_n "checking proper strtoul implementation""... $ac_c" 1>&6
7269 echo "configure:7270: checking proper strtoul implementation" >&5
7270 if eval "test \"`echo '$''{'tcl_cv_strtoul_unbroken'+set}'`\" = set"; then
7271 echo $ac_n "(cached) $ac_c" 1>&6
7274 if test "$cross_compiling" = yes; then
7275 tcl_cv_strtoul_unbroken=broken
7277 cat > conftest.$ac_ext <<EOF
7278 #line 7279 "configure"
7279 #include "confdefs.h"
7281 extern int strtoul();
7287 value = strtoul(string, &term, 0);
7288 if ((value != 0) || (term != (string+1))) {
7294 if { (eval echo configure:7295: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7296 tcl_cv_strtoul_unbroken=ok
7298 echo "configure: failed program was:" >&5
7299 cat conftest.$ac_ext >&5
7301 tcl_cv_strtoul_unbroken=broken
7308 echo "$ac_t""$tcl_cv_strtoul_unbroken" 1>&6
7309 if test $tcl_cv_strtoul_unbroken = broken; then
7313 if test $tcl_ok = 0; then
7314 LIBOBJS="$LIBOBJS strtoul.o"
7317 #--------------------------------------------------------------------
7318 # Check for the strtod function. This is tricky because in some
7319 # versions of Linux strtod mis-parses strings starting with "+".
7320 #--------------------------------------------------------------------
7322 echo $ac_n "checking for strtod""... $ac_c" 1>&6
7323 echo "configure:7324: checking for strtod" >&5
7324 if eval "test \"`echo '$''{'ac_cv_func_strtod'+set}'`\" = set"; then
7325 echo $ac_n "(cached) $ac_c" 1>&6
7327 cat > conftest.$ac_ext <<EOF
7328 #line 7329 "configure"
7329 #include "confdefs.h"
7330 /* System header to define __stub macros and hopefully few prototypes,
7331 which can conflict with char strtod(); below. */
7333 /* Override any gcc2 internal prototype to avoid an error. */
7334 /* We use char because int might match the return type of a gcc2
7335 builtin and then its argument prototype would still apply. */
7340 /* The GNU C library defines this for functions which it implements
7341 to always fail with ENOSYS. Some functions are actually named
7342 something starting with __ and the normal name is an alias. */
7343 #if defined (__stub_strtod) || defined (__stub___strtod)
7351 if { (eval echo configure:7352: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7353 eval "ac_cv_func_strtod=yes"
7355 echo "configure: failed program was:" >&5
7356 cat conftest.$ac_ext >&5
7358 eval "ac_cv_func_strtod=no"
7363 if eval "test \"`echo '$ac_cv_func_'strtod`\" = yes"; then
7364 echo "$ac_t""yes" 1>&6
7367 echo "$ac_t""no" 1>&6
7371 if test $tcl_ok = 1; then
7372 echo $ac_n "checking proper strtod implementation""... $ac_c" 1>&6
7373 echo "configure:7374: checking proper strtod implementation" >&5
7374 if eval "test \"`echo '$''{'tcl_cv_strtod_unbroken'+set}'`\" = set"; then
7375 echo $ac_n "(cached) $ac_c" 1>&6
7378 if test "$cross_compiling" = yes; then
7379 tcl_cv_strtod_unbroken=broken
7381 cat > conftest.$ac_ext <<EOF
7382 #line 7383 "configure"
7383 #include "confdefs.h"
7385 extern double strtod();
7388 char *string = " +69";
7391 value = strtod(string, &term);
7392 if ((value != 69) || (term != (string+4))) {
7398 if { (eval echo configure:7399: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7400 tcl_cv_strtod_unbroken=ok
7402 echo "configure: failed program was:" >&5
7403 cat conftest.$ac_ext >&5
7405 tcl_cv_strtod_unbroken=broken
7412 echo "$ac_t""$tcl_cv_strtod_unbroken" 1>&6
7413 if test $tcl_cv_strtod_unbroken = broken; then
7417 if test $tcl_ok = 0; then
7418 LIBOBJS="$LIBOBJS strtod.o"
7421 #--------------------------------------------------------------------
7422 # Under Solaris 2.4, strtod returns the wrong value for the
7423 # terminating character under some conditions. Check for this
7424 # and if the problem exists use a substitute procedure
7425 # "fixstrtod" that corrects the error.
7426 #--------------------------------------------------------------------
7429 echo $ac_n "checking for strtod""... $ac_c" 1>&6
7430 echo "configure:7431: checking for strtod" >&5
7431 if eval "test \"`echo '$''{'ac_cv_func_strtod'+set}'`\" = set"; then
7432 echo $ac_n "(cached) $ac_c" 1>&6
7434 cat > conftest.$ac_ext <<EOF
7435 #line 7436 "configure"
7436 #include "confdefs.h"
7437 /* System header to define __stub macros and hopefully few prototypes,
7438 which can conflict with char strtod(); below. */
7440 /* Override any gcc2 internal prototype to avoid an error. */
7441 /* We use char because int might match the return type of a gcc2
7442 builtin and then its argument prototype would still apply. */
7447 /* The GNU C library defines this for functions which it implements
7448 to always fail with ENOSYS. Some functions are actually named
7449 something starting with __ and the normal name is an alias. */
7450 #if defined (__stub_strtod) || defined (__stub___strtod)
7458 if { (eval echo configure:7459: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7460 eval "ac_cv_func_strtod=yes"
7462 echo "configure: failed program was:" >&5
7463 cat conftest.$ac_ext >&5
7465 eval "ac_cv_func_strtod=no"
7470 if eval "test \"`echo '$ac_cv_func_'strtod`\" = yes"; then
7471 echo "$ac_t""yes" 1>&6
7474 echo "$ac_t""no" 1>&6
7478 if test "$tcl_strtod" = 1; then
7479 echo $ac_n "checking for Solaris2.4/Tru64 strtod bugs""... $ac_c" 1>&6
7480 echo "configure:7481: checking for Solaris2.4/Tru64 strtod bugs" >&5
7481 if eval "test \"`echo '$''{'tcl_cv_strtod_buggy'+set}'`\" = set"; then
7482 echo $ac_n "(cached) $ac_c" 1>&6
7485 if test "$cross_compiling" = yes; then
7486 tcl_cv_strtod_buggy=buggy
7488 cat > conftest.$ac_ext <<EOF
7489 #line 7490 "configure"
7490 #include "confdefs.h"
7492 extern double strtod();
7494 char *infString="Inf", *nanString="NaN", *spaceString=" ";
7497 value = strtod(infString, &term);
7498 if ((term != infString) && (term[-1] == 0)) {
7501 value = strtod(nanString, &term);
7502 if ((term != nanString) && (term[-1] == 0)) {
7505 value = strtod(spaceString, &term);
7506 if (term == (spaceString+1)) {
7512 if { (eval echo configure:7513: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7514 tcl_cv_strtod_buggy=ok
7516 echo "configure: failed program was:" >&5
7517 cat conftest.$ac_ext >&5
7519 tcl_cv_strtod_buggy=buggy
7526 echo "$ac_t""$tcl_cv_strtod_buggy" 1>&6
7527 if test "$tcl_cv_strtod_buggy" = buggy; then
7528 LIBOBJS="$LIBOBJS fixstrtod.o"
7529 cat >> confdefs.h <<\EOF
7530 #define strtod fixstrtod
7537 #--------------------------------------------------------------------
7538 # Check for various typedefs and provide substitutes if
7540 #--------------------------------------------------------------------
7542 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
7543 echo "configure:7544: checking for ANSI C header files" >&5
7544 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
7545 echo $ac_n "(cached) $ac_c" 1>&6
7547 cat > conftest.$ac_ext <<EOF
7548 #line 7549 "configure"
7549 #include "confdefs.h"
7555 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7556 { (eval echo configure:7557: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7557 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7558 if test -z "$ac_err"; then
7560 ac_cv_header_stdc=yes
7563 echo "configure: failed program was:" >&5
7564 cat conftest.$ac_ext >&5
7566 ac_cv_header_stdc=no
7570 if test $ac_cv_header_stdc = yes; then
7571 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
7572 cat > conftest.$ac_ext <<EOF
7573 #line 7574 "configure"
7574 #include "confdefs.h"
7577 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7578 egrep "memchr" >/dev/null 2>&1; then
7582 ac_cv_header_stdc=no
7588 if test $ac_cv_header_stdc = yes; then
7589 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
7590 cat > conftest.$ac_ext <<EOF
7591 #line 7592 "configure"
7592 #include "confdefs.h"
7595 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7596 egrep "free" >/dev/null 2>&1; then
7600 ac_cv_header_stdc=no
7606 if test $ac_cv_header_stdc = yes; then
7607 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
7608 if test "$cross_compiling" = yes; then
7611 cat > conftest.$ac_ext <<EOF
7612 #line 7613 "configure"
7613 #include "confdefs.h"
7615 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7616 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7617 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7618 int main () { int i; for (i = 0; i < 256; i++)
7619 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
7623 if { (eval echo configure:7624: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7627 echo "configure: failed program was:" >&5
7628 cat conftest.$ac_ext >&5
7630 ac_cv_header_stdc=no
7638 echo "$ac_t""$ac_cv_header_stdc" 1>&6
7639 if test $ac_cv_header_stdc = yes; then
7640 cat >> confdefs.h <<\EOF
7641 #define STDC_HEADERS 1
7646 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
7647 echo "configure:7648: checking for mode_t" >&5
7648 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
7649 echo $ac_n "(cached) $ac_c" 1>&6
7651 cat > conftest.$ac_ext <<EOF
7652 #line 7653 "configure"
7653 #include "confdefs.h"
7654 #include <sys/types.h>
7660 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7661 egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
7663 ac_cv_type_mode_t=yes
7666 ac_cv_type_mode_t=no
7671 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
7672 if test $ac_cv_type_mode_t = no; then
7673 cat >> confdefs.h <<\EOF
7679 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
7680 echo "configure:7681: checking for pid_t" >&5
7681 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
7682 echo $ac_n "(cached) $ac_c" 1>&6
7684 cat > conftest.$ac_ext <<EOF
7685 #line 7686 "configure"
7686 #include "confdefs.h"
7687 #include <sys/types.h>
7693 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7694 egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
7696 ac_cv_type_pid_t=yes
7704 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
7705 if test $ac_cv_type_pid_t = no; then
7706 cat >> confdefs.h <<\EOF
7712 echo $ac_n "checking for size_t""... $ac_c" 1>&6
7713 echo "configure:7714: checking for size_t" >&5
7714 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
7715 echo $ac_n "(cached) $ac_c" 1>&6
7717 cat > conftest.$ac_ext <<EOF
7718 #line 7719 "configure"
7719 #include "confdefs.h"
7720 #include <sys/types.h>
7726 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7727 egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
7729 ac_cv_type_size_t=yes
7732 ac_cv_type_size_t=no
7737 echo "$ac_t""$ac_cv_type_size_t" 1>&6
7738 if test $ac_cv_type_size_t = no; then
7739 cat >> confdefs.h <<\EOF
7740 #define size_t unsigned
7745 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
7746 echo "configure:7747: checking for uid_t in sys/types.h" >&5
7747 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
7748 echo $ac_n "(cached) $ac_c" 1>&6
7750 cat > conftest.$ac_ext <<EOF
7751 #line 7752 "configure"
7752 #include "confdefs.h"
7753 #include <sys/types.h>
7755 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7756 egrep "uid_t" >/dev/null 2>&1; then
7758 ac_cv_type_uid_t=yes
7767 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
7768 if test $ac_cv_type_uid_t = no; then
7769 cat >> confdefs.h <<\EOF
7773 cat >> confdefs.h <<\EOF
7780 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
7781 echo "configure:7782: checking for socklen_t" >&5
7782 if eval "test \"`echo '$''{'ac_cv_type_socklen_t'+set}'`\" = set"; then
7783 echo $ac_n "(cached) $ac_c" 1>&6
7786 cat > conftest.$ac_ext <<EOF
7787 #line 7788 "configure"
7788 #include "confdefs.h"
7790 #include <sys/types.h>
7791 #include <sys/socket.h>
7798 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7799 egrep "(^|[^a-zA-Z_0-9])socklen_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
7801 ac_cv_type_socklen_t=yes
7804 ac_cv_type_socklen_t=no
7810 echo "$ac_t""$ac_cv_type_socklen_t" 1>&6
7811 if test $ac_cv_type_socklen_t = no; then
7812 cat >> confdefs.h <<\EOF
7813 #define socklen_t unsigned
7818 #--------------------------------------------------------------------
7819 # If a system doesn't have an opendir function (man, that's old!)
7820 # then we have to supply a different version of dirent.h which
7821 # is compatible with the substitute version of opendir that's
7822 # provided. This version only works with V7-style directories.
7823 #--------------------------------------------------------------------
7825 echo $ac_n "checking for opendir""... $ac_c" 1>&6
7826 echo "configure:7827: checking for opendir" >&5
7827 if eval "test \"`echo '$''{'ac_cv_func_opendir'+set}'`\" = set"; then
7828 echo $ac_n "(cached) $ac_c" 1>&6
7830 cat > conftest.$ac_ext <<EOF
7831 #line 7832 "configure"
7832 #include "confdefs.h"
7833 /* System header to define __stub macros and hopefully few prototypes,
7834 which can conflict with char opendir(); below. */
7836 /* Override any gcc2 internal prototype to avoid an error. */
7837 /* We use char because int might match the return type of a gcc2
7838 builtin and then its argument prototype would still apply. */
7843 /* The GNU C library defines this for functions which it implements
7844 to always fail with ENOSYS. Some functions are actually named
7845 something starting with __ and the normal name is an alias. */
7846 #if defined (__stub_opendir) || defined (__stub___opendir)
7854 if { (eval echo configure:7855: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7856 eval "ac_cv_func_opendir=yes"
7858 echo "configure: failed program was:" >&5
7859 cat conftest.$ac_ext >&5
7861 eval "ac_cv_func_opendir=no"
7866 if eval "test \"`echo '$ac_cv_func_'opendir`\" = yes"; then
7867 echo "$ac_t""yes" 1>&6
7870 echo "$ac_t""no" 1>&6
7871 cat >> confdefs.h <<\EOF
7872 #define USE_DIRENT2_H 1
7878 #--------------------------------------------------------------------
7879 # The check below checks whether <sys/wait.h> defines the type
7880 # "union wait" correctly. It's needed because of weirdness in
7881 # HP-UX where "union wait" is defined in both the BSD and SYS-V
7882 # environments. Checking the usability of WIFEXITED seems to do
7884 #--------------------------------------------------------------------
7886 echo $ac_n "checking union wait""... $ac_c" 1>&6
7887 echo "configure:7888: checking union wait" >&5
7888 if eval "test \"`echo '$''{'tcl_cv_union_wait'+set}'`\" = set"; then
7889 echo $ac_n "(cached) $ac_c" 1>&6
7892 cat > conftest.$ac_ext <<EOF
7893 #line 7894 "configure"
7894 #include "confdefs.h"
7895 #include <sys/types.h>
7896 #include <sys/wait.h>
7900 WIFEXITED(x); /* Generates compiler error if WIFEXITED
7905 if { (eval echo configure:7906: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7907 tcl_cv_union_wait=yes
7909 echo "configure: failed program was:" >&5
7910 cat conftest.$ac_ext >&5
7912 tcl_cv_union_wait=no
7917 echo "$ac_t""$tcl_cv_union_wait" 1>&6
7918 if test $tcl_cv_union_wait = no; then
7919 cat >> confdefs.h <<\EOF
7920 #define NO_UNION_WAIT 1
7925 #--------------------------------------------------------------------
7926 # Check whether there is an strncasecmp function on this system.
7927 # This is a bit tricky because under SCO it's in -lsocket and
7928 # under Sequent Dynix it's in -linet.
7929 #--------------------------------------------------------------------
7931 echo $ac_n "checking for strncasecmp""... $ac_c" 1>&6
7932 echo "configure:7933: checking for strncasecmp" >&5
7933 if eval "test \"`echo '$''{'ac_cv_func_strncasecmp'+set}'`\" = set"; then
7934 echo $ac_n "(cached) $ac_c" 1>&6
7936 cat > conftest.$ac_ext <<EOF
7937 #line 7938 "configure"
7938 #include "confdefs.h"
7939 /* System header to define __stub macros and hopefully few prototypes,
7940 which can conflict with char strncasecmp(); below. */
7942 /* Override any gcc2 internal prototype to avoid an error. */
7943 /* We use char because int might match the return type of a gcc2
7944 builtin and then its argument prototype would still apply. */
7949 /* The GNU C library defines this for functions which it implements
7950 to always fail with ENOSYS. Some functions are actually named
7951 something starting with __ and the normal name is an alias. */
7952 #if defined (__stub_strncasecmp) || defined (__stub___strncasecmp)
7960 if { (eval echo configure:7961: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7962 eval "ac_cv_func_strncasecmp=yes"
7964 echo "configure: failed program was:" >&5
7965 cat conftest.$ac_ext >&5
7967 eval "ac_cv_func_strncasecmp=no"
7972 if eval "test \"`echo '$ac_cv_func_'strncasecmp`\" = yes"; then
7973 echo "$ac_t""yes" 1>&6
7976 echo "$ac_t""no" 1>&6
7980 if test "$tcl_ok" = 0; then
7981 echo $ac_n "checking for strncasecmp in -lsocket""... $ac_c" 1>&6
7982 echo "configure:7983: checking for strncasecmp in -lsocket" >&5
7983 ac_lib_var=`echo socket'_'strncasecmp | sed 'y%./+-%__p_%'`
7984 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7985 echo $ac_n "(cached) $ac_c" 1>&6
7987 ac_save_LIBS="$LIBS"
7988 LIBS="-lsocket $LIBS"
7989 cat > conftest.$ac_ext <<EOF
7990 #line 7991 "configure"
7991 #include "confdefs.h"
7992 /* Override any gcc2 internal prototype to avoid an error. */
7993 /* We use char because int might match the return type of a gcc2
7994 builtin and then its argument prototype would still apply. */
8001 if { (eval echo configure:8002: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8003 eval "ac_cv_lib_$ac_lib_var=yes"
8005 echo "configure: failed program was:" >&5
8006 cat conftest.$ac_ext >&5
8008 eval "ac_cv_lib_$ac_lib_var=no"
8011 LIBS="$ac_save_LIBS"
8014 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8015 echo "$ac_t""yes" 1>&6
8018 echo "$ac_t""no" 1>&6
8023 if test "$tcl_ok" = 0; then
8024 echo $ac_n "checking for strncasecmp in -linet""... $ac_c" 1>&6
8025 echo "configure:8026: checking for strncasecmp in -linet" >&5
8026 ac_lib_var=`echo inet'_'strncasecmp | sed 'y%./+-%__p_%'`
8027 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8028 echo $ac_n "(cached) $ac_c" 1>&6
8030 ac_save_LIBS="$LIBS"
8032 cat > conftest.$ac_ext <<EOF
8033 #line 8034 "configure"
8034 #include "confdefs.h"
8035 /* Override any gcc2 internal prototype to avoid an error. */
8036 /* We use char because int might match the return type of a gcc2
8037 builtin and then its argument prototype would still apply. */
8044 if { (eval echo configure:8045: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8046 eval "ac_cv_lib_$ac_lib_var=yes"
8048 echo "configure: failed program was:" >&5
8049 cat conftest.$ac_ext >&5
8051 eval "ac_cv_lib_$ac_lib_var=no"
8054 LIBS="$ac_save_LIBS"
8057 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8058 echo "$ac_t""yes" 1>&6
8061 echo "$ac_t""no" 1>&6
8066 if test "$tcl_ok" = 0; then
8067 LIBOBJS="$LIBOBJS strncasecmp.o"
8070 #--------------------------------------------------------------------
8071 # The code below deals with several issues related to gettimeofday:
8072 # 1. Some systems don't provide a gettimeofday function at all
8073 # (set NO_GETTOD if this is the case).
8074 # 2. SGI systems don't use the BSD form of the gettimeofday function,
8075 # but they have a BSDgettimeofday function that can be used instead.
8076 # 3. See if gettimeofday is declared in the <sys/time.h> header file.
8077 # if not, set the GETTOD_NOT_DECLARED flag so that tclPort.h can
8079 #--------------------------------------------------------------------
8081 echo $ac_n "checking for BSDgettimeofday""... $ac_c" 1>&6
8082 echo "configure:8083: checking for BSDgettimeofday" >&5
8083 if eval "test \"`echo '$''{'ac_cv_func_BSDgettimeofday'+set}'`\" = set"; then
8084 echo $ac_n "(cached) $ac_c" 1>&6
8086 cat > conftest.$ac_ext <<EOF
8087 #line 8088 "configure"
8088 #include "confdefs.h"
8089 /* System header to define __stub macros and hopefully few prototypes,
8090 which can conflict with char BSDgettimeofday(); below. */
8092 /* Override any gcc2 internal prototype to avoid an error. */
8093 /* We use char because int might match the return type of a gcc2
8094 builtin and then its argument prototype would still apply. */
8095 char BSDgettimeofday();
8099 /* The GNU C library defines this for functions which it implements
8100 to always fail with ENOSYS. Some functions are actually named
8101 something starting with __ and the normal name is an alias. */
8102 #if defined (__stub_BSDgettimeofday) || defined (__stub___BSDgettimeofday)
8110 if { (eval echo configure:8111: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8112 eval "ac_cv_func_BSDgettimeofday=yes"
8114 echo "configure: failed program was:" >&5
8115 cat conftest.$ac_ext >&5
8117 eval "ac_cv_func_BSDgettimeofday=no"
8122 if eval "test \"`echo '$ac_cv_func_'BSDgettimeofday`\" = yes"; then
8123 echo "$ac_t""yes" 1>&6
8124 cat >> confdefs.h <<\EOF
8125 #define HAVE_BSDGETTIMEOFDAY 1
8129 echo "$ac_t""no" 1>&6
8131 echo $ac_n "checking for gettimeofday""... $ac_c" 1>&6
8132 echo "configure:8133: checking for gettimeofday" >&5
8133 if eval "test \"`echo '$''{'ac_cv_func_gettimeofday'+set}'`\" = set"; then
8134 echo $ac_n "(cached) $ac_c" 1>&6
8136 cat > conftest.$ac_ext <<EOF
8137 #line 8138 "configure"
8138 #include "confdefs.h"
8139 /* System header to define __stub macros and hopefully few prototypes,
8140 which can conflict with char gettimeofday(); below. */
8142 /* Override any gcc2 internal prototype to avoid an error. */
8143 /* We use char because int might match the return type of a gcc2
8144 builtin and then its argument prototype would still apply. */
8145 char gettimeofday();
8149 /* The GNU C library defines this for functions which it implements
8150 to always fail with ENOSYS. Some functions are actually named
8151 something starting with __ and the normal name is an alias. */
8152 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
8160 if { (eval echo configure:8161: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8162 eval "ac_cv_func_gettimeofday=yes"
8164 echo "configure: failed program was:" >&5
8165 cat conftest.$ac_ext >&5
8167 eval "ac_cv_func_gettimeofday=no"
8172 if eval "test \"`echo '$ac_cv_func_'gettimeofday`\" = yes"; then
8173 echo "$ac_t""yes" 1>&6
8176 echo "$ac_t""no" 1>&6
8177 cat >> confdefs.h <<\EOF
8186 echo $ac_n "checking for gettimeofday declaration""... $ac_c" 1>&6
8187 echo "configure:8188: checking for gettimeofday declaration" >&5
8188 if eval "test \"`echo '$''{'tcl_cv_grep_gettimeofday'+set}'`\" = set"; then
8189 echo $ac_n "(cached) $ac_c" 1>&6
8192 cat > conftest.$ac_ext <<EOF
8193 #line 8194 "configure"
8194 #include "confdefs.h"
8195 #include <sys/time.h>
8197 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8198 egrep "gettimeofday" >/dev/null 2>&1; then
8200 tcl_cv_grep_gettimeofday=present
8203 tcl_cv_grep_gettimeofday=missing
8209 echo "$ac_t""$tcl_cv_grep_gettimeofday" 1>&6
8210 if test $tcl_cv_grep_gettimeofday = missing ; then
8211 cat >> confdefs.h <<\EOF
8212 #define GETTOD_NOT_DECLARED 1
8217 #--------------------------------------------------------------------
8218 # The following code checks to see whether it is possible to get
8219 # signed chars on this platform. This is needed in order to
8220 # properly generate sign-extended ints from character values.
8221 #--------------------------------------------------------------------
8223 echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6
8224 echo "configure:8225: checking whether char is unsigned" >&5
8225 if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then
8226 echo $ac_n "(cached) $ac_c" 1>&6
8228 if test "$GCC" = yes; then
8229 # GCC predefines this symbol on systems where it applies.
8230 cat > conftest.$ac_ext <<EOF
8231 #line 8232 "configure"
8232 #include "confdefs.h"
8233 #ifdef __CHAR_UNSIGNED__
8238 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8239 egrep "yes" >/dev/null 2>&1; then
8241 ac_cv_c_char_unsigned=yes
8244 ac_cv_c_char_unsigned=no
8249 if test "$cross_compiling" = yes; then
8250 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
8252 cat > conftest.$ac_ext <<EOF
8253 #line 8254 "configure"
8254 #include "confdefs.h"
8255 /* volatile prevents gcc2 from optimizing the test away on sparcs. */
8256 #if !defined(__STDC__) || __STDC__ != 1
8260 volatile char c = 255; exit(c < 0);
8263 if { (eval echo configure:8264: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8265 ac_cv_c_char_unsigned=yes
8267 echo "configure: failed program was:" >&5
8268 cat conftest.$ac_ext >&5
8270 ac_cv_c_char_unsigned=no
8278 echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6
8279 if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
8280 cat >> confdefs.h <<\EOF
8281 #define __CHAR_UNSIGNED__ 1
8286 echo $ac_n "checking signed char declarations""... $ac_c" 1>&6
8287 echo "configure:8288: checking signed char declarations" >&5
8288 if eval "test \"`echo '$''{'tcl_cv_char_signed'+set}'`\" = set"; then
8289 echo $ac_n "(cached) $ac_c" 1>&6
8292 cat > conftest.$ac_ext <<EOF
8293 #line 8294 "configure"
8294 #include "confdefs.h"
8303 if { (eval echo configure:8304: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8305 tcl_cv_char_signed=yes
8307 echo "configure: failed program was:" >&5
8308 cat conftest.$ac_ext >&5
8310 tcl_cv_char_signed=no
8315 echo "$ac_t""$tcl_cv_char_signed" 1>&6
8316 if test $tcl_cv_char_signed = yes; then
8317 cat >> confdefs.h <<\EOF
8318 #define HAVE_SIGNED_CHAR 1
8323 #--------------------------------------------------------------------
8324 # Does putenv() copy or not? We need to know to avoid memory leaks.
8325 #--------------------------------------------------------------------
8327 echo $ac_n "checking for a putenv() that copies the buffer""... $ac_c" 1>&6
8328 echo "configure:8329: checking for a putenv() that copies the buffer" >&5
8329 if eval "test \"`echo '$''{'tcl_cv_putenv_copy'+set}'`\" = set"; then
8330 echo $ac_n "(cached) $ac_c" 1>&6
8333 if test "$cross_compiling" = yes; then
8334 tcl_cv_putenv_copy=no
8336 cat > conftest.$ac_ext <<EOF
8337 #line 8338 "configure"
8338 #include "confdefs.h"
8341 #define OURVAR "havecopy=yes"
8342 int main (int argc, char *argv[])
8345 foo = (char *)strdup(OURVAR);
8347 strcpy((char *)(strchr(foo, '=') + 1), "no");
8348 bar = getenv("havecopy");
8349 if (!strcmp(bar, "no")) {
8359 if { (eval echo configure:8360: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8361 tcl_cv_putenv_copy=no
8363 echo "configure: failed program was:" >&5
8364 cat conftest.$ac_ext >&5
8366 tcl_cv_putenv_copy=yes
8373 echo "$ac_t""$tcl_cv_putenv_copy" 1>&6
8374 if test $tcl_cv_putenv_copy = yes; then
8375 cat >> confdefs.h <<\EOF
8376 #define HAVE_PUTENV_THAT_COPIES 1
8381 #--------------------------------------------------------------------
8382 # Check for support of nl_langinfo function
8383 #--------------------------------------------------------------------
8386 # Check whether --enable-langinfo or --disable-langinfo was given.
8387 if test "${enable_langinfo+set}" = set; then
8388 enableval="$enable_langinfo"
8389 langinfo_ok=$enableval
8396 if test "$langinfo_ok" = "yes"; then
8397 ac_safe=`echo "langinfo.h" | sed 'y%./+-%__p_%'`
8398 echo $ac_n "checking for langinfo.h""... $ac_c" 1>&6
8399 echo "configure:8400: checking for langinfo.h" >&5
8400 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8401 echo $ac_n "(cached) $ac_c" 1>&6
8403 cat > conftest.$ac_ext <<EOF
8404 #line 8405 "configure"
8405 #include "confdefs.h"
8406 #include <langinfo.h>
8408 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8409 { (eval echo configure:8410: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8410 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8411 if test -z "$ac_err"; then
8413 eval "ac_cv_header_$ac_safe=yes"
8416 echo "configure: failed program was:" >&5
8417 cat conftest.$ac_ext >&5
8419 eval "ac_cv_header_$ac_safe=no"
8423 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8424 echo "$ac_t""yes" 1>&6
8427 echo "$ac_t""no" 1>&6
8432 echo $ac_n "checking whether to use nl_langinfo""... $ac_c" 1>&6
8433 echo "configure:8434: checking whether to use nl_langinfo" >&5
8434 if test "$langinfo_ok" = "yes"; then
8435 if eval "test \"`echo '$''{'tcl_cv_langinfo_h'+set}'`\" = set"; then
8436 echo $ac_n "(cached) $ac_c" 1>&6
8439 cat > conftest.$ac_ext <<EOF
8440 #line 8441 "configure"
8441 #include "confdefs.h"
8442 #include <langinfo.h>
8444 nl_langinfo(CODESET);
8447 if { (eval echo configure:8448: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8449 tcl_cv_langinfo_h=yes
8451 echo "configure: failed program was:" >&5
8452 cat conftest.$ac_ext >&5
8454 tcl_cv_langinfo_h=no
8459 echo "$ac_t""$tcl_cv_langinfo_h" 1>&6
8460 if test $tcl_cv_langinfo_h = yes; then
8461 cat >> confdefs.h <<\EOF
8462 #define HAVE_LANGINFO 1
8467 echo "$ac_t""$langinfo_ok" 1>&6
8471 #--------------------------------------------------------------------
8472 # Darwin specific API checks and defines
8473 #--------------------------------------------------------------------
8475 if test "`uname -s`" = "Darwin" ; then
8476 for ac_hdr in copyfile.h
8478 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8479 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8480 echo "configure:8481: checking for $ac_hdr" >&5
8481 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8482 echo $ac_n "(cached) $ac_c" 1>&6
8484 cat > conftest.$ac_ext <<EOF
8485 #line 8486 "configure"
8486 #include "confdefs.h"
8489 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8490 { (eval echo configure:8491: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8491 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8492 if test -z "$ac_err"; then
8494 eval "ac_cv_header_$ac_safe=yes"
8497 echo "configure: failed program was:" >&5
8498 cat conftest.$ac_ext >&5
8500 eval "ac_cv_header_$ac_safe=no"
8504 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8505 echo "$ac_t""yes" 1>&6
8506 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8507 cat >> confdefs.h <<EOF
8508 #define $ac_tr_hdr 1
8512 echo "$ac_t""no" 1>&6
8516 for ac_func in copyfile
8518 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8519 echo "configure:8520: checking for $ac_func" >&5
8520 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8521 echo $ac_n "(cached) $ac_c" 1>&6
8523 cat > conftest.$ac_ext <<EOF
8524 #line 8525 "configure"
8525 #include "confdefs.h"
8526 /* System header to define __stub macros and hopefully few prototypes,
8527 which can conflict with char $ac_func(); below. */
8529 /* Override any gcc2 internal prototype to avoid an error. */
8530 /* We use char because int might match the return type of a gcc2
8531 builtin and then its argument prototype would still apply. */
8536 /* The GNU C library defines this for functions which it implements
8537 to always fail with ENOSYS. Some functions are actually named
8538 something starting with __ and the normal name is an alias. */
8539 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8547 if { (eval echo configure:8548: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8549 eval "ac_cv_func_$ac_func=yes"
8551 echo "configure: failed program was:" >&5
8552 cat conftest.$ac_ext >&5
8554 eval "ac_cv_func_$ac_func=no"
8559 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8560 echo "$ac_t""yes" 1>&6
8561 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8562 cat >> confdefs.h <<EOF
8563 #define $ac_tr_func 1
8567 echo "$ac_t""no" 1>&6
8571 if test $tcl_corefoundation = yes; then
8572 for ac_hdr in libkern/OSAtomic.h
8574 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8575 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8576 echo "configure:8577: checking for $ac_hdr" >&5
8577 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8578 echo $ac_n "(cached) $ac_c" 1>&6
8580 cat > conftest.$ac_ext <<EOF
8581 #line 8582 "configure"
8582 #include "confdefs.h"
8585 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8586 { (eval echo configure:8587: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8587 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8588 if test -z "$ac_err"; then
8590 eval "ac_cv_header_$ac_safe=yes"
8593 echo "configure: failed program was:" >&5
8594 cat conftest.$ac_ext >&5
8596 eval "ac_cv_header_$ac_safe=no"
8600 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8601 echo "$ac_t""yes" 1>&6
8602 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8603 cat >> confdefs.h <<EOF
8604 #define $ac_tr_hdr 1
8608 echo "$ac_t""no" 1>&6
8612 for ac_func in OSSpinLockLock
8614 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8615 echo "configure:8616: checking for $ac_func" >&5
8616 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8617 echo $ac_n "(cached) $ac_c" 1>&6
8619 cat > conftest.$ac_ext <<EOF
8620 #line 8621 "configure"
8621 #include "confdefs.h"
8622 /* System header to define __stub macros and hopefully few prototypes,
8623 which can conflict with char $ac_func(); below. */
8625 /* Override any gcc2 internal prototype to avoid an error. */
8626 /* We use char because int might match the return type of a gcc2
8627 builtin and then its argument prototype would still apply. */
8632 /* The GNU C library defines this for functions which it implements
8633 to always fail with ENOSYS. Some functions are actually named
8634 something starting with __ and the normal name is an alias. */
8635 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8643 if { (eval echo configure:8644: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8645 eval "ac_cv_func_$ac_func=yes"
8647 echo "configure: failed program was:" >&5
8648 cat conftest.$ac_ext >&5
8650 eval "ac_cv_func_$ac_func=no"
8655 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8656 echo "$ac_t""yes" 1>&6
8657 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8658 cat >> confdefs.h <<EOF
8659 #define $ac_tr_func 1
8663 echo "$ac_t""no" 1>&6
8667 for ac_func in pthread_atfork
8669 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8670 echo "configure:8671: checking for $ac_func" >&5
8671 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8672 echo $ac_n "(cached) $ac_c" 1>&6
8674 cat > conftest.$ac_ext <<EOF
8675 #line 8676 "configure"
8676 #include "confdefs.h"
8677 /* System header to define __stub macros and hopefully few prototypes,
8678 which can conflict with char $ac_func(); below. */
8680 /* Override any gcc2 internal prototype to avoid an error. */
8681 /* We use char because int might match the return type of a gcc2
8682 builtin and then its argument prototype would still apply. */
8687 /* The GNU C library defines this for functions which it implements
8688 to always fail with ENOSYS. Some functions are actually named
8689 something starting with __ and the normal name is an alias. */
8690 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8698 if { (eval echo configure:8699: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8700 eval "ac_cv_func_$ac_func=yes"
8702 echo "configure: failed program was:" >&5
8703 cat conftest.$ac_ext >&5
8705 eval "ac_cv_func_$ac_func=no"
8710 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8711 echo "$ac_t""yes" 1>&6
8712 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8713 cat >> confdefs.h <<EOF
8714 #define $ac_tr_func 1
8718 echo "$ac_t""no" 1>&6
8723 cat >> confdefs.h <<\EOF
8727 cat >> confdefs.h <<\EOF
8728 #define TCL_DEFAULT_ENCODING "utf-8"
8731 cat >> confdefs.h <<\EOF
8732 #define TCL_LOAD_FROM_MEMORY 1
8735 for ac_hdr in AvailabilityMacros.h
8737 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8738 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8739 echo "configure:8740: checking for $ac_hdr" >&5
8740 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8741 echo $ac_n "(cached) $ac_c" 1>&6
8743 cat > conftest.$ac_ext <<EOF
8744 #line 8745 "configure"
8745 #include "confdefs.h"
8748 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8749 { (eval echo configure:8750: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8750 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8751 if test -z "$ac_err"; then
8753 eval "ac_cv_header_$ac_safe=yes"
8756 echo "configure: failed program was:" >&5
8757 cat conftest.$ac_ext >&5
8759 eval "ac_cv_header_$ac_safe=no"
8763 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8764 echo "$ac_t""yes" 1>&6
8765 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8766 cat >> confdefs.h <<EOF
8767 #define $ac_tr_hdr 1
8771 echo "$ac_t""no" 1>&6
8775 if test "$ac_cv_header_AvailabilityMacros_h" = yes; then
8776 echo $ac_n "checking if weak import is available""... $ac_c" 1>&6
8777 echo "configure:8778: checking if weak import is available" >&5
8778 if eval "test \"`echo '$''{'tcl_cv_cc_weak_import'+set}'`\" = set"; then
8779 echo $ac_n "(cached) $ac_c" 1>&6
8782 hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -Werror"
8783 cat > conftest.$ac_ext <<EOF
8784 #line 8785 "configure"
8785 #include "confdefs.h"
8787 #ifdef __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__
8788 #if __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1020
8789 #error __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1020
8791 #elif MAC_OS_X_VERSION_MIN_REQUIRED < 1020
8792 #error MAC_OS_X_VERSION_MIN_REQUIRED < 1020
8794 int rand(void) __attribute__((weak_import));
8800 if { (eval echo configure:8801: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8802 tcl_cv_cc_weak_import=yes
8804 echo "configure: failed program was:" >&5
8805 cat conftest.$ac_ext >&5
8807 tcl_cv_cc_weak_import=no
8813 echo "$ac_t""$tcl_cv_cc_weak_import" 1>&6
8814 if test $tcl_cv_cc_weak_import = yes; then
8815 cat >> confdefs.h <<\EOF
8816 #define HAVE_WEAK_IMPORT 1
8823 #--------------------------------------------------------------------
8824 # Check for support of fts functions (readdir replacement)
8825 #--------------------------------------------------------------------
8827 echo $ac_n "checking for fts""... $ac_c" 1>&6
8828 echo "configure:8829: checking for fts" >&5
8829 if eval "test \"`echo '$''{'tcl_cv_api_fts'+set}'`\" = set"; then
8830 echo $ac_n "(cached) $ac_c" 1>&6
8833 cat > conftest.$ac_ext <<EOF
8834 #line 8835 "configure"
8835 #include "confdefs.h"
8837 #include <sys/param.h>
8838 #include <sys/stat.h>
8843 char*const p[2] = {"/", NULL};
8844 FTS *f = fts_open(p, FTS_PHYSICAL|FTS_NOCHDIR|FTS_NOSTAT, NULL);
8845 FTSENT *e = fts_read(f); fts_close(f);
8849 if { (eval echo configure:8850: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8853 echo "configure: failed program was:" >&5
8854 cat conftest.$ac_ext >&5
8861 echo "$ac_t""$tcl_cv_api_fts" 1>&6
8862 if test $tcl_cv_api_fts = yes; then
8863 cat >> confdefs.h <<\EOF
8869 #--------------------------------------------------------------------
8870 # The statements below check for systems where POSIX-style
8871 # non-blocking I/O (O_NONBLOCK) doesn't work or is unimplemented.
8872 # On these systems (mostly older ones), use the old BSD-style
8873 # FIONBIO approach instead.
8874 #--------------------------------------------------------------------
8877 for ac_hdr in sys/ioctl.h
8879 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8880 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8881 echo "configure:8882: checking for $ac_hdr" >&5
8882 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8883 echo $ac_n "(cached) $ac_c" 1>&6
8885 cat > conftest.$ac_ext <<EOF
8886 #line 8887 "configure"
8887 #include "confdefs.h"
8890 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8891 { (eval echo configure:8892: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8892 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8893 if test -z "$ac_err"; then
8895 eval "ac_cv_header_$ac_safe=yes"
8898 echo "configure: failed program was:" >&5
8899 cat conftest.$ac_ext >&5
8901 eval "ac_cv_header_$ac_safe=no"
8905 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8906 echo "$ac_t""yes" 1>&6
8907 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8908 cat >> confdefs.h <<EOF
8909 #define $ac_tr_hdr 1
8913 echo "$ac_t""no" 1>&6
8917 for ac_hdr in sys/filio.h
8919 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8920 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8921 echo "configure:8922: checking for $ac_hdr" >&5
8922 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8923 echo $ac_n "(cached) $ac_c" 1>&6
8925 cat > conftest.$ac_ext <<EOF
8926 #line 8927 "configure"
8927 #include "confdefs.h"
8930 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8931 { (eval echo configure:8932: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8932 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8933 if test -z "$ac_err"; then
8935 eval "ac_cv_header_$ac_safe=yes"
8938 echo "configure: failed program was:" >&5
8939 cat conftest.$ac_ext >&5
8941 eval "ac_cv_header_$ac_safe=no"
8945 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8946 echo "$ac_t""yes" 1>&6
8947 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8948 cat >> confdefs.h <<EOF
8949 #define $ac_tr_hdr 1
8953 echo "$ac_t""no" 1>&6
8958 echo $ac_n "checking system version""... $ac_c" 1>&6
8959 echo "configure:8960: checking system version" >&5
8960 if eval "test \"`echo '$''{'tcl_cv_sys_version'+set}'`\" = set"; then
8961 echo $ac_n "(cached) $ac_c" 1>&6
8964 if test -f /usr/lib/NextStep/software_version; then
8965 tcl_cv_sys_version=NEXTSTEP-`awk '/3/,/3/' /usr/lib/NextStep/software_version`
8967 tcl_cv_sys_version=`uname -s`-`uname -r`
8968 if test "$?" -ne 0 ; then
8969 echo "configure: warning: can't find uname command" 1>&2
8970 tcl_cv_sys_version=unknown
8972 # Special check for weird MP-RAS system (uname returns weird
8973 # results, and the version is kept in special file).
8975 if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then
8976 tcl_cv_sys_version=MP-RAS-`awk '{print $3}' /etc/.relid`
8978 if test "`uname -s`" = "AIX" ; then
8979 tcl_cv_sys_version=AIX-`uname -v`.`uname -r`
8986 echo "$ac_t""$tcl_cv_sys_version" 1>&6
8987 system=$tcl_cv_sys_version
8989 echo $ac_n "checking FIONBIO vs. O_NONBLOCK for nonblocking I/O""... $ac_c" 1>&6
8990 echo "configure:8991: checking FIONBIO vs. O_NONBLOCK for nonblocking I/O" >&5
8992 # There used to be code here to use FIONBIO under AIX. However, it
8993 # was reported that FIONBIO doesn't work under AIX 3.2.5. Since
8994 # using O_NONBLOCK seems fine under AIX 4.*, I removed the FIONBIO
8995 # code (JO, 5/31/97).
8998 cat >> confdefs.h <<\EOF
8999 #define USE_FIONBIO 1
9002 echo "$ac_t""FIONBIO" 1>&6
9005 cat >> confdefs.h <<\EOF
9006 #define USE_FIONBIO 1
9009 echo "$ac_t""FIONBIO" 1>&6
9012 cat >> confdefs.h <<\EOF
9013 #define USE_FIONBIO 1
9016 echo "$ac_t""FIONBIO" 1>&6
9019 echo "$ac_t""O_NONBLOCK" 1>&6
9024 #--------------------------------------------------------------------
9025 # The statements below define a collection of symbols related to
9026 # building libtcl as a shared library instead of a static library.
9027 #--------------------------------------------------------------------
9029 TCL_UNSHARED_LIB_SUFFIX=${UNSHARED_LIB_SUFFIX}
9030 TCL_SHARED_LIB_SUFFIX=${SHARED_LIB_SUFFIX}
9031 eval "TCL_LIB_FILE=libtcl${LIB_SUFFIX}"
9033 # tclConfig.sh needs a version of the _LIB_SUFFIX that has been eval'ed
9034 # so that the backslashes quoting the DBX braces are dropped.
9036 # Trick to replace DBGX with TCL_DBGX
9038 eval "TCL_LIB_FILE=${TCL_LIB_FILE}"
9040 TCL_LIBRARY='$(prefix)/lib/tcl$(VERSION)'
9041 PRIVATE_INCLUDE_DIR='$(includedir)'
9042 HTML_DIR='$(DISTDIR)/html'
9044 # Note: in the following variable, it's important to use the absolute
9045 # path name of the Tcl directory rather than "..": this is because
9046 # AIX remembers this path and will attempt to use it at run-time to look
9047 # up the Tcl library.
9049 if test "`uname -s`" = "Darwin" ; then
9051 if test "`uname -s`" = "Darwin" ; then
9052 echo $ac_n "checking how to package libraries""... $ac_c" 1>&6
9053 echo "configure:9054: checking how to package libraries" >&5
9054 # Check whether --enable-framework or --disable-framework was given.
9055 if test "${enable_framework+set}" = set; then
9056 enableval="$enable_framework"
9057 enable_framework=$enableval
9062 if test $enable_framework = yes; then
9063 if test $SHARED_BUILD = 0; then
9064 echo "configure: warning: Frameworks can only be built if --enable-shared is yes" 1>&2
9067 if test $tcl_corefoundation = no; then
9068 echo "configure: warning: Frameworks can only be used when CoreFoundation is available" 1>&2
9072 if test $enable_framework = yes; then
9073 echo "$ac_t""framework" 1>&6
9076 if test $SHARED_BUILD = 1; then
9077 echo "$ac_t""shared library" 1>&6
9079 echo "$ac_t""static library" 1>&6
9085 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)}'`"
9086 TCL_SHLIB_LD_EXTRAS="${TCL_SHLIB_LD_EXTRAS}"' -install_name ${DYLIB_INSTALL_DIR}/${TCL_LIB_FILE} -seg1addr 0xa000000'
9089 if test "$FRAMEWORK_BUILD" = "1" ; then
9090 cat >> confdefs.h <<\EOF
9091 #define TCL_FRAMEWORK 1
9094 tcl_config_files="${tcl_config_files} Tcl-Info.plist:../macosx/Tcl-Info.plist.in"
9095 # Construct a fake local framework structure to make linking with
9096 # '-framework Tcl' and running of tcltest work
9098 LD_LIBRARY_PATH_VAR="DYLD_FRAMEWORK_PATH"
9099 if test "${libdir}" = '${exec_prefix}/lib'; then
9100 # override libdir default
9101 libdir="/Library/Frameworks"
9104 TCL_LIB_FLAG="-framework Tcl"
9105 TCL_BUILD_LIB_SPEC="-F`pwd` -framework Tcl"
9106 TCL_LIB_SPEC="-F${libdir} -framework Tcl"
9107 libdir="${libdir}/Tcl.framework/Versions/\${VERSION}"
9108 TCL_LIBRARY="${libdir}/Resources/Scripts"
9109 includedir="${libdir}/Headers"
9110 PRIVATE_INCLUDE_DIR="${libdir}/PrivateHeaders"
9111 HTML_DIR="${libdir}/Resources/Documentation/Reference/Tcl"
9112 EXTRA_INSTALL="install-private-headers html-tcl"
9113 EXTRA_BUILD_HTML='@ln -fs contents.htm $(HTML_INSTALL_DIR)/TclTOC.html'
9114 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"'
9115 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"'
9116 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)/../.."'
9117 TCL_YEAR="`date +%Y`"
9118 # Don't use AC_DEFINE for the following as the framework version define
9119 # needs to go into the Makefile even when using autoheader, so that we
9120 # can pick up a potential make override of VERSION. Also, don't put this
9121 # into CFLAGS as it should not go into tclConfig.sh
9122 EXTRA_CC_SWITCHES='-DTCL_FRAMEWORK_VERSION=\"$(VERSION)\"'
9124 # libdir must be a fully qualified path and not ${exec_prefix}/lib
9125 eval libdir="$libdir"
9126 if test "$SHARED_BUILD" = "0" || test "$TCL_NEEDS_EXP_FILE" = "0"; then
9127 if test "${TCL_LIB_VERSIONS_OK}" = "ok"; then
9128 TCL_LIB_FLAG="-ltcl${TCL_VERSION}\${TCL_DBGX}"
9130 TCL_LIB_FLAG="-ltcl`echo ${TCL_VERSION} | tr -d .`\${TCL_DBGX}"
9132 TCL_BUILD_LIB_SPEC="-L`pwd` ${TCL_LIB_FLAG}"
9133 TCL_LIB_SPEC="-L${libdir} ${TCL_LIB_FLAG}"
9135 TCL_BUILD_EXP_FILE="lib.exp"
9136 eval "TCL_EXP_FILE=libtcl${TCL_EXPORT_FILE_SUFFIX}"
9138 # Replace DBGX with TCL_DBGX
9139 eval "TCL_EXP_FILE=\"${TCL_EXP_FILE}\""
9141 if test "$GCC" = "yes" ; then
9142 TCL_BUILD_LIB_SPEC="-Wl,-bI:`pwd`/${TCL_BUILD_EXP_FILE} -L`pwd`"
9143 TCL_LIB_SPEC="-Wl,-bI:${libdir}/${TCL_EXP_FILE} -L`pwd`"
9145 TCL_BUILD_LIB_SPEC="-bI:`pwd`/${TCL_BUILD_EXP_FILE}"
9146 TCL_LIB_SPEC="-bI:${libdir}/${TCL_EXP_FILE}"
9150 VERSION='${VERSION}'
9151 eval "CFG_TCL_SHARED_LIB_SUFFIX=${TCL_SHARED_LIB_SUFFIX}"
9152 eval "CFG_TCL_UNSHARED_LIB_SUFFIX=${TCL_UNSHARED_LIB_SUFFIX}"
9153 eval "CFG_TCL_EXPORT_FILE_SUFFIX=${TCL_EXPORT_FILE_SUFFIX}"
9154 VERSION=${TCL_VERSION}
9156 #--------------------------------------------------------------------
9157 # The statements below define the symbol TCL_PACKAGE_PATH, which
9158 # gives a list of directories that may contain packages. The list
9159 # consists of one directory for machine-dependent binaries and
9160 # another for platform-independent scripts.
9161 #--------------------------------------------------------------------
9163 if test "$FRAMEWORK_BUILD" = "1" ; then
9164 TCL_PACKAGE_PATH="~/Library/Tcl /Library/Tcl /Network/Library/Tcl /System/Library/Tcl ~/Library/Frameworks /Library/Frameworks /Network/Library/Frameworks /System/Library/Frameworks"
9165 elif test "$prefix" != "$exec_prefix"; then
9166 TCL_PACKAGE_PATH="${libdir} ${prefix}/lib"
9168 TCL_PACKAGE_PATH="${prefix}/lib"
9171 #--------------------------------------------------------------------
9172 # The statements below define various symbols relating to Tcl
9174 #--------------------------------------------------------------------
9176 # Replace ${VERSION} with contents of ${TCL_VERSION}
9177 eval "TCL_STUB_LIB_FILE=libtclstub${TCL_UNSHARED_LIB_SUFFIX}"
9178 # Replace DBGX with TCL_DBGX
9179 eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
9180 eval "TCL_STUB_LIB_DIR=${libdir}"
9182 if test "${TCL_LIB_VERSIONS_OK}" = "ok"; then
9183 TCL_STUB_LIB_FLAG="-ltclstub${TCL_VERSION}\${TCL_DBGX}"
9185 TCL_STUB_LIB_FLAG="-ltclstub`echo ${TCL_VERSION} | tr -d .`\${TCL_DBGX}"
9188 TCL_BUILD_STUB_LIB_SPEC="-L`pwd` ${TCL_STUB_LIB_FLAG}"
9189 TCL_STUB_LIB_SPEC="-L${TCL_STUB_LIB_DIR} ${TCL_STUB_LIB_FLAG}"
9190 TCL_BUILD_STUB_LIB_PATH="`pwd`/${TCL_STUB_LIB_FILE}"
9191 TCL_STUB_LIB_PATH="${TCL_STUB_LIB_DIR}/${TCL_STUB_LIB_FILE}"
9193 # Install time header dir can be set via --includedir
9194 eval "TCL_INCLUDE_SPEC=\"-I${includedir}\""
9196 #------------------------------------------------------------------------
9197 # tclConfig.sh refers to this by a different name
9198 #------------------------------------------------------------------------
9200 TCL_SHARED_BUILD=${SHARED_BUILD}
9251 CFLAGS="${CFLAGS} ${CPPFLAGS}"; CPPFLAGS=""
9254 tcl_config_files="${tcl_config_files} Makefile dltest/Makefile tclConfig.sh"
9256 cat > confcache <<\EOF
9257 # This file is a shell script that caches the results of configure
9258 # tests run on this system so they can be shared between configure
9259 # scripts and configure runs. It is not useful on other systems.
9260 # If it contains results you don't want to keep, you may remove or edit it.
9262 # By default, configure uses ./config.cache as the cache file,
9263 # creating it if it does not exist already. You can give configure
9264 # the --cache-file=FILE option to use a different cache file; that is
9265 # what configure does when it calls configure scripts in
9266 # subdirectories, so they share the cache.
9267 # Giving --cache-file=/dev/null disables caching, for debugging configure.
9268 # config.status only pays attention to the cache file if you give it the
9269 # --recheck option to rerun configure.
9272 # The following way of writing the cache mishandles newlines in values,
9273 # but we know of no workaround that is simple, portable, and efficient.
9274 # So, don't put newlines in cache variables' values.
9275 # Ultrix sh set writes to stderr and can't be redirected directly,
9276 # and sets the high bit in the cache file unless we assign to the vars.
9278 case `(ac_space=' '; set | grep ac_space) 2>&1` in
9280 # `set' does not quote correctly, so add quotes (double-quote substitution
9281 # turns \\\\ into \\, and sed turns \\ into \).
9283 -e "s/'/'\\\\''/g" \
9284 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
9287 # `set' quotes correctly as required by POSIX, so do not add quotes.
9288 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
9291 if cmp -s $cache_file confcache; then
9294 if test -w $cache_file; then
9295 echo "updating cache $cache_file"
9296 cat confcache > $cache_file
9298 echo "not updating unwritable cache $cache_file"
9303 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
9305 test "x$prefix" = xNONE && prefix=$ac_default_prefix
9306 # Let make expand exec_prefix.
9307 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
9309 # Any assignment to VPATH causes Sun make to only execute
9310 # the first set of double-colon rules, so remove it if not needed.
9311 # If there is a colon in the path, we need to keep it.
9312 if test "x$srcdir" = x.; then
9313 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
9316 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
9318 # Transform confdefs.h into DEFS.
9319 # Protect against shell expansion while executing Makefile rules.
9320 # Protect against Makefile macro expansion.
9321 cat > conftest.defs <<\EOF
9322 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
9323 s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g
9328 DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
9332 # Without the "./", some shells look in PATH for config.status.
9333 : ${CONFIG_STATUS=./config.status}
9335 echo creating $CONFIG_STATUS
9336 rm -f $CONFIG_STATUS
9337 cat > $CONFIG_STATUS <<EOF
9339 # Generated automatically by configure.
9340 # Run this file to recreate the current configuration.
9341 # This directory was configured as follows,
9342 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
9344 # $0 $ac_configure_args
9346 # Compiler output produced by configure, useful for debugging
9347 # configure, is in ./config.log if it exists.
9349 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
9352 case "\$ac_option" in
9353 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
9354 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
9355 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
9356 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
9357 echo "$CONFIG_STATUS generated by autoconf version 2.13"
9359 -help | --help | --hel | --he | --h)
9360 echo "\$ac_cs_usage"; exit 0 ;;
9361 *) echo "\$ac_cs_usage"; exit 1 ;;
9365 ac_given_srcdir=$srcdir
9367 trap 'rm -fr `echo "${tcl_config_files}" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
9369 cat >> $CONFIG_STATUS <<EOF
9371 # Protect against being on the right side of a sed subst in config.status.
9372 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
9373 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
9377 s%@CFLAGS@%$CFLAGS%g
9378 s%@CPPFLAGS@%$CPPFLAGS%g
9379 s%@CXXFLAGS@%$CXXFLAGS%g
9380 s%@FFLAGS@%$FFLAGS%g
9382 s%@LDFLAGS@%$LDFLAGS%g
9384 s%@exec_prefix@%$exec_prefix%g
9385 s%@prefix@%$prefix%g
9386 s%@program_transform_name@%$program_transform_name%g
9387 s%@bindir@%$bindir%g
9388 s%@sbindir@%$sbindir%g
9389 s%@libexecdir@%$libexecdir%g
9390 s%@datadir@%$datadir%g
9391 s%@sysconfdir@%$sysconfdir%g
9392 s%@sharedstatedir@%$sharedstatedir%g
9393 s%@localstatedir@%$localstatedir%g
9394 s%@libdir@%$libdir%g
9395 s%@includedir@%$includedir%g
9396 s%@oldincludedir@%$oldincludedir%g
9397 s%@infodir@%$infodir%g
9398 s%@mandir@%$mandir%g
9399 s%@MAN_FLAGS@%$MAN_FLAGS%g
9402 s%@TCL_THREADS@%$TCL_THREADS%g
9403 s%@TCL_LIBS@%$TCL_LIBS%g
9404 s%@MATH_LIBS@%$MATH_LIBS%g
9405 s%@RANLIB@%$RANLIB%g
9407 s%@DL_LIBS@%$DL_LIBS%g
9408 s%@DL_OBJS@%$DL_OBJS%g
9409 s%@PLAT_OBJS@%$PLAT_OBJS%g
9410 s%@PLAT_SRCS@%$PLAT_SRCS%g
9411 s%@CFLAGS_DEBUG@%$CFLAGS_DEBUG%g
9412 s%@CFLAGS_OPTIMIZE@%$CFLAGS_OPTIMIZE%g
9413 s%@CFLAGS_WARNING@%$CFLAGS_WARNING%g
9414 s%@LDFLAGS_DEBUG@%$LDFLAGS_DEBUG%g
9415 s%@LDFLAGS_OPTIMIZE@%$LDFLAGS_OPTIMIZE%g
9416 s%@CC_SEARCH_FLAGS@%$CC_SEARCH_FLAGS%g
9417 s%@LD_SEARCH_FLAGS@%$LD_SEARCH_FLAGS%g
9418 s%@STLIB_LD@%$STLIB_LD%g
9419 s%@SHLIB_LD@%$SHLIB_LD%g
9420 s%@TCL_SHLIB_LD_EXTRAS@%$TCL_SHLIB_LD_EXTRAS%g
9421 s%@TK_SHLIB_LD_EXTRAS@%$TK_SHLIB_LD_EXTRAS%g
9422 s%@SHLIB_LD_LIBS@%$SHLIB_LD_LIBS%g
9423 s%@SHLIB_CFLAGS@%$SHLIB_CFLAGS%g
9424 s%@SHLIB_SUFFIX@%$SHLIB_SUFFIX%g
9425 s%@MAKE_LIB@%$MAKE_LIB%g
9426 s%@MAKE_STUB_LIB@%$MAKE_STUB_LIB%g
9427 s%@INSTALL_LIB@%$INSTALL_LIB%g
9428 s%@INSTALL_STUB_LIB@%$INSTALL_STUB_LIB%g
9429 s%@CFLAGS_DEFAULT@%$CFLAGS_DEFAULT%g
9430 s%@LDFLAGS_DEFAULT@%$LDFLAGS_DEFAULT%g
9431 s%@LIBOBJS@%$LIBOBJS%g
9432 s%@TCL_VERSION@%$TCL_VERSION%g
9433 s%@TCL_MAJOR_VERSION@%$TCL_MAJOR_VERSION%g
9434 s%@TCL_MINOR_VERSION@%$TCL_MINOR_VERSION%g
9435 s%@TCL_PATCH_LEVEL@%$TCL_PATCH_LEVEL%g
9436 s%@TCL_YEAR@%$TCL_YEAR%g
9437 s%@TCL_LIB_FILE@%$TCL_LIB_FILE%g
9438 s%@TCL_LIB_FLAG@%$TCL_LIB_FLAG%g
9439 s%@TCL_LIB_SPEC@%$TCL_LIB_SPEC%g
9440 s%@TCL_STUB_LIB_FILE@%$TCL_STUB_LIB_FILE%g
9441 s%@TCL_STUB_LIB_FLAG@%$TCL_STUB_LIB_FLAG%g
9442 s%@TCL_STUB_LIB_SPEC@%$TCL_STUB_LIB_SPEC%g
9443 s%@TCL_STUB_LIB_PATH@%$TCL_STUB_LIB_PATH%g
9444 s%@TCL_INCLUDE_SPEC@%$TCL_INCLUDE_SPEC%g
9445 s%@TCL_BUILD_STUB_LIB_SPEC@%$TCL_BUILD_STUB_LIB_SPEC%g
9446 s%@TCL_BUILD_STUB_LIB_PATH@%$TCL_BUILD_STUB_LIB_PATH%g
9447 s%@TCL_SRC_DIR@%$TCL_SRC_DIR%g
9448 s%@TCL_DBGX@%$TCL_DBGX%g
9449 s%@CFG_TCL_SHARED_LIB_SUFFIX@%$CFG_TCL_SHARED_LIB_SUFFIX%g
9450 s%@CFG_TCL_UNSHARED_LIB_SUFFIX@%$CFG_TCL_UNSHARED_LIB_SUFFIX%g
9451 s%@CFG_TCL_EXPORT_FILE_SUFFIX@%$CFG_TCL_EXPORT_FILE_SUFFIX%g
9452 s%@TCL_SHARED_BUILD@%$TCL_SHARED_BUILD%g
9453 s%@LD_LIBRARY_PATH_VAR@%$LD_LIBRARY_PATH_VAR%g
9454 s%@TCL_BUILD_LIB_SPEC@%$TCL_BUILD_LIB_SPEC%g
9455 s%@TCL_NEEDS_EXP_FILE@%$TCL_NEEDS_EXP_FILE%g
9456 s%@TCL_BUILD_EXP_FILE@%$TCL_BUILD_EXP_FILE%g
9457 s%@TCL_EXP_FILE@%$TCL_EXP_FILE%g
9458 s%@TCL_LIB_VERSIONS_OK@%$TCL_LIB_VERSIONS_OK%g
9459 s%@TCL_SHARED_LIB_SUFFIX@%$TCL_SHARED_LIB_SUFFIX%g
9460 s%@TCL_UNSHARED_LIB_SUFFIX@%$TCL_UNSHARED_LIB_SUFFIX%g
9461 s%@TCL_HAS_LONGLONG@%$TCL_HAS_LONGLONG%g
9462 s%@BUILD_DLTEST@%$BUILD_DLTEST%g
9463 s%@TCL_PACKAGE_PATH@%$TCL_PACKAGE_PATH%g
9464 s%@TCL_LIBRARY@%$TCL_LIBRARY%g
9465 s%@PRIVATE_INCLUDE_DIR@%$PRIVATE_INCLUDE_DIR%g
9466 s%@HTML_DIR@%$HTML_DIR%g
9467 s%@EXTRA_CC_SWITCHES@%$EXTRA_CC_SWITCHES%g
9468 s%@EXTRA_INSTALL@%$EXTRA_INSTALL%g
9469 s%@EXTRA_INSTALL_BINARIES@%$EXTRA_INSTALL_BINARIES%g
9470 s%@EXTRA_BUILD_HTML@%$EXTRA_BUILD_HTML%g
9475 cat >> $CONFIG_STATUS <<\EOF
9477 # Split the substitutions into bite-sized pieces for seds with
9478 # small command number limits, like on Digital OSF/1 and HP-UX.
9479 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
9480 ac_file=1 # Number of current file.
9481 ac_beg=1 # First line for current file.
9482 ac_end=$ac_max_sed_cmds # Line after last line for current file.
9485 while $ac_more_lines; do
9486 if test $ac_beg -gt 1; then
9487 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
9489 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
9491 if test ! -s conftest.s$ac_file; then
9493 rm -f conftest.s$ac_file
9495 if test -z "$ac_sed_cmds"; then
9496 ac_sed_cmds="sed -f conftest.s$ac_file"
9498 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
9500 ac_file=`expr $ac_file + 1`
9502 ac_end=`expr $ac_end + $ac_max_sed_cmds`
9505 if test -z "$ac_sed_cmds"; then
9510 cat >> $CONFIG_STATUS <<EOF
9512 CONFIG_FILES=\${CONFIG_FILES-"${tcl_config_files}"}
9514 cat >> $CONFIG_STATUS <<\EOF
9515 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
9516 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
9518 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
9519 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
9520 *) ac_file_in="${ac_file}.in" ;;
9523 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
9525 # Remove last slash and all that follows it. Not all systems have dirname.
9526 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
9527 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
9528 # The file is in a subdirectory.
9529 test ! -d "$ac_dir" && mkdir "$ac_dir"
9530 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
9531 # A "../" for each directory in $ac_dir_suffix.
9532 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
9534 ac_dir_suffix= ac_dots=
9537 case "$ac_given_srcdir" in
9539 if test -z "$ac_dots"; then top_srcdir=.
9540 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
9541 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
9543 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
9544 top_srcdir="$ac_dots$ac_given_srcdir" ;;
9548 echo creating "$ac_file"
9550 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
9552 *Makefile*) ac_comsub="1i\\
9553 # $configure_input" ;;
9557 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
9559 s%@configure_input@%$configure_input%g
9560 s%@srcdir@%$srcdir%g
9561 s%@top_srcdir@%$top_srcdir%g
9562 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
9567 cat >> $CONFIG_STATUS <<EOF
9568 VERSION=${TCL_VERSION} FRAMEWORK_BUILD=${FRAMEWORK_BUILD}
9571 cat >> $CONFIG_STATUS <<\EOF
9572 test "$FRAMEWORK_BUILD" = "1" && n=Tcl &&
9573 f=$n.framework && v=Versions/$VERSION &&
9574 echo "creating $f" && rm -rf $f && mkdir -p $f/$v/Resources &&
9575 ln -s $v/$n $v/Resources $f && ln -s ../../../$n $f/$v &&
9576 ln -s ../../../../$n-Info.plist $f/$v/Resources/Info.plist &&
9582 chmod +x $CONFIG_STATUS
9583 rm -fr confdefs* $ac_clean_files
9584 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1