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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [gdb-5.0/] [readline/] [configure] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 106 markom
#! /bin/sh
2
 
3
# From configure.in for Readline 4.0, version 2.14, from autoconf version 2.13
4
LIBVERSION=4.0
5
 
6
 
7
 
8
 
9
 
10
 
11
 
12
 
13
 
14
 
15
 
16
 
17
 
18
 
19
 
20
 
21
 
22
 
23
 
24
 
25
 
26
 
27
 
28
 
29
 
30
 
31
 
32
 
33
 
34
 
35
 
36
 
37
 
38
 
39
 
40
 
41
 
42
 
43
 
44
 
45
 
46
 
47
 
48
 
49
 
50
 
51
 
52
 
53
 
54
 
55
 
56
 
57
 
58
 
59
 
60
 
61
 
62
 
63
 
64
 
65
 
66
 
67
 
68
 
69
 
70
 
71
 
72
 
73
 
74
 
75
 
76
 
77
 
78
 
79
 
80
 
81
 
82
 
83
 
84
 
85
 
86
 
87
 
88
 
89
 
90
 
91
 
92
 
93
 
94
# Guess values for system-dependent variables and create Makefiles.
95
# Generated automatically using autoconf version 2.13
96
# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
97
#
98
# This configure script is free software; the Free Software Foundation
99
# gives unlimited permission to copy, distribute and modify it.
100
 
101
# Defaults:
102
ac_help=
103
ac_default_prefix=/usr/local
104
# Any additions from configure.in:
105
ac_help="$ac_help
106
--with-curses               use the curses library instead of the termcap library"
107
 
108
# Initialize some variables set by options.
109
# The variables have the same names as the options, with
110
# dashes changed to underlines.
111
build=NONE
112
cache_file=./config.cache
113
exec_prefix=NONE
114
host=NONE
115
no_create=
116
nonopt=NONE
117
no_recursion=
118
prefix=NONE
119
program_prefix=NONE
120
program_suffix=NONE
121
program_transform_name=s,x,x,
122
silent=
123
site=
124
srcdir=
125
target=NONE
126
verbose=
127
x_includes=NONE
128
x_libraries=NONE
129
bindir='${exec_prefix}/bin'
130
sbindir='${exec_prefix}/sbin'
131
libexecdir='${exec_prefix}/libexec'
132
datadir='${prefix}/share'
133
sysconfdir='${prefix}/etc'
134
sharedstatedir='${prefix}/com'
135
localstatedir='${prefix}/var'
136
libdir='${exec_prefix}/lib'
137
includedir='${prefix}/include'
138
oldincludedir='/usr/include'
139
infodir='${prefix}/info'
140
mandir='${prefix}/man'
141
 
142
# Initialize some other variables.
143
subdirs=
144
MFLAGS= MAKEFLAGS=
145
SHELL=${CONFIG_SHELL-/bin/sh}
146
# Maximum number of lines to put in a shell here document.
147
ac_max_here_lines=12
148
 
149
ac_prev=
150
for ac_option
151
do
152
 
153
  # If the previous option needs an argument, assign it.
154
  if test -n "$ac_prev"; then
155
    eval "$ac_prev=\$ac_option"
156
    ac_prev=
157
    continue
158
  fi
159
 
160
  case "$ac_option" in
161
  -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
162
  *) ac_optarg= ;;
163
  esac
164
 
165
  # Accept the important Cygnus configure options, so we can diagnose typos.
166
 
167
  case "$ac_option" in
168
 
169
  -bindir | --bindir | --bindi | --bind | --bin | --bi)
170
    ac_prev=bindir ;;
171
  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
172
    bindir="$ac_optarg" ;;
173
 
174
  -build | --build | --buil | --bui | --bu)
175
    ac_prev=build ;;
176
  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
177
    build="$ac_optarg" ;;
178
 
179
  -cache-file | --cache-file | --cache-fil | --cache-fi \
180
  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
181
    ac_prev=cache_file ;;
182
  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
183
  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
184
    cache_file="$ac_optarg" ;;
185
 
186
  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
187
    ac_prev=datadir ;;
188
  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
189
  | --da=*)
190
    datadir="$ac_optarg" ;;
191
 
192
  -disable-* | --disable-*)
193
    ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
194
    # Reject names that are not valid shell variable names.
195
    if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
196
      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
197
    fi
198
    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
199
    eval "enable_${ac_feature}=no" ;;
200
 
201
  -enable-* | --enable-*)
202
    ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
203
    # Reject names that are not valid shell variable names.
204
    if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
205
      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
206
    fi
207
    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
208
    case "$ac_option" in
209
      *=*) ;;
210
      *) ac_optarg=yes ;;
211
    esac
212
    eval "enable_${ac_feature}='$ac_optarg'" ;;
213
 
214
  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
215
  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
216
  | --exec | --exe | --ex)
217
    ac_prev=exec_prefix ;;
218
  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
219
  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
220
  | --exec=* | --exe=* | --ex=*)
221
    exec_prefix="$ac_optarg" ;;
222
 
223
  -gas | --gas | --ga | --g)
224
    # Obsolete; use --with-gas.
225
    with_gas=yes ;;
226
 
227
  -help | --help | --hel | --he)
228
    # Omit some internal or obsolete options to make the list less imposing.
229
    # This message is too long to be a string in the A/UX 3.1 sh.
230
    cat << EOF
231
Usage: configure [options] [host]
232
Options: [defaults in brackets after descriptions]
233
Configuration:
234
  --cache-file=FILE       cache test results in FILE
235
  --help                  print this message
236
  --no-create             do not create output files
