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