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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [insight/] [expect/] [configure] - Blame information for rev 1765

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
  --with-tclconfig           directory containing tcl configuration (tclConfig.sh)"
16
ac_help="$ac_help
17
  --with-tkconfig           directory containing tk configuration (tkConfig.sh)"
18
ac_help="$ac_help
19
  --with-tclinclude       directory where tcl private headers are"
20
ac_help="$ac_help
21
  --enable-shared     build libexpect as a shared library"
22
ac_help="$ac_help
23
  --with-x               whether or not to use X (default yes)"
24
ac_help="$ac_help
25
  --with-tkinclude       directory where tk private headers are"
26
ac_help="$ac_help
27
  --disable-load     disallow dynamic loading"
28
ac_help="$ac_help
29
  --enable-gcc        allow use of gcc if available"
30
 
31
# Initialize some variables set by options.
32
# The variables have the same names as the options, with
33
# dashes changed to underlines.
34
build=NONE
35
cache_file=./config.cache
36
exec_prefix=NONE
37
host=NONE
38
no_create=
39
nonopt=NONE
40
no_recursion=
41
prefix=NONE
42
program_prefix=NONE
43
program_suffix=NONE
44
program_transform_name=s,x,x,
45
silent=
46
site=
47
sitefile=
48
srcdir=
49
target=NONE
50
verbose=
51
x_includes=NONE
52
x_libraries=NONE
53
bindir='${exec_prefix}/bin'
54
sbindir='${exec_prefix}/sbin'
55
libexecdir='${exec_prefix}/libexec'
56
datadir='${prefix}/share'
57
sysconfdir='${prefix}/etc'
58
sharedstatedir='${prefix}/com'
59
localstatedir='${prefix}/var'
60
libdir='${exec_prefix}/lib'
61
includedir='${prefix}/include'
62
oldincludedir='/usr/include'
63
infodir='${prefix}/info'
64
mandir='${prefix}/man'
65
 
66
# Initialize some other variables.
67
subdirs=
68
MFLAGS= MAKEFLAGS=
69
SHELL=${CONFIG_SHELL-/bin/sh}
70
# Maximum number of lines to put in a shell here document.
71
ac_max_here_lines=12
72
 
73
ac_prev=
74
for ac_option
75
do
76
 
77
  # If the previous option needs an argument, assign it.
78
  if test -n "$ac_prev"; then
79
    eval "$ac_prev=\$ac_option"
80
    ac_prev=
81
    continue
82
  fi
83
 
84
  case "$ac_option" in
85
  -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
86
  *) ac_optarg= ;;
87
  esac
88
 
89
  # Accept the important Cygnus configure options, so we can diagnose typos.
90
 
91
  case "$ac_option" in
92
 
93
  -bindir | --bindir | --bindi | --bind | --bin | --bi)
94
    ac_prev=bindir ;;
95
  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
96
    bindir="$ac_optarg" ;;
97
 
98
  -build | --build | --buil | --bui | --bu)
99
    ac_prev=build ;;
100
  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
101
    build="$ac_optarg" ;;
102
 
103
  -cache-file | --cache-file | --cache-fil | --cache-fi \
104
  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
105
    ac_prev=cache_file ;;
106
  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
107
  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
108
    cache_file="$ac_optarg" ;;
109
 
110
  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
111
    ac_prev=datadir ;;
112
  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
113
  | --da=*)
114
    datadir="$ac_optarg" ;;
115
 
116
  -disable-* | --disable-*)
117
    ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
118
    # Reject names that are not valid shell variable names.
119
    if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
120
      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
121
    fi
122
    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
123
    eval "enable_${ac_feature}=no" ;;
124
 
125
  -enable-* | --enable-*)
126
    ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
127
    # Reject names that are not valid shell variable names.
128
    if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
129
      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
130
    fi
131
    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
132
    case "$ac_option" in
133
      *=*) ;;
134
      *) ac_optarg=yes ;;
135
    esac
136
    eval "enable_${ac_feature}='$ac_optarg'" ;;
137
 
138
  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
139
  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
140
  | --exec | --exe | --ex)
141
    ac_prev=exec_prefix ;;
142
  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
143
  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
144
  | --exec=* | --exe=* | --ex=*)
145
    exec_prefix="$ac_optarg" ;;
146
 
147
  -gas | --gas | --ga | --g)
148
    # Obsolete; use --with-gas.
149
    with_gas=yes ;;
150
 
151
  -help | --help | --hel | --he)
152
    # Omit some internal or obsolete options to make the list less imposing.
153
    # This message is too long to be a string in the A/UX 3.1 sh.
154
    cat << EOF
155
Usage: configure [options] [host]
156
Options: [defaults in brackets after descriptions]
157
Configuration:
158
  --cache-file=FILE       cache test results in FILE
159
  --help                  print this message
160
  --no-create             do not create output files
161
  --quiet, --silent       do not print \`checking...' messages
162
  --site-file=FILE        use FILE as the site file
163
  --version               print the version of autoconf that created configure
164
Directory and file names:
165
  --prefix=PREFIX         install architecture-independent files in PREFIX
166
                          [$ac_default_prefix]
167
  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
168
                          [same as prefix]
169
  --bindir=DIR            user executables in DIR [EPREFIX/bin]
170
  --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
171
  --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
172
  --datadir=DIR           read-only architecture-independent data in DIR
173
                          [PREFIX/share]
174
  --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
175
  --sharedstatedir=DIR    modifiable architecture-independent data in DIR
176
                          [PREFIX/com]
177
  --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
178
  --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
179
  --includedir=DIR        C header files in DIR [PREFIX/include]
180
  --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
181
  --infodir=DIR           info documentation in DIR [PREFIX/info]
182
  --mandir=DIR            man documentation in DIR [PREFIX/man]
183
  --srcdir=DIR            find the sources in DIR [configure dir or ..]
184
  --program-prefix=PREFIX prepend PREFIX to installed program names
185
  --program-suffix=SUFFIX append SUFFIX to installed program names
186
  --program-transform-name=PROGRAM
187
                          run sed PROGRAM on installed program names
188
EOF
189
    cat << EOF
190
Host type:
191
  --build=BUILD           configure for building on BUILD [BUILD=HOST]
192
  --host=HOST             configure for HOST [guessed]
193
  --target=TARGET         configure for TARGET [TARGET=HOST]
194
Features and packages:
195
  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
196
  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
197
  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
198
  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
199
  --x-includes=DIR        X include files are in DIR
200
  --x-libraries=DIR       X library files are in DIR
201
EOF
202
    if test -n "$ac_help"; then
203
      echo "--enable and --with options recognized:$ac_help"
204
    fi
205
    exit 0 ;;
206
 
207
  -host | --host | --hos | --ho)
208
    ac_prev=host ;;
209
  -host=* | --host=* | --hos=* | --ho=*)
210
    host="$ac_optarg" ;;
211
 
212
  -includedir | --includedir | --includedi | --included | --include \
213
  | --includ | --inclu | --incl | --inc)
214
    ac_prev=includedir ;;
215
  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
216
  | --includ=* | --inclu=* | --incl=* | --inc=*)
217
    includedir="$ac_optarg" ;;
218
 
219
  -infodir | --infodir | --infodi | --infod | --info | --inf)
220
    ac_prev=infodir ;;
221
  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
222
    infodir="$ac_optarg" ;;
223
 
224
  -libdir | --libdir | --libdi | --libd)
225
    ac_prev=libdir ;;
226
  -libdir=* | --libdir=* | --libdi=* | --libd=*)
227
    libdir="$ac_optarg" ;;
228
 
229
  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
230
  | --libexe | --libex | --libe)
231
    ac_prev=libexecdir ;;
232
  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
233
  | --libexe=* | --libex=* | --libe=*)
234
    libexecdir="$ac_optarg" ;;
235
 
236
  -localstatedir | --localstatedir | --localstatedi | --localstated \
237
  | --localstate | --localstat | --localsta | --localst \
238
  | --locals | --local | --loca | --loc | --lo)
239
    ac_prev=localstatedir ;;
240
  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
241
  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
242
  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
243
    localstatedir="$ac_optarg" ;;
244
 
245
  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
246
    ac_prev=mandir ;;
247
  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
248
    mandir="$ac_optarg" ;;
249
 
250
  -nfp | --nfp | --nf)
251
    # Obsolete; use --without-fp.
252
    with_fp=no ;;
253
 
254
  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
255
  | --no-cr | --no-c)
256
    no_create=yes ;;
257
 
258
  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
259
  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
260
    no_recursion=yes ;;
261
 
262
  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
263
  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
264
  | --oldin | --oldi | --old | --ol | --o)
265
    ac_prev=oldincludedir ;;
266
  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
267
  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
268
  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
269
    oldincludedir="$ac_optarg" ;;
270
 
271
  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
272
    ac_prev=prefix ;;
273
  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
274
    prefix="$ac_optarg" ;;
275
 
276
  -program-prefix | --program-prefix | --program-prefi | --program-pref \
277
  | --program-pre | --program-pr | --program-p)
278
    ac_prev=program_prefix ;;
279
  -program-prefix=* | --program-prefix=* | --program-prefi=* \
280
  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
281
    program_prefix="$ac_optarg" ;;
282
 
283
  -program-suffix | --program-suffix | --program-suffi | --program-suff \
284
  | --program-suf | --program-su | --program-s)
285
    ac_prev=program_suffix ;;
286
  -program-suffix=* | --program-suffix=* | --program-suffi=* \
287
  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
288
    program_suffix="$ac_optarg" ;;
289
 
290
  -program-transform-name | --program-transform-name \
291
  | --program-transform-nam | --program-transform-na \
292
  | --program-transform-n | --program-transform- \
293
  | --program-transform | --program-transfor \
294
  | --program-transfo | --program-transf \
295
  | --program-trans | --program-tran \
296
  | --progr-tra | --program-tr | --program-t)
297
    ac_prev=program_transform_name ;;
298
  -program-transform-name=* | --program-transform-name=* \
299
  | --program-transform-nam=* | --program-transform-na=* \
300
  | --program-transform-n=* | --program-transform-=* \
301
  | --program-transform=* | --program-transfor=* \
302
  | --program-transfo=* | --program-transf=* \
303
  | --program-trans=* | --program-tran=* \
304
  | --progr-tra=* | --program-tr=* | --program-t=*)
305
    program_transform_name="$ac_optarg" ;;
306
 
307
  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
308
  | -silent | --silent | --silen | --sile | --sil)
309
    silent=yes ;;
310
 
311
  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
312
    ac_prev=sbindir ;;
313
  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
314
  | --sbi=* | --sb=*)
315
    sbindir="$ac_optarg" ;;
316
 
317
  -sharedstatedir | --sharedstatedir | --sharedstatedi \
318
  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
319
  | --sharedst | --shareds | --shared | --share | --shar \
320
  | --sha | --sh)
321
    ac_prev=sharedstatedir ;;
322
  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
323
  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
324
  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
325
  | --sha=* | --sh=*)
326
    sharedstatedir="$ac_optarg" ;;
327
 
328
  -site | --site | --sit)
329
    ac_prev=site ;;
330
  -site=* | --site=* | --sit=*)
331
    site="$ac_optarg" ;;
332
 
333
  -site-file | --site-file | --site-fil | --site-fi | --site-f)
334
    ac_prev=sitefile ;;
335
  -site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*)
336
    sitefile="$ac_optarg" ;;
337
 
338
  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
339
    ac_prev=srcdir ;;
340
  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
341
    srcdir="$ac_optarg" ;;
342
 
343
  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
344
  | --syscon | --sysco | --sysc | --sys | --sy)
345
    ac_prev=sysconfdir ;;
346
  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
347
  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
348
    sysconfdir="$ac_optarg" ;;
349
 
350
  -target | --target | --targe | --targ | --tar | --ta | --t)
351
    ac_prev=target ;;
352
  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
353
    target="$ac_optarg" ;;
354
 
355
  -v | -verbose | --verbose | --verbos | --verbo | --verb)
356
    verbose=yes ;;
357
 
358
  -version | --version | --versio | --versi | --vers)
359
    echo "configure generated by autoconf version 2.13"
360
    exit 0 ;;
361
 
362
  -with-* | --with-*)
363
    ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
364
    # Reject names that are not valid shell variable names.
365
    if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
366
      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
367
    fi
368
    ac_package=`echo $ac_package| sed 's/-/_/g'`
369
    case "$ac_option" in
370
      *=*) ;;
371
      *) ac_optarg=yes ;;
372
    esac
373
    eval "with_${ac_package}='$ac_optarg'" ;;
374
 
375
  -without-* | --without-*)
376
    ac_package=`echo $ac_option|sed -e 's/-*without-//'`
377
    # Reject names that are not valid shell variable names.
378
    if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
379
      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
380
    fi
381
    ac_package=`echo $ac_package| sed 's/-/_/g'`
382
    eval "with_${ac_package}=no" ;;
383
 
384
  --x)
385
    # Obsolete; use --with-x.
386
    with_x=yes ;;
387
 
388
  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
389
  | --x-incl | --x-inc | --x-in | --x-i)
390
    ac_prev=x_includes ;;
391
  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
392
  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
393
    x_includes="$ac_optarg" ;;
394
 
395
  -x-libraries | --x-libraries | --x-librarie | --x-librari \
396
  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
397
    ac_prev=x_libraries ;;
398
  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
399
  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
400
    x_libraries="$ac_optarg" ;;
401
 
402
  -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
403
    ;;
404
 
405
  *)
406
    if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
407
      echo "configure: warning: $ac_option: invalid host type" 1>&2
408
    fi
409
    if test "x$nonopt" != xNONE; then
410
      { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
411
    fi
412
    nonopt="$ac_option"
413
    ;;
414
 
415
  esac
416
done
417
 
418
if test -n "$ac_prev"; then
419
  { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
420
fi
421
 
422
trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
423
 
424
# File descriptor usage:
425
# 0 standard input
426
# 1 file creation
427
# 2 errors and warnings
428
# 3 some systems may open it to /dev/tty
429
# 4 used on the Kubota Titan
430
# 6 checking for... messages and results
431
# 5 compiler messages saved in config.log
432
if test "$silent" = yes; then
433
  exec 6>/dev/null
434
else
435
  exec 6>&1
436
fi
437
exec 5>./config.log
438
 
439
echo "\
440
This file contains any messages produced by compilers while
441
running configure, to aid debugging if configure makes a mistake.
442
" 1>&5
443
 
444
# Strip out --no-create and --no-recursion so they do not pile up.
445
# Also quote any args containing shell metacharacters.
446
ac_configure_args=
447
for ac_arg
448
do
449
  case "$ac_arg" in
450
  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
451
  | --no-cr | --no-c) ;;
452
  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
453
  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
454
  *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
455
  ac_configure_args="$ac_configure_args '$ac_arg'" ;;
456
  *) ac_configure_args="$ac_configure_args $ac_arg" ;;
457
  esac
458
done
459
 
460
# NLS nuisances.
461
# Only set these to C if already set.  These must not be set unconditionally
462
# because not all systems understand e.g. LANG=C (notably SCO).
463
# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
464
# Non-C LC_CTYPE values break the ctype check.
465
if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
466
if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
467
if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
468
if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
469
 
470
# confdefs.h avoids OS command line length limits that DEFS can exceed.
471
rm -rf conftest* confdefs.h
472
# AIX cpp loses on an empty file, so make sure it contains at least a newline.
473
echo > confdefs.h
474
 
475
# A filename unique to this package, relative to the directory that
476
# configure is in, which we can look for to find out if srcdir is correct.
477
ac_unique_file=expect.h
478
 
479
# Find the source files, if location was not specified.
480
if test -z "$srcdir"; then
481
  ac_srcdir_defaulted=yes
482
  # Try the directory containing this script, then its parent.
483
  ac_prog=$0
484
  ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
485
  test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
486
  srcdir=$ac_confdir
487
  if test ! -r $srcdir/$ac_unique_file; then
488
    srcdir=..
489
  fi
490
else
491
  ac_srcdir_defaulted=no
492
fi
493
if test ! -r $srcdir/$ac_unique_file; then
494
  if test "$ac_srcdir_defaulted" = yes; then
495
    { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
496
  else
497
    { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
498
  fi
499
fi
500
srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
501
 
502
# Prefer explicitly selected file to automatically selected ones.
503
if test -z "$sitefile"; then
504
  if test -z "$CONFIG_SITE"; then
505
    if test "x$prefix" != xNONE; then
506
      CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
507
    else
508
      CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
509
    fi
510
  fi
511
else
512
  CONFIG_SITE="$sitefile"
513
fi
514
for ac_site_file in $CONFIG_SITE; do
515
  if test -r "$ac_site_file"; then
516
    echo "loading site script $ac_site_file"
517
    . "$ac_site_file"
518
  fi
519
done
520
 
521
 
522
ac_ext=c
523
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
524
ac_cpp='$CPP $CPPFLAGS'
525
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
526
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
527
cross_compiling=$ac_cv_prog_cc_cross
528
 
529
ac_exeext=
530
ac_objext=o
531
if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
532
  # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
533
  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
534
    ac_n= ac_c='
535
' ac_t='        '
536
  else
537
    ac_n=-n ac_c= ac_t=
538
  fi
539
else
540
  ac_n= ac_c='\c' ac_t=
541
fi
542
 
543
 
544
 
545
ac_aux_dir=
546
for ac_dir in $srcdir/.. $srcdir/$srcdir/..; do
547
  if test -f $ac_dir/install-sh; then
548
    ac_aux_dir=$ac_dir
549
    ac_install_sh="$ac_aux_dir/install-sh -c"
550
    break
551
  elif test -f $ac_dir/install.sh; then
552
    ac_aux_dir=$ac_dir
553
    ac_install_sh="$ac_aux_dir/install.sh -c"
554
    break
555
  fi
556
done
557
if test -z "$ac_aux_dir"; then
558
  { echo "configure: error: can not find install-sh or install.sh in $srcdir/.. $srcdir/$srcdir/.." 1>&2; exit 1; }
559
fi
560
ac_config_guess=$ac_aux_dir/config.guess
561
ac_config_sub=$ac_aux_dir/config.sub
562
ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
563
 
564
 
565
# note when updating version numbers here, also update pkgIndex.in (see
566
# comments in Makefile)
567
EXP_MAJOR_VERSION=5
568
EXP_MINOR_VERSION=26
569
EXP_MICRO_VERSION=0
570
EXP_VERSION=$EXP_MAJOR_VERSION.$EXP_MINOR_VERSION
571
EXP_VERSION_NODOTS=$EXP_MAJOR_VERSION$EXP_MINOR_VERSION
572
EXP_VERSION_FULL=$EXP_VERSION.$EXP_MICRO_VERSION
573
 
574
# Tcl's handling of shared_lib_suffix requires this symbol exist
575
VERSION=$EXP_MAJOR_VERSION.$EXP_MINOR_VERSION
576
 
577
# Too many people send me configure output without identifying the version.
578
# This forced identification should reduce my pain significantly.
579
echo "configuring Expect $EXP_MAJOR_VERSION.$EXP_MINOR_VERSION.$EXP_MICRO_VERSION"
580
 
581
 
582
# Do some error checking and defaulting for the host and target type.
583
# The inputs are:
584
#    configure --host=HOST --target=TARGET --build=BUILD NONOPT
585
#
586
# The rules are:
587
# 1. You are not allowed to specify --host, --target, and nonopt at the
588
#    same time.
589
# 2. Host defaults to nonopt.
590
# 3. If nonopt is not specified, then host defaults to the current host,
591
#    as determined by config.guess.
592
# 4. Target and build default to nonopt.
593
# 5. If nonopt is not specified, then target and build default to host.
594
 
595
# The aliases save the names the user supplied, while $host etc.
596
# will get canonicalized.
597
case $host---$target---$nonopt in
598
NONE---*---* | *---NONE---* | *---*---NONE) ;;
599
*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
600
esac
601
 
602
 
603
# Make sure we can run config.sub.
604
if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
605
else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
606
fi
607
 
608
echo $ac_n "checking host system type""... $ac_c" 1>&6
609
echo "configure:610: checking host system type" >&5
610
 
611
host_alias=$host
612
case "$host_alias" in
613
NONE)
614
  case $nonopt in
615
  NONE)
616
    if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
617
    else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
618
    fi ;;
619
  *) host_alias=$nonopt ;;
620
  esac ;;
621
esac
622
 
623
host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
624
host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
625
host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
626
host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
627
echo "$ac_t""$host" 1>&6
628
 
629
echo $ac_n "checking target system type""... $ac_c" 1>&6
630
echo "configure:631: checking target system type" >&5
631
 
632
target_alias=$target
633
case "$target_alias" in
634
NONE)
635
  case $nonopt in
636
  NONE) target_alias=$host_alias ;;
637
  *) target_alias=$nonopt ;;
638
  esac ;;
639
esac
640
 
641
target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
642
target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
643
target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
644
target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
645
echo "$ac_t""$target" 1>&6
646
 
647
echo $ac_n "checking build system type""... $ac_c" 1>&6
648
echo "configure:649: checking build system type" >&5
649
 
650
build_alias=$build
651
case "$build_alias" in
652
NONE)
653
  case $nonopt in
654
  NONE) build_alias=$host_alias ;;
655
  *) build_alias=$nonopt ;;
656
  esac ;;
657
esac
658
 
659
build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
660
build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
661
build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
662
build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
663
echo "$ac_t""$build" 1>&6
664
 
665
test "$host_alias" != "$target_alias" &&
666
  test "$program_prefix$program_suffix$program_transform_name" = \
667
    NONENONEs,x,x, &&
668
  program_prefix=${target_alias}-
669
 
670
 
671
 
672
 
673
# /bin/sh on some systems is too deficient (in particular, Ultrix 4.3
674
# sh lacks unset and we *need* that), but all these systems come with
675
# alternatives, so take user's choice or whatever we're using here and
676
# allow it to be seen by Make.
677
echo $ac_n "checking shell to use within Make""... $ac_c" 1>&6
678
echo "configure:679: checking shell to use within Make" >&5
679
EXP_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
680
echo "$ac_t""$CONFIG_SHELL" 1>&6
681
 
682
# If `configure' is invoked (in)directly via `make', ensure that it
683
# encounters no `make' conflicts.
684
#
685
unset MFLAGS MAKEFLAGS
686
MFLAGS=""
687
MAKEFLAGS=""
688
 
689
 
690
#
691
# Ok, lets find the tcl configuration
692
# First, look for one uninstalled.
693
# the alternative search directory is invoked by --with-tclconfig
694
#
695
 
696
if test x"${no_tcl}" = x ; then
697
  # we reset no_tcl in case something fails here
698
  no_tcl=true
699
  # Check whether --with-tclconfig or --without-tclconfig was given.
700
if test "${with_tclconfig+set}" = set; then
701
  withval="$with_tclconfig"
702
  with_tclconfig=${withval}
703
fi
704
 
705
  echo $ac_n "checking for Tcl configuration""... $ac_c" 1>&6
706
echo "configure:707: checking for Tcl configuration" >&5
707
  if eval "test \"`echo '$''{'ac_cv_c_tclconfig'+set}'`\" = set"; then
708
  echo $ac_n "(cached) $ac_c" 1>&6
709
else
710
 
711
 
712
  # First check to see if --with-tclconfig was specified.
713
  if test x"${with_tclconfig}" != x ; then
714
    if test -f "${with_tclconfig}/tclConfig.sh" ; then
715
      ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
716
    else
717
      { echo "configure: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" 1>&2; exit 1; }
718
    fi
719
  fi
720
 
721
  # then check for a private Tcl installation
722
 
723
  if test x"${ac_cv_c_tclconfig}" = x ; then
724
    for i in \
725
                ../tcl \
726
                `ls -dr ../tcl[7-9].[0-9] 2>/dev/null` \
727
                ../../tcl \
728
                `ls -dr ../../tcl[7-9].[0-9] 2>/dev/null` \
729
                ../../../tcl \
730
                `ls -dr ../../../tcl[7-9].[0-9] 2>/dev/null` ; do
731
      if test -f "$i/unix/tclConfig.sh" ; then
732
        ac_cv_c_tclconfig=`(cd $i/unix; pwd)`
733
        break
734
      fi
735
    done
736
  fi
737
 
738
  # check in a few common install locations
739
  if test x"${ac_cv_c_tclconfig}" = x ; then
740
    for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
741
      if test -f "$i/tclConfig.sh" ; then
742
        ac_cv_c_tclconfig=`(cd $i; pwd)`
743
        break
744
      fi
745
    done
746
  fi
747
  # check in a few other private locations
748
 
749
  if test x"${ac_cv_c_tclconfig}" = x ; then
750
    for i in \
751
                ${srcdir}/../tcl \
752
                `ls -dr ${srcdir}/../tcl[7-9].[0-9] 2>/dev/null` ; do
753
      if test -f "$i/unix/tclConfig.sh" ; then
754
        ac_cv_c_tclconfig=`(cd $i/unix; pwd)`
755
        break
756
      fi
757
    done
758
  fi
759
 
760
 
761
fi
762
 
763
  if test x"${ac_cv_c_tclconfig}" = x ; then
764
    TCLCONFIG="# no Tcl configs found"
765
    echo "configure: warning: Can't find Tcl configuration definitions" 1>&2
766
  else
767
    no_tcl=
768
    TCLCONFIG=${ac_cv_c_tclconfig}/tclConfig.sh
769
    echo "$ac_t""found $TCLCONFIG" 1>&6
770
  fi
771
fi
772
 
773
 
774
    . $TCLCONFIG
775
 
776
 
777
 
778
 
779
 
780
 
781
 
782
 
783
# Tcl defines TCL_SHLIB_SUFFIX but TCL_SHARED_LIB_SUFFIX then looks for it
784
# as just SHLIB_SUFFIX.  How bizarre.
785
    SHLIB_SUFFIX=$TCL_SHLIB_SUFFIX
786
 
787
 
788
 
789
 
790
 
791
 
792
 
793
 
794
 
795
 
796
 
797
 
798
CC=$TCL_CC
799
EXP_AND_TCL_LIBS=$TCL_LIBS
800
 
801
#
802
# Ok, lets find the tk configuration
803
# First, look for one uninstalled.
804
# the alternative search directory is invoked by --with-tkconfig
805
#
806
 
807
if test x"${no_tk}" = x ; then
808
  # we reset no_tk in case something fails here
809
  no_tk=true
810
  # Check whether --with-tkconfig or --without-tkconfig was given.
811
if test "${with_tkconfig+set}" = set; then
812
  withval="$with_tkconfig"
813
  with_tkconfig=${withval}
814
fi
815
 
816
  echo $ac_n "checking for Tk configuration""... $ac_c" 1>&6
817
echo "configure:818: checking for Tk configuration" >&5
818
  if eval "test \"`echo '$''{'ac_cv_c_tkconfig'+set}'`\" = set"; then
819
  echo $ac_n "(cached) $ac_c" 1>&6
820
else
821
 
822
 
823
  # First check to see if --with-tkconfig was specified.
824
  if test x"${with_tkconfig}" != x ; then
825
    if test -f "${with_tkconfig}/tkConfig.sh" ; then
826
      ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
827
    else
828
      { echo "configure: error: ${with_tkconfig} directory doesn't contain tkConfig.sh" 1>&2; exit 1; }
829
    fi
830
  fi
831
 
832
  # then check for a private Tk library
833
 
834
  if test x"${ac_cv_c_tkconfig}" = x ; then
835
    for i in \
836
                ../tk \
837
                `ls -dr ../tk[4-9].[0-9] 2>/dev/null` \
838
                ../../tk \
839
                `ls -dr ../../tk[4-9].[0-9] 2>/dev/null` \
840
                ../../../tk \
841
                `ls -dr ../../../tk[4-9].[0-9] 2>/dev/null` ; do
842
      if test -f "$i/unix/tkConfig.sh" ; then
843
        ac_cv_c_tkconfig=`(cd $i/unix; pwd)`
844
        break
845
      fi
846
    done
847
  fi
848
 
849
  # check in a few common install locations
850
  if test x"${ac_cv_c_tkconfig}" = x ; then
851
    for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
852
      if test -f "$i/tkConfig.sh" ; then
853
        ac_cv_c_tkconfig=`(cd $i; pwd)`
854
        break
855
      fi
856
    done
857
  fi
858
  # check in a few other private locations
859
 
860
  if test x"${ac_cv_c_tkconfig}" = x ; then
861
    for i in \
862
                ${srcdir}/../tk \
863
                `ls -dr ${srcdir}/../tk[4-9].[0-9] 2>/dev/null` ; do
864
      if test -f "$i/unix/tkConfig.sh" ; then
865
        ac_cv_c_tkconfig=`(cd $i/unix; pwd)`
866
        break
867
      fi
868
    done
869
  fi
870
 
871
 
872
fi
873
 
874
  if test x"${ac_cv_c_tkconfig}" = x ; then
875
    TKCONFIG="# no Tk configs found"
876
    echo "configure: warning: Can't find Tk configuration definitions" 1>&2
877
  else
878
    no_tk=
879
    TKCONFIG=${ac_cv_c_tkconfig}/tkConfig.sh
880
    echo "$ac_t""found $TKCONFIG" 1>&6
881
  fi
882
fi
883
 
884
 
885
 
886
    if test -f "$TKCONFIG" ; then
887
      . $TKCONFIG
888
    fi
889
 
890
 
891
 
892
 
893
 
894
 
895
 
896
 
897
 
898
 
899
 
900
 
901
EXP_AND_TK_LIBS=$TK_LIBS
902
 
903
# CYGNUS LOCAL dj/cygwin
904
 
905
# Make sure we can run config.sub.
906
if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
907
else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
908
fi
909
 
910
echo $ac_n "checking host system type""... $ac_c" 1>&6
911
echo "configure:912: checking host system type" >&5
912
 
913
host_alias=$host
914
case "$host_alias" in
915
NONE)
916
  case $nonopt in
917
  NONE)
918
    if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
919
    else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
920
    fi ;;
921
  *) host_alias=$nonopt ;;
922
  esac ;;
923
esac
924
 
925
host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
926
host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
927
host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
928
host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
929
echo "$ac_t""$host" 1>&6
930
 
931
# If we built a cygwin-specific tcl, use it here.
932
case "${host}" in
933
*-*-cygwin*)
934
  if test -d $srcdir/../tcl/cygwin/.
935
  then
936
    TCL_BUILD_LIB_SPEC="../tcl/cygwin/libtcl_cygwin.a"
937
    # Use the same static lib for installed_expect
938
    TCL_LIB_SPEC="../tcl/cygwin/libtcl_cygwin.a"
939
    EXP_CYGWIN_ALTTCL='-DCYGWIN_ALTTCL'
940
  fi
941
  ;;
942
esac
943
 