237
  --quiet, --silent       do not print \`checking...' messages
238
  --version               print the version of autoconf that created configure
239
Directory and file names:
240
  --prefix=PREFIX         install architecture-independent files in PREFIX
241
                          [$ac_default_prefix]
242
  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
243
                          [same as prefix]
244
  --bindir=DIR            user executables in DIR [EPREFIX/bin]
245
  --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
246
  --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
247
  --datadir=DIR           read-only architecture-independent data in DIR
248
                          [PREFIX/share]
249
  --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
250
  --sharedstatedir=DIR    modifiable architecture-independent data in DIR
251
                          [PREFIX/com]
252
  --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
253
  --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
254
  --includedir=DIR        C header files in DIR [PREFIX/include]
255
  --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
256
  --infodir=DIR           info documentation in DIR [PREFIX/info]
257
  --mandir=DIR            man documentation in DIR [PREFIX/man]
258
  --srcdir=DIR            find the sources in DIR [configure dir or ..]
259
  --program-prefix=PREFIX prepend PREFIX to installed program names
260
  --program-suffix=SUFFIX append SUFFIX to installed program names
261
  --program-transform-name=PROGRAM
262
                          run sed PROGRAM on installed program names
263
EOF
264
    cat << EOF
265
Host type:
266
  --build=BUILD           configure for building on BUILD [BUILD=HOST]
267
  --host=HOST             configure for HOST [guessed]
268
  --target=TARGET         configure for TARGET [TARGET=HOST]
269
Features and packages:
270
  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
271
  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
272
  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
273
  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
274
  --x-includes=DIR        X include files are in DIR
275
  --x-libraries=DIR       X library files are in DIR
276
EOF
277
    if test -n "$ac_help"; then
278
      echo "--enable and --with options recognized:$ac_help"
279
    fi
280
    exit 0 ;;
281
 
282
  -host | --host | --hos | --ho)
283
    ac_prev=host ;;
284
  -host=* | --host=* | --hos=* | --ho=*)
285
    host="$ac_optarg" ;;
286
 
287
  -includedir | --includedir | --includedi | --included | --include \
288
  | --includ | --inclu | --incl | --inc)
289
    ac_prev=includedir ;;
290
  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
291
  | --includ=* | --inclu=* | --incl=* | --inc=*)
292
    includedir="$ac_optarg" ;;
293
 
294
  -infodir | --infodir | --infodi | --infod | --info | --inf)
295
    ac_prev=infodir ;;
296
  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
297
    infodir="$ac_optarg" ;;
298
 
299
  -libdir | --libdir | --libdi | --libd)
300
    ac_prev=libdir ;;
301
  -libdir=* | --libdir=* | --libdi=* | --libd=*)
302
    libdir="$ac_optarg" ;;
303
 
304
  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
305
  | --libexe | --libex | --libe)
306
    ac_prev=libexecdir ;;
307
  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
308
  | --libexe=* | --libex=* | --libe=*)
309
    libexecdir="$ac_optarg" ;;
310
 
311
  -localstatedir | --localstatedir | --localstatedi | --localstated \
312
  | --localstate | --localstat | --localsta | --localst \
313
  | --locals | --local | --loca | --loc | --lo)
314
    ac_prev=localstatedir ;;
315
  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
316
  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
317
  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
318
    localstatedir="$ac_optarg" ;;
319
 
320
  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
321
    ac_prev=mandir ;;
322
  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
323
    mandir="$ac_optarg" ;;
324
 
325
  -nfp | --nfp | --nf)
326
    # Obsolete; use --without-fp.
327
    with_fp=no ;;
328
 
329
  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
330
  | --no-cr | --no-c)
331
    no_create=yes ;;
332
 
333
  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
334
  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
335
    no_recursion=yes ;;
336
 
337
  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
338
  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
339
  | --oldin | --oldi | --old | --ol | --o)
340
    ac_prev=oldincludedir ;;
341
  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
342
  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
343
  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
344
    oldincludedir="$ac_optarg" ;;
345
 
346
  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
347
    ac_prev=prefix ;;
348
  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
349
    prefix="$ac_optarg" ;;
350
 
351
  -program-prefix | --program-prefix | --program-prefi | --program-pref \
352
  | --program-pre | --program-pr | --program-p)
353
    ac_prev=program_prefix ;;
354
  -program-prefix=* | --program-prefix=* | --program-prefi=* \
355
  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
356
    program_prefix="$ac_optarg" ;;
357
 
358
  -program-suffix | --program-suffix | --program-suffi | --program-suff \
359
  | --program-suf | --program-su | --program-s)
360
    ac_prev=program_suffix ;;
361
  -program-suffix=* | --program-suffix=* | --program-suffi=* \
362
  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
363
    program_suffix="$ac_optarg" ;;
364
 
365
  -program-transform-name | --program-transform-name \
366
  | --program-transform-nam | --program-transform-na \
367
  | --program-transform-n | --program-transform- \
368
  | --program-transform | --program-transfor \
369
  | --program-transfo | --program-transf \
370
  | --program-trans | --program-tran \
371
  | --progr-tra | --program-tr | --program-t)
372
    ac_prev=program_transform_name ;;
373
  -program-transform-name=* | --program-transform-name=* \
374
  | --program-transform-nam=* | --program-transform-na=* \
375
  | --program-transform-n=* | --program-transform-=* \
376
  | --program-transform=* | --program-transfor=* \
377
  | --program-transfo=* | --program-transf=* \
378
  | --program-trans=* | --program-tran=* \
379
  | --progr-tra=* | --program-tr=* | --program-t=*)
380
    program_transform_name="$ac_optarg" ;;
381
 
382
  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
383
  | -silent | --silent | --silen | --sile | --sil)
384
    silent=yes ;;
385
 
386
  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
387
    ac_prev=sbindir ;;
388
  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
389
  | --sbi=* | --sb=*)
390
    sbindir="$ac_optarg" ;;
391
 
392
  -sharedstatedir | --sharedstatedir | --sharedstatedi \
393
  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
394
  | --sharedst | --shareds | --shared | --share | --shar \
395
  | --sha | --sh)
396
    ac_prev=sharedstatedir ;;
397
  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
398
  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
399
  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
400
  | --sha=* | --sh=*)
401
    sharedstatedir="$ac_optarg" ;;
402
 
403
  -site | --site | --sit)
404
    ac_prev=site ;;
405
  -site=* | --site=* | --sit=*)
406
    site="$ac_optarg" ;;
407
 
408
  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
409
    ac_prev=srcdir ;;
410
  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
411
    srcdir="$ac_optarg" ;;
412
 
413
  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
414
  | --syscon | --sysco | --sysc | --sys | --sy)
415
    ac_prev=sysconfdir ;;
416
  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
417
  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
418
    sysconfdir="$ac_optarg" ;;
419
 
420
  -target | --target | --targe | --targ | --tar | --ta | --t)
421
    ac_prev=target ;;
422
  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
423
    target="$ac_optarg" ;;
424
 
425
  -v | -verbose | --verbose | --verbos | --verbo | --verb)
426
    verbose=yes ;;
427
 
428
  -version | --version | --versio | --versi | --vers)
429
    echo "configure generated by autoconf version 2.13"
430
    exit 0 ;;
431
 
432
  -with-* | --with-*)
433
    ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
434
    # Reject names that are not valid shell variable names.
435
    if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
436
      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
437
    fi
438
    ac_package=`echo $ac_package| sed 's/-/_/g'`
439
    case "$ac_option" in
440
      *=*) ;;
441
      *) ac_optarg=yes ;;
442
    esac
443
    eval "with_${ac_package}='$ac_optarg'" ;;
444
 
445
  -without-* | --without-*)
446
    ac_package=`echo $ac_option|sed -e 's/-*without-//'`
447
    # Reject names that are not valid shell variable names.
448
    if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
449
      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
450
    fi
451
    ac_package=`echo $ac_package| sed 's/-/_/g'`
452
    eval "with_${ac_package}=no" ;;
453
 
454
  --x)
455
    # Obsolete; use --with-x.
456
    with_x=yes ;;
457
 
458
  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
459
  | --x-incl | --x-inc | --x-in | --x-i)
460
    ac_prev=x_includes ;;
461
  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
462
  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
463
    x_includes="$ac_optarg" ;;
464
 
465
  -x-libraries | --x-libraries | --x-librarie | --x-librari \
466
  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
467
    ac_prev=x_libraries ;;
468
  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
469
  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
470
    x_libraries="$ac_optarg" ;;
471
 
472
  -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
473
    ;;
474
 
475
  *)
476
    if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
477
      echo "configure: warning: $ac_option: invalid host type" 1>&2
478
    fi
479
    if test "x$nonopt" != xNONE; then
480
      { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
481
    fi
482
    nonopt="$ac_option"
483
    ;;
484
 
485
  esac
486
done
487
 
488
if test -n "$ac_prev"; then
489
  { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
490
fi
491
 
492
trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
493
 
494
# File descriptor usage:
495
# 0 standard input
496
# 1 file creation
497
# 2 errors and warnings
498
# 3 some systems may open it to /dev/tty
499
# 4 used on the Kubota Titan
500
# 6 checking for... messages and results
501
# 5 compiler messages saved in config.log
502
if test "$silent" = yes; then
503
  exec 6>/dev/null
504
else
505
  exec 6>&1
506
fi
507
exec 5>./config.log
508
 
509
echo "\
510
This file contains any messages produced by compilers while
511
running configure, to aid debugging if configure makes a mistake.
512
" 1>&5
513
 
514
# Strip out --no-create and --no-recursion so they do not pile up.
515
# Also quote any args containing shell metacharacters.
516
ac_configure_args=
517
for ac_arg
518
do
519
  case "$ac_arg" in
520
  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
521
  | --no-cr | --no-c) ;;
522
  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
523
  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
524
  *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
525
  ac_configure_args="$ac_configure_args '$ac_arg'" ;;
526
  *) ac_configure_args="$ac_configure_args $ac_arg" ;;
527
  esac
528
done
529
 
530
# NLS nuisances.
531
# Only set these to C if already set.  These must not be set unconditionally
532
# because not all systems understand e.g. LANG=C (notably SCO).
533
# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
534
# Non-C LC_CTYPE values break the ctype check.
535
if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
536
if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
537
if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
538
if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
539
 
540
# confdefs.h avoids OS command line length limits that DEFS can exceed.
541
rm -rf conftest* confdefs.h
542
# AIX cpp loses on an empty file, so make sure it contains at least a newline.
543
echo > confdefs.h
544
 
545
# A filename unique to this package, relative to the directory that
546
# configure is in, which we can look for to find out if srcdir is correct.
547
ac_unique_file=readline.h
548
 
549
# Find the source files, if location was not specified.
550
if test -z "$srcdir"; then
551
  ac_srcdir_defaulted=yes
552
  # Try the directory containing this script, then its parent.
553
  ac_prog=$0
554
  ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
555
  test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
556
  srcdir=$ac_confdir
557
  if test ! -r $srcdir/$ac_unique_file; then
558
    srcdir=..
559
  fi
560
else
561
  ac_srcdir_defaulted=no
562
fi
563
if test ! -r $srcdir/$ac_unique_file; then
564
  if test "$ac_srcdir_defaulted" = yes; then
565
    { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
566
  else
567
    { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
568
  fi
569
fi
570
srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
571
 
572
# Prefer explicitly selected file to automatically selected ones.
573
if test -z "$CONFIG_SITE"; then
574
  if test "x$prefix" != xNONE; then
575
    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
576
  else
577
    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
578
  fi
579
fi
580
for ac_site_file in $CONFIG_SITE; do
581
  if test -r "$ac_site_file"; then
582
    echo "loading site script $ac_site_file"
583
    . "$ac_site_file"
584
  fi
585
done
586
 
587
if test -r "$cache_file"; then
588
  echo "loading cache $cache_file"
589
  . $cache_file
590
else
591
  echo "creating cache $cache_file"
592
  > $cache_file
593
fi
594
 
595
ac_ext=c
596
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
597
ac_cpp='$CPP $CPPFLAGS'
598
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
599
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
600
cross_compiling=$ac_cv_prog_cc_cross
601
 
602
ac_exeext=
603
ac_objext=o
604
if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
605
  # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
606
  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
607
    ac_n= ac_c='
608
' ac_t='        '
609
  else
610
    ac_n=-n ac_c= ac_t=
611
  fi
612
else
613
  ac_n= ac_c='\c' ac_t=
614
fi
615
 
616
 
617
 
618
 
619
 
620
 
621
 
622
ac_aux_dir=
623
for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
624
  if test -f $ac_dir/install-sh; then
625
    ac_aux_dir=$ac_dir
626
    ac_install_sh="$ac_aux_dir/install-sh -c"
627
    break
628
  elif test -f $ac_dir/install.sh; then
629
    ac_aux_dir=$ac_dir
630
    ac_install_sh="$ac_aux_dir/install.sh -c"
631
    break
632
  fi
633
done
634
if test -z "$ac_aux_dir"; then
635
  { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
636
fi
637
ac_config_guess=$ac_aux_dir/config.guess
638
ac_config_sub=$ac_aux_dir/config.sub
639
ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
640
 
641
 
642
# Make sure we can run config.sub.
643
if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
644
else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
645
fi
646
 
647
echo $ac_n "checking host system type""... $ac_c" 1>&6
648
echo "configure:649: checking host system type" >&5
649
 
650
host_alias=$host
651
case "$host_alias" in
652
NONE)
653
  case $nonopt in
654
  NONE)
655
    if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
656
    else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
657
    fi ;;
658
  *) host_alias=$nonopt ;;
659
  esac ;;
660
esac
661
 
662
host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
663
host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
664
host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
665
host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
666
echo "$ac_t""$host" 1>&6
667
 
668
 
669
opt_curses=no
670
opt_shared=no
671
 
672
# Check whether --with-curses or --without-curses was given.
673
if test "${with_curses+set}" = set; then
674
  withval="$with_curses"
675
  opt_curses=$withval
676
fi
677
 
678
 
679
if test "$opt_curses" = "yes"; then
680
        prefer_curses=yes
681
fi
682
 
683
# We want these before the checks, so the checks can modify their values.
684
test -z "$CFLAGS" && CFLAGS=-g auto_cflags=1
685
 
686
# Extract the first word of "gcc", so it can be a program name with args.
687
set dummy gcc; ac_word=$2
688
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
689
echo "configure:690: checking for $ac_word" >&5
690
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
691
  echo $ac_n "(cached) $ac_c" 1>&6
692
else
693
  if test -n "$CC"; then
694
  ac_cv_prog_CC="$CC" # Let the user override the test.
695
else
696
  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
697
  ac_dummy="$PATH"
698
  for ac_dir in $ac_dummy; do
699
    test -z "$ac_dir" && ac_dir=.
700
    if test -f $ac_dir/$ac_word; then
701
      ac_cv_prog_CC="gcc"
702
      break
703
    fi
704
  done
705
  IFS="$ac_save_ifs"
706
fi
707
fi
708
CC="$ac_cv_prog_CC"
709
if test -n "$CC"; then
710
  echo "$ac_t""$CC" 1>&6
711
else
712
  echo "$ac_t""no" 1>&6
713
fi
714
 
715
if test -z "$CC"; then
716
  # Extract the first word of "cc", so it can be a program name with args.
717
set dummy cc; ac_word=$2
718
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
719
echo "configure:720: checking for $ac_word" >&5
720
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
721
  echo $ac_n "(cached) $ac_c" 1>&6
722
else
723
  if test -n "$CC"; then
724
  ac_cv_prog_CC="$CC" # Let the user override the test.
725
else
726
  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
727
  ac_prog_rejected=no
728
  ac_dummy="$PATH"
729
  for ac_dir in $ac_dummy; do
730
    test -z "$ac_dir" && ac_dir=.
731
    if test -f $ac_dir/$ac_word; then
732
      if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
733
        ac_prog_rejected=yes
734
        continue
735
      fi
736
      ac_cv_prog_CC="cc"
737
      break
738
    fi
739
  done
740
  IFS="$ac_save_ifs"
741
if test $ac_prog_rejected = yes; then
742
  # We found a bogon in the path, so make sure we never use it.
743
  set dummy $ac_cv_prog_CC
744
  shift
745
  if test $# -gt 0; then
746
    # We chose a different compiler from the bogus one.
747
    # However, it has the same basename, so the bogon will be chosen
748
    # first if we set CC to just the basename; use the full file name.
749
    shift
750
    set dummy "$ac_dir/$ac_word" "$@"
751
    shift
752
    ac_cv_prog_CC="$@"
753
  fi
754
fi
755
fi
756
fi
757
CC="$ac_cv_prog_CC"
758
if test -n "$CC"; then
759
  echo "$ac_t""$CC" 1>&6
760
else
761
  echo "$ac_t""no" 1>&6
762
fi
763
 
764
  if test -z "$CC"; then
765
    case "`uname -s`" in
766
    *win32* | *WIN32*)
767
      # Extract the first word of "cl", so it can be a program name with args.
768
set dummy cl; ac_word=$2
769
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
770
echo "configure:771: checking for $ac_word" >&5
771
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
772
  echo $ac_n "(cached) $ac_c" 1>&6
773
else
774
  if test -n "$CC"; then
775
  ac_cv_prog_CC="$CC" # Let the user override the test.
776
else
777
  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
778
  ac_dummy="$PATH"
779
  for ac_dir in $ac_dummy; do
780
    test -z "$ac_dir" && ac_dir=.
781
    if test -f $ac_dir/$ac_word; then
782
      ac_cv_prog_CC="cl"
783
      break
784
    fi
785
  done
786
  IFS="$ac_save_ifs"
787
fi
788
fi
789
CC="$ac_cv_prog_CC"
790
if test -n "$CC"; then
791
  echo "$ac_t""$CC" 1>&6
792
else
793
  echo "$ac_t""no" 1>&6
794
fi
795
 ;;
796
    esac
797
  fi
798
  test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
799
fi
800
 
801
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
802
echo "configure:803: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
803
 
804
ac_ext=c
805
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
806
ac_cpp='$CPP $CPPFLAGS'
807
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
808
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
809
cross_compiling=$ac_cv_prog_cc_cross
810
 
811
cat > conftest.$ac_ext << EOF
812
 
813
#line 814 "configure"
814
#include "confdefs.h"
815
 
816
main(){return(0);}
817
EOF
818
if { (eval echo configure:819: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
819
  ac_cv_prog_cc_works=yes
820
  # If we can't run a trivial program, we are probably using a cross compiler.
821
  if (./conftest; exit) 2>/dev/null; then
822
    ac_cv_prog_cc_cross=no
823
  else
824
    ac_cv_prog_cc_cross=yes
825
  fi
826
else
827
  echo "configure: failed program was:" >&5
828
  cat conftest.$ac_ext >&5
829
  ac_cv_prog_cc_works=no
830
fi
831
rm -fr conftest*
832
ac_ext=c
833
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
834
ac_cpp='$CPP $CPPFLAGS'
835
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
836
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
837
cross_compiling=$ac_cv_prog_cc_cross
838
 
839
echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
840
if test $ac_cv_prog_cc_works = no; then
841
  { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
842
fi
843
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
844
echo "configure:845: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
845
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
846
cross_compiling=$ac_cv_prog_cc_cross
847
 
848
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
849
echo "configure:850: checking whether we are using GNU C" >&5
850
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
851
  echo $ac_n "(cached) $ac_c" 1>&6
852
else
853
  cat > conftest.c <
854
#ifdef __GNUC__
855
  yes;
856
#endif
857
EOF
858
if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:859: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
859
  ac_cv_prog_gcc=yes
860
else
861
  ac_cv_prog_gcc=no
862
fi
863
fi
864
 
865
echo "$ac_t""$ac_cv_prog_gcc" 1>&6
866
 
867
if test $ac_cv_prog_gcc = yes; then
868
  GCC=yes
869
else
870
  GCC=
871
fi
872
 
873
ac_test_CFLAGS="${CFLAGS+set}"
874
ac_save_CFLAGS="$CFLAGS"
875
CFLAGS=
876
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
877
echo "configure:878: checking whether ${CC-cc} accepts -g" >&5
878
if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
879
  echo $ac_n "(cached) $ac_c" 1>&6
880
else
881
  echo 'void f(){}' > conftest.c
882
if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
883
  ac_cv_prog_cc_g=yes
884
else
885
  ac_cv_prog_cc_g=no
886
fi
887
rm -f conftest*
888
 
889
fi
890
 
891
echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
892
if test "$ac_test_CFLAGS" = set; then
893
  CFLAGS="$ac_save_CFLAGS"
894
elif test $ac_cv_prog_cc_g = yes; then
895
  if test "$GCC" = yes; then
896
    CFLAGS="-g -O2"
897
  else
898
    CFLAGS="-g"
899
  fi
900
else
901
  if test "$GCC" = yes; then
902
    CFLAGS="-O2"
903
  else
904
    CFLAGS=
905
  fi
906
fi
907
 
908
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
909
echo "configure:910: checking how to run the C preprocessor" >&5
910
# On Suns, sometimes $CPP names a directory.
911
if test -n "$CPP" && test -d "$CPP"; then
912
  CPP=
913
fi
914
if test -z "$CPP"; then
915
if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
916
  echo $ac_n "(cached) $ac_c" 1>&6
917
else
918
    # This must be in double quotes, not single quotes, because CPP may get
919
  # substituted into the Makefile and "${CC-cc}" will confuse make.
920
  CPP="${CC-cc} -E"
921
  # On the NeXT, cc -E runs the code through the compiler's parser,
922
  # not just through cpp.
923
  cat > conftest.$ac_ext <
924
#line 925 "configure"
925
#include "confdefs.h"
926
#include 
927
Syntax Error
928
EOF
929
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
930
{ (eval echo configure:931: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
931
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
932
if test -z "$ac_err"; then
933
  :
934
else
935
  echo "$ac_err" >&5
936
  echo "configure: failed program was:" >&5
937
  cat conftest.$ac_ext >&5
938
  rm -rf conftest*
939
  CPP="${CC-cc} -E -traditional-cpp"
940
  cat > conftest.$ac_ext <
941
#line 942 "configure"
942
#include "confdefs.h"
943
#include 
944
Syntax Error
945
EOF
946
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
947
{ (eval echo configure:948: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
948
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
949
if test -z "$ac_err"; then
950
  :
951
else
952
  echo "$ac_err" >&5
953
  echo "configure: failed program was:" >&5
954
  cat conftest.$ac_ext >&5
955
  rm -rf conftest*
956
  CPP="${CC-cc} -nologo -E"
957
  cat > conftest.$ac_ext <
958
#line 959 "configure"
959
#include "confdefs.h"
960
#include 
961
Syntax Error
962
EOF
963
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
964
{ (eval echo configure:965: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
965
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
966
if test -z "$ac_err"; then
967
  :
968
else
969
  echo "$ac_err" >&5
970
  echo "configure: failed program was:" >&5
971
  cat conftest.$ac_ext >&5
972
  rm -rf conftest*
973
  CPP=/lib/cpp
974
fi
975
rm -f conftest*
976
fi
977
rm -f conftest*
978
fi
979
rm -f conftest*
980
  ac_cv_prog_CPP="$CPP"
981
fi
982
  CPP="$ac_cv_prog_CPP"
983
else
984
  ac_cv_prog_CPP="$CPP"
985
fi
986
echo "$ac_t""$CPP" 1>&6
987
 
988
ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
989
echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
990
echo "configure:991: checking for minix/config.h" >&5
991
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
992
  echo $ac_n "(cached) $ac_c" 1>&6
993
else
994
  cat > conftest.$ac_ext <
995
#line 996 "configure"
996
#include "confdefs.h"
997
#include 
998
EOF
999
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1000
{ (eval echo configure:1001: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1001
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1002
if test -z "$ac_err"; then
1003
  rm -rf conftest*
1004
  eval "ac_cv_header_$ac_safe=yes"
1005
else
1006
  echo "$ac_err" >&5
1007
  echo "configure: failed program was:" >&5
1008
  cat conftest.$ac_ext >&5
1009
  rm -rf conftest*
1010
  eval "ac_cv_header_$ac_safe=no"
1011
fi
1012
rm -f conftest*
1013
fi
1014
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1015
  echo "$ac_t""yes" 1>&6
1016
  MINIX=yes
1017
else
1018
  echo "$ac_t""no" 1>&6
1019
MINIX=
1020
fi
1021
 
1022
if test "$MINIX" = yes; then
1023
  cat >> confdefs.h <<\EOF
1024
#define _POSIX_SOURCE 1
1025
EOF
1026
 
1027
  cat >> confdefs.h <<\EOF
1028
#define _POSIX_1_SOURCE 2
1029
EOF
1030
 
1031
  cat >> confdefs.h <<\EOF
1032
#define _MINIX 1
1033
EOF
1034
 
1035
fi
1036
 
1037
 
1038
 
1039
if test "x$cross_compiling" = "xyes"; then
1040
    case "${host}" in
1041
    *-cygwin*)
1042
        cross_cache=${srcdir}/cross-build/cygwin.cache
1043
        if test -r "${cross_cache}"; then
1044
            echo "loading cross-build cache file ${cross_cache}"
1045
            . ${cross_cache}
1046
        fi
1047
        LOCAL_CFLAGS="$LOCAL_CFLAGS -I${srcdir}/../libtermcap"
1048
        unset cross_cache
1049
        ;;
1050
    *)  echo "configure: cross-compiling for a non-cygwin target is not supported" >&2
1051
        ;;
1052
    esac
1053
fi
1054
 
1055
if test "x$cross_compiling" = "xyes"; then
1056
  CROSS_COMPILING_FLAG=-DCROSS_COMPILING
1057
else
1058
  CROSS_COMPILING_FLAG=
1059
fi
1060
 
1061
 
1062
if test -z "$CC_FOR_BUILD"; then
1063
    if test "x$cross_compiling" = "xno"; then
1064
        CC_FOR_BUILD='$(CC)'
1065
    else
1066
        CC_FOR_BUILD=gcc
1067
    fi
1068
fi
1069
 
1070
 
1071
 
1072
# If we're using gcc and the user hasn't specified CFLAGS, add -O to CFLAGS.
1073
test -n "$GCC" && test -n "$auto_cflags" && CFLAGS="$CFLAGS -O"
1074
 
1075
if test $ac_cv_prog_gcc = yes; then
1076
    echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
1077
echo "configure:1078: checking whether ${CC-cc} needs -traditional" >&5
1078
if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then
1079
  echo $ac_n "(cached) $ac_c" 1>&6
1080
else
1081
    ac_pattern="Autoconf.*'x'"
1082
  cat > conftest.$ac_ext <
1083
#line 1084 "configure"
1084
#include "confdefs.h"
1085
#include 
1086
Autoconf TIOCGETP
1087
EOF
1088
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1089
  egrep "$ac_pattern" >/dev/null 2>&1; then
1090
  rm -rf conftest*
1091
  ac_cv_prog_gcc_traditional=yes
1092
else
1093
  rm -rf conftest*
1094
  ac_cv_prog_gcc_traditional=no
1095
fi
1096
rm -f conftest*
1097
 
1098
 
1099
  if test $ac_cv_prog_gcc_traditional = no; then
1100
    cat > conftest.$ac_ext <
1101
#line 1102 "configure"
1102
#include "confdefs.h"
1103
#include 
1104
Autoconf TCGETA
1105
EOF
1106
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1107
  egrep "$ac_pattern" >/dev/null 2>&1; then
1108
  rm -rf conftest*
1109
  ac_cv_prog_gcc_traditional=yes
1110
fi
1111
rm -f conftest*
1112
 
1113
  fi
1114
fi
1115
 
1116
echo "$ac_t""$ac_cv_prog_gcc_traditional" 1>&6
1117
  if test $ac_cv_prog_gcc_traditional = yes; then
1118
    CC="$CC -traditional"
1119
  fi
1120
fi
1121
 
1122
# Find a good install program.  We prefer a C program (faster),
1123
# so one script is as good as another.  But avoid the broken or
1124
# incompatible versions:
1125
# SysV /etc/install, /usr/sbin/install
1126
# SunOS /usr/etc/install
1127
# IRIX /sbin/install
1128
# AIX /bin/install
1129
# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1130
# AFS /usr/afsws/bin/install, which mishandles nonexistent args
1131
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1132
# ./install, which can be erroneously created by make from ./install.sh.
1133
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1134
echo "configure:1135: checking for a BSD compatible install" >&5
1135
if test -z "$INSTALL"; then
1136
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1137
  echo $ac_n "(cached) $ac_c" 1>&6
1138
else
1139
    IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
1140
  for ac_dir in $PATH; do
1141
    # Account for people who put trailing slashes in PATH elements.
1142
    case "$ac_dir/" in
1143
    /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1144
    *)
1145
      # OSF1 and SCO ODT 3.0 have their own names for install.
1146
      # Don't use installbsd from OSF since it installs stuff as root
1147
      # by default.
1148
      for ac_prog in ginstall scoinst install; do
1149
        if test -f $ac_dir/$ac_prog; then
1150
          if test $ac_prog = install &&
1151
            grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1152
            # AIX install.  It has an incompatible calling convention.
1153
            :
1154
          else
1155
            ac_cv_path_install="$ac_dir/$ac_prog -c"
1156
            break 2
1157
          fi
1158
        fi
1159
      done
1160
      ;;
1161
    esac
1162
  done
1163
  IFS="$ac_save_IFS"
1164
 
1165
fi
1166
  if test "${ac_cv_path_install+set}" = set; then
1167
    INSTALL="$ac_cv_path_install"
1168
  else
1169
    # As a last resort, use the slow shell script.  We don't cache a
1170
    # path for INSTALL within a source directory, because that will
1171
    # break other packages using the cache if that directory is
1172
    # removed, or if the path is relative.
1173
    INSTALL="$ac_install_sh"
1174
  fi
1175
fi
1176
echo "$ac_t""$INSTALL" 1>&6
1177
 
1178
# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1179
# It thinks the first close brace ends the variable substitution.
1180
test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1181
 
1182
test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
1183
 
1184
test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1185
 
1186
# Extract the first word of "ar", so it can be a program name with args.
1187
set dummy ar; ac_word=$2
1188
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1189
echo "configure:1190: checking for $ac_word" >&5
1190
if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
1191
  echo $ac_n "(cached) $ac_c" 1>&6
1192
else
1193
  if test -n "$AR"; then
1194
  ac_cv_prog_AR="$AR" # Let the user override the test.
1195
else
1196
  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1197
  ac_dummy="$PATH"
1198
  for ac_dir in $ac_dummy; do
1199
    test -z "$ac_dir" && ac_dir=.
1200
    if test -f $ac_dir/$ac_word; then
1201
      ac_cv_prog_AR="ar"
1202
      break
1203
    fi
1204
  done
1205
  IFS="$ac_save_ifs"
1206
fi
1207
fi
1208
AR="$ac_cv_prog_AR"
1209
if test -n "$AR"; then
1210
  echo "$ac_t""$AR" 1>&6
1211
else
1212
  echo "$ac_t""no" 1>&6
1213
fi
1214
 
1215
test -n "$ARFLAGS" || ARFLAGS="cr"
1216
# Extract the first word of "ranlib", so it can be a program name with args.
1217
set dummy ranlib; ac_word=$2
1218
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1219
echo "configure:1220: checking for $ac_word" >&5
1220
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1221
  echo $ac_n "(cached) $ac_c" 1>&6
1222
else
1223
  if test -n "$RANLIB"; then
1224
  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1225
else
1226
  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1227
  ac_dummy="$PATH"
1228
  for ac_dir in $ac_dummy; do
1229
    test -z "$ac_dir" && ac_dir=.
1230
    if test -f $ac_dir/$ac_word; then
1231
      ac_cv_prog_RANLIB="ranlib"
1232
      break
1233
    fi
1234
  done
1235
  IFS="$ac_save_ifs"
1236
  test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1237
fi
1238
fi
1239
RANLIB="$ac_cv_prog_RANLIB"
1240
if test -n "$RANLIB"; then
1241
  echo "$ac_t""$RANLIB" 1>&6
1242
else
1243
  echo "$ac_t""no" 1>&6
1244
fi
1245
 
1246
 
1247
MAKE_SHELL=/bin/sh
1248
 
1249
 
1250
echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
1251
echo "configure:1252: checking return type of signal handlers" >&5
1252
if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
1253
  echo $ac_n "(cached) $ac_c" 1>&6
1254
else
1255
  cat > conftest.$ac_ext <
1256
#line 1257 "configure"
1257
#include "confdefs.h"
1258
#include 
1259
#include 
1260
#ifdef signal
1261
#undef signal
1262
#endif
1263
#ifdef __cplusplus
1264
extern "C" void (*signal (int, void (*)(int)))(int);
1265
#else
1266
void (*signal ()) ();
1267
#endif
1268
 
1269
int main() {
1270
int i;
1271
; return 0; }
1272
EOF
1273
if { (eval echo configure:1274: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1274
  rm -rf conftest*
1275
  ac_cv_type_signal=void
1276
else
1277
  echo "configure: failed program was:" >&5
1278
  cat conftest.$ac_ext >&5
1279
  rm -rf conftest*
1280
  ac_cv_type_signal=int
1281
fi
1282
rm -f conftest*
1283
fi
1284
 
1285
echo "$ac_t""$ac_cv_type_signal" 1>&6
1286
cat >> confdefs.h <
1287
#define RETSIGTYPE $ac_cv_type_signal
1288
EOF
1289
 
1290
 
1291
 
1292
echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6
1293
echo "configure:1294: checking whether stat file-mode macros are broken" >&5
1294
if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then
1295
  echo $ac_n "(cached) $ac_c" 1>&6
1296
else
1297
  cat > conftest.$ac_ext <
1298
#line 1299 "configure"
1299
#include "confdefs.h"
1300
#include 
1301
#include 
1302
 
1303
#if defined(S_ISBLK) && defined(S_IFDIR)
1304
# if S_ISBLK (S_IFDIR)
1305
You lose.
1306
# endif
1307
#endif
1308
 
1309
#if defined(S_ISBLK) && defined(S_IFCHR)
1310
# if S_ISBLK (S_IFCHR)
1311
You lose.
1312
# endif
1313
#endif
1314
 
1315
#if defined(S_ISLNK) && defined(S_IFREG)
1316
# if S_ISLNK (S_IFREG)
1317
You lose.
1318
# endif
1319
#endif
1320
 
1321
#if defined(S_ISSOCK) && defined(S_IFREG)
1322
# if S_ISSOCK (S_IFREG)
1323
You lose.
1324
# endif
1325
#endif
1326
 
1327
EOF
1328
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1329
  egrep "You lose" >/dev/null 2>&1; then
1330
  rm -rf conftest*
1331
  ac_cv_header_stat_broken=yes
1332
else
1333
  rm -rf conftest*
1334
  ac_cv_header_stat_broken=no
1335
fi
1336
rm -f conftest*
1337
 
1338
fi
1339
 
1340
echo "$ac_t""$ac_cv_header_stat_broken" 1>&6
1341
if test $ac_cv_header_stat_broken = yes; then
1342
  cat >> confdefs.h <<\EOF
1343
#define STAT_MACROS_BROKEN 1
1344
EOF
1345
 
1346
fi
1347
 
1348
ac_header_dirent=no
1349
for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
1350
do
1351
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1352
echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
1353
echo "configure:1354: checking for $ac_hdr that defines DIR" >&5
1354
if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
1355
  echo $ac_n "(cached) $ac_c" 1>&6
1356
else
1357
  cat > conftest.$ac_ext <
1358
#line 1359 "configure"
1359
#include "confdefs.h"
1360
#include 
1361
#include <$ac_hdr>
1362
int main() {
1363
DIR *dirp = 0;
1364
; return 0; }
1365
EOF
1366
if { (eval echo configure:1367: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1367
  rm -rf conftest*
1368
  eval "ac_cv_header_dirent_$ac_safe=yes"
1369
else
1370
  echo "configure: failed program was:" >&5
1371
  cat conftest.$ac_ext >&5
1372
  rm -rf conftest*
1373
  eval "ac_cv_header_dirent_$ac_safe=no"
1374
fi
1375
rm -f conftest*
1376
fi
1377
if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
1378
  echo "$ac_t""yes" 1>&6
1379
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1380
  cat >> confdefs.h <
1381
#define $ac_tr_hdr 1
1382
EOF
1383
 ac_header_dirent=$ac_hdr; break
1384
else
1385
  echo "$ac_t""no" 1>&6
1386
fi
1387
done
1388
# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
1389
if test $ac_header_dirent = dirent.h; then
1390
echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
1391
echo "configure:1392: checking for opendir in -ldir" >&5
1392
ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
1393
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1394
  echo $ac_n "(cached) $ac_c" 1>&6
1395
else
1396
  ac_save_LIBS="$LIBS"
1397
LIBS="-ldir  $LIBS"
1398
cat > conftest.$ac_ext <
1399
#line 1400 "configure"
1400
#include "confdefs.h"
1401
/* Override any gcc2 internal prototype to avoid an error.  */
1402
/* We use char because int might match the return type of a gcc2
1403
    builtin and then its argument prototype would still apply.  */
1404
char opendir();
1405
 
1406
int main() {
1407
opendir()
1408
; return 0; }
1409
EOF
1410
if { (eval echo configure:1411: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1411
  rm -rf conftest*
1412
  eval "ac_cv_lib_$ac_lib_var=yes"
1413
else
1414
  echo "configure: failed program was:" >&5
1415
  cat conftest.$ac_ext >&5
1416
  rm -rf conftest*
1417
  eval "ac_cv_lib_$ac_lib_var=no"
1418
fi
1419
rm -f conftest*
1420
LIBS="$ac_save_LIBS"
1421
 
1422
fi
1423
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1424
  echo "$ac_t""yes" 1>&6
1425
  LIBS="$LIBS -ldir"
1426
else
1427
  echo "$ac_t""no" 1>&6
1428
fi
1429
 
1430
else
1431
echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
1432
echo "configure:1433: checking for opendir in -lx" >&5
1433
ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
1434
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1435
  echo $ac_n "(cached) $ac_c" 1>&6
1436
else
1437
  ac_save_LIBS="$LIBS"
1438
LIBS="-lx  $LIBS"
1439
cat > conftest.$ac_ext <
1440
#line 1441 "configure"
1441
#include "confdefs.h"
1442
/* Override any gcc2 internal prototype to avoid an error.  */
1443
/* We use char because int might match the return type of a gcc2
1444
    builtin and then its argument prototype would still apply.  */
1445
char opendir();
1446
 
1447
int main() {
1448
opendir()
1449
; return 0; }
1450
EOF
1451
if { (eval echo configure:1452: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1452
  rm -rf conftest*
1453
  eval "ac_cv_lib_$ac_lib_var=yes"
1454
else
1455
  echo "configure: failed program was:" >&5
1456
  cat conftest.$ac_ext >&5
1457
  rm -rf conftest*
1458
  eval "ac_cv_lib_$ac_lib_var=no"
1459
fi
1460
rm -f conftest*
1461
LIBS="$ac_save_LIBS"
1462
 
1463
fi
1464
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1465
  echo "$ac_t""yes" 1>&6
1466
  LIBS="$LIBS -lx"
1467
else
1468
  echo "$ac_t""no" 1>&6
1469
fi
1470
 
1471
fi
1472
 
1473
 
1474
for ac_func in strcasecmp select setenv putenv tcgetattr setlocale lstat
1475
do
1476
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1477
echo "configure:1478: checking for $ac_func" >&5
1478
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1479
  echo $ac_n "(cached) $ac_c" 1>&6
1480
else
1481
  cat > conftest.$ac_ext <
1482
#line 1483 "configure"
1483
#include "confdefs.h"
1484
/* System header to define __stub macros and hopefully few prototypes,
1485
    which can conflict with char $ac_func(); below.  */
1486
#include 
1487
/* Override any gcc2 internal prototype to avoid an error.  */
1488
/* We use char because int might match the return type of a gcc2
1489
    builtin and then its argument prototype would still apply.  */
1490
char $ac_func();
1491
 
1492
int main() {
1493
 
1494
/* The GNU C library defines this for functions which it implements
1495
    to always fail with ENOSYS.  Some functions are actually named
1496
    something starting with __ and the normal name is an alias.  */
1497
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1498
choke me
1499
#else
1500
$ac_func();
1501
#endif
1502
 
1503
; return 0; }
1504
EOF
1505
if { (eval echo configure:1506: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1506
  rm -rf conftest*
1507
  eval "ac_cv_func_$ac_func=yes"
1508
else
1509
  echo "configure: failed program was:" >&5
1510
  cat conftest.$ac_ext >&5
1511
  rm -rf conftest*
1512
  eval "ac_cv_func_$ac_func=no"
1513
fi
1514
rm -f conftest*
1515
fi
1516
 
1517
if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1518
  echo "$ac_t""yes" 1>&6
1519
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1520
  cat >> confdefs.h <
1521
#define $ac_tr_func 1
1522
EOF
1523
 
1524
else
1525
  echo "$ac_t""no" 1>&6
1526
fi
1527
done
1528
 
1529
 
1530
echo $ac_n "checking for working strcoll""... $ac_c" 1>&6
1531
echo "configure:1532: checking for working strcoll" >&5
1532
if eval "test \"`echo '$''{'ac_cv_func_strcoll_works'+set}'`\" = set"; then
1533
  echo $ac_n "(cached) $ac_c" 1>&6
1534
else
1535
  if test "$cross_compiling" = yes; then
1536
  ac_cv_func_strcoll_works=no
1537
else
1538
  cat > conftest.$ac_ext <
1539
#line 1540 "configure"
1540
#include "confdefs.h"
1541
#include 
1542
main ()
1543
{
1544
  exit (strcoll ("abc", "def") >= 0 ||
1545
        strcoll ("ABC", "DEF") >= 0 ||
1546
        strcoll ("123", "456") >= 0);
1547
}
1548
EOF
1549
if { (eval echo configure:1550: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1550
then
1551
  ac_cv_func_strcoll_works=yes
1552
else
1553
  echo "configure: failed program was:" >&5
1554
  cat conftest.$ac_ext >&5
1555
  rm -fr conftest*
1556
  ac_cv_func_strcoll_works=no
1557
fi
1558
rm -fr conftest*
1559
fi
1560
 
1561
fi
1562
 
1563
echo "$ac_t""$ac_cv_func_strcoll_works" 1>&6
1564
if test $ac_cv_func_strcoll_works = yes; then
1565
  cat >> confdefs.h <<\EOF
1566
#define HAVE_STRCOLL 1
1567
EOF
1568
 
1569
fi
1570
 
1571
 
1572
for ac_hdr in unistd.h stdlib.h varargs.h stdarg.h string.h \
1573
                sys/ptem.h sys/pte.h sys/stream.h sys/select.h \
1574
                termcap.h termios.h termio.h sys/file.h locale.h
1575
do
1576
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1577
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1578
echo "configure:1579: checking for $ac_hdr" >&5
1579
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1580
  echo $ac_n "(cached) $ac_c" 1>&6
1581
else
1582
  cat > conftest.$ac_ext <
1583
#line 1584 "configure"
1584
#include "confdefs.h"
1585
#include <$ac_hdr>
1586
EOF
1587
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1588
{ (eval echo configure:1589: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1589
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1590
if test -z "$ac_err"; then
1591
  rm -rf conftest*
1592
  eval "ac_cv_header_$ac_safe=yes"
1593
else
1594
  echo "$ac_err" >&5
1595
  echo "configure: failed program was:" >&5
1596
  cat conftest.$ac_ext >&5
1597
  rm -rf conftest*
1598
  eval "ac_cv_header_$ac_safe=no"
1599
fi
1600
rm -f conftest*
1601
fi
1602
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1603
  echo "$ac_t""yes" 1>&6
1604
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1605
  cat >> confdefs.h <
1606
#define $ac_tr_hdr 1
1607
EOF
1608
 
1609
else
1610
  echo "$ac_t""no" 1>&6
1611
fi
1612
done
1613
 
1614
 
1615
 
1616
echo $ac_n "checking for type of signal functions""... $ac_c" 1>&6
1617
echo "configure:1618: checking for type of signal functions" >&5
1618
if eval "test \"`echo '$''{'bash_cv_signal_vintage'+set}'`\" = set"; then
1619
  echo $ac_n "(cached) $ac_c" 1>&6
1620
else
1621
 
1622
  cat > conftest.$ac_ext <
1623
#line 1624 "configure"
1624
#include "confdefs.h"
1625
#include 
1626
int main() {
1627
 
1628
    sigset_t ss;
1629
    struct sigaction sa;
1630
    sigemptyset(&ss); sigsuspend(&ss);
1631
    sigaction(SIGINT, &sa, (struct sigaction *) 0);
1632
    sigprocmask(SIG_BLOCK, &ss, (sigset_t *) 0);
1633
 
1634
; return 0; }
1635
EOF
1636
if { (eval echo configure:1637: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1637
  rm -rf conftest*
1638
  bash_cv_signal_vintage=posix
1639
else
1640
  echo "configure: failed program was:" >&5
1641
  cat conftest.$ac_ext >&5
1642
  rm -rf conftest*
1643
 
1644
    cat > conftest.$ac_ext <
1645
#line 1646 "configure"
1646
#include "confdefs.h"
1647
#include 
1648
int main() {
1649
 
1650
        int mask = sigmask(SIGINT);
1651
        sigsetmask(mask); sigblock(mask); sigpause(mask);
1652
 
1653
; return 0; }
1654
EOF
1655
if { (eval echo configure:1656: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1656
  rm -rf conftest*
1657
  bash_cv_signal_vintage=4.2bsd
1658
else
1659
  echo "configure: failed program was:" >&5
1660
  cat conftest.$ac_ext >&5
1661
  rm -rf conftest*
1662
 
1663
      cat > conftest.$ac_ext <
1664
#line 1665 "configure"
1665
#include "confdefs.h"
1666
 
1667
        #include 
1668
        RETSIGTYPE foo() { }
1669
int main() {
1670
 
1671
                int mask = sigmask(SIGINT);
1672
                sigset(SIGINT, foo); sigrelse(SIGINT);
1673
                sighold(SIGINT); sigpause(SIGINT);
1674
 
1675
; return 0; }
1676
EOF
1677
if { (eval echo configure:1678: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1678
  rm -rf conftest*
1679
  bash_cv_signal_vintage=svr3
1680
else
1681
  echo "configure: failed program was:" >&5
1682
  cat conftest.$ac_ext >&5
1683
  rm -rf conftest*
1684
  bash_cv_signal_vintage=v7
1685
 
1686
fi
1687
rm -f conftest*
1688
 
1689
fi
1690
rm -f conftest*
1691
 
1692
fi
1693
rm -f conftest*
1694
 
1695
fi
1696
 
1697
echo "$ac_t""$bash_cv_signal_vintage" 1>&6
1698
if test "$bash_cv_signal_vintage" = posix; then
1699
cat >> confdefs.h <<\EOF
1700
#define HAVE_POSIX_SIGNALS 1
1701
EOF
1702
 
1703
elif test "$bash_cv_signal_vintage" = "4.2bsd"; then
1704
cat >> confdefs.h <<\EOF
1705
#define HAVE_BSD_SIGNALS 1
1706
EOF
1707
 
1708
elif test "$bash_cv_signal_vintage" = svr3; then
1709
cat >> confdefs.h <<\EOF
1710
#define HAVE_USG_SIGHOLD 1
1711
EOF
1712
 
1713
fi
1714
 
1715
 
1716
 
1717
echo $ac_n "checking if signal handlers must be reinstalled when invoked""... $ac_c" 1>&6
1718
echo "configure:1719: checking if signal handlers must be reinstalled when invoked" >&5
1719
if eval "test \"`echo '$''{'bash_cv_must_reinstall_sighandlers'+set}'`\" = set"; then
1720
  echo $ac_n "(cached) $ac_c" 1>&6
1721
else
1722
  if test "$cross_compiling" = yes; then
1723
  echo "configure: warning: cannot check signal handling if cross compiling -- defaulting to no" 1>&2
1724
    bash_cv_must_reinstall_sighandlers=no
1725
 
1726
else
1727
  cat > conftest.$ac_ext <
1728
#line 1729 "configure"
1729
#include "confdefs.h"
1730
 
1731
#include 
1732
#ifdef HAVE_UNISTD_H
1733
#include 
1734
#endif
1735
 
1736
typedef RETSIGTYPE sigfunc();
1737
 
1738
int nsigint;
1739
 
1740
#ifdef HAVE_POSIX_SIGNALS
1741
sigfunc *
1742
set_signal_handler(sig, handler)
1743
     int sig;
1744
     sigfunc *handler;
1745
{
1746
  struct sigaction act, oact;
1747
  act.sa_handler = handler;
1748
  act.sa_flags = 0;
1749
  sigemptyset (&act.sa_mask);
1750
  sigemptyset (&oact.sa_mask);
1751
  sigaction (sig, &act, &oact);
1752
  return (oact.sa_handler);
1753
}
1754
#else
1755
#define set_signal_handler(s, h) signal(s, h)
1756
#endif
1757
 
1758
RETSIGTYPE
1759
sigint(s)
1760
int s;
1761
{
1762
  nsigint++;
1763
}
1764
 
1765
main()
1766
{
1767
        nsigint = 0;
1768
        set_signal_handler(SIGINT, sigint);
1769
        kill((int)getpid(), SIGINT);
1770
        kill((int)getpid(), SIGINT);
1771
        exit(nsigint != 2);
1772
}
1773
 
1774
EOF
1775
if { (eval echo configure:1776: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1776
then
1777
  bash_cv_must_reinstall_sighandlers=no
1778
else
1779
  echo "configure: failed program was:" >&5
1780
  cat conftest.$ac_ext >&5
1781
  rm -fr conftest*
1782
  bash_cv_must_reinstall_sighandlers=yes
1783
fi
1784
rm -fr conftest*
1785
fi
1786
 
1787
fi
1788
 
1789
echo "$ac_t""$bash_cv_must_reinstall_sighandlers" 1>&6
1790
if test $bash_cv_must_reinstall_sighandlers = yes; then
1791
cat >> confdefs.h <<\EOF
1792
#define MUST_REINSTALL_SIGHANDLERS 1
1793
EOF
1794
 
1795
fi
1796
 
1797
 
1798
 
1799
echo $ac_n "checking for presence of POSIX-style sigsetjmp/siglongjmp""... $ac_c" 1>&6
1800
echo "configure:1801: checking for presence of POSIX-style sigsetjmp/siglongjmp" >&5
1801
if eval "test \"`echo '$''{'bash_cv_func_sigsetjmp'+set}'`\" = set"; then
1802
  echo $ac_n "(cached) $ac_c" 1>&6
1803
else
1804
  if test "$cross_compiling" = yes; then
1805
  echo "configure: warning: cannot check for sigsetjmp/siglongjmp if cross-compiling -- defaulting to missing" 1>&2
1806
     bash_cv_func_sigsetjmp=missing
1807
 
1808
else
1809
  cat > conftest.$ac_ext <
1810
#line 1811 "configure"
1811
#include "confdefs.h"
1812
 
1813
#ifdef HAVE_UNISTD_H
1814
#include 
1815
#endif
1816
#include 
1817
#include 
1818
#include 
1819
 
1820
main()
1821
{
1822
#if !defined (_POSIX_VERSION) || !defined (HAVE_POSIX_SIGNALS)
1823
exit (1);
1824
#else
1825
 
1826
int code;
1827
sigset_t set, oset;
1828
sigjmp_buf xx;
1829
 
1830
/* get the mask */
1831
sigemptyset(&set);
1832
sigemptyset(&oset);
1833
sigprocmask(SIG_BLOCK, (sigset_t *)NULL, &set);
1834
sigprocmask(SIG_BLOCK, (sigset_t *)NULL, &oset);
1835
 
1836
/* save it */
1837
code = sigsetjmp(xx, 1);
1838
if (code)
1839
  exit(0);      /* could get sigmask and compare to oset here. */
1840
 
1841
/* change it */
1842
sigaddset(&set, SIGINT);
1843
sigprocmask(SIG_BLOCK, &set, (sigset_t *)NULL);
1844
 
1845
/* and siglongjmp */
1846
siglongjmp(xx, 10);
1847
exit(1);
1848
#endif
1849
}
1850
EOF
1851
if { (eval echo configure:1852: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1852
then
1853
  bash_cv_func_sigsetjmp=present
1854
else
1855
  echo "configure: failed program was:" >&5
1856
  cat conftest.$ac_ext >&5
1857
  rm -fr conftest*
1858
  bash_cv_func_sigsetjmp=missing
1859
fi
1860
rm -fr conftest*
1861
fi
1862
 
1863
fi
1864
 
1865
echo "$ac_t""$bash_cv_func_sigsetjmp" 1>&6
1866
if test $bash_cv_func_sigsetjmp = present; then
1867
cat >> confdefs.h <<\EOF
1868
#define HAVE_POSIX_SIGSETJMP 1
1869
EOF
1870
 
1871
fi
1872
 
1873
echo $ac_n "checking for lstat""... $ac_c" 1>&6
1874
echo "configure:1875: checking for lstat" >&5
1875
if eval "test \"`echo '$''{'bash_cv_func_lstat'+set}'`\" = set"; then
1876
  echo $ac_n "(cached) $ac_c" 1>&6
1877
else
1878
  cat > conftest.$ac_ext <
1879
#line 1880 "configure"
1880
#include "confdefs.h"
1881
 
1882
#include 
1883
#include 
1884
 
1885
int main() {
1886
 lstat(".",(struct stat *)0);
1887
; return 0; }
1888
EOF
1889
if { (eval echo configure:1890: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1890
  rm -rf conftest*
1891
  bash_cv_func_lstat=yes
1892
else
1893
  echo "configure: failed program was:" >&5
1894
  cat conftest.$ac_ext >&5
1895
  rm -rf conftest*
1896
  bash_cv_func_lstat=no
1897
fi
1898
rm -f conftest*
1899
fi
1900
 
1901
echo "$ac_t""$bash_cv_func_lstat" 1>&6
1902
if test $bash_cv_func_lstat = yes; then
1903
  cat >> confdefs.h <<\EOF
1904
#define HAVE_LSTAT 1
1905
EOF
1906
 
1907
fi
1908
 
1909
echo $ac_n "checking whether programs are able to redeclare getpw functions""... $ac_c" 1>&6
1910
echo "configure:1911: checking whether programs are able to redeclare getpw functions" >&5
1911
if eval "test \"`echo '$''{'bash_cv_can_redecl_getpw'+set}'`\" = set"; then
1912
  echo $ac_n "(cached) $ac_c" 1>&6
1913
else
1914
  cat > conftest.$ac_ext <
1915
#line 1916 "configure"
1916
#include "confdefs.h"
1917
#include 
1918
#include 
1919
extern struct passwd *getpwent();
1920
extern struct passwd *getpwuid();
1921
extern struct passwd *getpwnam();
1922
int main() {
1923
struct passwd *z; z = getpwent(); z = getpwuid(0); z = getpwnam("root");
1924
; return 0; }
1925
EOF
1926
if { (eval echo configure:1927: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1927
  rm -rf conftest*
1928
  bash_cv_can_redecl_getpw=yes
1929
else
1930
  echo "configure: failed program was:" >&5
1931
  cat conftest.$ac_ext >&5
1932
  rm -rf conftest*
1933
  bash_cv_can_redecl_getpw=no
1934
fi
1935
rm -f conftest*
1936
fi
1937
 
1938
echo "$ac_t""$bash_cv_can_redecl_getpw" 1>&6
1939
if test $bash_cv_can_redecl_getpw = no; then
1940
cat >> confdefs.h <<\EOF
1941
#define HAVE_GETPW_DECLS 1
1942
EOF
1943
 
1944
fi
1945
 
1946
 
1947
echo $ac_n "checking whether or not strcoll and strcmp differ""... $ac_c" 1>&6
1948
echo "configure:1949: checking whether or not strcoll and strcmp differ" >&5
1949
if eval "test \"`echo '$''{'bash_cv_func_strcoll_broken'+set}'`\" = set"; then
1950
  echo $ac_n "(cached) $ac_c" 1>&6
1951
else
1952
  if test "$cross_compiling" = yes; then
1953
  echo "configure: warning: cannot check strcoll if cross compiling -- defaulting to no" 1>&2
1954
    bash_cv_func_strcoll_broken=no
1955
 
1956
else
1957
  cat > conftest.$ac_ext <
1958
#line 1959 "configure"
1959
#include "confdefs.h"
1960
 
1961
#include 
1962
#if defined (HAVE_LOCALE_H)
1963
#include 
1964
#endif
1965
 
1966
main(c, v)
1967
int     c;
1968
char    *v[];
1969
{
1970
        int     r1, r2;
1971
        char    *deflocale, *defcoll;
1972
 
1973
#ifdef HAVE_SETLOCALE
1974
        deflocale = setlocale(LC_ALL, "");
1975
        defcoll = setlocale(LC_COLLATE, "");
1976
#endif
1977
 
1978
#ifdef HAVE_STRCOLL
1979
        /* These two values are taken from tests/glob-test. */
1980
        r1 = strcoll("abd", "aXd");
1981
#else
1982
        r1 = 0;
1983
#endif
1984
        r2 = strcmp("abd", "aXd");
1985
 
1986
        /* These two should both be greater than 0.  It is permissible for
1987
           a system to return different values, as long as the sign is the
1988
           same. */
1989
 
1990
        /* Exit with 1 (failure) if these two values are both > 0, since
1991
           this tests whether strcoll(3) is broken with respect to strcmp(3)
1992
           in the default locale. */
1993
        exit (r1 > 0 && r2 > 0);
1994
}
1995
 
1996
EOF
1997
if { (eval echo configure:1998: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1998
then
1999
  bash_cv_func_strcoll_broken=yes
2000
else
2001
  echo "configure: failed program was:" >&5
2002
  cat conftest.$ac_ext >&5
2003
  rm -fr conftest*
2004
  bash_cv_func_strcoll_broken=no
2005
fi
2006
rm -fr conftest*
2007
fi
2008
 
2009
fi
2010
 
2011
echo "$ac_t""$bash_cv_func_strcoll_broken" 1>&6
2012
if test $bash_cv_func_strcoll_broken = yes; then
2013
cat >> confdefs.h <<\EOF
2014
#define STRCOLL_BROKEN 1
2015
EOF
2016
 
2017
fi
2018
 
2019
 
2020
echo $ac_n "checking whether signal handlers are of type void""... $ac_c" 1>&6
2021
echo "configure:2022: checking whether signal handlers are of type void" >&5
2022
if eval "test \"`echo '$''{'bash_cv_void_sighandler'+set}'`\" = set"; then
2023
  echo $ac_n "(cached) $ac_c" 1>&6
2024
else
2025
  cat > conftest.$ac_ext <
2026
#line 2027 "configure"
2027
#include "confdefs.h"
2028
#include 
2029
#include 
2030
#ifdef signal
2031
#undef signal
2032
#endif
2033
#ifdef __cplusplus
2034
extern "C"
2035
#endif
2036
void (*signal ()) ();
2037
int main() {
2038
int i;
2039
; return 0; }
2040
EOF
2041
if { (eval echo configure:2042: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2042
  rm -rf conftest*
2043
  bash_cv_void_sighandler=yes
2044
else
2045
  echo "configure: failed program was:" >&5
2046
  cat conftest.$ac_ext >&5
2047
  rm -rf conftest*
2048
  bash_cv_void_sighandler=no
2049
fi
2050
rm -f conftest*
2051
fi
2052
echo "$ac_t""$bash_cv_void_sighandler" 1>&6
2053
if test $bash_cv_void_sighandler = yes; then
2054
cat >> confdefs.h <<\EOF
2055
#define VOID_SIGHANDLER 1
2056
EOF
2057
 
2058
fi
2059
 
2060
echo $ac_n "checking for TIOCGWINSZ in sys/ioctl.h""... $ac_c" 1>&6
2061
echo "configure:2062: checking for TIOCGWINSZ in sys/ioctl.h" >&5
2062
if eval "test \"`echo '$''{'bash_cv_tiocgwinsz_in_ioctl'+set}'`\" = set"; then
2063
  echo $ac_n "(cached) $ac_c" 1>&6
2064
else
2065
  cat > conftest.$ac_ext <
2066
#line 2067 "configure"
2067
#include "confdefs.h"
2068
#include 
2069
#include 
2070
int main() {
2071
int x = TIOCGWINSZ;
2072
; return 0; }
2073
EOF
2074
if { (eval echo configure:2075: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2075
  rm -rf conftest*
2076
  bash_cv_tiocgwinsz_in_ioctl=yes
2077
else
2078
  echo "configure: failed program was:" >&5
2079
  cat conftest.$ac_ext >&5
2080
  rm -rf conftest*
2081
  bash_cv_tiocgwinsz_in_ioctl=no
2082
fi
2083
rm -f conftest*
2084
fi
2085
 
2086
echo "$ac_t""$bash_cv_tiocgwinsz_in_ioctl" 1>&6
2087
if test $bash_cv_tiocgwinsz_in_ioctl = yes; then
2088
cat >> confdefs.h <<\EOF
2089
#define GWINSZ_IN_SYS_IOCTL 1
2090
EOF
2091
 
2092
fi
2093
 
2094
echo $ac_n "checking for TIOCSTAT in sys/ioctl.h""... $ac_c" 1>&6
2095
echo "configure:2096: checking for TIOCSTAT in sys/ioctl.h" >&5
2096
if eval "test \"`echo '$''{'bash_cv_tiocstat_in_ioctl'+set}'`\" = set"; then
2097
  echo $ac_n "(cached) $ac_c" 1>&6
2098
else
2099
  cat > conftest.$ac_ext <
2100
#line 2101 "configure"
2101
#include "confdefs.h"
2102
#include 
2103
#include 
2104
int main() {
2105
int x = TIOCSTAT;
2106
; return 0; }
2107
EOF
2108
if { (eval echo configure:2109: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2109
  rm -rf conftest*
2110
  bash_cv_tiocstat_in_ioctl=yes
2111
else
2112
  echo "configure: failed program was:" >&5
2113
  cat conftest.$ac_ext >&5
2114
  rm -rf conftest*
2115
  bash_cv_tiocstat_in_ioctl=no
2116
fi
2117
rm -f conftest*
2118
fi
2119
 
2120
echo "$ac_t""$bash_cv_tiocstat_in_ioctl" 1>&6
2121
if test $bash_cv_tiocstat_in_ioctl = yes; then
2122
cat >> confdefs.h <<\EOF
2123
#define TIOCSTAT_IN_SYS_IOCTL 1
2124
EOF
2125
 
2126
fi
2127
 
2128
echo $ac_n "checking for FIONREAD in sys/ioctl.h""... $ac_c" 1>&6
2129
echo "configure:2130: checking for FIONREAD in sys/ioctl.h" >&5
2130
if eval "test \"`echo '$''{'bash_cv_fionread_in_ioctl'+set}'`\" = set"; then
2131
  echo $ac_n "(cached) $ac_c" 1>&6
2132
else
2133
  cat > conftest.$ac_ext <
2134
#line 2135 "configure"
2135
#include "confdefs.h"
2136
#include 
2137
#include 
2138
int main() {
2139
int x = FIONREAD;
2140
; return 0; }
2141
EOF
2142
if { (eval echo configure:2143: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2143
  rm -rf conftest*
2144
  bash_cv_fionread_in_ioctl=yes
2145
else
2146
  echo "configure: failed program was:" >&5
2147
  cat conftest.$ac_ext >&5
2148
  rm -rf conftest*
2149
  bash_cv_fionread_in_ioctl=no
2150
fi
2151
rm -f conftest*
2152
fi
2153
 
2154
echo "$ac_t""$bash_cv_fionread_in_ioctl" 1>&6
2155
if test $bash_cv_fionread_in_ioctl = yes; then
2156
cat >> confdefs.h <<\EOF
2157
#define FIONREAD_IN_SYS_IOCTL 1
2158
EOF
2159
 
2160
fi
2161
 
2162
echo $ac_n "checking for speed_t in sys/types.h""... $ac_c" 1>&6
2163
echo "configure:2164: checking for speed_t in sys/types.h" >&5
2164
if eval "test \"`echo '$''{'bash_cv_speed_t_in_sys_types'+set}'`\" = set"; then
2165
  echo $ac_n "(cached) $ac_c" 1>&6
2166
else
2167
  cat > conftest.$ac_ext <
2168
#line 2169 "configure"
2169
#include "confdefs.h"
2170
#include 
2171
int main() {
2172
speed_t x;
2173
; return 0; }
2174
EOF
2175
if { (eval echo configure:2176: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2176
  rm -rf conftest*
2177
  bash_cv_speed_t_in_sys_types=yes
2178
else
2179
  echo "configure: failed program was:" >&5
2180
  cat conftest.$ac_ext >&5
2181
  rm -rf conftest*
2182
  bash_cv_speed_t_in_sys_types=no
2183
fi
2184
rm -f conftest*
2185
fi
2186
 
2187
echo "$ac_t""$bash_cv_speed_t_in_sys_types" 1>&6
2188
if test $bash_cv_speed_t_in_sys_types = yes; then
2189
cat >> confdefs.h <<\EOF
2190
#define SPEED_T_IN_SYS_TYPES 1
2191
EOF
2192
 
2193
fi
2194
 
2195
echo $ac_n "checking for struct winsize in sys/ioctl.h and termios.h""... $ac_c" 1>&6
2196
echo "configure:2197: checking for struct winsize in sys/ioctl.h and termios.h" >&5
2197
if eval "test \"`echo '$''{'bash_cv_struct_winsize_header'+set}'`\" = set"; then
2198
  echo $ac_n "(cached) $ac_c" 1>&6
2199
else
2200
  cat > conftest.$ac_ext <
2201
#line 2202 "configure"
2202
#include "confdefs.h"
2203
#include 
2204
#include 
2205
int main() {
2206
struct winsize x;
2207
; return 0; }
2208
EOF
2209
if { (eval echo configure:2210: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2210
  rm -rf conftest*
2211
  bash_cv_struct_winsize_header=ioctl_h
2212
else
2213
  echo "configure: failed program was:" >&5
2214
  cat conftest.$ac_ext >&5
2215
  rm -rf conftest*
2216
  cat > conftest.$ac_ext <
2217
#line 2218 "configure"
2218
#include "confdefs.h"
2219
#include 
2220
#include 
2221
int main() {
2222
struct winsize x;
2223
; return 0; }
2224
EOF
2225
if { (eval echo configure:2226: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2226
  rm -rf conftest*
2227
  bash_cv_struct_winsize_header=termios_h
2228
else
2229
  echo "configure: failed program was:" >&5
2230
  cat conftest.$ac_ext >&5
2231
  rm -rf conftest*
2232
  bash_cv_struct_winsize_header=other
2233
fi
2234
rm -f conftest*
2235
 
2236
fi
2237
rm -f conftest*
2238
fi
2239
 
2240
if test $bash_cv_struct_winsize_header = ioctl_h; then
2241
  echo "$ac_t""sys/ioctl.h" 1>&6
2242
  cat >> confdefs.h <<\EOF
2243
#define STRUCT_WINSIZE_IN_SYS_IOCTL 1
2244
EOF
2245
 
2246
elif test $bash_cv_struct_winsize_header = termios_h; then
2247
  echo "$ac_t""termios.h" 1>&6
2248
  cat >> confdefs.h <<\EOF
2249
#define STRUCT_WINSIZE_IN_TERMIOS 1
2250
EOF
2251
 
2252
else
2253
  echo "$ac_t""not found" 1>&6
2254
fi
2255
 
2256
 
2257
echo $ac_n "checking if struct dirent has a d_ino member""... $ac_c" 1>&6
2258
echo "configure:2259: checking if struct dirent has a d_ino member" >&5
2259
if eval "test \"`echo '$''{'bash_cv_dirent_has_dino'+set}'`\" = set"; then
2260
  echo $ac_n "(cached) $ac_c" 1>&6
2261
else
2262
  cat > conftest.$ac_ext <
2263
#line 2264 "configure"
2264
#include "confdefs.h"
2265
 
2266
#include 
2267
#include 
2268
#ifdef HAVE_UNISTD_H
2269
# include 
2270
#endif /* HAVE_UNISTD_H */
2271
#if defined(HAVE_DIRENT_H)
2272
# include 
2273
#else
2274
# define dirent direct
2275
# ifdef HAVE_SYS_NDIR_H
2276
#  include 
2277
# endif /* SYSNDIR */
2278
# ifdef HAVE_SYS_DIR_H
2279
#  include 
2280
# endif /* SYSDIR */
2281
# ifdef HAVE_NDIR_H
2282
#  include 
2283
# endif
2284
#endif /* HAVE_DIRENT_H */
2285
 
2286
int main() {
2287
 
2288
struct dirent d; int z; z = d.d_ino;
2289
 
2290
; return 0; }
2291
EOF
2292
if { (eval echo configure:2293: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2293
  rm -rf conftest*
2294
  bash_cv_dirent_has_dino=yes
2295
else
2296
  echo "configure: failed program was:" >&5
2297
  cat conftest.$ac_ext >&5
2298
  rm -rf conftest*
2299
  bash_cv_dirent_has_dino=no
2300
fi
2301
rm -f conftest*
2302
fi
2303
 
2304
echo "$ac_t""$bash_cv_dirent_has_dino" 1>&6
2305
if test $bash_cv_dirent_has_dino = yes; then
2306
cat >> confdefs.h <<\EOF
2307
#define STRUCT_DIRENT_HAS_D_INO 1
2308
EOF
2309
 
2310
fi
2311
 
2312
 
2313
echo $ac_n "checking if struct dirent has a d_fileno member""... $ac_c" 1>&6
2314
echo "configure:2315: checking if struct dirent has a d_fileno member" >&5
2315
if eval "test \"`echo '$''{'bash_cv_dirent_has_d_fileno'+set}'`\" = set"; then
2316
  echo $ac_n "(cached) $ac_c" 1>&6
2317
else
2318
  cat > conftest.$ac_ext <
2319
#line 2320 "configure"
2320
#include "confdefs.h"
2321
 
2322
#include 
2323
#include 
2324
#ifdef HAVE_UNISTD_H
2325
# include 
2326
#endif /* HAVE_UNISTD_H */
2327
#if defined(HAVE_DIRENT_H)
2328
# include 
2329
#else
2330
# define dirent direct
2331
# ifdef HAVE_SYS_NDIR_H
2332
#  include 
2333
# endif /* SYSNDIR */
2334
# ifdef HAVE_SYS_DIR_H
2335
#  include 
2336
# endif /* SYSDIR */
2337
# ifdef HAVE_NDIR_H
2338
#  include 
2339
# endif
2340
#endif /* HAVE_DIRENT_H */
2341
 
2342
int main() {
2343
 
2344
struct dirent d; int z; z = d.d_fileno;
2345
 
2346
; return 0; }
2347
EOF
2348
if { (eval echo configure:2349: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2349
  rm -rf conftest*
2350
  bash_cv_dirent_has_d_fileno=yes
2351
else
2352
  echo "configure: failed program was:" >&5
2353
  cat conftest.$ac_ext >&5
2354
  rm -rf conftest*
2355
  bash_cv_dirent_has_d_fileno=no
2356
fi
2357
rm -f conftest*
2358
fi
2359
 
2360
echo "$ac_t""$bash_cv_dirent_has_d_fileno" 1>&6
2361
if test $bash_cv_dirent_has_d_fileno = yes; then
2362
cat >> confdefs.h <<\EOF
2363
#define STRUCT_DIRENT_HAS_D_FILENO 1
2364
EOF
2365
 
2366
fi
2367
 
2368
 
2369
case "$host_os" in
2370
aix*)   prefer_curses=yes ;;
2371
esac
2372
 
2373
if test "X$bash_cv_termcap_lib" = "X"; then
2374
_bash_needmsg=yes
2375
else
2376
echo $ac_n "checking which library has the termcap functions""... $ac_c" 1>&6
2377
echo "configure:2378: checking which library has the termcap functions" >&5
2378
_bash_needmsg=
2379
fi
2380
if eval "test \"`echo '$''{'bash_cv_termcap_lib'+set}'`\" = set"; then
2381
  echo $ac_n "(cached) $ac_c" 1>&6
2382
else
2383
  echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
2384
echo "configure:2385: checking for tgetent in -ltermcap" >&5
2385
ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'`
2386
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2387
  echo $ac_n "(cached) $ac_c" 1>&6
