root/tcl-8.0/trunk/unix/configure @ 1092

Revision 1092, 142.2 KB (checked in by ucaccsp, 16 years ago)

Tweak so the full path to the .a file is in the tclConfig.sh file

  • Property svn:eol-style set to native
  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
Line 
1#! /bin/sh
2
3# Guess values for system-dependent variables and create Makefiles.
4# Generated automatically using autoconf version 2.12
5# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
6#
7# This configure script is free software; the Free Software Foundation
8# gives unlimited permission to copy, distribute and modify it.
9
10# Defaults:
11ac_help=
12ac_default_prefix=/usr/local
13# Any additions from configure.in:
14ac_help="$ac_help
15  --enable-symbols        build with debugging symbols"
16
17# Initialize some variables set by options.
18# The variables have the same names as the options, with
19# dashes changed to underlines.
20build=NONE
21cache_file=./config.cache
22exec_prefix=NONE
23host=NONE
24no_create=
25nonopt=NONE
26no_recursion=
27prefix=NONE
28program_prefix=NONE
29program_suffix=NONE
30program_transform_name=s,x,x,
31silent=
32site=
33srcdir=
34target=NONE
35verbose=
36x_includes=NONE
37x_libraries=NONE
38bindir='${exec_prefix}/bin'
39sbindir='${exec_prefix}/sbin'
40libexecdir='${exec_prefix}/libexec'
41datadir='${prefix}/share'
42sysconfdir='${prefix}/etc'
43sharedstatedir='${prefix}/com'
44localstatedir='${prefix}/var'
45libdir='${exec_prefix}/lib'
46includedir='${prefix}/include'
47oldincludedir='/usr/include'
48infodir='${prefix}/info'
49mandir='${prefix}/man'
50
51# Initialize some other variables.
52subdirs=
53MFLAGS= MAKEFLAGS=
54# Maximum number of lines to put in a shell here document.
55ac_max_here_lines=12
56
57ac_prev=
58for ac_option
59do
60
61  # If the previous option needs an argument, assign it.
62  if test -n "$ac_prev"; then
63    eval "$ac_prev=\$ac_option"
64    ac_prev=
65    continue
66  fi
67
68  case "$ac_option" in
69  -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
70  *) ac_optarg= ;;
71  esac
72
73  # Accept the important Cygnus configure options, so we can diagnose typos.
74
75  case "$ac_option" in
76
77  -bindir | --bindir | --bindi | --bind | --bin | --bi)
78    ac_prev=bindir ;;
79  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
80    bindir="$ac_optarg" ;;
81
82  -build | --build | --buil | --bui | --bu)
83    ac_prev=build ;;
84  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
85    build="$ac_optarg" ;;
86
87  -cache-file | --cache-file | --cache-fil | --cache-fi \
88  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
89    ac_prev=cache_file ;;
90  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
91  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
92    cache_file="$ac_optarg" ;;
93
94  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
95    ac_prev=datadir ;;
96  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
97  | --da=*)
98    datadir="$ac_optarg" ;;
99
100  -disable-* | --disable-*)
101    ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
102    # Reject names that are not valid shell variable names.
103    if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
104      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
105    fi
106    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
107    eval "enable_${ac_feature}=no" ;;
108
109  -enable-* | --enable-*)
110    ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
111    # Reject names that are not valid shell variable names.
112    if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
113      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
114    fi
115    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
116    case "$ac_option" in
117      *=*) ;;
118      *) ac_optarg=yes ;;
119    esac
120    eval "enable_${ac_feature}='$ac_optarg'" ;;
121
122  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
123  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
124  | --exec | --exe | --ex)
125    ac_prev=exec_prefix ;;
126  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
127  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
128  | --exec=* | --exe=* | --ex=*)
129    exec_prefix="$ac_optarg" ;;
130
131  -gas | --gas | --ga | --g)
132    # Obsolete; use --with-gas.
133    with_gas=yes ;;
134
135  -help | --help | --hel | --he)
136    # Omit some internal or obsolete options to make the list less imposing.
137    # This message is too long to be a string in the A/UX 3.1 sh.
138    cat << EOF
139Usage: configure [options] [host]
140Options: [defaults in brackets after descriptions]
141Configuration:
142  --cache-file=FILE       cache test results in FILE
143  --help                  print this message
144  --no-create             do not create output files
145  --quiet, --silent       do not print \`checking...' messages
146  --version               print the version of autoconf that created configure
147Directory and file names:
148  --prefix=PREFIX         install architecture-independent files in PREFIX
149                          [$ac_default_prefix]
150  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
151                          [same as prefix]
152  --bindir=DIR            user executables in DIR [EPREFIX/bin]
153  --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
154  --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
155  --datadir=DIR           read-only architecture-independent data in DIR
156                          [PREFIX/share]
157  --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
158  --sharedstatedir=DIR    modifiable architecture-independent data in DIR
159                          [PREFIX/com]
160  --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
161  --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
162  --includedir=DIR        C header files in DIR [PREFIX/include]
163  --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
164  --infodir=DIR           info documentation in DIR [PREFIX/info]
165  --mandir=DIR            man documentation in DIR [PREFIX/man]
166  --srcdir=DIR            find the sources in DIR [configure dir or ..]
167  --program-prefix=PREFIX prepend PREFIX to installed program names
168  --program-suffix=SUFFIX append SUFFIX to installed program names
169  --program-transform-name=PROGRAM
170                          run sed PROGRAM on installed program names
171EOF
172    cat << EOF
173Host type:
174  --build=BUILD           configure for building on BUILD [BUILD=HOST]
175  --host=HOST             configure for HOST [guessed]
176  --target=TARGET         configure for TARGET [TARGET=HOST]
177Features and packages:
178  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
179  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
180  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
181  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
182  --x-includes=DIR        X include files are in DIR
183  --x-libraries=DIR       X library files are in DIR
184EOF
185    if test -n "$ac_help"; then
186      echo "--enable and --with options recognized:$ac_help"
187    fi
188    exit 0 ;;
189
190  -host | --host | --hos | --ho)
191    ac_prev=host ;;
192  -host=* | --host=* | --hos=* | --ho=*)
193    host="$ac_optarg" ;;
194
195  -includedir | --includedir | --includedi | --included | --include \
196  | --includ | --inclu | --incl | --inc)
197    ac_prev=includedir ;;
198  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
199  | --includ=* | --inclu=* | --incl=* | --inc=*)
200    includedir="$ac_optarg" ;;
201
202  -infodir | --infodir | --infodi | --infod | --info | --inf)
203    ac_prev=infodir ;;
204  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
205    infodir="$ac_optarg" ;;
206
207  -libdir | --libdir | --libdi | --libd)
208    ac_prev=libdir ;;
209  -libdir=* | --libdir=* | --libdi=* | --libd=*)
210    libdir="$ac_optarg" ;;
211
212  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
213  | --libexe | --libex | --libe)
214    ac_prev=libexecdir ;;
215  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
216  | --libexe=* | --libex=* | --libe=*)
217    libexecdir="$ac_optarg" ;;
218
219  -localstatedir | --localstatedir | --localstatedi | --localstated \
220  | --localstate | --localstat | --localsta | --localst \
221  | --locals | --local | --loca | --loc | --lo)
222    ac_prev=localstatedir ;;
223  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
224  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
225  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
226    localstatedir="$ac_optarg" ;;
227
228  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
229    ac_prev=mandir ;;
230  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
231    mandir="$ac_optarg" ;;
232
233  -nfp | --nfp | --nf)
234    # Obsolete; use --without-fp.
235    with_fp=no ;;
236
237  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
238  | --no-cr | --no-c)
239    no_create=yes ;;
240
241  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
242  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
243    no_recursion=yes ;;
244
245  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
246  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
247  | --oldin | --oldi | --old | --ol | --o)
248    ac_prev=oldincludedir ;;
249  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
250  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
251  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
252    oldincludedir="$ac_optarg" ;;
253
254  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
255    ac_prev=prefix ;;
256  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
257    prefix="$ac_optarg" ;;
258
259  -program-prefix | --program-prefix | --program-prefi | --program-pref \
260  | --program-pre | --program-pr | --program-p)
261    ac_prev=program_prefix ;;
262  -program-prefix=* | --program-prefix=* | --program-prefi=* \
263  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
264    program_prefix="$ac_optarg" ;;
265
266  -program-suffix | --program-suffix | --program-suffi | --program-suff \
267  | --program-suf | --program-su | --program-s)
268    ac_prev=program_suffix ;;
269  -program-suffix=* | --program-suffix=* | --program-suffi=* \
270  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
271    program_suffix="$ac_optarg" ;;
272
273  -program-transform-name | --program-transform-name \
274  | --program-transform-nam | --program-transform-na \
275  | --program-transform-n | --program-transform- \
276  | --program-transform | --program-transfor \
277  | --program-transfo | --program-transf \
278  | --program-trans | --program-tran \
279  | --progr-tra | --program-tr | --program-t)
280    ac_prev=program_transform_name ;;
281  -program-transform-name=* | --program-transform-name=* \
282  | --program-transform-nam=* | --program-transform-na=* \
283  | --program-transform-n=* | --program-transform-=* \
284  | --program-transform=* | --program-transfor=* \
285  | --program-transfo=* | --program-transf=* \
286  | --program-trans=* | --program-tran=* \
287  | --progr-tra=* | --program-tr=* | --program-t=*)
288    program_transform_name="$ac_optarg" ;;
289
290  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
291  | -silent | --silent | --silen | --sile | --sil)
292    silent=yes ;;
293
294  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
295    ac_prev=sbindir ;;
296  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
297  | --sbi=* | --sb=*)
298    sbindir="$ac_optarg" ;;
299
300  -sharedstatedir | --sharedstatedir | --sharedstatedi \
301  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
302  | --sharedst | --shareds | --shared | --share | --shar \
303  | --sha | --sh)
304    ac_prev=sharedstatedir ;;
305  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
306  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
307  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
308  | --sha=* | --sh=*)
309    sharedstatedir="$ac_optarg" ;;
310
311  -site | --site | --sit)
312    ac_prev=site ;;
313  -site=* | --site=* | --sit=*)
314    site="$ac_optarg" ;;
315
316  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
317    ac_prev=srcdir ;;
318  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
319    srcdir="$ac_optarg" ;;
320
321  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
322  | --syscon | --sysco | --sysc | --sys | --sy)
323    ac_prev=sysconfdir ;;
324  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
325  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
326    sysconfdir="$ac_optarg" ;;
327
328  -target | --target | --targe | --targ | --tar | --ta | --t)
329    ac_prev=target ;;
330  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
331    target="$ac_optarg" ;;
332
333  -v | -verbose | --verbose | --verbos | --verbo | --verb)
334    verbose=yes ;;
335
336  -version | --version | --versio | --versi | --vers)
337    echo "configure generated by autoconf version 2.12"
338    exit 0 ;;
339
340  -with-* | --with-*)
341    ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
342    # Reject names that are not valid shell variable names.
343    if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
344      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
345    fi
346    ac_package=`echo $ac_package| sed 's/-/_/g'`
347    case "$ac_option" in
348      *=*) ;;
349      *) ac_optarg=yes ;;
350    esac
351    eval "with_${ac_package}='$ac_optarg'" ;;
352
353  -without-* | --without-*)
354    ac_package=`echo $ac_option|sed -e 's/-*without-//'`
355    # Reject names that are not valid shell variable names.
356    if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
357      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
358    fi
359    ac_package=`echo $ac_package| sed 's/-/_/g'`
360    eval "with_${ac_package}=no" ;;
361
362  --x)
363    # Obsolete; use --with-x.
364    with_x=yes ;;
365
366  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
367  | --x-incl | --x-inc | --x-in | --x-i)
368    ac_prev=x_includes ;;
369  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
370  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
371    x_includes="$ac_optarg" ;;
372
373  -x-libraries | --x-libraries | --x-librarie | --x-librari \
374  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
375    ac_prev=x_libraries ;;
376  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
377  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
378    x_libraries="$ac_optarg" ;;
379
380  -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
381    ;;
382
383  *)
384    if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
385      echo "configure: warning: $ac_option: invalid host type" 1>&2
386    fi
387    if test "x$nonopt" != xNONE; then
388      { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
389    fi
390    nonopt="$ac_option"
391    ;;
392
393  esac
394done
395
396if test -n "$ac_prev"; then
397  { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
398fi
399
400trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
401
402# File descriptor usage:
403# 0 standard input
404# 1 file creation
405# 2 errors and warnings
406# 3 some systems may open it to /dev/tty
407# 4 used on the Kubota Titan
408# 6 checking for... messages and results
409# 5 compiler messages saved in config.log
410if test "$silent" = yes; then
411  exec 6>/dev/null
412else
413  exec 6>&1
414fi
415exec 5>./config.log
416
417echo "\
418This file contains any messages produced by compilers while
419running configure, to aid debugging if configure makes a mistake.
420" 1>&5
421
422# Strip out --no-create and --no-recursion so they do not pile up.
423# Also quote any args containing shell metacharacters.
424ac_configure_args=
425for ac_arg
426do
427  case "$ac_arg" in
428  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
429  | --no-cr | --no-c) ;;
430  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
431  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
432  *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
433  ac_configure_args="$ac_configure_args '$ac_arg'" ;;
434  *) ac_configure_args="$ac_configure_args $ac_arg" ;;
435  esac
436done
437
438# NLS nuisances.
439# Only set these to C if already set.  These must not be set unconditionally
440# because not all systems understand e.g. LANG=C (notably SCO).
441# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
442# Non-C LC_CTYPE values break the ctype check.
443if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
444if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
445if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
446if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
447
448# confdefs.h avoids OS command line length limits that DEFS can exceed.
449rm -rf conftest* confdefs.h
450# AIX cpp loses on an empty file, so make sure it contains at least a newline.
451echo > confdefs.h
452
453# A filename unique to this package, relative to the directory that
454# configure is in, which we can look for to find out if srcdir is correct.
455ac_unique_file=../generic/tcl.h
456
457# Find the source files, if location was not specified.
458if test -z "$srcdir"; then
459  ac_srcdir_defaulted=yes
460  # Try the directory containing this script, then its parent.
461  ac_prog=$0
462  ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
463  test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
464  srcdir=$ac_confdir
465  if test ! -r $srcdir/$ac_unique_file; then
466    srcdir=..
467  fi
468else
469  ac_srcdir_defaulted=no
470fi
471if test ! -r $srcdir/$ac_unique_file; then
472  if test "$ac_srcdir_defaulted" = yes; then
473    { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
474  else
475    { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
476  fi
477fi
478srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
479
480# Prefer explicitly selected file to automatically selected ones.
481if test -z "$CONFIG_SITE"; then
482  if test "x$prefix" != xNONE; then
483    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
484  else
485    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
486  fi
487fi
488for ac_site_file in $CONFIG_SITE; do
489  if test -r "$ac_site_file"; then
490    echo "loading site script $ac_site_file"
491    . "$ac_site_file"
492  fi
493done
494
495if test -r "$cache_file"; then
496  echo "loading cache $cache_file"
497  . $cache_file
498else
499  echo "creating cache $cache_file"
500  > $cache_file
501fi
502
503ac_ext=c
504# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
505ac_cpp='$CPP $CPPFLAGS'
506ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
507ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
508cross_compiling=$ac_cv_prog_cc_cross
509
510if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
511  # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
512  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
513    ac_n= ac_c='
514' ac_t='        '
515  else
516    ac_n=-n ac_c= ac_t=
517  fi
518else
519  ac_n= ac_c='\c' ac_t=
520fi
521
522
523# SCCS: @(#) configure.in 1.18 98/08/12 17:29:39
524
525TCL_VERSION=8.0
526TCL_MAJOR_VERSION=8
527TCL_MINOR_VERSION=0
528TCL_PATCH_LEVEL=".3"
529VERSION=${TCL_VERSION}
530
531if test "${prefix}" = "NONE"; then
532    prefix=/usr/local
533fi
534if test "${exec_prefix}" = "NONE"; then
535    exec_prefix=$prefix
536fi
537TCL_SRC_DIR=`cd $srcdir/..; pwd`
538
539# Extract the first word of "ranlib", so it can be a program name with args.
540set dummy ranlib; ac_word=$2
541echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
542echo "configure:543: checking for $ac_word" >&5
543if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
544  echo $ac_n "(cached) $ac_c" 1>&6
545else
546  if test -n "$RANLIB"; then
547  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
548else
549  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
550  for ac_dir in $PATH; do
551    test -z "$ac_dir" && ac_dir=.
552    if test -f $ac_dir/$ac_word; then
553      ac_cv_prog_RANLIB="ranlib"
554      break
555    fi
556  done
557  IFS="$ac_save_ifs"
558  test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
559fi
560fi
561RANLIB="$ac_cv_prog_RANLIB"
562if test -n "$RANLIB"; then
563  echo "$ac_t""$RANLIB" 1>&6
564else
565  echo "$ac_t""no" 1>&6
566fi
567
568#AC_ARG_ENABLE(gcc, [  --enable-gcc            allow use of gcc if available],
569#    [tcl_ok=$enableval], [tcl_ok=no])
570#if test "$tcl_ok" = "yes"; then
571    # Extract the first word of "gcc", so it can be a program name with args.
572set dummy gcc; ac_word=$2
573echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
574echo "configure:575: checking for $ac_word" >&5
575if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
576  echo $ac_n "(cached) $ac_c" 1>&6
577else
578  if test -n "$CC"; then
579  ac_cv_prog_CC="$CC" # Let the user override the test.
580else
581  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
582  for ac_dir in $PATH; do
583    test -z "$ac_dir" && ac_dir=.
584    if test -f $ac_dir/$ac_word; then
585      ac_cv_prog_CC="gcc"
586      break
587    fi
588  done
589  IFS="$ac_save_ifs"
590fi
591fi
592CC="$ac_cv_prog_CC"
593if test -n "$CC"; then
594  echo "$ac_t""$CC" 1>&6
595else
596  echo "$ac_t""no" 1>&6
597fi
598
599if test -z "$CC"; then
600  # Extract the first word of "cc", so it can be a program name with args.
601set dummy cc; ac_word=$2
602echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
603echo "configure:604: checking for $ac_word" >&5
604if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
605  echo $ac_n "(cached) $ac_c" 1>&6
606else
607  if test -n "$CC"; then
608  ac_cv_prog_CC="$CC" # Let the user override the test.
609else
610  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
611  ac_prog_rejected=no
612  for ac_dir in $PATH; do
613    test -z "$ac_dir" && ac_dir=.
614    if test -f $ac_dir/$ac_word; then
615      if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
616        ac_prog_rejected=yes
617        continue
618      fi
619      ac_cv_prog_CC="cc"
620      break
621    fi
622  done
623  IFS="$ac_save_ifs"
624if test $ac_prog_rejected = yes; then
625  # We found a bogon in the path, so make sure we never use it.
626  set dummy $ac_cv_prog_CC
627  shift
628  if test $# -gt 0; then
629    # We chose a different compiler from the bogus one.
630    # However, it has the same basename, so the bogon will be chosen
631    # first if we set CC to just the basename; use the full file name.
632    shift
633    set dummy "$ac_dir/$ac_word" "$@"
634    shift
635    ac_cv_prog_CC="$@"
636  fi
637fi
638fi
639fi
640CC="$ac_cv_prog_CC"
641if test -n "$CC"; then
642  echo "$ac_t""$CC" 1>&6
643else
644  echo "$ac_t""no" 1>&6
645fi
646
647  test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
648fi
649
650echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
651echo "configure:652: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
652
653ac_ext=c
654# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
655ac_cpp='$CPP $CPPFLAGS'
656ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
657ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
658cross_compiling=$ac_cv_prog_cc_cross
659
660cat > conftest.$ac_ext <<EOF
661#line 662 "configure"
662#include "confdefs.h"
663main(){return(0);}
664EOF
665if { (eval echo configure:666: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
666  ac_cv_prog_cc_works=yes
667  # If we can't run a trivial program, we are probably using a cross compiler.
668  if (./conftest; exit) 2>/dev/null; then
669    ac_cv_prog_cc_cross=no
670  else
671    ac_cv_prog_cc_cross=yes
672  fi
673else
674  echo "configure: failed program was:" >&5
675  cat conftest.$ac_ext >&5
676  ac_cv_prog_cc_works=no
677fi
678rm -fr conftest*
679
680echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
681if test $ac_cv_prog_cc_works = no; then
682  { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
683fi
684echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
685echo "configure:686: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
686echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
687cross_compiling=$ac_cv_prog_cc_cross
688
689echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
690echo "configure:691: checking whether we are using GNU C" >&5
691if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
692  echo $ac_n "(cached) $ac_c" 1>&6
693else
694  cat > conftest.c <<EOF
695#ifdef __GNUC__
696  yes;
697#endif
698EOF
699if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:700: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
700  ac_cv_prog_gcc=yes
701else
702  ac_cv_prog_gcc=no
703fi
704fi
705
706echo "$ac_t""$ac_cv_prog_gcc" 1>&6
707
708if test $ac_cv_prog_gcc = yes; then
709  GCC=yes
710  ac_test_CFLAGS="${CFLAGS+set}"
711  ac_save_CFLAGS="$CFLAGS"
712  CFLAGS=
713  echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
714echo "configure:715: checking whether ${CC-cc} accepts -g" >&5
715if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
716  echo $ac_n "(cached) $ac_c" 1>&6
717else
718  echo 'void f(){}' > conftest.c
719if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
720  ac_cv_prog_cc_g=yes
721else
722  ac_cv_prog_cc_g=no
723fi
724rm -f conftest*
725
726fi
727
728echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
729  if test "$ac_test_CFLAGS" = set; then
730    CFLAGS="$ac_save_CFLAGS"
731  elif test $ac_cv_prog_cc_g = yes; then
732    CFLAGS="-g -O2"
733  else
734    CFLAGS="-O2"
735  fi
736else
737  GCC=
738  test "${CFLAGS+set}" = set || CFLAGS="-g"
739fi
740
741#else
742#    CC=${CC-cc}
743#AC_SUBST(CC)
744#fi
745
746# set the warning flags depending on whether or not we are using gcc
747if test "${GCC}" = "yes" ; then
748    CFLAGS_WARNING="-Wall -Wconversion"
749else
750    CFLAGS_WARNING=""
751fi
752
753#--------------------------------------------------------------------
754#       Supply substitutes for missing POSIX library procedures, or
755#       set flags so Tcl uses alternate procedures.
756#--------------------------------------------------------------------
757
758# Check if Posix compliant getcwd exists, if not we'll use getwd.
759for ac_func in getcwd
760do
761echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
762echo "configure:763: checking for $ac_func" >&5
763if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
764  echo $ac_n "(cached) $ac_c" 1>&6
765else
766  cat > conftest.$ac_ext <<EOF
767#line 768 "configure"
768#include "confdefs.h"
769/* System header to define __stub macros and hopefully few prototypes,
770    which can conflict with char $ac_func(); below.  */
771#include <assert.h>
772/* Override any gcc2 internal prototype to avoid an error.  */
773/* We use char because int might match the return type of a gcc2
774    builtin and then its argument prototype would still apply.  */
775char $ac_func();
776
777int main() {
778
779/* The GNU C library defines this for functions which it implements
780    to always fail with ENOSYS.  Some functions are actually named
781    something starting with __ and the normal name is an alias.  */
782#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
783choke me
784#else
785$ac_func();
786#endif
787
788; return 0; }
789EOF
790if { (eval echo configure:791: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
791  rm -rf conftest*
792  eval "ac_cv_func_$ac_func=yes"
793else
794  echo "configure: failed program was:" >&5
795  cat conftest.$ac_ext >&5
796  rm -rf conftest*
797  eval "ac_cv_func_$ac_func=no"
798fi
799rm -f conftest*
800fi
801
802if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
803  echo "$ac_t""yes" 1>&6
804    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
805  cat >> confdefs.h <<EOF
806#define $ac_tr_func 1
807EOF
808 
809else
810  echo "$ac_t""no" 1>&6
811cat >> confdefs.h <<\EOF
812#define USEGETWD 1
813EOF
814
815fi
816done
817
818# Nb: if getcwd uses popen and pwd(1) (like SunOS 4) we should really
819# define USEGETWD even if the posix getcwd exists. Add a test ?
820
821for ac_func in opendir strstr
822do
823echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
824echo "configure:825: checking for $ac_func" >&5
825if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
826  echo $ac_n "(cached) $ac_c" 1>&6
827else
828  cat > conftest.$ac_ext <<EOF
829#line 830 "configure"
830#include "confdefs.h"
831/* System header to define __stub macros and hopefully few prototypes,
832    which can conflict with char $ac_func(); below.  */
833#include <assert.h>
834/* Override any gcc2 internal prototype to avoid an error.  */
835/* We use char because int might match the return type of a gcc2
836    builtin and then its argument prototype would still apply.  */
837char $ac_func();
838
839int main() {
840
841/* The GNU C library defines this for functions which it implements
842    to always fail with ENOSYS.  Some functions are actually named
843    something starting with __ and the normal name is an alias.  */
844#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
845choke me
846#else
847$ac_func();
848#endif
849
850; return 0; }
851EOF
852if { (eval echo configure:853: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
853  rm -rf conftest*
854  eval "ac_cv_func_$ac_func=yes"
855else
856  echo "configure: failed program was:" >&5
857  cat conftest.$ac_ext >&5
858  rm -rf conftest*
859  eval "ac_cv_func_$ac_func=no"
860fi
861rm -f conftest*
862fi
863
864if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
865  echo "$ac_t""yes" 1>&6
866    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
867  cat >> confdefs.h <<EOF
868#define $ac_tr_func 1
869EOF
870 
871else
872  echo "$ac_t""no" 1>&6
873LIBOBJS="$LIBOBJS ${ac_func}.o"
874fi
875done
876
877
878
879for ac_func in strtol tmpnam waitpid
880do
881echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
882echo "configure:883: checking for $ac_func" >&5
883if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
884  echo $ac_n "(cached) $ac_c" 1>&6
885else
886  cat > conftest.$ac_ext <<EOF
887#line 888 "configure"
888#include "confdefs.h"
889/* System header to define __stub macros and hopefully few prototypes,
890    which can conflict with char $ac_func(); below.  */
891#include <assert.h>
892/* Override any gcc2 internal prototype to avoid an error.  */
893/* We use char because int might match the return type of a gcc2
894    builtin and then its argument prototype would still apply.  */
895char $ac_func();
896
897int main() {
898
899/* The GNU C library defines this for functions which it implements
900    to always fail with ENOSYS.  Some functions are actually named
901    something starting with __ and the normal name is an alias.  */
902#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
903choke me
904#else
905$ac_func();
906#endif
907
908; return 0; }
909EOF
910if { (eval echo configure:911: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
911  rm -rf conftest*
912  eval "ac_cv_func_$ac_func=yes"
913else
914  echo "configure: failed program was:" >&5
915  cat conftest.$ac_ext >&5
916  rm -rf conftest*
917  eval "ac_cv_func_$ac_func=no"
918fi
919rm -f conftest*
920fi
921
922if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
923  echo "$ac_t""yes" 1>&6
924    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
925  cat >> confdefs.h <<EOF
926#define $ac_tr_func 1
927EOF
928 
929else
930  echo "$ac_t""no" 1>&6
931LIBOBJS="$LIBOBJS ${ac_func}.o"
932fi
933done
934
935
936echo $ac_n "checking for strerror""... $ac_c" 1>&6
937echo "configure:938: checking for strerror" >&5
938if eval "test \"`echo '$''{'ac_cv_func_strerror'+set}'`\" = set"; then
939  echo $ac_n "(cached) $ac_c" 1>&6
940else
941  cat > conftest.$ac_ext <<EOF
942#line 943 "configure"
943#include "confdefs.h"
944/* System header to define __stub macros and hopefully few prototypes,
945    which can conflict with char strerror(); below.  */
946#include <assert.h>
947/* Override any gcc2 internal prototype to avoid an error.  */
948/* We use char because int might match the return type of a gcc2
949    builtin and then its argument prototype would still apply.  */
950char strerror();
951
952int main() {
953
954/* The GNU C library defines this for functions which it implements
955    to always fail with ENOSYS.  Some functions are actually named
956    something starting with __ and the normal name is an alias.  */
957#if defined (__stub_strerror) || defined (__stub___strerror)
958choke me
959#else
960strerror();
961#endif
962
963; return 0; }
964EOF
965if { (eval echo configure:966: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
966  rm -rf conftest*
967  eval "ac_cv_func_strerror=yes"
968else
969  echo "configure: failed program was:" >&5
970  cat conftest.$ac_ext >&5
971  rm -rf conftest*
972  eval "ac_cv_func_strerror=no"
973fi
974rm -f conftest*
975fi
976
977if eval "test \"`echo '$ac_cv_func_'strerror`\" = yes"; then
978  echo "$ac_t""yes" 1>&6
979  :
980else
981  echo "$ac_t""no" 1>&6
982cat >> confdefs.h <<\EOF
983#define NO_STRERROR 1
984EOF
985
986fi
987
988echo $ac_n "checking for getwd""... $ac_c" 1>&6
989echo "configure:990: checking for getwd" >&5
990if eval "test \"`echo '$''{'ac_cv_func_getwd'+set}'`\" = set"; then
991  echo $ac_n "(cached) $ac_c" 1>&6
992else
993  cat > conftest.$ac_ext <<EOF
994#line 995 "configure"
995#include "confdefs.h"
996/* System header to define __stub macros and hopefully few prototypes,
997    which can conflict with char getwd(); below.  */
998#include <assert.h>
999/* Override any gcc2 internal prototype to avoid an error.  */
1000/* We use char because int might match the return type of a gcc2
1001    builtin and then its argument prototype would still apply.  */
1002char getwd();
1003
1004int main() {
1005
1006/* The GNU C library defines this for functions which it implements
1007    to always fail with ENOSYS.  Some functions are actually named
1008    something starting with __ and the normal name is an alias.  */
1009#if defined (__stub_getwd) || defined (__stub___getwd)
1010choke me
1011#else
1012getwd();
1013#endif
1014
1015; return 0; }
1016EOF
1017if { (eval echo configure:1018: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1018  rm -rf conftest*
1019  eval "ac_cv_func_getwd=yes"
1020else
1021  echo "configure: failed program was:" >&5
1022  cat conftest.$ac_ext >&5
1023  rm -rf conftest*
1024  eval "ac_cv_func_getwd=no"
1025fi
1026rm -f conftest*
1027fi
1028
1029if eval "test \"`echo '$ac_cv_func_'getwd`\" = yes"; then
1030  echo "$ac_t""yes" 1>&6
1031  :
1032else
1033  echo "$ac_t""no" 1>&6
1034cat >> confdefs.h <<\EOF
1035#define NO_GETWD 1
1036EOF
1037
1038fi
1039
1040echo $ac_n "checking for wait3""... $ac_c" 1>&6
1041echo "configure:1042: checking for wait3" >&5
1042if eval "test \"`echo '$''{'ac_cv_func_wait3'+set}'`\" = set"; then
1043  echo $ac_n "(cached) $ac_c" 1>&6
1044else
1045  cat > conftest.$ac_ext <<EOF
1046#line 1047 "configure"
1047#include "confdefs.h"
1048/* System header to define __stub macros and hopefully few prototypes,
1049    which can conflict with char wait3(); below.  */
1050#include <assert.h>
1051/* Override any gcc2 internal prototype to avoid an error.  */
1052/* We use char because int might match the return type of a gcc2
1053    builtin and then its argument prototype would still apply.  */
1054char wait3();
1055
1056int main() {
1057
1058/* The GNU C library defines this for functions which it implements
1059    to always fail with ENOSYS.  Some functions are actually named
1060    something starting with __ and the normal name is an alias.  */
1061#if defined (__stub_wait3) || defined (__stub___wait3)
1062choke me
1063#else
1064wait3();
1065#endif
1066
1067; return 0; }
1068EOF
1069if { (eval echo configure:1070: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1070  rm -rf conftest*
1071  eval "ac_cv_func_wait3=yes"
1072else
1073  echo "configure: failed program was:" >&5
1074  cat conftest.$ac_ext >&5
1075  rm -rf conftest*
1076  eval "ac_cv_func_wait3=no"
1077fi
1078rm -f conftest*
1079fi
1080
1081if eval "test \"`echo '$ac_cv_func_'wait3`\" = yes"; then
1082  echo "$ac_t""yes" 1>&6
1083  :
1084else
1085  echo "$ac_t""no" 1>&6
1086cat >> confdefs.h <<\EOF
1087#define NO_WAIT3 1
1088EOF
1089
1090fi
1091
1092echo $ac_n "checking for uname""... $ac_c" 1>&6
1093echo "configure:1094: checking for uname" >&5
1094if eval "test \"`echo '$''{'ac_cv_func_uname'+set}'`\" = set"; then
1095  echo $ac_n "(cached) $ac_c" 1>&6
1096else
1097  cat > conftest.$ac_ext <<EOF
1098#line 1099 "configure"
1099#include "confdefs.h"
1100/* System header to define __stub macros and hopefully few prototypes,
1101    which can conflict with char uname(); below.  */
1102#include <assert.h>
1103/* Override any gcc2 internal prototype to avoid an error.  */
1104/* We use char because int might match the return type of a gcc2
1105    builtin and then its argument prototype would still apply.  */
1106char uname();
1107
1108int main() {
1109
1110/* The GNU C library defines this for functions which it implements
1111    to always fail with ENOSYS.  Some functions are actually named
1112    something starting with __ and the normal name is an alias.  */
1113#if defined (__stub_uname) || defined (__stub___uname)
1114choke me
1115#else
1116uname();
1117#endif
1118
1119; return 0; }
1120EOF
1121if { (eval echo configure:1122: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1122  rm -rf conftest*
1123  eval "ac_cv_func_uname=yes"
1124else
1125  echo "configure: failed program was:" >&5
1126  cat conftest.$ac_ext >&5
1127  rm -rf conftest*
1128  eval "ac_cv_func_uname=no"
1129fi
1130rm -f conftest*
1131fi
1132
1133if eval "test \"`echo '$ac_cv_func_'uname`\" = yes"; then
1134  echo "$ac_t""yes" 1>&6
1135  :
1136else
1137  echo "$ac_t""no" 1>&6
1138cat >> confdefs.h <<\EOF
1139#define NO_UNAME 1
1140EOF
1141
1142fi
1143
1144
1145#--------------------------------------------------------------------
1146#       On a few very rare systems, all of the libm.a stuff is
1147#       already in libc.a.  Set compiler flags accordingly.
1148#       Also, Linux requires the "ieee" library for math to work
1149#       right (and it must appear before "-lm").
1150#--------------------------------------------------------------------
1151
1152echo $ac_n "checking for sin""... $ac_c" 1>&6
1153echo "configure:1154: checking for sin" >&5
1154if eval "test \"`echo '$''{'ac_cv_func_sin'+set}'`\" = set"; then
1155  echo $ac_n "(cached) $ac_c" 1>&6
1156else
1157  cat > conftest.$ac_ext <<EOF
1158#line 1159 "configure"
1159#include "confdefs.h"
1160/* System header to define __stub macros and hopefully few prototypes,
1161    which can conflict with char sin(); below.  */
1162#include <assert.h>
1163/* Override any gcc2 internal prototype to avoid an error.  */
1164/* We use char because int might match the return type of a gcc2
1165    builtin and then its argument prototype would still apply.  */
1166char sin();
1167
1168int main() {
1169
1170/* The GNU C library defines this for functions which it implements
1171    to always fail with ENOSYS.  Some functions are actually named
1172    something starting with __ and the normal name is an alias.  */
1173#if defined (__stub_sin) || defined (__stub___sin)
1174choke me
1175#else
1176sin();
1177#endif
1178
1179; return 0; }
1180EOF
1181if { (eval echo configure:1182: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1182  rm -rf conftest*
1183  eval "ac_cv_func_sin=yes"
1184else
1185  echo "configure: failed program was:" >&5
1186  cat conftest.$ac_ext >&5
1187  rm -rf conftest*
1188  eval "ac_cv_func_sin=no"
1189fi
1190rm -f conftest*
1191fi
1192
1193if eval "test \"`echo '$ac_cv_func_'sin`\" = yes"; then
1194  echo "$ac_t""yes" 1>&6
1195  MATH_LIBS=""
1196else
1197  echo "$ac_t""no" 1>&6
1198MATH_LIBS="-lm"
1199fi
1200
1201echo $ac_n "checking for main in -lieee""... $ac_c" 1>&6
1202echo "configure:1203: checking for main in -lieee" >&5
1203ac_lib_var=`echo ieee'_'main | sed 'y%./+-%__p_%'`
1204if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1205  echo $ac_n "(cached) $ac_c" 1>&6
1206else
1207  ac_save_LIBS="$LIBS"
1208LIBS="-lieee  $LIBS"
1209cat > conftest.$ac_ext <<EOF
1210#line 1211 "configure"
1211#include "confdefs.h"
1212
1213int main() {
1214main()
1215; return 0; }
1216EOF
1217if { (eval echo configure:1218: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1218  rm -rf conftest*
1219  eval "ac_cv_lib_$ac_lib_var=yes"
1220else
1221  echo "configure: failed program was:" >&5
1222  cat conftest.$ac_ext >&5
1223  rm -rf conftest*
1224  eval "ac_cv_lib_$ac_lib_var=no"
1225fi
1226rm -f conftest*
1227LIBS="$ac_save_LIBS"
1228
1229fi
1230if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1231  echo "$ac_t""yes" 1>&6
1232  MATH_LIBS="-lieee $MATH_LIBS"
1233else
1234  echo "$ac_t""no" 1>&6
1235fi
1236
1237
1238#--------------------------------------------------------------------
1239#       On AIX systems, libbsd.a has to be linked in to support
1240#       non-blocking file IO.  This library has to be linked in after
1241#       the MATH_LIBS or it breaks the pow() function.  The way to
1242#       insure proper sequencing, is to add it to the tail of MATH_LIBS.
1243#        This library also supplies gettimeofday.
1244#--------------------------------------------------------------------
1245libbsd=no
1246if test "`uname -s`" = "AIX" ; then
1247    echo $ac_n "checking for gettimeofday in -lbsd""... $ac_c" 1>&6
1248echo "configure:1249: checking for gettimeofday in -lbsd" >&5
1249ac_lib_var=`echo bsd'_'gettimeofday | sed 'y%./+-%__p_%'`
1250if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1251  echo $ac_n "(cached) $ac_c" 1>&6
1252else
1253  ac_save_LIBS="$LIBS"
1254LIBS="-lbsd  $LIBS"
1255cat > conftest.$ac_ext <<EOF
1256#line 1257 "configure"
1257#include "confdefs.h"
1258/* Override any gcc2 internal prototype to avoid an error.  */
1259/* We use char because int might match the return type of a gcc2
1260    builtin and then its argument prototype would still apply.  */
1261char gettimeofday();
1262
1263int main() {
1264gettimeofday()
1265; return 0; }
1266EOF
1267if { (eval echo configure:1268: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1268  rm -rf conftest*
1269  eval "ac_cv_lib_$ac_lib_var=yes"
1270else
1271  echo "configure: failed program was:" >&5
1272  cat conftest.$ac_ext >&5
1273  rm -rf conftest*
1274  eval "ac_cv_lib_$ac_lib_var=no"
1275fi
1276rm -f conftest*
1277LIBS="$ac_save_LIBS"
1278
1279fi
1280if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1281  echo "$ac_t""yes" 1>&6
1282  libbsd=yes
1283else
1284  echo "$ac_t""no" 1>&6
1285fi
1286
1287    if test $libbsd = yes; then
1288        MATH_LIBS="$MATH_LIBS -lbsd"
1289    fi
1290fi
1291
1292#--------------------------------------------------------------------
1293#       Supply substitutes for missing POSIX header files.  Special
1294#       notes:
1295#           - stdlib.h doesn't define strtol, strtoul, or
1296#             strtod insome versions of SunOS
1297#           - some versions of string.h don't declare procedures such
1298#             as strstr
1299#--------------------------------------------------------------------
1300
1301echo $ac_n "checking dirent.h""... $ac_c" 1>&6
1302echo "configure:1303: checking dirent.h" >&5
1303cat > conftest.$ac_ext <<EOF
1304#line 1305 "configure"
1305#include "confdefs.h"
1306#include <sys/types.h>
1307#include <dirent.h>
1308int main() {
1309
1310#ifndef _POSIX_SOURCE
1311#   ifdef __Lynx__
1312        /*
1313         * Generate compilation error to make the test fail:  Lynx headers
1314         * are only valid if really in the POSIX environment.
1315         */
1316
1317        missing_procedure();
1318#   endif
1319#endif
1320DIR *d;
1321struct dirent *entryPtr;
1322char *p;
1323d = opendir("foobar");
1324entryPtr = readdir(d);
1325p = entryPtr->d_name;
1326closedir(d);
1327
1328; return 0; }
1329EOF
1330if { (eval echo configure:1331: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1331  rm -rf conftest*
1332  tcl_ok=yes
1333else
1334  echo "configure: failed program was:" >&5
1335  cat conftest.$ac_ext >&5
1336  rm -rf conftest*
1337  tcl_ok=no
1338fi
1339rm -f conftest*
1340if test $tcl_ok = no; then
1341    cat >> confdefs.h <<\EOF
1342#define NO_DIRENT_H 1
1343EOF
1344
1345fi
1346echo "$ac_t""$tcl_ok" 1>&6
1347echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1348echo "configure:1349: checking how to run the C preprocessor" >&5
1349# On Suns, sometimes $CPP names a directory.
1350if test -n "$CPP" && test -d "$CPP"; then
1351  CPP=
1352fi
1353if test -z "$CPP"; then
1354if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1355  echo $ac_n "(cached) $ac_c" 1>&6
1356else
1357    # This must be in double quotes, not single quotes, because CPP may get
1358  # substituted into the Makefile and "${CC-cc}" will confuse make.
1359  CPP="${CC-cc} -E"
1360  # On the NeXT, cc -E runs the code through the compiler's parser,
1361  # not just through cpp.
1362  cat > conftest.$ac_ext <<EOF
1363#line 1364 "configure"
1364#include "confdefs.h"
1365#include <assert.h>
1366Syntax Error
1367EOF
1368ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1369{ (eval echo configure:1370: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1370ac_err=`grep -v '^ *+' conftest.out`
1371if test -z "$ac_err"; then
1372  :
1373else
1374  echo "$ac_err" >&5
1375  echo "configure: failed program was:" >&5
1376  cat conftest.$ac_ext >&5
1377  rm -rf conftest*
1378  CPP="${CC-cc} -E -traditional-cpp"
1379  cat > conftest.$ac_ext <<EOF
1380#line 1381 "configure"
1381#include "confdefs.h"
1382#include <assert.h>
1383Syntax Error
1384EOF
1385ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1386{ (eval echo configure:1387: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1387ac_err=`grep -v '^ *+' conftest.out`
1388if test -z "$ac_err"; then
1389  :
1390else
1391  echo "$ac_err" >&5
1392  echo "configure: failed program was:" >&5
1393  cat conftest.$ac_ext >&5
1394  rm -rf conftest*
1395  CPP=/lib/cpp
1396fi
1397rm -f conftest*
1398fi
1399rm -f conftest*
1400  ac_cv_prog_CPP="$CPP"
1401fi
1402  CPP="$ac_cv_prog_CPP"
1403else
1404  ac_cv_prog_CPP="$CPP"
1405fi
1406echo "$ac_t""$CPP" 1>&6
1407
1408ac_safe=`echo "errno.h" | sed 'y%./+-%__p_%'`
1409echo $ac_n "checking for errno.h""... $ac_c" 1>&6
1410echo "configure:1411: checking for errno.h" >&5
1411if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1412  echo $ac_n "(cached) $ac_c" 1>&6
1413else
1414  cat > conftest.$ac_ext <<EOF
1415#line 1416 "configure"
1416#include "confdefs.h"
1417#include <errno.h>
1418EOF
1419ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1420{ (eval echo configure:1421: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1421ac_err=`grep -v '^ *+' conftest.out`
1422if test -z "$ac_err"; then
1423  rm -rf conftest*
1424  eval "ac_cv_header_$ac_safe=yes"
1425else
1426  echo "$ac_err" >&5
1427  echo "configure: failed program was:" >&5
1428  cat conftest.$ac_ext >&5
1429  rm -rf conftest*
1430  eval "ac_cv_header_$ac_safe=no"
1431fi
1432rm -f conftest*
1433fi
1434if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1435  echo "$ac_t""yes" 1>&6
1436  :
1437else
1438  echo "$ac_t""no" 1>&6
1439cat >> confdefs.h <<\EOF
1440#define NO_ERRNO_H 1
1441EOF
1442
1443fi
1444
1445ac_safe=`echo "float.h" | sed 'y%./+-%__p_%'`
1446echo $ac_n "checking for float.h""... $ac_c" 1>&6
1447echo "configure:1448: checking for float.h" >&5
1448if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1449  echo $ac_n "(cached) $ac_c" 1>&6
1450else
1451  cat > conftest.$ac_ext <<EOF
1452#line 1453 "configure"
1453#include "confdefs.h"
1454#include <float.h>
1455EOF
1456ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1457{ (eval echo configure:1458: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1458ac_err=`grep -v '^ *+' conftest.out`
1459if test -z "$ac_err"; then
1460  rm -rf conftest*
1461  eval "ac_cv_header_$ac_safe=yes"
1462else
1463  echo "$ac_err" >&5
1464  echo "configure: failed program was:" >&5
1465  cat conftest.$ac_ext >&5
1466  rm -rf conftest*
1467  eval "ac_cv_header_$ac_safe=no"
1468fi
1469rm -f conftest*
1470fi
1471if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1472  echo "$ac_t""yes" 1>&6
1473  :
1474else
1475  echo "$ac_t""no" 1>&6
1476cat >> confdefs.h <<\EOF
1477#define NO_FLOAT_H 1
1478EOF
1479
1480fi
1481
1482ac_safe=`echo "values.h" | sed 'y%./+-%__p_%'`
1483echo $ac_n "checking for values.h""... $ac_c" 1>&6
1484echo "configure:1485: checking for values.h" >&5
1485if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1486  echo $ac_n "(cached) $ac_c" 1>&6
1487else
1488  cat > conftest.$ac_ext <<EOF
1489#line 1490 "configure"
1490#include "confdefs.h"
1491#include <values.h>
1492EOF
1493ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1494{ (eval echo configure:1495: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1495ac_err=`grep -v '^ *+' conftest.out`
1496if test -z "$ac_err"; then
1497  rm -rf conftest*
1498  eval "ac_cv_header_$ac_safe=yes"
1499else
1500  echo "$ac_err" >&5
1501  echo "configure: failed program was:" >&5
1502  cat conftest.$ac_ext >&5
1503  rm -rf conftest*
1504  eval "ac_cv_header_$ac_safe=no"
1505fi
1506rm -f conftest*
1507fi
1508if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1509  echo "$ac_t""yes" 1>&6
1510  :
1511else
1512  echo "$ac_t""no" 1>&6
1513cat >> confdefs.h <<\EOF
1514#define NO_VALUES_H 1
1515EOF
1516
1517fi
1518
1519ac_safe=`echo "limits.h" | sed 'y%./+-%__p_%'`
1520echo $ac_n "checking for limits.h""... $ac_c" 1>&6
1521echo "configure:1522: checking for limits.h" >&5
1522if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1523  echo $ac_n "(cached) $ac_c" 1>&6
1524else
1525  cat > conftest.$ac_ext <<EOF
1526#line 1527 "configure"
1527#include "confdefs.h"
1528#include <limits.h>
1529EOF
1530ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1531{ (eval echo configure:1532: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1532ac_err=`grep -v '^ *+' conftest.out`
1533if test -z "$ac_err"; then
1534  rm -rf conftest*
1535  eval "ac_cv_header_$ac_safe=yes"
1536else
1537  echo "$ac_err" >&5
1538  echo "configure: failed program was:" >&5
1539  cat conftest.$ac_ext >&5
1540  rm -rf conftest*
1541  eval "ac_cv_header_$ac_safe=no"
1542fi
1543rm -f conftest*
1544fi
1545if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1546  echo "$ac_t""yes" 1>&6
1547  :
1548else
1549  echo "$ac_t""no" 1>&6
1550cat >> confdefs.h <<\EOF
1551#define NO_LIMITS_H 1
1552EOF
1553
1554fi
1555
1556ac_safe=`echo "stdlib.h" | sed 'y%./+-%__p_%'`
1557echo $ac_n "checking for stdlib.h""... $ac_c" 1>&6
1558echo "configure:1559: checking for stdlib.h" >&5
1559if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1560  echo $ac_n "(cached) $ac_c" 1>&6
1561else
1562  cat > conftest.$ac_ext <<EOF
1563#line 1564 "configure"
1564#include "confdefs.h"
1565#include <stdlib.h>
1566EOF
1567ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1568{ (eval echo configure:1569: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1569ac_err=`grep -v '^ *+' conftest.out`
1570if test -z "$ac_err"; then
1571  rm -rf conftest*
1572  eval "ac_cv_header_$ac_safe=yes"
1573else
1574  echo "$ac_err" >&5
1575  echo "configure: failed program was:" >&5
1576  cat conftest.$ac_ext >&5
1577  rm -rf conftest*
1578  eval "ac_cv_header_$ac_safe=no"
1579fi
1580rm -f conftest*
1581fi
1582if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1583  echo "$ac_t""yes" 1>&6
1584  tcl_ok=1
1585else
1586  echo "$ac_t""no" 1>&6
1587tcl_ok=0
1588fi
1589
1590cat > conftest.$ac_ext <<EOF
1591#line 1592 "configure"
1592#include "confdefs.h"
1593#include <stdlib.h>
1594EOF
1595if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1596  egrep "strtol" >/dev/null 2>&1; then
1597  :
1598else
1599  rm -rf conftest*
1600  tcl_ok=0
1601fi
1602rm -f conftest*
1603
1604cat > conftest.$ac_ext <<EOF
1605#line 1606 "configure"
1606#include "confdefs.h"
1607#include <stdlib.h>
1608EOF
1609if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1610  egrep "strtoul" >/dev/null 2>&1; then
1611  :
1612else
1613  rm -rf conftest*
1614  tcl_ok=0
1615fi
1616rm -f conftest*
1617
1618cat > conftest.$ac_ext <<EOF
1619#line 1620 "configure"
1620#include "confdefs.h"
1621#include <stdlib.h>
1622EOF
1623if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1624  egrep "strtod" >/dev/null 2>&1; then
1625  :
1626else
1627  rm -rf conftest*
1628  tcl_ok=0
1629fi
1630rm -f conftest*
1631
1632if test $tcl_ok = 0; then
1633    cat >> confdefs.h <<\EOF
1634#define NO_STDLIB_H 1
1635EOF
1636
1637fi
1638ac_safe=`echo "string.h" | sed 'y%./+-%__p_%'`
1639echo $ac_n "checking for string.h""... $ac_c" 1>&6
1640echo "configure:1641: checking for string.h" >&5
1641if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1642  echo $ac_n "(cached) $ac_c" 1>&6
1643else
1644  cat > conftest.$ac_ext <<EOF
1645#line 1646 "configure"
1646#include "confdefs.h"
1647#include <string.h>
1648EOF
1649ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1650{ (eval echo configure:1651: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1651ac_err=`grep -v '^ *+' conftest.out`
1652if test -z "$ac_err"; then
1653  rm -rf conftest*
1654  eval "ac_cv_header_$ac_safe=yes"
1655else
1656  echo "$ac_err" >&5
1657  echo "configure: failed program was:" >&5
1658  cat conftest.$ac_ext >&5
1659  rm -rf conftest*
1660  eval "ac_cv_header_$ac_safe=no"
1661fi
1662rm -f conftest*
1663fi
1664if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1665  echo "$ac_t""yes" 1>&6
1666  tcl_ok=1
1667else
1668  echo "$ac_t""no" 1>&6
1669tcl_ok=0
1670fi
1671
1672cat > conftest.$ac_ext <<EOF
1673#line 1674 "configure"
1674#include "confdefs.h"
1675#include <string.h>
1676EOF
1677if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1678  egrep "strstr" >/dev/null 2>&1; then
1679  :
1680else
1681  rm -rf conftest*
1682  tcl_ok=0
1683fi
1684rm -f conftest*
1685
1686cat > conftest.$ac_ext <<EOF
1687#line 1688 "configure"
1688#include "confdefs.h"
1689#include <string.h>
1690EOF
1691if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1692  egrep "strerror" >/dev/null 2>&1; then
1693  :
1694else
1695  rm -rf conftest*
1696  tcl_ok=0
1697fi
1698rm -f conftest*
1699
1700if test $tcl_ok = 0; then
1701    cat >> confdefs.h <<\EOF
1702#define NO_STRING_H 1
1703EOF
1704
1705fi
1706ac_safe=`echo "sys/wait.h" | sed 'y%./+-%__p_%'`
1707echo $ac_n "checking for sys/wait.h""... $ac_c" 1>&6
1708echo "configure:1709: checking for sys/wait.h" >&5
1709if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1710  echo $ac_n "(cached) $ac_c" 1>&6
1711else
1712  cat > conftest.$ac_ext <<EOF
1713#line 1714 "configure"
1714#include "confdefs.h"
1715#include <sys/wait.h>
1716EOF
1717ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1718{ (eval echo configure:1719: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1719ac_err=`grep -v '^ *+' conftest.out`
1720if test -z "$ac_err"; then
1721  rm -rf conftest*
1722  eval "ac_cv_header_$ac_safe=yes"
1723else
1724  echo "$ac_err" >&5
1725  echo "configure: failed program was:" >&5
1726  cat conftest.$ac_ext >&5
1727  rm -rf conftest*
1728  eval "ac_cv_header_$ac_safe=no"
1729fi
1730rm -f conftest*
1731fi
1732if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1733  echo "$ac_t""yes" 1>&6
1734  :
1735else
1736  echo "$ac_t""no" 1>&6
1737cat >> confdefs.h <<\EOF
1738#define NO_SYS_WAIT_H 1
1739EOF
1740
1741fi
1742
1743ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
1744echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
1745echo "configure:1746: checking for dlfcn.h" >&5
1746if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1747  echo $ac_n "(cached) $ac_c" 1>&6
1748else
1749  cat > conftest.$ac_ext <<EOF
1750#line 1751 "configure"
1751#include "confdefs.h"
1752#include <dlfcn.h>
1753EOF
1754ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1755{ (eval echo configure:1756: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1756ac_err=`grep -v '^ *+' conftest.out`
1757if test -z "$ac_err"; then
1758  rm -rf conftest*
1759  eval "ac_cv_header_$ac_safe=yes"
1760else
1761  echo "$ac_err" >&5
1762  echo "configure: failed program was:" >&5
1763  cat conftest.$ac_ext >&5
1764  rm -rf conftest*
1765  eval "ac_cv_header_$ac_safe=no"
1766fi
1767rm -f conftest*
1768fi
1769if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1770  echo "$ac_t""yes" 1>&6
1771  :
1772else
1773  echo "$ac_t""no" 1>&6
1774cat >> confdefs.h <<\EOF
1775#define NO_DLFCN_H 1
1776EOF
1777
1778fi
1779
1780for ac_hdr in unistd.h
1781do
1782ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1783echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1784echo "configure:1785: checking for $ac_hdr" >&5
1785if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1786  echo $ac_n "(cached) $ac_c" 1>&6
1787else
1788  cat > conftest.$ac_ext <<EOF
1789#line 1790 "configure"
1790#include "confdefs.h"
1791#include <$ac_hdr>
1792EOF
1793ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1794{ (eval echo configure:1795: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1795ac_err=`grep -v '^ *+' conftest.out`
1796if test -z "$ac_err"; then
1797  rm -rf conftest*
1798  eval "ac_cv_header_$ac_safe=yes"
1799else
1800  echo "$ac_err" >&5
1801  echo "configure: failed program was:" >&5
1802  cat conftest.$ac_ext >&5
1803  rm -rf conftest*
1804  eval "ac_cv_header_$ac_safe=no"
1805fi
1806rm -f conftest*
1807fi
1808if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1809  echo "$ac_t""yes" 1>&6
1810    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1811  cat >> confdefs.h <<EOF
1812#define $ac_tr_hdr 1
1813EOF
1814 
1815else
1816  echo "$ac_t""no" 1>&6
1817fi
1818done
1819
1820
1821#---------------------------------------------------------------------------
1822#       Determine which interface to use to talk to the serial port.
1823#       Note that #include lines must begin in leftmost column for
1824#       some compilers to recognize them as preprocessor directives.
1825#---------------------------------------------------------------------------
1826
1827echo $ac_n "checking termios vs. termio vs. sgtty""... $ac_c" 1>&6
1828echo "configure:1829: checking termios vs. termio vs. sgtty" >&5
1829if test "$cross_compiling" = yes; then
1830  tk_ok=no
1831else
1832  cat > conftest.$ac_ext <<EOF
1833#line 1834 "configure"
1834#include "confdefs.h"
1835
1836#include <termios.h>
1837
1838main()
1839{
1840    struct termios t;
1841    if (tcgetattr(0, &t) == 0) {
1842        cfsetospeed(&t, 0);
1843        t.c_cflag |= PARENB | PARODD | CSIZE | CSTOPB;
1844        return 0;
1845    }
1846    return 1;
1847}
1848EOF
1849if { (eval echo configure:1850: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
1850then
1851  tk_ok=termios
1852else
1853  echo "configure: failed program was:" >&5
1854  cat conftest.$ac_ext >&5
1855  rm -fr conftest*
1856  tk_ok=no
1857fi
1858rm -fr conftest*
1859fi
1860
1861if test $tk_ok = termios; then
1862    cat >> confdefs.h <<\EOF
1863#define USE_TERMIOS 1
1864EOF
1865
1866else
1867if test "$cross_compiling" = yes; then
1868  tk_ok=no
1869else
1870  cat > conftest.$ac_ext <<EOF
1871#line 1872 "configure"
1872#include "confdefs.h"
1873
1874#include <termio.h>
1875
1876main()
1877{
1878    struct termio t;
1879    if (ioctl(0, TCGETA, &t) == 0) {
1880        t.c_cflag |= CBAUD | PARENB | PARODD | CSIZE | CSTOPB;
1881        return 0;
1882    }
1883    return 1;
1884}
1885EOF
1886if { (eval echo configure:1887: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
1887then
1888  tk_ok=termio
1889else
1890  echo "configure: failed program was:" >&5
1891  cat conftest.$ac_ext >&5
1892  rm -fr conftest*
1893  tk_ok=no
1894fi
1895rm -fr conftest*
1896fi
1897
1898if test $tk_ok = termio; then
1899    cat >> confdefs.h <<\EOF
1900#define USE_TERMIO 1
1901EOF
1902
1903else
1904if test "$cross_compiling" = yes; then
1905  tk_ok=none
1906else
1907  cat > conftest.$ac_ext <<EOF
1908#line 1909 "configure"
1909#include "confdefs.h"
1910
1911#include <sgtty.h>
1912
1913main()
1914{
1915    struct sgttyb t;
1916    if (ioctl(0, TIOCGETP, &t) == 0) {
1917        t.sg_ospeed = 0;
1918        t.sg_flags |= ODDP | EVENP | RAW;
1919        return 0;
1920    }
1921    return 1;
1922}
1923EOF
1924if { (eval echo configure:1925: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
1925then
1926  tk_ok=sgtty
1927else
1928  echo "configure: failed program was:" >&5
1929  cat conftest.$ac_ext >&5
1930  rm -fr conftest*
1931  tk_ok=none
1932fi
1933rm -fr conftest*
1934fi
1935
1936if test $tk_ok = sgtty; then
1937    cat >> confdefs.h <<\EOF
1938#define USE_SGTTY 1
1939EOF
1940
1941fi
1942fi
1943fi
1944echo "$ac_t""$tk_ok" 1>&6
1945
1946#--------------------------------------------------------------------
1947#       Include sys/select.h if it exists and if it supplies things
1948#       that appear to be useful and aren't already in sys/types.h.
1949#       This appears to be true only on the RS/6000 under AIX.  Some
1950#       systems like OSF/1 have a sys/select.h that's of no use, and
1951#       other systems like SCO UNIX have a sys/select.h that's
1952#       pernicious.  If "fd_set" isn't defined anywhere then set a
1953#       special flag.
1954#--------------------------------------------------------------------
1955
1956echo $ac_n "checking fd_set and sys/select""... $ac_c" 1>&6
1957echo "configure:1958: checking fd_set and sys/select" >&5
1958cat > conftest.$ac_ext <<EOF
1959#line 1960 "configure"
1960#include "confdefs.h"
1961#include <sys/types.h>
1962int main() {
1963fd_set readMask, writeMask;
1964; return 0; }
1965EOF
1966if { (eval echo configure:1967: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1967  rm -rf conftest*
1968  tk_ok=yes
1969else
1970  echo "configure: failed program was:" >&5
1971  cat conftest.$ac_ext >&5
1972  rm -rf conftest*
1973  tk_ok=no
1974fi
1975rm -f conftest*
1976if test $tk_ok = no; then
1977    cat > conftest.$ac_ext <<EOF
1978#line 1979 "configure"
1979#include "confdefs.h"
1980#include <sys/select.h>
1981EOF
1982if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1983  egrep "fd_mask" >/dev/null 2>&1; then
1984  rm -rf conftest*
1985  tk_ok=yes
1986fi
1987rm -f conftest*
1988
1989    if test $tk_ok = yes; then
1990        cat >> confdefs.h <<\EOF
1991#define HAVE_SYS_SELECT_H 1
1992EOF
1993
1994    fi
1995fi
1996echo "$ac_t""$tk_ok" 1>&6
1997if test $tk_ok = no; then
1998    cat >> confdefs.h <<\EOF
1999#define NO_FD_SET 1
2000EOF
2001
2002fi
2003
2004#------------------------------------------------------------------------------
2005#       Find out all about time handling differences.
2006#------------------------------------------------------------------------------
2007
2008for ac_hdr in sys/time.h
2009do
2010ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2011echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2012echo "configure:2013: checking for $ac_hdr" >&5
2013if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2014  echo $ac_n "(cached) $ac_c" 1>&6
2015else
2016  cat > conftest.$ac_ext <<EOF
2017#line 2018 "configure"
2018#include "confdefs.h"
2019#include <$ac_hdr>
2020EOF
2021ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2022{ (eval echo configure:2023: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2023ac_err=`grep -v '^ *+' conftest.out`
2024if test -z "$ac_err"; then
2025  rm -rf conftest*
2026  eval "ac_cv_header_$ac_safe=yes"
2027else
2028  echo "$ac_err" >&5
2029  echo "configure: failed program was:" >&5
2030  cat conftest.$ac_ext >&5
2031  rm -rf conftest*
2032  eval "ac_cv_header_$ac_safe=no"
2033fi
2034rm -f conftest*
2035fi
2036if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2037  echo "$ac_t""yes" 1>&6
2038    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2039  cat >> confdefs.h <<EOF
2040#define $ac_tr_hdr 1
2041EOF
2042 
2043else
2044  echo "$ac_t""no" 1>&6
2045fi
2046done
2047
2048echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
2049echo "configure:2050: checking whether time.h and sys/time.h may both be included" >&5
2050if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
2051  echo $ac_n "(cached) $ac_c" 1>&6
2052else
2053  cat > conftest.$ac_ext <<EOF
2054#line 2055 "configure"
2055#include "confdefs.h"
2056#include <sys/types.h>
2057#include <sys/time.h>
2058#include <time.h>
2059int main() {
2060struct tm *tp;
2061; return 0; }
2062EOF
2063if { (eval echo configure:2064: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2064  rm -rf conftest*
2065  ac_cv_header_time=yes
2066else
2067  echo "configure: failed program was:" >&5
2068  cat conftest.$ac_ext >&5
2069  rm -rf conftest*
2070  ac_cv_header_time=no
2071fi
2072rm -f conftest*
2073fi
2074
2075echo "$ac_t""$ac_cv_header_time" 1>&6
2076if test $ac_cv_header_time = yes; then
2077  cat >> confdefs.h <<\EOF
2078#define TIME_WITH_SYS_TIME 1
2079EOF
2080
2081fi
2082
2083echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
2084echo "configure:2085: checking whether struct tm is in sys/time.h or time.h" >&5
2085if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
2086  echo $ac_n "(cached) $ac_c" 1>&6
2087else
2088  cat > conftest.$ac_ext <<EOF
2089#line 2090 "configure"
2090#include "confdefs.h"
2091#include <sys/types.h>
2092#include <time.h>
2093int main() {
2094struct tm *tp; tp->tm_sec;
2095; return 0; }
2096EOF
2097if { (eval echo configure:2098: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2098  rm -rf conftest*
2099  ac_cv_struct_tm=time.h
2100else
2101  echo "configure: failed program was:" >&5
2102  cat conftest.$ac_ext >&5
2103  rm -rf conftest*
2104  ac_cv_struct_tm=sys/time.h
2105fi
2106rm -f conftest*
2107fi
2108
2109echo "$ac_t""$ac_cv_struct_tm" 1>&6
2110if test $ac_cv_struct_tm = sys/time.h; then
2111  cat >> confdefs.h <<\EOF
2112#define TM_IN_SYS_TIME 1
2113EOF
2114
2115fi
2116
2117echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
2118echo "configure:2119: checking for tm_zone in struct tm" >&5
2119if eval "test \"`echo '$''{'ac_cv_struct_tm_zone'+set}'`\" = set"; then
2120  echo $ac_n "(cached) $ac_c" 1>&6
2121else
2122  cat > conftest.$ac_ext <<EOF
2123#line 2124 "configure"
2124#include "confdefs.h"
2125#include <sys/types.h>
2126#include <$ac_cv_struct_tm>
2127int main() {
2128struct tm tm; tm.tm_zone;
2129; return 0; }
2130EOF
2131if { (eval echo configure:2132: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2132  rm -rf conftest*
2133  ac_cv_struct_tm_zone=yes
2134else
2135  echo "configure: failed program was:" >&5
2136  cat conftest.$ac_ext >&5
2137  rm -rf conftest*
2138  ac_cv_struct_tm_zone=no
2139fi
2140rm -f conftest*
2141fi
2142
2143echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
2144if test "$ac_cv_struct_tm_zone" = yes; then
2145  cat >> confdefs.h <<\EOF
2146#define HAVE_TM_ZONE 1
2147EOF
2148
2149else
2150  echo $ac_n "checking for tzname""... $ac_c" 1>&6
2151echo "configure:2152: checking for tzname" >&5
2152if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then
2153  echo $ac_n "(cached) $ac_c" 1>&6
2154else
2155  cat > conftest.$ac_ext <<EOF
2156#line 2157 "configure"
2157#include "confdefs.h"
2158#include <time.h>
2159#ifndef tzname /* For SGI.  */
2160extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
2161#endif
2162int main() {
2163atoi(*tzname);
2164; return 0; }
2165EOF
2166if { (eval echo configure:2167: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2167  rm -rf conftest*
2168  ac_cv_var_tzname=yes
2169else
2170  echo "configure: failed program was:" >&5
2171  cat conftest.$ac_ext >&5
2172  rm -rf conftest*
2173  ac_cv_var_tzname=no
2174fi
2175rm -f conftest*
2176fi
2177
2178echo "$ac_t""$ac_cv_var_tzname" 1>&6
2179  if test $ac_cv_var_tzname = yes; then
2180    cat >> confdefs.h <<\EOF
2181#define HAVE_TZNAME 1
2182EOF
2183
2184  fi
2185fi
2186
2187
2188echo $ac_n "checking tm_tzadj in struct tm""... $ac_c" 1>&6
2189echo "configure:2190: checking tm_tzadj in struct tm" >&5
2190cat > conftest.$ac_ext <<EOF
2191#line 2192 "configure"
2192#include "confdefs.h"
2193#include <time.h>
2194int main() {
2195struct tm tm; tm.tm_tzadj;
2196; return 0; }
2197EOF
2198if { (eval echo configure:2199: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2199  rm -rf conftest*
2200  cat >> confdefs.h <<\EOF
2201#define HAVE_TM_TZADJ 1
2202EOF
2203
2204         echo "$ac_t""yes" 1>&6
2205else
2206  echo "configure: failed program was:" >&5
2207  cat conftest.$ac_ext >&5
2208  rm -rf conftest*
2209  echo "$ac_t""no" 1>&6
2210fi
2211rm -f conftest*
2212
2213echo $ac_n "checking tm_gmtoff in struct tm""... $ac_c" 1>&6
2214echo "configure:2215: checking tm_gmtoff in struct tm" >&5
2215cat > conftest.$ac_ext <<EOF
2216#line 2217 "configure"
2217#include "confdefs.h"
2218#include <time.h>
2219int main() {
2220struct tm tm; tm.tm_gmtoff;
2221; return 0; }
2222EOF
2223if { (eval echo configure:2224: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2224  rm -rf conftest*
2225  cat >> confdefs.h <<\EOF
2226#define HAVE_TM_GMTOFF 1
2227EOF
2228
2229         echo "$ac_t""yes" 1>&6
2230else
2231  echo "configure: failed program was:" >&5
2232  cat conftest.$ac_ext >&5
2233  rm -rf conftest*
2234  echo "$ac_t""no" 1>&6
2235fi
2236rm -f conftest*
2237
2238#
2239# Its important to include time.h in this check, as some systems (like convex)
2240# have timezone functions, etc.
2241#
2242have_timezone=no
2243echo $ac_n "checking long timezone variable""... $ac_c" 1>&6
2244echo "configure:2245: checking long timezone variable" >&5
2245cat > conftest.$ac_ext <<EOF
2246#line 2247 "configure"
2247#include "confdefs.h"
2248#include <time.h>
2249int main() {
2250extern long timezone;
2251         timezone += 1;
2252         exit (0);
2253; return 0; }
2254EOF
2255if { (eval echo configure:2256: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2256  rm -rf conftest*
2257  have_timezone=yes
2258         cat >> confdefs.h <<\EOF
2259#define HAVE_TIMEZONE_VAR 1
2260EOF
2261
2262         echo "$ac_t""yes" 1>&6
2263else
2264  echo "configure: failed program was:" >&5
2265  cat conftest.$ac_ext >&5
2266  rm -rf conftest*
2267  echo "$ac_t""no" 1>&6
2268fi
2269rm -f conftest*
2270
2271#
2272# On some systems (eg IRIX 6.2), timezone is a time_t and not a long.
2273#
2274if test "$have_timezone" = no; then
2275   echo $ac_n "checking time_t timezone variable""... $ac_c" 1>&6
2276echo "configure:2277: checking time_t timezone variable" >&5
2277   cat > conftest.$ac_ext <<EOF
2278#line 2279 "configure"
2279#include "confdefs.h"
2280#include <time.h>
2281int main() {
2282extern time_t timezone;
2283         timezone += 1;
2284         exit (0);
2285; return 0; }
2286EOF
2287if { (eval echo configure:2288: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2288  rm -rf conftest*
2289  cat >> confdefs.h <<\EOF
2290#define HAVE_TIMEZONE_VAR 1
2291EOF
2292
2293         echo "$ac_t""yes" 1>&6
2294else
2295  echo "configure: failed program was:" >&5
2296  cat conftest.$ac_ext >&5
2297  rm -rf conftest*
2298  echo "$ac_t""no" 1>&6
2299fi
2300rm -f conftest*
2301fi
2302
2303#
2304# AIX does not have a timezone field in struct tm. When the AIX bsd
2305# library is used, the timezone global and the gettimeofday methods are
2306# to be avoided for timezone deduction instead, we deduce the timezone
2307# by comparing the localtime result on a known GMT value.
2308#
2309if test $libbsd = yes; then
2310    cat >> confdefs.h <<\EOF
2311#define USE_DELTA_FOR_TZ 1
2312EOF
2313
2314fi
2315
2316#--------------------------------------------------------------------
2317#       Some systems (e.g., IRIX 4.0.5) lack the st_blksize field
2318#       in struct stat.
2319#--------------------------------------------------------------------
2320echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6
2321echo "configure:2322: checking for st_blksize in struct stat" >&5
2322if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then
2323  echo $ac_n "(cached) $ac_c" 1>&6
2324else
2325  cat > conftest.$ac_ext <<EOF
2326#line 2327 "configure"
2327#include "confdefs.h"
2328#include <sys/types.h>
2329#include <sys/stat.h>
2330int main() {
2331struct stat s; s.st_blksize;
2332; return 0; }
2333EOF
2334if { (eval echo configure:2335: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2335  rm -rf conftest*
2336  ac_cv_struct_st_blksize=yes
2337else
2338  echo "configure: failed program was:" >&5
2339  cat conftest.$ac_ext >&5
2340  rm -rf conftest*
2341  ac_cv_struct_st_blksize=no
2342fi
2343rm -f conftest*
2344fi
2345
2346echo "$ac_t""$ac_cv_struct_st_blksize" 1>&6
2347if test $ac_cv_struct_st_blksize = yes; then
2348  cat >> confdefs.h <<\EOF
2349#define HAVE_ST_BLKSIZE 1
2350EOF
2351
2352fi
2353
2354
2355#--------------------------------------------------------------------
2356#       On some systems strstr is broken: it returns a pointer even
2357#       even if the original string is empty.
2358#--------------------------------------------------------------------
2359
2360echo $ac_n "checking proper strstr implementation""... $ac_c" 1>&6
2361echo "configure:2362: checking proper strstr implementation" >&5
2362if test "$cross_compiling" = yes; then
2363  tcl_ok=no
2364else
2365  cat > conftest.$ac_ext <<EOF
2366#line 2367 "configure"
2367#include "confdefs.h"
2368
2369extern int strstr();
2370int main()
2371{
2372    exit(strstr("\0test", "test") ? 1 : 0);
2373}
2374
2375EOF
2376if { (eval echo configure:2377: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
2377then
2378  tcl_ok=yes
2379else
2380  echo "configure: failed program was:" >&5
2381  cat conftest.$ac_ext >&5
2382  rm -fr conftest*
2383  tcl_ok=no
2384fi
2385rm -fr conftest*
2386fi
2387
2388if test $tcl_ok = yes; then
2389    echo "$ac_t""yes" 1>&6
2390else
2391    echo "$ac_t""broken, using substitute" 1>&6
2392    LIBOBJS="$LIBOBJS strstr.o"
2393fi
2394
2395#--------------------------------------------------------------------
2396#       Check for strtoul function.  This is tricky because under some
2397#       versions of AIX strtoul returns an incorrect terminator
2398#       pointer for the string "0".
2399#--------------------------------------------------------------------
2400
2401echo $ac_n "checking for strtoul""... $ac_c" 1>&6
2402echo "configure:2403: checking for strtoul" >&5
2403if eval "test \"`echo '$''{'ac_cv_func_strtoul'+set}'`\" = set"; then
2404  echo $ac_n "(cached) $ac_c" 1>&6
2405else
2406  cat > conftest.$ac_ext <<EOF
2407#line 2408 "configure"
2408#include "confdefs.h"
2409/* System header to define __stub macros and hopefully few prototypes,
2410    which can conflict with char strtoul(); below.  */
2411#include <assert.h>
2412/* Override any gcc2 internal prototype to avoid an error.  */
2413/* We use char because int might match the return type of a gcc2
2414    builtin and then its argument prototype would still apply.  */
2415char strtoul();
2416
2417int main() {
2418
2419/* The GNU C library defines this for functions which it implements
2420    to always fail with ENOSYS.  Some functions are actually named
2421    something starting with __ and the normal name is an alias.  */
2422#if defined (__stub_strtoul) || defined (__stub___strtoul)
2423choke me
2424#else
2425strtoul();
2426#endif
2427
2428; return 0; }
2429EOF
2430if { (eval echo configure:2431: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2431  rm -rf conftest*
2432  eval "ac_cv_func_strtoul=yes"
2433else
2434  echo "configure: failed program was:" >&5
2435  cat conftest.$ac_ext >&5
2436  rm -rf conftest*
2437  eval "ac_cv_func_strtoul=no"
2438fi
2439rm -f conftest*
2440fi
2441
2442if eval "test \"`echo '$ac_cv_func_'strtoul`\" = yes"; then
2443  echo "$ac_t""yes" 1>&6
2444  tcl_ok=1
2445else
2446  echo "$ac_t""no" 1>&6
2447tcl_ok=0
2448fi
2449
2450if test "$cross_compiling" = yes; then
2451  tcl_ok=0
2452else
2453  cat > conftest.$ac_ext <<EOF
2454#line 2455 "configure"
2455#include "confdefs.h"
2456
2457extern int strtoul();
2458int main()
2459{
2460    char *string = "0";
2461    char *term;
2462    int value;
2463    value = strtoul(string, &term, 0);
2464    if ((value != 0) || (term != (string+1))) {
2465        exit(1);
2466    }
2467    exit(0);
2468}
2469EOF
2470if { (eval echo configure:2471: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
2471then
2472  :
2473else
2474  echo "configure: failed program was:" >&5
2475  cat conftest.$ac_ext >&5
2476  rm -fr conftest*
2477  tcl_ok=0
2478fi
2479rm -fr conftest*
2480fi
2481
2482if test "$tcl_ok" = 0; then
2483    test -n "$verbose" && echo "        Adding strtoul.o."
2484    LIBOBJS="$LIBOBJS strtoul.o"
2485fi
2486
2487#--------------------------------------------------------------------
2488#       Check for the strtod function.  This is tricky because in some
2489#       versions of Linux strtod mis-parses strings starting with "+".
2490#--------------------------------------------------------------------
2491
2492echo $ac_n "checking for strtod""... $ac_c" 1>&6
2493echo "configure:2494: checking for strtod" >&5
2494if eval "test \"`echo '$''{'ac_cv_func_strtod'+set}'`\" = set"; then
2495  echo $ac_n "(cached) $ac_c" 1>&6
2496else
2497  cat > conftest.$ac_ext <<EOF
2498#line 2499 "configure"
2499#include "confdefs.h"
2500/* System header to define __stub macros and hopefully few prototypes,
2501    which can conflict with char strtod(); below.  */
2502#include <assert.h>
2503/* Override any gcc2 internal prototype to avoid an error.  */
2504/* We use char because int might match the return type of a gcc2
2505    builtin and then its argument prototype would still apply.  */
2506char strtod();
2507
2508int main() {
2509
2510/* The GNU C library defines this for functions which it implements
2511    to always fail with ENOSYS.  Some functions are actually named
2512    something starting with __ and the normal name is an alias.  */
2513#if defined (__stub_strtod) || defined (__stub___strtod)
2514choke me
2515#else
2516strtod();
2517#endif
2518
2519; return 0; }
2520EOF
2521if { (eval echo configure:2522: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2522  rm -rf conftest*
2523  eval "ac_cv_func_strtod=yes"
2524else
2525  echo "configure: failed program was:" >&5
2526  cat conftest.$ac_ext >&5
2527  rm -rf conftest*
2528  eval "ac_cv_func_strtod=no"
2529fi
2530rm -f conftest*
2531fi
2532
2533if eval "test \"`echo '$ac_cv_func_'strtod`\" = yes"; then
2534  echo "$ac_t""yes" 1>&6
2535  tcl_ok=1
2536else
2537  echo "$ac_t""no" 1>&6
2538tcl_ok=0
2539fi
2540
2541if test "$cross_compiling" = yes; then
2542  tcl_ok=0
2543else
2544  cat > conftest.$ac_ext <<EOF
2545#line 2546 "configure"
2546#include "confdefs.h"
2547
2548extern double strtod();
2549int main()
2550{
2551    char *string = " +69";
2552    char *term;
2553    double value;
2554    value = strtod(string, &term);
2555    if ((value != 69) || (term != (string+4))) {
2556        exit(1);
2557    }
2558    exit(0);
2559}
2560EOF
2561if { (eval echo configure:2562: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
2562then
2563  :
2564else
2565  echo "configure: failed program was:" >&5
2566  cat conftest.$ac_ext >&5
2567  rm -fr conftest*
2568  tcl_ok=0
2569fi
2570rm -fr conftest*
2571fi
2572
2573if test "$tcl_ok" = 0; then
2574    test -n "$verbose" && echo "        Adding strtod.o."
2575    LIBOBJS="$LIBOBJS strtod.o"
2576fi
2577
2578#--------------------------------------------------------------------
2579#       Under Solaris 2.4, strtod returns the wrong value for the
2580#       terminating character under some conditions.  Check for this
2581#       and if the problem exists use a substitute procedure
2582#       "fixstrtod" that corrects the error.
2583#--------------------------------------------------------------------
2584
2585echo $ac_n "checking for strtod""... $ac_c" 1>&6
2586echo "configure:2587: checking for strtod" >&5
2587if eval "test \"`echo '$''{'ac_cv_func_strtod'+set}'`\" = set"; then
2588  echo $ac_n "(cached) $ac_c" 1>&6
2589else
2590  cat > conftest.$ac_ext <<EOF
2591#line 2592 "configure"
2592#include "confdefs.h"
2593/* System header to define __stub macros and hopefully few prototypes,
2594    which can conflict with char strtod(); below.  */
2595#include <assert.h>
2596/* Override any gcc2 internal prototype to avoid an error.  */
2597/* We use char because int might match the return type of a gcc2
2598    builtin and then its argument prototype would still apply.  */
2599char strtod();
2600
2601int main() {
2602
2603/* The GNU C library defines this for functions which it implements
2604    to always fail with ENOSYS.  Some functions are actually named
2605    something starting with __ and the normal name is an alias.  */
2606#if defined (__stub_strtod) || defined (__stub___strtod)
2607choke me
2608#else
2609strtod();
2610#endif
2611
2612; return 0; }
2613EOF
2614if { (eval echo configure:2615: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2615  rm -rf conftest*
2616  eval "ac_cv_func_strtod=yes"
2617else
2618  echo "configure: failed program was:" >&5
2619  cat conftest.$ac_ext >&5
2620  rm -rf conftest*
2621  eval "ac_cv_func_strtod=no"
2622fi
2623rm -f conftest*
2624fi
2625
2626if eval "test \"`echo '$ac_cv_func_'strtod`\" = yes"; then
2627  echo "$ac_t""yes" 1>&6
2628  tcl_strtod=1
2629else
2630  echo "$ac_t""no" 1>&6
2631tcl_strtod=0
2632fi
2633
2634if test "$tcl_strtod" = 1; then
2635    echo $ac_n "checking for Solaris strtod bug""... $ac_c" 1>&6
2636echo "configure:2637: checking for Solaris strtod bug" >&5
2637    if test "$cross_compiling" = yes; then
2638  tcl_ok=0
2639else
2640  cat > conftest.$ac_ext <<EOF
2641#line 2642 "configure"
2642#include "confdefs.h"
2643
2644extern double strtod();
2645int main()
2646{
2647    char *string = "NaN";
2648    char *term;
2649    strtod(string, &term);
2650    if ((term != string) && (term[-1] == 0)) {
2651        exit(1);
2652    }
2653    exit(0);
2654}
2655EOF
2656if { (eval echo configure:2657: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
2657then
2658  tcl_ok=1
2659else
2660  echo "configure: failed program was:" >&5
2661  cat conftest.$ac_ext >&5
2662  rm -fr conftest*
2663  tcl_ok=0
2664fi
2665rm -fr conftest*
2666fi
2667
2668    if test $tcl_ok = 1; then
2669        echo "$ac_t""ok" 1>&6
2670    else
2671        echo "$ac_t""buggy" 1>&6
2672        LIBOBJS="$LIBOBJS fixstrtod.o"
2673        cat >> confdefs.h <<\EOF
2674#define strtod fixstrtod
2675EOF
2676
2677    fi
2678fi
2679
2680#--------------------------------------------------------------------
2681#       Check for various typedefs and provide substitutes if
2682#       they don't exist.
2683#--------------------------------------------------------------------
2684
2685echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
2686echo "configure:2687: checking for ANSI C header files" >&5
2687if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
2688  echo $ac_n "(cached) $ac_c" 1>&6
2689else
2690  cat > conftest.$ac_ext <<EOF
2691#line 2692 "configure"
2692#include "confdefs.h"
2693#include <stdlib.h>
2694#include <stdarg.h>
2695#include <string.h>
2696#include <float.h>
2697EOF
2698ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2699{ (eval echo configure:2700: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2700ac_err=`grep -v '^ *+' conftest.out`
2701if test -z "$ac_err"; then
2702  rm -rf conftest*
2703  ac_cv_header_stdc=yes
2704else
2705  echo "$ac_err" >&5
2706  echo "configure: failed program was:" >&5
2707  cat conftest.$ac_ext >&5
2708  rm -rf conftest*
2709  ac_cv_header_stdc=no
2710fi
2711rm -f conftest*
2712
2713if test $ac_cv_header_stdc = yes; then
2714  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2715cat > conftest.$ac_ext <<EOF
2716#line 2717 "configure"
2717#include "confdefs.h"
2718#include <string.h>
2719EOF
2720if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2721  egrep "memchr" >/dev/null 2>&1; then
2722  :
2723else
2724  rm -rf conftest*
2725  ac_cv_header_stdc=no
2726fi
2727rm -f conftest*
2728
2729fi
2730
2731if test $ac_cv_header_stdc = yes; then
2732  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2733cat > conftest.$ac_ext <<EOF
2734#line 2735 "configure"
2735#include "confdefs.h"
2736#include <stdlib.h>
2737EOF
2738if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2739  egrep "free" >/dev/null 2>&1; then
2740  :
2741else
2742  rm -rf conftest*
2743  ac_cv_header_stdc=no
2744fi
2745rm -f conftest*
2746
2747fi
2748
2749if test $ac_cv_header_stdc = yes; then
2750  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2751if test "$cross_compiling" = yes; then
2752  :
2753else
2754  cat > conftest.$ac_ext <<EOF
2755#line 2756 "configure"
2756#include "confdefs.h"
2757#include <ctype.h>
2758#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2759#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2760#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2761int main () { int i; for (i = 0; i < 256; i++)
2762if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
2763exit (0); }
2764
2765EOF
2766if { (eval echo configure:2767: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
2767then
2768  :
2769else
2770  echo "configure: failed program was:" >&5
2771  cat conftest.$ac_ext >&5
2772  rm -fr conftest*
2773  ac_cv_header_stdc=no
2774fi
2775rm -fr conftest*
2776fi
2777
2778fi
2779fi
2780
2781echo "$ac_t""$ac_cv_header_stdc" 1>&6
2782if test $ac_cv_header_stdc = yes; then
2783  cat >> confdefs.h <<\EOF
2784#define STDC_HEADERS 1
2785EOF
2786
2787fi
2788
2789echo $ac_n "checking for mode_t""... $ac_c" 1>&6
2790echo "configure:2791: checking for mode_t" >&5
2791if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
2792  echo $ac_n "(cached) $ac_c" 1>&6
2793else
2794  cat > conftest.$ac_ext <<EOF
2795#line 2796 "configure"
2796#include "confdefs.h"
2797#include <sys/types.h>
2798#if STDC_HEADERS
2799#include <stdlib.h>
2800#include <stddef.h>
2801#endif
2802EOF
2803if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2804  egrep "mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2805  rm -rf conftest*
2806  ac_cv_type_mode_t=yes
2807else
2808  rm -rf conftest*
2809  ac_cv_type_mode_t=no
2810fi
2811rm -f conftest*
2812
2813fi
2814echo "$ac_t""$ac_cv_type_mode_t" 1>&6
2815if test $ac_cv_type_mode_t = no; then
2816  cat >> confdefs.h <<\EOF
2817#define mode_t int
2818EOF
2819
2820fi
2821
2822echo $ac_n "checking for pid_t""... $ac_c" 1>&6
2823echo "configure:2824: checking for pid_t" >&5
2824if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
2825  echo $ac_n "(cached) $ac_c" 1>&6
2826else
2827  cat > conftest.$ac_ext <<EOF
2828#line 2829 "configure"
2829#include "confdefs.h"
2830#include <sys/types.h>
2831#if STDC_HEADERS
2832#include <stdlib.h>
2833#include <stddef.h>
2834#endif
2835EOF
2836if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2837  egrep "pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2838  rm -rf conftest*
2839  ac_cv_type_pid_t=yes
2840else
2841  rm -rf conftest*
2842  ac_cv_type_pid_t=no
2843fi
2844rm -f conftest*
2845
2846fi
2847echo "$ac_t""$ac_cv_type_pid_t" 1>&6
2848if test $ac_cv_type_pid_t = no; then
2849  cat >> confdefs.h <<\EOF
2850#define pid_t int
2851EOF
2852
2853fi
2854
2855echo $ac_n "checking for size_t""... $ac_c" 1>&6
2856echo "configure:2857: checking for size_t" >&5
2857if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
2858  echo $ac_n "(cached) $ac_c" 1>&6
2859else
2860  cat > conftest.$ac_ext <<EOF
2861#line 2862 "configure"
2862#include "confdefs.h"
2863#include <sys/types.h>
2864#if STDC_HEADERS
2865#include <stdlib.h>
2866#include <stddef.h>
2867#endif
2868EOF
2869if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2870  egrep "size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2871  rm -rf conftest*
2872  ac_cv_type_size_t=yes
2873else
2874  rm -rf conftest*
2875  ac_cv_type_size_t=no
2876fi
2877rm -f conftest*
2878
2879fi
2880echo "$ac_t""$ac_cv_type_size_t" 1>&6
2881if test $ac_cv_type_size_t = no; then
2882  cat >> confdefs.h <<\EOF
2883#define size_t unsigned
2884EOF
2885
2886fi
2887
2888echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
2889echo "configure:2890: checking for uid_t in sys/types.h" >&5
2890if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
2891  echo $ac_n "(cached) $ac_c" 1>&6
2892else
2893  cat > conftest.$ac_ext <<EOF
2894#line 2895 "configure"
2895#include "confdefs.h"
2896#include <sys/types.h>
2897EOF
2898if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2899  egrep "uid_t" >/dev/null 2>&1; then
2900  rm -rf conftest*
2901  ac_cv_type_uid_t=yes
2902else
2903  rm -rf conftest*
2904  ac_cv_type_uid_t=no
2905fi
2906rm -f conftest*
2907
2908fi
2909
2910echo "$ac_t""$ac_cv_type_uid_t" 1>&6
2911if test $ac_cv_type_uid_t = no; then
2912  cat >> confdefs.h <<\EOF
2913#define uid_t int
2914EOF
2915
2916  cat >> confdefs.h <<\EOF
2917#define gid_t int
2918EOF
2919
2920fi
2921
2922
2923#--------------------------------------------------------------------
2924#       If a system doesn't have an opendir function (man, that's old!)
2925#       then we have to supply a different version of dirent.h which
2926#       is compatible with the substitute version of opendir that's
2927#       provided.  This version only works with V7-style directories.
2928#--------------------------------------------------------------------
2929
2930echo $ac_n "checking for opendir""... $ac_c" 1>&6
2931echo "configure:2932: checking for opendir" >&5
2932if eval "test \"`echo '$''{'ac_cv_func_opendir'+set}'`\" = set"; then
2933  echo $ac_n "(cached) $ac_c" 1>&6
2934else
2935  cat > conftest.$ac_ext <<EOF
2936#line 2937 "configure"
2937#include "confdefs.h"
2938/* System header to define __stub macros and hopefully few prototypes,
2939    which can conflict with char opendir(); below.  */
2940#include <assert.h>
2941/* Override any gcc2 internal prototype to avoid an error.  */
2942/* We use char because int might match the return type of a gcc2
2943    builtin and then its argument prototype would still apply.  */
2944char opendir();
2945
2946int main() {
2947
2948/* The GNU C library defines this for functions which it implements
2949    to always fail with ENOSYS.  Some functions are actually named
2950    something starting with __ and the normal name is an alias.  */
2951#if defined (__stub_opendir) || defined (__stub___opendir)
2952choke me
2953#else
2954opendir();
2955#endif
2956
2957; return 0; }
2958EOF
2959if { (eval echo configure:2960: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2960  rm -rf conftest*
2961  eval "ac_cv_func_opendir=yes"
2962else
2963  echo "configure: failed program was:" >&5
2964  cat conftest.$ac_ext >&5
2965  rm -rf conftest*
2966  eval "ac_cv_func_opendir=no"
2967fi
2968rm -f conftest*
2969fi
2970
2971if eval "test \"`echo '$ac_cv_func_'opendir`\" = yes"; then
2972  echo "$ac_t""yes" 1>&6
2973  :
2974else
2975  echo "$ac_t""no" 1>&6
2976cat >> confdefs.h <<\EOF
2977#define USE_DIRENT2_H 1
2978EOF
2979
2980fi
2981
2982
2983#--------------------------------------------------------------------
2984#       The check below checks whether <sys/wait.h> defines the type
2985#       "union wait" correctly.  It's needed because of weirdness in
2986#       HP-UX where "union wait" is defined in both the BSD and SYS-V
2987#       environments.  Checking the usability of WIFEXITED seems to do
2988#       the trick.
2989#--------------------------------------------------------------------
2990
2991echo $ac_n "checking union wait""... $ac_c" 1>&6
2992echo "configure:2993: checking union wait" >&5
2993cat > conftest.$ac_ext <<EOF
2994#line 2995 "configure"
2995#include "confdefs.h"
2996#include <sys/types.h>
2997#include <sys/wait.h>
2998int main() {
2999
3000union wait x;
3001WIFEXITED(x);           /* Generates compiler error if WIFEXITED
3002                         * uses an int. */
3003
3004; return 0; }
3005EOF
3006if { (eval echo configure:3007: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3007  rm -rf conftest*
3008  tcl_ok=yes
3009else
3010  echo "configure: failed program was:" >&5
3011  cat conftest.$ac_ext >&5
3012  rm -rf conftest*
3013  tcl_ok=no
3014fi
3015rm -f conftest*
3016echo "$ac_t""$tcl_ok" 1>&6
3017if test $tcl_ok = no; then
3018    cat >> confdefs.h <<\EOF
3019#define NO_UNION_WAIT 1
3020EOF
3021
3022fi
3023
3024#--------------------------------------------------------------------
3025#       Check to see whether the system supports the matherr function
3026#       and its associated type "struct exception".
3027#--------------------------------------------------------------------
3028
3029echo $ac_n "checking matherr support""... $ac_c" 1>&6
3030echo "configure:3031: checking matherr support" >&5
3031cat > conftest.$ac_ext <<EOF
3032#line 3033 "configure"
3033#include "confdefs.h"
3034#include <math.h>
3035int main() {
3036
3037struct exception x;
3038x.type = DOMAIN;
3039x.type = SING;
3040
3041; return 0; }
3042EOF
3043if { (eval echo configure:3044: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3044  rm -rf conftest*
3045  tcl_ok=yes
3046else
3047  echo "configure: failed program was:" >&5
3048  cat conftest.$ac_ext >&5
3049  rm -rf conftest*
3050  tcl_ok=no
3051fi
3052rm -f conftest*
3053echo "$ac_t""$tcl_ok" 1>&6
3054if test $tcl_ok = yes; then
3055    cat >> confdefs.h <<\EOF
3056#define NEED_MATHERR 1
3057EOF
3058
3059fi
3060
3061#--------------------------------------------------------------------
3062#       Check to see whether the system provides a vfork kernel call.
3063#       If not, then use fork instead.  Also, check for a problem with
3064#       vforks and signals that can cause core dumps if a vforked child
3065#       resets a signal handler.  If the problem exists, then use fork
3066#       instead of vfork.
3067#--------------------------------------------------------------------
3068
3069echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
3070echo "configure:3071: checking return type of signal handlers" >&5
3071if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
3072  echo $ac_n "(cached) $ac_c" 1>&6
3073else
3074  cat > conftest.$ac_ext <<EOF
3075#line 3076 "configure"
3076#include "confdefs.h"
3077#include <sys/types.h>
3078#include <signal.h>
3079#ifdef signal
3080#undef signal
3081#endif
3082#ifdef __cplusplus
3083extern "C" void (*signal (int, void (*)(int)))(int);
3084#else
3085void (*signal ()) ();
3086#endif
3087
3088int main() {
3089int i;
3090; return 0; }
3091EOF
3092if { (eval echo configure:3093: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3093  rm -rf conftest*
3094  ac_cv_type_signal=void
3095else
3096  echo "configure: failed program was:" >&5
3097  cat conftest.$ac_ext >&5
3098  rm -rf conftest*
3099  ac_cv_type_signal=int
3100fi
3101rm -f conftest*
3102fi
3103
3104echo "$ac_t""$ac_cv_type_signal" 1>&6
3105cat >> confdefs.h <<EOF
3106#define RETSIGTYPE $ac_cv_type_signal
3107EOF
3108
3109
3110echo $ac_n "checking for vfork""... $ac_c" 1>&6
3111echo "configure:3112: checking for vfork" >&5
3112if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then
3113  echo $ac_n "(cached) $ac_c" 1>&6
3114else
3115  cat > conftest.$ac_ext <<EOF
3116#line 3117 "configure"
3117#include "confdefs.h"
3118/* System header to define __stub macros and hopefully few prototypes,
3119    which can conflict with char vfork(); below.  */
3120#include <assert.h>
3121/* Override any gcc2 internal prototype to avoid an error.  */
3122/* We use char because int might match the return type of a gcc2
3123    builtin and then its argument prototype would still apply.  */
3124char vfork();
3125
3126int main() {
3127
3128/* The GNU C library defines this for functions which it implements
3129    to always fail with ENOSYS.  Some functions are actually named
3130    something starting with __ and the normal name is an alias.  */
3131#if defined (__stub_vfork) || defined (__stub___vfork)
3132choke me
3133#else
3134vfork();
3135#endif
3136
3137; return 0; }
3138EOF
3139if { (eval echo configure:3140: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3140  rm -rf conftest*
3141  eval "ac_cv_func_vfork=yes"
3142else
3143  echo "configure: failed program was:" >&5
3144  cat conftest.$ac_ext >&5
3145  rm -rf conftest*
3146  eval "ac_cv_func_vfork=no"
3147fi
3148rm -f conftest*
3149fi
3150
3151if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then
3152  echo "$ac_t""yes" 1>&6
3153  tcl_ok=1
3154else
3155  echo "$ac_t""no" 1>&6
3156tcl_ok=0
3157fi
3158
3159if test "$tcl_ok" = 1; then
3160    echo $ac_n "checking vfork/signal bug""... $ac_c" 1>&6
3161echo "configure:3162: checking vfork/signal bug" >&5;
3162    if test "$cross_compiling" = yes; then
3163  tcl_ok=0
3164else
3165  cat > conftest.$ac_ext <<EOF
3166#line 3167 "configure"
3167#include "confdefs.h"
3168
3169#include <stdio.h>
3170#include <signal.h>
3171#include <sys/wait.h>
3172int gotSignal = 0;
3173sigProc(sig)
3174    int sig;
3175{
3176    gotSignal = 1;
3177}
3178main()
3179{
3180    int pid, sts;
3181    (void) signal(SIGCHLD, sigProc);
3182    pid = vfork();
3183    if (pid <  0) {
3184        exit(1);
3185    } else if (pid == 0) {
3186        (void) signal(SIGCHLD, SIG_DFL);
3187        _exit(0);
3188    } else {
3189        (void) wait(&sts);
3190    }
3191    exit((gotSignal) ? 0 : 1);
3192}
3193EOF
3194if { (eval echo configure:3195: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
3195then
3196  tcl_ok=1
3197else
3198  echo "configure: failed program was:" >&5
3199  cat conftest.$ac_ext >&5
3200  rm -fr conftest*
3201  tcl_ok=0
3202fi
3203rm -fr conftest*
3204fi
3205
3206    if test "$tcl_ok" = 1; then
3207        echo "$ac_t""ok" 1>&6
3208    else
3209        echo "$ac_t""buggy, using fork instead" 1>&6
3210    fi
3211fi
3212rm -f core
3213if test "$tcl_ok" = 0; then
3214    cat >> confdefs.h <<\EOF
3215#define vfork fork
3216EOF
3217
3218fi
3219
3220#--------------------------------------------------------------------
3221#       Check whether there is an strncasecmp function on this system.
3222#       This is a bit tricky because under SCO it's in -lsocket and
3223#       under Sequent Dynix it's in -linet.
3224#--------------------------------------------------------------------
3225
3226echo $ac_n "checking for strncasecmp""... $ac_c" 1>&6
3227echo "configure:3228: checking for strncasecmp" >&5
3228if eval "test \"`echo '$''{'ac_cv_func_strncasecmp'+set}'`\" = set"; then
3229  echo $ac_n "(cached) $ac_c" 1>&6
3230else
3231  cat > conftest.$ac_ext <<EOF
3232#line 3233 "configure"
3233#include "confdefs.h"
3234/* System header to define __stub macros and hopefully few prototypes,
3235    which can conflict with char strncasecmp(); below.  */
3236#include <assert.h>
3237/* Override any gcc2 internal prototype to avoid an error.  */
3238/* We use char because int might match the return type of a gcc2
3239    builtin and then its argument prototype would still apply.  */
3240char strncasecmp();
3241
3242int main() {
3243
3244/* The GNU C library defines this for functions which it implements
3245    to always fail with ENOSYS.  Some functions are actually named
3246    something starting with __ and the normal name is an alias.  */
3247#if defined (__stub_strncasecmp) || defined (__stub___strncasecmp)
3248choke me
3249#else
3250strncasecmp();
3251#endif
3252
3253; return 0; }
3254EOF
3255if { (eval echo configure:3256: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3256  rm -rf conftest*
3257  eval "ac_cv_func_strncasecmp=yes"
3258else
3259  echo "configure: failed program was:" >&5
3260  cat conftest.$ac_ext >&5
3261  rm -rf conftest*
3262  eval "ac_cv_func_strncasecmp=no"
3263fi
3264rm -f conftest*
3265fi
3266
3267if eval "test \"`echo '$ac_cv_func_'strncasecmp`\" = yes"; then
3268  echo "$ac_t""yes" 1>&6
3269  tcl_ok=1
3270else
3271  echo "$ac_t""no" 1>&6
3272tcl_ok=0
3273fi
3274
3275if test "$tcl_ok" = 0; then
3276    echo $ac_n "checking for strncasecmp in -lsocket""... $ac_c" 1>&6
3277echo "configure:3278: checking for strncasecmp in -lsocket" >&5
3278ac_lib_var=`echo socket'_'strncasecmp | sed 'y%./+-%__p_%'`
3279if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3280  echo $ac_n "(cached) $ac_c" 1>&6
3281else
3282  ac_save_LIBS="$LIBS"
3283LIBS="-lsocket  $LIBS"
3284cat > conftest.$ac_ext <<EOF
3285#line 3286 "configure"
3286#include "confdefs.h"
3287/* Override any gcc2 internal prototype to avoid an error.  */
3288/* We use char because int might match the return type of a gcc2
3289    builtin and then its argument prototype would still apply.  */
3290char strncasecmp();
3291
3292int main() {
3293strncasecmp()
3294; return 0; }
3295EOF
3296if { (eval echo configure:3297: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3297  rm -rf conftest*
3298  eval "ac_cv_lib_$ac_lib_var=yes"
3299else
3300  echo "configure: failed program was:" >&5
3301  cat conftest.$ac_ext >&5
3302  rm -rf conftest*
3303  eval "ac_cv_lib_$ac_lib_var=no"
3304fi
3305rm -f conftest*
3306LIBS="$ac_save_LIBS"
3307
3308fi
3309if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3310  echo "$ac_t""yes" 1>&6
3311  tcl_ok=1
3312else
3313  echo "$ac_t""no" 1>&6
3314tcl_ok=0
3315fi
3316
3317fi
3318if test "$tcl_ok" = 0; then
3319    echo $ac_n "checking for strncasecmp in -linet""... $ac_c" 1>&6
3320echo "configure:3321: checking for strncasecmp in -linet" >&5
3321ac_lib_var=`echo inet'_'strncasecmp | sed 'y%./+-%__p_%'`
3322if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3323  echo $ac_n "(cached) $ac_c" 1>&6
3324else
3325  ac_save_LIBS="$LIBS"
3326LIBS="-linet  $LIBS"
3327cat > conftest.$ac_ext <<EOF
3328#line 3329 "configure"
3329#include "confdefs.h"
3330/* Override any gcc2 internal prototype to avoid an error.  */
3331/* We use char because int might match the return type of a gcc2
3332    builtin and then its argument prototype would still apply.  */
3333char strncasecmp();
3334
3335int main() {
3336strncasecmp()
3337; return 0; }
3338EOF
3339if { (eval echo configure:3340: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3340  rm -rf conftest*
3341  eval "ac_cv_lib_$ac_lib_var=yes"
3342else
3343  echo "configure: failed program was:" >&5
3344  cat conftest.$ac_ext >&5
3345  rm -rf conftest*
3346  eval "ac_cv_lib_$ac_lib_var=no"
3347fi
3348rm -f conftest*
3349LIBS="$ac_save_LIBS"
3350
3351fi
3352if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3353  echo "$ac_t""yes" 1>&6
3354  tcl_ok=1
3355else
3356  echo "$ac_t""no" 1>&6
3357tcl_ok=0
3358fi
3359
3360fi
3361if test "$tcl_ok" = 0; then
3362    LIBOBJS="$LIBOBJS strncasecmp.o"
3363fi
3364
3365#--------------------------------------------------------------------
3366#       The code below deals with several issues related to gettimeofday:
3367#       1. Some systems don't provide a gettimeofday function at all
3368#          (set NO_GETTOD if this is the case).
3369#       2. SGI systems don't use the BSD form of the gettimeofday function,
3370#          but they have a BSDgettimeofday function that can be used instead.
3371#       3. See if gettimeofday is declared in the <sys/time.h> header file.
3372#          if not, set the GETTOD_NOT_DECLARED flag so that tclPort.h can
3373#          declare it.
3374#--------------------------------------------------------------------
3375
3376echo $ac_n "checking for BSDgettimeofday""... $ac_c" 1>&6
3377echo "configure:3378: checking for BSDgettimeofday" >&5
3378if eval "test \"`echo '$''{'ac_cv_func_BSDgettimeofday'+set}'`\" = set"; then
3379  echo $ac_n "(cached) $ac_c" 1>&6
3380else
3381  cat > conftest.$ac_ext <<EOF
3382#line 3383 "configure"
3383#include "confdefs.h"
3384/* System header to define __stub macros and hopefully few prototypes,
3385    which can conflict with char BSDgettimeofday(); below.  */
3386#include <assert.h>
3387/* Override any gcc2 internal prototype to avoid an error.  */
3388/* We use char because int might match the return type of a gcc2
3389    builtin and then its argument prototype would still apply.  */
3390char BSDgettimeofday();
3391
3392int main() {
3393
3394/* The GNU C library defines this for functions which it implements
3395    to always fail with ENOSYS.  Some functions are actually named
3396    something starting with __ and the normal name is an alias.  */
3397#if defined (__stub_BSDgettimeofday) || defined (__stub___BSDgettimeofday)
3398choke me
3399#else
3400BSDgettimeofday();
3401#endif
3402
3403; return 0; }
3404EOF
3405if { (eval echo configure:3406: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3406  rm -rf conftest*
3407  eval "ac_cv_func_BSDgettimeofday=yes"
3408else
3409  echo "configure: failed program was:" >&5
3410  cat conftest.$ac_ext >&5
3411  rm -rf conftest*
3412  eval "ac_cv_func_BSDgettimeofday=no"
3413fi
3414rm -f conftest*
3415fi
3416
3417if eval "test \"`echo '$ac_cv_func_'BSDgettimeofday`\" = yes"; then
3418  echo "$ac_t""yes" 1>&6
3419  cat >> confdefs.h <<\EOF
3420#define HAVE_BSDGETTIMEOFDAY 1
3421EOF
3422
3423else
3424  echo "$ac_t""no" 1>&6
3425echo $ac_n "checking for gettimeofday""... $ac_c" 1>&6
3426echo "configure:3427: checking for gettimeofday" >&5
3427if eval "test \"`echo '$''{'ac_cv_func_gettimeofday'+set}'`\" = set"; then
3428  echo $ac_n "(cached) $ac_c" 1>&6
3429else
3430  cat > conftest.$ac_ext <<EOF
3431#line 3432 "configure"
3432#include "confdefs.h"
3433/* System header to define __stub macros and hopefully few prototypes,
3434    which can conflict with char gettimeofday(); below.  */
3435#include <assert.h>
3436/* Override any gcc2 internal prototype to avoid an error.  */
3437/* We use char because int might match the return type of a gcc2
3438    builtin and then its argument prototype would still apply.  */
3439char gettimeofday();
3440
3441int main() {
3442
3443/* The GNU C library defines this for functions which it implements
3444    to always fail with ENOSYS.  Some functions are actually named
3445    something starting with __ and the normal name is an alias.  */
3446#if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
3447choke me
3448#else
3449gettimeofday();
3450#endif
3451
3452; return 0; }
3453EOF
3454if { (eval echo configure:3455: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3455  rm -rf conftest*
3456  eval "ac_cv_func_gettimeofday=yes"
3457else
3458  echo "configure: failed program was:" >&5
3459  cat conftest.$ac_ext >&5
3460  rm -rf conftest*
3461  eval "ac_cv_func_gettimeofday=no"
3462fi
3463rm -f conftest*
3464fi
3465
3466if eval "test \"`echo '$ac_cv_func_'gettimeofday`\" = yes"; then
3467  echo "$ac_t""yes" 1>&6
3468  :
3469else
3470  echo "$ac_t""no" 1>&6
3471cat >> confdefs.h <<\EOF
3472#define NO_GETTOD 1
3473EOF
3474
3475fi
3476
3477fi
3478
3479echo $ac_n "checking for gettimeofday declaration""... $ac_c" 1>&6
3480echo "configure:3481: checking for gettimeofday declaration" >&5
3481cat > conftest.$ac_ext <<EOF
3482#line 3483 "configure"
3483#include "confdefs.h"
3484#include <sys/time.h>
3485EOF
3486if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3487  egrep "gettimeofday" >/dev/null 2>&1; then
3488  rm -rf conftest*
3489  echo "$ac_t""present" 1>&6
3490else
3491  rm -rf conftest*
3492 
3493    echo "$ac_t""missing" 1>&6
3494    cat >> confdefs.h <<\EOF
3495#define GETTOD_NOT_DECLARED 1
3496EOF
3497
3498
3499fi
3500rm -f conftest*
3501
3502
3503#--------------------------------------------------------------------
3504#       Interactive UNIX requires -linet instead of -lsocket, plus it
3505#       needs net/errno.h to define the socket-related error codes.
3506#--------------------------------------------------------------------
3507
3508echo $ac_n "checking for main in -linet""... $ac_c" 1>&6
3509echo "configure:3510: checking for main in -linet" >&5
3510ac_lib_var=`echo inet'_'main | sed 'y%./+-%__p_%'`
3511if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3512  echo $ac_n "(cached) $ac_c" 1>&6
3513else
3514  ac_save_LIBS="$LIBS"
3515LIBS="-linet  $LIBS"
3516cat > conftest.$ac_ext <<EOF
3517#line 3518 "configure"
3518#include "confdefs.h"
3519
3520int main() {
3521main()
3522; return 0; }
3523EOF
3524if { (eval echo configure:3525: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3525  rm -rf conftest*
3526  eval "ac_cv_lib_$ac_lib_var=yes"
3527else
3528  echo "configure: failed program was:" >&5
3529  cat conftest.$ac_ext >&5
3530  rm -rf conftest*
3531  eval "ac_cv_lib_$ac_lib_var=no"
3532fi
3533rm -f conftest*
3534LIBS="$ac_save_LIBS"
3535
3536fi
3537if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3538  echo "$ac_t""yes" 1>&6
3539  LIBS="$LIBS -linet"
3540else
3541  echo "$ac_t""no" 1>&6
3542fi
3543
3544ac_safe=`echo "net/errno.h" | sed 'y%./+-%__p_%'`
3545echo $ac_n "checking for net/errno.h""... $ac_c" 1>&6
3546echo "configure:3547: checking for net/errno.h" >&5
3547if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3548  echo $ac_n "(cached) $ac_c" 1>&6
3549else
3550  cat > conftest.$ac_ext <<EOF
3551#line 3552 "configure"
3552#include "confdefs.h"
3553#include <net/errno.h>
3554EOF
3555ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3556{ (eval echo configure:3557: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3557ac_err=`grep -v '^ *+' conftest.out`
3558if test -z "$ac_err"; then
3559  rm -rf conftest*
3560  eval "ac_cv_header_$ac_safe=yes"
3561else
3562  echo "$ac_err" >&5
3563  echo "configure: failed program was:" >&5
3564  cat conftest.$ac_ext >&5
3565  rm -rf conftest*
3566  eval "ac_cv_header_$ac_safe=no"
3567fi
3568rm -f conftest*
3569fi
3570if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3571  echo "$ac_t""yes" 1>&6
3572  cat >> confdefs.h <<\EOF
3573#define HAVE_NET_ERRNO_H 1
3574EOF
3575
3576else
3577  echo "$ac_t""no" 1>&6
3578fi
3579
3580
3581#--------------------------------------------------------------------
3582#       The following code checks to see whether it is possible to get
3583#       signed chars on this platform.  This is needed in order to
3584#       properly generate sign-extended ints from character values.
3585#--------------------------------------------------------------------
3586
3587echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6
3588echo "configure:3589: checking whether char is unsigned" >&5
3589if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then
3590  echo $ac_n "(cached) $ac_c" 1>&6
3591else
3592  if test "$GCC" = yes; then
3593  # GCC predefines this symbol on systems where it applies.
3594cat > conftest.$ac_ext <<EOF
3595#line 3596 "configure"
3596#include "confdefs.h"
3597#ifdef __CHAR_UNSIGNED__
3598  yes
3599#endif
3600
3601EOF
3602if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3603  egrep "yes" >/dev/null 2>&1; then
3604  rm -rf conftest*
3605  ac_cv_c_char_unsigned=yes
3606else
3607  rm -rf conftest*
3608  ac_cv_c_char_unsigned=no
3609fi
3610rm -f conftest*
3611
3612else
3613if test "$cross_compiling" = yes; then
3614    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
3615else
3616  cat > conftest.$ac_ext <<EOF
3617#line 3618 "configure"
3618#include "confdefs.h"
3619/* volatile prevents gcc2 from optimizing the test away on sparcs.  */
3620#if !defined(__STDC__) || __STDC__ != 1
3621#define volatile
3622#endif
3623main() {
3624  volatile char c = 255; exit(c < 0);
3625}
3626EOF
3627if { (eval echo configure:3628: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
3628then
3629  ac_cv_c_char_unsigned=yes
3630else
3631  echo "configure: failed program was:" >&5
3632  cat conftest.$ac_ext >&5
3633  rm -fr conftest*
3634  ac_cv_c_char_unsigned=no
3635fi
3636rm -fr conftest*
3637fi
3638
3639fi
3640fi
3641
3642echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6
3643if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
3644  cat >> confdefs.h <<\EOF
3645#define __CHAR_UNSIGNED__ 1
3646EOF
3647
3648fi
3649
3650echo $ac_n "checking signed char declarations""... $ac_c" 1>&6
3651echo "configure:3652: checking signed char declarations" >&5
3652cat > conftest.$ac_ext <<EOF
3653#line 3654 "configure"
3654#include "confdefs.h"
3655
3656int main() {
3657
3658signed char *p;
3659p = 0;
3660
3661; return 0; }
3662EOF
3663if { (eval echo configure:3664: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3664  rm -rf conftest*
3665  tcl_ok=yes
3666else
3667  echo "configure: failed program was:" >&5
3668  cat conftest.$ac_ext >&5
3669  rm -rf conftest*
3670  tcl_ok=no
3671fi
3672rm -f conftest*
3673echo "$ac_t""$tcl_ok" 1>&6
3674if test $tcl_ok = yes; then
3675    cat >> confdefs.h <<\EOF
3676#define HAVE_SIGNED_CHAR 1
3677EOF
3678
3679fi
3680
3681#--------------------------------------------------------------------
3682#       Check for the existence of the -lsocket and -lnsl libraries.
3683#       The order here is important, so that they end up in the right
3684#       order in the command line generated by make.  Here are some
3685#       special considerations:
3686#       1. Use "connect" and "accept" to check for -lsocket, and
3687#          "gethostbyname" to check for -lnsl.
3688#       2. Use each function name only once:  can't redo a check because
3689#          autoconf caches the results of the last check and won't redo it.
3690#       3. Use -lnsl and -lsocket only if they supply procedures that
3691#          aren't already present in the normal libraries.  This is because
3692#          IRIX 5.2 has libraries, but they aren't needed and they're
3693#          bogus:  they goof up name resolution if used.
3694#       4. On some SVR4 systems, can't use -lsocket without -lnsl too.
3695#          To get around this problem, check for both libraries together
3696#          if -lsocket doesn't work by itself.
3697#--------------------------------------------------------------------
3698
3699tcl_checkBoth=0
3700echo $ac_n "checking for connect""... $ac_c" 1>&6
3701echo "configure:3702: checking for connect" >&5
3702if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
3703  echo $ac_n "(cached) $ac_c" 1>&6
3704else
3705  cat > conftest.$ac_ext <<EOF
3706#line 3707 "configure"
3707#include "confdefs.h"
3708/* System header to define __stub macros and hopefully few prototypes,
3709    which can conflict with char connect(); below.  */
3710#include <assert.h>
3711/* Override any gcc2 internal prototype to avoid an error.  */
3712/* We use char because int might match the return type of a gcc2
3713    builtin and then its argument prototype would still apply.  */
3714char connect();
3715
3716int main() {
3717
3718/* The GNU C library defines this for functions which it implements
3719    to always fail with ENOSYS.  Some functions are actually named
3720    something starting with __ and the normal name is an alias.  */
3721#if defined (__stub_connect) || defined (__stub___connect)
3722choke me
3723#else
3724connect();
3725#endif
3726
3727; return 0; }
3728EOF
3729if { (eval echo configure:3730: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3730  rm -rf conftest*
3731  eval "ac_cv_func_connect=yes"
3732else
3733  echo "configure: failed program was:" >&5
3734  cat conftest.$ac_ext >&5
3735  rm -rf conftest*
3736  eval "ac_cv_func_connect=no"
3737fi
3738rm -f conftest*
3739fi
3740
3741if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
3742  echo "$ac_t""yes" 1>&6
3743  tcl_checkSocket=0
3744else
3745  echo "$ac_t""no" 1>&6
3746tcl_checkSocket=1
3747fi
3748
3749if test "$tcl_checkSocket" = 1; then
3750    echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
3751echo "configure:3752: checking for main in -lsocket" >&5
3752ac_lib_var=`echo socket'_'main | sed 'y%./+-%__p_%'`
3753if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3754  echo $ac_n "(cached) $ac_c" 1>&6
3755else
3756  ac_save_LIBS="$LIBS"
3757LIBS="-lsocket  $LIBS"
3758cat > conftest.$ac_ext <<EOF
3759#line 3760 "configure"
3760#include "confdefs.h"
3761
3762int main() {
3763main()
3764; return 0; }
3765EOF
3766if { (eval echo configure:3767: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3767  rm -rf conftest*
3768  eval "ac_cv_lib_$ac_lib_var=yes"
3769else
3770  echo "configure: failed program was:" >&5
3771  cat conftest.$ac_ext >&5
3772  rm -rf conftest*
3773  eval "ac_cv_lib_$ac_lib_var=no"
3774fi
3775rm -f conftest*
3776LIBS="$ac_save_LIBS"
3777
3778fi
3779if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3780  echo "$ac_t""yes" 1>&6
3781  LIBS="$LIBS -lsocket"
3782else
3783  echo "$ac_t""no" 1>&6
3784tcl_checkBoth=1
3785fi
3786
3787fi
3788if test "$tcl_checkBoth" = 1; then
3789    tk_oldLibs=$LIBS
3790    LIBS="$LIBS -lsocket -lnsl"
3791    echo $ac_n "checking for accept""... $ac_c" 1>&6
3792echo "configure:3793: checking for accept" >&5
3793if eval "test \"`echo '$''{'ac_cv_func_accept'+set}'`\" = set"; then
3794  echo $ac_n "(cached) $ac_c" 1>&6
3795else
3796  cat > conftest.$ac_ext <<EOF
3797#line 3798 "configure"
3798#include "confdefs.h"
3799/* System header to define __stub macros and hopefully few prototypes,
3800    which can conflict with char accept(); below.  */
3801#include <assert.h>
3802/* Override any gcc2 internal prototype to avoid an error.  */
3803/* We use char because int might match the return type of a gcc2
3804    builtin and then its argument prototype would still apply.  */
3805char accept();
3806
3807int main() {
3808
3809/* The GNU C library defines this for functions which it implements
3810    to always fail with ENOSYS.  Some functions are actually named
3811    something starting with __ and the normal name is an alias.  */
3812#if defined (__stub_accept) || defined (__stub___accept)
3813choke me
3814#else
3815accept();
3816#endif
3817
3818; return 0; }
3819EOF
3820if { (eval echo configure:3821: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3821  rm -rf conftest*
3822  eval "ac_cv_func_accept=yes"
3823else
3824  echo "configure: failed program was:" >&5
3825  cat conftest.$ac_ext >&5
3826  rm -rf conftest*
3827  eval "ac_cv_func_accept=no"
3828fi
3829rm -f conftest*
3830fi
3831
3832if eval "test \"`echo '$ac_cv_func_'accept`\" = yes"; then
3833  echo "$ac_t""yes" 1>&6
3834  tcl_checkNsl=0
3835else
3836  echo "$ac_t""no" 1>&6
3837LIBS=$tk_oldLibs
3838fi
3839
3840fi
3841echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
3842echo "configure:3843: checking for gethostbyname" >&5
3843if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
3844  echo $ac_n "(cached) $ac_c" 1>&6
3845else
3846  cat > conftest.$ac_ext <<EOF
3847#line 3848 "configure"
3848#include "confdefs.h"
3849/* System header to define __stub macros and hopefully few prototypes,
3850    which can conflict with char gethostbyname(); below.  */
3851#include <assert.h>
3852/* Override any gcc2 internal prototype to avoid an error.  */
3853/* We use char because int might match the return type of a gcc2
3854    builtin and then its argument prototype would still apply.  */
3855char gethostbyname();
3856
3857int main() {
3858
3859/* The GNU C library defines this for functions which it implements
3860    to always fail with ENOSYS.  Some functions are actually named
3861    something starting with __ and the normal name is an alias.  */
3862#if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
3863choke me
3864#else
3865gethostbyname();
3866#endif
3867
3868; return 0; }
3869EOF
3870if { (eval echo configure:3871: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3871  rm -rf conftest*
3872  eval "ac_cv_func_gethostbyname=yes"
3873else
3874  echo "configure: failed program was:" >&5
3875  cat conftest.$ac_ext >&5
3876  rm -rf conftest*
3877  eval "ac_cv_func_gethostbyname=no"
3878fi
3879rm -f conftest*
3880fi
3881
3882if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
3883  echo "$ac_t""yes" 1>&6
3884  :
3885else
3886  echo "$ac_t""no" 1>&6
3887echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
3888echo "configure:3889: checking for main in -lnsl" >&5
3889ac_lib_var=`echo nsl'_'main | sed 'y%./+-%__p_%'`
3890if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3891  echo $ac_n "(cached) $ac_c" 1>&6
3892else
3893  ac_save_LIBS="$LIBS"
3894LIBS="-lnsl  $LIBS"
3895cat > conftest.$ac_ext <<EOF
3896#line 3897 "configure"
3897#include "confdefs.h"
3898
3899int main() {
3900main()
3901; return 0; }
3902EOF
3903if { (eval echo configure:3904: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3904  rm -rf conftest*
3905  eval "ac_cv_lib_$ac_lib_var=yes"
3906else
3907  echo "configure: failed program was:" >&5
3908  cat conftest.$ac_ext >&5
3909  rm -rf conftest*
3910  eval "ac_cv_lib_$ac_lib_var=no"
3911fi
3912rm -f conftest*
3913LIBS="$ac_save_LIBS"
3914
3915fi
3916if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3917  echo "$ac_t""yes" 1>&6
3918  LIBS="$LIBS -lnsl"
3919else
3920  echo "$ac_t""no" 1>&6
3921fi
3922
3923fi
3924
3925
3926#--------------------------------------------------------------------
3927#       The statements below define a collection of symbols related to
3928#       dynamic loading and shared libraries:
3929#
3930#       DL_OBJS -       Name of the object file that implements dynamic
3931#                       loading for Tcl on this system.
3932#       DL_LIBS -       Library file(s) to include in tclsh and other base
3933#                       applications in order for the "load" command to work.
3934#       LD_FLAGS -      Flags to pass to the compiler when linking object
3935#                       files into an executable application binary such
3936#                       as tclsh.
3937#       LD_SEARCH_FLAGS-Flags to pass to ld, such as "-R /usr/local/tcl/lib",
3938#                       that tell the run-time dynamic linker where to look
3939#                       for shared libraries such as libtcl.so.  Depends on
3940#                       the variable LIB_RUNTIME_DIR in the Makefile.
3941#       MAKE_LIB -      Command to execute to build the Tcl library;
3942#                       differs depending on whether or not Tcl is being
3943#                       compiled as a shared library.
3944#       SHLIB_CFLAGS -  Flags to pass to cc when compiling the components
3945#                       of a shared library (may request position-independent
3946#                       code, among other things).
3947#       SHLIB_LD -      Base command to use for combining object files
3948#                       into a shared library.
3949#       SHLIB_LD_LIBS - Dependent libraries for the linker to scan when
3950#                       creating shared libraries.  This symbol typically
3951#                       goes at the end of the "ld" commands that build
3952#                       shared libraries. The value of the symbol is
3953#                       "${LIBS}" if all of the dependent libraries should
3954#                       be specified when creating a shared library.  If
3955#                       dependent libraries should not be specified (as on
3956#                       SunOS 4.x, where they cause the link to fail, or in
3957#                       general if Tcl and Tk aren't themselves shared
3958#                       libraries), then this symbol has an empty string
3959#                       as its value.
3960#       SHLIB_SUFFIX -  Suffix to use for the names of dynamically loadable
3961#                       extensions.  An empty string means we don't know how
3962#                       to use shared libraries on this platform.
3963#       TCL_LIB_FILE -  Name of the file that contains the Tcl library, such
3964#                       as libtcl7.8.so or libtcl7.8.a.
3965#       TCL_LIB_SUFFIX -Specifies everything that comes after the "libtcl"
3966#                       in the shared library name, using the $VERSION variable
3967#                       to put the version in the right place.  This is used
3968#                       by platforms that need non-standard library names.
3969#                       Examples:  ${VERSION}.so.1.1 on NetBSD, since it needs
3970#                       to have a version after the .so, and ${VERSION}.a
3971#                       on AIX, since the Tcl shared library needs to have
3972#                       a .a extension whereas shared objects for loadable
3973#                       extensions have a .so extension.  Defaults to
3974#                       ${VERSION}${SHLIB_SUFFIX}.
3975#--------------------------------------------------------------------
3976
3977# Step 1: set the variable "system" to hold the name and version number
3978# for the system.  This can usually be done via the "uname" command, but
3979# there are a few systems, like Next, where this doesn't work.
3980
3981echo $ac_n "checking system version (for dynamic loading)""... $ac_c" 1>&6
3982echo "configure:3983: checking system version (for dynamic loading)" >&5
3983if test -f /usr/lib/NextStep/software_version; then
3984    system=NEXTSTEP-`awk '/3/,/3/' /usr/lib/NextStep/software_version`
3985else
3986    system=`uname -s`-`uname -r`
3987    if test "$?" -ne 0 ; then
3988        echo "$ac_t""unknown (can't find uname command)" 1>&6
3989        system=unknown
3990    else
3991        # Special check for weird MP-RAS system (uname returns weird
3992        # results, and the version is kept in special file).
3993   
3994        if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then
3995            system=MP-RAS-`awk '{print $3}' /etc/.relid'`
3996        fi
3997        if test "`uname -s`" = "AIX" ; then
3998            system=AIX-`uname -v`.`uname -r`
3999        fi
4000        echo "$ac_t""$system" 1>&6
4001    fi
4002fi
4003
4004# Step 2: check for existence of -ldl library.  This is needed because
4005# Linux can use either -ldl or -ldld for dynamic loading.
4006
4007echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
4008echo "configure:4009: checking for dlopen in -ldl" >&5
4009ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
4010if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4011  echo $ac_n "(cached) $ac_c" 1>&6
4012else
4013  ac_save_LIBS="$LIBS"
4014LIBS="-ldl  $LIBS"
4015cat > conftest.$ac_ext <<EOF
4016#line 4017 "configure"
4017#include "confdefs.h"
4018/* Override any gcc2 internal prototype to avoid an error.  */
4019/* We use char because int might match the return type of a gcc2
4020    builtin and then its argument prototype would still apply.  */
4021char dlopen();
4022
4023int main() {
4024dlopen()
4025; return 0; }
4026EOF
4027if { (eval echo configure:4028: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4028  rm -rf conftest*
4029  eval "ac_cv_lib_$ac_lib_var=yes"
4030else
4031  echo "configure: failed program was:" >&5
4032  cat conftest.$ac_ext >&5
4033  rm -rf conftest*
4034  eval "ac_cv_lib_$ac_lib_var=no"
4035fi
4036rm -f conftest*
4037LIBS="$ac_save_LIBS"
4038
4039fi
4040if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4041  echo "$ac_t""yes" 1>&6
4042  have_dl=yes
4043else
4044  echo "$ac_t""no" 1>&6
4045have_dl=no
4046fi
4047
4048
4049# Step 3: set configuration options based on system name and version.
4050
4051fullSrcDir=`cd $srcdir; pwd`
4052TCL_SHARED_LIB_SUFFIX=""
4053TCL_UNSHARED_LIB_SUFFIX=""
4054TCL_TRIM_DOTS='`echo ${VERSION} | tr -d .`'
4055ECHO_VERSION='`echo ${VERSION}`'
4056TCL_LIB_VERSIONS_OK=ok
4057CFLAGS_DEBUG=-g
4058CFLAGS_OPTIMIZE=-O
4059case $system in
4060    AIX-4.[2-9])
4061        SHLIB_CFLAGS=""
4062        SHLIB_LD="$fullSrcDir/ldAix /bin/ld -bhalt:4 -bM:SRE -bE:lib.exp -H512 -T512 -bnoentry"
4063        SHLIB_LD_LIBS='${LIBS}'
4064        SHLIB_SUFFIX=".so"
4065        DL_OBJS="tclLoadDl.o"
4066        DL_LIBS="-ldl"
4067        LD_FLAGS=""
4068        LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
4069        AIX=yes
4070        TCL_SHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}.a'
4071        ;;
4072    AIX-*)
4073        SHLIB_CFLAGS=""
4074        SHLIB_LD="$fullSrcDir/ldAix /bin/ld -bhalt:4 -bM:SRE -bE:lib.exp -H512 -T512 -bnoentry"
4075        SHLIB_LD_LIBS='${LIBS}'
4076        SHLIB_SUFFIX=".so"
4077        DL_OBJS="tclLoadDl.o tclLoadAix.o"
4078        DL_LIBS="-lld"
4079        LD_FLAGS=""
4080        LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
4081        TCL_SHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}.a'
4082        ;;
4083    BSD/OS-2.1*|BSD/OS-3*)
4084        SHLIB_CFLAGS=""
4085        SHLIB_LD="shlicc -r"
4086        SHLIB_LD_LIBS='${LIBS}'
4087        SHLIB_SUFFIX=".so"
4088        DL_OBJS="tclLoadDl.o"
4089        DL_LIBS="-ldl"
4090        LD_FLAGS=""
4091        LD_SEARCH_FLAGS=""
4092        ;;
4093    dgux*)
4094        SHLIB_CFLAGS="-K PIC"
4095        SHLIB_LD="cc -G"
4096        SHLIB_LD_LIBS=""
4097        SHLIB_SUFFIX=".so"
4098        DL_OBJS="tclLoadDl.o"
4099        DL_LIBS="-ldl"
4100        LD_FLAGS=""
4101        LD_SEARCH_FLAGS=""
4102        ;;
4103    HP-UX-*.08.*|HP-UX-*.09.*|HP-UX-*.10.*)
4104        echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
4105echo "configure:4106: checking for shl_load in -ldld" >&5
4106ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
4107if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4108  echo $ac_n "(cached) $ac_c" 1>&6
4109else
4110  ac_save_LIBS="$LIBS"
4111LIBS="-ldld  $LIBS"
4112cat > conftest.$ac_ext <<EOF
4113#line 4114 "configure"
4114#include "confdefs.h"
4115/* Override any gcc2 internal prototype to avoid an error.  */
4116/* We use char because int might match the return type of a gcc2
4117    builtin and then its argument prototype would still apply.  */
4118char shl_load();
4119
4120int main() {
4121shl_load()
4122; return 0; }
4123EOF
4124if { (eval echo configure:4125: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4125  rm -rf conftest*
4126  eval "ac_cv_lib_$ac_lib_var=yes"
4127else
4128  echo "configure: failed program was:" >&5
4129  cat conftest.$ac_ext >&5
4130  rm -rf conftest*
4131  eval "ac_cv_lib_$ac_lib_var=no"
4132fi
4133rm -f conftest*
4134LIBS="$ac_save_LIBS"
4135
4136fi
4137if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4138  echo "$ac_t""yes" 1>&6
4139  tcl_ok=yes
4140else
4141  echo "$ac_t""no" 1>&6
4142tcl_ok=no
4143fi
4144
4145        if test "$tcl_ok" = yes; then
4146            SHLIB_CFLAGS="+z"
4147            SHLIB_LD="ld -b"
4148            SHLIB_LD_LIBS=""
4149            SHLIB_SUFFIX=".sl"
4150            DL_OBJS="tclLoadShl.o"
4151            DL_LIBS="-ldld"
4152            LD_FLAGS="-Wl,-E"
4153            LD_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.'
4154        fi
4155        ;;
4156    IRIX-4.*)
4157        SHLIB_CFLAGS="-G 0"
4158        SHLIB_SUFFIX=".a"
4159        SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0"
4160        SHLIB_LD_LIBS='${LIBS}'
4161        DL_OBJS="tclLoadAout.o"
4162        DL_LIBS=""
4163        LD_FLAGS="-Wl,-D,08000000"
4164        LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
4165        TCL_SHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}.a'
4166        ;;
4167    IRIX-5.*|IRIX-6.*)
4168        SHLIB_CFLAGS=""
4169        SHLIB_LD="ld -shared -rdata_shared"
4170        SHLIB_LD_LIBS=""
4171        SHLIB_SUFFIX=".so"
4172        DL_OBJS="tclLoadDl.o"
4173        DL_LIBS=""
4174        LD_FLAGS=""
4175        LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
4176        ;;
4177    IRIX64-6.*)
4178        SHLIB_CFLAGS=""
4179        SHLIB_LD="ld -32 -shared -rdata_shared -rpath /usr/local/lib"
4180        SHLIB_LD_LIBS=""
4181        SHLIB_SUFFIX=".so"
4182        DL_OBJS="tclLoadDl.o"
4183        DL_LIBS=""
4184        LD_FLAGS=""
4185        LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
4186        ;;
4187    Linux*)
4188        SHLIB_CFLAGS="-fPIC"
4189        SHLIB_LD_LIBS=""
4190        SHLIB_SUFFIX=".so"
4191        if test "$have_dl" = yes; then
4192            SHLIB_LD="${CC} -shared"
4193            DL_OBJS="tclLoadDl.o"
4194            DL_LIBS="-ldl"
4195            LD_FLAGS="-rdynamic"
4196            LD_SEARCH_FLAGS=""
4197        else
4198            ac_safe=`echo "dld.h" | sed 'y%./+-%__p_%'`
4199echo $ac_n "checking for dld.h""... $ac_c" 1>&6
4200echo "configure:4201: checking for dld.h" >&5
4201if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4202  echo $ac_n "(cached) $ac_c" 1>&6
4203else
4204  cat > conftest.$ac_ext <<EOF
4205#line 4206 "configure"
4206#include "confdefs.h"
4207#include <dld.h>
4208EOF
4209ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4210{ (eval echo configure:4211: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4211ac_err=`grep -v '^ *+' conftest.out`
4212if test -z "$ac_err"; then
4213  rm -rf conftest*
4214  eval "ac_cv_header_$ac_safe=yes"
4215else
4216  echo "$ac_err" >&5
4217  echo "configure: failed program was:" >&5
4218  cat conftest.$ac_ext >&5
4219  rm -rf conftest*
4220  eval "ac_cv_header_$ac_safe=no"
4221fi
4222rm -f conftest*
4223fi
4224if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4225  echo "$ac_t""yes" 1>&6
4226 
4227                SHLIB_LD="ld -shared"
4228                DL_OBJS="tclLoadDld.o"
4229                DL_LIBS="-ldld"
4230                LD_FLAGS=""
4231                LD_SEARCH_FLAGS=""
4232else
4233  echo "$ac_t""no" 1>&6
4234fi
4235
4236        fi
4237        ;;
4238    MP-RAS-02*)
4239        SHLIB_CFLAGS="-K PIC"
4240        SHLIB_LD="cc -G"
4241        SHLIB_LD_LIBS=""
4242        SHLIB_SUFFIX=".so"
4243        DL_OBJS="tclLoadDl.o"
4244        DL_LIBS="-ldl"
4245        LD_FLAGS=""
4246        LD_SEARCH_FLAGS=""
4247        ;;
4248    MP-RAS-*)
4249        SHLIB_CFLAGS="-K PIC"
4250        SHLIB_LD="cc -G"
4251        SHLIB_LD_LIBS=""
4252        SHLIB_SUFFIX=".so"
4253        DL_OBJS="tclLoadDl.o"
4254        DL_LIBS="-ldl"
4255        LD_FLAGS="-Wl,-Bexport"
4256        LD_SEARCH_FLAGS=""
4257        ;;
4258    NetBSD-*|FreeBSD-*|OpenBSD-*)
4259        # Not available on all versions:  check for include file.
4260        ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
4261echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
4262echo "configure:4263: checking for dlfcn.h" >&5
4263if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4264  echo $ac_n "(cached) $ac_c" 1>&6
4265else
4266  cat > conftest.$ac_ext <<EOF
4267#line 4268 "configure"
4268#include "confdefs.h"
4269#include <dlfcn.h>
4270EOF
4271ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4272{ (eval echo configure:4273: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4273ac_err=`grep -v '^ *+' conftest.out`
4274if test -z "$ac_err"; then
4275  rm -rf conftest*
4276  eval "ac_cv_header_$ac_safe=yes"
4277else
4278  echo "$ac_err" >&5
4279  echo "configure: failed program was:" >&5
4280  cat conftest.$ac_ext >&5
4281  rm -rf conftest*
4282  eval "ac_cv_header_$ac_safe=no"
4283fi
4284rm -f conftest*
4285fi
4286if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4287  echo "$ac_t""yes" 1>&6
4288 
4289            SHLIB_CFLAGS="-fpic"
4290            SHLIB_LD="ld -Bshareable -x"
4291            SHLIB_LD_LIBS=""
4292            SHLIB_SUFFIX=".so"
4293            DL_OBJS="tclLoadDl.o"
4294            DL_LIBS=""
4295            LD_FLAGS=""
4296            LD_SEARCH_FLAGS=""
4297            TCL_SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1.0'
4298       
4299else
4300  echo "$ac_t""no" 1>&6
4301
4302            SHLIB_CFLAGS=""
4303            SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r"
4304            SHLIB_LD_LIBS='${LIBS}'
4305            SHLIB_SUFFIX=".a"
4306            DL_OBJS="tclLoadAout.o"
4307            DL_LIBS=""
4308            LD_FLAGS=""
4309            LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
4310            TCL_SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
4311       
4312fi
4313
4314
4315        # FreeBSD doesn't handle version numbers with dots.
4316
4317        TCL_UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
4318        TCL_LIB_VERSIONS_OK=nodots
4319        ;;
4320    NEXTSTEP-*)
4321        SHLIB_CFLAGS=""
4322        SHLIB_LD="cc -nostdlib -r"
4323        SHLIB_LD_LIBS=""
4324        SHLIB_SUFFIX=".so"
4325        DL_OBJS="tclLoadNext.o"
4326        DL_LIBS=""
4327        LD_FLAGS=""
4328        LD_SEARCH_FLAGS=""
4329        ;;
4330    OSF1-1.0|OSF1-1.1|OSF1-1.2)
4331        # OSF/1 1.[012] from OSF, and derivatives, including Paragon OSF/1
4332        SHLIB_CFLAGS=""
4333        # Hack: make package name same as library name
4334        SHLIB_LD='ld -R -export $@:'
4335        SHLIB_LD_LIBS=""
4336        SHLIB_SUFFIX=".so"
4337        DL_OBJS="tclLoadOSF.o"
4338        DL_LIBS=""
4339        LD_FLAGS=""
4340        LD_SEARCH_FLAGS=""
4341        ;;
4342    OSF1-1.*)
4343        # OSF/1 1.3 from OSF using ELF, and derivatives, including AD2
4344        SHLIB_CFLAGS="-fpic"
4345        SHLIB_LD="ld -shared"
4346        SHLIB_LD_LIBS=""
4347        SHLIB_SUFFIX=".so"
4348        DL_OBJS="tclLoadDl.o"
4349        DL_LIBS=""
4350        LD_FLAGS=""
4351        LD_SEARCH_FLAGS=""
4352        ;;
4353    OSF1-V*)
4354        # Digital OSF/1
4355        SHLIB_CFLAGS=""
4356        SHLIB_LD='ld -shared -expect_unresolved "*"'
4357        SHLIB_LD_LIBS=""
4358        SHLIB_SUFFIX=".so"
4359        DL_OBJS="tclLoadDl.o"
4360        DL_LIBS=""
4361        LD_FLAGS=""
4362        LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
4363        ;;
4364    RISCos-*)
4365        SHLIB_CFLAGS="-G 0"
4366        SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0"
4367        SHLIB_LD_LIBS='${LIBS}'
4368        SHLIB_SUFFIX=".a"
4369        DL_OBJS="tclLoadAout.o"
4370        DL_LIBS=""
4371        LD_FLAGS="-Wl,-D,08000000"
4372        LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
4373        ;;
4374    SCO_SV-3.2*)
4375        # Note, dlopen is available only on SCO 3.2.5 and greater.  However,
4376        # this test works, since "uname -s" was non-standard in 3.2.4 and
4377        # below.
4378        SHLIB_CFLAGS="-Kpic -belf"
4379        SHLIB_LD="ld -G"
4380        SHLIB_LD_LIBS=""
4381        SHLIB_SUFFIX=".so"
4382        DL_OBJS="tclLoadDl.o"
4383        DL_LIBS=""
4384        LD_FLAGS="-belf -Wl,-Bexport"
4385        LD_SEARCH_FLAGS=""
4386        ;;
4387     SINIX*5.4*)
4388        SHLIB_CFLAGS="-K PIC"
4389        SHLIB_LD="cc -G"
4390        SHLIB_LD_LIBS=""
4391        SHLIB_SUFFIX=".so"
4392        DL_OBJS="tclLoadDl.o"
4393        DL_LIBS="-ldl"
4394        LD_FLAGS=""
4395        LD_SEARCH_FLAGS=""
4396        ;;
4397    SunOS-4*)
4398        SHLIB_CFLAGS="-PIC"
4399        SHLIB_LD="ld"
4400        SHLIB_LD_LIBS=""
4401        SHLIB_SUFFIX=".so"
4402        DL_OBJS="tclLoadDl.o"
4403        DL_LIBS="-ldl"
4404        LD_FLAGS=""
4405        LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
4406
4407        # SunOS can't handle version numbers with dots in them in library
4408        # specs, like -ltcl7.5, so use -ltcl75 instead.  Also, it
4409        # requires an extra version number at the end of .so file names.
4410        # So, the library has to have a name like libtcl75.so.1.0
4411
4412        TCL_SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1.0'
4413        TCL_UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
4414        TCL_LIB_VERSIONS_OK=nodots
4415        ;;
4416    SunOS-5*)
4417        SHLIB_CFLAGS="-KPIC"
4418        SHLIB_LD="/usr/ccs/bin/ld -G -z text"
4419
4420        # Note: need the LIBS below, otherwise Tk won't find Tcl's
4421        # symbols when dynamically loaded into tclsh.
4422
4423        SHLIB_LD_LIBS='${LIBS}'
4424        SHLIB_SUFFIX=".so"
4425        DL_OBJS="tclLoadDl.o"
4426        DL_LIBS="-ldl"
4427        LD_FLAGS=""
4428        LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
4429        ;;
4430    ULTRIX-4.*)
4431        SHLIB_CFLAGS="-G 0"
4432        SHLIB_SUFFIX=".a"
4433        SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0"
4434        SHLIB_LD_LIBS='${LIBS}'
4435        DL_OBJS="tclLoadAout.o"
4436        DL_LIBS=""
4437        LD_FLAGS="-Wl,-D,08000000"
4438        LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
4439        ;;
4440    UNIX_SV* | UnixWare-5*)
4441        SHLIB_CFLAGS="-KPIC"
4442        SHLIB_LD="cc -G"
4443        SHLIB_LD_LIBS=""
4444        SHLIB_SUFFIX=".so"
4445        DL_OBJS="tclLoadDl.o"
4446        DL_LIBS="-ldl"
4447        # Some UNIX_SV* systems (unixware 1.1.2 for example) have linkers
4448        # that don't grok the -Bexport option.  Test that it does.
4449        hold_ldflags=$LDFLAGS
4450        echo $ac_n "checking for ld accepts -Bexport flag""... $ac_c" 1>&6
4451echo "configure:4452: checking for ld accepts -Bexport flag" >&5
4452        LDFLAGS="${LDFLAGS} -Wl,-Bexport"
4453        cat > conftest.$ac_ext <<EOF
4454#line 4455 "configure"
4455#include "confdefs.h"
4456
4457int main() {
4458int i;
4459; return 0; }
4460EOF
4461if { (eval echo configure:4462: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4462  rm -rf conftest*
4463  found=yes
4464else
4465  echo "configure: failed program was:" >&5
4466  cat conftest.$ac_ext >&5
4467  rm -rf conftest*
4468  found=no
4469fi
4470rm -f conftest*
4471        LDFLAGS=$hold_ldflags
4472        echo "$ac_t""$found" 1>&6
4473        if test $found = yes; then
4474          LD_FLAGS="-Wl,-Bexport"
4475        else
4476          LD_FLAGS=""
4477        fi
4478        LD_SEARCH_FLAGS=""
4479        ;;
4480esac
4481
4482# Step 4: If pseudo-static linking is in use (see K. B. Kenny, "Dynamic
4483# Loading for Tcl -- What Became of It?".  Proc. 2nd Tcl/Tk Workshop,
4484# New Orleans, LA, Computerized Processes Unlimited, 1994), then we need
4485# to determine which of several header files defines the a.out file
4486# format (a.out.h, sys/exec.h, or sys/exec_aout.h).  At present, we
4487# support only a file format that is more or less version-7-compatible.
4488# In particular,
4489#       - a.out files must begin with `struct exec'.
4490#       - the N_TXTOFF on the `struct exec' must compute the seek address
4491#         of the text segment
4492#       - The `struct exec' must contain a_magic, a_text, a_data, a_bss
4493#         and a_entry fields.
4494# The following compilation should succeed if and only if either sys/exec.h
4495# or a.out.h is usable for the purpose.
4496#
4497# Note that the modified COFF format used on MIPS Ultrix 4.x is usable; the
4498# `struct exec' includes a second header that contains information that
4499# duplicates the v7 fields that are needed.
4500
4501if test "x$DL_OBJS" = "xtclLoadAout.o" ; then
4502    echo $ac_n "checking sys/exec.h""... $ac_c" 1>&6
4503echo "configure:4504: checking sys/exec.h" >&5
4504    cat > conftest.$ac_ext <<EOF
4505#line 4506 "configure"
4506#include "confdefs.h"
4507#include <sys/exec.h>
4508int main() {
4509
4510        struct exec foo;
4511        unsigned long seek;
4512        int flag;
4513#if defined(__mips) || defined(mips)
4514        seek = N_TXTOFF (foo.ex_f, foo.ex_o);
4515#else
4516        seek = N_TXTOFF (foo);
4517#endif
4518        flag = (foo.a_magic == OMAGIC);
4519        return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry;
4520
4521; return 0; }
4522EOF
4523if { (eval echo configure:4524: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4524  rm -rf conftest*
4525  tcl_ok=usable
4526else
4527  echo "configure: failed program was:" >&5
4528  cat conftest.$ac_ext >&5
4529  rm -rf conftest*
4530  tcl_ok=unusable
4531fi
4532rm -f conftest*
4533    echo "$ac_t""$tcl_ok" 1>&6
4534    if test $tcl_ok = usable; then
4535        cat >> confdefs.h <<\EOF
4536#define USE_SYS_EXEC_H 1
4537EOF
4538
4539    else
4540        echo $ac_n "checking a.out.h""... $ac_c" 1>&6
4541echo "configure:4542: checking a.out.h" >&5
4542        cat > conftest.$ac_ext <<EOF
4543#line 4544 "configure"
4544#include "confdefs.h"
4545#include <a.out.h>
4546int main() {
4547
4548            struct exec foo;
4549            unsigned long seek;
4550            int flag;
4551#if defined(__mips) || defined(mips)
4552            seek = N_TXTOFF (foo.ex_f, foo.ex_o);
4553#else
4554            seek = N_TXTOFF (foo);
4555#endif
4556            flag = (foo.a_magic == OMAGIC);
4557            return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry;
4558       
4559; return 0; }
4560EOF
4561if { (eval echo configure:4562: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4562  rm -rf conftest*
4563  tcl_ok=usable
4564else
4565  echo "configure: failed program was:" >&5
4566  cat conftest.$ac_ext >&5
4567  rm -rf conftest*
4568  tcl_ok=unusable
4569fi
4570rm -f conftest*
4571        echo "$ac_t""$tcl_ok" 1>&6
4572        if test $tcl_ok = usable; then
4573            cat >> confdefs.h <<\EOF
4574#define USE_A_OUT_H 1
4575EOF
4576
4577        else
4578            echo $ac_n "checking sys/exec_aout.h""... $ac_c" 1>&6
4579echo "configure:4580: checking sys/exec_aout.h" >&5
4580            cat > conftest.$ac_ext <<EOF
4581#line 4582 "configure"
4582#include "confdefs.h"
4583#include <sys/exec_aout.h>
4584int main() {
4585
4586                struct exec foo;
4587                unsigned long seek;
4588                int flag;
4589#if defined(__mips) || defined(mips)
4590                seek = N_TXTOFF (foo.ex_f, foo.ex_o);
4591#else
4592                seek = N_TXTOFF (foo);
4593#endif
4594                flag = (foo.a_midmag == OMAGIC);
4595                return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry;
4596           
4597; return 0; }
4598EOF
4599if { (eval echo configure:4600: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4600  rm -rf conftest*
4601  tcl_ok=usable
4602else
4603  echo "configure: failed program was:" >&5
4604  cat conftest.$ac_ext >&5
4605  rm -rf conftest*
4606  tcl_ok=unusable
4607fi
4608rm -f conftest*
4609            echo "$ac_t""$tcl_ok" 1>&6
4610            if test $tcl_ok = usable; then
4611                cat >> confdefs.h <<\EOF
4612#define USE_SYS_EXEC_AOUT_H 1
4613EOF
4614
4615            else
4616                DL_OBJS=""
4617            fi
4618        fi
4619    fi
4620fi
4621
4622# Step 5: disable dynamic loading if requested via a command-line switch.
4623
4624#AC_ARG_ENABLE(load, [  --disable-load          disallow dynamic loading and "load" command],
4625#    [tcl_ok=$enableval], [tcl_ok=yes])
4626#if test "$tcl_ok" = "no"; then
4627#    DL_OBJS=""
4628#fi
4629#
4630#if test "x$DL_OBJS" != "x" ; then
4631#    BUILD_DLTEST="\$(DLTEST_TARGETS)"
4632#else
4633    echo "Dynamic loading and shared libraries are disabled."
4634    SHLIB_CFLAGS=""
4635    SHLIB_LD=""
4636    SHLIB_SUFFIX=""
4637    DL_OBJS="tclLoadNone.o"
4638    DL_LIBS=""
4639    LD_FLAGS=""
4640    LD_SEARCH_FLAGS=""
4641    BUILD_DLTEST=""
4642#fi
4643
4644# If we're running gcc, then change the C flags for compiling shared
4645# libraries to the right flags for gcc, instead of those for the
4646# standard manufacturer compiler.
4647
4648if test "$DL_OBJS" != "tclLoadNone.o" ; then
4649    if test "$CC" = "gcc" -o `$CC -v 2>&1 | grep -c gcc` != "0" ; then
4650        case $system in
4651            AIX-*)
4652                ;;
4653            BSD/OS*)
4654                ;;
4655            IRIX*)
4656                ;;
4657            NetBSD-*|FreeBSD-*|OpenBSD-*)
4658                ;;
4659            RISCos-*)
4660                ;;
4661            ULTRIX-4.*)
4662                ;;
4663            *)
4664                SHLIB_CFLAGS="-fPIC"
4665                ;;
4666        esac
4667    fi
4668fi
4669
4670# Set the default compiler switches based on the --enable-symbols option
4671
4672# Check whether --enable-symbols or --disable-symbols was given.
4673if test "${enable_symbols+set}" = set; then
4674  enableval="$enable_symbols"
4675  tcl_ok=$enableval
4676else
4677  tcl_ok=no
4678fi
4679
4680if test "$tcl_ok" = "yes"; then
4681    CFLAGS_DEFAULT=CFLAGS_DEBUG
4682    TCL_DBGX=g
4683else
4684    CFLAGS_DEFAULT=CFLAGS_OPTIMIZE
4685    TCL_DBGX=""
4686fi
4687
4688#--------------------------------------------------------------------
4689#       The statements below check for systems where POSIX-style
4690#       non-blocking I/O (O_NONBLOCK) doesn't work or is unimplemented.
4691#       On these systems (mostly older ones), use the old BSD-style
4692#       FIONBIO approach instead.
4693#--------------------------------------------------------------------
4694
4695for ac_hdr in sys/ioctl.h
4696do
4697ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4698echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4699echo "configure:4700: checking for $ac_hdr" >&5
4700if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4701  echo $ac_n "(cached) $ac_c" 1>&6
4702else
4703  cat > conftest.$ac_ext <<EOF
4704#line 4705 "configure"
4705#include "confdefs.h"
4706#include <$ac_hdr>
4707EOF
4708ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4709{ (eval echo configure:4710: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4710ac_err=`grep -v '^ *+' conftest.out`
4711if test -z "$ac_err"; then
4712  rm -rf conftest*
4713  eval "ac_cv_header_$ac_safe=yes"
4714else
4715  echo "$ac_err" >&5
4716  echo "configure: failed program was:" >&5
4717  cat conftest.$ac_ext >&5
4718  rm -rf conftest*
4719  eval "ac_cv_header_$ac_safe=no"
4720fi
4721rm -f conftest*
4722fi
4723if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4724  echo "$ac_t""yes" 1>&6
4725    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4726  cat >> confdefs.h <<EOF
4727#define $ac_tr_hdr 1
4728EOF
4729 
4730else
4731  echo "$ac_t""no" 1>&6
4732fi
4733done
4734
4735for ac_hdr in sys/filio.h
4736do
4737ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4738echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4739echo "configure:4740: checking for $ac_hdr" >&5
4740if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4741  echo $ac_n "(cached) $ac_c" 1>&6
4742else
4743  cat > conftest.$ac_ext <<EOF
4744#line 4745 "configure"
4745#include "confdefs.h"
4746#include <$ac_hdr>
4747EOF
4748ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4749{ (eval echo configure:4750: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4750ac_err=`grep -v '^ *+' conftest.out`
4751if test -z "$ac_err"; then
4752  rm -rf conftest*
4753  eval "ac_cv_header_$ac_safe=yes"
4754else
4755  echo "$ac_err" >&5
4756  echo "configure: failed program was:" >&5
4757  cat conftest.$ac_ext >&5
4758  rm -rf conftest*
4759  eval "ac_cv_header_$ac_safe=no"
4760fi
4761rm -f conftest*
4762fi
4763if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4764  echo "$ac_t""yes" 1>&6
4765    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4766  cat >> confdefs.h <<EOF
4767#define $ac_tr_hdr 1
4768EOF
4769 
4770else
4771  echo "$ac_t""no" 1>&6
4772fi
4773done
4774
4775echo $ac_n "checking FIONBIO vs. O_NONBLOCK for nonblocking I/O""... $ac_c" 1>&6
4776echo "configure:4777: checking FIONBIO vs. O_NONBLOCK for nonblocking I/O" >&5
4777if test -f /usr/lib/NextStep/software_version; then
4778    system=NEXTSTEP-`awk '/3/,/3/' /usr/lib/NextStep/software_version`
4779else
4780    system=`uname -s`-`uname -r`
4781    if test "$?" -ne 0 ; then
4782        system=unknown
4783    else
4784        # Special check for weird MP-RAS system (uname returns weird
4785        # results, and the version is kept in special file).
4786   
4787        if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then
4788            system=MP-RAS-`awk '{print $3}' /etc/.relid'`
4789        fi
4790        if test "`uname -s`" = "AIX" ; then
4791            system=AIX-`uname -v`.`uname -r`
4792        fi
4793    fi
4794fi
4795case $system in
4796    # There used to be code here to use FIONBIO under AIX.  However, it
4797    # was reported that FIONBIO doesn't work under AIX 3.2.5.  Since
4798    # using O_NONBLOCK seems fine under AIX 4.*, I removed the FIONBIO
4799    # code (JO, 5/31/97).
4800
4801    OSF*)
4802        cat >> confdefs.h <<\EOF
4803#define USE_FIONBIO 1
4804EOF
4805
4806        echo "$ac_t""FIONBIO" 1>&6
4807        ;;
4808    SunOS-4*)
4809        cat >> confdefs.h <<\EOF
4810#define USE_FIONBIO 1
4811EOF
4812
4813        echo "$ac_t""FIONBIO" 1>&6
4814        ;;
4815    ULTRIX-4.*)
4816        cat >> confdefs.h <<\EOF
4817#define USE_FIONBIO 1
4818EOF
4819
4820        echo "$ac_t""FIONBIO" 1>&6
4821        ;;
4822    *)
4823        echo "$ac_t""O_NONBLOCK" 1>&6
4824        ;;
4825esac
4826
4827#--------------------------------------------------------------------
4828#       The statements below define a collection of symbols related to
4829#       building libtcl as a shared library instead of a static library.
4830#--------------------------------------------------------------------
4831
4832realRanlib=$RANLIB
4833if test "$TCL_SHARED_LIB_SUFFIX" = "" ; then
4834    TCL_SHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}${SHLIB_SUFFIX}'
4835fi
4836if test "$TCL_UNSHARED_LIB_SUFFIX" = "" ; then
4837    TCL_UNSHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}.a'
4838fi
4839#AC_ARG_ENABLE(shared,
4840#    [  --enable-shared         build libtcl as a shared library],
4841#    [tcl_ok=$enableval], [tcl_ok=no])
4842#if test "$tcl_ok" = "yes" -a "${SHLIB_SUFFIX}" != "" ; then
4843#    TCL_SHARED_BUILD=1
4844#    TCL_SHLIB_CFLAGS="${SHLIB_CFLAGS}"
4845#    TCL_LD_SEARCH_FLAGS="${LD_SEARCH_FLAGS}"
4846#    eval "TCL_LIB_FILE=libtcl${TCL_SHARED_LIB_SUFFIX}"
4847#    if test "x$DL_OBJS" = "xtclLoadAout.o"; then
4848#       MAKE_LIB="ar cr \${TCL_LIB_FILE} \${OBJS}"
4849#    else
4850#       MAKE_LIB="\${SHLIB_LD} -o \${TCL_LIB_FILE} \${OBJS} ${SHLIB_LD_LIBS}"
4851#       RANLIB=":"
4852#    fi
4853#else
4854    TCL_SHARED_BUILD=0
4855    case $system in
4856        BSD/OS*)
4857            ;;
4858
4859        AIX-*)
4860            ;;
4861
4862        *)
4863            SHLIB_LD_LIBS=""
4864            ;;
4865    esac
4866    TCL_SHLIB_CFLAGS=""
4867    TCL_LD_SEARCH_FLAGS=""
4868    eval "TCL_LIB_FILE=libtcl${TCL_UNSHARED_LIB_SUFFIX}"
4869    MAKE_LIB="ar cr \${TCL_LIB_FILE} \${OBJS}"
4870#fi
4871
4872# Note:  in the following variable, it's important to use the absolute
4873# path name of the Tcl directory rather than "..":  this is because
4874# AIX remembers this path and will attempt to use it at run-time to look
4875# up the Tcl library.
4876
4877if test "${TCL_LIB_VERSIONS_OK}" = "ok"; then
4878    TCL_LIB_FLAG="-ltcl${TCL_VERSION}\${TCL_DBGX}"
4879else
4880    TCL_LIB_FLAG="-ltcl`echo ${TCL_VERSION} | tr -d .`\${TCL_DBGX}"
4881fi
4882#TCL_BUILD_LIB_SPEC="-L`pwd` ${TCL_LIB_FLAG}"
4883TCL_BUILD_LIB_SPEC="`pwd`/libtcl8.0.a"
4884TCL_LIB_SPEC="-L${exec_prefix}/lib ${TCL_LIB_FLAG}"
4885
4886# tclConfig.sh needs a version of the _LIB_SUFFIX that has been eval'ed
4887# so that the backslashes quoting the DBX braces are dropped.
4888
4889# Trick to replace DBGX with TCL_DBGX
4890DBGX='${TCL_DBGX}'
4891eval "TCL_LIB_FILE=${TCL_LIB_FILE}"
4892
4893VERSION='${VERSION}'
4894eval "CFG_TCL_SHARED_LIB_SUFFIX=${TCL_SHARED_LIB_SUFFIX}"
4895eval "CFG_TCL_UNSHARED_LIB_SUFFIX=${TCL_UNSHARED_LIB_SUFFIX}"
4896
4897#--------------------------------------------------------------------
4898#       The statements below define the symbol TCL_PACKAGE_PATH, which
4899#       gives a list of directories that may contain packages.  The list
4900#       consists of one directory for machine-dependent binaries and
4901#       another for platform-independent scripts.
4902#--------------------------------------------------------------------
4903
4904if test "$prefix" != "$exec_prefix"; then
4905    TCL_PACKAGE_PATH="${exec_prefix}/lib ${prefix}/lib"
4906else
4907    TCL_PACKAGE_PATH="${prefix}/lib"
4908fi
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
4926
4927
4928
4929
4930
4931
4932
4933
4934
4935
4936
4937
4938
4939
4940
4941
4942
4943
4944trap '' 1 2 15
4945cat > confcache <<\EOF
4946# This file is a shell script that caches the results of configure
4947# tests run on this system so they can be shared between configure
4948# scripts and configure runs.  It is not useful on other systems.
4949# If it contains results you don't want to keep, you may remove or edit it.
4950#
4951# By default, configure uses ./config.cache as the cache file,
4952# creating it if it does not exist already.  You can give configure
4953# the --cache-file=FILE option to use a different cache file; that is
4954# what configure does when it calls configure scripts in
4955# subdirectories, so they share the cache.
4956# Giving --cache-file=/dev/null disables caching, for debugging configure.
4957# config.status only pays attention to the cache file if you give it the
4958# --recheck option to rerun configure.
4959#
4960EOF
4961# The following way of writing the cache mishandles newlines in values,
4962# but we know of no workaround that is simple, portable, and efficient.
4963# So, don't put newlines in cache variables' values.
4964# Ultrix sh set writes to stderr and can't be redirected directly,
4965# and sets the high bit in the cache file unless we assign to the vars.
4966(set) 2>&1 |
4967  case `(ac_space=' '; set) 2>&1` in
4968  *ac_space=\ *)
4969    # `set' does not quote correctly, so add quotes (double-quote substitution
4970    # turns \\\\ into \\, and sed turns \\ into \).
4971    sed -n \
4972      -e "s/'/'\\\\''/g" \
4973      -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
4974    ;;
4975  *)
4976    # `set' quotes correctly as required by POSIX, so do not add quotes.
4977    sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
4978    ;;
4979  esac >> confcache
4980if cmp -s $cache_file confcache; then
4981  :
4982else
4983  if test -w $cache_file; then
4984    echo "updating cache $cache_file"
4985    cat confcache > $cache_file
4986  else
4987    echo "not updating unwritable cache $cache_file"
4988  fi
4989fi
4990rm -f confcache
4991
4992trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
4993
4994test "x$prefix" = xNONE && prefix=$ac_default_prefix
4995# Let make expand exec_prefix.
4996test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
4997
4998# Any assignment to VPATH causes Sun make to only execute
4999# the first set of double-colon rules, so remove it if not needed.
5000# If there is a colon in the path, we need to keep it.
5001if test "x$srcdir" = x.; then
5002  ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
5003fi
5004
5005trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
5006
5007# Transform confdefs.h into DEFS.
5008# Protect against shell expansion while executing Makefile rules.
5009# Protect against Makefile macro expansion.
5010cat > conftest.defs <<\EOF
5011s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
5012s%[     `~#$^&*(){}\\|;'"<>?]%\\&%g
5013s%\[%\\&%g
5014s%\]%\\&%g
5015s%\$%$$%g
5016EOF
5017DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
5018rm -f conftest.defs
5019
5020
5021# Without the "./", some shells look in PATH for config.status.
5022: ${CONFIG_STATUS=./config.status}
5023
5024echo creating $CONFIG_STATUS
5025rm -f $CONFIG_STATUS
5026cat > $CONFIG_STATUS <<EOF
5027#! /bin/sh
5028# Generated automatically by configure.
5029# Run this file to recreate the current configuration.
5030# This directory was configured as follows,
5031# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
5032#
5033# $0 $ac_configure_args
5034#
5035# Compiler output produced by configure, useful for debugging
5036# configure, is in ./config.log if it exists.
5037
5038ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
5039for ac_option
5040do
5041  case "\$ac_option" in
5042  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
5043    echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
5044    exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
5045  -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
5046    echo "$CONFIG_STATUS generated by autoconf version 2.12"
5047    exit 0 ;;
5048  -help | --help | --hel | --he | --h)
5049    echo "\$ac_cs_usage"; exit 0 ;;
5050  *) echo "\$ac_cs_usage"; exit 1 ;;
5051  esac
5052done
5053
5054ac_given_srcdir=$srcdir
5055
5056trap 'rm -fr `echo "Makefile tclConfig.sh" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
5057EOF
5058cat >> $CONFIG_STATUS <<EOF
5059
5060# Protect against being on the right side of a sed subst in config.status.
5061sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
5062 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
5063$ac_vpsub
5064$extrasub
5065s%@CFLAGS@%$CFLAGS%g
5066s%@CPPFLAGS@%$CPPFLAGS%g
5067s%@CXXFLAGS@%$CXXFLAGS%g
5068s%@DEFS@%$DEFS%g
5069s%@LDFLAGS@%$LDFLAGS%g
5070s%@LIBS@%$LIBS%g
5071s%@exec_prefix@%$exec_prefix%g
5072s%@prefix@%$prefix%g
5073s%@program_transform_name@%$program_transform_name%g
5074s%@bindir@%$bindir%g
5075s%@sbindir@%$sbindir%g
5076s%@libexecdir@%$libexecdir%g
5077s%@datadir@%$datadir%g
5078s%@sysconfdir@%$sysconfdir%g
5079s%@sharedstatedir@%$sharedstatedir%g
5080s%@localstatedir@%$localstatedir%g
5081s%@libdir@%$libdir%g
5082s%@includedir@%$includedir%g
5083s%@oldincludedir@%$oldincludedir%g
5084s%@infodir@%$infodir%g
5085s%@mandir@%$mandir%g
5086s%@RANLIB@%$RANLIB%g
5087s%@CC@%$CC%g
5088s%@LIBOBJS@%$LIBOBJS%g
5089s%@CPP@%$CPP%g
5090s%@BUILD_DLTEST@%$BUILD_DLTEST%g
5091s%@CFLAGS_DEBUG@%$CFLAGS_DEBUG%g
5092s%@CFLAGS_DEFAULT@%$CFLAGS_DEFAULT%g
5093s%@CFLAGS_OPTIMIZE@%$CFLAGS_OPTIMIZE%g
5094s%@CFLAGS_WARNING@%$CFLAGS_WARNING%g
5095s%@CFG_TCL_SHARED_LIB_SUFFIX@%$CFG_TCL_SHARED_LIB_SUFFIX%g
5096s%@CFG_TCL_UNSHARED_LIB_SUFFIX@%$CFG_TCL_UNSHARED_LIB_SUFFIX%g
5097s%@TCL_DBGX@%$TCL_DBGX%g
5098s%@DL_LIBS@%$DL_LIBS%g
5099s%@DL_OBJS@%$DL_OBJS%g
5100s%@LD_FLAGS@%$LD_FLAGS%g
5101s%@MAKE_LIB@%$MAKE_LIB%g
5102s%@MATH_LIBS@%$MATH_LIBS%g
5103s%@SHLIB_CFLAGS@%$SHLIB_CFLAGS%g
5104s%@SHLIB_LD@%$SHLIB_LD%g
5105s%@SHLIB_LD_LIBS@%$SHLIB_LD_LIBS%g
5106s%@SHLIB_SUFFIX@%$SHLIB_SUFFIX%g
5107s%@TCL_BUILD_LIB_SPEC@%$TCL_BUILD_LIB_SPEC%g
5108s%@TCL_LD_SEARCH_FLAGS@%$TCL_LD_SEARCH_FLAGS%g
5109s%@TCL_LIB_FILE@%$TCL_LIB_FILE%g
5110s%@TCL_LIB_FLAG@%$TCL_LIB_FLAG%g
5111s%@TCL_LIB_SPEC@%$TCL_LIB_SPEC%g
5112s%@TCL_LIB_VERSIONS_OK@%$TCL_LIB_VERSIONS_OK%g
5113s%@TCL_MAJOR_VERSION@%$TCL_MAJOR_VERSION%g
5114s%@TCL_MINOR_VERSION@%$TCL_MINOR_VERSION%g
5115s%@TCL_PACKAGE_PATH@%$TCL_PACKAGE_PATH%g
5116s%@TCL_PATCH_LEVEL@%$TCL_PATCH_LEVEL%g
5117s%@TCL_SHARED_LIB_SUFFIX@%$TCL_SHARED_LIB_SUFFIX%g
5118s%@TCL_SHARED_BUILD@%$TCL_SHARED_BUILD%g
5119s%@TCL_SHLIB_CFLAGS@%$TCL_SHLIB_CFLAGS%g
5120s%@TCL_SRC_DIR@%$TCL_SRC_DIR%g
5121s%@TCL_UNSHARED_LIB_SUFFIX@%$TCL_UNSHARED_LIB_SUFFIX%g
5122s%@TCL_VERSION@%$TCL_VERSION%g
5123
5124CEOF
5125EOF
5126
5127cat >> $CONFIG_STATUS <<\EOF
5128
5129# Split the substitutions into bite-sized pieces for seds with
5130# small command number limits, like on Digital OSF/1 and HP-UX.
5131ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
5132ac_file=1 # Number of current file.
5133ac_beg=1 # First line for current file.
5134ac_end=$ac_max_sed_cmds # Line after last line for current file.
5135ac_more_lines=:
5136ac_sed_cmds=""
5137while $ac_more_lines; do
5138  if test $ac_beg -gt 1; then
5139    sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
5140  else
5141    sed "${ac_end}q" conftest.subs > conftest.s$ac_file
5142  fi
5143  if test ! -s conftest.s$ac_file; then
5144    ac_more_lines=false
5145    rm -f conftest.s$ac_file
5146  else
5147    if test -z "$ac_sed_cmds"; then
5148      ac_sed_cmds="sed -f conftest.s$ac_file"
5149    else
5150      ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
5151    fi
5152    ac_file=`expr $ac_file + 1`
5153    ac_beg=$ac_end
5154    ac_end=`expr $ac_end + $ac_max_sed_cmds`
5155  fi
5156done
5157if test -z "$ac_sed_cmds"; then
5158  ac_sed_cmds=cat
5159fi
5160EOF
5161
5162cat >> $CONFIG_STATUS <<EOF
5163
5164CONFIG_FILES=\${CONFIG_FILES-"Makefile tclConfig.sh"}
5165EOF
5166cat >> $CONFIG_STATUS <<\EOF
5167for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
5168  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
5169  case "$ac_file" in
5170  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
5171       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
5172  *) ac_file_in="${ac_file}.in" ;;
5173  esac
5174
5175  # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
5176
5177  # Remove last slash and all that follows it.  Not all systems have dirname.
5178  ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
5179  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
5180    # The file is in a subdirectory.
5181    test ! -d "$ac_dir" && mkdir "$ac_dir"
5182    ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
5183    # A "../" for each directory in $ac_dir_suffix.
5184    ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
5185  else
5186    ac_dir_suffix= ac_dots=
5187  fi
5188
5189  case "$ac_given_srcdir" in
5190  .)  srcdir=.
5191      if test -z "$ac_dots"; then top_srcdir=.
5192      else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
5193  /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
5194  *) # Relative path.
5195    srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
5196    top_srcdir="$ac_dots$ac_given_srcdir" ;;
5197  esac
5198
5199
5200  echo creating "$ac_file"
5201  rm -f "$ac_file"
5202  configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
5203  case "$ac_file" in
5204  *Makefile*) ac_comsub="1i\\
5205# $configure_input" ;;
5206  *) ac_comsub= ;;
5207  esac
5208
5209  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
5210  sed -e "$ac_comsub
5211s%@configure_input@%$configure_input%g
5212s%@srcdir@%$srcdir%g
5213s%@top_srcdir@%$top_srcdir%g
5214" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
5215fi; done
5216rm -f conftest.s*
5217
5218EOF
5219cat >> $CONFIG_STATUS <<EOF
5220
5221EOF
5222cat >> $CONFIG_STATUS <<\EOF
5223
5224exit 0
5225EOF
5226chmod +x $CONFIG_STATUS
5227rm -fr confdefs* $ac_clean_files
5228test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
5229
Note: See TracBrowser for help on using the browser.