2001-06-15 Elena Zannoni <ezannoni@redhat.com>
[deliverable/binutils-gdb.git] / readline / configure
... / ...
CommitLineData
1#! /bin/sh
2
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
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106# Guess values for system-dependent variables and create Makefiles.
107# Generated automatically using autoconf version 2.13
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=
157SHELL=${CONFIG_SHELL-/bin/sh}
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)
441 echo "configure generated by autoconf version 2.13"
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.
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"
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'
611ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
612cross_compiling=$ac_cv_prog_cc_cross
613
614ac_exeext=
615ac_objext=o
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
633
634ac_aux_dir=
635for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
636 if test -f $ac_dir/install-sh; then
637 ac_aux_dir=$ac_dir
638 ac_install_sh="$ac_aux_dir/install-sh -c"
639 break
640 elif test -f $ac_dir/install.sh; then
641 ac_aux_dir=$ac_dir
642 ac_install_sh="$ac_aux_dir/install.sh -c"
643 break
644 fi
645done
646if test -z "$ac_aux_dir"; then
647 { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
648fi
649ac_config_guess=$ac_aux_dir/config.guess
650ac_config_sub=$ac_aux_dir/config.sub
651ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
652
653
654# Make sure we can run config.sub.
655if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
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
660echo "configure:661: checking host system type" >&5
661
662host_alias=$host
663case "$host_alias" in
664NONE)
665 case $nonopt in
666 NONE)
667 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
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
674host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
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
701echo "configure:702: checking for $ac_word" >&5
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
708 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
709 ac_dummy="$PATH"
710 for ac_dir in $ac_dummy; do
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
731echo "configure:732: checking for $ac_word" >&5
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
738 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
739 ac_prog_rejected=no
740 ac_dummy="$PATH"
741 for ac_dir in $ac_dummy; do
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
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
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
814echo "configure:815: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
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'
820ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
821cross_compiling=$ac_cv_prog_cc_cross
822
823cat > conftest.$ac_ext << EOF
824
825#line 826 "configure"
826#include "confdefs.h"
827
828main(){return(0);}
829EOF
830if { (eval echo configure:831: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
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*
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
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
856echo "configure:857: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
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
861echo "configure:862: checking whether we are using GNU C" >&5
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
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
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
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
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
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
908 CFLAGS="-g -O2"
909 else
910 CFLAGS="-g"
911 fi
912else
913 if test "$GCC" = yes; then
914 CFLAGS="-O2"
915 else
916 CFLAGS=
917 fi
918fi
919
920echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
921echo "configure:922: checking how to run the C preprocessor" >&5
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
936#line 937 "configure"
937#include "confdefs.h"
938#include <assert.h>
939Syntax Error
940EOF
941ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
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}\$"`
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
953#line 954 "configure"
954#include "confdefs.h"
955#include <assert.h>
956Syntax Error
957EOF
958ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
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}\$"`
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
989rm -f conftest*
990fi
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
1002echo "configure:1003: checking for minix/config.h" >&5
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
1007#line 1008 "configure"
1008#include "confdefs.h"
1009#include <minix/config.h>
1010EOF
1011ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
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}\$"`
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
1050
1051if test "x$cross_compiling" = "xyes"; then
1052 case "${host}" in
1053 *-cygwin*)
1054 cross_cache=${srcdir}/cross-build/cygwin.cache
1055 if test -r "${cross_cache}"; then
1056 echo "loading cross-build cache file ${cross_cache}"
1057 . ${cross_cache}
1058 fi
1059 LOCAL_CFLAGS="$LOCAL_CFLAGS -I${srcdir}/../libtermcap"
1060 unset cross_cache
1061 ;;
1062 *) echo "configure: cross-compiling for a non-cygwin target is not supported" >&2
1063 ;;
1064 esac
1065fi
1066
1067if test "x$cross_compiling" = "xyes"; then
1068 CROSS_COMPILING_FLAG=-DCROSS_COMPILING
1069else
1070 CROSS_COMPILING_FLAG=
1071fi
1072
1073
1074if test -z "$CC_FOR_BUILD"; then
1075 if test "x$cross_compiling" = "xno"; then
1076 CC_FOR_BUILD='$(CC)'
1077 else
1078 CC_FOR_BUILD=gcc
1079 fi
1080fi
1081
1082
1083
1084# If we're using gcc and the user hasn't specified CFLAGS, add -O to CFLAGS.
1085test -n "$GCC" && test -n "$auto_cflags" && CFLAGS="$CFLAGS -O"
1086
1087if test $ac_cv_prog_gcc = yes; then
1088 echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
1089echo "configure:1090: checking whether ${CC-cc} needs -traditional" >&5
1090if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then
1091 echo $ac_n "(cached) $ac_c" 1>&6
1092else
1093 ac_pattern="Autoconf.*'x'"
1094 cat > conftest.$ac_ext <<EOF
1095#line 1096 "configure"
1096#include "confdefs.h"
1097#include <sgtty.h>
1098Autoconf TIOCGETP
1099EOF
1100if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1101 egrep "$ac_pattern" >/dev/null 2>&1; then
1102 rm -rf conftest*
1103 ac_cv_prog_gcc_traditional=yes
1104else
1105 rm -rf conftest*
1106 ac_cv_prog_gcc_traditional=no
1107fi
1108rm -f conftest*
1109
1110
1111 if test $ac_cv_prog_gcc_traditional = no; then
1112 cat > conftest.$ac_ext <<EOF
1113#line 1114 "configure"
1114#include "confdefs.h"
1115#include <termio.h>
1116Autoconf TCGETA
1117EOF
1118if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1119 egrep "$ac_pattern" >/dev/null 2>&1; then
1120 rm -rf conftest*
1121 ac_cv_prog_gcc_traditional=yes
1122fi
1123rm -f conftest*
1124
1125 fi
1126fi
1127
1128echo "$ac_t""$ac_cv_prog_gcc_traditional" 1>&6
1129 if test $ac_cv_prog_gcc_traditional = yes; then
1130 CC="$CC -traditional"
1131 fi
1132fi
1133
1134# Find a good install program. We prefer a C program (faster),
1135# so one script is as good as another. But avoid the broken or
1136# incompatible versions:
1137# SysV /etc/install, /usr/sbin/install
1138# SunOS /usr/etc/install
1139# IRIX /sbin/install
1140# AIX /bin/install
1141# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1142# AFS /usr/afsws/bin/install, which mishandles nonexistent args
1143# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1144# ./install, which can be erroneously created by make from ./install.sh.
1145echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1146echo "configure:1147: checking for a BSD compatible install" >&5
1147if test -z "$INSTALL"; then
1148if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1149 echo $ac_n "(cached) $ac_c" 1>&6
1150else
1151 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
1152 for ac_dir in $PATH; do
1153 # Account for people who put trailing slashes in PATH elements.
1154 case "$ac_dir/" in
1155 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1156 *)
1157 # OSF1 and SCO ODT 3.0 have their own names for install.
1158 # Don't use installbsd from OSF since it installs stuff as root
1159 # by default.
1160 for ac_prog in ginstall scoinst install; do
1161 if test -f $ac_dir/$ac_prog; then
1162 if test $ac_prog = install &&
1163 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1164 # AIX install. It has an incompatible calling convention.
1165 :
1166 else
1167 ac_cv_path_install="$ac_dir/$ac_prog -c"
1168 break 2
1169 fi
1170 fi
1171 done
1172 ;;
1173 esac
1174 done
1175 IFS="$ac_save_IFS"
1176
1177fi
1178 if test "${ac_cv_path_install+set}" = set; then
1179 INSTALL="$ac_cv_path_install"
1180 else
1181 # As a last resort, use the slow shell script. We don't cache a
1182 # path for INSTALL within a source directory, because that will
1183 # break other packages using the cache if that directory is
1184 # removed, or if the path is relative.
1185 INSTALL="$ac_install_sh"
1186 fi
1187fi
1188echo "$ac_t""$INSTALL" 1>&6
1189
1190# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1191# It thinks the first close brace ends the variable substitution.
1192test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1193
1194test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
1195
1196test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1197
1198# Extract the first word of "ar", so it can be a program name with args.
1199set dummy ar; ac_word=$2
1200echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1201echo "configure:1202: checking for $ac_word" >&5
1202if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
1203 echo $ac_n "(cached) $ac_c" 1>&6
1204else
1205 if test -n "$AR"; then
1206 ac_cv_prog_AR="$AR" # Let the user override the test.
1207else
1208 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1209 ac_dummy="$PATH"
1210 for ac_dir in $ac_dummy; do
1211 test -z "$ac_dir" && ac_dir=.
1212 if test -f $ac_dir/$ac_word; then
1213 ac_cv_prog_AR="ar"
1214 break
1215 fi
1216 done
1217 IFS="$ac_save_ifs"
1218fi
1219fi
1220AR="$ac_cv_prog_AR"
1221if test -n "$AR"; then
1222 echo "$ac_t""$AR" 1>&6
1223else
1224 echo "$ac_t""no" 1>&6
1225fi
1226
1227test -n "$ARFLAGS" || ARFLAGS="cr"
1228# Extract the first word of "ranlib", so it can be a program name with args.
1229set dummy ranlib; ac_word=$2
1230echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1231echo "configure:1232: checking for $ac_word" >&5
1232if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1233 echo $ac_n "(cached) $ac_c" 1>&6
1234else
1235 if test -n "$RANLIB"; then
1236 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1237else
1238 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1239 ac_dummy="$PATH"
1240 for ac_dir in $ac_dummy; do
1241 test -z "$ac_dir" && ac_dir=.
1242 if test -f $ac_dir/$ac_word; then
1243 ac_cv_prog_RANLIB="ranlib"
1244 break
1245 fi
1246 done
1247 IFS="$ac_save_ifs"
1248 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1249fi
1250fi
1251RANLIB="$ac_cv_prog_RANLIB"
1252if test -n "$RANLIB"; then
1253 echo "$ac_t""$RANLIB" 1>&6
1254else
1255 echo "$ac_t""no" 1>&6
1256fi
1257
1258
1259MAKE_SHELL=/bin/sh
1260
1261
1262echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
1263echo "configure:1264: checking return type of signal handlers" >&5
1264if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
1265 echo $ac_n "(cached) $ac_c" 1>&6
1266else
1267 cat > conftest.$ac_ext <<EOF
1268#line 1269 "configure"
1269#include "confdefs.h"
1270#include <sys/types.h>
1271#include <signal.h>
1272#ifdef signal
1273#undef signal
1274#endif
1275#ifdef __cplusplus
1276extern "C" void (*signal (int, void (*)(int)))(int);
1277#else
1278void (*signal ()) ();
1279#endif
1280
1281int main() {
1282int i;
1283; return 0; }
1284EOF
1285if { (eval echo configure:1286: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1286 rm -rf conftest*
1287 ac_cv_type_signal=void
1288else
1289 echo "configure: failed program was:" >&5
1290 cat conftest.$ac_ext >&5
1291 rm -rf conftest*
1292 ac_cv_type_signal=int
1293fi
1294rm -f conftest*
1295fi
1296
1297echo "$ac_t""$ac_cv_type_signal" 1>&6
1298cat >> confdefs.h <<EOF
1299#define RETSIGTYPE $ac_cv_type_signal
1300EOF
1301
1302
1303
1304echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6
1305echo "configure:1306: checking whether stat file-mode macros are broken" >&5
1306if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then
1307 echo $ac_n "(cached) $ac_c" 1>&6
1308else
1309 cat > conftest.$ac_ext <<EOF
1310#line 1311 "configure"
1311#include "confdefs.h"
1312#include <sys/types.h>
1313#include <sys/stat.h>
1314
1315#if defined(S_ISBLK) && defined(S_IFDIR)
1316# if S_ISBLK (S_IFDIR)
1317You lose.
1318# endif
1319#endif
1320
1321#if defined(S_ISBLK) && defined(S_IFCHR)
1322# if S_ISBLK (S_IFCHR)
1323You lose.
1324# endif
1325#endif
1326
1327#if defined(S_ISLNK) && defined(S_IFREG)
1328# if S_ISLNK (S_IFREG)
1329You lose.
1330# endif
1331#endif
1332
1333#if defined(S_ISSOCK) && defined(S_IFREG)
1334# if S_ISSOCK (S_IFREG)
1335You lose.
1336# endif
1337#endif
1338
1339EOF
1340if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1341 egrep "You lose" >/dev/null 2>&1; then
1342 rm -rf conftest*
1343 ac_cv_header_stat_broken=yes
1344else
1345 rm -rf conftest*
1346 ac_cv_header_stat_broken=no
1347fi
1348rm -f conftest*
1349
1350fi
1351
1352echo "$ac_t""$ac_cv_header_stat_broken" 1>&6
1353if test $ac_cv_header_stat_broken = yes; then
1354 cat >> confdefs.h <<\EOF
1355#define STAT_MACROS_BROKEN 1
1356EOF
1357
1358fi
1359
1360ac_header_dirent=no
1361for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
1362do
1363ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1364echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
1365echo "configure:1366: checking for $ac_hdr that defines DIR" >&5
1366if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
1367 echo $ac_n "(cached) $ac_c" 1>&6
1368else
1369 cat > conftest.$ac_ext <<EOF
1370#line 1371 "configure"
1371#include "confdefs.h"
1372#include <sys/types.h>
1373#include <$ac_hdr>
1374int main() {
1375DIR *dirp = 0;
1376; return 0; }
1377EOF
1378if { (eval echo configure:1379: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1379 rm -rf conftest*
1380 eval "ac_cv_header_dirent_$ac_safe=yes"
1381else
1382 echo "configure: failed program was:" >&5
1383 cat conftest.$ac_ext >&5
1384 rm -rf conftest*
1385 eval "ac_cv_header_dirent_$ac_safe=no"
1386fi
1387rm -f conftest*
1388fi
1389if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
1390 echo "$ac_t""yes" 1>&6
1391 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1392 cat >> confdefs.h <<EOF
1393#define $ac_tr_hdr 1
1394EOF
1395 ac_header_dirent=$ac_hdr; break
1396else
1397 echo "$ac_t""no" 1>&6
1398fi
1399done
1400# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
1401if test $ac_header_dirent = dirent.h; then
1402echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
1403echo "configure:1404: checking for opendir in -ldir" >&5
1404ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
1405if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1406 echo $ac_n "(cached) $ac_c" 1>&6
1407else
1408 ac_save_LIBS="$LIBS"
1409LIBS="-ldir $LIBS"
1410cat > conftest.$ac_ext <<EOF
1411#line 1412 "configure"
1412#include "confdefs.h"
1413/* Override any gcc2 internal prototype to avoid an error. */
1414/* We use char because int might match the return type of a gcc2
1415 builtin and then its argument prototype would still apply. */
1416char opendir();
1417
1418int main() {
1419opendir()
1420; return 0; }
1421EOF
1422if { (eval echo configure:1423: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1423 rm -rf conftest*
1424 eval "ac_cv_lib_$ac_lib_var=yes"
1425else
1426 echo "configure: failed program was:" >&5
1427 cat conftest.$ac_ext >&5
1428 rm -rf conftest*
1429 eval "ac_cv_lib_$ac_lib_var=no"
1430fi
1431rm -f conftest*
1432LIBS="$ac_save_LIBS"
1433
1434fi
1435if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1436 echo "$ac_t""yes" 1>&6
1437 LIBS="$LIBS -ldir"
1438else
1439 echo "$ac_t""no" 1>&6
1440fi
1441
1442else
1443echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
1444echo "configure:1445: checking for opendir in -lx" >&5
1445ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
1446if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1447 echo $ac_n "(cached) $ac_c" 1>&6
1448else
1449 ac_save_LIBS="$LIBS"
1450LIBS="-lx $LIBS"
1451cat > conftest.$ac_ext <<EOF
1452#line 1453 "configure"
1453#include "confdefs.h"
1454/* Override any gcc2 internal prototype to avoid an error. */
1455/* We use char because int might match the return type of a gcc2
1456 builtin and then its argument prototype would still apply. */
1457char opendir();
1458
1459int main() {
1460opendir()
1461; return 0; }
1462EOF
1463if { (eval echo configure:1464: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1464 rm -rf conftest*
1465 eval "ac_cv_lib_$ac_lib_var=yes"
1466else
1467 echo "configure: failed program was:" >&5
1468 cat conftest.$ac_ext >&5
1469 rm -rf conftest*
1470 eval "ac_cv_lib_$ac_lib_var=no"
1471fi
1472rm -f conftest*
1473LIBS="$ac_save_LIBS"
1474
1475fi
1476if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1477 echo "$ac_t""yes" 1>&6
1478 LIBS="$LIBS -lx"
1479else
1480 echo "$ac_t""no" 1>&6
1481fi
1482
1483fi
1484
1485
1486for ac_func in lstat memmove putenv select setenv setlocale \
1487 strcasecmp tcgetattr
1488do
1489echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1490echo "configure:1491: checking for $ac_func" >&5
1491if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1492 echo $ac_n "(cached) $ac_c" 1>&6
1493else
1494 cat > conftest.$ac_ext <<EOF
1495#line 1496 "configure"
1496#include "confdefs.h"
1497/* System header to define __stub macros and hopefully few prototypes,
1498 which can conflict with char $ac_func(); below. */
1499#include <assert.h>
1500/* Override any gcc2 internal prototype to avoid an error. */
1501/* We use char because int might match the return type of a gcc2
1502 builtin and then its argument prototype would still apply. */
1503char $ac_func();
1504
1505int main() {
1506
1507/* The GNU C library defines this for functions which it implements
1508 to always fail with ENOSYS. Some functions are actually named
1509 something starting with __ and the normal name is an alias. */
1510#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1511choke me
1512#else
1513$ac_func();
1514#endif
1515
1516; return 0; }
1517EOF
1518if { (eval echo configure:1519: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1519 rm -rf conftest*
1520 eval "ac_cv_func_$ac_func=yes"
1521else
1522 echo "configure: failed program was:" >&5
1523 cat conftest.$ac_ext >&5
1524 rm -rf conftest*
1525 eval "ac_cv_func_$ac_func=no"
1526fi
1527rm -f conftest*
1528fi
1529
1530if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1531 echo "$ac_t""yes" 1>&6
1532 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1533 cat >> confdefs.h <<EOF
1534#define $ac_tr_func 1
1535EOF
1536
1537else
1538 echo "$ac_t""no" 1>&6
1539fi
1540done
1541
1542
1543echo $ac_n "checking for working strcoll""... $ac_c" 1>&6
1544echo "configure:1545: checking for working strcoll" >&5
1545if eval "test \"`echo '$''{'ac_cv_func_strcoll_works'+set}'`\" = set"; then
1546 echo $ac_n "(cached) $ac_c" 1>&6
1547else
1548 if test "$cross_compiling" = yes; then
1549 ac_cv_func_strcoll_works=no
1550else
1551 cat > conftest.$ac_ext <<EOF
1552#line 1553 "configure"
1553#include "confdefs.h"
1554#include <string.h>
1555main ()
1556{
1557 exit (strcoll ("abc", "def") >= 0 ||
1558 strcoll ("ABC", "DEF") >= 0 ||
1559 strcoll ("123", "456") >= 0);
1560}
1561EOF
1562if { (eval echo configure:1563: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1563then
1564 ac_cv_func_strcoll_works=yes
1565else
1566 echo "configure: failed program was:" >&5
1567 cat conftest.$ac_ext >&5
1568 rm -fr conftest*
1569 ac_cv_func_strcoll_works=no
1570fi
1571rm -fr conftest*
1572fi
1573
1574fi
1575
1576echo "$ac_t""$ac_cv_func_strcoll_works" 1>&6
1577if test $ac_cv_func_strcoll_works = yes; then
1578 cat >> confdefs.h <<\EOF
1579#define HAVE_STRCOLL 1
1580EOF
1581
1582fi
1583
1584
1585for ac_hdr in unistd.h stdlib.h varargs.h stdarg.h string.h \
1586 sys/ptem.h sys/pte.h sys/stream.h sys/select.h \
1587 termcap.h termios.h termio.h sys/file.h locale.h
1588do
1589ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1590echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1591echo "configure:1592: checking for $ac_hdr" >&5
1592if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1593 echo $ac_n "(cached) $ac_c" 1>&6
1594else
1595 cat > conftest.$ac_ext <<EOF
1596#line 1597 "configure"
1597#include "confdefs.h"
1598#include <$ac_hdr>
1599EOF
1600ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1601{ (eval echo configure:1602: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1602ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1603if test -z "$ac_err"; then
1604 rm -rf conftest*
1605 eval "ac_cv_header_$ac_safe=yes"
1606else
1607 echo "$ac_err" >&5
1608 echo "configure: failed program was:" >&5
1609 cat conftest.$ac_ext >&5
1610 rm -rf conftest*
1611 eval "ac_cv_header_$ac_safe=no"
1612fi
1613rm -f conftest*
1614fi
1615if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1616 echo "$ac_t""yes" 1>&6
1617 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1618 cat >> confdefs.h <<EOF
1619#define $ac_tr_hdr 1
1620EOF
1621
1622else
1623 echo "$ac_t""no" 1>&6
1624fi
1625done
1626
1627
1628
1629echo $ac_n "checking for type of signal functions""... $ac_c" 1>&6
1630echo "configure:1631: checking for type of signal functions" >&5
1631if eval "test \"`echo '$''{'bash_cv_signal_vintage'+set}'`\" = set"; then
1632 echo $ac_n "(cached) $ac_c" 1>&6
1633else
1634
1635 cat > conftest.$ac_ext <<EOF
1636#line 1637 "configure"
1637#include "confdefs.h"
1638#include <signal.h>
1639int main() {
1640
1641 sigset_t ss;
1642 struct sigaction sa;
1643 sigemptyset(&ss); sigsuspend(&ss);
1644 sigaction(SIGINT, &sa, (struct sigaction *) 0);
1645 sigprocmask(SIG_BLOCK, &ss, (sigset_t *) 0);
1646
1647; return 0; }
1648EOF
1649if { (eval echo configure:1650: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1650 rm -rf conftest*
1651 bash_cv_signal_vintage=posix
1652else
1653 echo "configure: failed program was:" >&5
1654 cat conftest.$ac_ext >&5
1655 rm -rf conftest*
1656
1657 cat > conftest.$ac_ext <<EOF
1658#line 1659 "configure"
1659#include "confdefs.h"
1660#include <signal.h>
1661int main() {
1662
1663 int mask = sigmask(SIGINT);
1664 sigsetmask(mask); sigblock(mask); sigpause(mask);
1665
1666; return 0; }
1667EOF
1668if { (eval echo configure:1669: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1669 rm -rf conftest*
1670 bash_cv_signal_vintage=4.2bsd
1671else
1672 echo "configure: failed program was:" >&5
1673 cat conftest.$ac_ext >&5
1674 rm -rf conftest*
1675
1676 cat > conftest.$ac_ext <<EOF
1677#line 1678 "configure"
1678#include "confdefs.h"
1679
1680 #include <signal.h>
1681 RETSIGTYPE foo() { }
1682int main() {
1683
1684 int mask = sigmask(SIGINT);
1685 sigset(SIGINT, foo); sigrelse(SIGINT);
1686 sighold(SIGINT); sigpause(SIGINT);
1687
1688; return 0; }
1689EOF
1690if { (eval echo configure:1691: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1691 rm -rf conftest*
1692 bash_cv_signal_vintage=svr3
1693else
1694 echo "configure: failed program was:" >&5
1695 cat conftest.$ac_ext >&5
1696 rm -rf conftest*
1697 bash_cv_signal_vintage=v7
1698
1699fi
1700rm -f conftest*
1701
1702fi
1703rm -f conftest*
1704
1705fi
1706rm -f conftest*
1707
1708fi
1709
1710echo "$ac_t""$bash_cv_signal_vintage" 1>&6
1711if test "$bash_cv_signal_vintage" = posix; then
1712cat >> confdefs.h <<\EOF
1713#define HAVE_POSIX_SIGNALS 1
1714EOF
1715
1716elif test "$bash_cv_signal_vintage" = "4.2bsd"; then
1717cat >> confdefs.h <<\EOF
1718#define HAVE_BSD_SIGNALS 1
1719EOF
1720
1721elif test "$bash_cv_signal_vintage" = svr3; then
1722cat >> confdefs.h <<\EOF
1723#define HAVE_USG_SIGHOLD 1
1724EOF
1725
1726fi
1727
1728
1729
1730echo $ac_n "checking if signal handlers must be reinstalled when invoked""... $ac_c" 1>&6
1731echo "configure:1732: checking if signal handlers must be reinstalled when invoked" >&5
1732if eval "test \"`echo '$''{'bash_cv_must_reinstall_sighandlers'+set}'`\" = set"; then
1733 echo $ac_n "(cached) $ac_c" 1>&6
1734else
1735 if test "$cross_compiling" = yes; then
1736 echo "configure: warning: cannot check signal handling if cross compiling -- defaulting to no" 1>&2
1737 bash_cv_must_reinstall_sighandlers=no
1738
1739else
1740 cat > conftest.$ac_ext <<EOF
1741#line 1742 "configure"
1742#include "confdefs.h"
1743
1744#include <signal.h>
1745#ifdef HAVE_UNISTD_H
1746#include <unistd.h>
1747#endif
1748
1749typedef RETSIGTYPE sigfunc();
1750
1751int nsigint;
1752
1753#ifdef HAVE_POSIX_SIGNALS
1754sigfunc *
1755set_signal_handler(sig, handler)
1756 int sig;
1757 sigfunc *handler;
1758{
1759 struct sigaction act, oact;
1760 act.sa_handler = handler;
1761 act.sa_flags = 0;
1762 sigemptyset (&act.sa_mask);
1763 sigemptyset (&oact.sa_mask);
1764 sigaction (sig, &act, &oact);
1765 return (oact.sa_handler);
1766}
1767#else
1768#define set_signal_handler(s, h) signal(s, h)
1769#endif
1770
1771RETSIGTYPE
1772sigint(s)
1773int s;
1774{
1775 nsigint++;
1776}
1777
1778main()
1779{
1780 nsigint = 0;
1781 set_signal_handler(SIGINT, sigint);
1782 kill((int)getpid(), SIGINT);
1783 kill((int)getpid(), SIGINT);
1784 exit(nsigint != 2);
1785}
1786
1787EOF
1788if { (eval echo configure:1789: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1789then
1790 bash_cv_must_reinstall_sighandlers=no
1791else
1792 echo "configure: failed program was:" >&5
1793 cat conftest.$ac_ext >&5
1794 rm -fr conftest*
1795 bash_cv_must_reinstall_sighandlers=yes
1796fi
1797rm -fr conftest*
1798fi
1799
1800fi
1801
1802echo "$ac_t""$bash_cv_must_reinstall_sighandlers" 1>&6
1803if test $bash_cv_must_reinstall_sighandlers = yes; then
1804cat >> confdefs.h <<\EOF
1805#define MUST_REINSTALL_SIGHANDLERS 1
1806EOF
1807
1808fi
1809
1810
1811
1812echo $ac_n "checking for presence of POSIX-style sigsetjmp/siglongjmp""... $ac_c" 1>&6
1813echo "configure:1814: checking for presence of POSIX-style sigsetjmp/siglongjmp" >&5
1814if eval "test \"`echo '$''{'bash_cv_func_sigsetjmp'+set}'`\" = set"; then
1815 echo $ac_n "(cached) $ac_c" 1>&6
1816else
1817 if test "$cross_compiling" = yes; then
1818 echo "configure: warning: cannot check for sigsetjmp/siglongjmp if cross-compiling -- defaulting to missing" 1>&2
1819 bash_cv_func_sigsetjmp=missing
1820
1821else
1822 cat > conftest.$ac_ext <<EOF
1823#line 1824 "configure"
1824#include "confdefs.h"
1825
1826#ifdef HAVE_UNISTD_H
1827#include <unistd.h>
1828#endif
1829#include <sys/types.h>
1830#include <signal.h>
1831#include <setjmp.h>
1832
1833main()
1834{
1835#if !defined (_POSIX_VERSION) || !defined (HAVE_POSIX_SIGNALS)
1836exit (1);
1837#else
1838
1839int code;
1840sigset_t set, oset;
1841sigjmp_buf xx;
1842
1843/* get the mask */
1844sigemptyset(&set);
1845sigemptyset(&oset);
1846sigprocmask(SIG_BLOCK, (sigset_t *)NULL, &set);
1847sigprocmask(SIG_BLOCK, (sigset_t *)NULL, &oset);
1848
1849/* save it */
1850code = sigsetjmp(xx, 1);
1851if (code)
1852 exit(0); /* could get sigmask and compare to oset here. */
1853
1854/* change it */
1855sigaddset(&set, SIGINT);
1856sigprocmask(SIG_BLOCK, &set, (sigset_t *)NULL);
1857
1858/* and siglongjmp */
1859siglongjmp(xx, 10);
1860exit(1);
1861#endif
1862}
1863EOF
1864if { (eval echo configure:1865: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1865then
1866 bash_cv_func_sigsetjmp=present
1867else
1868 echo "configure: failed program was:" >&5
1869 cat conftest.$ac_ext >&5
1870 rm -fr conftest*
1871 bash_cv_func_sigsetjmp=missing
1872fi
1873rm -fr conftest*
1874fi
1875
1876fi
1877
1878echo "$ac_t""$bash_cv_func_sigsetjmp" 1>&6
1879if test $bash_cv_func_sigsetjmp = present; then
1880cat >> confdefs.h <<\EOF
1881#define HAVE_POSIX_SIGSETJMP 1
1882EOF
1883
1884fi
1885
1886echo $ac_n "checking for lstat""... $ac_c" 1>&6
1887echo "configure:1888: checking for lstat" >&5
1888if eval "test \"`echo '$''{'bash_cv_func_lstat'+set}'`\" = set"; then
1889 echo $ac_n "(cached) $ac_c" 1>&6
1890else
1891 cat > conftest.$ac_ext <<EOF
1892#line 1893 "configure"
1893#include "confdefs.h"
1894
1895#include <sys/types.h>
1896#include <sys/stat.h>
1897
1898int main() {
1899 lstat(".",(struct stat *)0);
1900; return 0; }
1901EOF
1902if { (eval echo configure:1903: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1903 rm -rf conftest*
1904 bash_cv_func_lstat=yes
1905else
1906 echo "configure: failed program was:" >&5
1907 cat conftest.$ac_ext >&5
1908 rm -rf conftest*
1909 bash_cv_func_lstat=no
1910fi
1911rm -f conftest*
1912fi
1913
1914echo "$ac_t""$bash_cv_func_lstat" 1>&6
1915if test $bash_cv_func_lstat = yes; then
1916 cat >> confdefs.h <<\EOF
1917#define HAVE_LSTAT 1
1918EOF
1919
1920fi
1921
1922echo $ac_n "checking whether programs are able to redeclare getpw functions""... $ac_c" 1>&6
1923echo "configure:1924: checking whether programs are able to redeclare getpw functions" >&5
1924if eval "test \"`echo '$''{'bash_cv_can_redecl_getpw'+set}'`\" = set"; then
1925 echo $ac_n "(cached) $ac_c" 1>&6
1926else
1927 cat > conftest.$ac_ext <<EOF
1928#line 1929 "configure"
1929#include "confdefs.h"
1930#include <sys/types.h>
1931#include <pwd.h>
1932extern struct passwd *getpwent();
1933extern struct passwd *getpwuid();
1934extern struct passwd *getpwnam();
1935int main() {
1936struct passwd *z; z = getpwent(); z = getpwuid(0); z = getpwnam("root");
1937; return 0; }
1938EOF
1939if { (eval echo configure:1940: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1940 rm -rf conftest*
1941 bash_cv_can_redecl_getpw=yes
1942else
1943 echo "configure: failed program was:" >&5
1944 cat conftest.$ac_ext >&5
1945 rm -rf conftest*
1946 bash_cv_can_redecl_getpw=no
1947fi
1948rm -f conftest*
1949fi
1950
1951echo "$ac_t""$bash_cv_can_redecl_getpw" 1>&6
1952if test $bash_cv_can_redecl_getpw = no; then
1953cat >> confdefs.h <<\EOF
1954#define HAVE_GETPW_DECLS 1
1955EOF
1956
1957fi
1958
1959
1960echo $ac_n "checking whether or not strcoll and strcmp differ""... $ac_c" 1>&6
1961echo "configure:1962: checking whether or not strcoll and strcmp differ" >&5
1962if eval "test \"`echo '$''{'bash_cv_func_strcoll_broken'+set}'`\" = set"; then
1963 echo $ac_n "(cached) $ac_c" 1>&6
1964else
1965 if test "$cross_compiling" = yes; then
1966 echo "configure: warning: cannot check strcoll if cross compiling -- defaulting to no" 1>&2
1967 bash_cv_func_strcoll_broken=no
1968
1969else
1970 cat > conftest.$ac_ext <<EOF
1971#line 1972 "configure"
1972#include "confdefs.h"
1973
1974#include <stdio.h>
1975#if defined (HAVE_LOCALE_H)
1976#include <locale.h>
1977#endif
1978
1979main(c, v)
1980int c;
1981char *v[];
1982{
1983 int r1, r2;
1984 char *deflocale, *defcoll;
1985
1986#ifdef HAVE_SETLOCALE
1987 deflocale = setlocale(LC_ALL, "");
1988 defcoll = setlocale(LC_COLLATE, "");
1989#endif
1990
1991#ifdef HAVE_STRCOLL
1992 /* These two values are taken from tests/glob-test. */
1993 r1 = strcoll("abd", "aXd");
1994#else
1995 r1 = 0;
1996#endif
1997 r2 = strcmp("abd", "aXd");
1998
1999 /* These two should both be greater than 0. It is permissible for
2000 a system to return different values, as long as the sign is the
2001 same. */
2002
2003 /* Exit with 1 (failure) if these two values are both > 0, since
2004 this tests whether strcoll(3) is broken with respect to strcmp(3)
2005 in the default locale. */
2006 exit (r1 > 0 && r2 > 0);
2007}
2008
2009EOF
2010if { (eval echo configure:2011: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2011then
2012 bash_cv_func_strcoll_broken=yes
2013else
2014 echo "configure: failed program was:" >&5
2015 cat conftest.$ac_ext >&5
2016 rm -fr conftest*
2017 bash_cv_func_strcoll_broken=no
2018fi
2019rm -fr conftest*
2020fi
2021
2022fi
2023
2024echo "$ac_t""$bash_cv_func_strcoll_broken" 1>&6
2025if test $bash_cv_func_strcoll_broken = yes; then
2026cat >> confdefs.h <<\EOF
2027#define STRCOLL_BROKEN 1
2028EOF
2029
2030fi
2031
2032
2033echo $ac_n "checking whether signal handlers are of type void""... $ac_c" 1>&6
2034echo "configure:2035: checking whether signal handlers are of type void" >&5
2035if eval "test \"`echo '$''{'bash_cv_void_sighandler'+set}'`\" = set"; then
2036 echo $ac_n "(cached) $ac_c" 1>&6
2037else
2038 cat > conftest.$ac_ext <<EOF
2039#line 2040 "configure"
2040#include "confdefs.h"
2041#include <sys/types.h>
2042#include <signal.h>
2043#ifdef signal
2044#undef signal
2045#endif
2046#ifdef __cplusplus
2047extern "C"
2048#endif
2049void (*signal ()) ();
2050int main() {
2051int i;
2052; return 0; }
2053EOF
2054if { (eval echo configure:2055: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2055 rm -rf conftest*
2056 bash_cv_void_sighandler=yes
2057else
2058 echo "configure: failed program was:" >&5
2059 cat conftest.$ac_ext >&5
2060 rm -rf conftest*
2061 bash_cv_void_sighandler=no
2062fi
2063rm -f conftest*
2064fi
2065echo "$ac_t""$bash_cv_void_sighandler" 1>&6
2066if test $bash_cv_void_sighandler = yes; then
2067cat >> confdefs.h <<\EOF
2068#define VOID_SIGHANDLER 1
2069EOF
2070
2071fi
2072
2073echo $ac_n "checking for TIOCGWINSZ in sys/ioctl.h""... $ac_c" 1>&6
2074echo "configure:2075: checking for TIOCGWINSZ in sys/ioctl.h" >&5
2075if eval "test \"`echo '$''{'bash_cv_tiocgwinsz_in_ioctl'+set}'`\" = set"; then
2076 echo $ac_n "(cached) $ac_c" 1>&6
2077else
2078 cat > conftest.$ac_ext <<EOF
2079#line 2080 "configure"
2080#include "confdefs.h"
2081#include <sys/types.h>
2082#include <sys/ioctl.h>
2083int main() {
2084int x = TIOCGWINSZ;
2085; return 0; }
2086EOF
2087if { (eval echo configure:2088: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2088 rm -rf conftest*
2089 bash_cv_tiocgwinsz_in_ioctl=yes
2090else
2091 echo "configure: failed program was:" >&5
2092 cat conftest.$ac_ext >&5
2093 rm -rf conftest*
2094 bash_cv_tiocgwinsz_in_ioctl=no
2095fi
2096rm -f conftest*
2097fi
2098
2099echo "$ac_t""$bash_cv_tiocgwinsz_in_ioctl" 1>&6
2100if test $bash_cv_tiocgwinsz_in_ioctl = yes; then
2101cat >> confdefs.h <<\EOF
2102#define GWINSZ_IN_SYS_IOCTL 1
2103EOF
2104
2105fi
2106
2107echo $ac_n "checking for TIOCSTAT in sys/ioctl.h""... $ac_c" 1>&6
2108echo "configure:2109: checking for TIOCSTAT in sys/ioctl.h" >&5
2109if eval "test \"`echo '$''{'bash_cv_tiocstat_in_ioctl'+set}'`\" = set"; then
2110 echo $ac_n "(cached) $ac_c" 1>&6
2111else
2112 cat > conftest.$ac_ext <<EOF
2113#line 2114 "configure"
2114#include "confdefs.h"
2115#include <sys/types.h>
2116#include <sys/ioctl.h>
2117int main() {
2118int x = TIOCSTAT;
2119; return 0; }
2120EOF
2121if { (eval echo configure:2122: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2122 rm -rf conftest*
2123 bash_cv_tiocstat_in_ioctl=yes
2124else
2125 echo "configure: failed program was:" >&5
2126 cat conftest.$ac_ext >&5
2127 rm -rf conftest*
2128 bash_cv_tiocstat_in_ioctl=no
2129fi
2130rm -f conftest*
2131fi
2132
2133echo "$ac_t""$bash_cv_tiocstat_in_ioctl" 1>&6
2134if test $bash_cv_tiocstat_in_ioctl = yes; then
2135cat >> confdefs.h <<\EOF
2136#define TIOCSTAT_IN_SYS_IOCTL 1
2137EOF
2138
2139fi
2140
2141echo $ac_n "checking for FIONREAD in sys/ioctl.h""... $ac_c" 1>&6
2142echo "configure:2143: checking for FIONREAD in sys/ioctl.h" >&5
2143if eval "test \"`echo '$''{'bash_cv_fionread_in_ioctl'+set}'`\" = set"; then
2144 echo $ac_n "(cached) $ac_c" 1>&6
2145else
2146 cat > conftest.$ac_ext <<EOF
2147#line 2148 "configure"
2148#include "confdefs.h"
2149#include <sys/types.h>
2150#include <sys/ioctl.h>
2151int main() {
2152int x = FIONREAD;
2153; return 0; }
2154EOF
2155if { (eval echo configure:2156: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2156 rm -rf conftest*
2157 bash_cv_fionread_in_ioctl=yes
2158else
2159 echo "configure: failed program was:" >&5
2160 cat conftest.$ac_ext >&5
2161 rm -rf conftest*
2162 bash_cv_fionread_in_ioctl=no
2163fi
2164rm -f conftest*
2165fi
2166
2167echo "$ac_t""$bash_cv_fionread_in_ioctl" 1>&6
2168if test $bash_cv_fionread_in_ioctl = yes; then
2169cat >> confdefs.h <<\EOF
2170#define FIONREAD_IN_SYS_IOCTL 1
2171EOF
2172
2173fi
2174
2175echo $ac_n "checking for speed_t in sys/types.h""... $ac_c" 1>&6
2176echo "configure:2177: checking for speed_t in sys/types.h" >&5
2177if eval "test \"`echo '$''{'bash_cv_speed_t_in_sys_types'+set}'`\" = set"; then
2178 echo $ac_n "(cached) $ac_c" 1>&6
2179else
2180 cat > conftest.$ac_ext <<EOF
2181#line 2182 "configure"
2182#include "confdefs.h"
2183#include <sys/types.h>
2184int main() {
2185speed_t x;
2186; return 0; }
2187EOF
2188if { (eval echo configure:2189: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2189 rm -rf conftest*
2190 bash_cv_speed_t_in_sys_types=yes
2191else
2192 echo "configure: failed program was:" >&5
2193 cat conftest.$ac_ext >&5
2194 rm -rf conftest*
2195 bash_cv_speed_t_in_sys_types=no
2196fi
2197rm -f conftest*
2198fi
2199
2200echo "$ac_t""$bash_cv_speed_t_in_sys_types" 1>&6
2201if test $bash_cv_speed_t_in_sys_types = yes; then
2202cat >> confdefs.h <<\EOF
2203#define SPEED_T_IN_SYS_TYPES 1
2204EOF
2205
2206fi
2207
2208echo $ac_n "checking for struct winsize in sys/ioctl.h and termios.h""... $ac_c" 1>&6
2209echo "configure:2210: checking for struct winsize in sys/ioctl.h and termios.h" >&5
2210if eval "test \"`echo '$''{'bash_cv_struct_winsize_header'+set}'`\" = set"; then
2211 echo $ac_n "(cached) $ac_c" 1>&6
2212else
2213 cat > conftest.$ac_ext <<EOF
2214#line 2215 "configure"
2215#include "confdefs.h"
2216#include <sys/types.h>
2217#include <sys/ioctl.h>
2218int main() {
2219struct winsize x;
2220; return 0; }
2221EOF
2222if { (eval echo configure:2223: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2223 rm -rf conftest*
2224 bash_cv_struct_winsize_header=ioctl_h
2225else
2226 echo "configure: failed program was:" >&5
2227 cat conftest.$ac_ext >&5
2228 rm -rf conftest*
2229 cat > conftest.$ac_ext <<EOF
2230#line 2231 "configure"
2231#include "confdefs.h"
2232#include <sys/types.h>
2233#include <termios.h>
2234int main() {
2235struct winsize x;
2236; return 0; }
2237EOF
2238if { (eval echo configure:2239: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2239 rm -rf conftest*
2240 bash_cv_struct_winsize_header=termios_h
2241else
2242 echo "configure: failed program was:" >&5
2243 cat conftest.$ac_ext >&5
2244 rm -rf conftest*
2245 bash_cv_struct_winsize_header=other
2246fi
2247rm -f conftest*
2248
2249fi
2250rm -f conftest*
2251fi
2252
2253if test $bash_cv_struct_winsize_header = ioctl_h; then
2254 echo "$ac_t""sys/ioctl.h" 1>&6
2255 cat >> confdefs.h <<\EOF
2256#define STRUCT_WINSIZE_IN_SYS_IOCTL 1
2257EOF
2258
2259elif test $bash_cv_struct_winsize_header = termios_h; then
2260 echo "$ac_t""termios.h" 1>&6
2261 cat >> confdefs.h <<\EOF
2262#define STRUCT_WINSIZE_IN_TERMIOS 1
2263EOF
2264
2265else
2266 echo "$ac_t""not found" 1>&6
2267fi
2268
2269
2270echo $ac_n "checking if struct dirent has a d_ino member""... $ac_c" 1>&6
2271echo "configure:2272: checking if struct dirent has a d_ino member" >&5
2272if eval "test \"`echo '$''{'bash_cv_dirent_has_dino'+set}'`\" = set"; then
2273 echo $ac_n "(cached) $ac_c" 1>&6
2274else
2275 cat > conftest.$ac_ext <<EOF
2276#line 2277 "configure"
2277#include "confdefs.h"
2278
2279#include <stdio.h>
2280#include <sys/types.h>
2281#ifdef HAVE_UNISTD_H
2282# include <unistd.h>
2283#endif /* HAVE_UNISTD_H */
2284#if defined(HAVE_DIRENT_H)
2285# include <dirent.h>
2286#else
2287# define dirent direct
2288# ifdef HAVE_SYS_NDIR_H
2289# include <sys/ndir.h>
2290# endif /* SYSNDIR */
2291# ifdef HAVE_SYS_DIR_H
2292# include <sys/dir.h>
2293# endif /* SYSDIR */
2294# ifdef HAVE_NDIR_H
2295# include <ndir.h>
2296# endif
2297#endif /* HAVE_DIRENT_H */
2298
2299int main() {
2300
2301struct dirent d; int z; z = d.d_ino;
2302
2303; return 0; }
2304EOF
2305if { (eval echo configure:2306: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2306 rm -rf conftest*
2307 bash_cv_dirent_has_dino=yes
2308else
2309 echo "configure: failed program was:" >&5
2310 cat conftest.$ac_ext >&5
2311 rm -rf conftest*
2312 bash_cv_dirent_has_dino=no
2313fi
2314rm -f conftest*
2315fi
2316
2317echo "$ac_t""$bash_cv_dirent_has_dino" 1>&6
2318if test $bash_cv_dirent_has_dino = yes; then
2319cat >> confdefs.h <<\EOF
2320#define STRUCT_DIRENT_HAS_D_INO 1
2321EOF
2322
2323fi
2324
2325
2326echo $ac_n "checking if struct dirent has a d_fileno member""... $ac_c" 1>&6
2327echo "configure:2328: checking if struct dirent has a d_fileno member" >&5
2328if eval "test \"`echo '$''{'bash_cv_dirent_has_d_fileno'+set}'`\" = set"; then
2329 echo $ac_n "(cached) $ac_c" 1>&6
2330else
2331 cat > conftest.$ac_ext <<EOF
2332#line 2333 "configure"
2333#include "confdefs.h"
2334
2335#include <stdio.h>
2336#include <sys/types.h>
2337#ifdef HAVE_UNISTD_H
2338# include <unistd.h>
2339#endif /* HAVE_UNISTD_H */
2340#if defined(HAVE_DIRENT_H)
2341# include <dirent.h>
2342#else
2343# define dirent direct
2344# ifdef HAVE_SYS_NDIR_H
2345# include <sys/ndir.h>
2346# endif /* SYSNDIR */
2347# ifdef HAVE_SYS_DIR_H
2348# include <sys/dir.h>
2349# endif /* SYSDIR */
2350# ifdef HAVE_NDIR_H
2351# include <ndir.h>
2352# endif
2353#endif /* HAVE_DIRENT_H */
2354
2355int main() {
2356
2357struct dirent d; int z; z = d.d_fileno;
2358
2359; return 0; }
2360EOF
2361if { (eval echo configure:2362: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2362 rm -rf conftest*
2363 bash_cv_dirent_has_d_fileno=yes
2364else
2365 echo "configure: failed program was:" >&5
2366 cat conftest.$ac_ext >&5
2367 rm -rf conftest*
2368 bash_cv_dirent_has_d_fileno=no
2369fi
2370rm -f conftest*
2371fi
2372
2373echo "$ac_t""$bash_cv_dirent_has_d_fileno" 1>&6
2374if test $bash_cv_dirent_has_d_fileno = yes; then
2375cat >> confdefs.h <<\EOF
2376#define STRUCT_DIRENT_HAS_D_FILENO 1
2377EOF
2378
2379fi
2380
2381
2382case "$host_os" in
2383aix*) prefer_curses=yes ;;
2384esac
2385
2386if test "X$bash_cv_termcap_lib" = "X"; then
2387_bash_needmsg=yes
2388else
2389echo $ac_n "checking which library has the termcap functions""... $ac_c" 1>&6
2390echo "configure:2391: checking which library has the termcap functions" >&5
2391_bash_needmsg=
2392fi
2393if eval "test \"`echo '$''{'bash_cv_termcap_lib'+set}'`\" = set"; then
2394 echo $ac_n "(cached) $ac_c" 1>&6
2395else
2396 echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
2397echo "configure:2398: checking for tgetent in -ltermcap" >&5
2398ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'`
2399if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2400 echo $ac_n "(cached) $ac_c" 1>&6
2401else
2402 ac_save_LIBS="$LIBS"
2403LIBS="-ltermcap $LIBS"
2404cat > conftest.$ac_ext <<EOF
2405#line 2406 "configure"
2406#include "confdefs.h"
2407/* Override any gcc2 internal prototype to avoid an error. */
2408/* We use char because int might match the return type of a gcc2
2409 builtin and then its argument prototype would still apply. */
2410char tgetent();
2411
2412int main() {
2413tgetent()
2414; return 0; }
2415EOF
2416if { (eval echo configure:2417: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2417 rm -rf conftest*
2418 eval "ac_cv_lib_$ac_lib_var=yes"
2419else
2420 echo "configure: failed program was:" >&5
2421 cat conftest.$ac_ext >&5
2422 rm -rf conftest*
2423 eval "ac_cv_lib_$ac_lib_var=no"
2424fi
2425rm -f conftest*
2426LIBS="$ac_save_LIBS"
2427
2428fi
2429if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2430 echo "$ac_t""yes" 1>&6
2431 bash_cv_termcap_lib=libtermcap
2432else
2433 echo "$ac_t""no" 1>&6
2434echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6
2435echo "configure:2436: checking for tgetent in -lcurses" >&5
2436ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'`
2437if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2438 echo $ac_n "(cached) $ac_c" 1>&6
2439else
2440 ac_save_LIBS="$LIBS"
2441LIBS="-lcurses $LIBS"
2442cat > conftest.$ac_ext <<EOF
2443#line 2444 "configure"
2444#include "confdefs.h"
2445/* Override any gcc2 internal prototype to avoid an error. */
2446/* We use char because int might match the return type of a gcc2
2447 builtin and then its argument prototype would still apply. */
2448char tgetent();
2449
2450int main() {
2451tgetent()
2452; return 0; }
2453EOF
2454if { (eval echo configure:2455: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2455 rm -rf conftest*
2456 eval "ac_cv_lib_$ac_lib_var=yes"
2457else
2458 echo "configure: failed program was:" >&5
2459 cat conftest.$ac_ext >&5
2460 rm -rf conftest*
2461 eval "ac_cv_lib_$ac_lib_var=no"
2462fi
2463rm -f conftest*
2464LIBS="$ac_save_LIBS"
2465
2466fi
2467if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2468 echo "$ac_t""yes" 1>&6
2469 bash_cv_termcap_lib=libcurses
2470else
2471 echo "$ac_t""no" 1>&6
2472echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6
2473echo "configure:2474: checking for tgetent in -lncurses" >&5
2474ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'`
2475if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2476 echo $ac_n "(cached) $ac_c" 1>&6
2477else
2478 ac_save_LIBS="$LIBS"
2479LIBS="-lncurses $LIBS"
2480cat > conftest.$ac_ext <<EOF
2481#line 2482 "configure"
2482#include "confdefs.h"
2483/* Override any gcc2 internal prototype to avoid an error. */
2484/* We use char because int might match the return type of a gcc2
2485 builtin and then its argument prototype would still apply. */
2486char tgetent();
2487
2488int main() {
2489tgetent()
2490; return 0; }
2491EOF
2492if { (eval echo configure:2493: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2493 rm -rf conftest*
2494 eval "ac_cv_lib_$ac_lib_var=yes"
2495else
2496 echo "configure: failed program was:" >&5
2497 cat conftest.$ac_ext >&5
2498 rm -rf conftest*
2499 eval "ac_cv_lib_$ac_lib_var=no"
2500fi
2501rm -f conftest*
2502LIBS="$ac_save_LIBS"
2503
2504fi
2505if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2506 echo "$ac_t""yes" 1>&6
2507 bash_cv_termcap_lib=libncurses
2508else
2509 echo "$ac_t""no" 1>&6
2510bash_cv_termcap_lib=gnutermcap
2511fi
2512
2513fi
2514
2515fi
2516
2517fi
2518
2519if test "X$_bash_needmsg" = "Xyes"; then
2520echo $ac_n "checking which library has the termcap functions""... $ac_c" 1>&6
2521echo "configure:2522: checking which library has the termcap functions" >&5
2522fi
2523echo "$ac_t""using $bash_cv_termcap_lib" 1>&6
2524if test $bash_cv_termcap_lib = gnutermcap && test -z "$prefer_curses"; then
2525LDFLAGS="$LDFLAGS -L./lib/termcap"
2526TERMCAP_LIB="./lib/termcap/libtermcap.a"
2527TERMCAP_DEP="./lib/termcap/libtermcap.a"
2528elif test $bash_cv_termcap_lib = libtermcap && test -z "$prefer_curses"; then
2529TERMCAP_LIB=-ltermcap
2530TERMCAP_DEP=
2531elif test $bash_cv_termcap_lib = libncurses; then
2532TERMCAP_LIB=-lncurses
2533TERMCAP_DEP=
2534else
2535TERMCAP_LIB=-lcurses
2536TERMCAP_DEP=
2537fi
2538
2539if test "$TERMCAP_LIB" = "./lib/termcap/libtermcap.a"; then
2540 TERMCAP_LIB=-ltermcap #default
2541fi
2542
2543case "$host_cpu" in
2544*cray*) LOCAL_CFLAGS=-DCRAY ;;
2545*s390*) LOCAL_CFLAGS=-fsigned-char ;;
2546esac
2547
2548case "$host_os" in
2549isc*) LOCAL_CFLAGS=-Disc386 ;;
2550esac
2551
2552# shared library configuration section
2553#
2554# Shared object configuration section. These values are generated by
2555# ${srcdir}/support/shobj-conf
2556#
2557if test -f ${srcdir}/support/shobj-conf; then
2558 echo $ac_n "checking configuration for building shared libraries""... $ac_c" 1>&6
2559echo "configure:2559: checking configuration for building shared libraries" >&5
2560 eval `${CONFIG_SHELL-/bin/sh} ${srcdir}/support/shobj-conf -C "${CC}" -c ${host_cpu} -o ${host_os} -v ${host_vendor}`
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573 echo "$ac_t""$SHLIB_STATUS" 1>&6
2574
2575 # shared library versioning
2576 # quoted for m4 so I can use character classes
2577 SHLIB_MAJOR=`expr "$LIBVERSION" : '\([0-9]\)\..*'`
2578 SHLIB_MINOR=`expr "$LIBVERSION" : '[0-9]\.\([0-9]\).*'`
2579
2580
2581fi
2582
2583case "$host_os" in
2584msdosdjgpp*) BUILD_DIR=`pwd.exe` ;; # to prevent //d/path/file
2585*) BUILD_DIR=`pwd` ;;
2586esac
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605trap '' 1 2 15
2606cat > confcache <<\EOF
2607# This file is a shell script that caches the results of configure
2608# tests run on this system so they can be shared between configure
2609# scripts and configure runs. It is not useful on other systems.
2610# If it contains results you don't want to keep, you may remove or edit it.
2611#
2612# By default, configure uses ./config.cache as the cache file,
2613# creating it if it does not exist already. You can give configure
2614# the --cache-file=FILE option to use a different cache file; that is
2615# what configure does when it calls configure scripts in
2616# subdirectories, so they share the cache.
2617# Giving --cache-file=/dev/null disables caching, for debugging configure.
2618# config.status only pays attention to the cache file if you give it the
2619# --recheck option to rerun configure.
2620#
2621EOF
2622# The following way of writing the cache mishandles newlines in values,
2623# but we know of no workaround that is simple, portable, and efficient.
2624# So, don't put newlines in cache variables' values.
2625# Ultrix sh set writes to stderr and can't be redirected directly,
2626# and sets the high bit in the cache file unless we assign to the vars.
2627(set) 2>&1 |
2628 case `(ac_space=' '; set | grep ac_space) 2>&1` in
2629 *ac_space=\ *)
2630 # `set' does not quote correctly, so add quotes (double-quote substitution
2631 # turns \\\\ into \\, and sed turns \\ into \).
2632 sed -n \
2633 -e "s/'/'\\\\''/g" \
2634 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
2635 ;;
2636 *)
2637 # `set' quotes correctly as required by POSIX, so do not add quotes.
2638 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
2639 ;;
2640 esac >> confcache
2641if cmp -s $cache_file confcache; then
2642 :
2643else
2644 if test -w $cache_file; then
2645 echo "updating cache $cache_file"
2646 cat confcache > $cache_file
2647 else
2648 echo "not updating unwritable cache $cache_file"
2649 fi
2650fi
2651rm -f confcache
2652
2653trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
2654
2655test "x$prefix" = xNONE && prefix=$ac_default_prefix
2656# Let make expand exec_prefix.
2657test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
2658
2659# Any assignment to VPATH causes Sun make to only execute
2660# the first set of double-colon rules, so remove it if not needed.
2661# If there is a colon in the path, we need to keep it.
2662if test "x$srcdir" = x.; then
2663 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
2664fi
2665
2666trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
2667
2668DEFS=-DHAVE_CONFIG_H
2669
2670# Without the "./", some shells look in PATH for config.status.
2671: ${CONFIG_STATUS=./config.status}
2672
2673echo creating $CONFIG_STATUS
2674rm -f $CONFIG_STATUS
2675cat > $CONFIG_STATUS <<EOF
2676#! /bin/sh
2677# Generated automatically by configure.
2678# Run this file to recreate the current configuration.
2679# This directory was configured as follows,
2680# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
2681#
2682# $0 $ac_configure_args
2683#
2684# Compiler output produced by configure, useful for debugging
2685# configure, is in ./config.log if it exists.
2686
2687ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
2688for ac_option
2689do
2690 case "\$ac_option" in
2691 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
2692 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
2693 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
2694 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
2695 echo "$CONFIG_STATUS generated by autoconf version 2.13"
2696 exit 0 ;;
2697 -help | --help | --hel | --he | --h)
2698 echo "\$ac_cs_usage"; exit 0 ;;
2699 *) echo "\$ac_cs_usage"; exit 1 ;;
2700 esac
2701done
2702
2703ac_given_srcdir=$srcdir
2704ac_given_INSTALL="$INSTALL"
2705
2706trap 'rm -fr `echo "Makefile doc/Makefile examples/Makefile shlib/Makefile config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
2707EOF
2708cat >> $CONFIG_STATUS <<EOF
2709
2710# Protect against being on the right side of a sed subst in config.status.
2711sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
2712 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
2713$ac_vpsub
2714$extrasub
2715s%@SHELL@%$SHELL%g
2716s%@CFLAGS@%$CFLAGS%g
2717s%@CPPFLAGS@%$CPPFLAGS%g
2718s%@CXXFLAGS@%$CXXFLAGS%g
2719s%@FFLAGS@%$FFLAGS%g
2720s%@DEFS@%$DEFS%g
2721s%@LDFLAGS@%$LDFLAGS%g
2722s%@LIBS@%$LIBS%g
2723s%@exec_prefix@%$exec_prefix%g
2724s%@prefix@%$prefix%g
2725s%@program_transform_name@%$program_transform_name%g
2726s%@bindir@%$bindir%g
2727s%@sbindir@%$sbindir%g
2728s%@libexecdir@%$libexecdir%g
2729s%@datadir@%$datadir%g
2730s%@sysconfdir@%$sysconfdir%g
2731s%@sharedstatedir@%$sharedstatedir%g
2732s%@localstatedir@%$localstatedir%g
2733s%@libdir@%$libdir%g
2734s%@includedir@%$includedir%g
2735s%@oldincludedir@%$oldincludedir%g
2736s%@infodir@%$infodir%g
2737s%@mandir@%$mandir%g
2738s%@host@%$host%g
2739s%@host_alias@%$host_alias%g
2740s%@host_cpu@%$host_cpu%g
2741s%@host_vendor@%$host_vendor%g
2742s%@host_os@%$host_os%g
2743s%@CC@%$CC%g
2744s%@CPP@%$CPP%g
2745s%@CROSS_COMPILING_FLAG@%$CROSS_COMPILING_FLAG%g
2746s%@CC_FOR_BUILD@%$CC_FOR_BUILD%g
2747s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
2748s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
2749s%@INSTALL_DATA@%$INSTALL_DATA%g
2750s%@AR@%$AR%g
2751s%@RANLIB@%$RANLIB%g
2752s%@MAKE_SHELL@%$MAKE_SHELL%g
2753s%@SHOBJ_CC@%$SHOBJ_CC%g
2754s%@SHOBJ_CFLAGS@%$SHOBJ_CFLAGS%g
2755s%@SHOBJ_LD@%$SHOBJ_LD%g
2756s%@SHOBJ_LDFLAGS@%$SHOBJ_LDFLAGS%g
2757s%@SHOBJ_XLDFLAGS@%$SHOBJ_XLDFLAGS%g
2758s%@SHOBJ_LIBS@%$SHOBJ_LIBS%g
2759s%@SHOBJ_STATUS@%$SHOBJ_STATUS%g
2760s%@SHLIB_STATUS@%$SHLIB_STATUS%g
2761s%@SHLIB_XLDFLAGS@%$SHLIB_XLDFLAGS%g
2762s%@SHLIB_LIBSUFF@%$SHLIB_LIBSUFF%g
2763s%@SHLIB_LIBVERSION@%$SHLIB_LIBVERSION%g
2764s%@SHLIB_LIBS@%$SHLIB_LIBS%g
2765s%@SHLIB_MAJOR@%$SHLIB_MAJOR%g
2766s%@SHLIB_MINOR@%$SHLIB_MINOR%g
2767s%@BUILD_DIR@%$BUILD_DIR%g
2768s%@LOCAL_CFLAGS@%$LOCAL_CFLAGS%g
2769s%@LOCAL_LDFLAGS@%$LOCAL_LDFLAGS%g
2770s%@LOCAL_DEFS@%$LOCAL_DEFS%g
2771s%@ARFLAGS@%$ARFLAGS%g
2772s%@LIBVERSION@%$LIBVERSION%g
2773s%@TERMCAP_LIB@%$TERMCAP_LIB%g
2774
2775CEOF
2776EOF
2777
2778cat >> $CONFIG_STATUS <<\EOF
2779
2780# Split the substitutions into bite-sized pieces for seds with
2781# small command number limits, like on Digital OSF/1 and HP-UX.
2782ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
2783ac_file=1 # Number of current file.
2784ac_beg=1 # First line for current file.
2785ac_end=$ac_max_sed_cmds # Line after last line for current file.
2786ac_more_lines=:
2787ac_sed_cmds=""
2788while $ac_more_lines; do
2789 if test $ac_beg -gt 1; then
2790 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
2791 else
2792 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
2793 fi
2794 if test ! -s conftest.s$ac_file; then
2795 ac_more_lines=false
2796 rm -f conftest.s$ac_file
2797 else
2798 if test -z "$ac_sed_cmds"; then
2799 ac_sed_cmds="sed -f conftest.s$ac_file"
2800 else
2801 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
2802 fi
2803 ac_file=`expr $ac_file + 1`
2804 ac_beg=$ac_end
2805 ac_end=`expr $ac_end + $ac_max_sed_cmds`
2806 fi
2807done
2808if test -z "$ac_sed_cmds"; then
2809 ac_sed_cmds=cat
2810fi
2811EOF
2812
2813cat >> $CONFIG_STATUS <<EOF
2814
2815CONFIG_FILES=\${CONFIG_FILES-"Makefile doc/Makefile examples/Makefile shlib/Makefile"}
2816EOF
2817cat >> $CONFIG_STATUS <<\EOF
2818for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
2819 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
2820 case "$ac_file" in
2821 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
2822 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2823 *) ac_file_in="${ac_file}.in" ;;
2824 esac
2825
2826 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
2827
2828 # Remove last slash and all that follows it. Not all systems have dirname.
2829 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2830 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
2831 # The file is in a subdirectory.
2832 test ! -d "$ac_dir" && mkdir "$ac_dir"
2833 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
2834 # A "../" for each directory in $ac_dir_suffix.
2835 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
2836 else
2837 ac_dir_suffix= ac_dots=
2838 fi
2839
2840 case "$ac_given_srcdir" in
2841 .) srcdir=.
2842 if test -z "$ac_dots"; then top_srcdir=.
2843 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
2844 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
2845 *) # Relative path.
2846 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
2847 top_srcdir="$ac_dots$ac_given_srcdir" ;;
2848 esac
2849
2850 case "$ac_given_INSTALL" in
2851 [/$]*) INSTALL="$ac_given_INSTALL" ;;
2852 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
2853 esac
2854
2855 echo creating "$ac_file"
2856 rm -f "$ac_file"
2857 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
2858 case "$ac_file" in
2859 *Makefile*) ac_comsub="1i\\
2860# $configure_input" ;;
2861 *) ac_comsub= ;;
2862 esac
2863
2864 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
2865 sed -e "$ac_comsub
2866s%@configure_input@%$configure_input%g
2867s%@srcdir@%$srcdir%g
2868s%@top_srcdir@%$top_srcdir%g
2869s%@INSTALL@%$INSTALL%g
2870" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
2871fi; done
2872rm -f conftest.s*
2873
2874# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
2875# NAME is the cpp macro being defined and VALUE is the value it is being given.
2876#
2877# ac_d sets the value in "#define NAME VALUE" lines.
2878ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
2879ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
2880ac_dC='\3'
2881ac_dD='%g'
2882# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
2883ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
2884ac_uB='\([ ]\)%\1#\2define\3'
2885ac_uC=' '
2886ac_uD='\4%g'
2887# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
2888ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
2889ac_eB='$%\1#\2define\3'
2890ac_eC=' '
2891ac_eD='%g'
2892
2893if test "${CONFIG_HEADERS+set}" != set; then
2894EOF
2895cat >> $CONFIG_STATUS <<EOF
2896 CONFIG_HEADERS="config.h"
2897EOF
2898cat >> $CONFIG_STATUS <<\EOF
2899fi
2900for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
2901 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
2902 case "$ac_file" in
2903 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
2904 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2905 *) ac_file_in="${ac_file}.in" ;;
2906 esac
2907
2908 echo creating $ac_file
2909
2910 rm -f conftest.frag conftest.in conftest.out
2911 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
2912 cat $ac_file_inputs > conftest.in
2913
2914EOF
2915
2916# Transform confdefs.h into a sed script conftest.vals that substitutes
2917# the proper values into config.h.in to produce config.h. And first:
2918# Protect against being on the right side of a sed subst in config.status.
2919# Protect against being in an unquoted here document in config.status.
2920rm -f conftest.vals
2921cat > conftest.hdr <<\EOF
2922s/[\\&%]/\\&/g
2923s%[\\$`]%\\&%g
2924s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
2925s%ac_d%ac_u%gp
2926s%ac_u%ac_e%gp
2927EOF
2928sed -n -f conftest.hdr confdefs.h > conftest.vals
2929rm -f conftest.hdr
2930
2931# This sed command replaces #undef with comments. This is necessary, for
2932# example, in the case of _POSIX_SOURCE, which is predefined and required
2933# on some systems where configure will not decide to define it.
2934cat >> conftest.vals <<\EOF
2935s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
2936EOF
2937
2938# Break up conftest.vals because some shells have a limit on
2939# the size of here documents, and old seds have small limits too.
2940
2941rm -f conftest.tail
2942while :
2943do
2944 ac_lines=`grep -c . conftest.vals`
2945 # grep -c gives empty output for an empty file on some AIX systems.
2946 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
2947 # Write a limited-size here document to conftest.frag.
2948 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
2949 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
2950 echo 'CEOF
2951 sed -f conftest.frag conftest.in > conftest.out
2952 rm -f conftest.in
2953 mv conftest.out conftest.in
2954' >> $CONFIG_STATUS
2955 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
2956 rm -f conftest.vals
2957 mv conftest.tail conftest.vals
2958done
2959rm -f conftest.vals
2960
2961cat >> $CONFIG_STATUS <<\EOF
2962 rm -f conftest.frag conftest.h
2963 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
2964 cat conftest.in >> conftest.h
2965 rm -f conftest.in
2966 if cmp -s $ac_file conftest.h 2>/dev/null; then
2967 echo "$ac_file is unchanged"
2968 rm -f conftest.h
2969 else
2970 # Remove last slash and all that follows it. Not all systems have dirname.
2971 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2972 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
2973 # The file is in a subdirectory.
2974 test ! -d "$ac_dir" && mkdir "$ac_dir"
2975 fi
2976 rm -f $ac_file
2977 mv conftest.h $ac_file
2978 fi
2979fi; done
2980
2981EOF
2982cat >> $CONFIG_STATUS <<EOF
2983
2984EOF
2985cat >> $CONFIG_STATUS <<\EOF
2986
2987# Makefile uses this timestamp file to record whether config.h is up to date.
2988echo > stamp-h
2989
2990exit 0
2991EOF
2992chmod +x $CONFIG_STATUS
2993rm -fr confdefs* $ac_clean_files
2994test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
2995
This page took 0.031809 seconds and 4 git commands to generate.