2388
else
2389
  ac_save_LIBS="$LIBS"
2390
LIBS="-ltermcap  $LIBS"
2391
cat > conftest.$ac_ext <
2392
#line 2393 "configure"
2393
#include "confdefs.h"
2394
/* Override any gcc2 internal prototype to avoid an error.  */
2395
/* We use char because int might match the return type of a gcc2
2396
    builtin and then its argument prototype would still apply.  */
2397
char tgetent();
2398
 
2399
int main() {
2400
tgetent()
2401
; return 0; }
2402
EOF
2403
if { (eval echo configure:2404: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2404
  rm -rf conftest*
2405
  eval "ac_cv_lib_$ac_lib_var=yes"
2406
else
2407
  echo "configure: failed program was:" >&5
2408
  cat conftest.$ac_ext >&5
2409
  rm -rf conftest*
2410
  eval "ac_cv_lib_$ac_lib_var=no"
2411
fi
2412
rm -f conftest*
2413
LIBS="$ac_save_LIBS"
2414
 
2415
fi
2416
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2417
  echo "$ac_t""yes" 1>&6
2418
  bash_cv_termcap_lib=libtermcap
2419
else
2420
  echo "$ac_t""no" 1>&6
2421
echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6
2422
echo "configure:2423: checking for tgetent in -lcurses" >&5
2423
ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'`
2424
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2425
  echo $ac_n "(cached) $ac_c" 1>&6
2426
else
2427
  ac_save_LIBS="$LIBS"
2428
LIBS="-lcurses  $LIBS"
2429
cat > conftest.$ac_ext <
2430
#line 2431 "configure"
2431
#include "confdefs.h"
2432
/* Override any gcc2 internal prototype to avoid an error.  */
2433
/* We use char because int might match the return type of a gcc2
2434
    builtin and then its argument prototype would still apply.  */
2435
char tgetent();
2436
 
2437
int main() {
2438
tgetent()
2439
; return 0; }
2440
EOF
2441
if { (eval echo configure:2442: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2442
  rm -rf conftest*
2443
  eval "ac_cv_lib_$ac_lib_var=yes"
2444
else
2445
  echo "configure: failed program was:" >&5
2446
  cat conftest.$ac_ext >&5
2447
  rm -rf conftest*
2448
  eval "ac_cv_lib_$ac_lib_var=no"
2449
fi
2450
rm -f conftest*
2451
LIBS="$ac_save_LIBS"
2452
 
2453
fi
2454
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2455
  echo "$ac_t""yes" 1>&6
2456
  bash_cv_termcap_lib=libcurses
2457
else
2458
  echo "$ac_t""no" 1>&6
2459
echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6
2460
echo "configure:2461: checking for tgetent in -lncurses" >&5
2461
ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'`
2462
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2463
  echo $ac_n "(cached) $ac_c" 1>&6
2464
else
2465
  ac_save_LIBS="$LIBS"
2466
LIBS="-lncurses  $LIBS"
2467
cat > conftest.$ac_ext <
2468
#line 2469 "configure"
2469
#include "confdefs.h"
2470
/* Override any gcc2 internal prototype to avoid an error.  */
2471
/* We use char because int might match the return type of a gcc2
2472
    builtin and then its argument prototype would still apply.  */
2473
char tgetent();
2474
 
2475
int main() {
2476
tgetent()
2477
; return 0; }
2478
EOF
2479
if { (eval echo configure:2480: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2480
  rm -rf conftest*
2481
  eval "ac_cv_lib_$ac_lib_var=yes"
2482
else
2483
  echo "configure: failed program was:" >&5
2484
  cat conftest.$ac_ext >&5
2485
  rm -rf conftest*
2486
  eval "ac_cv_lib_$ac_lib_var=no"
2487
fi
2488
rm -f conftest*
2489
LIBS="$ac_save_LIBS"
2490
 
2491
fi
2492
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2493
  echo "$ac_t""yes" 1>&6
2494
  bash_cv_termcap_lib=libncurses
2495
else
2496
  echo "$ac_t""no" 1>&6
2497
bash_cv_termcap_lib=gnutermcap
2498
fi
2499
 
2500
fi
2501
 
2502
fi
2503
 
2504
fi
2505
 
2506
if test "X$_bash_needmsg" = "Xyes"; then
2507
echo $ac_n "checking which library has the termcap functions""... $ac_c" 1>&6
2508
echo "configure:2509: checking which library has the termcap functions" >&5
2509
fi
2510
echo "$ac_t""using $bash_cv_termcap_lib" 1>&6
2511
if test $bash_cv_termcap_lib = gnutermcap && test -z "$prefer_curses"; then
2512
LDFLAGS="$LDFLAGS -L./lib/termcap"
2513
TERMCAP_LIB="./lib/termcap/libtermcap.a"
2514
TERMCAP_DEP="./lib/termcap/libtermcap.a"
2515
elif test $bash_cv_termcap_lib = libtermcap && test -z "$prefer_curses"; then
2516
TERMCAP_LIB=-ltermcap
2517
TERMCAP_DEP=
2518
elif test $bash_cv_termcap_lib = libncurses; then
2519
TERMCAP_LIB=-lncurses
2520
TERMCAP_DEP=
2521
else
2522
TERMCAP_LIB=-lcurses
2523
TERMCAP_DEP=
2524
fi
2525
 
2526
if test "$TERMCAP_LIB" = "./lib/termcap/libtermcap.a"; then
2527
        TERMCAP_LIB=-ltermcap   #default
2528
fi
2529
 
2530
case "$host_cpu" in
2531
*cray*) LOCAL_CFLAGS=-DCRAY ;;
2532
esac
2533
 
2534
case "$host_os" in
2535
isc*)   LOCAL_CFLAGS=-Disc386 ;;
2536
esac
2537
 
2538
# shared library configuration section
2539
#
2540
# Shared object configuration section.  These values are generated by
2541
# ${srcdir}/support/shobj-conf
2542
#
2543
if test -f ${srcdir}/support/shobj-conf; then
2544
        echo $ac_n "checking configuration for building shared libraries""... $ac_c" 1>&6
2545
echo "configure:2546: checking configuration for building shared libraries" >&5
2546
        eval `${CONFIG_SHELL-/bin/sh} ${srcdir}/support/shobj-conf -C ${CC} -c ${host_cpu} -o ${host_os} -v ${host_vendor}`
2547
 
2548
 
2549
 
2550
 
2551
 
2552
 
2553
 
2554
 
2555
 
2556
 
2557
 
2558
 
2559
        echo "$ac_t""$SHLIB_STATUS" 1>&6
2560
fi
2561
 
2562
BUILD_DIR=`pwd`
2563
 
2564
 
2565
 
2566
 
2567
 
2568
 
2569
 
2570
 
2571
 
2572
 
2573
 
2574
 
2575
 
2576
 
2577
 
2578
 
2579
 
2580
trap '' 1 2 15
2581
cat > confcache <<\EOF
2582
# This file is a shell script that caches the results of configure
2583
# tests run on this system so they can be shared between configure
2584
# scripts and configure runs.  It is not useful on other systems.
2585
# If it contains results you don't want to keep, you may remove or edit it.
2586
#
2587
# By default, configure uses ./config.cache as the cache file,
2588
# creating it if it does not exist already.  You can give configure
2589
# the --cache-file=FILE option to use a different cache file; that is
2590
# what configure does when it calls configure scripts in
2591
# subdirectories, so they share the cache.
2592
# Giving --cache-file=/dev/null disables caching, for debugging configure.
2593
# config.status only pays attention to the cache file if you give it the
2594
# --recheck option to rerun configure.
2595
#
2596
EOF
2597
# The following way of writing the cache mishandles newlines in values,
2598
# but we know of no workaround that is simple, portable, and efficient.
2599
# So, don't put newlines in cache variables' values.
2600
# Ultrix sh set writes to stderr and can't be redirected directly,
2601
# and sets the high bit in the cache file unless we assign to the vars.
2602
(set) 2>&1 |
2603
  case `(ac_space=' '; set | grep ac_space) 2>&1` in
2604
  *ac_space=\ *)
2605
    # `set' does not quote correctly, so add quotes (double-quote substitution
2606
    # turns \\\\ into \\, and sed turns \\ into \).
2607
    sed -n \
2608
      -e "s/'/'\\\\''/g" \
2609
      -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
2610
    ;;
2611
  *)
2612
    # `set' quotes correctly as required by POSIX, so do not add quotes.
2613
    sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
2614
    ;;
2615
  esac >> confcache
2616
if cmp -s $cache_file confcache; then
2617
  :
2618
else
2619
  if test -w $cache_file; then
2620
    echo "updating cache $cache_file"
2621
    cat confcache > $cache_file
2622
  else
2623
    echo "not updating unwritable cache $cache_file"
2624
  fi
2625
fi
2626
rm -f confcache
2627
 
2628
trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
2629
 
2630
test "x$prefix" = xNONE && prefix=$ac_default_prefix
2631
# Let make expand exec_prefix.
2632
test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
2633
 
2634
# Any assignment to VPATH causes Sun make to only execute
2635
# the first set of double-colon rules, so remove it if not needed.
2636
# If there is a colon in the path, we need to keep it.
2637
if test "x$srcdir" = x.; then
2638
  ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
2639
fi
2640
 
2641
trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
2642
 
2643
DEFS=-DHAVE_CONFIG_H
2644
 
2645
# Without the "./", some shells look in PATH for config.status.
2646
: ${CONFIG_STATUS=./config.status}
2647
 
2648
echo creating $CONFIG_STATUS
2649
rm -f $CONFIG_STATUS
2650
cat > $CONFIG_STATUS <
2651
#! /bin/sh
2652
# Generated automatically by configure.
2653
# Run this file to recreate the current configuration.
2654
# This directory was configured as follows,
2655
# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
2656
#
2657
# $0 $ac_configure_args
2658
#
2659
# Compiler output produced by configure, useful for debugging
2660
# configure, is in ./config.log if it exists.
2661
 
2662
ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
2663
for ac_option
2664
do
2665
  case "\$ac_option" in
2666
  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
2667
    echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
2668
    exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
2669
  -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
2670
    echo "$CONFIG_STATUS generated by autoconf version 2.13"
2671
    exit 0 ;;
2672
  -help | --help | --hel | --he | --h)
2673
    echo "\$ac_cs_usage"; exit 0 ;;
2674
  *) echo "\$ac_cs_usage"; exit 1 ;;
