source: trunk/third/readline/configure @ 12992

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