944
# An explanation is in order for the strange things going on with the
945
# various LIBS.  There are three separate definitions for LIBS.  The
946
# reason is that some systems require shared libraries include
947
# references to their dependent libraries, i.e., any additional
948
# libraries that must be linked to.  And some systems get upset if the
949
# references are repeated on the link line.  So therefore, we create
950
# one for Expect and Tk (EXP_AND_TK_LIBS), one for Expect and Tcl
951
# (EXP_AND_TCL_LIBS), and finally, one for building Expect's own
952
# shared library.  Tcl's tclConfig.sh insists that any shared libs
953
# that it "helps" build must pass the libraries as LIBS (see comment
954
# near end of this configure file).  I would do but since we're close
955
# to hitting config's max symbols, we take one short cut and pack the
956
# LIBS into EXP_SHLIB_LD_LIBS (which is basically what Tcl wants to do
957
# for us).  The point, however, is that there's no separate LIBS or
958
# EXP_LIBS symbol passed out of configure.  One additional point for
959
# confusion is that LIBS is what configure uses to do all library
960
# tests, so we have to swap definitions of LIBS peridically.  When we
961
# are swapping out the one for Expect's shared library, we save it in
962
# EXP_LIBS.  Sigh.
963
 
964
OLD_CFLAGS=$CFLAGS
965
# Extract the first word of "gcc", so it can be a program name with args.
966
set dummy gcc; ac_word=$2
967
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
968
echo "configure:969: checking for $ac_word" >&5
969
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
970
  echo $ac_n "(cached) $ac_c" 1>&6
971
else
972
  if test -n "$CC"; then
973
  ac_cv_prog_CC="$CC" # Let the user override the test.
974
else
975
  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
976
  ac_dummy="$PATH"
977
  for ac_dir in $ac_dummy; do
978
    test -z "$ac_dir" && ac_dir=.
979
    if test -f $ac_dir/$ac_word; then
980
      ac_cv_prog_CC="gcc"
981
      break
982
    fi
983
  done
984
  IFS="$ac_save_ifs"
985
fi
986
fi
987
CC="$ac_cv_prog_CC"
988
if test -n "$CC"; then
989
  echo "$ac_t""$CC" 1>&6
990
else
991
  echo "$ac_t""no" 1>&6
992
fi
993
 
994
if test -z "$CC"; then
995
  # Extract the first word of "cc", so it can be a program name with args.
996
set dummy cc; ac_word=$2
997
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
998
echo "configure:999: checking for $ac_word" >&5
999
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1000
  echo $ac_n "(cached) $ac_c" 1>&6
1001
else
1002
  if test -n "$CC"; then
1003
  ac_cv_prog_CC="$CC" # Let the user override the test.
1004
else
1005
  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1006
  ac_prog_rejected=no
1007
  ac_dummy="$PATH"
1008
  for ac_dir in $ac_dummy; do
1009
    test -z "$ac_dir" && ac_dir=.
1010
    if test -f $ac_dir/$ac_word; then
1011
      if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1012
        ac_prog_rejected=yes
1013
        continue
1014
      fi
1015
      ac_cv_prog_CC="cc"
1016
      break
1017
    fi
1018
  done
1019
  IFS="$ac_save_ifs"
1020
if test $ac_prog_rejected = yes; then
1021
  # We found a bogon in the path, so make sure we never use it.
1022
  set dummy $ac_cv_prog_CC
1023
  shift
1024
  if test $# -gt 0; then
1025
    # We chose a different compiler from the bogus one.
1026
    # However, it has the same basename, so the bogon will be chosen
1027
    # first if we set CC to just the basename; use the full file name.
1028
    shift
1029
    set dummy "$ac_dir/$ac_word" "$@"
1030
    shift
1031
    ac_cv_prog_CC="$@"
1032
  fi
1033
fi
1034
fi
1035
fi
1036
CC="$ac_cv_prog_CC"
1037
if test -n "$CC"; then
1038
  echo "$ac_t""$CC" 1>&6
1039
else
1040
  echo "$ac_t""no" 1>&6
1041
fi
1042
 
1043
  if test -z "$CC"; then
1044
    case "`uname -s`" in
1045
    *win32* | *WIN32*)
1046
      # Extract the first word of "cl", so it can be a program name with args.
1047
set dummy cl; ac_word=$2
1048
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1049
echo "configure:1050: checking for $ac_word" >&5
1050
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1051
  echo $ac_n "(cached) $ac_c" 1>&6
1052
else
1053
  if test -n "$CC"; then
1054
  ac_cv_prog_CC="$CC" # Let the user override the test.
1055
else
1056
  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1057
  ac_dummy="$PATH"
1058
  for ac_dir in $ac_dummy; do
1059
    test -z "$ac_dir" && ac_dir=.
1060
    if test -f $ac_dir/$ac_word; then
1061
      ac_cv_prog_CC="cl"
1062
      break
1063
    fi
1064
  done
1065
  IFS="$ac_save_ifs"
1066
fi
1067
fi
1068
CC="$ac_cv_prog_CC"
1069
if test -n "$CC"; then
1070
  echo "$ac_t""$CC" 1>&6
1071
else
1072
  echo "$ac_t""no" 1>&6
1073
fi
1074
 ;;
1075
    esac
1076
  fi
1077
  test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1078
fi
1079
 
1080
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1081
echo "configure:1082: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1082
 
1083
ac_ext=c
1084
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1085
ac_cpp='$CPP $CPPFLAGS'
1086
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1087
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1088
cross_compiling=$ac_cv_prog_cc_cross
1089
 
1090
cat > conftest.$ac_ext << EOF
1091
 
1092
#line 1093 "configure"
1093
#include "confdefs.h"
1094
 