2675
  esac
2676
done
2677
 
2678
ac_given_srcdir=$srcdir
2679
ac_given_INSTALL="$INSTALL"
2680
 
2681
trap 'rm -fr `echo "Makefile doc/Makefile examples/Makefile shlib/Makefile config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
2682
EOF
2683
cat >> $CONFIG_STATUS <
2684
 
2685
# Protect against being on the right side of a sed subst in config.status.
2686
sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
2687
 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
2688
$ac_vpsub
2689
$extrasub
2690
s%@SHELL@%$SHELL%g
2691
s%@CFLAGS@%$CFLAGS%g
2692
s%@CPPFLAGS@%$CPPFLAGS%g
2693
s%@CXXFLAGS@%$CXXFLAGS%g
2694
s%@FFLAGS@%$FFLAGS%g
2695
s%@DEFS@%$DEFS%g
2696
s%@LDFLAGS@%$LDFLAGS%g
2697
s%@LIBS@%$LIBS%g
2698
s%@exec_prefix@%$exec_prefix%g
2699
s%@prefix@%$prefix%g
2700
s%@program_transform_name@%$program_transform_name%g
2701
s%@bindir@%$bindir%g
2702
s%@sbindir@%$sbindir%g
2703
s%@libexecdir@%$libexecdir%g
2704
s%@datadir@%$datadir%g
2705
s%@sysconfdir@%$sysconfdir%g
2706
s%@sharedstatedir@%$sharedstatedir%g
2707
s%@localstatedir@%$localstatedir%g
2708
s%@libdir@%$libdir%g
2709
s%@includedir@%$includedir%g
2710
s%@oldincludedir@%$oldincludedir%g
2711
s%@infodir@%$infodir%g
2712
s%@mandir@%$mandir%g
2713
s%@host@%$host%g
2714
s%@host_alias@%$host_alias%g
2715
s%@host_cpu@%$host_cpu%g
2716
s%@host_vendor@%$host_vendor%g
2717
s%@host_os@%$host_os%g
2718
s%@CC@%$CC%g
2719
s%@CPP@%$CPP%g
2720
s%@CROSS_COMPILING_FLAG@%$CROSS_COMPILING_FLAG%g
2721
s%@CC_FOR_BUILD@%$CC_FOR_BUILD%g
2722
s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
2723
s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
2724
s%@INSTALL_DATA@%$INSTALL_DATA%g
2725
s%@AR@%$AR%g
2726
s%@RANLIB@%$RANLIB%g
2727
s%@MAKE_SHELL@%$MAKE_SHELL%g
2728
s%@SHOBJ_CC@%$SHOBJ_CC%g
2729
s%@SHOBJ_CFLAGS@%$SHOBJ_CFLAGS%g
2730
s%@SHOBJ_LD@%$SHOBJ_LD%g
2731
s%@SHOBJ_LDFLAGS@%$SHOBJ_LDFLAGS%g
2732
s%@SHOBJ_XLDFLAGS@%$SHOBJ_XLDFLAGS%g
2733
s%@SHOBJ_LIBS@%$SHOBJ_LIBS%g
2734
s%@SHOBJ_STATUS@%$SHOBJ_STATUS%g
2735
s%@SHLIB_STATUS@%$SHLIB_STATUS%g
2736
s%@SHLIB_XLDFLAGS@%$SHLIB_XLDFLAGS%g
2737
s%@SHLIB_LIBSUFF@%$SHLIB_LIBSUFF%g
2738
s%@SHLIB_LIBVERSION@%$SHLIB_LIBVERSION%g
2739
s%@SHLIB_LIBS@%$SHLIB_LIBS%g
2740
s%@BUILD_DIR@%$BUILD_DIR%g
2741
s%@LOCAL_CFLAGS@%$LOCAL_CFLAGS%g
2742
s%@LOCAL_LDFLAGS@%$LOCAL_LDFLAGS%g
2743
s%@LOCAL_DEFS@%$LOCAL_DEFS%g
2744
s%@ARFLAGS@%$ARFLAGS%g
2745
s%@LIBVERSION@%$LIBVERSION%g
2746
s%@TERMCAP_LIB@%$TERMCAP_LIB%g
2747
 
