OpenCores
URL https://opencores.org/ocsvn/or1k_old/or1k_old/trunk

Subversion Repositories or1k_old

[/] [or1k_old/] [trunk/] [insight/] [tcl/] [unix/] [configure] - Blame information for rev 1782

Details | Compare with Previous | View Log

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

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.