1095
main(){return(0);}
1096
EOF
1097
if { (eval echo configure:1098: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1098
  ac_cv_prog_cc_works=yes
1099
  # If we can't run a trivial program, we are probably using a cross compiler.
1100
  if (./conftest; exit) 2>/dev/null; then
1101
    ac_cv_prog_cc_cross=no
1102
  else
1103
    ac_cv_prog_cc_cross=yes
1104
  fi
1105
else
1106
  echo "configure: failed program was:" >&5
1107
  cat conftest.$ac_ext >&5
1108
  ac_cv_prog_cc_works=no
1109
fi
1110
rm -fr conftest*
1111
ac_ext=c
1112
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1113
ac_cpp='$CPP $CPPFLAGS'
1114
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1115
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1116
cross_compiling=$ac_cv_prog_cc_cross
1117
 
1118
echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1119
if test $ac_cv_prog_cc_works = no; then
1120
  { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1121
fi
1122
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1123
echo "configure:1124: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1124
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1125
cross_compiling=$ac_cv_prog_cc_cross
1126
 
1127
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1128
echo "configure:1129: checking whether we are using GNU C" >&5
1129
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1130
  echo $ac_n "(cached) $ac_c" 1>&6
1131
else
1132
  cat > conftest.c <
1133
#ifdef __GNUC__
1134
  yes;
1135
#endif
1136
EOF
1137
if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1138: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1138
  ac_cv_prog_gcc=yes
1139
else
1140
  ac_cv_prog_gcc=no
1141
fi
1142
fi
1143
 
1144
echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1145
 
1146
if test $ac_cv_prog_gcc = yes; then
1147
  GCC=yes
1148
else
1149
  GCC=
1150
fi
1151
 
1152
ac_test_CFLAGS="${CFLAGS+set}"
1153
ac_save_CFLAGS="$CFLAGS"
1154
CFLAGS=
1155
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1156
echo "configure:1157: checking whether ${CC-cc} accepts -g" >&5
1157
if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1158
  echo $ac_n "(cached) $ac_c" 1>&6
1159
else
1160
  echo 'void f(){}' > conftest.c
1161
if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1162
  ac_cv_prog_cc_g=yes
1163
else
1164
  ac_cv_prog_cc_g=no
1165
fi
1166
rm -f conftest*
1167
 
1168
fi
1169
 
1170
echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1171
if test "$ac_test_CFLAGS" = set; then
1172
  CFLAGS="$ac_save_CFLAGS"
1173
elif test $ac_cv_prog_cc_g = yes; then
1174
  if test "$GCC" = yes; then
1175
    CFLAGS="-g -O2"
1176
  else
1177
    CFLAGS="-g"
1178
  fi
1179
else
1180
  if test "$GCC" = yes; then
1181
    CFLAGS="-O2"
1182
  else
1183
    CFLAGS=
1184
  fi
1185
fi
1186
 
1187
CFLAGS=$OLD_CFLAGS
1188
 
1189
# If we cannot compile and link a trivial program, we can't expect anything to work
1190
echo $ac_n "checking whether the compiler ($CC) actually works""... $ac_c" 1>&6
1191
echo "configure:1192: checking whether the compiler ($CC) actually works" >&5
1192
cat > conftest.$ac_ext <
1193
#line 1194 "configure"
1194
#include "confdefs.h"
1195
 
1196
int main() {
1197
/* don't need anything here */
1198
; return 0; }
1199
EOF
1200
if { (eval echo configure:1201: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1201
  rm -rf conftest*
1202
  c_compiles=yes
1203
else
1204
  echo "configure: failed program was:" >&5
1205
  cat conftest.$ac_ext >&5
1206
  rm -rf conftest*
1207
  c_compiles=no
1208
fi
1209
rm -f conftest*
1210
 
1211
cat > conftest.$ac_ext <
1212
#line 1213 "configure"
1213
#include "confdefs.h"
1214
 
1215
int main() {
1216
/* don't need anything here */
1217
; return 0; }
1218
EOF
1219
if { (eval echo configure:1220: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1220
  rm -rf conftest*
1221
  c_links=yes
1222
else
1223
  echo "configure: failed program was:" >&5
1224
  cat conftest.$ac_ext >&5
1225
  rm -rf conftest*
1226
  c_links=no
1227
fi
1228
rm -f conftest*
1229
 
1230
if test x"${c_compiles}" = x"no" ; then
1231
  { echo "configure: error: the native compiler is broken and won't compile." 1>&2; exit 1; }
1232
fi
1233
 
1234
if test x"${c_links}" = x"no" ; then
1235
  { echo "configure: error: the native compiler is broken and won't link." 1>&2; exit 1; }
1236
fi
1237
echo "$ac_t""yes" 1>&6
1238
 
1239
 
1240
# this'll use a BSD compatible install or our included install-sh
1241
# Find a good install program.  We prefer a C program (faster),
1242
# so one script is as good as another.  But avoid the broken or
1243
# incompatible versions:
1244
# SysV /etc/install, /usr/sbin/install
1245
# SunOS /usr/etc/install
1246
# IRIX /sbin/install
1247
# AIX /bin/install
1248
# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1249
# AFS /usr/afsws/bin/install, which mishandles nonexistent args
1250
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1251
# ./install, which can be erroneously created by make from ./install.sh.
1252
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1253
echo "configure:1254: checking for a BSD compatible install" >&5
1254
if test -z "$INSTALL"; then
1255
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1256
  echo $ac_n "(cached) $ac_c" 1>&6
1257
else
1258
    IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
1259
  for ac_dir in $PATH; do
1260
    # Account for people who put trailing slashes in PATH elements.
1261
    case "$ac_dir/" in
1262
    /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1263
    *)
1264
      # OSF1 and SCO ODT 3.0 have their own names for install.
1265
      # Don't use installbsd from OSF since it installs stuff as root
1266
      # by default.
1267
      for ac_prog in ginstall scoinst install; do
1268
        if test -f $ac_dir/$ac_prog; then
1269
          if test $ac_prog = install &&
1270
            grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1271
            # AIX install.  It has an incompatible calling convention.
1272
            :
1273
          else
1274
            ac_cv_path_install="$ac_dir/$ac_prog -c"
1275
            break 2
1276
          fi
1277
        fi
1278
      done
1279
      ;;
1280
    esac
1281
  done
1282
  IFS="$ac_save_IFS"
1283
 
1284
fi
1285
  if test "${ac_cv_path_install+set}" = set; then
1286
    INSTALL="$ac_cv_path_install"
1287
  else
1288
    # As a last resort, use the slow shell script.  We don't cache a
1289
    # path for INSTALL within a source directory, because that will
1290
    # break other packages using the cache if that directory is
1291
    # removed, or if the path is relative.
1292
    INSTALL="$ac_install_sh"
1293
  fi
1294
fi
1295
echo "$ac_t""$INSTALL" 1>&6
1296
 
1297
# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1298
# It thinks the first close brace ends the variable substitution.
1299
test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1300
 
1301
test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
1302
 
1303
test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1304
 
1305
 
1306
# Tcl sets TCL_RANLIB appropriately for shared library if --enable-shared
1307
# Extract the first word of "ranlib", so it can be a program name with args.
1308
set dummy ranlib; ac_word=$2
1309
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1310
echo "configure:1311: checking for $ac_word" >&5
1311
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1312
  echo $ac_n "(cached) $ac_c" 1>&6
1313
else
1314
  if test -n "$RANLIB"; then
1315
  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1316
else
1317
  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1318
  ac_dummy="$PATH"
1319
  for ac_dir in $ac_dummy; do
1320
    test -z "$ac_dir" && ac_dir=.
1321
    if test -f $ac_dir/$ac_word; then
1322
      ac_cv_prog_RANLIB="ranlib"
1323
      break
1324
    fi
1325
  done
1326
  IFS="$ac_save_ifs"
1327
  test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1328
fi
1329
fi
1330
RANLIB="$ac_cv_prog_RANLIB"
1331
if test -n "$RANLIB"; then
1332
  echo "$ac_t""$RANLIB" 1>&6
1333
else
1334
  echo "$ac_t""no" 1>&6
1335
fi
1336
 
1337
UNSHARED_RANLIB=$RANLIB
1338
 
1339
# these are the other subdirectories we need to configure
1340
subdirs="testsuite"
1341
 
1342
 
1343
# This is for LynxOS, which needs a flag to force true POSIX when
1344
# building.  The flag varies depending how old the compiler is.
1345
# -X is for the old "cc" and "gcc" (based on 1.42)
1346
# -mposix is for the new gcc (at least 2.5.8)
1347
# This modifies the value of $CC to have the POSIX flag added
1348
# so it'll configure correctly
1349
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1350
echo "configure:1351: checking how to run the C preprocessor" >&5
1351
# On Suns, sometimes $CPP names a directory.
1352
if test -n "$CPP" && test -d "$CPP"; then
1353
  CPP=
1354
fi
1355
if test -z "$CPP"; then
1356
if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1357
  echo $ac_n "(cached) $ac_c" 1>&6
1358
else
1359
    # This must be in double quotes, not single quotes, because CPP may get
1360
  # substituted into the Makefile and "${CC-cc}" will confuse make.
1361
  CPP="${CC-cc} -E"
1362
  # On the NeXT, cc -E runs the code through the compiler's parser,
1363
  # not just through cpp.
1364
  cat > conftest.$ac_ext <
1365
#line 1366 "configure"
1366
#include "confdefs.h"
1367
#include 
1368
Syntax Error
1369
EOF
1370
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1371
{ (eval echo configure:1372: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1372
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1373
if test -z "$ac_err"; then
1374
  :
1375
else
1376
  echo "$ac_err" >&5
1377
  echo "configure: failed program was:" >&5
1378
  cat conftest.$ac_ext >&5
1379
  rm -rf conftest*
1380
  CPP="${CC-cc} -E -traditional-cpp"
1381
  cat > conftest.$ac_ext <
1382
#line 1383 "configure"
1383
#include "confdefs.h"
1384
#include 
1385
Syntax Error
1386
EOF
1387
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1388
{ (eval echo configure:1389: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1389
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1390
if test -z "$ac_err"; then
1391
  :
1392
else
1393
  echo "$ac_err" >&5
1394
  echo "configure: failed program was:" >&5
1395
  cat conftest.$ac_ext >&5
1396
  rm -rf conftest*
1397
  CPP="${CC-cc} -nologo -E"
1398
  cat > conftest.$ac_ext <
1399
#line 1400 "configure"
1400
#include "confdefs.h"
1401
#include 
1402
Syntax Error
1403
EOF
1404
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1405
{ (eval echo configure:1406: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1406
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1407
if test -z "$ac_err"; then
1408
  :
1409
else
1410
  echo "$ac_err" >&5
1411
  echo "configure: failed program was:" >&5
1412
  cat conftest.$ac_ext >&5
1413
  rm -rf conftest*
1414
  CPP=/lib/cpp
1415
fi
1416
rm -f conftest*
1417
fi
1418
rm -f conftest*
1419
fi
1420
rm -f conftest*
1421
  ac_cv_prog_CPP="$CPP"
1422
fi
1423
  CPP="$ac_cv_prog_CPP"
1424
else
1425
  ac_cv_prog_CPP="$CPP"
1426
fi
1427
echo "$ac_t""$CPP" 1>&6
1428
 
1429
 
1430
echo $ac_n "checking if running LynxOS""... $ac_c" 1>&6
1431
echo "configure:1432: checking if running LynxOS" >&5
1432
if eval "test \"`echo '$''{'ac_cv_os_lynx'+set}'`\" = set"; then
1433
  echo $ac_n "(cached) $ac_c" 1>&6
1434
else
1435
  cat > conftest.$ac_ext <
1436
#line 1437 "configure"
1437
#include "confdefs.h"
1438
/*
1439
 * The old Lynx "cc" only defines "Lynx", but the newer one uses "__Lynx__"
1440
 */
1441
#if defined(__Lynx__) || defined(Lynx)
1442
yes
1443
#endif
1444
 
1445
EOF
1446
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1447
  egrep "yes" >/dev/null 2>&1; then
1448
  rm -rf conftest*
1449
  ac_cv_os_lynx=yes
1450
else
1451
  rm -rf conftest*
1452
  ac_cv_os_lynx=no
1453
fi
1454
rm -f conftest*
1455
 
1456
fi
1457
 
1458
#
1459
if test "$ac_cv_os_lynx" = "yes" ; then
1460
  echo "$ac_t""yes" 1>&6
1461
  cat >> confdefs.h <<\EOF
1462
#define LYNX 1
1463
EOF
1464
 
1465
  echo $ac_n "checking whether -mposix or -X is available""... $ac_c" 1>&6
1466
echo "configure:1467: checking whether -mposix or -X is available" >&5
1467
  if eval "test \"`echo '$''{'ac_cv_c_posix_flag'+set}'`\" = set"; then
1468
  echo $ac_n "(cached) $ac_c" 1>&6
1469
else
1470
  cat > conftest.$ac_ext <
1471
#line 1472 "configure"
1472
#include "confdefs.h"
1473
 
1474
int main() {
1475
 
1476
  /*
1477
   * This flag varies depending on how old the compiler is.
1478
   * -X is for the old "cc" and "gcc" (based on 1.42).
1479
   * -mposix is for the new gcc (at least 2.5.8).
1480
   */
1481
  #if defined(__GNUC__) && __GNUC__ >= 2
1482
  choke me
1483
  #endif
1484
 
1485
; return 0; }
1486
EOF
1487
if { (eval echo configure:1488: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1488
  rm -rf conftest*
1489
  ac_cv_c_posix_flag=" -mposix"
1490
else
1491
  echo "configure: failed program was:" >&5
1492
  cat conftest.$ac_ext >&5
1493
  rm -rf conftest*
1494
  ac_cv_c_posix_flag=" -X"
1495
fi
1496
rm -f conftest*
1497
fi
1498
 
1499
  CC="$CC $ac_cv_c_posix_flag"
1500
  echo "$ac_t""$ac_cv_c_posix_flag" 1>&6
1501
  else
1502
  echo "$ac_t""no" 1>&6
1503
fi
1504
 
1505
 
1506
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1507
echo "configure:1508: checking for ANSI C header files" >&5
1508
if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1509
  echo $ac_n "(cached) $ac_c" 1>&6
1510
else
1511
  cat > conftest.$ac_ext <
1512
#line 1513 "configure"
1513
#include "confdefs.h"
1514
#include 
1515
#include 
1516
#include 
1517
#include 
1518
EOF
1519
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1520
{ (eval echo configure:1521: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1521
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1522
if test -z "$ac_err"; then
1523
  rm -rf conftest*
1524
  ac_cv_header_stdc=yes
1525
else
1526
  echo "$ac_err" >&5
1527
  echo "configure: failed program was:" >&5
1528
  cat conftest.$ac_ext >&5
1529
  rm -rf conftest*
1530
  ac_cv_header_stdc=no
1531
fi
1532
rm -f conftest*
1533
 
1534
if test $ac_cv_header_stdc = yes; then
1535
  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1536
cat > conftest.$ac_ext <
1537
#line 1538 "configure"
1538
#include "confdefs.h"
1539
#include 
1540
EOF
1541
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1542
  egrep "memchr" >/dev/null 2>&1; then
1543
  :
1544
else
1545
  rm -rf conftest*
1546
  ac_cv_header_stdc=no
1547
fi
1548
rm -f conftest*
1549
 
1550
fi
1551
 
1552
if test $ac_cv_header_stdc = yes; then
1553
  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1554
cat > conftest.$ac_ext <
1555
#line 1556 "configure"
1556
#include "confdefs.h"
1557
#include 
1558
EOF
1559
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1560
  egrep "free" >/dev/null 2>&1; then
1561
  :
1562
else
1563
  rm -rf conftest*
1564
  ac_cv_header_stdc=no
1565
fi
1566
rm -f conftest*
1567
 
1568
fi
1569
 
1570
if test $ac_cv_header_stdc = yes; then
1571
  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1572
if test "$cross_compiling" = yes; then
1573
  :
1574
else
1575
  cat > conftest.$ac_ext <
1576
#line 1577 "configure"
1577
#include "confdefs.h"
1578
#include 
1579
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1580
#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1581
#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1582
int main () { int i; for (i = 0; i < 256; i++)
1583
if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1584
exit (0); }
1585
 
1586
EOF
1587
if { (eval echo configure:1588: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1588
then
1589
  :
1590
else
1591
  echo "configure: failed program was:" >&5
1592
  cat conftest.$ac_ext >&5
1593
  rm -fr conftest*
1594
  ac_cv_header_stdc=no
1595
fi
1596
rm -fr conftest*
1597
fi
1598
 
1599
fi
1600
fi
1601
 
1602
echo "$ac_t""$ac_cv_header_stdc" 1>&6
1603
if test $ac_cv_header_stdc = yes; then
1604
  cat >> confdefs.h <<\EOF
1605
#define STDC_HEADERS 1
1606
EOF
1607
 
1608
fi
1609
 
1610
echo $ac_n "checking for pid_t""... $ac_c" 1>&6
1611
echo "configure:1612: checking for pid_t" >&5
1612
if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
1613
  echo $ac_n "(cached) $ac_c" 1>&6
1614
else
1615
  cat > conftest.$ac_ext <
1616
#line 1617 "configure"
1617
#include "confdefs.h"
1618
#include 
1619
#if STDC_HEADERS
1620
#include 
1621
#include 
1622
#endif
1623
EOF
1624
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1625
  egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1626
  rm -rf conftest*
1627
  ac_cv_type_pid_t=yes
1628
else
1629
  rm -rf conftest*
1630
  ac_cv_type_pid_t=no
1631
fi
1632
rm -f conftest*
1633
 
1634
fi
1635
echo "$ac_t""$ac_cv_type_pid_t" 1>&6
1636
if test $ac_cv_type_pid_t = no; then
1637
  cat >> confdefs.h <<\EOF
1638
#define pid_t int
1639
EOF
1640
 
1641
fi
1642
 
1643
echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
1644
echo "configure:1645: checking return type of signal handlers" >&5
1645
if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
1646
  echo $ac_n "(cached) $ac_c" 1>&6
1647
else
1648
  cat > conftest.$ac_ext <
1649
#line 1650 "configure"
1650
#include "confdefs.h"
1651
#include 
1652
#include 
1653
#ifdef signal
1654
#undef signal
1655
#endif
1656
#ifdef __cplusplus
1657
extern "C" void (*signal (int, void (*)(int)))(int);
1658
#else
1659
void (*signal ()) ();
1660
#endif
1661
 
1662
int main() {
1663
int i;
1664
; return 0; }
1665
EOF
1666
if { (eval echo configure:1667: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1667
  rm -rf conftest*
1668
  ac_cv_type_signal=void
1669
else
1670
  echo "configure: failed program was:" >&5
1671
  cat conftest.$ac_ext >&5
1672
  rm -rf conftest*
1673
  ac_cv_type_signal=int
1674
fi
1675
rm -f conftest*
1676
fi
1677
 
1678
echo "$ac_t""$ac_cv_type_signal" 1>&6
1679
cat >> confdefs.h <
1680
#define RETSIGTYPE $ac_cv_type_signal
1681
EOF
1682
 
1683
 
1684
echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
1685
echo "configure:1686: checking whether time.h and sys/time.h may both be included" >&5
1686
if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
1687
  echo $ac_n "(cached) $ac_c" 1>&6
1688
else
1689
  cat > conftest.$ac_ext <
1690
#line 1691 "configure"
1691
#include "confdefs.h"
1692
#include 
1693
#include 
1694
#include 
1695
int main() {
1696
struct tm *tp;
1697
; return 0; }
1698
EOF
1699
if { (eval echo configure:1700: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1700
  rm -rf conftest*
1701
  ac_cv_header_time=yes
1702
else
1703
  echo "configure: failed program was:" >&5
1704
  cat conftest.$ac_ext >&5
1705
  rm -rf conftest*
1706
  ac_cv_header_time=no
1707
fi
1708
rm -f conftest*
1709
fi
1710
 
1711
echo "$ac_t""$ac_cv_header_time" 1>&6
1712
if test $ac_cv_header_time = yes; then
1713
  cat >> confdefs.h <<\EOF
1714
#define TIME_WITH_SYS_TIME 1
1715
EOF
1716
 
1717
fi
1718
 
1719
echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
1720
echo "configure:1721: checking for sys/wait.h that is POSIX.1 compatible" >&5
1721
if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
1722
  echo $ac_n "(cached) $ac_c" 1>&6
1723
else
1724
  cat > conftest.$ac_ext <
1725
#line 1726 "configure"
1726
#include "confdefs.h"
1727
#include 
1728
#include 
1729
#ifndef WEXITSTATUS
1730
#define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
1731
#endif
1732
#ifndef WIFEXITED
1733
#define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
1734
#endif
1735
int main() {
1736
int s;
1737
wait (&s);
1738
s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
1739
; return 0; }
1740
EOF
1741
if { (eval echo configure:1742: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1742
  rm -rf conftest*
1743
  ac_cv_header_sys_wait_h=yes
1744
else
1745
  echo "configure: failed program was:" >&5
1746
  cat conftest.$ac_ext >&5
1747
  rm -rf conftest*
1748
  ac_cv_header_sys_wait_h=no
1749
fi
1750
rm -f conftest*
1751
fi
1752
 
1753
echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
1754
if test $ac_cv_header_sys_wait_h = yes; then
1755
  cat >> confdefs.h <<\EOF
1756
#define HAVE_SYS_WAIT_H 1
1757
EOF
1758
 
1759
fi
1760
 
1761
 
1762
EXP_CFLAGS=""
1763
# Use -g on all systems but Linux where it upsets the dynamic X libraries.
1764
EXP_CFLAGS="$EXP_CFLAGS $EXP_CYGWIN_ALTTCL"
1765
 
1766
echo $ac_n "checking if running Mach""... $ac_c" 1>&6
1767
echo "configure:1768: checking if running Mach" >&5
1768
mach=0
1769
case "${host}" in
1770
  # Both Next and pure Mach behave identically with respect
1771
  # to a few things, so just lump them together as "mach"
1772
  *-*-mach*)            mach=1 ;;
1773
  *-*-next*)            mach=1 ; next=1 ;;
1774
esac
1775
 
1776
if test $mach -eq 1 ; then
1777
  echo "$ac_t""yes" 1>&6
1778
else
1779
  echo "$ac_t""no" 1>&6
1780
fi
1781
 
1782
echo $ac_n "checking if running MachTen""... $ac_c" 1>&6
1783
echo "configure:1784: checking if running MachTen" >&5
1784
# yet another Mach clone
1785
if test -r /MachTen -a "$cross_compiling" != "yes" ; then
1786
  echo "$ac_t""yes" 1>&6
1787
  mach=1
1788
else
1789
  echo "$ac_t""no" 1>&6
1790
fi
1791
 
1792
echo $ac_n "checking if on Pyramid""... $ac_c" 1>&6
1793
echo "configure:1794: checking if on Pyramid" >&5
1794
if test -r /bin/pyr -a "$cross_compiling" != "yes" ; then
1795
  echo "$ac_t""yes" 1>&6
1796
  pyr=1
1797
else
1798
  echo "$ac_t""no" 1>&6
1799
  pyr=0
1800
fi
1801
 
1802
echo $ac_n "checking if on Apollo""... $ac_c" 1>&6
1803
echo "configure:1804: checking if on Apollo" >&5
1804
if test -r /usr/apollo/bin -a "$cross_compiling" != "yes" ; then
1805
  echo "$ac_t""yes" 1>&6
1806
  apollo=1
1807
else
1808
  echo "$ac_t""no" 1>&6
1809
  apollo=0
1810
fi
1811
 
1812
echo $ac_n "checking if on Interactive""... $ac_c" 1>&6
1813
echo "configure:1814: checking if on Interactive" >&5
1814
if test "x`(uname -s) 2>/dev/null`" = xIUNIX; then
1815
  echo "$ac_t""yes" 1>&6
1816
  iunix=1
1817
else
1818
  echo "$ac_t""no" 1>&6
1819
  iunix=0
1820
fi
1821
 
1822
echo $ac_n "checking if stty reads stdout""... $ac_c" 1>&6
1823
echo "configure:1824: checking if stty reads stdout" >&5
1824
 
1825
# On some systems stty can't be run in the background (svr4) or get it
1826
# wrong because they fail to complain (next, mach), so don't attempt
1827
# the test on some systems.
1828
 
1829
stty_reads_stdout=""
1830
case "${host}" in
1831
  *-*-solaris*)         stty_reads_stdout=0 ;;
1832
  *-*-irix*)            stty_reads_stdout=0 ;;
1833
  *-*-sco3.2v[45]*)     stty_reads_stdout=1 ;;
1834
  i[3456]86-*-sysv4.2MP)        stty_reads_stdout=0 ;;
1835
  i[3456]86-*-linux*)   stty_reads_stdout=0 ;;
1836
  # Not sure about old convex but 5.2 definitely reads from stdout
1837
  c[12]-*-*)            stty_reads_stdout=1 ;;
1838
  *-*-aix[34]*) stty_reads_stdout=0 ;;
1839
  *-*-hpux9*)           stty_reads_stdout=0 ;;
1840
  *-*-hpux10*)          stty_reads_stdout=0 ;;
1841
  *-*-hpux11*)          stty_reads_stdout=0 ;;
1842
  *-*-osf[234]*)        stty_reads_stdout=0 ;;
1843
  *-*-ultrix4.4)        stty_reads_stdout=0 ;;
1844
  *-*-dgux*)            stty_reads_stdout=0 ;;
1845
  *-*-cygwin*)          stty_reads_stdout=0 ;;
1846
esac
1847
 
1848
if test $mach -eq 1 ; then
1849
  stty_reads_stdout=1
1850
fi
1851
if test $apollo -eq 1 ; then
1852
  stty_reads_stdout=1
1853
fi
1854
if test $pyr -eq 1 ; then
1855
  stty_reads_stdout=1
1856
fi
1857
 
1858
# if we still don't know, test
1859
if test x"${stty_reads_stdout}" = x"" ; then
1860
  /bin/stty > /dev/null 2> /dev/null
1861
  if test $? -ne 0 ; then
1862
    stty_reads_stdout=1
1863
  else
1864
    stty_reads_stdout=0
1865
  fi
1866
fi
1867
 
1868
if test ${stty_reads_stdout} -eq 1 ; then
1869
  echo "$ac_t""yes" 1>&6
1870
  cat >> confdefs.h <<\EOF
1871
#define STTY_READS_STDOUT 1
1872
EOF
1873
 
1874
else
1875
  echo "$ac_t""no" 1>&6
1876
fi
1877
 
1878
# Solaris 2.4 and later requires __EXTENSIONS__ in order to see all sorts
1879
# of traditional but nonstandard stuff in header files.
1880
echo $ac_n "checking if running Solaris""... $ac_c" 1>&6
1881
echo "configure:1882: checking if running Solaris" >&5
1882
solaris=0
1883
case "${host}" in
1884
  *-*-solaris*)         solaris=1;;
1885
esac
1886
 
1887
if test $solaris -eq 1 ; then
1888
  echo "$ac_t""yes" 1>&6
1889
  cat >> confdefs.h <<\EOF
1890
#define SOLARIS 1
1891
EOF
1892
 
1893
else
1894
  echo "$ac_t""no" 1>&6
1895
fi
1896
 
1897
 
1898
# On a few systems, libm.a is the same as libc.a
1899
# Don't bother to test against Tcl and Tk libs, they always include -lm
1900
echo $ac_n "checking for sin""... $ac_c" 1>&6
1901
echo "configure:1902: checking for sin" >&5
1902
if eval "test \"`echo '$''{'ac_cv_func_sin'+set}'`\" = set"; then
1903
  echo $ac_n "(cached) $ac_c" 1>&6
1904
else
1905
  cat > conftest.$ac_ext <
1906
#line 1907 "configure"
1907
#include "confdefs.h"
1908
/* System header to define __stub macros and hopefully few prototypes,
1909
    which can conflict with char sin(); below.  */
1910
#include 
1911
/* Override any gcc2 internal prototype to avoid an error.  */
1912
/* We use char because int might match the return type of a gcc2
1913
    builtin and then its argument prototype would still apply.  */
1914
char sin();
1915
 
1916
int main() {
1917
 
1918
/* The GNU C library defines this for functions which it implements
1919
    to always fail with ENOSYS.  Some functions are actually named
1920
    something starting with __ and the normal name is an alias.  */
1921
#if defined (__stub_sin) || defined (__stub___sin)
1922
choke me
1923
#else
1924
sin();
1925
#endif
1926
 
1927
; return 0; }
1928
EOF
1929
if { (eval echo configure:1930: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1930
  rm -rf conftest*
1931
  eval "ac_cv_func_sin=yes"
1932
else
1933
  echo "configure: failed program was:" >&5
1934
  cat conftest.$ac_ext >&5
1935
  rm -rf conftest*
1936
  eval "ac_cv_func_sin=no"
1937
fi
1938
rm -f conftest*
1939
fi
1940
 
1941
if eval "test \"`echo '$ac_cv_func_'sin`\" = yes"; then
1942
  echo "$ac_t""yes" 1>&6
1943
  :
1944
else
1945
  echo "$ac_t""no" 1>&6
1946
LIBS="${LIBS} -lm"
1947
fi
1948
 
1949
 
1950
# On Interactive UNIX, -Xp must be added to LIBS in order to find strftime.
1951
# This test should really be done by Tcl.  So just check Tcl's definition.
1952
# If defective, add to all three LIBS.  (It's not actually necessary for
1953
# EXP_LIBS since -Xp will just be ignored the way that EXP_LIBS is used in
1954
# the Makefile, but we include it for consistency.)
1955
if test $iunix -eq 1 ; then
1956
  EXP_LIBS=$LIBS
1957
  LIBS=$EXP_AND_TCL_LIBS
1958
  echo $ac_n "checking for strftime""... $ac_c" 1>&6
1959
echo "configure:1960: checking for strftime" >&5
1960
if eval "test \"`echo '$''{'ac_cv_func_strftime'+set}'`\" = set"; then
1961
  echo $ac_n "(cached) $ac_c" 1>&6
1962
else
1963
  cat > conftest.$ac_ext <
1964
#line 1965 "configure"
1965
#include "confdefs.h"
1966
/* System header to define __stub macros and hopefully few prototypes,
1967
    which can conflict with char strftime(); below.  */
1968
#include 
1969
/* Override any gcc2 internal prototype to avoid an error.  */
1970
/* We use char because int might match the return type of a gcc2
1971
    builtin and then its argument prototype would still apply.  */
1972
char strftime();
1973
 
1974
int main() {
1975
 
1976
/* The GNU C library defines this for functions which it implements
1977
    to always fail with ENOSYS.  Some functions are actually named
1978
    something starting with __ and the normal name is an alias.  */
1979
#if defined (__stub_strftime) || defined (__stub___strftime)
1980
choke me
1981
#else
1982
strftime();
1983
#endif
1984
 
1985
; return 0; }
1986
EOF
1987
if { (eval echo configure:1988: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1988
  rm -rf conftest*
1989
  eval "ac_cv_func_strftime=yes"
1990
else
1991
  echo "configure: failed program was:" >&5
1992
  cat conftest.$ac_ext >&5
1993
  rm -rf conftest*
1994
  eval "ac_cv_func_strftime=no"
1995
fi
1996
rm -f conftest*
1997
fi
1998
 
1999
if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
2000
  echo "$ac_t""yes" 1>&6
2001
  :
2002
else
2003
  echo "$ac_t""no" 1>&6
2004
 
2005
        EXP_LIBS="${LIBS} -Xp"
2006
        EXP_AND_TCL_LIBS="${LIBS} -Xp"
2007
        EXP_AND_TK_LIBS="${LIBS} -Xp"
2008
 
2009
fi
2010
 
2011
  LIBS=EXP_LIBS
2012
fi
2013
 
2014
#
2015
# Ok, lets find the tcl source trees so we can use the headers
2016
#
2017
 
2018
#
2019
# Ok, lets find the tcl source trees so we can use the headers
2020
# Warning: transition of version 9 to 10 will break this algorithm
2021
# because 10 sorts before 9. We also look for just tcl. We have to
2022
# be careful that we don't match stuff like tclX by accident.
2023
# the alternative search directory is involked by --with-tclinclude
2024
#
2025
no_tcl=true
2026
echo $ac_n "checking for Tcl private headers""... $ac_c" 1>&6
2027
echo "configure:2028: checking for Tcl private headers" >&5
2028
# Check whether --with-tclinclude or --without-tclinclude was given.
2029
if test "${with_tclinclude+set}" = set; then
2030
  withval="$with_tclinclude"
2031
  with_tclinclude=${withval}
2032
fi
2033
 
2034
if eval "test \"`echo '$''{'ac_cv_c_tclh'+set}'`\" = set"; then
2035
  echo $ac_n "(cached) $ac_c" 1>&6
2036
else
2037
 
2038
# first check to see if --with-tclinclude was specified
2039
if test x"${with_tclinclude}" != x ; then
2040
  if test -f ${with_tclinclude}/tclInt.h ; then
2041
    ac_cv_c_tclh=`(cd ${with_tclinclude}; pwd)`
2042
  elif test -f ${with_tclinclude}/generic/tclInt.h ; then
2043
    ac_cv_c_tclh=`(cd ${with_tclinclude}/generic; pwd)`
2044
  else
2045
    { echo "configure: error: ${with_tclinclude} directory doesn't contain private headers" 1>&2; exit 1; }
2046
  fi
2047
fi
2048
 
2049
# next check if it came with Tcl configuration file
2050
if test x"${ac_cv_c_tclconfig}" != x ; then
2051
  if test -f $ac_cv_c_tclconfig/../generic/tclInt.h ; then
2052
    ac_cv_c_tclh=`(cd $ac_cv_c_tclconfig/../generic; pwd)`
2053
  fi
2054
fi
2055
 
2056
# next check in private source directory
2057
#
2058
# since ls returns lowest version numbers first, reverse its output
2059
 
2060
if test x"${ac_cv_c_tclh}" = x ; then
2061
  for i in \
2062
                ${srcdir}/../tcl \
2063
                `ls -dr ${srcdir}/../tcl[7-9].[0-9] 2>/dev/null` \
2064
                ${srcdir}/../../tcl \
2065
                `ls -dr ${srcdir}/../../tcl[7-9].[0-9] 2>/dev/null` \
2066
                ${srcdir}/../../../tcl \
2067
                `ls -dr ${srcdir}/../../../tcl[7-9].[0-9] 2>/dev/null ` ; do
2068
    if test -f $i/generic/tclInt.h ; then
2069
      ac_cv_c_tclh=`(cd $i/generic; pwd)`
2070
      break
2071
    fi
2072
  done
2073
fi
2074
 
2075
# finally check in a few common install locations
2076
#
2077
# since ls returns lowest version numbers first, reverse its output
2078
 
2079
if test x"${ac_cv_c_tclh}" = x ; then
2080
  for i in \
2081
                `ls -dr /usr/local/src/tcl[7-9].[0-9] 2>/dev/null` \
2082
                `ls -dr /usr/local/lib/tcl[7-9].[0-9] 2>/dev/null` \
2083
                /usr/local/src/tcl \
2084
                /usr/local/lib/tcl \
2085
                ${prefix}/include ; do
2086
    if test -f $i/generic/tclInt.h ; then
2087
      ac_cv_c_tclh=`(cd $i/generic; pwd)`
2088
      break
2089
    fi
2090
  done
2091
fi
2092
 
2093
# see if one is installed
2094
if test x"${ac_cv_c_tclh}" = x ; then
2095
   ac_safe=`echo "tclInt.h" | sed 'y%./+-%__p_%'`
2096
echo $ac_n "checking for tclInt.h""... $ac_c" 1>&6
2097
echo "configure:2098: checking for tclInt.h" >&5
2098
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2099
  echo $ac_n "(cached) $ac_c" 1>&6
2100
else
2101
  cat > conftest.$ac_ext <
2102
#line 2103 "configure"
2103
#include "confdefs.h"
2104
#include 
2105
EOF
2106
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2107
{ (eval echo configure:2108: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2108
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2109
if test -z "$ac_err"; then
2110
  rm -rf conftest*
2111
  eval "ac_cv_header_$ac_safe=yes"
2112
else
2113
  echo "$ac_err" >&5
2114
  echo "configure: failed program was:" >&5
2115
  cat conftest.$ac_ext >&5
2116
  rm -rf conftest*
2117
  eval "ac_cv_header_$ac_safe=no"
2118
fi
2119
rm -f conftest*
2120
fi
2121
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2122
  echo "$ac_t""yes" 1>&6
2123
  ac_cv_c_tclh=installed
2124
else
2125
  echo "$ac_t""no" 1>&6
2126
ac_cv_c_tclh=""
2127
fi
2128
 
2129
fi
2130
 
2131
fi
2132
 
2133
if test x"${ac_cv_c_tclh}" = x ; then
2134
  TCLHDIR="# no Tcl private headers found"
2135
  TCLHDIRDASHI="# no Tcl private headers found"
2136
  { echo "configure: error: Can't find Tcl private headers" 1>&2; exit 1; }
2137
fi
2138
if test x"${ac_cv_c_tclh}" != x ; then
2139
  no_tcl=""
2140
  if test x"${ac_cv_c_tclh}" = x"installed" ; then
2141
    echo "$ac_t""is installed" 1>&6
2142
    TCLHDIR=""
2143
    TCLHDIRDASHI=""
2144
    TCL_LIBRARY=""
2145
  else
2146
    echo "$ac_t""found in ${ac_cv_c_tclh}" 1>&6
2147
    # this hack is cause the TCLHDIR won't print if there is a "-I" in it.
2148
    TCLHDIR="${ac_cv_c_tclh}"
2149
    TCLHDIRDASHI="-I${ac_cv_c_tclh}"
2150
    TCL_LIBRARY=`echo $TCLHDIR | sed -e 's/generic//'`library
2151
  fi
2152
fi
2153
 
2154
 
2155
 
2156
 
2157
 
2158
if test x"$no_tcl" = x"true" ; then
2159
    echo "      ERROR: Can't find Tcl headers or library."
2160
    echo "      See README for information on how to obtain Tcl."
2161
    echo "      If Tcl is installed, see INSTALL on how to tell"
2162
    echo "      configure where Tcl is installed."
2163
    exit 1
2164
fi
2165
 
2166
echo $ac_n "checking for Itcl private headers. srcdir=${srcdir}""... $ac_c" 1>&6
2167
echo "configure:2168: checking for Itcl private headers. srcdir=${srcdir}" >&5
2168
if test x"${ac_cv_c_itclh}" = x ; then
2169
  for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ; do
2170
    if test -f $i/src/itcl.h ; then
2171
      ac_cv_c_itclh=`(cd $i/src; pwd)`
2172
      break
2173
    fi
2174
  done
2175
fi
2176
if test x"${ac_cv_c_itclh}" = x ; then
2177
  ITCLHDIR="# no Itcl private headers found"
2178
  ITCLLIB="# no Itcl private headers found"
2179
  echo "configure: warning: Can't find Itcl private headers" 1>&2
2180
  no_itcl=true
2181
else
2182
  ITCLHDIR="-I${ac_cv_c_itclh}"
2183
# should always be here
2184
  ITCLLIB="../itcl/src/libitcl.a"
2185
fi
2186
 
2187
 
2188
 
2189
 
2190
 
2191
# have to whether we're generating shared libs before configuring debugger
2192
echo $ac_n "checking if generating shared or nonshared library""... $ac_c" 1>&6
2193
echo "configure:2194: checking if generating shared or nonshared library" >&5
2194
# Check whether --enable-shared or --disable-shared was given.
2195
if test "${enable_shared+set}" = set; then
2196
  enableval="$enable_shared"
2197
  enable_shared=$enableval
2198
else
2199
  enable_shared=no
2200
fi
2201
 
2202
if test "$enable_shared" = "yes" && test "x${TCL_SHLIB_SUFFIX}" != "x" ; then
2203
  echo "$ac_t""both shared and unshared" 1>&6
2204
else
2205
  echo "$ac_t""unshared" 1>&6
2206
fi
2207
 
2208
# Now that we've found the Tcl sources, configure the debugger
2209
# this is a little tricky because it has its own configure script
2210
# which produces a Makefile and cf file.  We only want the cf file,
2211
# so switch to a temporary directory and run the debugger's configure.
2212
# Then save the cf file and delete the rest.
2213
#
2214
# Incidentally, the debugger can't depend on Expect's cf file, because
2215
# the debugger is designed to be independent of Expect.
2216
#
2217
 
2218
test -n "$verbose" && echo "configuring Tcl debugger"
2219
tmpdir=./Dbg$$
2220
mkdir ${tmpdir}
2221
 
2222
if test "${enable_shared}" = "yes"; then
2223
  dbg_config_flags='--enable-shared'
2224
else
2225
  dbg_config_flags='--disable-shared'
2226
fi
2227
# (cd;pwd) in next several commands converts relative dirs to absolute.
2228
# This is required because the debugger src is at a different level in
2229
# the filesystem than Expect src (where we are presently), thereby
2230
# making the relative pathnames incorrect.
2231
if test "x$with_tclconfig" != "x" ; then
2232
  dbg_config_flags="$dbg_config_flags --with-tclconfig=`(cd ${with_tclconfig}; pwd)`"
2233
fi
2234
if test "x$with_tcllibdir" != "x" ; then
2235
  dbg_config_flags="$dbg_config_flags --with-tcllibdir=`(cd ${with_tcllibdir}; pwd)`"
2236
fi
2237
if test "x$with_tcllib" != "x" ; then
2238
  dbg_config_flags="$dbg_config_flags --with-tcllib=`(cd ${with_tcllib}; pwd)`"
2239
fi
2240
if test "x$with_tclinclude" != "x" ; then
2241
  dbg_config_flags="$dbg_config_flags --with-tclinclude=`(cd ${with_tclinclude}; pwd)`"
2242
fi
2243
case "$cache_file" in
2244
 /*)
2245
    dbg_config_flags="$dbg_config_flags --cache-file=$cache_file"
2246
    ;;
2247
 *)
2248
    dbg_config_flags="$dbg_config_flags --cache-file=../$cache_file"
2249
    ;;
2250
esac
2251
 
2252
cp ${srcdir}/Dbgconfigure ${srcdir}/Dbg.h ${srcdir}/Dbg_cf.h.in ${srcdir}/install-sh ${tmpdir}
2253
cp $srcdir/DbgMkfl.in ${tmpdir}/Makefile.in
2254
  (cd $tmpdir; ${CONFIG_SHELL-/bin/sh} Dbgconfigure --with-tclinclude=`echo ${TCLHDIR} | sed -e 's/-I//'` $dbg_config_flags)
2255
cp ${tmpdir}/Dbg_cf.h .
2256
rm -rf $tmpdir
2257
test -n "$verbose" && echo "configured Tcl debugger"
2258
 
2259
# some people would complain if this explanation wasn't provided...
2260
 
2261
echo "Begin tests for function/library dependencies.  Tests may be repeated"
2262
echo "up to three times.  First test is for building Expect's shared library."
2263
echo "Second set is for building with Tcl.  Third is for building with Tk."
2264
 
2265
######################################################################
2266
# required by Sequent ptx2
2267
unset ac_cv_func_gethostname
2268
echo $ac_n "checking for gethostname""... $ac_c" 1>&6
2269
echo "configure:2270: checking for gethostname" >&5
2270
if eval "test \"`echo '$''{'ac_cv_func_gethostname'+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
/* System header to define __stub macros and hopefully few prototypes,
2277
    which can conflict with char gethostname(); below.  */
2278
#include 
2279
/* Override any gcc2 internal prototype to avoid an error.  */
2280
/* We use char because int might match the return type of a gcc2
2281
    builtin and then its argument prototype would still apply.  */
2282
char gethostname();
2283
 
2284
int main() {
2285
 
2286
/* The GNU C library defines this for functions which it implements
2287
    to always fail with ENOSYS.  Some functions are actually named
2288
    something starting with __ and the normal name is an alias.  */
2289
#if defined (__stub_gethostname) || defined (__stub___gethostname)
2290
choke me
2291
#else
2292
gethostname();
2293
#endif
2294
 
2295
; return 0; }
2296
EOF
2297
if { (eval echo configure:2298: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2298
  rm -rf conftest*
2299
  eval "ac_cv_func_gethostname=yes"
2300
else
2301
  echo "configure: failed program was:" >&5
2302
  cat conftest.$ac_ext >&5
2303
  rm -rf conftest*
2304
  eval "ac_cv_func_gethostname=no"
2305
fi
2306
rm -f conftest*
2307
fi
2308
 
2309
if eval "test \"`echo '$ac_cv_func_'gethostname`\" = yes"; then
2310
  echo "$ac_t""yes" 1>&6
2311
  gethostname=1
2312
else
2313
  echo "$ac_t""no" 1>&6
2314
gethostname=0
2315
fi
2316
 
2317
if test $gethostname -eq 0 ; then
2318
  unset ac_cv_lib_inet_gethostname
2319
  echo $ac_n "checking for gethostname in -linet""... $ac_c" 1>&6
2320
echo "configure:2321: checking for gethostname in -linet" >&5
2321
ac_lib_var=`echo inet'_'gethostname | sed 'y%./+-%__p_%'`
2322
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2323
  echo $ac_n "(cached) $ac_c" 1>&6
2324
else
2325
  ac_save_LIBS="$LIBS"
2326
LIBS="-linet  $LIBS"
2327
cat > conftest.$ac_ext <
2328
#line 2329 "configure"
2329
#include "confdefs.h"
2330
/* Override any gcc2 internal prototype to avoid an error.  */
2331
/* We use char because int might match the return type of a gcc2
2332
    builtin and then its argument prototype would still apply.  */
2333
char gethostname();
2334
 
2335
int main() {
2336
gethostname()
2337
; return 0; }
2338
EOF
2339
if { (eval echo configure:2340: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2340
  rm -rf conftest*
2341
  eval "ac_cv_lib_$ac_lib_var=yes"
2342
else
2343
  echo "configure: failed program was:" >&5
2344
  cat conftest.$ac_ext >&5
2345
  rm -rf conftest*
2346
  eval "ac_cv_lib_$ac_lib_var=no"
2347
fi
2348
rm -f conftest*
2349
LIBS="$ac_save_LIBS"
2350
 
2351
fi
2352
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2353
  echo "$ac_t""yes" 1>&6
2354
  LIBS="$LIBS -linet"
2355
else
2356
  echo "$ac_t""no" 1>&6
2357
fi
2358
 
2359
fi
2360
# save results and retry for Tcl
2361
EXP_LIBS=$LIBS
2362
LIBS=$EXP_AND_TCL_LIBS
2363
unset ac_cv_func_gethostname
2364
echo $ac_n "checking for gethostname""... $ac_c" 1>&6
2365
echo "configure:2366: checking for gethostname" >&5
2366
if eval "test \"`echo '$''{'ac_cv_func_gethostname'+set}'`\" = set"; then
2367
  echo $ac_n "(cached) $ac_c" 1>&6
2368
else
2369
  cat > conftest.$ac_ext <
2370
#line 2371 "configure"
2371
#include "confdefs.h"
2372
/* System header to define __stub macros and hopefully few prototypes,
2373
    which can conflict with char gethostname(); below.  */
2374
#include 
2375
/* Override any gcc2 internal prototype to avoid an error.  */
2376
/* We use char because int might match the return type of a gcc2
2377
    builtin and then its argument prototype would still apply.  */
2378
char gethostname();
2379
 
2380
int main() {
2381
 
2382
/* The GNU C library defines this for functions which it implements
2383
    to always fail with ENOSYS.  Some functions are actually named
2384
    something starting with __ and the normal name is an alias.  */
2385
#if defined (__stub_gethostname) || defined (__stub___gethostname)
2386
choke me
2387
#else
2388
gethostname();
2389
#endif
2390
 
2391
; return 0; }
2392
EOF
2393
if { (eval echo configure:2394: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2394
  rm -rf conftest*
2395
  eval "ac_cv_func_gethostname=yes"
2396
else
2397
  echo "configure: failed program was:" >&5
2398
  cat conftest.$ac_ext >&5
2399
  rm -rf conftest*
2400
  eval "ac_cv_func_gethostname=no"
2401
fi
2402
rm -f conftest*
2403
fi
2404
 
2405
if eval "test \"`echo '$ac_cv_func_'gethostname`\" = yes"; then
2406
  echo "$ac_t""yes" 1>&6
2407
  gethostname=1
2408
else
2409
  echo "$ac_t""no" 1>&6
2410
gethostname=0
2411
fi
2412
 
2413
if test $gethostname -eq 0 ; then
2414
  unset ac_cv_lib_inet_gethostname
2415
  echo $ac_n "checking for gethostname in -linet""... $ac_c" 1>&6
2416
echo "configure:2417: checking for gethostname in -linet" >&5
2417
ac_lib_var=`echo inet'_'gethostname | sed 'y%./+-%__p_%'`
2418
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2419
  echo $ac_n "(cached) $ac_c" 1>&6
2420
else
2421
  ac_save_LIBS="$LIBS"
2422
LIBS="-linet  $LIBS"
2423
cat > conftest.$ac_ext <
2424
#line 2425 "configure"
2425
#include "confdefs.h"
2426
/* Override any gcc2 internal prototype to avoid an error.  */
2427
/* We use char because int might match the return type of a gcc2
2428
    builtin and then its argument prototype would still apply.  */
2429
char gethostname();
2430
 
2431
int main() {
2432
gethostname()
2433
; return 0; }
2434
EOF
2435
if { (eval echo configure:2436: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2436
  rm -rf conftest*
2437
  eval "ac_cv_lib_$ac_lib_var=yes"
2438
else
2439
  echo "configure: failed program was:" >&5
2440
  cat conftest.$ac_ext >&5
2441
  rm -rf conftest*
2442
  eval "ac_cv_lib_$ac_lib_var=no"
2443
fi
2444
rm -f conftest*
2445
LIBS="$ac_save_LIBS"
2446
 
2447
fi
2448
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2449
  echo "$ac_t""yes" 1>&6
2450
  LIBS="$LIBS -linet"
2451
else
2452
  echo "$ac_t""no" 1>&6
2453
fi
2454
 
2455
fi
2456
# save Tcl results and retry for Tk
2457
EXP_AND_TCL_LIBS=$LIBS
2458
LIBS=$EXP_AND_TK_LIBS
2459
unset ac_cv_func_gethostname
2460
echo $ac_n "checking for gethostname""... $ac_c" 1>&6
2461
echo "configure:2462: checking for gethostname" >&5
2462
if eval "test \"`echo '$''{'ac_cv_func_gethostname'+set}'`\" = set"; then
2463
  echo $ac_n "(cached) $ac_c" 1>&6
2464
else
2465
  cat > conftest.$ac_ext <
2466
#line 2467 "configure"
2467
#include "confdefs.h"
2468
/* System header to define __stub macros and hopefully few prototypes,
2469
    which can conflict with char gethostname(); below.  */
2470
#include 
2471
/* Override any gcc2 internal prototype to avoid an error.  */
2472
/* We use char because int might match the return type of a gcc2
2473
    builtin and then its argument prototype would still apply.  */
2474
char gethostname();
2475
 
2476
int main() {
2477
 
2478
/* The GNU C library defines this for functions which it implements
2479
    to always fail with ENOSYS.  Some functions are actually named
2480
    something starting with __ and the normal name is an alias.  */
2481
#if defined (__stub_gethostname) || defined (__stub___gethostname)
2482
choke me
2483
#else
2484
gethostname();
2485
#endif
2486
 
2487
; return 0; }
2488
EOF
2489
if { (eval echo configure:2490: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2490
  rm -rf conftest*
2491
  eval "ac_cv_func_gethostname=yes"
2492
else
2493
  echo "configure: failed program was:" >&5
2494
  cat conftest.$ac_ext >&5
2495
  rm -rf conftest*
2496
  eval "ac_cv_func_gethostname=no"
2497
fi
2498
rm -f conftest*
2499
fi
2500
 
2501
if eval "test \"`echo '$ac_cv_func_'gethostname`\" = yes"; then
2502
  echo "$ac_t""yes" 1>&6
2503
  gethostname=1
2504
else
2505
  echo "$ac_t""no" 1>&6
2506
gethostname=0
2507
fi
2508
 
2509
if test $gethostname -eq 0 ; then
2510
  unset ac_cv_lib_inet_gethostname
2511
  echo $ac_n "checking for gethostname in -linet""... $ac_c" 1>&6
2512
echo "configure:2513: checking for gethostname in -linet" >&5
2513
ac_lib_var=`echo inet'_'gethostname | sed 'y%./+-%__p_%'`
2514
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2515
  echo $ac_n "(cached) $ac_c" 1>&6
2516
else
2517
  ac_save_LIBS="$LIBS"
2518
LIBS="-linet  $LIBS"
2519
cat > conftest.$ac_ext <
2520
#line 2521 "configure"
2521
#include "confdefs.h"
2522
/* Override any gcc2 internal prototype to avoid an error.  */
2523
/* We use char because int might match the return type of a gcc2
2524
    builtin and then its argument prototype would still apply.  */
2525
char gethostname();
2526
 
2527
int main() {
2528
gethostname()
2529
; return 0; }
2530
EOF
2531
if { (eval echo configure:2532: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2532
  rm -rf conftest*
2533
  eval "ac_cv_lib_$ac_lib_var=yes"
2534
else
2535
  echo "configure: failed program was:" >&5
2536
  cat conftest.$ac_ext >&5
2537
  rm -rf conftest*
2538
  eval "ac_cv_lib_$ac_lib_var=no"
2539
fi
2540
rm -f conftest*
2541
LIBS="$ac_save_LIBS"
2542
 
2543
fi
2544
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2545
  echo "$ac_t""yes" 1>&6
2546
  LIBS="$LIBS -linet"
2547
else
2548
  echo "$ac_t""no" 1>&6
2549
fi
2550
 
2551
fi
2552
# save Tk results and reset for Expect
2553
EXP_AND_TK_LIBS=$LIBS
2554
LIBS=$EXP_LIBS
2555
 
2556
######################################################################
2557
# required by Fischman's ISC 4.0
2558
unset ac_cv_func_socket
2559
echo $ac_n "checking for socket""... $ac_c" 1>&6
2560
echo "configure:2561: checking for socket" >&5
2561
if eval "test \"`echo '$''{'ac_cv_func_socket'+set}'`\" = set"; then
2562
  echo $ac_n "(cached) $ac_c" 1>&6
2563
else
2564
  cat > conftest.$ac_ext <
2565
#line 2566 "configure"
2566
#include "confdefs.h"
2567
/* System header to define __stub macros and hopefully few prototypes,
2568
    which can conflict with char socket(); below.  */
2569
#include 
2570
/* Override any gcc2 internal prototype to avoid an error.  */
2571
/* We use char because int might match the return type of a gcc2
2572
    builtin and then its argument prototype would still apply.  */
2573
char socket();
2574
 
2575
int main() {
2576
 
2577
/* The GNU C library defines this for functions which it implements
2578
    to always fail with ENOSYS.  Some functions are actually named
2579
    something starting with __ and the normal name is an alias.  */
2580
#if defined (__stub_socket) || defined (__stub___socket)
2581
choke me
2582
#else
2583
socket();
2584
#endif
2585
 
2586
; return 0; }
2587
EOF
2588
if { (eval echo configure:2589: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2589
  rm -rf conftest*
2590
  eval "ac_cv_func_socket=yes"
2591
else
2592
  echo "configure: failed program was:" >&5
2593
  cat conftest.$ac_ext >&5
2594
  rm -rf conftest*
2595
  eval "ac_cv_func_socket=no"
2596
fi
2597
rm -f conftest*
2598
fi
2599
 
2600
if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
2601
  echo "$ac_t""yes" 1>&6
2602
  socket=1
2603
else
2604
  echo "$ac_t""no" 1>&6
2605
socket=0
2606
fi
2607
 
2608
if test $socket -eq 0 ; then
2609
  unset ac_cv_lib_inet_socket
2610
  echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
2611
echo "configure:2612: checking for socket in -linet" >&5
2612
ac_lib_var=`echo inet'_'socket | sed 'y%./+-%__p_%'`
2613
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2614
  echo $ac_n "(cached) $ac_c" 1>&6
2615
else
2616
  ac_save_LIBS="$LIBS"
2617
LIBS="-linet  $LIBS"
2618
cat > conftest.$ac_ext <
2619
#line 2620 "configure"
2620
#include "confdefs.h"
2621
/* Override any gcc2 internal prototype to avoid an error.  */
2622
/* We use char because int might match the return type of a gcc2
2623
    builtin and then its argument prototype would still apply.  */
2624
char socket();
2625
 
2626
int main() {
2627
socket()
2628
; return 0; }
2629
EOF
2630
if { (eval echo configure:2631: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2631
  rm -rf conftest*
2632
  eval "ac_cv_lib_$ac_lib_var=yes"
2633
else
2634
  echo "configure: failed program was:" >&5
2635
  cat conftest.$ac_ext >&5
2636
  rm -rf conftest*
2637
  eval "ac_cv_lib_$ac_lib_var=no"
2638
fi
2639
rm -f conftest*
2640
LIBS="$ac_save_LIBS"
2641
 
2642
fi
2643
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2644
  echo "$ac_t""yes" 1>&6
2645
  LIBS="$LIBS -linet"
2646
else
2647
  echo "$ac_t""no" 1>&6
2648
fi
2649
 
2650
fi
2651
# save results and retry for Tcl
2652
EXP_LIBS=$LIBS
2653
LIBS=$EXP_AND_TCL_LIBS
2654
unset ac_cv_func_socket
2655
echo $ac_n "checking for socket""... $ac_c" 1>&6
2656
echo "configure:2657: checking for socket" >&5
2657
if eval "test \"`echo '$''{'ac_cv_func_socket'+set}'`\" = set"; then
2658
  echo $ac_n "(cached) $ac_c" 1>&6
2659
else
2660
  cat > conftest.$ac_ext <
2661
#line 2662 "configure"
2662
#include "confdefs.h"
2663
/* System header to define __stub macros and hopefully few prototypes,
2664
    which can conflict with char socket(); below.  */
2665
#include 
2666
/* Override any gcc2 internal prototype to avoid an error.  */
2667
/* We use char because int might match the return type of a gcc2
2668
    builtin and then its argument prototype would still apply.  */
2669
char socket();
2670
 
2671
int main() {
2672
 
2673
/* The GNU C library defines this for functions which it implements
2674
    to always fail with ENOSYS.  Some functions are actually named
2675
    something starting with __ and the normal name is an alias.  */
2676
#if defined (__stub_socket) || defined (__stub___socket)
2677
choke me
2678
#else
2679
socket();
2680
#endif
2681
 
2682
; return 0; }
2683
EOF
2684
if { (eval echo configure:2685: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2685
  rm -rf conftest*
2686
  eval "ac_cv_func_socket=yes"
2687
else
2688
  echo "configure: failed program was:" >&5
2689
  cat conftest.$ac_ext >&5
2690
  rm -rf conftest*
2691
  eval "ac_cv_func_socket=no"
2692
fi
2693
rm -f conftest*
2694
fi
2695
 
2696
if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
2697
  echo "$ac_t""yes" 1>&6
2698
  socket=1
2699
else
2700
  echo "$ac_t""no" 1>&6
2701
socket=0
2702
fi
2703
 
2704
if test $socket -eq 0 ; then
2705
  unset ac_cv_lib_inet_socket
2706
  echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
2707
echo "configure:2708: checking for socket in -linet" >&5
2708
ac_lib_var=`echo inet'_'socket | sed 'y%./+-%__p_%'`
2709
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2710
  echo $ac_n "(cached) $ac_c" 1>&6
2711
else
2712
  ac_save_LIBS="$LIBS"
2713
LIBS="-linet  $LIBS"
2714
cat > conftest.$ac_ext <
2715
#line 2716 "configure"
2716
#include "confdefs.h"
2717
/* Override any gcc2 internal prototype to avoid an error.  */
2718
/* We use char because int might match the return type of a gcc2
2719
    builtin and then its argument prototype would still apply.  */
2720
char socket();
2721
 
2722
int main() {
2723
socket()
2724
; return 0; }
2725
EOF
2726
if { (eval echo configure:2727: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2727
  rm -rf conftest*
2728
  eval "ac_cv_lib_$ac_lib_var=yes"
2729
else
2730
  echo "configure: failed program was:" >&5
2731
  cat conftest.$ac_ext >&5
2732
  rm -rf conftest*
2733
  eval "ac_cv_lib_$ac_lib_var=no"
2734
fi
2735
rm -f conftest*
2736
LIBS="$ac_save_LIBS"
2737
 
2738
fi
2739
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2740
  echo "$ac_t""yes" 1>&6
2741
  LIBS="$LIBS -linet"
2742
else
2743
  echo "$ac_t""no" 1>&6
2744
fi
2745
 
2746
fi
2747
# save Tcl results and retry for Tk
2748
EXP_AND_TCL_LIBS=$LIBS
2749
LIBS=$EXP_AND_TK_LIBS
2750
unset ac_cv_func_socket
2751
echo $ac_n "checking for socket""... $ac_c" 1>&6
2752
echo "configure:2753: checking for socket" >&5
2753
if eval "test \"`echo '$''{'ac_cv_func_socket'+set}'`\" = set"; then
2754
  echo $ac_n "(cached) $ac_c" 1>&6
2755
else
2756
  cat > conftest.$ac_ext <
2757
#line 2758 "configure"
2758
#include "confdefs.h"
2759
/* System header to define __stub macros and hopefully few prototypes,
2760
    which can conflict with char socket(); below.  */
2761
#include 
2762
/* Override any gcc2 internal prototype to avoid an error.  */
2763
/* We use char because int might match the return type of a gcc2
2764
    builtin and then its argument prototype would still apply.  */
2765
char socket();
2766
 
2767
int main() {
2768
 
2769
/* The GNU C library defines this for functions which it implements
2770
    to always fail with ENOSYS.  Some functions are actually named
2771
    something starting with __ and the normal name is an alias.  */
2772
#if defined (__stub_socket) || defined (__stub___socket)
2773
choke me
2774
#else
2775
socket();
2776
#endif
2777
 
2778
; return 0; }
2779
EOF
2780
if { (eval echo configure:2781: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2781
  rm -rf conftest*
2782
  eval "ac_cv_func_socket=yes"
2783
else
2784
  echo "configure: failed program was:" >&5
2785
  cat conftest.$ac_ext >&5
2786
  rm -rf conftest*
2787
  eval "ac_cv_func_socket=no"
2788
fi
2789
rm -f conftest*
2790
fi
2791
 
2792
if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
2793
  echo "$ac_t""yes" 1>&6
2794
  socket=1
2795
else
2796
  echo "$ac_t""no" 1>&6
2797
socket=0
2798
fi
2799
 
2800
if test $socket -eq 0 ; then
2801
  unset ac_cv_lib_inet_socket
2802
  echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
2803
echo "configure:2804: checking for socket in -linet" >&5
2804
ac_lib_var=`echo inet'_'socket | sed 'y%./+-%__p_%'`
2805
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2806
  echo $ac_n "(cached) $ac_c" 1>&6
2807
else
2808
  ac_save_LIBS="$LIBS"
2809
LIBS="-linet  $LIBS"
2810
cat > conftest.$ac_ext <
2811
#line 2812 "configure"
2812
#include "confdefs.h"
2813
/* Override any gcc2 internal prototype to avoid an error.  */
2814
/* We use char because int might match the return type of a gcc2
2815
    builtin and then its argument prototype would still apply.  */
2816
char socket();
2817
 
2818
int main() {
2819
socket()
2820
; return 0; }
2821
EOF
2822
if { (eval echo configure:2823: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2823
  rm -rf conftest*
2824
  eval "ac_cv_lib_$ac_lib_var=yes"
2825
else
2826
  echo "configure: failed program was:" >&5
2827
  cat conftest.$ac_ext >&5
2828
  rm -rf conftest*
2829
  eval "ac_cv_lib_$ac_lib_var=no"
2830
fi
2831
rm -f conftest*
2832
LIBS="$ac_save_LIBS"
2833
 
2834
fi
2835
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2836
  echo "$ac_t""yes" 1>&6
2837
  LIBS="$LIBS -linet"
2838
else
2839
  echo "$ac_t""no" 1>&6
2840
fi
2841
 
2842
fi
2843
# save Tk results and reset for Expect
2844
EXP_AND_TK_LIBS=$LIBS
2845
LIBS=$EXP_LIBS
2846
 
2847
######################################################################
2848
unset ac_cv_func_select
2849
echo $ac_n "checking for select""... $ac_c" 1>&6
2850
echo "configure:2851: checking for select" >&5
2851
if eval "test \"`echo '$''{'ac_cv_func_select'+set}'`\" = set"; then
2852
  echo $ac_n "(cached) $ac_c" 1>&6
2853
else
2854
  cat > conftest.$ac_ext <
2855
#line 2856 "configure"
2856
#include "confdefs.h"
2857
/* System header to define __stub macros and hopefully few prototypes,
2858
    which can conflict with char select(); below.  */
2859
#include 
2860
/* Override any gcc2 internal prototype to avoid an error.  */
2861
/* We use char because int might match the return type of a gcc2
2862
    builtin and then its argument prototype would still apply.  */
2863
char select();
2864
 
2865
int main() {
2866
 
2867
/* The GNU C library defines this for functions which it implements
2868
    to always fail with ENOSYS.  Some functions are actually named
2869
    something starting with __ and the normal name is an alias.  */
2870
#if defined (__stub_select) || defined (__stub___select)
2871
choke me
2872
#else
2873
select();
2874
#endif
2875
 
2876
; return 0; }
2877
EOF
2878
if { (eval echo configure:2879: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2879
  rm -rf conftest*
2880
  eval "ac_cv_func_select=yes"
2881
else
2882
  echo "configure: failed program was:" >&5
2883
  cat conftest.$ac_ext >&5
2884
  rm -rf conftest*
2885
  eval "ac_cv_func_select=no"
2886
fi
2887
rm -f conftest*
2888
fi
2889
 
2890
if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
2891
  echo "$ac_t""yes" 1>&6
2892
  select=1
2893
else
2894
  echo "$ac_t""no" 1>&6
2895
select=0
2896
fi
2897
 
2898
if test $select -eq 0 ; then
2899
  unset ac_cv_lib_inet_select
2900
  echo $ac_n "checking for select in -linet""... $ac_c" 1>&6
2901
echo "configure:2902: checking for select in -linet" >&5
2902
ac_lib_var=`echo inet'_'select | sed 'y%./+-%__p_%'`
2903
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2904
  echo $ac_n "(cached) $ac_c" 1>&6
2905
else
2906
  ac_save_LIBS="$LIBS"
2907
LIBS="-linet  $LIBS"
2908
cat > conftest.$ac_ext <
2909
#line 2910 "configure"
2910
#include "confdefs.h"
2911
/* Override any gcc2 internal prototype to avoid an error.  */
2912
/* We use char because int might match the return type of a gcc2
2913
    builtin and then its argument prototype would still apply.  */
2914
char select();
2915
 
2916
int main() {
2917
select()
2918
; return 0; }
2919
EOF
2920
if { (eval echo configure:2921: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2921
  rm -rf conftest*
2922
  eval "ac_cv_lib_$ac_lib_var=yes"
2923
else
2924
  echo "configure: failed program was:" >&5
2925
  cat conftest.$ac_ext >&5
2926
  rm -rf conftest*
2927
  eval "ac_cv_lib_$ac_lib_var=no"
2928
fi
2929
rm -f conftest*
2930
LIBS="$ac_save_LIBS"
2931
 
2932
fi
2933
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2934
  echo "$ac_t""yes" 1>&6
2935
  LIBS="$LIBS -linet"
2936
else
2937
  echo "$ac_t""no" 1>&6
2938
fi
2939
 
2940
fi
2941
# save results and retry for Tcl
2942
EXP_LIBS=$LIBS
2943
LIBS=$EXP_AND_TCL_LIBS
2944
unset ac_cv_func_select
2945
echo $ac_n "checking for select""... $ac_c" 1>&6
2946
echo "configure:2947: checking for select" >&5
2947
if eval "test \"`echo '$''{'ac_cv_func_select'+set}'`\" = set"; then
2948
  echo $ac_n "(cached) $ac_c" 1>&6
2949
else
2950
  cat > conftest.$ac_ext <
2951
#line 2952 "configure"
2952
#include "confdefs.h"
2953
/* System header to define __stub macros and hopefully few prototypes,
2954
    which can conflict with char select(); below.  */
2955
#include 
2956
/* Override any gcc2 internal prototype to avoid an error.  */
2957
/* We use char because int might match the return type of a gcc2
2958
    builtin and then its argument prototype would still apply.  */
2959
char select();
2960
 
2961
int main() {
2962
 
2963
/* The GNU C library defines this for functions which it implements
2964
    to always fail with ENOSYS.  Some functions are actually named
2965
    something starting with __ and the normal name is an alias.  */
2966
#if defined (__stub_select) || defined (__stub___select)
2967
choke me
2968
#else
2969
select();
2970
#endif
2971
 
2972
; return 0; }
2973
EOF
2974
if { (eval echo configure:2975: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2975
  rm -rf conftest*
2976
  eval "ac_cv_func_select=yes"
2977
else
2978
  echo "configure: failed program was:" >&5
2979
  cat conftest.$ac_ext >&5
2980
  rm -rf conftest*
2981
  eval "ac_cv_func_select=no"
2982
fi
2983
rm -f conftest*
2984
fi
2985
 
2986
if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
2987
  echo "$ac_t""yes" 1>&6
2988
  select=1
2989
else
2990
  echo "$ac_t""no" 1>&6
2991
select=0
2992
fi
2993
 
2994
if test $select -eq 0 ; then
2995
  unset ac_cv_lib_inet_select
2996
  echo $ac_n "checking for select in -linet""... $ac_c" 1>&6
2997
echo "configure:2998: checking for select in -linet" >&5
2998
ac_lib_var=`echo inet'_'select | sed 'y%./+-%__p_%'`
2999
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3000
  echo $ac_n "(cached) $ac_c" 1>&6
3001
else
3002
  ac_save_LIBS="$LIBS"
3003
LIBS="-linet  $LIBS"
3004
cat > conftest.$ac_ext <
3005
#line 3006 "configure"
3006
#include "confdefs.h"
3007
/* Override any gcc2 internal prototype to avoid an error.  */
3008
/* We use char because int might match the return type of a gcc2
3009
    builtin and then its argument prototype would still apply.  */
3010
char select();
3011
 
3012
int main() {
3013
select()
3014
; return 0; }
3015
EOF
3016
if { (eval echo configure:3017: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3017
  rm -rf conftest*
3018
  eval "ac_cv_lib_$ac_lib_var=yes"
3019
else
3020
  echo "configure: failed program was:" >&5
3021
  cat conftest.$ac_ext >&5
3022
  rm -rf conftest*
3023
  eval "ac_cv_lib_$ac_lib_var=no"
3024
fi
3025
rm -f conftest*
3026
LIBS="$ac_save_LIBS"
3027
 
3028
fi
3029
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3030
  echo "$ac_t""yes" 1>&6
3031
  LIBS="$LIBS -linet"
3032
else
3033
  echo "$ac_t""no" 1>&6
3034
fi
3035
 
3036
fi
3037
# save Tcl results and retry for Tk
3038
EXP_AND_TCL_LIBS=$LIBS
3039
LIBS=$EXP_AND_TK_LIBS
3040
unset ac_cv_func_select
3041
echo $ac_n "checking for select""... $ac_c" 1>&6
3042
echo "configure:3043: checking for select" >&5
3043
if eval "test \"`echo '$''{'ac_cv_func_select'+set}'`\" = set"; then
3044
  echo $ac_n "(cached) $ac_c" 1>&6
3045
else
3046
  cat > conftest.$ac_ext <
3047
#line 3048 "configure"
3048
#include "confdefs.h"
3049
/* System header to define __stub macros and hopefully few prototypes,
3050
    which can conflict with char select(); below.  */
3051
#include 
3052
/* Override any gcc2 internal prototype to avoid an error.  */
3053
/* We use char because int might match the return type of a gcc2
3054
    builtin and then its argument prototype would still apply.  */
3055
char select();
3056
 
3057
int main() {
3058
 
3059
/* The GNU C library defines this for functions which it implements
3060
    to always fail with ENOSYS.  Some functions are actually named
3061
    something starting with __ and the normal name is an alias.  */
3062
#if defined (__stub_select) || defined (__stub___select)
3063
choke me
3064
#else
3065
select();
3066
#endif
3067
 
3068
; return 0; }
3069
EOF
3070
if { (eval echo configure:3071: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3071
  rm -rf conftest*
3072
  eval "ac_cv_func_select=yes"
3073
else
3074
  echo "configure: failed program was:" >&5
3075
  cat conftest.$ac_ext >&5
3076
  rm -rf conftest*
3077
  eval "ac_cv_func_select=no"
3078
fi
3079
rm -f conftest*
3080
fi
3081
 
3082
if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
3083
  echo "$ac_t""yes" 1>&6
3084
  select=1
3085
else
3086
  echo "$ac_t""no" 1>&6
3087
select=0
3088
fi
3089
 
3090
if test $select -eq 0 ; then
3091
  unset ac_cv_lib_inet_select
3092
  echo $ac_n "checking for select in -linet""... $ac_c" 1>&6
3093
echo "configure:3094: checking for select in -linet" >&5
3094
ac_lib_var=`echo inet'_'select | sed 'y%./+-%__p_%'`
3095
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3096
  echo $ac_n "(cached) $ac_c" 1>&6
3097
else
3098
  ac_save_LIBS="$LIBS"
3099
LIBS="-linet  $LIBS"
3100
cat > conftest.$ac_ext <
3101
#line 3102 "configure"
3102
#include "confdefs.h"
3103
/* Override any gcc2 internal prototype to avoid an error.  */
3104
/* We use char because int might match the return type of a gcc2
3105
    builtin and then its argument prototype would still apply.  */
3106
char select();
3107
 
3108
int main() {
3109
select()
3110
; return 0; }
3111
EOF
3112
if { (eval echo configure:3113: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3113
  rm -rf conftest*
3114
  eval "ac_cv_lib_$ac_lib_var=yes"
3115
else
3116
  echo "configure: failed program was:" >&5
3117
  cat conftest.$ac_ext >&5
3118
  rm -rf conftest*
3119
  eval "ac_cv_lib_$ac_lib_var=no"
3120
fi
3121
rm -f conftest*
3122
LIBS="$ac_save_LIBS"
3123
 
3124
fi
3125
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3126
  echo "$ac_t""yes" 1>&6
3127
  LIBS="$LIBS -linet"
3128
else
3129
  echo "$ac_t""no" 1>&6
3130
fi
3131
 
3132
fi
3133
# save Tk results and reset for Expect
3134
EXP_AND_TK_LIBS=$LIBS
3135
LIBS=$EXP_LIBS
3136
 
3137
######################################################################
3138
unset ac_cv_func_getpseudotty
3139
echo $ac_n "checking for getpseudotty""... $ac_c" 1>&6
3140
echo "configure:3141: checking for getpseudotty" >&5
3141
if eval "test \"`echo '$''{'ac_cv_func_getpseudotty'+set}'`\" = set"; then
3142
  echo $ac_n "(cached) $ac_c" 1>&6
3143
else
3144
  cat > conftest.$ac_ext <
3145
#line 3146 "configure"
3146
#include "confdefs.h"
3147
/* System header to define __stub macros and hopefully few prototypes,
3148
    which can conflict with char getpseudotty(); below.  */
3149
#include 
3150
/* Override any gcc2 internal prototype to avoid an error.  */
3151
/* We use char because int might match the return type of a gcc2
3152
    builtin and then its argument prototype would still apply.  */
3153
char getpseudotty();
3154
 
3155
int main() {
3156
 
3157
/* The GNU C library defines this for functions which it implements
3158
    to always fail with ENOSYS.  Some functions are actually named
3159
    something starting with __ and the normal name is an alias.  */
3160
#if defined (__stub_getpseudotty) || defined (__stub___getpseudotty)
3161
choke me
3162
#else
3163
getpseudotty();
3164
#endif
3165
 
3166
; return 0; }
3167
EOF
3168
if { (eval echo configure:3169: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3169
  rm -rf conftest*
3170
  eval "ac_cv_func_getpseudotty=yes"
3171
else
3172
  echo "configure: failed program was:" >&5
3173
  cat conftest.$ac_ext >&5
3174
  rm -rf conftest*
3175
  eval "ac_cv_func_getpseudotty=no"
3176
fi
3177
rm -f conftest*
3178
fi
3179
 
3180
if eval "test \"`echo '$ac_cv_func_'getpseudotty`\" = yes"; then
3181
  echo "$ac_t""yes" 1>&6
3182
  getpseudotty=1
3183
else
3184
  echo "$ac_t""no" 1>&6
3185
getpseudotty=0
3186
fi
3187
 
3188
if test $getpseudotty -eq 0 ; then
3189
  unset ac_cv_lib_seq_getpseudotty
3190
  echo $ac_n "checking for getpseudotty in -lseq""... $ac_c" 1>&6
3191
echo "configure:3192: checking for getpseudotty in -lseq" >&5
3192
ac_lib_var=`echo seq'_'getpseudotty | sed 'y%./+-%__p_%'`
3193
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3194
  echo $ac_n "(cached) $ac_c" 1>&6
3195
else
3196
  ac_save_LIBS="$LIBS"
3197
LIBS="-lseq  $LIBS"
3198
cat > conftest.$ac_ext <
3199
#line 3200 "configure"
3200
#include "confdefs.h"
3201
/* Override any gcc2 internal prototype to avoid an error.  */
3202
/* We use char because int might match the return type of a gcc2
3203
    builtin and then its argument prototype would still apply.  */
3204
char getpseudotty();
3205
 
3206
int main() {
3207
getpseudotty()
3208
; return 0; }
3209
EOF
3210
if { (eval echo configure:3211: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3211
  rm -rf conftest*
3212
  eval "ac_cv_lib_$ac_lib_var=yes"
3213
else
3214
  echo "configure: failed program was:" >&5
3215
  cat conftest.$ac_ext >&5
3216
  rm -rf conftest*
3217
  eval "ac_cv_lib_$ac_lib_var=no"
3218
fi
3219
rm -f conftest*
3220
LIBS="$ac_save_LIBS"
3221
 
3222
fi
3223
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3224
  echo "$ac_t""yes" 1>&6
3225
    ac_tr_lib=HAVE_LIB`echo seq | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3226
    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3227
  cat >> confdefs.h <
3228
#define $ac_tr_lib 1
3229
EOF
3230
 
3231
  LIBS="-lseq $LIBS"
3232
 
3233
else
3234
  echo "$ac_t""no" 1>&6
3235
fi
3236
 
3237
fi
3238
# save results and retry for Tcl
3239
EXP_LIBS=$LIBS
3240
LIBS=$EXP_AND_TCL_LIBS
3241
unset ac_cv_func_getpseudotty
3242
echo $ac_n "checking for getpseudotty""... $ac_c" 1>&6
3243
echo "configure:3244: checking for getpseudotty" >&5
3244
if eval "test \"`echo '$''{'ac_cv_func_getpseudotty'+set}'`\" = set"; then
3245
  echo $ac_n "(cached) $ac_c" 1>&6
3246
else
3247
  cat > conftest.$ac_ext <
3248
#line 3249 "configure"
3249
#include "confdefs.h"
3250
/* System header to define __stub macros and hopefully few prototypes,
3251
    which can conflict with char getpseudotty(); below.  */
3252
#include 
3253
/* Override any gcc2 internal prototype to avoid an error.  */
3254
/* We use char because int might match the return type of a gcc2
3255
    builtin and then its argument prototype would still apply.  */
3256
char getpseudotty();
3257
 
3258
int main() {
3259
 
3260
/* The GNU C library defines this for functions which it implements
3261
    to always fail with ENOSYS.  Some functions are actually named
3262
    something starting with __ and the normal name is an alias.  */
3263
#if defined (__stub_getpseudotty) || defined (__stub___getpseudotty)
3264
choke me
3265
#else
3266
getpseudotty();
3267
#endif
3268
 
3269
; return 0; }
3270
EOF
3271
if { (eval echo configure:3272: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3272
  rm -rf conftest*
3273
  eval "ac_cv_func_getpseudotty=yes"
3274
else
3275
  echo "configure: failed program was:" >&5
3276
  cat conftest.$ac_ext >&5
3277
  rm -rf conftest*
3278
  eval "ac_cv_func_getpseudotty=no"
3279
fi
3280
rm -f conftest*
3281
fi
3282
 
3283
if eval "test \"`echo '$ac_cv_func_'getpseudotty`\" = yes"; then
3284
  echo "$ac_t""yes" 1>&6
3285
  getpseudotty=1
3286
else
3287
  echo "$ac_t""no" 1>&6
3288
getpseudotty=0
3289
fi
3290
 
3291
if test $getpseudotty -eq 0 ; then
3292
  unset ac_cv_lib_seq_getpseudotty
3293
  echo $ac_n "checking for getpseudotty in -lseq""... $ac_c" 1>&6
3294
echo "configure:3295: checking for getpseudotty in -lseq" >&5
3295
ac_lib_var=`echo seq'_'getpseudotty | sed 'y%./+-%__p_%'`
3296
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3297
  echo $ac_n "(cached) $ac_c" 1>&6
3298
else
3299
  ac_save_LIBS="$LIBS"
3300
LIBS="-lseq  $LIBS"
3301
cat > conftest.$ac_ext <
3302
#line 3303 "configure"
3303
#include "confdefs.h"
3304
/* Override any gcc2 internal prototype to avoid an error.  */
3305
/* We use char because int might match the return type of a gcc2
3306
    builtin and then its argument prototype would still apply.  */
3307
char getpseudotty();
3308
 
3309
int main() {
3310
getpseudotty()
3311
; return 0; }
3312
EOF
3313
if { (eval echo configure:3314: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3314
  rm -rf conftest*
3315
  eval "ac_cv_lib_$ac_lib_var=yes"
3316
else
3317
  echo "configure: failed program was:" >&5
3318
  cat conftest.$ac_ext >&5
3319
  rm -rf conftest*
3320
  eval "ac_cv_lib_$ac_lib_var=no"
3321
fi
3322
rm -f conftest*
3323
LIBS="$ac_save_LIBS"
3324
 
3325
fi
3326
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3327
  echo "$ac_t""yes" 1>&6
3328
    ac_tr_lib=HAVE_LIB`echo seq | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3329
    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3330
  cat >> confdefs.h <
3331
#define $ac_tr_lib 1
3332
EOF
3333
 
3334
  LIBS="-lseq $LIBS"
3335
 
3336
else
3337
  echo "$ac_t""no" 1>&6
3338
fi
3339
 
3340
fi
3341
# save Tcl results and retry for Tk
3342
EXP_AND_TCL_LIBS=$LIBS
3343
LIBS=$EXP_AND_TK_LIBS
3344
unset ac_cv_func_getpseudotty
3345
echo $ac_n "checking for getpseudotty""... $ac_c" 1>&6
3346
echo "configure:3347: checking for getpseudotty" >&5
3347
if eval "test \"`echo '$''{'ac_cv_func_getpseudotty'+set}'`\" = set"; then
3348
  echo $ac_n "(cached) $ac_c" 1>&6
3349
else
3350
  cat > conftest.$ac_ext <
3351
#line 3352 "configure"
3352
#include "confdefs.h"
3353
/* System header to define __stub macros and hopefully few prototypes,
3354
    which can conflict with char getpseudotty(); below.  */
3355
#include 
3356
/* Override any gcc2 internal prototype to avoid an error.  */
3357
/* We use char because int might match the return type of a gcc2
3358
    builtin and then its argument prototype would still apply.  */
3359
char getpseudotty();
3360
 
3361
int main() {
3362
 
3363
/* The GNU C library defines this for functions which it implements
3364
    to always fail with ENOSYS.  Some functions are actually named
3365
    something starting with __ and the normal name is an alias.  */
3366
#if defined (__stub_getpseudotty) || defined (__stub___getpseudotty)
3367
choke me
3368
#else
3369
getpseudotty();
3370
#endif
3371
 
3372
; return 0; }
3373
EOF
3374
if { (eval echo configure:3375: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3375
  rm -rf conftest*
3376
  eval "ac_cv_func_getpseudotty=yes"
3377
else
3378
  echo "configure: failed program was:" >&5
3379
  cat conftest.$ac_ext >&5
3380
  rm -rf conftest*
3381
  eval "ac_cv_func_getpseudotty=no"
3382
fi
3383
rm -f conftest*
3384
fi
3385
 
3386
if eval "test \"`echo '$ac_cv_func_'getpseudotty`\" = yes"; then
3387
  echo "$ac_t""yes" 1>&6
3388
  getpseudotty=1
3389
else
3390
  echo "$ac_t""no" 1>&6
3391
getpseudotty=0
3392
fi
3393
 
3394
if test $getpseudotty -eq 0 ; then
3395
  unset ac_cv_lib_seq_getpseudotty
3396
  echo $ac_n "checking for getpseudotty in -lseq""... $ac_c" 1>&6
3397
echo "configure:3398: checking for getpseudotty in -lseq" >&5
3398
ac_lib_var=`echo seq'_'getpseudotty | sed 'y%./+-%__p_%'`
3399
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3400
  echo $ac_n "(cached) $ac_c" 1>&6
3401
else
3402
  ac_save_LIBS="$LIBS"
3403
LIBS="-lseq  $LIBS"
3404
cat > conftest.$ac_ext <
3405
#line 3406 "configure"
3406
#include "confdefs.h"
3407
/* Override any gcc2 internal prototype to avoid an error.  */
3408
/* We use char because int might match the return type of a gcc2
3409
    builtin and then its argument prototype would still apply.  */
3410
char getpseudotty();
3411
 
3412
int main() {
3413
getpseudotty()
3414
; return 0; }
3415
EOF
3416
if { (eval echo configure:3417: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3417
  rm -rf conftest*
3418
  eval "ac_cv_lib_$ac_lib_var=yes"
3419
else
3420
  echo "configure: failed program was:" >&5
3421
  cat conftest.$ac_ext >&5
3422
  rm -rf conftest*
3423
  eval "ac_cv_lib_$ac_lib_var=no"
3424
fi
3425
rm -f conftest*
3426
LIBS="$ac_save_LIBS"
3427
 
3428
fi
3429
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3430
  echo "$ac_t""yes" 1>&6
3431
    ac_tr_lib=HAVE_LIB`echo seq | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3432
    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3433
  cat >> confdefs.h <
3434
#define $ac_tr_lib 1
3435
EOF
3436
 
3437
  LIBS="-lseq $LIBS"
3438
 
3439
else
3440
  echo "$ac_t""no" 1>&6
3441
fi
3442
 
3443
fi
3444
# save Tk results and reset for Expect
3445
EXP_AND_TK_LIBS=$LIBS
3446
LIBS=$EXP_LIBS
3447
 
3448
######################################################################
3449
# Check for FreeBSD/NetBSD openpty()
3450
# CYGNUS LOCAL: Don't do this on Linux.  Alpha Linux Red Hat 4.2 has
3451
# openpty, but it doesn't work correctly.
3452
case "${host}" in
3453
*-*-linux*) ;;
3454
*)
3455
  unset ac_cv_func_openpty
3456
  echo $ac_n "checking for openpty""... $ac_c" 1>&6
3457
echo "configure:3458: checking for openpty" >&5
3458
if eval "test \"`echo '$''{'ac_cv_func_openpty'+set}'`\" = set"; then
3459
  echo $ac_n "(cached) $ac_c" 1>&6
3460
else
3461
  cat > conftest.$ac_ext <
3462
#line 3463 "configure"
3463
#include "confdefs.h"
3464
/* System header to define __stub macros and hopefully few prototypes,
3465
    which can conflict with char openpty(); below.  */
3466
#include 
3467
/* Override any gcc2 internal prototype to avoid an error.  */
3468
/* We use char because int might match the return type of a gcc2
3469
    builtin and then its argument prototype would still apply.  */
3470
char openpty();
3471
 
3472
int main() {
3473
 
3474
/* The GNU C library defines this for functions which it implements
3475
    to always fail with ENOSYS.  Some functions are actually named
3476
    something starting with __ and the normal name is an alias.  */
3477
#if defined (__stub_openpty) || defined (__stub___openpty)
3478
choke me
3479
#else
3480
openpty();
3481
#endif
3482
 
3483
; return 0; }
3484
EOF
3485
if { (eval echo configure:3486: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3486
  rm -rf conftest*
3487
  eval "ac_cv_func_openpty=yes"
3488
else
3489
  echo "configure: failed program was:" >&5
3490
  cat conftest.$ac_ext >&5
3491
  rm -rf conftest*
3492
  eval "ac_cv_func_openpty=no"
3493
fi
3494
rm -f conftest*
3495
fi
3496
 
3497
if eval "test \"`echo '$ac_cv_func_'openpty`\" = yes"; then
3498
  echo "$ac_t""yes" 1>&6
3499
  openpty=1
3500
else
3501
  echo "$ac_t""no" 1>&6
3502
openpty=0
3503
fi
3504
 
3505
  if test $openpty -eq 0 ; then
3506
    unset ac_cv_lib_util_openpty
3507
    echo $ac_n "checking for openpty in -lutil""... $ac_c" 1>&6
3508
echo "configure:3509: checking for openpty in -lutil" >&5
3509
ac_lib_var=`echo util'_'openpty | sed 'y%./+-%__p_%'`
3510
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3511
  echo $ac_n "(cached) $ac_c" 1>&6
3512
else
3513
  ac_save_LIBS="$LIBS"
3514
LIBS="-lutil  $LIBS"
3515
cat > conftest.$ac_ext <
3516
#line 3517 "configure"
3517
#include "confdefs.h"
3518
/* Override any gcc2 internal prototype to avoid an error.  */
3519
/* We use char because int might match the return type of a gcc2
3520
    builtin and then its argument prototype would still apply.  */
3521
char openpty();
3522
 
3523
int main() {
3524
openpty()
3525
; return 0; }
3526
EOF
3527
if { (eval echo configure:3528: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3528
  rm -rf conftest*
3529
  eval "ac_cv_lib_$ac_lib_var=yes"
3530
else
3531
  echo "configure: failed program was:" >&5
3532
  cat conftest.$ac_ext >&5
3533
  rm -rf conftest*
3534
  eval "ac_cv_lib_$ac_lib_var=no"
3535
fi
3536
rm -f conftest*
3537
LIBS="$ac_save_LIBS"
3538
 
3539
fi
3540
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3541
  echo "$ac_t""yes" 1>&6
3542
 
3543
          # we only need to define OPENPTY once, but since we are overriding
3544
          # the default behavior, we must also handle augment LIBS too.
3545
          # This needn't be done in the 2nd and 3rd tests.
3546
          cat >> confdefs.h <<\EOF
3547
#define HAVE_OPENPTY 1
3548
EOF
3549
 
3550
          LIBS="$LIBS -lutil"
3551
 
3552
else
3553
  echo "$ac_t""no" 1>&6
3554
fi
3555
 
3556
  fi
3557
  # save results and retry for Tcl
3558
  EXP_LIBS=$LIBS
3559
  LIBS=$EXP_AND_TCL_LIBS
3560
  unset ac_cv_func_openpty
3561
  echo $ac_n "checking for openpty""... $ac_c" 1>&6
3562
echo "configure:3563: checking for openpty" >&5
3563
if eval "test \"`echo '$''{'ac_cv_func_openpty'+set}'`\" = set"; then
3564
  echo $ac_n "(cached) $ac_c" 1>&6
3565
else
3566
  cat > conftest.$ac_ext <
3567
#line 3568 "configure"
3568
#include "confdefs.h"
3569
/* System header to define __stub macros and hopefully few prototypes,
3570
    which can conflict with char openpty(); below.  */
3571
#include 
3572
/* Override any gcc2 internal prototype to avoid an error.  */
3573
/* We use char because int might match the return type of a gcc2
3574
    builtin and then its argument prototype would still apply.  */
3575
char openpty();
3576
 
3577
int main() {
3578
 
3579
/* The GNU C library defines this for functions which it implements
3580
    to always fail with ENOSYS.  Some functions are actually named
3581
    something starting with __ and the normal name is an alias.  */
3582
#if defined (__stub_openpty) || defined (__stub___openpty)
3583
choke me
3584
#else
3585
openpty();
3586
#endif
3587
 
3588
; return 0; }
3589
EOF
3590
if { (eval echo configure:3591: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3591
  rm -rf conftest*
3592
  eval "ac_cv_func_openpty=yes"
3593
else
3594
  echo "configure: failed program was:" >&5
3595
  cat conftest.$ac_ext >&5
3596
  rm -rf conftest*
3597
  eval "ac_cv_func_openpty=no"
3598
fi
3599
rm -f conftest*
3600
fi
3601
 
3602
if eval "test \"`echo '$ac_cv_func_'openpty`\" = yes"; then
3603
  echo "$ac_t""yes" 1>&6
3604
  openpty=1
3605
else
3606
  echo "$ac_t""no" 1>&6
3607
openpty=0
3608
fi
3609
 
3610
  if test $openpty -eq 0 ; then
3611
    unset ac_cv_lib_util_openpty
3612
    echo $ac_n "checking for openpty in -lutil""... $ac_c" 1>&6
3613
echo "configure:3614: checking for openpty in -lutil" >&5
3614
ac_lib_var=`echo util'_'openpty | sed 'y%./+-%__p_%'`
3615
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3616
  echo $ac_n "(cached) $ac_c" 1>&6
3617
else
3618
  ac_save_LIBS="$LIBS"
3619
LIBS="-lutil  $LIBS"
3620
cat > conftest.$ac_ext <
3621
#line 3622 "configure"
3622
#include "confdefs.h"
3623
/* Override any gcc2 internal prototype to avoid an error.  */
3624
/* We use char because int might match the return type of a gcc2
3625
    builtin and then its argument prototype would still apply.  */
3626
char openpty();
3627
 
3628
int main() {
3629
openpty()
3630
; return 0; }
3631
EOF
3632
if { (eval echo configure:3633: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3633
  rm -rf conftest*
3634
  eval "ac_cv_lib_$ac_lib_var=yes"
3635
else
3636
  echo "configure: failed program was:" >&5
3637
  cat conftest.$ac_ext >&5
3638
  rm -rf conftest*
3639
  eval "ac_cv_lib_$ac_lib_var=no"
3640
fi
3641
rm -f conftest*
3642
LIBS="$ac_save_LIBS"
3643
 
3644
fi
3645
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3646
  echo "$ac_t""yes" 1>&6
3647
 
3648
        cat >> confdefs.h <<\EOF
3649
#define HAVE_OPENPTY 1
3650
EOF
3651
 
3652
        LIBS="$LIBS -lutil"
3653
 
3654
else
3655
  echo "$ac_t""no" 1>&6
3656
fi
3657
 
3658
  fi
3659
  # save Tcl results and retry for Tk
3660
  EXP_AND_TCL_LIBS=$LIBS
3661
  LIBS=$EXP_AND_TK_LIBS
3662
  unset ac_cv_func_openpty
3663
  echo $ac_n "checking for openpty""... $ac_c" 1>&6
3664
echo "configure:3665: checking for openpty" >&5
3665
if eval "test \"`echo '$''{'ac_cv_func_openpty'+set}'`\" = set"; then
3666
  echo $ac_n "(cached) $ac_c" 1>&6
3667
else
3668
  cat > conftest.$ac_ext <
3669
#line 3670 "configure"
3670
#include "confdefs.h"
3671
/* System header to define __stub macros and hopefully few prototypes,
3672
    which can conflict with char openpty(); below.  */
3673
#include 
3674
/* Override any gcc2 internal prototype to avoid an error.  */
3675
/* We use char because int might match the return type of a gcc2
3676
    builtin and then its argument prototype would still apply.  */
3677
char openpty();
3678
 
3679
int main() {
3680
 
3681
/* The GNU C library defines this for functions which it implements
3682
    to always fail with ENOSYS.  Some functions are actually named
3683
    something starting with __ and the normal name is an alias.  */
3684
#if defined (__stub_openpty) || defined (__stub___openpty)
3685
choke me
3686
#else
3687
openpty();
3688
#endif
3689
 
3690
; return 0; }
3691
EOF
3692
if { (eval echo configure:3693: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3693
  rm -rf conftest*
3694
  eval "ac_cv_func_openpty=yes"
3695
else
3696
  echo "configure: failed program was:" >&5
3697
  cat conftest.$ac_ext >&5
3698
  rm -rf conftest*
3699
  eval "ac_cv_func_openpty=no"
3700
fi
3701
rm -f conftest*
3702
fi
3703
 
3704
if eval "test \"`echo '$ac_cv_func_'openpty`\" = yes"; then
3705
  echo "$ac_t""yes" 1>&6
3706
  openpty=1
3707
else
3708
  echo "$ac_t""no" 1>&6
3709
openpty=0
3710
fi
3711
 
3712
  if test $openpty -eq 0 ; then
3713
    unset ac_cv_lib_util_openpty
3714
    echo $ac_n "checking for openpty in -lutil""... $ac_c" 1>&6
3715
echo "configure:3716: checking for openpty in -lutil" >&5
3716
ac_lib_var=`echo util'_'openpty | sed 'y%./+-%__p_%'`
3717
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3718
  echo $ac_n "(cached) $ac_c" 1>&6
3719
else
3720
  ac_save_LIBS="$LIBS"
3721
LIBS="-lutil  $LIBS"
3722
cat > conftest.$ac_ext <
3723
#line 3724 "configure"
3724
#include "confdefs.h"
3725
/* Override any gcc2 internal prototype to avoid an error.  */
3726
/* We use char because int might match the return type of a gcc2
3727
    builtin and then its argument prototype would still apply.  */
3728
char openpty();
3729
 
3730
int main() {
3731
openpty()
3732
; return 0; }
3733
EOF
3734
if { (eval echo configure:3735: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3735
  rm -rf conftest*
3736
  eval "ac_cv_lib_$ac_lib_var=yes"
3737
else
3738
  echo "configure: failed program was:" >&5
3739
  cat conftest.$ac_ext >&5
3740
  rm -rf conftest*
3741
  eval "ac_cv_lib_$ac_lib_var=no"
3742
fi
3743
rm -f conftest*
3744
LIBS="$ac_save_LIBS"
3745
 
3746
fi
3747
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3748
  echo "$ac_t""yes" 1>&6
3749
 
3750
        cat >> confdefs.h <<\EOF
3751
#define HAVE_OPENPTY 1
3752
EOF
3753
 
3754
        LIBS="$LIBS -lutil"
3755
 
3756
else
3757
  echo "$ac_t""no" 1>&6
3758
fi
3759
 
3760
  fi
3761
  # save Tk results and reset for Expect
3762
  EXP_AND_TK_LIBS=$LIBS
3763
  LIBS=$EXP_LIBS
3764
 
3765
  # CYGNUS LOCAL: Link against luser32 on Cygwin.
3766
  case "${host}" in
3767
    *-*-cygwin*) EXP_AND_TCL_LIBS="$EXP_AND_TCL_LIBS -luser32" ;;
3768
  esac
3769
;;
3770
esac
3771
 
3772
######################################################################
3773
# End of library/func checking
3774
######################################################################
3775
 
3776
######################################################################
3777
#
3778
# Look for various header files
3779
#
3780
ac_safe=`echo "sys/sysmacros.h" | sed 'y%./+-%__p_%'`
3781
echo $ac_n "checking for sys/sysmacros.h""... $ac_c" 1>&6
3782
echo "configure:3783: checking for sys/sysmacros.h" >&5
3783
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3784
  echo $ac_n "(cached) $ac_c" 1>&6
3785
else
3786
  cat > conftest.$ac_ext <
3787
#line 3788 "configure"
3788
#include "confdefs.h"
3789
#include 
3790
EOF
3791
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3792
{ (eval echo configure:3793: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3793
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3794
if test -z "$ac_err"; then
3795
  rm -rf conftest*
3796
  eval "ac_cv_header_$ac_safe=yes"
3797
else
3798
  echo "$ac_err" >&5
3799
  echo "configure: failed program was:" >&5
3800
  cat conftest.$ac_ext >&5
3801
  rm -rf conftest*
3802
  eval "ac_cv_header_$ac_safe=no"
3803
fi
3804
rm -f conftest*
3805
fi
3806
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3807
  echo "$ac_t""yes" 1>&6
3808
  cat >> confdefs.h <<\EOF
3809
#define HAVE_SYSMACROS_H 1
3810
EOF
3811
 
3812
else
3813
  echo "$ac_t""no" 1>&6
3814
fi
3815
 
3816
ac_safe=`echo "stdlib.h" | sed 'y%./+-%__p_%'`
3817
echo $ac_n "checking for stdlib.h""... $ac_c" 1>&6
3818
echo "configure:3819: checking for stdlib.h" >&5
3819
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3820
  echo $ac_n "(cached) $ac_c" 1>&6
3821
else
3822
  cat > conftest.$ac_ext <
3823
#line 3824 "configure"
3824
#include "confdefs.h"
3825
#include 
3826
EOF
3827
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3828
{ (eval echo configure:3829: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3829
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3830
if test -z "$ac_err"; then
3831
  rm -rf conftest*
3832
  eval "ac_cv_header_$ac_safe=yes"
3833
else
3834
  echo "$ac_err" >&5
3835
  echo "configure: failed program was:" >&5
3836
  cat conftest.$ac_ext >&5
3837
  rm -rf conftest*
3838
  eval "ac_cv_header_$ac_safe=no"
3839
fi
3840
rm -f conftest*
3841
fi
3842
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3843
  echo "$ac_t""yes" 1>&6
3844
  :
3845
else
3846
  echo "$ac_t""no" 1>&6
3847
cat >> confdefs.h <<\EOF
3848
#define NO_STDLIB_H 1
3849
EOF
3850
 
3851
fi
3852
 
3853
 
3854
#
3855
# Look for inttypes.h. Sometimes there are data type conflicts
3856
# with sys/types.h, so we have to use our own special test.
3857
#
3858
echo $ac_n "checking for inttypes.h""... $ac_c" 1>&6
3859
echo "configure:3860: checking for inttypes.h" >&5
3860
if eval "test \"`echo '$''{'ac_cv_inttypes_h'+set}'`\" = set"; then
3861
  echo $ac_n "(cached) $ac_c" 1>&6
3862
else
3863
  cat > conftest.$ac_ext <
3864
#line 3865 "configure"
3865
#include "confdefs.h"
3866
 
3867
  #include 
3868
  #include 
3869
int main() {
3870
 
3871
  int16_t x = 0;
3872
 
3873
; return 0; }
3874
EOF
3875
if { (eval echo configure:3876: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3876
  rm -rf conftest*
3877
  ac_cv_inttypes_h="yes"
3878
else
3879
  echo "configure: failed program was:" >&5
3880
  cat conftest.$ac_ext >&5
3881
  rm -rf conftest*
3882
  ac_cv_inttypes_h="no"
3883
fi
3884
rm -f conftest*
3885
fi
3886
 
3887
echo "$ac_t""$ac_cv_inttypes_h" 1>&6
3888
if test x"${ac_cv_inttypes_h}" = x"yes"; then
3889
  cat >> confdefs.h <<\EOF
3890
#define HAVE_INTTYPES_H 1
3891
EOF
3892
 
3893
fi
3894
 
3895
 
3896
# Oddly, some systems have stdarg but don't support prototypes
3897
# Tcl avoids the whole issue by not using stdarg on UNIX at all!
3898
 
3899
ac_safe=`echo "varargs.h" | sed 'y%./+-%__p_%'`
3900
echo $ac_n "checking for varargs.h""... $ac_c" 1>&6
3901
echo "configure:3902: checking for varargs.h" >&5
3902
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3903
  echo $ac_n "(cached) $ac_c" 1>&6
3904
else
3905
  cat > conftest.$ac_ext <
3906
#line 3907 "configure"
3907
#include "confdefs.h"
3908
#include 
3909
EOF
3910
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3911
{ (eval echo configure:3912: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3912
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3913
if test -z "$ac_err"; then
3914
  rm -rf conftest*
3915
  eval "ac_cv_header_$ac_safe=yes"
3916
else
3917
  echo "$ac_err" >&5
3918
  echo "configure: failed program was:" >&5
3919
  cat conftest.$ac_ext >&5
3920
  rm -rf conftest*
3921
  eval "ac_cv_header_$ac_safe=no"
3922
fi
3923
rm -f conftest*
3924
fi
3925
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3926
  echo "$ac_t""yes" 1>&6
3927
  cat >> confdefs.h <<\EOF
3928
#define HAVE_VARARGS_H 1
3929
EOF
3930
 
3931
else
3932
  echo "$ac_t""no" 1>&6
3933
fi
3934
 
3935
ac_safe=`echo "unistd.h" | sed 'y%./+-%__p_%'`
3936
echo $ac_n "checking for unistd.h""... $ac_c" 1>&6
3937
echo "configure:3938: checking for unistd.h" >&5
3938
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3939
  echo $ac_n "(cached) $ac_c" 1>&6
3940
else
3941
  cat > conftest.$ac_ext <
3942
#line 3943 "configure"
3943
#include "confdefs.h"
3944
#include 
3945
EOF
3946
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3947
{ (eval echo configure:3948: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3948
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3949
if test -z "$ac_err"; then
3950
  rm -rf conftest*
3951
  eval "ac_cv_header_$ac_safe=yes"
3952
else
3953
  echo "$ac_err" >&5
3954
  echo "configure: failed program was:" >&5
3955
  cat conftest.$ac_ext >&5
3956
  rm -rf conftest*
3957
  eval "ac_cv_header_$ac_safe=no"
3958
fi
3959
rm -f conftest*
3960
fi
3961
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3962
  echo "$ac_t""yes" 1>&6
3963
  cat >> confdefs.h <<\EOF
3964
#define HAVE_UNISTD_H 1
3965
EOF
3966
 
3967
else
3968
  echo "$ac_t""no" 1>&6
3969
fi
3970
 
3971
ac_safe=`echo "sys/stropts.h" | sed 'y%./+-%__p_%'`
3972
echo $ac_n "checking for sys/stropts.h""... $ac_c" 1>&6
3973
echo "configure:3974: checking for sys/stropts.h" >&5
3974
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3975
  echo $ac_n "(cached) $ac_c" 1>&6
3976
else
3977
  cat > conftest.$ac_ext <
3978
#line 3979 "configure"
3979
#include "confdefs.h"
3980
#include 
3981
EOF
3982
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3983
{ (eval echo configure:3984: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3984
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3985
if test -z "$ac_err"; then
3986
  rm -rf conftest*
3987
  eval "ac_cv_header_$ac_safe=yes"
3988
else
3989
  echo "$ac_err" >&5
3990
  echo "configure: failed program was:" >&5
3991
  cat conftest.$ac_ext >&5
3992
  rm -rf conftest*
3993
  eval "ac_cv_header_$ac_safe=no"
3994
fi
3995
rm -f conftest*
3996
fi
3997
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3998
  echo "$ac_t""yes" 1>&6
3999
  cat >> confdefs.h <<\EOF
4000
#define HAVE_STROPTS_H 1
4001
EOF
4002
 
4003
else
4004
  echo "$ac_t""no" 1>&6
4005
fi
4006
 
4007
ac_safe=`echo "sys/sysconfig.h" | sed 'y%./+-%__p_%'`
4008
echo $ac_n "checking for sys/sysconfig.h""... $ac_c" 1>&6
4009
echo "configure:4010: checking for sys/sysconfig.h" >&5
4010
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4011
  echo $ac_n "(cached) $ac_c" 1>&6
4012
else
4013
  cat > conftest.$ac_ext <
4014
#line 4015 "configure"
4015
#include "confdefs.h"
4016
#include 
4017
EOF
4018
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4019
{ (eval echo configure:4020: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4020
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4021
if test -z "$ac_err"; then
4022
  rm -rf conftest*
4023
  eval "ac_cv_header_$ac_safe=yes"
4024
else
4025
  echo "$ac_err" >&5
4026
  echo "configure: failed program was:" >&5
4027
  cat conftest.$ac_ext >&5
4028
  rm -rf conftest*
4029
  eval "ac_cv_header_$ac_safe=no"
4030
fi
4031
rm -f conftest*
4032
fi
4033
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4034
  echo "$ac_t""yes" 1>&6
4035
  cat >> confdefs.h <<\EOF
4036
#define HAVE_SYSCONF_H 1
4037
EOF
4038
 
4039
else
4040
  echo "$ac_t""no" 1>&6
4041
fi
4042
 
4043
ac_safe=`echo "sys/fcntl.h" | sed 'y%./+-%__p_%'`
4044
echo $ac_n "checking for sys/fcntl.h""... $ac_c" 1>&6
4045
echo "configure:4046: checking for sys/fcntl.h" >&5
4046
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4047
  echo $ac_n "(cached) $ac_c" 1>&6
4048
else
4049
  cat > conftest.$ac_ext <
4050
#line 4051 "configure"
4051
#include "confdefs.h"
4052
#include 
4053
EOF
4054
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4055
{ (eval echo configure:4056: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4056
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4057
if test -z "$ac_err"; then
4058
  rm -rf conftest*
4059
  eval "ac_cv_header_$ac_safe=yes"
4060
else
4061
  echo "$ac_err" >&5
4062
  echo "configure: failed program was:" >&5
4063
  cat conftest.$ac_ext >&5
4064
  rm -rf conftest*
4065
  eval "ac_cv_header_$ac_safe=no"
4066
fi
4067
rm -f conftest*
4068
fi
4069
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4070
  echo "$ac_t""yes" 1>&6
4071
  cat >> confdefs.h <<\EOF
4072
#define HAVE_SYS_FCNTL_H 1
4073
EOF
4074
 
4075
else
4076
  echo "$ac_t""no" 1>&6
4077
fi
4078
 
4079
ac_safe=`echo "sys/select.h" | sed 'y%./+-%__p_%'`
4080
echo $ac_n "checking for sys/select.h""... $ac_c" 1>&6
4081
echo "configure:4082: checking for sys/select.h" >&5
4082
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4083
  echo $ac_n "(cached) $ac_c" 1>&6
4084
else
4085
  cat > conftest.$ac_ext <
4086
#line 4087 "configure"
4087
#include "confdefs.h"
4088
#include 
4089
EOF
4090
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4091
{ (eval echo configure:4092: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4092
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4093
if test -z "$ac_err"; then
4094
  rm -rf conftest*
4095
  eval "ac_cv_header_$ac_safe=yes"
4096
else
4097
  echo "$ac_err" >&5
4098
  echo "configure: failed program was:" >&5
4099
  cat conftest.$ac_ext >&5
4100
  rm -rf conftest*
4101
  eval "ac_cv_header_$ac_safe=no"
4102
fi
4103
rm -f conftest*
4104
fi
4105
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4106
  echo "$ac_t""yes" 1>&6
4107
  cat >> confdefs.h <<\EOF
4108
#define HAVE_SYS_SELECT_H 1
4109
EOF
4110
 
4111
else
4112
  echo "$ac_t""no" 1>&6
4113
fi
4114
 
4115
ac_safe=`echo "sys/time.h" | sed 'y%./+-%__p_%'`
4116
echo $ac_n "checking for sys/time.h""... $ac_c" 1>&6
4117
echo "configure:4118: checking for sys/time.h" >&5
4118
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4119
  echo $ac_n "(cached) $ac_c" 1>&6
4120
else
4121
  cat > conftest.$ac_ext <
4122
#line 4123 "configure"
4123
#include "confdefs.h"
4124
#include 
4125
EOF
4126
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4127
{ (eval echo configure:4128: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4128
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4129
if test -z "$ac_err"; then
4130
  rm -rf conftest*
4131
  eval "ac_cv_header_$ac_safe=yes"
4132
else
4133
  echo "$ac_err" >&5
4134
  echo "configure: failed program was:" >&5
4135
  cat conftest.$ac_ext >&5
4136
  rm -rf conftest*
4137
  eval "ac_cv_header_$ac_safe=no"
4138
fi
4139
rm -f conftest*
4140
fi
4141
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4142
  echo "$ac_t""yes" 1>&6
4143
  cat >> confdefs.h <<\EOF
4144
#define HAVE_SYS_TIME_H 1
4145
EOF
4146
 
4147
else
4148
  echo "$ac_t""no" 1>&6
4149
fi
4150
 
4151
ac_safe=`echo "sys/ptem.h" | sed 'y%./+-%__p_%'`
4152
echo $ac_n "checking for sys/ptem.h""... $ac_c" 1>&6
4153
echo "configure:4154: checking for sys/ptem.h" >&5
4154
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4155
  echo $ac_n "(cached) $ac_c" 1>&6
4156
else
4157
  cat > conftest.$ac_ext <
4158
#line 4159 "configure"
4159
#include "confdefs.h"
4160
#include 
4161
EOF
4162
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4163
{ (eval echo configure:4164: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4164
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4165
if test -z "$ac_err"; then
4166
  rm -rf conftest*
4167
  eval "ac_cv_header_$ac_safe=yes"
4168
else
4169
  echo "$ac_err" >&5
4170
  echo "configure: failed program was:" >&5
4171
  cat conftest.$ac_ext >&5
4172
  rm -rf conftest*
4173
  eval "ac_cv_header_$ac_safe=no"
4174
fi
4175
rm -f conftest*
4176
fi
4177
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4178
  echo "$ac_t""yes" 1>&6
4179
  cat >> confdefs.h <<\EOF
4180
#define HAVE_SYS_PTEM_H 1
4181
EOF
4182
 
4183
else
4184
  echo "$ac_t""no" 1>&6
4185
fi
4186
 
4187
ac_safe=`echo "sys/strredir.h" | sed 'y%./+-%__p_%'`
4188
echo $ac_n "checking for sys/strredir.h""... $ac_c" 1>&6
4189
echo "configure:4190: checking for sys/strredir.h" >&5
4190
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4191
  echo $ac_n "(cached) $ac_c" 1>&6
4192
else
4193
  cat > conftest.$ac_ext <
4194
#line 4195 "configure"
4195
#include "confdefs.h"
4196
#include 
4197
EOF
4198
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4199
{ (eval echo configure:4200: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4200
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4201
if test -z "$ac_err"; then
4202
  rm -rf conftest*
4203
  eval "ac_cv_header_$ac_safe=yes"
4204
else
4205
  echo "$ac_err" >&5
4206
  echo "configure: failed program was:" >&5
4207
  cat conftest.$ac_ext >&5
4208
  rm -rf conftest*
4209
  eval "ac_cv_header_$ac_safe=no"
4210
fi
4211
rm -f conftest*
4212
fi
4213
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4214
  echo "$ac_t""yes" 1>&6
4215
  cat >> confdefs.h <<\EOF
4216
#define HAVE_STRREDIR_H 1
4217
EOF
4218
 
4219
else
4220
  echo "$ac_t""no" 1>&6
4221
fi
4222
 
4223
ac_safe=`echo "sys/strpty.h" | sed 'y%./+-%__p_%'`
4224
echo $ac_n "checking for sys/strpty.h""... $ac_c" 1>&6
4225
echo "configure:4226: checking for sys/strpty.h" >&5
4226
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4227
  echo $ac_n "(cached) $ac_c" 1>&6
4228
else
4229
  cat > conftest.$ac_ext <
4230
#line 4231 "configure"
4231
#include "confdefs.h"
4232
#include 
4233
EOF
4234
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4235
{ (eval echo configure:4236: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4236
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4237
if test -z "$ac_err"; then
4238
  rm -rf conftest*
4239
  eval "ac_cv_header_$ac_safe=yes"
4240
else
4241
  echo "$ac_err" >&5
4242
  echo "configure: failed program was:" >&5
4243
  cat conftest.$ac_ext >&5
4244
  rm -rf conftest*
4245
  eval "ac_cv_header_$ac_safe=no"
4246
fi
4247
rm -f conftest*
4248
fi
4249
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4250
  echo "$ac_t""yes" 1>&6
4251
  cat >> confdefs.h <<\EOF
4252
#define HAVE_STRPTY_H 1
4253
EOF
4254
 
4255
else
4256
  echo "$ac_t""no" 1>&6
4257
fi
4258
 
4259
 
4260
 
4261
echo $ac_n "checking for sys/bsdtypes.h""... $ac_c" 1>&6
4262
echo "configure:4263: checking for sys/bsdtypes.h" >&5
4263
if test "ISC_${ISC}" = "ISC_1"   ;    then
4264
   echo "$ac_t""yes" 1>&6
4265
   # if on ISC 1, we need  to get FD_SET macros
4266
   for ac_hdr in sys/bsdtypes.h
4267
do
4268
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4269
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4270
echo "configure:4271: checking for $ac_hdr" >&5
4271
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4272
  echo $ac_n "(cached) $ac_c" 1>&6
4273
else
4274
  cat > conftest.$ac_ext <
4275
#line 4276 "configure"
4276
#include "confdefs.h"
4277
#include <$ac_hdr>
4278
EOF
4279
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4280
{ (eval echo configure:4281: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4281
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4282
if test -z "$ac_err"; then
4283
  rm -rf conftest*
4284
  eval "ac_cv_header_$ac_safe=yes"
4285
else
4286
  echo "$ac_err" >&5
4287
  echo "configure: failed program was:" >&5
4288
  cat conftest.$ac_ext >&5
4289
  rm -rf conftest*
4290
  eval "ac_cv_header_$ac_safe=no"
4291
fi
4292
rm -f conftest*
4293
fi
4294
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4295
  echo "$ac_t""yes" 1>&6
4296
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4297
  cat >> confdefs.h <
4298
#define $ac_tr_hdr 1
4299
EOF
4300
 
4301
else
4302
  echo "$ac_t""no" 1>&6
4303
fi
4304
done
4305
 
4306
else
4307
   echo "$ac_t""no" 1>&6
4308
fi
4309
 
4310
#
4311
# Look for functions that may be missing
4312
#
4313
echo $ac_n "checking for memmove""... $ac_c" 1>&6
4314
echo "configure:4315: checking for memmove" >&5
4315
if eval "test \"`echo '$''{'ac_cv_func_memmove'+set}'`\" = set"; then
4316
  echo $ac_n "(cached) $ac_c" 1>&6
4317
else
4318
  cat > conftest.$ac_ext <
4319
#line 4320 "configure"
4320
#include "confdefs.h"
4321
/* System header to define __stub macros and hopefully few prototypes,
4322
    which can conflict with char memmove(); below.  */
4323
#include 
4324
/* Override any gcc2 internal prototype to avoid an error.  */
4325
/* We use char because int might match the return type of a gcc2
4326
    builtin and then its argument prototype would still apply.  */
4327
char memmove();
4328
 
4329
int main() {
4330
 
4331
/* The GNU C library defines this for functions which it implements
4332
    to always fail with ENOSYS.  Some functions are actually named
4333
    something starting with __ and the normal name is an alias.  */
4334
#if defined (__stub_memmove) || defined (__stub___memmove)
4335
choke me
4336
#else
4337
memmove();
4338
#endif
4339
 
4340
; return 0; }
4341
EOF
4342
if { (eval echo configure:4343: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4343
  rm -rf conftest*
4344
  eval "ac_cv_func_memmove=yes"
4345
else
4346
  echo "configure: failed program was:" >&5
4347
  cat conftest.$ac_ext >&5
4348
  rm -rf conftest*
4349
  eval "ac_cv_func_memmove=no"
4350
fi
4351
rm -f conftest*
4352
fi
4353
 
4354
if eval "test \"`echo '$ac_cv_func_'memmove`\" = yes"; then
4355
  echo "$ac_t""yes" 1>&6
4356
  cat >> confdefs.h <<\EOF
4357
#define HAVE_MEMMOVE 1
4358
EOF
4359
 
4360
else
4361
  echo "$ac_t""no" 1>&6
4362
fi
4363
 
4364
echo $ac_n "checking for sysconf""... $ac_c" 1>&6
4365
echo "configure:4366: checking for sysconf" >&5
4366
if eval "test \"`echo '$''{'ac_cv_func_sysconf'+set}'`\" = set"; then
4367
  echo $ac_n "(cached) $ac_c" 1>&6
4368
else
4369
  cat > conftest.$ac_ext <
4370
#line 4371 "configure"
4371
#include "confdefs.h"
4372
/* System header to define __stub macros and hopefully few prototypes,
4373
    which can conflict with char sysconf(); below.  */
4374
#include 
4375
/* Override any gcc2 internal prototype to avoid an error.  */
4376
/* We use char because int might match the return type of a gcc2
4377
    builtin and then its argument prototype would still apply.  */
4378
char sysconf();
4379
 
4380
int main() {
4381
 
4382
/* The GNU C library defines this for functions which it implements
4383
    to always fail with ENOSYS.  Some functions are actually named
4384
    something starting with __ and the normal name is an alias.  */
4385
#if defined (__stub_sysconf) || defined (__stub___sysconf)
4386
choke me
4387
#else
4388
sysconf();
4389
#endif
4390
 
4391
; return 0; }
4392
EOF
4393
if { (eval echo configure:4394: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4394
  rm -rf conftest*
4395
  eval "ac_cv_func_sysconf=yes"
4396
else
4397
  echo "configure: failed program was:" >&5
4398
  cat conftest.$ac_ext >&5
4399
  rm -rf conftest*
4400
  eval "ac_cv_func_sysconf=no"
4401
fi
4402
rm -f conftest*
4403
fi
4404
 
4405
if eval "test \"`echo '$ac_cv_func_'sysconf`\" = yes"; then
4406
  echo "$ac_t""yes" 1>&6
4407
  cat >> confdefs.h <<\EOF
4408
#define HAVE_SYSCONF 1
4409
EOF
4410
 
4411
else
4412
  echo "$ac_t""no" 1>&6
4413
fi
4414
 
4415
echo $ac_n "checking for strftime""... $ac_c" 1>&6
4416
echo "configure:4417: checking for strftime" >&5
4417
if eval "test \"`echo '$''{'ac_cv_func_strftime'+set}'`\" = set"; then
4418
  echo $ac_n "(cached) $ac_c" 1>&6
4419
else
4420
  cat > conftest.$ac_ext <
4421
#line 4422 "configure"
4422
#include "confdefs.h"
4423
/* System header to define __stub macros and hopefully few prototypes,
4424
    which can conflict with char strftime(); below.  */
4425
#include 
4426
/* Override any gcc2 internal prototype to avoid an error.  */
4427
/* We use char because int might match the return type of a gcc2
4428
    builtin and then its argument prototype would still apply.  */
4429
char strftime();
4430
 
4431
int main() {
4432
 
4433
/* The GNU C library defines this for functions which it implements
4434
    to always fail with ENOSYS.  Some functions are actually named
4435
    something starting with __ and the normal name is an alias.  */
4436
#if defined (__stub_strftime) || defined (__stub___strftime)
4437
choke me
4438
#else
4439
strftime();
4440
#endif
4441
 
4442
; return 0; }
4443
EOF
4444
if { (eval echo configure:4445: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4445
  rm -rf conftest*
4446
  eval "ac_cv_func_strftime=yes"
4447
else
4448
  echo "configure: failed program was:" >&5
4449
  cat conftest.$ac_ext >&5
4450
  rm -rf conftest*
4451
  eval "ac_cv_func_strftime=no"
4452
fi
4453
rm -f conftest*
4454
fi
4455
 
4456
if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
4457
  echo "$ac_t""yes" 1>&6
4458
  cat >> confdefs.h <<\EOF
4459
#define HAVE_STRFTIME 1
4460
EOF
4461
 
4462
else
4463
  echo "$ac_t""no" 1>&6
4464
fi
4465
 
4466
echo $ac_n "checking for strchr""... $ac_c" 1>&6
4467
echo "configure:4468: checking for strchr" >&5
4468
if eval "test \"`echo '$''{'ac_cv_func_strchr'+set}'`\" = set"; then
4469
  echo $ac_n "(cached) $ac_c" 1>&6
4470
else
4471
  cat > conftest.$ac_ext <
4472
#line 4473 "configure"
4473
#include "confdefs.h"
4474
/* System header to define __stub macros and hopefully few prototypes,
4475
    which can conflict with char strchr(); below.  */
4476
#include 
4477
/* Override any gcc2 internal prototype to avoid an error.  */
4478
/* We use char because int might match the return type of a gcc2
4479
    builtin and then its argument prototype would still apply.  */
4480
char strchr();
4481
 
4482
int main() {
4483
 
4484
/* The GNU C library defines this for functions which it implements
4485
    to always fail with ENOSYS.  Some functions are actually named
4486
    something starting with __ and the normal name is an alias.  */
4487
#if defined (__stub_strchr) || defined (__stub___strchr)
4488
choke me
4489
#else
4490
strchr();
4491
#endif
4492
 
4493
; return 0; }
4494
EOF
4495
if { (eval echo configure:4496: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4496
  rm -rf conftest*
4497
  eval "ac_cv_func_strchr=yes"
4498
else
4499
  echo "configure: failed program was:" >&5
4500
  cat conftest.$ac_ext >&5
4501
  rm -rf conftest*
4502
  eval "ac_cv_func_strchr=no"
4503
fi
4504
rm -f conftest*
4505
fi
4506
 
4507
if eval "test \"`echo '$ac_cv_func_'strchr`\" = yes"; then
4508
  echo "$ac_t""yes" 1>&6
4509
  cat >> confdefs.h <<\EOF
4510
#define HAVE_STRCHR 1
4511
EOF
4512
 
4513
else
4514
  echo "$ac_t""no" 1>&6
4515
fi
4516
 
4517
echo $ac_n "checking for timezone""... $ac_c" 1>&6
4518
echo "configure:4519: checking for timezone" >&5
4519
if eval "test \"`echo '$''{'ac_cv_func_timezone'+set}'`\" = set"; then
4520
  echo $ac_n "(cached) $ac_c" 1>&6
4521
else
4522
  cat > conftest.$ac_ext <
4523
#line 4524 "configure"
4524
#include "confdefs.h"
4525
/* System header to define __stub macros and hopefully few prototypes,
4526
    which can conflict with char timezone(); below.  */
4527
#include 
4528
/* Override any gcc2 internal prototype to avoid an error.  */
4529
/* We use char because int might match the return type of a gcc2
4530
    builtin and then its argument prototype would still apply.  */
4531
char timezone();
4532
 
4533
int main() {
4534
 
4535
/* The GNU C library defines this for functions which it implements
4536
    to always fail with ENOSYS.  Some functions are actually named
4537
    something starting with __ and the normal name is an alias.  */
4538
#if defined (__stub_timezone) || defined (__stub___timezone)
4539
choke me
4540
#else
4541
timezone();
4542
#endif
4543
 
4544
; return 0; }
4545
EOF
4546
if { (eval echo configure:4547: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4547
  rm -rf conftest*
4548
  eval "ac_cv_func_timezone=yes"
4549
else
4550
  echo "configure: failed program was:" >&5
4551
  cat conftest.$ac_ext >&5
4552
  rm -rf conftest*
4553
  eval "ac_cv_func_timezone=no"
4554
fi
4555
rm -f conftest*
4556
fi
4557
 
4558
if eval "test \"`echo '$ac_cv_func_'timezone`\" = yes"; then
4559
  echo "$ac_t""yes" 1>&6
4560
  cat >> confdefs.h <<\EOF
4561
#define HAVE_TIMEZONE 1
4562
EOF
4563
 
4564
else
4565
  echo "$ac_t""no" 1>&6
4566
fi
4567
 
4568
 
4569
# dnl check for memcpy by hand
4570
# because Unixware 2.0 handles it specially and refuses to compile
4571
# autoconf's automatic test that is a call with no arguments
4572
echo $ac_n "checking for memcpy""... $ac_c" 1>&6
4573
echo "configure:4574: checking for memcpy" >&5
4574
cat > conftest.$ac_ext <
4575
#line 4576 "configure"
4576
#include "confdefs.h"
4577
 
4578
int main() {
4579
 
4580
char *s1, *s2;
4581
memcpy(s1,s2,0);
4582
 
4583
; return 0; }
4584
EOF
4585
if { (eval echo configure:4586: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4586
  rm -rf conftest*
4587
  echo "$ac_t""yes" 1>&6
4588
        cat >> confdefs.h <<\EOF
4589
#define HAVE_MEMCPY 1
4590
EOF
4591
 
4592
 
4593
else
4594
  echo "configure: failed program was:" >&5
4595
  cat conftest.$ac_ext >&5
4596
  rm -rf conftest*
4597
  echo "$ac_t""no" 1>&6
4598
 
4599
fi
4600
rm -f conftest*
4601
 
4602
# Some systems only define WNOHANG if _POSIX_SOURCE is defined
4603
# The following merely tests that sys/wait.h can be included
4604
# and if so that WNOHANG is not defined.  The only place I've
4605
# seen this is ISC.
4606
echo $ac_n "checking if WNOHANG requires _POSIX_SOURCE""... $ac_c" 1>&6
4607
echo "configure:4608: checking if WNOHANG requires _POSIX_SOURCE" >&5
4608
if test "$cross_compiling" = yes; then
4609
  case "${host}" in
4610
         *-*-cygwin*) echo "$ac_t""no" 1>&6 ;;
4611
         *) { echo "configure: error: Expect can't be cross compiled" 1>&2; exit 1; } ;;
4612
         esac
4613
 
4614
else
4615
  cat > conftest.$ac_ext <
4616
#line 4617 "configure"
4617
#include "confdefs.h"
4618
 
4619
#include 
4620
main() {
4621
#ifndef WNOHANG
4622
        return 0;
4623
#else
4624
        return 1;
4625
#endif
4626
}
4627
EOF
4628
if { (eval echo configure:4629: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4629
then
4630
  echo "$ac_t""yes" 1>&6
4631
        cat >> confdefs.h <<\EOF
4632
#define WNOHANG_REQUIRES_POSIX_SOURCE 1
4633
EOF
4634
 
4635
 
4636
else
4637
  echo "configure: failed program was:" >&5
4638
  cat conftest.$ac_ext >&5
4639
  rm -fr conftest*
4640
  echo "$ac_t""no" 1>&6
4641
 
4642
fi
4643
rm -fr conftest*
4644
fi
4645
 
4646
 
4647
echo $ac_n "checking if any value exists for WNOHANG""... $ac_c" 1>&6
4648
echo "configure:4649: checking if any value exists for WNOHANG" >&5
4649
rm -rf wnohang
4650
if test "$cross_compiling" = yes; then
4651
  case "${host}" in
4652
         *-*-cygwin*) echo "$ac_t""yes" 1>&6
4653
                        cat >> confdefs.h <<\EOF
4654
#define WNOHANG_BACKUP_VALUE 1
4655
EOF
4656
 ;;
4657
         *) { echo "configure: error: Expect can't be cross compiled" 1>&2; exit 1; } ;;
4658
         esac
4659
 
4660
else
4661
  cat > conftest.$ac_ext <
4662
#line 4663 "configure"
4663
#include "confdefs.h"
4664
 
4665
#include 
4666
#include 
4667
main() {
4668
#ifdef WNOHANG
4669
        FILE *fp = fopen("wnohang","w");
4670
        fprintf(fp,"%d",WNOHANG);
4671
        fclose(fp);
4672
        return 0;
4673
#else
4674
        return 1;
4675
#endif
4676
}
4677
EOF
4678
if { (eval echo configure:4679: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4679
then
4680
  echo "$ac_t""yes" 1>&6
4681
        cat >> confdefs.h <
4682
#define WNOHANG_BACKUP_VALUE `cat wnohang`
4683
EOF
4684
 
4685
        rm -f wnohang
4686
 
4687
else
4688
  echo "configure: failed program was:" >&5
4689
  cat conftest.$ac_ext >&5
4690
  rm -fr conftest*
4691
  echo "$ac_t""no" 1>&6
4692
        cat >> confdefs.h <<\EOF
4693
#define WNOHANG_BACKUP_VALUE 1
4694
EOF
4695
 
4696
 
4697
fi
4698
rm -fr conftest*
4699
fi
4700
 
4701
 
4702
#
4703
# check how signals work
4704
#
4705
 
4706
# Check for the data type of the mask used in select().
4707
# This picks up HP braindamage which defines fd_set and then
4708
# proceeds to ignore it and use int.
4709
# Pattern matching on int could be loosened.
4710
# Can't use ac_header_egrep since that doesn't see prototypes with K&R cpp.
4711
echo $ac_n "checking mask type of select""... $ac_c" 1>&6
4712
echo "configure:4713: checking mask type of select" >&5
4713
if egrep "select\(size_t, int" /usr/include/sys/time.h >/dev/null 2>&1; then
4714
  echo "$ac_t""int" 1>&6
4715
  cat >> confdefs.h <<\EOF
4716
#define SELECT_MASK_TYPE int
4717
EOF
4718
 
4719
else
4720
  echo "$ac_t""none" 1>&6
4721
fi
4722
 
4723
 
4724
# FIXME: check if alarm exists
4725
echo $ac_n "checking if signals need to be re-armed""... $ac_c" 1>&6
4726
echo "configure:4727: checking if signals need to be re-armed" >&5
4727
if test "$cross_compiling" = yes; then
4728
  case "${host}" in
4729
         *-*-cygwin*) echo "$ac_t""no" 1>&6 ;;
4730
         *) echo "configure: warning: Expect can't be cross compiled" 1>&2 ;;
4731
         esac
4732
 
4733
else
4734
  cat > conftest.$ac_ext <
4735
#line 4736 "configure"
4736
#include "confdefs.h"
4737
 
4738
#include 
4739
#define RETSIGTYPE $retsigtype
4740
 
4741
int signal_rearms = 0;
4742
 
4743
RETSIGTYPE
4744
child_sigint_handler(n)
4745
int n;
4746
{
4747
}
4748
 
4749
RETSIGTYPE
4750
parent_sigint_handler(n)
4751
int n;
4752
{
4753
signal_rearms++;
4754
}
4755
 
4756
main()
4757
{
4758
        signal(SIGINT,parent_sigint_handler);
4759
 
4760
        if (0 == fork()) {
4761
                signal(SIGINT,child_sigint_handler);
4762
                kill(getpid(),SIGINT);
4763
                kill(getpid(),SIGINT);
4764
                kill(getppid(),SIGINT);
4765
        } else {
4766
                int status;
4767
 
4768
                wait(&status);
4769
                unlink("core");
4770
                exit(signal_rearms);
4771
        }
4772
}
4773
EOF
4774
if { (eval echo configure:4775: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4775
then
4776
  echo "$ac_t""yes" 1>&6
4777
        cat >> confdefs.h <<\EOF
4778
#define REARM_SIG 1
4779
EOF
4780
 
4781
 
4782
else
4783
  echo "configure: failed program was:" >&5
4784
  cat conftest.$ac_ext >&5
4785
  rm -fr conftest*
4786
  echo "$ac_t""no" 1>&6
4787
 
4788
fi
4789
rm -fr conftest*
4790
fi
4791
 
4792
 
4793
# HPUX7 has trouble with the big cat so split it
4794
# Owen Rees  29Mar93
4795
SEDDEFS="${SEDDEFS}CONFEOF
4796
cat >> conftest.sed <
4797
"
4798
#
4799
 
4800
# There are multiple versions of getpty, alas.
4801
# I don't remember who has the first one, but Convex just added one
4802
# so check for it.  Unfortunately, there is no header so the only
4803
# reasonable way to make sure is to look it we are on a Convex.
4804
echo $ac_n "checking if on Convex""... $ac_c" 1>&6
4805
echo "configure:4806: checking if on Convex" >&5
4806
convex=0
4807
case "${host}" in
4808
  c[12]-*-*)            convex=1;;
4809
esac
4810
 
4811
if test $convex -eq 1 ; then
4812
  echo "$ac_t""yes" 1>&6
4813
  cat >> confdefs.h <<\EOF
4814
#define CONVEX 1
4815
EOF
4816
 
4817
else
4818
  echo "$ac_t""no" 1>&6
4819
fi
4820
 
4821
EXP_LDFLAGS=
4822
 
4823
echo $ac_n "checking if on NeXT""... $ac_c" 1>&6
4824
echo "configure:4825: checking if on NeXT" >&5
4825
if test -r /NextApps -a "$cross_compiling" != "yes" ; then
4826
  echo "$ac_t""yes" 1>&6
4827
  # "-m" flag suppresses complaints about multiple strtod
4828
  EXP_LDFLAGS="$EXP_LDFLAGS -m"
4829
else
4830
  echo "$ac_t""no" 1>&6
4831
fi
4832
 
4833
 
4834
echo $ac_n "checking if on HP""... $ac_c" 1>&6
4835
echo "configure:4836: checking if on HP" >&5
4836
if test "x`(uname) 2>/dev/null`" = xHP-UX; then
4837
  echo "$ac_t""yes" 1>&6
4838
  hp=1
4839
else
4840
  echo "$ac_t""no" 1>&6
4841
  hp=0
4842
fi
4843
 
4844
echo $ac_n "checking sane default stty arguments""... $ac_c" 1>&6
4845
echo "configure:4846: checking sane default stty arguments" >&5
4846
DEFAULT_STTY_ARGS="sane"
4847
 
4848
if test $mach -eq 1 ; then
4849
        DEFAULT_STTY_ARGS="cooked"
4850
fi
4851
 
4852
if test $hp -eq 1 ; then
4853
        DEFAULT_STTY_ARGS="sane kill "
4854
fi
4855
 
4856
echo "$ac_t""$DEFAULT_STTY_ARG" 1>&6
4857
 
4858
# Look for various features to determine what kind of pty
4859
# we have. For some weird reason, ac_compile_check would not
4860
# work, but ac_test_program does.
4861
#
4862
echo $ac_n "checking for HP style pty allocation""... $ac_c" 1>&6
4863
echo "configure:4864: checking for HP style pty allocation" >&5
4864
# following test fails on DECstations and other things that don't grok -c
4865
# but that's ok, since they don't have PTYMs anyway
4866
if test -r /dev/ptym/ptyp0 2>/dev/null -a "$cross_compiling" != "yes" ; then
4867
    echo "$ac_t""yes" 1>&6
4868
    cat >> confdefs.h <<\EOF
4869
#define HAVE_PTYM 1
4870
EOF
4871
 
4872
else
4873
    echo "$ac_t""no" 1>&6
4874
fi
4875
 
4876
echo $ac_n "checking for HP style pty trapping""... $ac_c" 1>&6
4877
echo "configure:4878: checking for HP style pty trapping" >&5
4878
cat > conftest.$ac_ext <
4879
#line 4880 "configure"
4880
#include "confdefs.h"
4881
#include 
4882
EOF
4883
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4884
  egrep "struct.*request_info" >/dev/null 2>&1; then
4885
  rm -rf conftest*
4886
  echo "$ac_t""yes" 1>&6
4887
        cat >> confdefs.h <<\EOF
4888
#define HAVE_PTYTRAP 1
4889
EOF
4890
 
4891
 
4892
else
4893
  rm -rf conftest*
4894
  echo "$ac_t""no" 1>&6
4895
 
4896
fi
4897
rm -f conftest*
4898
 
4899
 
4900
echo $ac_n "checking for AIX new-style pty allocation""... $ac_c" 1>&6
4901
echo "configure:4902: checking for AIX new-style pty allocation" >&5
4902
if test -r /dev/ptc -a -r /dev/pts -a "$cross_compiling" != "yes" ; then
4903
    echo "$ac_t""yes" 1>&6
4904
    cat >> confdefs.h <<\EOF
4905
#define HAVE_PTC_PTS 1
4906
EOF
4907
 
4908
else
4909
    echo "$ac_t""no" 1>&6
4910
fi
4911
 
4912
echo $ac_n "checking for SGI old-style pty allocation""... $ac_c" 1>&6
4913
echo "configure:4914: checking for SGI old-style pty allocation" >&5
4914
if test -r /dev/ptc -a ! -r /dev/pts -a "$cross_compiling" != "yes" ; then
4915
    echo "$ac_t""yes" 1>&6
4916
    cat >> confdefs.h <<\EOF
4917
#define HAVE_PTC 1
4918
EOF
4919
 
4920
else
4921
    echo "$ac_t""no" 1>&6
4922
fi
4923
 
4924
# On SCO OpenServer, two types of ptys are available: SVR4 streams and c-list.
4925
# The library routines to open the SVR4 ptys are broken on certain systems and
4926
# the SCO command to increase the number of ptys only configure c-list ones
4927
# anyway.  So we chose these, which have a special numbering scheme.
4928
#
4929
echo $ac_n "checking for SCO style pty allocation""... $ac_c" 1>&6
4930
echo "configure:4931: checking for SCO style pty allocation" >&5
4931
sco_ptys=""
4932
case "${host}" in
4933
  *-sco3.2v[45]*)       sco_clist_ptys=1 svr4_ptys_broken=1;;
4934
esac
4935
 
4936
if test x"${sco_clist_ptys}" != x"" ; then
4937
  echo "$ac_t""yes" 1>&6
4938
  cat >> confdefs.h <<\EOF
4939
#define HAVE_SCO_CLIST_PTYS 1
4940
EOF
4941
 
4942
else
4943
  echo "$ac_t""no" 1>&6
4944
fi
4945
 
4946
echo $ac_n "checking for SVR4 style pty allocation""... $ac_c" 1>&6
4947
echo "configure:4948: checking for SVR4 style pty allocation" >&5
4948
if test -r /dev/ptmx -a "x$svr4_ptys_broken" = x -a "$cross_compiling" != "yes" ; then
4949
  echo "$ac_t""yes" 1>&6
4950
  cat >> confdefs.h <<\EOF
4951
#define HAVE_PTMX 1
4952
EOF
4953
 
4954
  # aargg. Some systems need libpt.a to use /dev/ptmx
4955
  echo $ac_n "checking for ptsname""... $ac_c" 1>&6
4956
echo "configure:4957: checking for ptsname" >&5
4957
if eval "test \"`echo '$''{'ac_cv_func_ptsname'+set}'`\" = set"; then
4958
  echo $ac_n "(cached) $ac_c" 1>&6
4959
else
4960
  cat > conftest.$ac_ext <
4961
#line 4962 "configure"
4962
#include "confdefs.h"
4963
/* System header to define __stub macros and hopefully few prototypes,
4964
    which can conflict with char ptsname(); below.  */
4965
#include 
4966
/* Override any gcc2 internal prototype to avoid an error.  */
4967
/* We use char because int might match the return type of a gcc2
4968
    builtin and then its argument prototype would still apply.  */
4969
char ptsname();
4970
 
4971
int main() {
4972
 
4973
/* The GNU C library defines this for functions which it implements
4974
    to always fail with ENOSYS.  Some functions are actually named
4975
    something starting with __ and the normal name is an alias.  */
4976
#if defined (__stub_ptsname) || defined (__stub___ptsname)
4977
choke me
4978
#else
4979
ptsname();
4980
#endif
4981
 
4982
; return 0; }
4983
EOF
4984
if { (eval echo configure:4985: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4985
  rm -rf conftest*
4986
  eval "ac_cv_func_ptsname=yes"
4987
else
4988
  echo "configure: failed program was:" >&5
4989
  cat conftest.$ac_ext >&5
4990
  rm -rf conftest*
4991
  eval "ac_cv_func_ptsname=no"
4992
fi
4993
rm -f conftest*
4994
fi
4995
 
4996
if eval "test \"`echo '$ac_cv_func_'ptsname`\" = yes"; then
4997
  echo "$ac_t""yes" 1>&6
4998
  :
4999
else
5000
  echo "$ac_t""no" 1>&6
5001
LIBS="${LIBS} -lpt"
5002
fi
5003
 
5004
  # I've never seen Tcl or Tk include -lpt so don't bother with explicit test
5005
  echo $ac_n "checking for ptsname""... $ac_c" 1>&6
5006
echo "configure:5007: checking for ptsname" >&5
5007
if eval "test \"`echo '$''{'ac_cv_func_ptsname'+set}'`\" = set"; then
5008
  echo $ac_n "(cached) $ac_c" 1>&6
5009
else
5010
  cat > conftest.$ac_ext <
5011
#line 5012 "configure"
5012
#include "confdefs.h"
5013
/* System header to define __stub macros and hopefully few prototypes,
5014
    which can conflict with char ptsname(); below.  */
5015
#include 
5016
/* Override any gcc2 internal prototype to avoid an error.  */
5017
/* We use char because int might match the return type of a gcc2
5018
    builtin and then its argument prototype would still apply.  */
5019
char ptsname();
5020
 
5021
int main() {
5022
 
5023
/* The GNU C library defines this for functions which it implements
5024
    to always fail with ENOSYS.  Some functions are actually named
5025
    something starting with __ and the normal name is an alias.  */
5026
#if defined (__stub_ptsname) || defined (__stub___ptsname)
5027
choke me
5028
#else
5029
ptsname();
5030
#endif
5031
 
5032
; return 0; }
5033
EOF
5034
if { (eval echo configure:5035: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5035
  rm -rf conftest*
5036
  eval "ac_cv_func_ptsname=yes"
5037
else
5038
  echo "configure: failed program was:" >&5
5039
  cat conftest.$ac_ext >&5
5040
  rm -rf conftest*
5041
  eval "ac_cv_func_ptsname=no"
5042
fi
5043
rm -f conftest*
5044
fi
5045
 
5046
if eval "test \"`echo '$ac_cv_func_'ptsname`\" = yes"; then
5047
  echo "$ac_t""yes" 1>&6
5048
  :
5049
else
5050
  echo "$ac_t""no" 1>&6
5051
EXP_AND_TCL_LIBS="${EXP_AND_TCL_LIBS} -lpt"
5052
fi
5053
 
5054
  echo $ac_n "checking for ptsname""... $ac_c" 1>&6
5055
echo "configure:5056: checking for ptsname" >&5
5056
if eval "test \"`echo '$''{'ac_cv_func_ptsname'+set}'`\" = set"; then
5057
  echo $ac_n "(cached) $ac_c" 1>&6
5058
else
5059
  cat > conftest.$ac_ext <
5060
#line 5061 "configure"
5061
#include "confdefs.h"
5062
/* System header to define __stub macros and hopefully few prototypes,
5063
    which can conflict with char ptsname(); below.  */
5064
#include 
5065
/* Override any gcc2 internal prototype to avoid an error.  */
5066
/* We use char because int might match the return type of a gcc2
5067
    builtin and then its argument prototype would still apply.  */
5068
char ptsname();
5069
 
5070
int main() {
5071
 
5072
/* The GNU C library defines this for functions which it implements
5073
    to always fail with ENOSYS.  Some functions are actually named
5074
    something starting with __ and the normal name is an alias.  */
5075
#if defined (__stub_ptsname) || defined (__stub___ptsname)
5076
choke me
5077
#else
5078
ptsname();
5079
#endif
5080
 
5081
; return 0; }
5082
EOF
5083
if { (eval echo configure:5084: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5084
  rm -rf conftest*
5085
  eval "ac_cv_func_ptsname=yes"
5086
else
5087
  echo "configure: failed program was:" >&5
5088
  cat conftest.$ac_ext >&5
5089
  rm -rf conftest*
5090
  eval "ac_cv_func_ptsname=no"
5091
fi
5092
rm -f conftest*
5093
fi
5094
 
5095
if eval "test \"`echo '$ac_cv_func_'ptsname`\" = yes"; then
5096
  echo "$ac_t""yes" 1>&6
5097
  :
5098
else
5099
  echo "$ac_t""no" 1>&6
5100
EXP_AND_TK_LIBS="${EXP_AND_TK_LIBS} -lpt"
5101
fi
5102
 
5103
  # CYGNUS LOCAL: IA-64
5104
  # On some systems (e.g., IA-64 Linux), we need to define _XOPEN_SOURCE
5105
  # in order to get a declaration for ptsname.  It is safe to simply
5106
  # define that whenever we are using ptsname.
5107
  echo $ac_n "checking for NSIG definition with _XOPEN_SOURCE""... $ac_c" 1>&6
5108
echo "configure:5109: checking for NSIG definition with _XOPEN_SOURCE" >&5
5109
  cat > conftest.$ac_ext <
5110
#line 5111 "configure"
5111
#include "confdefs.h"
5112
 
5113
/* _XOPEN_SOURCE can remove NSIG on UnixWare or OSF/1. */
5114
#define _XOPEN_SOURCE
5115
#include 
5116
char junk[NSIG];
5117
int main() {
5118
 
5119
; return 0; }
5120
EOF
5121
if { (eval echo configure:5122: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5122
  rm -rf conftest*
5123
  cat >> confdefs.h <<\EOF
5124
#define _XOPEN_SOURCE 1
5125
EOF
5126
 
5127
        echo "$ac_t""yes" 1>&6
5128
 
5129
else
5130
  echo "configure: failed program was:" >&5
5131
  cat conftest.$ac_ext >&5
5132
  rm -rf conftest*
5133
  echo "$ac_t""no" 1>&6
5134
 
5135
fi
5136
rm -f conftest*
5137
  # END CYGNUS LOCAL
5138
else
5139
  echo "$ac_t""no" 1>&6
5140
fi
5141
 
5142
# In OSF/1 case, SVR4 are somewhat different.
5143
# Gregory Depp  17Aug93
5144
echo $ac_n "checking for OSF/1 style pty allocation""... $ac_c" 1>&6
5145
echo "configure:5146: checking for OSF/1 style pty allocation" >&5
5146
if test -r /dev/ptmx_bsd -a "$cross_compiling" != "yes" ; then
5147
    cat >> confdefs.h <<\EOF
5148
#define HAVE_PTMX_BSD 1
5149
EOF
5150
 
5151
    echo "$ac_t""yes" 1>&6
5152
else
5153
    echo "$ac_t""no" 1>&6
5154
fi
5155
 
5156
# Set the pty handling for Cygwin
5157
case "${host}" in
5158
  *-*-cygwin*) cat >> confdefs.h <<\EOF
5159
#define HAVE_PTMX 1
5160
EOF
5161
 ;;
5162
  *) ;;
5163
esac
5164
 
5165
tcgetattr=0
5166
tcsetattr=0
5167
echo $ac_n "checking for tcgetattr""... $ac_c" 1>&6
5168
echo "configure:5169: checking for tcgetattr" >&5
5169
if eval "test \"`echo '$''{'ac_cv_func_tcgetattr'+set}'`\" = set"; then
5170
  echo $ac_n "(cached) $ac_c" 1>&6
5171
else
5172
  cat > conftest.$ac_ext <
5173
#line 5174 "configure"
5174
#include "confdefs.h"
5175
/* System header to define __stub macros and hopefully few prototypes,
5176
    which can conflict with char tcgetattr(); below.  */
5177
#include 
5178
/* Override any gcc2 internal prototype to avoid an error.  */
5179
/* We use char because int might match the return type of a gcc2
5180
    builtin and then its argument prototype would still apply.  */
5181
char tcgetattr();
5182
 
5183
int main() {
5184
 
5185
/* The GNU C library defines this for functions which it implements
5186
    to always fail with ENOSYS.  Some functions are actually named
5187
    something starting with __ and the normal name is an alias.  */
5188
#if defined (__stub_tcgetattr) || defined (__stub___tcgetattr)
5189
choke me
5190
#else
5191
tcgetattr();
5192
#endif
5193
 
5194
; return 0; }
5195
EOF
5196
if { (eval echo configure:5197: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5197
  rm -rf conftest*
5198
  eval "ac_cv_func_tcgetattr=yes"
5199
else
5200
  echo "configure: failed program was:" >&5
5201
  cat conftest.$ac_ext >&5
5202
  rm -rf conftest*
5203
  eval "ac_cv_func_tcgetattr=no"
5204
fi
5205
rm -f conftest*
5206
fi
5207
 
5208
if eval "test \"`echo '$ac_cv_func_'tcgetattr`\" = yes"; then
5209
  echo "$ac_t""yes" 1>&6
5210
  tcgetattr=1
5211
else
5212
  echo "$ac_t""no" 1>&6
5213
fi
5214
 
5215
echo $ac_n "checking for tcsetattr""... $ac_c" 1>&6
5216
echo "configure:5217: checking for tcsetattr" >&5
5217
if eval "test \"`echo '$''{'ac_cv_func_tcsetattr'+set}'`\" = set"; then
5218
  echo $ac_n "(cached) $ac_c" 1>&6
5219
else
5220
  cat > conftest.$ac_ext <
5221
#line 5222 "configure"
5222
#include "confdefs.h"
5223
/* System header to define __stub macros and hopefully few prototypes,
5224
    which can conflict with char tcsetattr(); below.  */
5225
#include 
5226
/* Override any gcc2 internal prototype to avoid an error.  */
5227
/* We use char because int might match the return type of a gcc2
5228
    builtin and then its argument prototype would still apply.  */
5229
char tcsetattr();
5230
 
5231
int main() {
5232
 
5233
/* The GNU C library defines this for functions which it implements
5234
    to always fail with ENOSYS.  Some functions are actually named
5235
    something starting with __ and the normal name is an alias.  */
5236
#if defined (__stub_tcsetattr) || defined (__stub___tcsetattr)
5237
choke me
5238
#else
5239
tcsetattr();
5240
#endif
5241
 
5242
; return 0; }
5243
EOF
5244
if { (eval echo configure:5245: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5245
  rm -rf conftest*
5246
  eval "ac_cv_func_tcsetattr=yes"
5247
else
5248
  echo "configure: failed program was:" >&5
5249
  cat conftest.$ac_ext >&5
5250
  rm -rf conftest*
5251
  eval "ac_cv_func_tcsetattr=no"
5252
fi
5253
rm -f conftest*
5254
fi
5255
 
5256
if eval "test \"`echo '$ac_cv_func_'tcsetattr`\" = yes"; then
5257
  echo "$ac_t""yes" 1>&6
5258
  tcsetattr=1
5259
else
5260
  echo "$ac_t""no" 1>&6
5261
fi
5262
 
5263
if test $tcgetattr -eq 1 -a $tcsetattr -eq 1 ; then
5264
    cat >> confdefs.h <<\EOF
5265
#define HAVE_TCSETATTR 1
5266
EOF
5267
 
5268
    cat >> confdefs.h <<\EOF
5269
#define POSIX 1
5270
EOF
5271
 
5272
fi
5273
 
5274
# first check for the pure bsd
5275
echo $ac_n "checking for struct sgttyb""... $ac_c" 1>&6
5276
echo "configure:5277: checking for struct sgttyb" >&5
5277
if test "$cross_compiling" = yes; then
5278
  case "${host}" in
5279
         *-*-cygwin*) echo "$ac_t""no" 1>&6 ;;
5280
         *) { echo "configure: error: Expect can't be cross compiled" 1>&2; exit 1; } ;;
5281
         esac
5282
 
5283
else
5284
  cat > conftest.$ac_ext <
5285
#line 5286 "configure"
5286
#include "confdefs.h"
5287
 
5288
#include 
5289
main()
5290
{
5291
  struct sgttyb tmp;
5292
  exit(0);
5293
}
5294
EOF
5295
if { (eval echo configure:5296: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5296
then
5297
  echo "$ac_t""yes" 1>&6
5298
        cat >> confdefs.h <<\EOF
5299
#define HAVE_SGTTYB 1
5300
EOF
5301
 
5302
        PTY_TYPE=sgttyb
5303
 
5304
else
5305
  echo "configure: failed program was:" >&5
5306
  cat conftest.$ac_ext >&5
5307
  rm -fr conftest*
5308
  echo "$ac_t""no" 1>&6
5309
 
5310
fi
5311
rm -fr conftest*
5312
fi
5313
 
5314
 
5315
# mach systems have include files for unimplemented features
5316
# so avoid doing following test on those systems
5317
if test $mach -eq 0 ; then
5318
 
5319
  # next check for the older style ttys
5320
  # note that if we detect termio.h (only), we still set PTY_TYPE=termios
5321
  # since that just controls which of pty_XXXX.c file is use and
5322
  # pty_termios.c is set up to handle pty_termio.
5323
  echo $ac_n "checking for struct termio""... $ac_c" 1>&6
5324
echo "configure:5325: checking for struct termio" >&5
5325
  if test "$cross_compiling" = yes; then
5326
  case "${host}" in
5327
         *-*-cygwin*) echo "$ac_t""no" 1>&6 ;;
5328
         *) { echo "configure: error: Expect can't be cross compiled" 1>&2; exit 1; } ;;
5329
         esac
5330
 
5331
else
5332
  cat > conftest.$ac_ext <
5333
#line 5334 "configure"
5334
#include "confdefs.h"
5335
#include 
5336
  main()
5337
  {
5338
    struct termio tmp;
5339
    exit(0);
5340
  }
5341
EOF
5342
if { (eval echo configure:5343: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5343
then
5344
  cat >> confdefs.h <<\EOF
5345
#define HAVE_TERMIO 1
5346
EOF
5347
 
5348
        PTY_TYPE=termios
5349
        echo "$ac_t""yes" 1>&6
5350
 
5351
else
5352
  echo "configure: failed program was:" >&5
5353
  cat conftest.$ac_ext >&5
5354
  rm -fr conftest*
5355
  echo "$ac_t""no" 1>&6
5356
 
5357
fi
5358
rm -fr conftest*
5359
fi
5360
 
5361
 
5362
  # now check for the new style ttys (not yet posix)
5363
  echo $ac_n "checking for struct termios""... $ac_c" 1>&6
5364
echo "configure:5365: checking for struct termios" >&5
5365
  if test "$cross_compiling" = yes; then
5366
  case "${host}" in
5367
         *-*-cygwin*) cat >> confdefs.h <<\EOF
5368
#define HAVE_TERMIOS 1
5369
EOF
5370
 
5371
                        PTY_TYPE=termios
5372
                        echo "$ac_t""yes" 1>&6 ;;
5373
         *) { echo "configure: error: Expect can't be cross compiled" 1>&2; exit 1; } ;;
5374
         esac
5375
 
5376
else
5377
  cat > conftest.$ac_ext <
5378
#line 5379 "configure"
5379
#include "confdefs.h"
5380
 
5381
#  ifdef HAVE_INTTYPES_H
5382
#  include 
5383
#  endif
5384
#  include 
5385
  main()
5386
  {
5387
    struct termios tmp;
5388
    exit(0);
5389
  }
5390
EOF
5391
if { (eval echo configure:5392: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5392
then
5393
  cat >> confdefs.h <<\EOF
5394
#define HAVE_TERMIOS 1
5395
EOF
5396
 
5397
        PTY_TYPE=termios
5398
        echo "$ac_t""yes" 1>&6
5399
 
5400
else
5401
  echo "configure: failed program was:" >&5
5402
  cat conftest.$ac_ext >&5
5403
  rm -fr conftest*
5404
  echo "$ac_t""no" 1>&6
5405
 
5406
fi
5407
rm -fr conftest*
5408
fi
5409
 
5410
fi
5411
 
5412
echo $ac_n "checking if TCGETS or TCGETA in termios.h""... $ac_c" 1>&6
5413
echo "configure:5414: checking if TCGETS or TCGETA in termios.h" >&5
5414
if test "$cross_compiling" = yes; then
5415
  case "${host}" in
5416
         *-*-cygwin*) cat >> confdefs.h <<\EOF
5417
#define HAVE_TCGETS_OR_TCGETA_IN_TERMIOS_H 1
5418
EOF
5419
 
5420
                        echo "$ac_t""yes" 1>&6 ;;
5421
         *) { echo "configure: error: Expect can't be cross compiled" 1>&2; exit 1; } ;;
5422
         esac
5423
 
5424
else
5425
  cat > conftest.$ac_ext <
5426
#line 5427 "configure"
5427
#include "confdefs.h"
5428
 
5429
/* including termios.h on Solaris 5.6 fails unless inttypes.h included */
5430
#ifdef HAVE_INTTYPES_H
5431
#include 
5432
#endif
5433
#include 
5434
main() {
5435
#if defined(TCGETS) || defined(TCGETA)
5436
        return 0;
5437
#else
5438
        return 1;
5439
#endif
5440
}
5441
EOF
5442
if { (eval echo configure:5443: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5443
then
5444
  cat >> confdefs.h <<\EOF
5445
#define HAVE_TCGETS_OR_TCGETA_IN_TERMIOS_H 1
5446
EOF
5447
 
5448
        echo "$ac_t""yes" 1>&6
5449
 
5450
else
5451
  echo "configure: failed program was:" >&5
5452
  cat conftest.$ac_ext >&5
5453
  rm -fr conftest*
5454
  echo "$ac_t""no" 1>&6
5455
 
5456
fi
5457
rm -fr conftest*
5458
fi
5459
 
5460
 
5461
echo $ac_n "checking if TIOCGWINSZ in termios.h""... $ac_c" 1>&6
5462
echo "configure:5463: checking if TIOCGWINSZ in termios.h" >&5
5463
if test "$cross_compiling" = yes; then
5464
  case "${host}" in
5465
         *-*-cygwin*) cat >> confdefs.h <<\EOF
5466
#define HAVE_TIOCGWINSZ_IN_TERMIOS_H 1
5467
EOF
5468
 
5469
                        echo "$ac_t""yes" 1>&6 ;;
5470
         *) { echo "configure: error: Expect can't be cross compiled" 1>&2; exit 1; } ;;
5471
         esac
5472
 
5473
else
5474
  cat > conftest.$ac_ext <
5475
#line 5476 "configure"
5476
#include "confdefs.h"
5477
 
5478
/* including termios.h on Solaris 5.6 fails unless inttypes.h included */
5479
#ifdef HAVE_INTTYPES_H
5480
#include 
5481
#endif
5482
#include 
5483
main() {
5484
#ifdef TIOCGWINSZ
5485
        return 0;
5486
#else
5487
        return 1;
5488
#endif
5489
}
5490
EOF
5491
if { (eval echo configure:5492: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5492
then
5493
  cat >> confdefs.h <<\EOF
5494
#define HAVE_TIOCGWINSZ_IN_TERMIOS_H 1
5495
EOF
5496
 
5497
        echo "$ac_t""yes" 1>&6
5498
 
5499
else
5500
  echo "configure: failed program was:" >&5
5501
  cat conftest.$ac_ext >&5
5502
  rm -fr conftest*
5503
  echo "$ac_t""no" 1>&6
5504
 
5505
fi
5506
rm -fr conftest*
5507
fi
5508
 
5509
 
5510
# finally check for Cray style ttys
5511
echo $ac_n "checking for Cray-style ptys""... $ac_c" 1>&6
5512
echo "configure:5513: checking for Cray-style ptys" >&5
5513
SETUID=":"
5514
if test "$cross_compiling" = yes; then
5515
  case "${host}" in
5516
         *-*-cygwin*) echo "$ac_t""no" 1>&6 ;;
5517
         *) { echo "configure: error: Expect can't be cross compiled" 1>&2; exit 1; } ;;
5518
         esac
5519
 
5520
else
5521
  cat > conftest.$ac_ext <
5522
#line 5523 "configure"
5523
#include "confdefs.h"
5524
 
5525
main(){
5526
#ifdef CRAY
5527
        return 0;
5528
#else
5529
        return 1;
5530
#endif
5531
}
5532
 
5533
EOF
5534
if { (eval echo configure:5535: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5535
then
5536
  PTY_TYPE=unicos
5537
        SETUID="chmod u+s"
5538
        echo "$ac_t""yes" 1>&6
5539
 
5540
else
5541
  echo "configure: failed program was:" >&5
5542
  cat conftest.$ac_ext >&5
5543
  rm -fr conftest*
5544
  echo "$ac_t""no" 1>&6
5545
 
5546
fi
5547
rm -fr conftest*
5548
fi
5549
 
5550
 
5551
#
5552
# Check for select and/or poll. If both exist, we prefer select.
5553
# if neither exists, define SIMPLE_EVENT.
5554
#
5555
select=0
5556
poll=0
5557
unset ac_cv_func_select
5558
echo $ac_n "checking for select""... $ac_c" 1>&6
5559
echo "configure:5560: checking for select" >&5
5560
if eval "test \"`echo '$''{'ac_cv_func_select'+set}'`\" = set"; then
5561
  echo $ac_n "(cached) $ac_c" 1>&6
5562
else
5563
  cat > conftest.$ac_ext <
5564
#line 5565 "configure"
5565
#include "confdefs.h"
5566
/* System header to define __stub macros and hopefully few prototypes,
5567
    which can conflict with char select(); below.  */
5568
#include 
5569
/* Override any gcc2 internal prototype to avoid an error.  */
5570
/* We use char because int might match the return type of a gcc2
5571
    builtin and then its argument prototype would still apply.  */
5572
char select();
5573
 
5574
int main() {
5575
 
5576
/* The GNU C library defines this for functions which it implements
5577
    to always fail with ENOSYS.  Some functions are actually named
5578
    something starting with __ and the normal name is an alias.  */
5579
#if defined (__stub_select) || defined (__stub___select)
5580
choke me
5581
#else
5582
select();
5583
#endif
5584
 
5585
; return 0; }
5586
EOF
5587
if { (eval echo configure:5588: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5588
  rm -rf conftest*
5589
  eval "ac_cv_func_select=yes"
5590
else
5591
  echo "configure: failed program was:" >&5
5592
  cat conftest.$ac_ext >&5
5593
  rm -rf conftest*
5594
  eval "ac_cv_func_select=no"
5595
fi
5596
rm -f conftest*
5597
fi
5598
 
5599
if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
5600
  echo "$ac_t""yes" 1>&6
5601
  select=1
5602
else
5603
  echo "$ac_t""no" 1>&6
5604
fi
5605
 
5606
echo $ac_n "checking for poll""... $ac_c" 1>&6
5607
echo "configure:5608: checking for poll" >&5
5608
if eval "test \"`echo '$''{'ac_cv_func_poll'+set}'`\" = set"; then
5609
  echo $ac_n "(cached) $ac_c" 1>&6
5610
else
5611
  cat > conftest.$ac_ext <
5612
#line 5613 "configure"
5613
#include "confdefs.h"
5614
/* System header to define __stub macros and hopefully few prototypes,
5615
    which can conflict with char poll(); below.  */
5616
#include 
5617
/* Override any gcc2 internal prototype to avoid an error.  */
5618
/* We use char because int might match the return type of a gcc2
5619
    builtin and then its argument prototype would still apply.  */
5620
char poll();
5621
 
5622
int main() {
5623
 
5624
/* The GNU C library defines this for functions which it implements
5625
    to always fail with ENOSYS.  Some functions are actually named
5626
    something starting with __ and the normal name is an alias.  */
5627
#if defined (__stub_poll) || defined (__stub___poll)
5628
choke me
5629
#else
5630
poll();
5631
#endif
5632
 
5633
; return 0; }
5634
EOF
5635
if { (eval echo configure:5636: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5636
  rm -rf conftest*
5637
  eval "ac_cv_func_poll=yes"
5638
else
5639
  echo "configure: failed program was:" >&5
5640
  cat conftest.$ac_ext >&5
5641
  rm -rf conftest*
5642
  eval "ac_cv_func_poll=no"
5643
fi
5644
rm -f conftest*
5645
fi
5646
 
5647
if eval "test \"`echo '$ac_cv_func_'poll`\" = yes"; then
5648
  echo "$ac_t""yes" 1>&6
5649
  poll=1
5650
else
5651
  echo "$ac_t""no" 1>&6
5652
fi
5653
 
5654
echo $ac_n "checking event handling""... $ac_c" 1>&6
5655
echo "configure:5656: checking event handling" >&5
5656
if test $select -eq 1 ; then
5657
  EVENT_TYPE=select
5658
  EVENT_ABLE=event
5659
  echo "$ac_t""via select" 1>&6
5660
elif test $poll -eq 1 ; then
5661
  EVENT_TYPE=poll
5662
  EVENT_ABLE=event
5663
  echo "$ac_t""via poll" 1>&6
5664
else
5665
  EVENT_TYPE=simple
5666
  EVENT_ABLE=noevent
5667
  echo "$ac_t""none" 1>&6
5668
  cat >> confdefs.h <<\EOF
5669
#define SIMPLE_EVENT 1
5670
EOF
5671
 
5672
fi
5673
 
5674
for ac_func in _getpty
5675
do
5676
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5677
echo "configure:5678: checking for $ac_func" >&5
5678
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5679
  echo $ac_n "(cached) $ac_c" 1>&6
5680
else
5681
  cat > conftest.$ac_ext <
5682
#line 5683 "configure"
5683
#include "confdefs.h"
5684
/* System header to define __stub macros and hopefully few prototypes,
5685
    which can conflict with char $ac_func(); below.  */
5686
#include 
5687
/* Override any gcc2 internal prototype to avoid an error.  */
5688
/* We use char because int might match the return type of a gcc2
5689
    builtin and then its argument prototype would still apply.  */
5690
char $ac_func();
5691
 
5692
int main() {
5693
 
5694
/* The GNU C library defines this for functions which it implements
5695
    to always fail with ENOSYS.  Some functions are actually named
5696
    something starting with __ and the normal name is an alias.  */
5697
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5698
choke me
5699
#else
5700
$ac_func();
5701
#endif
5702
 
5703
; return 0; }
5704
EOF
5705
if { (eval echo configure:5706: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5706
  rm -rf conftest*
5707
  eval "ac_cv_func_$ac_func=yes"
5708
else
5709
  echo "configure: failed program was:" >&5
5710
  cat conftest.$ac_ext >&5
5711
  rm -rf conftest*
5712
  eval "ac_cv_func_$ac_func=no"
5713
fi
5714
rm -f conftest*
5715
fi
5716
 
5717
if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5718
  echo "$ac_t""yes" 1>&6
5719
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5720
  cat >> confdefs.h <
5721
#define $ac_tr_func 1
5722
EOF
5723
 
5724
else
5725
  echo "$ac_t""no" 1>&6
5726
fi
5727
done
5728
 
5729
for ac_func in getpty
5730
do
5731
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5732
echo "configure:5733: checking for $ac_func" >&5
5733
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5734
  echo $ac_n "(cached) $ac_c" 1>&6
5735
else
5736
  cat > conftest.$ac_ext <
5737
#line 5738 "configure"
5738
#include "confdefs.h"
5739
/* System header to define __stub macros and hopefully few prototypes,
5740
    which can conflict with char $ac_func(); below.  */
5741
#include 
5742
/* Override any gcc2 internal prototype to avoid an error.  */
5743
/* We use char because int might match the return type of a gcc2
5744
    builtin and then its argument prototype would still apply.  */
5745
char $ac_func();
5746
 
5747
int main() {
5748
 
5749
/* The GNU C library defines this for functions which it implements
5750
    to always fail with ENOSYS.  Some functions are actually named
5751
    something starting with __ and the normal name is an alias.  */
5752
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5753
choke me
5754
#else
5755
$ac_func();
5756
#endif
5757
 
5758
; return 0; }
5759
EOF
5760
if { (eval echo configure:5761: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5761
  rm -rf conftest*
5762
  eval "ac_cv_func_$ac_func=yes"
5763
else
5764
  echo "configure: failed program was:" >&5
5765
  cat conftest.$ac_ext >&5
5766
  rm -rf conftest*
5767
  eval "ac_cv_func_$ac_func=no"
5768
fi
5769
rm -f conftest*
5770
fi
5771
 
5772
if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5773
  echo "$ac_t""yes" 1>&6
5774
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5775
  cat >> confdefs.h <
5776
#define $ac_tr_func 1
5777
EOF
5778
 
5779
else
5780
  echo "$ac_t""no" 1>&6
5781
fi
5782
done
5783
 
5784
 
5785
#
5786
# check for timezones
5787
#
5788
echo $ac_n "checking for SV-style timezone""... $ac_c" 1>&6
5789
echo "configure:5790: checking for SV-style timezone" >&5
5790
if test "$cross_compiling" = yes; then
5791
  case "${host}" in
5792
         *-*-cygwin*) echo "$ac_t""no" 1>&6 ;;
5793
         *) { echo "configure: error: Expect can't be cross compiled" 1>&2; exit 1; } ;;
5794
         esac
5795
 
5796
else
5797
  cat > conftest.$ac_ext <
5798
#line 5799 "configure"
5799
#include "confdefs.h"
5800
 
5801
extern char *tzname[2];
5802
extern int daylight;
5803
main()
5804
{
5805
  int *x = &daylight;
5806
  char **y = tzname;
5807
 
5808
  exit(0);
5809
}
5810
EOF
5811
if { (eval echo configure:5812: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5812
then
5813
  cat >> confdefs.h <<\EOF
5814
#define HAVE_SV_TIMEZONE 1
5815
EOF
5816
 
5817
        echo "$ac_t""yes" 1>&6
5818
else
5819
  echo "configure: failed program was:" >&5
5820
  cat conftest.$ac_ext >&5
5821
  rm -fr conftest*
5822
  echo "$ac_t""no" 1>&6
5823
 
5824
fi
5825
rm -fr conftest*
5826
fi
5827
 
5828
 
5829
# only look for Tk stuff if we have X11 and user doesn't say not to
5830
# Check whether --with-x or --without-x was given.
5831
if test "${with_x+set}" = set; then
5832
  withval="$with_x"
5833
  :
5834
else
5835
  with_x=yes
5836
fi
5837
 
5838
if test "$with_x" = "no"; then
5839
   no_tk=true
5840
else
5841
 
5842
#
5843
# Ok, lets find the tk source trees so we can use the headers
5844
# If the directory (presumably symlink) named "tk" exists, use that one
5845
# in preference to any others.  Same logic is used when choosing library
5846
# and again with Tcl. The search order is the best place to look first, then in
5847
# decreasing significance. The loop breaks if the trigger file is found.
5848
# Note the gross little conversion here of srcdir by cd'ing to the found
5849
# directory. This converts the path from a relative to an absolute, so
5850
# recursive cache variables for the path will work right. We check all
5851
# the possible paths in one loop rather than many seperate loops to speed
5852
# things up.
5853
# the alternative search directory is involked by --with-tkinclude
5854
#
5855
#no_tk=true
5856
echo $ac_n "checking for Tk private headers""... $ac_c" 1>&6
5857
echo "configure:5858: checking for Tk private headers" >&5
5858
# Check whether --with-tkinclude or --without-tkinclude was given.
5859
if test "${with_tkinclude+set}" = set; then
5860
  withval="$with_tkinclude"
5861
  with_tkinclude=${withval}
5862
fi
5863
 
5864
if eval "test \"`echo '$''{'ac_cv_c_tkh'+set}'`\" = set"; then
5865
  echo $ac_n "(cached) $ac_c" 1>&6
5866
else
5867
 
5868
# first check to see if --with-tkinclude was specified
5869
if test x"${with_tkinclude}" != x ; then
5870
  if test -f ${with_tkinclude}/tk.h ; then
5871
    ac_cv_c_tkh=`(cd ${with_tkinclude}; pwd)`
5872
  elif test -f ${with_tkinclude}/generic/tk.h ; then
5873
    ac_cv_c_tkh=`(cd ${with_tkinclude}/generic; pwd)`
5874
  else
5875
    { echo "configure: error: ${with_tkinclude} directory doesn't contain private headers" 1>&2; exit 1; }
5876
  fi
5877
fi
5878
 
5879
# next check if it came with Tk configuration file
5880
if test x"${ac_cv_c_tkconfig}" != x ; then
5881
  if test -f $ac_cv_c_tkconfig/../generic/tk.h ; then
5882
    ac_cv_c_tkh=`(cd $ac_cv_c_tkconfig/../generic; pwd)`
5883
  fi
5884
fi
5885
 
5886
# next check in private source directory
5887
#
5888
# since ls returns lowest version numbers first, reverse its output
5889
 
5890
if test x"${ac_cv_c_tkh}" = x ; then
5891
  for i in \
5892
                ${srcdir}/../tk \
5893
                `ls -dr ${srcdir}/../tk[4-9].[0-9] 2>/dev/null` \
5894
                ${srcdir}/../../tk \
5895
                `ls -dr ${srcdir}/../../tk[4-9].[0-9] 2>/dev/null` \
5896
                ${srcdir}/../../../tk \
5897
                `ls -dr ${srcdir}/../../../tk[4-9].[0-9] 2>/dev/null ` ; do
5898
    if test -f $i/generic/tk.h ; then
5899
      ac_cv_c_tkh=`(cd $i/generic; pwd)`
5900
      break
5901
    fi
5902
  done
5903
fi
5904
 
5905
# finally check in a few common install locations
5906
#
5907
# since ls returns lowest version numbers first, reverse its output
5908
 
5909
if test x"${ac_cv_c_tkh}" = x ; then
5910
  for i in \
5911
                `ls -dr /usr/local/src/tk[4-9].[0-9] 2>/dev/null` \
5912
                `ls -dr /usr/local/lib/tk[4-9].[0-9] 2>/dev/null` \
5913
                /usr/local/src/tk \
5914
                /usr/local/lib/tk \
5915
                ${prefix}/include ; do
5916
    if test -f $i/generic/tk.h ; then
5917
      ac_cv_c_tkh=`(cd $i/generic; pwd)`
5918
      break
5919
    fi
5920
  done
5921
fi
5922
 
5923
# see if one is installed
5924
if test x"${ac_cv_c_tkh}" = x ; then
5925
   ac_safe=`echo "tk.h" | sed 'y%./+-%__p_%'`
5926
echo $ac_n "checking for tk.h""... $ac_c" 1>&6
5927
echo "configure:5928: checking for tk.h" >&5
5928
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5929
  echo $ac_n "(cached) $ac_c" 1>&6
5930
else
5931
  cat > conftest.$ac_ext <
5932
#line 5933 "configure"
5933
#include "confdefs.h"
5934
#include 
5935
EOF
5936
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5937
{ (eval echo configure:5938: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5938
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5939
if test -z "$ac_err"; then
5940
  rm -rf conftest*
5941
  eval "ac_cv_header_$ac_safe=yes"
5942
else
5943
  echo "$ac_err" >&5
5944
  echo "configure: failed program was:" >&5
5945
  cat conftest.$ac_ext >&5
5946
  rm -rf conftest*
5947
  eval "ac_cv_header_$ac_safe=no"
5948
fi
5949
rm -f conftest*
5950
fi
5951
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5952
  echo "$ac_t""yes" 1>&6
5953
  ac_cv_c_tkh=installed
5954
else
5955
  echo "$ac_t""no" 1>&6
5956
ac_cv_c_tkh=""
5957
fi
5958
 
5959
fi
5960
 
5961
fi
5962
 
5963
if test x"${ac_cv_c_tkh}" != x ; then
5964
#  no_tk=""
5965
  if test x"${ac_cv_c_tkh}" = x"installed" ; then
5966
    echo "$ac_t""is installed" 1>&6
5967
    TKHDIRDASHI=""
5968
  else
5969
    echo "$ac_t""found in ${ac_cv_c_tkh}" 1>&6
5970
    # this hack is cause the TKHDIRDASHI won't print if there is a "-I" in it.
5971
    TKHDIRDASHI="-I${ac_cv_c_tkh}"
5972
  fi
5973
else
5974
  TKHDIRDASHI="# no Tk directory found"
5975
  echo "configure: warning: Can't find Tk private headers" 1>&2
5976
  no_tk=true
5977
fi
5978
 
5979
 
5980
 
5981
fi
5982
if test x"$no_tk" != x"true" ; then
5983
# libexpectk no longer exists
5984
#  X_PROGS="expectk \$(LIBEXPECTK)"
5985
  X_PROGS=expectk
5986
# should really generate following symbol, but I'm hitting configure's limit on substs.
5987
  X_PROGS_INSTALLED=expectk_installed
5988
else
5989
  X_PROGS="# no X support on this system"
5990
  echo "configure: warning: No X based programs will be built" 1>&2
5991
  echo "        WARNING: Can't find Tk headers or library.  You can still"
5992
  echo "        build expect, but not expectk.  See Expect's README for"
5993
  echo "        information on how to obtain Tk.  If Tk is installed, see"
5994
  echo "        Expect's INSTALL on how to tell configure where Tk is"
5995
  echo "        installed."
5996
fi
5997
 
5998
# consume these flags so that user can invoke Expect's configure with
5999
# the same command as Tcl's configure
6000
# Check whether --enable-load or --disable-load was given.
6001
if test "${enable_load+set}" = set; then
6002
  enableval="$enable_load"
6003
  disable_dl=$enableval
6004
else
6005
  disable_dl=no
6006
fi
6007
 
6008
 
6009
# Check whether --enable-gcc or --disable-gcc was given.
6010
if test "${enable_gcc+set}" = set; then
6011
  enableval="$enable_gcc"
6012
  enable_gcc=$enableval
6013
else
6014
  enable_gcc=no
6015
fi
6016
 
6017
 
6018
 
6019
# Following comment stolen from Tcl's configure.in:
6020
#   Note:  in the following variable, it's important to use the absolute
6021
#   path name of the Tcl directory rather than "..":  this is because
6022
#   AIX remembers this path and will attempt to use it at run-time to look
6023
#   up the Tcl library.
6024
 
6025
if test "${TCL_LIB_VERSIONS_OK}" = "ok"; then
6026
    EXP_LIB_VERSION=$EXP_VERSION
6027
else
6028
    EXP_LIB_VERSION=$EXP_VERSION_NODOTS
6029
fi
6030
if test $iunix -eq 1 ; then
6031
    EXP_LIB_VERSION=$EXP_VERSION_NODOTS
6032
fi
6033
 
6034
# also remove dots on systems that don't support filenames > 14
6035
# (are there systems which support shared libs and restrict filename lengths!?)
6036
echo $ac_n "checking for long file names""... $ac_c" 1>&6
6037
echo "configure:6038: checking for long file names" >&5
6038
if eval "test \"`echo '$''{'ac_cv_sys_long_file_names'+set}'`\" = set"; then
6039
  echo $ac_n "(cached) $ac_c" 1>&6
6040
else
6041
  ac_cv_sys_long_file_names=yes
6042
# Test for long file names in all the places we know might matter:
6043
#      .                the current directory, where building will happen
6044
#      $prefix/lib      where we will be installing things
6045
#      $exec_prefix/lib likewise
6046
# eval it to expand exec_prefix.
6047
#      $TMPDIR          if set, where it might want to write temporary files
6048
# if $TMPDIR is not set:
6049
#      /tmp             where it might want to write temporary files
6050
#      /var/tmp         likewise
6051
#      /usr/tmp         likewise
6052
if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
6053
  ac_tmpdirs="$TMPDIR"
6054
else
6055
  ac_tmpdirs='/tmp /var/tmp /usr/tmp'
6056
fi
6057
for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
6058
  test -d $ac_dir || continue
6059
  test -w $ac_dir || continue # It is less confusing to not echo anything here.
6060
  (echo 1 > $ac_dir/conftest9012345) 2>/dev/null
6061
  (echo 2 > $ac_dir/conftest9012346) 2>/dev/null
6062
  val=`cat $ac_dir/conftest9012345 2>/dev/null`
6063
  if test ! -f $ac_dir/conftest9012345 || test "$val" != 1; then
6064
    ac_cv_sys_long_file_names=no
6065
    rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
6066
    break
6067
  fi
6068
  rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
6069
done
6070
fi
6071
 
6072
echo "$ac_t""$ac_cv_sys_long_file_names" 1>&6
6073
if test $ac_cv_sys_long_file_names = yes; then
6074
  cat >> confdefs.h <<\EOF
6075
#define HAVE_LONG_FILE_NAMES 1
6076
EOF
6077
 
6078
fi
6079
 
6080
if test $ac_cv_sys_long_file_names = no; then
6081
    EXP_LIB_VERSION=$EXP_VERSION_NODOTS
6082
fi
6083
 
6084
EXP_BUILD_LIB_SPEC="-L`pwd` -lexpect${EXP_LIB_VERSION}"
6085
EXP_LIB_SPEC="-L\${exec_prefix}/lib -lexpect${EXP_LIB_VERSION}"
6086
EXP_UNSHARED_LIB_FILE=libexpect${EXP_LIB_VERSION}.a
6087
EXP_BUILD_LIB_SPEC=${EXP_UNSHARED_LIB_FILE}
6088
 
6089
echo $ac_n "checking for type of library to build""... $ac_c" 1>&6
6090
echo "configure:6091: checking for type of library to build" >&5
6091
if test "$enable_shared" = "yes" && test "x${TCL_SHLIB_SUFFIX}" != "x" ; then
6092
  EXP_SHLIB_CFLAGS=$TCL_SHLIB_CFLAGS
6093
#  EXP_SHARED_LIB_FILE=libexpect$EXP_LIB_VERSION$TCL_SHLIB_SUFFIX
6094
  eval "EXP_SHARED_LIB_FILE=libexpect${TCL_SHARED_LIB_SUFFIX}"
6095
  EXP_LIB_FILE=$EXP_SHARED_LIB_FILE
6096
  EXP_LIB_FILES="$EXP_SHARED_LIB_FILE $EXP_UNSHARED_LIB_FILE"
6097
  echo "$ac_t""both shared and unshared" 1>&6
6098
else
6099
  EXP_SHLIB_CFLAGS=
6100
  EXP_SHARED_LIB_FILE="reconfigure_Tcl_for_shared_library"
6101
  EXP_LIB_FILE=$EXP_UNSHARED_LIB_FILE
6102
  EXP_LIB_FILES="$EXP_UNSHARED_LIB_FILE"
6103
  echo "$ac_t""unshared" 1>&6
6104
fi
6105
 
6106
# CYGNUS LOCAL
6107
# We always link expect statically (against $EXP_UNSHARED_LIB_FILE)
6108
# so we can run it out of the build directory without hurting
6109
# ourselves and others.
6110
 
6111
# now broken out into EXP_AND_TCL_LIBS and EXP_AND_TK_LIBS.  Had to do this
6112
# in order to avoid repeating lib specs to which some systems object.
6113
EXP_AND_TCL_LIBS="$EXP_AND_TCL_LIBS $TCL_LD_SEARCH_FLAGS"
6114
EXP_AND_TK_LIBS="$EXP_AND_TK_LIBS $TCL_LD_SEARCH_FLAGS"
6115
 
6116
# Sigh - Tcl defines SHLIB_LD_LIBS to be either empty or ${LIBS} and
6117
# LIBS is intended to be expanded by Make.  But since we're too close
6118
# to hitting config's max symbols, pack everything together here and
6119
# do test ourselves.  Ugh.
6120
#
6121
if test "x$TCL_SHLIB_LD_LIBS" = "x" ; then
6122
        EXP_SHLIB_LD_LIBS=""
6123
else
6124
        # seems a little strange to build in Tcl's build-lib, but
6125
        # that's what Tk does.
6126
        EXP_SHLIB_LD_LIBS="$TCL_BUILD_LIB_SPEC $TCL_DL_LIBS $LIBS -lc"
6127
fi
6128
 
6129
echo $ac_n "checking for Cygwin32 environment""... $ac_c" 1>&6
6130
echo "configure:6131: checking for Cygwin32 environment" >&5
6131
if eval "test \"`echo '$''{'ac_cv_cygwin32'+set}'`\" = set"; then
6132
  echo $ac_n "(cached) $ac_c" 1>&6
6133
else
6134
  cat > conftest.$ac_ext <
6135
#line 6136 "configure"
6136
#include "confdefs.h"
6137
 
6138
int main() {
6139
int main () { return __CYGWIN32__; }
6140
; return 0; }
6141
EOF
6142
if { (eval echo configure:6143: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6143
  rm -rf conftest*
6144
  ac_cv_cygwin32=yes
6145
else
6146
  echo "configure: failed program was:" >&5
6147
  cat conftest.$ac_ext >&5
6148
  rm -rf conftest*
6149
  ac_cv_cygwin32=no
6150
fi
6151
rm -f conftest*
6152
rm -f conftest*
6153
fi
6154
 
6155
echo "$ac_t""$ac_cv_cygwin32" 1>&6
6156
CYGWIN32=
6157
test "$ac_cv_cygwin32" = yes && CYGWIN32=yes
6158
echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
6159
echo "configure:6160: checking for executable suffix" >&5
6160
if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
6161
  echo $ac_n "(cached) $ac_c" 1>&6
6162
else
6163
  if test "$CYGWIN32" = yes; then
6164
ac_cv_exeext=.exe
6165
else
6166
cat > ac_c_test.c << 'EOF'
6167
int main() {
6168
/* Nothing needed here */
6169
}
6170
EOF
6171
${CC-cc} -o ac_c_test $CFLAGS $CPPFLAGS $LDFLAGS ac_c_test.c $LIBS 1>&5
6172
ac_cv_exeext=`ls ac_c_test.* | grep -v ac_c_test.c | sed -e s/ac_c_test//`
6173
rm -f ac_c_test*
6174
fi
6175
 
6176
test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
6177
fi
6178
EXEEXT=""
6179
test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
6180
echo "$ac_t""${ac_cv_exeext}" 1>&6
6181
 
6182
 
6183
#--------------------------------------------------------------------
6184
# This section is based on analogous thing in Tk installation. - DEL
6185
#       Various manipulations on the search path used at runtime to
6186
#       find shared libraries:
6187
#       2. On systems such as AIX and Ultrix that use "-L" as the
6188
#          search path option, colons cannot be used to separate
6189
#          directories from each other. Change colons to " -L".
6190
#       3. Create two sets of search flags, one for use in cc lines
6191
#          and the other for when the linker is invoked directly.  In
6192
#          the second case, '-Wl,' must be stripped off and commas must
6193
#          be replaced by spaces.
6194
#--------------------------------------------------------------------
6195
 
6196
LIB_RUNTIME_DIR='${LIB_RUNTIME_DIR}'
6197
 
6198
# If Tcl and Expect are installed in different places, adjust the library
6199
# search path to reflect this.
6200
 
6201
if test "$TCL_EXEC_PREFIX" != "$exec_prefix"; then
6202
    LIB_RUNTIME_DIR="${LIB_RUNTIME_DIR}:${TCL_EXEC_PREFIX}"
6203
fi
6204
 
6205
if test "${TCL_LD_SEARCH_FLAGS}" = '-L${LIB_RUNTIME_DIR}'; then
6206
    LIB_RUNTIME_DIR=`echo ${LIB_RUNTIME_DIR} |sed -e 's/:/ -L/g'`
6207
fi
6208
 
6209
# The statement below is very tricky!  It actually *evaluates* the
6210
# string in TCL_LD_SEARCH_FLAGS, which causes a substitution of the
6211
# variable LIB_RUNTIME_DIR.
6212
 
6213
eval "EXP_CC_SEARCH_FLAGS=\"$TCL_LD_SEARCH_FLAGS\""
6214
if test "$GCC" = yes; then
6215
  true
6216
else
6217
  EXP_LD_SEARCH_FLAGS=`echo ${EXP_CC_SEARCH_FLAGS} |sed -e "s|-Wl,||g" -e "s|,| |g"`
6218
fi
6219
 
6220
#
6221
# Set up makefile substitutions
6222
#
6223
 
6224
 
6225
 
6226
 
6227
 
6228
 
6229
 
6230
 
6231
 
6232
 
6233
 
6234
 
6235
 
6236
 
6237
 
6238
 
6239
 
6240
 
6241
 
6242
 
6243
 
6244
 
6245
 
6246
 
6247
 
6248
 
6249
 
6250
trap '' 1 2 15
6251
 
6252
trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
6253
 
6254
test "x$prefix" = xNONE && prefix=$ac_default_prefix
6255
# Let make expand exec_prefix.
6256
test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6257
 
6258
# Any assignment to VPATH causes Sun make to only execute
6259
# the first set of double-colon rules, so remove it if not needed.
6260
# If there is a colon in the path, we need to keep it.
6261
if test "x$srcdir" = x.; then
6262
  ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
6263
fi
6264
 
6265
trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
6266
 
6267
DEFS=-DHAVE_CONFIG_H
6268
 
6269
# Without the "./", some shells look in PATH for config.status.
6270
: ${CONFIG_STATUS=./config.status}
6271
 
6272
echo creating $CONFIG_STATUS
6273
rm -f $CONFIG_STATUS
6274
cat > $CONFIG_STATUS <
6275
#! /bin/sh
6276
# Generated automatically by configure.
6277
# Run this file to recreate the current configuration.
6278
# This directory was configured as follows,
6279
# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
6280
#
6281
# $0 $ac_configure_args
6282
#
6283
# Compiler output produced by configure, useful for debugging
6284
# configure, is in ./config.log if it exists.
6285
 
6286
ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
6287
for ac_option
6288
do
6289
  case "\$ac_option" in
6290
  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
6291
    echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
6292
    exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
6293
  -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
6294
    echo "$CONFIG_STATUS generated by autoconf version 2.13"
6295
    exit 0 ;;
6296
  -help | --help | --hel | --he | --h)
6297
    echo "\$ac_cs_usage"; exit 0 ;;
6298
  *) echo "\$ac_cs_usage"; exit 1 ;;
6299
  esac
6300
done
6301
 
6302
ac_given_srcdir=$srcdir
6303
ac_given_INSTALL="$INSTALL"
6304
 
6305
trap 'rm -fr `echo "Makefile pkgIndex expect_cf.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
6306
EOF
6307
cat >> $CONFIG_STATUS <
6308
 
6309
# Protect against being on the right side of a sed subst in config.status.
6310
sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
6311
 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
6312
$ac_vpsub
6313
$extrasub
6314
s%@SHELL@%$SHELL%g
6315
s%@CFLAGS@%$CFLAGS%g
6316
s%@CPPFLAGS@%$CPPFLAGS%g
6317
s%@CXXFLAGS@%$CXXFLAGS%g
6318
s%@FFLAGS@%$FFLAGS%g
6319
s%@DEFS@%$DEFS%g
6320
s%@LDFLAGS@%$LDFLAGS%g
6321
s%@LIBS@%$LIBS%g
6322
s%@exec_prefix@%$exec_prefix%g
6323
s%@prefix@%$prefix%g
6324
s%@program_transform_name@%$program_transform_name%g
6325
s%@bindir@%$bindir%g
6326
s%@sbindir@%$sbindir%g
6327
s%@libexecdir@%$libexecdir%g
6328
s%@datadir@%$datadir%g
6329
s%@sysconfdir@%$sysconfdir%g
6330
s%@sharedstatedir@%$sharedstatedir%g
6331
s%@localstatedir@%$localstatedir%g
6332
s%@libdir@%$libdir%g
6333
s%@includedir@%$includedir%g
6334
s%@oldincludedir@%$oldincludedir%g
6335
s%@infodir@%$infodir%g
6336
s%@mandir@%$mandir%g
6337
s%@host@%$host%g
6338
s%@host_alias@%$host_alias%g
6339
s%@host_cpu@%$host_cpu%g
6340
s%@host_vendor@%$host_vendor%g
6341
s%@host_os@%$host_os%g
6342
s%@target@%$target%g
6343
s%@target_alias@%$target_alias%g
6344
s%@target_cpu@%$target_cpu%g
6345
s%@target_vendor@%$target_vendor%g
6346
s%@target_os@%$target_os%g
6347
s%@build@%$build%g
6348
s%@build_alias@%$build_alias%g
6349
s%@build_cpu@%$build_cpu%g
6350
s%@build_vendor@%$build_vendor%g
6351
s%@build_os@%$build_os%g
6352
s%@TCL_DEFS@%$TCL_DEFS%g
6353
s%@TCL_SHLIB_LD@%$TCL_SHLIB_LD%g
6354
s%@SHLIB_SUFFIX@%$SHLIB_SUFFIX%g
6355
s%@TCL_LD_FLAGS@%$TCL_LD_FLAGS%g
6356
s%@TCL_RANLIB@%$TCL_RANLIB%g
6357
s%@TCL_BUILD_LIB_SPEC@%$TCL_BUILD_LIB_SPEC%g
6358
s%@TCL_LIB_SPEC@%$TCL_LIB_SPEC%g
6359
s%@TCL_SHARED_LIB_SUFFIX@%$TCL_SHARED_LIB_SUFFIX%g
6360
s%@TK_VERSION@%$TK_VERSION%g
6361
s%@TK_DEFS@%$TK_DEFS%g
6362
s%@TK_XINCLUDES@%$TK_XINCLUDES%g
6363
s%@TK_XLIBSW@%$TK_XLIBSW%g
6364
s%@TK_BUILD_LIB_SPEC@%$TK_BUILD_LIB_SPEC%g
6365
s%@TK_LIB_SPEC@%$TK_LIB_SPEC%g
6366
s%@CC@%$CC%g
6367
s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
6368
s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
6369
s%@INSTALL_DATA@%$INSTALL_DATA%g
6370
s%@RANLIB@%$RANLIB%g
6371
s%@subdirs@%$subdirs%g
6372
s%@CPP@%$CPP%g
6373
s%@TCLHDIR@%$TCLHDIR%g
6374
s%@TCLHDIRDASHI@%$TCLHDIRDASHI%g
6375
s%@TCL_LIBRARY@%$TCL_LIBRARY%g
6376
s%@ITCLHDIR@%$ITCLHDIR%g
6377
s%@ITCLLIB@%$ITCLLIB%g
6378
s%@TKHDIRDASHI@%$TKHDIRDASHI%g
6379
s%@EXEEXT@%$EXEEXT%g
6380
s%@EXP_MAJOR_VERSION@%$EXP_MAJOR_VERSION%g
6381
s%@EXP_MINOR_VERSION@%$EXP_MINOR_VERSION%g
6382
s%@EXP_MICRO_VERSION@%$EXP_MICRO_VERSION%g
6383
s%@EXP_VERSION_FULL@%$EXP_VERSION_FULL%g
6384
s%@EXP_VERSION@%$EXP_VERSION%g
6385
s%@EXP_CONFIG_SHELL@%$EXP_CONFIG_SHELL%g
6386
s%@EXP_SHARED_LIB_FILE@%$EXP_SHARED_LIB_FILE%g
6387
s%@EXP_UNSHARED_LIB_FILE@%$EXP_UNSHARED_LIB_FILE%g
6388
s%@EXP_SHLIB_CFLAGS@%$EXP_SHLIB_CFLAGS%g
6389
s%@EXP_LIB_FILE@%$EXP_LIB_FILE%g
6390
s%@EXP_LIB_FILES@%$EXP_LIB_FILES%g
6391
s%@EXP_BUILD_LIB_SPEC@%$EXP_BUILD_LIB_SPEC%g
6392
s%@EXP_LIB_SPEC@%$EXP_LIB_SPEC%g
6393
s%@EXP_CFLAGS@%$EXP_CFLAGS%g
6394
s%@EXP_LDFLAGS@%$EXP_LDFLAGS%g
6395
s%@EXP_LD_SEARCH_FLAGS@%$EXP_LD_SEARCH_FLAGS%g
6396
s%@EXP_AND_TCL_LIBS@%$EXP_AND_TCL_LIBS%g
6397
s%@EXP_AND_TK_LIBS@%$EXP_AND_TK_LIBS%g
6398
s%@EXP_SHLIB_LD_LIBS@%$EXP_SHLIB_LD_LIBS%g
6399
s%@X_PROGS@%$X_PROGS%g
6400
s%@PTY_TYPE@%$PTY_TYPE%g
6401
s%@EVENT_TYPE@%$EVENT_TYPE%g
6402
s%@EVENT_ABLE@%$EVENT_ABLE%g
6403
s%@SETUID@%$SETUID%g
6404
s%@UNSHARED_RANLIB@%$UNSHARED_RANLIB%g
6405
s%@DEFAULT_STTY_ARGS@%$DEFAULT_STTY_ARGS%g
6406
 
6407
CEOF
6408
EOF
6409
 
6410
cat >> $CONFIG_STATUS <<\EOF
6411
 
6412
# Split the substitutions into bite-sized pieces for seds with
6413
# small command number limits, like on Digital OSF/1 and HP-UX.
6414
ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
6415
ac_file=1 # Number of current file.
6416
ac_beg=1 # First line for current file.
6417
ac_end=$ac_max_sed_cmds # Line after last line for current file.
6418
ac_more_lines=:
6419
ac_sed_cmds=""
6420
while $ac_more_lines; do
6421
  if test $ac_beg -gt 1; then
6422
    sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
6423
  else
6424
    sed "${ac_end}q" conftest.subs > conftest.s$ac_file
6425
  fi
6426
  if test ! -s conftest.s$ac_file; then
6427
    ac_more_lines=false
6428
    rm -f conftest.s$ac_file
6429
  else
6430
    if test -z "$ac_sed_cmds"; then
6431
      ac_sed_cmds="sed -f conftest.s$ac_file"
6432
    else
6433
      ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
6434
    fi
6435
    ac_file=`expr $ac_file + 1`
6436
    ac_beg=$ac_end
6437
    ac_end=`expr $ac_end + $ac_max_sed_cmds`
6438
  fi
6439
done
6440
if test -z "$ac_sed_cmds"; then
6441
  ac_sed_cmds=cat
6442
fi
6443
EOF
6444
 
6445
cat >> $CONFIG_STATUS <
6446
 
6447
CONFIG_FILES=\${CONFIG_FILES-"Makefile pkgIndex"}
6448
EOF
6449
cat >> $CONFIG_STATUS <<\EOF
6450
for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
6451
  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
6452
  case "$ac_file" in
6453
  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
6454
       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
6455
  *) ac_file_in="${ac_file}.in" ;;
6456
  esac
6457
 
6458
  # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
6459
 
6460
  # Remove last slash and all that follows it.  Not all systems have dirname.
6461
  ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
6462
  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
6463
    # The file is in a subdirectory.
6464
    test ! -d "$ac_dir" && mkdir "$ac_dir"
6465
    ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
6466
    # A "../" for each directory in $ac_dir_suffix.
6467
    ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
6468
  else
6469
    ac_dir_suffix= ac_dots=
6470
  fi
6471
 
6472
  case "$ac_given_srcdir" in
6473
  .)  srcdir=.
6474
      if test -z "$ac_dots"; then top_srcdir=.
6475
      else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
6476
  /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
6477
  *) # Relative path.
6478
    srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
6479
    top_srcdir="$ac_dots$ac_given_srcdir" ;;
6480
  esac
6481
 
6482
  case "$ac_given_INSTALL" in
6483
  [/$]*) INSTALL="$ac_given_INSTALL" ;;
6484
  *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
6485
  esac
6486
 
6487
  echo creating "$ac_file"
6488
  rm -f "$ac_file"
6489
  configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
6490
  case "$ac_file" in
6491
  *Makefile*) ac_comsub="1i\\
6492
# $configure_input" ;;
6493
  *) ac_comsub= ;;
6494
  esac
6495
 
6496
  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
6497
  sed -e "$ac_comsub
6498
s%@configure_input@%$configure_input%g
6499
s%@srcdir@%$srcdir%g
6500
s%@top_srcdir@%$top_srcdir%g
6501
s%@INSTALL@%$INSTALL%g
6502
" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
6503
fi; done
6504
rm -f conftest.s*
6505
 
6506
# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
6507
# NAME is the cpp macro being defined and VALUE is the value it is being given.
6508
#
6509
# ac_d sets the value in "#define NAME VALUE" lines.
6510
ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
6511
ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
6512
ac_dC='\3'
6513
ac_dD='%g'
6514
# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
6515
ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
6516
ac_uB='\([      ]\)%\1#\2define\3'
6517
ac_uC=' '
6518
ac_uD='\4%g'
6519
# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
6520
ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
6521
ac_eB='$%\1#\2define\3'
6522
ac_eC=' '
6523
ac_eD='%g'
6524
 
6525
if test "${CONFIG_HEADERS+set}" != set; then
6526
EOF
6527
cat >> $CONFIG_STATUS <
6528
  CONFIG_HEADERS="expect_cf.h"
6529
EOF
6530
cat >> $CONFIG_STATUS <<\EOF
6531
fi
6532
for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
6533
  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
6534
  case "$ac_file" in
6535
  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
6536
       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
6537
  *) ac_file_in="${ac_file}.in" ;;
6538
  esac
6539
 
6540
  echo creating $ac_file
6541
 
6542
  rm -f conftest.frag conftest.in conftest.out
6543
  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
6544
  cat $ac_file_inputs > conftest.in
6545
 
6546
EOF
6547
 
6548
# Transform confdefs.h into a sed script conftest.vals that substitutes
6549
# the proper values into config.h.in to produce config.h.  And first:
6550
# Protect against being on the right side of a sed subst in config.status.
6551
# Protect against being in an unquoted here document in config.status.
6552
rm -f conftest.vals
6553
cat > conftest.hdr <<\EOF
6554
s/[\\&%]/\\&/g
6555
s%[\\$`]%\\&%g
6556
s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
6557
s%ac_d%ac_u%gp
6558
s%ac_u%ac_e%gp
6559
EOF
6560
sed -n -f conftest.hdr confdefs.h > conftest.vals
6561
rm -f conftest.hdr
6562
 
6563
# This sed command replaces #undef with comments.  This is necessary, for
6564
# example, in the case of _POSIX_SOURCE, which is predefined and required
6565
# on some systems where configure will not decide to define it.
6566
cat >> conftest.vals <<\EOF
6567
s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
6568
EOF
6569
 
6570
# Break up conftest.vals because some shells have a limit on
6571
# the size of here documents, and old seds have small limits too.
6572
 
6573
rm -f conftest.tail
6574
while :
6575
do
6576
  ac_lines=`grep -c . conftest.vals`
6577
  # grep -c gives empty output for an empty file on some AIX systems.
6578
  if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
6579
  # Write a limited-size here document to conftest.frag.
6580
  echo '  cat > conftest.frag <> $CONFIG_STATUS
6581
  sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
6582
  echo 'CEOF
6583
  sed -f conftest.frag conftest.in > conftest.out
6584
  rm -f conftest.in
6585
  mv conftest.out conftest.in
6586
' >> $CONFIG_STATUS
6587
  sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
6588
  rm -f conftest.vals
6589
  mv conftest.tail conftest.vals
6590
done
6591
rm -f conftest.vals
6592
 
6593
cat >> $CONFIG_STATUS <<\EOF
6594
  rm -f conftest.frag conftest.h
6595
  echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
6596
  cat conftest.in >> conftest.h
6597
  rm -f conftest.in
6598
  if cmp -s $ac_file conftest.h 2>/dev/null; then
6599
    echo "$ac_file is unchanged"
6600
    rm -f conftest.h
6601
  else
6602
    # Remove last slash and all that follows it.  Not all systems have dirname.
6603
      ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
6604
      if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
6605
      # The file is in a subdirectory.
6606
      test ! -d "$ac_dir" && mkdir "$ac_dir"
6607
    fi
6608
    rm -f $ac_file
6609
    mv conftest.h $ac_file
6610
  fi
6611
fi; done
6612
 
6613
EOF
6614
cat >> $CONFIG_STATUS <
6615
 
6616
EOF
6617
cat >> $CONFIG_STATUS <<\EOF
6618
 
6619
exit 0
6620
EOF
6621
chmod +x $CONFIG_STATUS
6622
rm -fr confdefs* $ac_clean_files
6623
test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
6624
 
6625
if test "$no_recursion" != yes; then
6626
 
6627
  # Remove --cache-file and --srcdir arguments so they do not pile up.
6628
  ac_sub_configure_args=
6629
  ac_prev=
6630
  for ac_arg in $ac_configure_args; do
6631
    if test -n "$ac_prev"; then
6632
      ac_prev=
6633
      continue
6634
    fi
6635
    case "$ac_arg" in
6636
    -cache-file | --cache-file | --cache-fil | --cache-fi \
6637
    | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
6638
      ac_prev=cache_file ;;
6639
    -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
6640
    | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
6641
      ;;
6642
    -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
6643
      ac_prev=srcdir ;;
6644
    -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
6645
      ;;
6646
    *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
6647
    esac
6648
  done
6649
 
6650
  for ac_config_dir in testsuite; do
6651
 
6652
    # Do not complain, so a configure script can configure whichever
6653
    # parts of a large source tree are present.
6654
    if test ! -d $srcdir/$ac_config_dir; then
6655
      continue
6656
    fi
6657
 
6658
    echo configuring in $ac_config_dir
6659
 
6660
    case "$srcdir" in
6661
    .) ;;
6662
    *)
6663
      if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :;
6664
      else
6665
        { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; }
6666
      fi
6667
      ;;
6668
    esac
6669
 
6670
    ac_popdir=`pwd`
6671
    cd $ac_config_dir
6672
 
6673
      # A "../" for each directory in /$ac_config_dir.
6674
      ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
6675
 
6676
    case "$srcdir" in
6677
    .) # No --srcdir option.  We are building in place.
6678
      ac_sub_srcdir=$srcdir ;;
6679
    /*) # Absolute path.
6680
      ac_sub_srcdir=$srcdir/$ac_config_dir ;;
6681
    *) # Relative path.
6682
      ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;;
6683
    esac
6684
 
6685
    # Check for guested configure; otherwise get Cygnus style configure.
6686
    if test -f $ac_sub_srcdir/configure; then
6687
      ac_sub_configure=$ac_sub_srcdir/configure
6688
    elif test -f $ac_sub_srcdir/configure.in; then
6689
      ac_sub_configure=$ac_configure
6690
    else
6691
      echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2
6692
      ac_sub_configure=
6693
    fi
6694
 
6695
    # The recursion is here.
6696
    if test -n "$ac_sub_configure"; then
6697
 
6698
      # Make the cache file name correct relative to the subdirectory.
6699
      case "$cache_file" in
6700
      /*) ac_sub_cache_file=$cache_file ;;
6701
      *) # Relative path.
6702
        ac_sub_cache_file="$ac_dots$cache_file" ;;
6703
      esac
6704
  case "$ac_given_INSTALL" in
6705
        [/$]*) INSTALL="$ac_given_INSTALL" ;;
6706
        *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
6707
        esac
6708
 
6709
      echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir"
6710
      # The eval makes quoting arguments work.
6711
      if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir
6712
      then :
6713
      else
6714
        { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; }
6715
      fi
6716
    fi
6717
 
6718
    cd $ac_popdir
6719
  done
6720
fi
6721
 

powered by: WebSVN 2.1.0

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