2748
CEOF
2749
EOF
2750
 
2751
cat >> $CONFIG_STATUS <<\EOF
2752
 
2753
# Split the substitutions into bite-sized pieces for seds with
2754
# small command number limits, like on Digital OSF/1 and HP-UX.
2755
ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
2756
ac_file=1 # Number of current file.
2757
ac_beg=1 # First line for current file.
2758
ac_end=$ac_max_sed_cmds # Line after last line for current file.
2759
ac_more_lines=:
2760
ac_sed_cmds=""
2761
while $ac_more_lines; do
2762
  if test $ac_beg -gt 1; then
2763
    sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
2764
  else
2765
    sed "${ac_end}q" conftest.subs > conftest.s$ac_file
2766
  fi
2767
  if test ! -s conftest.s$ac_file; then
2768
    ac_more_lines=false
2769
    rm -f conftest.s$ac_file
2770
  else
2771
    if test -z "$ac_sed_cmds"; then
2772
      ac_sed_cmds="sed -f conftest.s$ac_file"
2773
    else
2774
      ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
2775
    fi
2776
    ac_file=`expr $ac_file + 1`
2777
    ac_beg=$ac_end
2778
    ac_end=`expr $ac_end + $ac_max_sed_cmds`
2779
  fi
2780
done
2781
if test -z "$ac_sed_cmds"; then
2782
  ac_sed_cmds=cat
