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