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