2783
fi
2784
EOF
2785
 
2786
cat >> $CONFIG_STATUS <
2787
 
2788
CONFIG_FILES=\${CONFIG_FILES-"Makefile doc/Makefile examples/Makefile shlib/Makefile"}
2789
EOF
2790
cat >> $CONFIG_STATUS <<\EOF
2791
for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
2792
  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
2793
  case "$ac_file" in
2794
  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
2795
       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2796
  *) ac_file_in="${ac_file}.in" ;;
2797
  esac
2798
 
2799
  # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
2800
 
2801
  # Remove last slash and all that follows it.  Not all systems have dirname.
2802
  ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2803
  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
2804
    # The file is in a subdirectory.
2805
    test ! -d "$ac_dir" && mkdir "$ac_dir"
2806
    ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
2807
    # A "../" for each directory in $ac_dir_suffix.
2808
    ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
2809
  else
2810
    ac_dir_suffix= ac_dots=
2811
  fi
2812
 
2813
  case "$ac_given_srcdir" in
2814
  .)  srcdir=.
2815
      if test -z "$ac_dots"; then top_srcdir=.
2816
      else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
2817
  /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
2818
  *) # Relative path.
2819
    srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
2820
    top_srcdir="$ac_dots$ac_given_srcdir" ;;
2821
  esac
2822
 
2823
  case "$ac_given_INSTALL" in
2824
  [/$]*) INSTALL="$ac_given_INSTALL" ;;
2825
  *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
2826
  esac
2827
 
2828
  echo creating "$ac_file"
2829
  rm -f "$ac_file"
2830
  configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
2831
  case "$ac_file" in
2832
  *Makefile*) ac_comsub="1i\\
2833
# $configure_input" ;;
2834
  *) ac_comsub= ;;
2835
  esac
2836
 
2837
  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
2838
  sed -e "$ac_comsub
2839
s%@configure_input@%$configure_input%g
2840
s%@srcdir@%$srcdir%g
2841
s%@top_srcdir@%$top_srcdir%g
2842
s%@INSTALL@%$INSTALL%g
2843
" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
2844
fi; done
2845
rm -f conftest.s*
2846
 
2847
# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
2848
# NAME is the cpp macro being defined and VALUE is the value it is being given.
2849
#
2850
# ac_d sets the value in "#define NAME VALUE" lines.
2851
ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
2852
ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
2853
ac_dC='\3'
2854
ac_dD='%g'
2855
# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
2856
ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
2857
ac_uB='\([      ]\)%\1#\2define\3'
2858
ac_uC=' '
2859
ac_uD='\4%g'
2860
# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
2861
ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
2862
ac_eB='$%\1#\2define\3'
2863
ac_eC=' '
2864
ac_eD='%g'
2865
 
2866
if test "${CONFIG_HEADERS+set}" != set; then
2867
EOF
2868
cat >> $CONFIG_STATUS <
2869
  CONFIG_HEADERS="config.h"
2870
EOF
2871
cat >> $CONFIG_STATUS <<\EOF
2872
fi
2873
for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
2874
  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
2875
  case "$ac_file" in
2876
  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
2877
       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2878
  *) ac_file_in="${ac_file}.in" ;;
2879
  esac
2880
 
2881
  echo creating $ac_file
2882
 
2883
  rm -f conftest.frag conftest.in conftest.out
2884
  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
2885
  cat $ac_file_inputs > conftest.in
2886
 
2887
EOF
2888
 
2889
# Transform confdefs.h into a sed script conftest.vals that substitutes
2890
# the proper values into config.h.in to produce config.h.  And first:
2891
# Protect against being on the right side of a sed subst in config.status.
2892
# Protect against being in an unquoted here document in config.status.
2893
rm -f conftest.vals
2894
cat > conftest.hdr <<\EOF
2895
s/[\\&%]/\\&/g
2896
s%[\\$`]%\\&%g
2897
s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
2898
s%ac_d%ac_u%gp
2899
s%ac_u%ac_e%gp
2900
EOF
2901
sed -n -f conftest.hdr confdefs.h > conftest.vals
2902
rm -f conftest.hdr
2903
 
2904
# This sed command replaces #undef with comments.  This is necessary, for
2905
# example, in the case of _POSIX_SOURCE, which is predefined and required
2906
# on some systems where configure will not decide to define it.
2907
cat >> conftest.vals <<\EOF
2908
s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
2909
EOF
2910
 
2911
# Break up conftest.vals because some shells have a limit on
2912
# the size of here documents, and old seds have small limits too.
2913
 
2914
rm -f conftest.tail
2915
while :
2916
do
2917
  ac_lines=`grep -c . conftest.vals`
2918
  # grep -c gives empty output for an empty file on some AIX systems.
2919
  if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
2920
  # Write a limited-size here document to conftest.frag.
2921
  echo '  cat > conftest.frag <> $CONFIG_STATUS
2922
  sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
2923
  echo 'CEOF
2924
  sed -f conftest.frag conftest.in > conftest.out
2925
  rm -f conftest.in
2926
  mv conftest.out conftest.in
2927
' >> $CONFIG_STATUS
2928
  sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
2929
  rm -f conftest.vals
2930
  mv conftest.tail conftest.vals
2931
done
2932
rm -f conftest.vals
2933
 
2934
cat >> $CONFIG_STATUS <<\EOF
2935
  rm -f conftest.frag conftest.h
2936
  echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
2937
  cat conftest.in >> conftest.h
2938
  rm -f conftest.in
2939
  if cmp -s $ac_file conftest.h 2>/dev/null; then
2940
    echo "$ac_file is unchanged"
2941
    rm -f conftest.h
2942
  else
2943
    # Remove last slash and all that follows it.  Not all systems have dirname.
2944
      ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2945
      if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
2946
      # The file is in a subdirectory.
2947
      test ! -d "$ac_dir" && mkdir "$ac_dir"
2948
    fi
2949
    rm -f $ac_file
2950
    mv conftest.h $ac_file
2951
  fi
2952
fi; done
2953
 
2954
EOF
2955
cat >> $CONFIG_STATUS <
2956
 
2957
EOF
2958
cat >> $CONFIG_STATUS <<\EOF
2959
 
2960
# Makefile uses this timestamp file to record whether config.h is up to date.
2961
echo > stamp-h
2962
 
2963
exit 0
2964
EOF
2965
chmod +x $CONFIG_STATUS
2966
rm -fr confdefs* $ac_clean_files
2967
test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
2968
 

powered by: WebSVN 2.1.0

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