configure revision 75406
126497Sache#! /bin/sh
226497Sache
375406Sache# From configure.in for Readline 4.2, version 2.26, from autoconf version 2.13
475406SacheLIBVERSION=4.2
526497Sache
626497Sache
726497Sache
826497Sache
926497Sache
1026497Sache
1126497Sache
1226497Sache
1326497Sache
1426497Sache
1526497Sache
1626497Sache
1726497Sache
1826497Sache
1926497Sache
2026497Sache
2126497Sache
2226497Sache
2326497Sache
2426497Sache
2526497Sache
2626497Sache
2726497Sache
2826497Sache
2926497Sache
3026497Sache
3126497Sache
3226497Sache
3326497Sache
3426497Sache
3526497Sache
3626497Sache
3726497Sache
3826497Sache
3926497Sache
4026497Sache
4126497Sache
4226497Sache
4326497Sache
4426497Sache
4526497Sache
4626497Sache
4726497Sache
4826497Sache
4926497Sache
5026497Sache
5126497Sache
5226497Sache
5326497Sache
5426497Sache
5526497Sache
5626497Sache
5726497Sache
5826497Sache
5926497Sache
6026497Sache
6126497Sache
6226497Sache
6326497Sache
6426497Sache
6526497Sache
6626497Sache
6726497Sache
6826497Sache
6926497Sache
7026497Sache
7126497Sache
7226497Sache
7326497Sache
7426497Sache
7526497Sache
7626497Sache
7726497Sache
7826497Sache
7935486Sache
8035486Sache
8135486Sache
8235486Sache
8335486Sache
8435486Sache
8535486Sache
8635486Sache
8735486Sache
8835486Sache
8935486Sache
9035486Sache
9147558Sache
9247558Sache
9347558Sache
9458310Sache
9558310Sache
9658310Sache
9758310Sache
9858310Sache
9958310Sache
10058310Sache
10158310Sache
10258310Sache
10358310Sache
10458310Sache
10558310Sache
10675406Sache
10775406Sache
10826497Sache# Guess values for system-dependent variables and create Makefiles.
10958310Sache# Generated automatically using autoconf version 2.13 
11026497Sache# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
11126497Sache#
11226497Sache# This configure script is free software; the Free Software Foundation
11326497Sache# gives unlimited permission to copy, distribute and modify it.
11426497Sache
11526497Sache# Defaults:
11626497Sacheac_help=
11726497Sacheac_default_prefix=/usr/local
11826497Sache# Any additions from configure.in:
11935486Sacheac_help="$ac_help
12035486Sache--with-curses               use the curses library instead of the termcap library"
12126497Sache
12226497Sache# Initialize some variables set by options.
12326497Sache# The variables have the same names as the options, with
12426497Sache# dashes changed to underlines.
12526497Sachebuild=NONE
12626497Sachecache_file=./config.cache
12726497Sacheexec_prefix=NONE
12826497Sachehost=NONE
12926497Sacheno_create=
13026497Sachenonopt=NONE
13126497Sacheno_recursion=
13226497Sacheprefix=NONE
13326497Sacheprogram_prefix=NONE
13426497Sacheprogram_suffix=NONE
13526497Sacheprogram_transform_name=s,x,x,
13626497Sachesilent=
13726497Sachesite=
13826497Sachesrcdir=
13926497Sachetarget=NONE
14026497Sacheverbose=
14126497Sachex_includes=NONE
14226497Sachex_libraries=NONE
14326497Sachebindir='${exec_prefix}/bin'
14426497Sachesbindir='${exec_prefix}/sbin'
14526497Sachelibexecdir='${exec_prefix}/libexec'
14626497Sachedatadir='${prefix}/share'
14726497Sachesysconfdir='${prefix}/etc'
14826497Sachesharedstatedir='${prefix}/com'
14926497Sachelocalstatedir='${prefix}/var'
15026497Sachelibdir='${exec_prefix}/lib'
15126497Sacheincludedir='${prefix}/include'
15226497Sacheoldincludedir='/usr/include'
15326497Sacheinfodir='${prefix}/info'
15426497Sachemandir='${prefix}/man'
15526497Sache
15626497Sache# Initialize some other variables.
15726497Sachesubdirs=
15826497SacheMFLAGS= MAKEFLAGS=
15958310SacheSHELL=${CONFIG_SHELL-/bin/sh}
16026497Sache# Maximum number of lines to put in a shell here document.
16126497Sacheac_max_here_lines=12
16226497Sache
16326497Sacheac_prev=
16426497Sachefor ac_option
16526497Sachedo
16626497Sache
16726497Sache  # If the previous option needs an argument, assign it.
16826497Sache  if test -n "$ac_prev"; then
16926497Sache    eval "$ac_prev=\$ac_option"
17026497Sache    ac_prev=
17126497Sache    continue
17226497Sache  fi
17326497Sache
17426497Sache  case "$ac_option" in
17526497Sache  -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
17626497Sache  *) ac_optarg= ;;
17726497Sache  esac
17826497Sache
17926497Sache  # Accept the important Cygnus configure options, so we can diagnose typos.
18026497Sache
18126497Sache  case "$ac_option" in
18226497Sache
18326497Sache  -bindir | --bindir | --bindi | --bind | --bin | --bi)
18426497Sache    ac_prev=bindir ;;
18526497Sache  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
18626497Sache    bindir="$ac_optarg" ;;
18726497Sache
18826497Sache  -build | --build | --buil | --bui | --bu)
18926497Sache    ac_prev=build ;;
19026497Sache  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
19126497Sache    build="$ac_optarg" ;;
19226497Sache
19326497Sache  -cache-file | --cache-file | --cache-fil | --cache-fi \
19426497Sache  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
19526497Sache    ac_prev=cache_file ;;
19626497Sache  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
19726497Sache  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
19826497Sache    cache_file="$ac_optarg" ;;
19926497Sache
20026497Sache  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
20126497Sache    ac_prev=datadir ;;
20226497Sache  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
20326497Sache  | --da=*)
20426497Sache    datadir="$ac_optarg" ;;
20526497Sache
20626497Sache  -disable-* | --disable-*)
20726497Sache    ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
20826497Sache    # Reject names that are not valid shell variable names.
20926497Sache    if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
21026497Sache      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
21126497Sache    fi
21226497Sache    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
21326497Sache    eval "enable_${ac_feature}=no" ;;
21426497Sache
21526497Sache  -enable-* | --enable-*)
21626497Sache    ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
21726497Sache    # Reject names that are not valid shell variable names.
21826497Sache    if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
21926497Sache      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
22026497Sache    fi
22126497Sache    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
22226497Sache    case "$ac_option" in
22326497Sache      *=*) ;;
22426497Sache      *) ac_optarg=yes ;;
22526497Sache    esac
22626497Sache    eval "enable_${ac_feature}='$ac_optarg'" ;;
22726497Sache
22826497Sache  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
22926497Sache  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
23026497Sache  | --exec | --exe | --ex)
23126497Sache    ac_prev=exec_prefix ;;
23226497Sache  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
23326497Sache  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
23426497Sache  | --exec=* | --exe=* | --ex=*)
23526497Sache    exec_prefix="$ac_optarg" ;;
23626497Sache
23726497Sache  -gas | --gas | --ga | --g)
23826497Sache    # Obsolete; use --with-gas.
23926497Sache    with_gas=yes ;;
24026497Sache
24126497Sache  -help | --help | --hel | --he)
24226497Sache    # Omit some internal or obsolete options to make the list less imposing.
24326497Sache    # This message is too long to be a string in the A/UX 3.1 sh.
24426497Sache    cat << EOF
24526497SacheUsage: configure [options] [host]
24626497SacheOptions: [defaults in brackets after descriptions]
24726497SacheConfiguration:
24826497Sache  --cache-file=FILE       cache test results in FILE
24926497Sache  --help                  print this message
25026497Sache  --no-create             do not create output files
25126497Sache  --quiet, --silent       do not print \`checking...' messages
25226497Sache  --version               print the version of autoconf that created configure
25326497SacheDirectory and file names:
25426497Sache  --prefix=PREFIX         install architecture-independent files in PREFIX
25526497Sache                          [$ac_default_prefix]
25626497Sache  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
25726497Sache                          [same as prefix]
25826497Sache  --bindir=DIR            user executables in DIR [EPREFIX/bin]
25926497Sache  --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
26026497Sache  --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
26126497Sache  --datadir=DIR           read-only architecture-independent data in DIR
26226497Sache                          [PREFIX/share]
26326497Sache  --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
26426497Sache  --sharedstatedir=DIR    modifiable architecture-independent data in DIR
26526497Sache                          [PREFIX/com]
26626497Sache  --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
26726497Sache  --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
26826497Sache  --includedir=DIR        C header files in DIR [PREFIX/include]
26926497Sache  --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
27026497Sache  --infodir=DIR           info documentation in DIR [PREFIX/info]
27126497Sache  --mandir=DIR            man documentation in DIR [PREFIX/man]
27226497Sache  --srcdir=DIR            find the sources in DIR [configure dir or ..]
27326497Sache  --program-prefix=PREFIX prepend PREFIX to installed program names
27426497Sache  --program-suffix=SUFFIX append SUFFIX to installed program names
27526497Sache  --program-transform-name=PROGRAM
27626497Sache                          run sed PROGRAM on installed program names
27726497SacheEOF
27826497Sache    cat << EOF
27926497SacheHost type:
28026497Sache  --build=BUILD           configure for building on BUILD [BUILD=HOST]
28126497Sache  --host=HOST             configure for HOST [guessed]
28226497Sache  --target=TARGET         configure for TARGET [TARGET=HOST]
28326497SacheFeatures and packages:
28426497Sache  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
28526497Sache  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
28626497Sache  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
28726497Sache  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
28826497Sache  --x-includes=DIR        X include files are in DIR
28926497Sache  --x-libraries=DIR       X library files are in DIR
29026497SacheEOF
29126497Sache    if test -n "$ac_help"; then
29226497Sache      echo "--enable and --with options recognized:$ac_help"
29326497Sache    fi
29426497Sache    exit 0 ;;
29526497Sache
29626497Sache  -host | --host | --hos | --ho)
29726497Sache    ac_prev=host ;;
29826497Sache  -host=* | --host=* | --hos=* | --ho=*)
29926497Sache    host="$ac_optarg" ;;
30026497Sache
30126497Sache  -includedir | --includedir | --includedi | --included | --include \
30226497Sache  | --includ | --inclu | --incl | --inc)
30326497Sache    ac_prev=includedir ;;
30426497Sache  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
30526497Sache  | --includ=* | --inclu=* | --incl=* | --inc=*)
30626497Sache    includedir="$ac_optarg" ;;
30726497Sache
30826497Sache  -infodir | --infodir | --infodi | --infod | --info | --inf)
30926497Sache    ac_prev=infodir ;;
31026497Sache  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
31126497Sache    infodir="$ac_optarg" ;;
31226497Sache
31326497Sache  -libdir | --libdir | --libdi | --libd)
31426497Sache    ac_prev=libdir ;;
31526497Sache  -libdir=* | --libdir=* | --libdi=* | --libd=*)
31626497Sache    libdir="$ac_optarg" ;;
31726497Sache
31826497Sache  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
31926497Sache  | --libexe | --libex | --libe)
32026497Sache    ac_prev=libexecdir ;;
32126497Sache  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
32226497Sache  | --libexe=* | --libex=* | --libe=*)
32326497Sache    libexecdir="$ac_optarg" ;;
32426497Sache
32526497Sache  -localstatedir | --localstatedir | --localstatedi | --localstated \
32626497Sache  | --localstate | --localstat | --localsta | --localst \
32726497Sache  | --locals | --local | --loca | --loc | --lo)
32826497Sache    ac_prev=localstatedir ;;
32926497Sache  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
33026497Sache  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
33126497Sache  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
33226497Sache    localstatedir="$ac_optarg" ;;
33326497Sache
33426497Sache  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
33526497Sache    ac_prev=mandir ;;
33626497Sache  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
33726497Sache    mandir="$ac_optarg" ;;
33826497Sache
33926497Sache  -nfp | --nfp | --nf)
34026497Sache    # Obsolete; use --without-fp.
34126497Sache    with_fp=no ;;
34226497Sache
34326497Sache  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
34426497Sache  | --no-cr | --no-c)
34526497Sache    no_create=yes ;;
34626497Sache
34726497Sache  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
34826497Sache  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
34926497Sache    no_recursion=yes ;;
35026497Sache
35126497Sache  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
35226497Sache  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
35326497Sache  | --oldin | --oldi | --old | --ol | --o)
35426497Sache    ac_prev=oldincludedir ;;
35526497Sache  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
35626497Sache  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
35726497Sache  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
35826497Sache    oldincludedir="$ac_optarg" ;;
35926497Sache
36026497Sache  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
36126497Sache    ac_prev=prefix ;;
36226497Sache  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
36326497Sache    prefix="$ac_optarg" ;;
36426497Sache
36526497Sache  -program-prefix | --program-prefix | --program-prefi | --program-pref \
36626497Sache  | --program-pre | --program-pr | --program-p)
36726497Sache    ac_prev=program_prefix ;;
36826497Sache  -program-prefix=* | --program-prefix=* | --program-prefi=* \
36926497Sache  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
37026497Sache    program_prefix="$ac_optarg" ;;
37126497Sache
37226497Sache  -program-suffix | --program-suffix | --program-suffi | --program-suff \
37326497Sache  | --program-suf | --program-su | --program-s)
37426497Sache    ac_prev=program_suffix ;;
37526497Sache  -program-suffix=* | --program-suffix=* | --program-suffi=* \
37626497Sache  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
37726497Sache    program_suffix="$ac_optarg" ;;
37826497Sache
37926497Sache  -program-transform-name | --program-transform-name \
38026497Sache  | --program-transform-nam | --program-transform-na \
38126497Sache  | --program-transform-n | --program-transform- \
38226497Sache  | --program-transform | --program-transfor \
38326497Sache  | --program-transfo | --program-transf \
38426497Sache  | --program-trans | --program-tran \
38526497Sache  | --progr-tra | --program-tr | --program-t)
38626497Sache    ac_prev=program_transform_name ;;
38726497Sache  -program-transform-name=* | --program-transform-name=* \
38826497Sache  | --program-transform-nam=* | --program-transform-na=* \
38926497Sache  | --program-transform-n=* | --program-transform-=* \
39026497Sache  | --program-transform=* | --program-transfor=* \
39126497Sache  | --program-transfo=* | --program-transf=* \
39226497Sache  | --program-trans=* | --program-tran=* \
39326497Sache  | --progr-tra=* | --program-tr=* | --program-t=*)
39426497Sache    program_transform_name="$ac_optarg" ;;
39526497Sache
39626497Sache  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
39726497Sache  | -silent | --silent | --silen | --sile | --sil)
39826497Sache    silent=yes ;;
39926497Sache
40026497Sache  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
40126497Sache    ac_prev=sbindir ;;
40226497Sache  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
40326497Sache  | --sbi=* | --sb=*)
40426497Sache    sbindir="$ac_optarg" ;;
40526497Sache
40626497Sache  -sharedstatedir | --sharedstatedir | --sharedstatedi \
40726497Sache  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
40826497Sache  | --sharedst | --shareds | --shared | --share | --shar \
40926497Sache  | --sha | --sh)
41026497Sache    ac_prev=sharedstatedir ;;
41126497Sache  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
41226497Sache  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
41326497Sache  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
41426497Sache  | --sha=* | --sh=*)
41526497Sache    sharedstatedir="$ac_optarg" ;;
41626497Sache
41726497Sache  -site | --site | --sit)
41826497Sache    ac_prev=site ;;
41926497Sache  -site=* | --site=* | --sit=*)
42026497Sache    site="$ac_optarg" ;;
42126497Sache
42226497Sache  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
42326497Sache    ac_prev=srcdir ;;
42426497Sache  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
42526497Sache    srcdir="$ac_optarg" ;;
42626497Sache
42726497Sache  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
42826497Sache  | --syscon | --sysco | --sysc | --sys | --sy)
42926497Sache    ac_prev=sysconfdir ;;
43026497Sache  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
43126497Sache  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
43226497Sache    sysconfdir="$ac_optarg" ;;
43326497Sache
43426497Sache  -target | --target | --targe | --targ | --tar | --ta | --t)
43526497Sache    ac_prev=target ;;
43626497Sache  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
43726497Sache    target="$ac_optarg" ;;
43826497Sache
43926497Sache  -v | -verbose | --verbose | --verbos | --verbo | --verb)
44026497Sache    verbose=yes ;;
44126497Sache
44226497Sache  -version | --version | --versio | --versi | --vers)
44358310Sache    echo "configure generated by autoconf version 2.13"
44426497Sache    exit 0 ;;
44526497Sache
44626497Sache  -with-* | --with-*)
44726497Sache    ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
44826497Sache    # Reject names that are not valid shell variable names.
44926497Sache    if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
45026497Sache      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
45126497Sache    fi
45226497Sache    ac_package=`echo $ac_package| sed 's/-/_/g'`
45326497Sache    case "$ac_option" in
45426497Sache      *=*) ;;
45526497Sache      *) ac_optarg=yes ;;
45626497Sache    esac
45726497Sache    eval "with_${ac_package}='$ac_optarg'" ;;
45826497Sache
45926497Sache  -without-* | --without-*)
46026497Sache    ac_package=`echo $ac_option|sed -e 's/-*without-//'`
46126497Sache    # Reject names that are not valid shell variable names.
46226497Sache    if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
46326497Sache      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
46426497Sache    fi
46526497Sache    ac_package=`echo $ac_package| sed 's/-/_/g'`
46626497Sache    eval "with_${ac_package}=no" ;;
46726497Sache
46826497Sache  --x)
46926497Sache    # Obsolete; use --with-x.
47026497Sache    with_x=yes ;;
47126497Sache
47226497Sache  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
47326497Sache  | --x-incl | --x-inc | --x-in | --x-i)
47426497Sache    ac_prev=x_includes ;;
47526497Sache  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
47626497Sache  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
47726497Sache    x_includes="$ac_optarg" ;;
47826497Sache
47926497Sache  -x-libraries | --x-libraries | --x-librarie | --x-librari \
48026497Sache  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
48126497Sache    ac_prev=x_libraries ;;
48226497Sache  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
48326497Sache  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
48426497Sache    x_libraries="$ac_optarg" ;;
48526497Sache
48626497Sache  -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
48726497Sache    ;;
48826497Sache
48926497Sache  *)
49026497Sache    if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
49126497Sache      echo "configure: warning: $ac_option: invalid host type" 1>&2
49226497Sache    fi
49326497Sache    if test "x$nonopt" != xNONE; then
49426497Sache      { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
49526497Sache    fi
49626497Sache    nonopt="$ac_option"
49726497Sache    ;;
49826497Sache
49926497Sache  esac
50026497Sachedone
50126497Sache
50226497Sacheif test -n "$ac_prev"; then
50326497Sache  { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
50426497Sachefi
50526497Sache
50626497Sachetrap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
50726497Sache
50826497Sache# File descriptor usage:
50926497Sache# 0 standard input
51026497Sache# 1 file creation
51126497Sache# 2 errors and warnings
51226497Sache# 3 some systems may open it to /dev/tty
51326497Sache# 4 used on the Kubota Titan
51426497Sache# 6 checking for... messages and results
51526497Sache# 5 compiler messages saved in config.log
51626497Sacheif test "$silent" = yes; then
51726497Sache  exec 6>/dev/null
51826497Sacheelse
51926497Sache  exec 6>&1
52026497Sachefi
52126497Sacheexec 5>./config.log
52226497Sache
52326497Sacheecho "\
52426497SacheThis file contains any messages produced by compilers while
52526497Sacherunning configure, to aid debugging if configure makes a mistake.
52626497Sache" 1>&5
52726497Sache
52826497Sache# Strip out --no-create and --no-recursion so they do not pile up.
52926497Sache# Also quote any args containing shell metacharacters.
53026497Sacheac_configure_args=
53126497Sachefor ac_arg
53226497Sachedo
53326497Sache  case "$ac_arg" in
53426497Sache  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
53526497Sache  | --no-cr | --no-c) ;;
53626497Sache  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
53726497Sache  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
53826497Sache  *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
53926497Sache  ac_configure_args="$ac_configure_args '$ac_arg'" ;;
54026497Sache  *) ac_configure_args="$ac_configure_args $ac_arg" ;;
54126497Sache  esac
54226497Sachedone
54326497Sache
54426497Sache# NLS nuisances.
54526497Sache# Only set these to C if already set.  These must not be set unconditionally
54626497Sache# because not all systems understand e.g. LANG=C (notably SCO).
54726497Sache# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
54826497Sache# Non-C LC_CTYPE values break the ctype check.
54926497Sacheif test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
55026497Sacheif test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
55126497Sacheif test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
55226497Sacheif test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
55326497Sache
55426497Sache# confdefs.h avoids OS command line length limits that DEFS can exceed.
55526497Sacherm -rf conftest* confdefs.h
55626497Sache# AIX cpp loses on an empty file, so make sure it contains at least a newline.
55726497Sacheecho > confdefs.h
55826497Sache
55926497Sache# A filename unique to this package, relative to the directory that
56026497Sache# configure is in, which we can look for to find out if srcdir is correct.
56126497Sacheac_unique_file=readline.h
56226497Sache
56326497Sache# Find the source files, if location was not specified.
56426497Sacheif test -z "$srcdir"; then
56526497Sache  ac_srcdir_defaulted=yes
56626497Sache  # Try the directory containing this script, then its parent.
56726497Sache  ac_prog=$0
56826497Sache  ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
56926497Sache  test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
57026497Sache  srcdir=$ac_confdir
57126497Sache  if test ! -r $srcdir/$ac_unique_file; then
57226497Sache    srcdir=..
57326497Sache  fi
57426497Sacheelse
57526497Sache  ac_srcdir_defaulted=no
57626497Sachefi
57726497Sacheif test ! -r $srcdir/$ac_unique_file; then
57826497Sache  if test "$ac_srcdir_defaulted" = yes; then
57926497Sache    { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
58026497Sache  else
58126497Sache    { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
58226497Sache  fi
58326497Sachefi
58426497Sachesrcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
58526497Sache
58626497Sache# Prefer explicitly selected file to automatically selected ones.
58726497Sacheif test -z "$CONFIG_SITE"; then
58826497Sache  if test "x$prefix" != xNONE; then
58926497Sache    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
59026497Sache  else
59126497Sache    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
59226497Sache  fi
59326497Sachefi
59426497Sachefor ac_site_file in $CONFIG_SITE; do
59526497Sache  if test -r "$ac_site_file"; then
59626497Sache    echo "loading site script $ac_site_file"
59726497Sache    . "$ac_site_file"
59826497Sache  fi
59926497Sachedone
60026497Sache
60126497Sacheif test -r "$cache_file"; then
60226497Sache  echo "loading cache $cache_file"
60326497Sache  . $cache_file
60426497Sacheelse
60526497Sache  echo "creating cache $cache_file"
60626497Sache  > $cache_file
60726497Sachefi
60826497Sache
60926497Sacheac_ext=c
61026497Sache# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
61126497Sacheac_cpp='$CPP $CPPFLAGS'
61226497Sacheac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
61358310Sacheac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
61426497Sachecross_compiling=$ac_cv_prog_cc_cross
61526497Sache
61658310Sacheac_exeext=
61758310Sacheac_objext=o
61826497Sacheif (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
61926497Sache  # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
62026497Sache  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
62126497Sache    ac_n= ac_c='
62226497Sache' ac_t='	'
62326497Sache  else
62426497Sache    ac_n=-n ac_c= ac_t=
62526497Sache  fi
62626497Sacheelse
62726497Sache  ac_n= ac_c='\c' ac_t=
62826497Sachefi
62926497Sache
63026497Sache
63126497Sache
63226497Sache
63326497Sache
63426497Sache
63526497Sacheac_aux_dir=
63626497Sachefor ac_dir in ./support $srcdir/./support; do
63726497Sache  if test -f $ac_dir/install-sh; then
63826497Sache    ac_aux_dir=$ac_dir
63926497Sache    ac_install_sh="$ac_aux_dir/install-sh -c"
64026497Sache    break
64126497Sache  elif test -f $ac_dir/install.sh; then
64226497Sache    ac_aux_dir=$ac_dir
64326497Sache    ac_install_sh="$ac_aux_dir/install.sh -c"
64426497Sache    break
64526497Sache  fi
64626497Sachedone
64726497Sacheif test -z "$ac_aux_dir"; then
64826497Sache  { echo "configure: error: can not find install-sh or install.sh in ./support $srcdir/./support" 1>&2; exit 1; }
64926497Sachefi
65026497Sacheac_config_guess=$ac_aux_dir/config.guess
65126497Sacheac_config_sub=$ac_aux_dir/config.sub
65226497Sacheac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
65326497Sache
65426497Sache
65526497Sache
65626497Sache# Make sure we can run config.sub.
65758310Sacheif ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
65826497Sacheelse { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
65926497Sachefi
66026497Sache
66126497Sacheecho $ac_n "checking host system type""... $ac_c" 1>&6
66275406Sacheecho "configure:663: checking host system type" >&5
66326497Sache
66426497Sachehost_alias=$host
66526497Sachecase "$host_alias" in
66626497SacheNONE)
66726497Sache  case $nonopt in
66826497Sache  NONE)
66958310Sache    if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
67026497Sache    else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
67126497Sache    fi ;;
67226497Sache  *) host_alias=$nonopt ;;
67326497Sache  esac ;;
67426497Sacheesac
67526497Sache
67658310Sachehost=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
67726497Sachehost_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
67826497Sachehost_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
67926497Sachehost_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
68026497Sacheecho "$ac_t""$host" 1>&6
68126497Sache
68226497Sache
68335486Sacheopt_curses=no
68435486Sacheopt_shared=no
68535486Sache
68635486Sache# Check whether --with-curses or --without-curses was given.
68735486Sacheif test "${with_curses+set}" = set; then
68835486Sache  withval="$with_curses"
68935486Sache  opt_curses=$withval
69035486Sachefi
69135486Sache
69235486Sache
69335486Sacheif test "$opt_curses" = "yes"; then
69435486Sache	prefer_curses=yes
69535486Sachefi
69635486Sache
69726497Sache# We want these before the checks, so the checks can modify their values.
69826497Sachetest -z "$CFLAGS" && CFLAGS=-g auto_cflags=1
69926497Sache
70075406Sacheecho $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
70175406Sacheecho "configure:702: checking whether ${MAKE-make} sets \${MAKE}" >&5
70275406Sacheset dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
70375406Sacheif eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
70475406Sache  echo $ac_n "(cached) $ac_c" 1>&6
70575406Sacheelse
70675406Sache  cat > conftestmake <<\EOF
70775406Sacheall:
70875406Sache	@echo 'ac_maketemp="${MAKE}"'
70975406SacheEOF
71075406Sache# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
71175406Sacheeval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
71275406Sacheif test -n "$ac_maketemp"; then
71375406Sache  eval ac_cv_prog_make_${ac_make}_set=yes
71475406Sacheelse
71575406Sache  eval ac_cv_prog_make_${ac_make}_set=no
71675406Sachefi
71775406Sacherm -f conftestmake
71875406Sachefi
71975406Sacheif eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
72075406Sache  echo "$ac_t""yes" 1>&6
72175406Sache  SET_MAKE=
72275406Sacheelse
72375406Sache  echo "$ac_t""no" 1>&6
72475406Sache  SET_MAKE="MAKE=${MAKE-make}"
72575406Sachefi
72675406Sache
72726497Sache# Extract the first word of "gcc", so it can be a program name with args.
72826497Sacheset dummy gcc; ac_word=$2
72926497Sacheecho $ac_n "checking for $ac_word""... $ac_c" 1>&6
73075406Sacheecho "configure:731: checking for $ac_word" >&5
73126497Sacheif eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
73226497Sache  echo $ac_n "(cached) $ac_c" 1>&6
73326497Sacheelse
73426497Sache  if test -n "$CC"; then
73526497Sache  ac_cv_prog_CC="$CC" # Let the user override the test.
73626497Sacheelse
73758310Sache  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
73858310Sache  ac_dummy="$PATH"
73958310Sache  for ac_dir in $ac_dummy; do
74026497Sache    test -z "$ac_dir" && ac_dir=.
74126497Sache    if test -f $ac_dir/$ac_word; then
74226497Sache      ac_cv_prog_CC="gcc"
74326497Sache      break
74426497Sache    fi
74526497Sache  done
74626497Sache  IFS="$ac_save_ifs"
74726497Sachefi
74826497Sachefi
74926497SacheCC="$ac_cv_prog_CC"
75026497Sacheif test -n "$CC"; then
75126497Sache  echo "$ac_t""$CC" 1>&6
75226497Sacheelse
75326497Sache  echo "$ac_t""no" 1>&6
75426497Sachefi
75526497Sache
75626497Sacheif test -z "$CC"; then
75726497Sache  # Extract the first word of "cc", so it can be a program name with args.
75826497Sacheset dummy cc; ac_word=$2
75926497Sacheecho $ac_n "checking for $ac_word""... $ac_c" 1>&6
76075406Sacheecho "configure:761: checking for $ac_word" >&5
76126497Sacheif eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
76226497Sache  echo $ac_n "(cached) $ac_c" 1>&6
76326497Sacheelse
76426497Sache  if test -n "$CC"; then
76526497Sache  ac_cv_prog_CC="$CC" # Let the user override the test.
76626497Sacheelse
76758310Sache  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
76826497Sache  ac_prog_rejected=no
76958310Sache  ac_dummy="$PATH"
77058310Sache  for ac_dir in $ac_dummy; do
77126497Sache    test -z "$ac_dir" && ac_dir=.
77226497Sache    if test -f $ac_dir/$ac_word; then
77326497Sache      if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
77426497Sache        ac_prog_rejected=yes
77526497Sache	continue
77626497Sache      fi
77726497Sache      ac_cv_prog_CC="cc"
77826497Sache      break
77926497Sache    fi
78026497Sache  done
78126497Sache  IFS="$ac_save_ifs"
78226497Sacheif test $ac_prog_rejected = yes; then
78326497Sache  # We found a bogon in the path, so make sure we never use it.
78426497Sache  set dummy $ac_cv_prog_CC
78526497Sache  shift
78626497Sache  if test $# -gt 0; then
78726497Sache    # We chose a different compiler from the bogus one.
78826497Sache    # However, it has the same basename, so the bogon will be chosen
78926497Sache    # first if we set CC to just the basename; use the full file name.
79026497Sache    shift
79126497Sache    set dummy "$ac_dir/$ac_word" "$@"
79226497Sache    shift
79326497Sache    ac_cv_prog_CC="$@"
79426497Sache  fi
79526497Sachefi
79626497Sachefi
79726497Sachefi
79826497SacheCC="$ac_cv_prog_CC"
79926497Sacheif test -n "$CC"; then
80026497Sache  echo "$ac_t""$CC" 1>&6
80126497Sacheelse
80226497Sache  echo "$ac_t""no" 1>&6
80326497Sachefi
80426497Sache
80558310Sache  if test -z "$CC"; then
80658310Sache    case "`uname -s`" in
80758310Sache    *win32* | *WIN32*)
80858310Sache      # Extract the first word of "cl", so it can be a program name with args.
80958310Sacheset dummy cl; ac_word=$2
81058310Sacheecho $ac_n "checking for $ac_word""... $ac_c" 1>&6
81175406Sacheecho "configure:812: checking for $ac_word" >&5
81258310Sacheif eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
81358310Sache  echo $ac_n "(cached) $ac_c" 1>&6
81458310Sacheelse
81558310Sache  if test -n "$CC"; then
81658310Sache  ac_cv_prog_CC="$CC" # Let the user override the test.
81758310Sacheelse
81858310Sache  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
81958310Sache  ac_dummy="$PATH"
82058310Sache  for ac_dir in $ac_dummy; do
82158310Sache    test -z "$ac_dir" && ac_dir=.
82258310Sache    if test -f $ac_dir/$ac_word; then
82358310Sache      ac_cv_prog_CC="cl"
82458310Sache      break
82558310Sache    fi
82658310Sache  done
82758310Sache  IFS="$ac_save_ifs"
82858310Sachefi
82958310Sachefi
83058310SacheCC="$ac_cv_prog_CC"
83158310Sacheif test -n "$CC"; then
83258310Sache  echo "$ac_t""$CC" 1>&6
83358310Sacheelse
83458310Sache  echo "$ac_t""no" 1>&6
83558310Sachefi
83658310Sache ;;
83758310Sache    esac
83858310Sache  fi
83926497Sache  test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
84026497Sachefi
84126497Sache
84226497Sacheecho $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
84375406Sacheecho "configure:844: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
84426497Sache
84526497Sacheac_ext=c
84626497Sache# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
84726497Sacheac_cpp='$CPP $CPPFLAGS'
84826497Sacheac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
84958310Sacheac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
85026497Sachecross_compiling=$ac_cv_prog_cc_cross
85126497Sache
85258310Sachecat > conftest.$ac_ext << EOF
85358310Sache
85475406Sache#line 855 "configure"
85526497Sache#include "confdefs.h"
85658310Sache
85726497Sachemain(){return(0);}
85826497SacheEOF
85975406Sacheif { (eval echo configure:860: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
86026497Sache  ac_cv_prog_cc_works=yes
86126497Sache  # If we can't run a trivial program, we are probably using a cross compiler.
86226497Sache  if (./conftest; exit) 2>/dev/null; then
86326497Sache    ac_cv_prog_cc_cross=no
86426497Sache  else
86526497Sache    ac_cv_prog_cc_cross=yes
86626497Sache  fi
86726497Sacheelse
86826497Sache  echo "configure: failed program was:" >&5
86926497Sache  cat conftest.$ac_ext >&5
87026497Sache  ac_cv_prog_cc_works=no
87126497Sachefi
87226497Sacherm -fr conftest*
87358310Sacheac_ext=c
87458310Sache# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
87558310Sacheac_cpp='$CPP $CPPFLAGS'
87658310Sacheac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
87758310Sacheac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
87858310Sachecross_compiling=$ac_cv_prog_cc_cross
87926497Sache
88026497Sacheecho "$ac_t""$ac_cv_prog_cc_works" 1>&6
88126497Sacheif test $ac_cv_prog_cc_works = no; then
88226497Sache  { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
88326497Sachefi
88426497Sacheecho $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
88575406Sacheecho "configure:886: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
88626497Sacheecho "$ac_t""$ac_cv_prog_cc_cross" 1>&6
88726497Sachecross_compiling=$ac_cv_prog_cc_cross
88826497Sache
88926497Sacheecho $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
89075406Sacheecho "configure:891: checking whether we are using GNU C" >&5
89126497Sacheif eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
89226497Sache  echo $ac_n "(cached) $ac_c" 1>&6
89326497Sacheelse
89426497Sache  cat > conftest.c <<EOF
89526497Sache#ifdef __GNUC__
89626497Sache  yes;
89726497Sache#endif
89826497SacheEOF
89975406Sacheif { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:900: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
90026497Sache  ac_cv_prog_gcc=yes
90126497Sacheelse
90226497Sache  ac_cv_prog_gcc=no
90326497Sachefi
90426497Sachefi
90526497Sache
90626497Sacheecho "$ac_t""$ac_cv_prog_gcc" 1>&6
90726497Sache
90826497Sacheif test $ac_cv_prog_gcc = yes; then
90926497Sache  GCC=yes
91058310Sacheelse
91158310Sache  GCC=
91258310Sachefi
91358310Sache
91458310Sacheac_test_CFLAGS="${CFLAGS+set}"
91558310Sacheac_save_CFLAGS="$CFLAGS"
91658310SacheCFLAGS=
91758310Sacheecho $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
91875406Sacheecho "configure:919: checking whether ${CC-cc} accepts -g" >&5
91926497Sacheif eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
92026497Sache  echo $ac_n "(cached) $ac_c" 1>&6
92126497Sacheelse
92226497Sache  echo 'void f(){}' > conftest.c
92326497Sacheif test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
92426497Sache  ac_cv_prog_cc_g=yes
92526497Sacheelse
92626497Sache  ac_cv_prog_cc_g=no
92726497Sachefi
92826497Sacherm -f conftest*
92926497Sache
93026497Sachefi
93126497Sache
93226497Sacheecho "$ac_t""$ac_cv_prog_cc_g" 1>&6
93358310Sacheif test "$ac_test_CFLAGS" = set; then
93458310Sache  CFLAGS="$ac_save_CFLAGS"
93558310Sacheelif test $ac_cv_prog_cc_g = yes; then
93658310Sache  if test "$GCC" = yes; then
93726497Sache    CFLAGS="-g -O2"
93826497Sache  else
93958310Sache    CFLAGS="-g"
94058310Sache  fi
94158310Sacheelse
94258310Sache  if test "$GCC" = yes; then
94326497Sache    CFLAGS="-O2"
94458310Sache  else
94558310Sache    CFLAGS=
94626497Sache  fi
94726497Sachefi
94826497Sache
94926497Sacheecho $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
95075406Sacheecho "configure:951: checking how to run the C preprocessor" >&5
95126497Sache# On Suns, sometimes $CPP names a directory.
95226497Sacheif test -n "$CPP" && test -d "$CPP"; then
95326497Sache  CPP=
95426497Sachefi
95526497Sacheif test -z "$CPP"; then
95626497Sacheif eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
95726497Sache  echo $ac_n "(cached) $ac_c" 1>&6
95826497Sacheelse
95926497Sache    # This must be in double quotes, not single quotes, because CPP may get
96026497Sache  # substituted into the Makefile and "${CC-cc}" will confuse make.
96126497Sache  CPP="${CC-cc} -E"
96226497Sache  # On the NeXT, cc -E runs the code through the compiler's parser,
96326497Sache  # not just through cpp.
96426497Sache  cat > conftest.$ac_ext <<EOF
96575406Sache#line 966 "configure"
96626497Sache#include "confdefs.h"
96726497Sache#include <assert.h>
96826497SacheSyntax Error
96926497SacheEOF
97026497Sacheac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
97175406Sache{ (eval echo configure:972: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
97258310Sacheac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
97326497Sacheif test -z "$ac_err"; then
97426497Sache  :
97526497Sacheelse
97626497Sache  echo "$ac_err" >&5
97726497Sache  echo "configure: failed program was:" >&5
97826497Sache  cat conftest.$ac_ext >&5
97926497Sache  rm -rf conftest*
98026497Sache  CPP="${CC-cc} -E -traditional-cpp"
98126497Sache  cat > conftest.$ac_ext <<EOF
98275406Sache#line 983 "configure"
98326497Sache#include "confdefs.h"
98426497Sache#include <assert.h>
98526497SacheSyntax Error
98626497SacheEOF
98726497Sacheac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
98875406Sache{ (eval echo configure:989: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
98958310Sacheac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
99026497Sacheif test -z "$ac_err"; then
99126497Sache  :
99226497Sacheelse
99326497Sache  echo "$ac_err" >&5
99426497Sache  echo "configure: failed program was:" >&5
99526497Sache  cat conftest.$ac_ext >&5
99626497Sache  rm -rf conftest*
99758310Sache  CPP="${CC-cc} -nologo -E"
99858310Sache  cat > conftest.$ac_ext <<EOF
99975406Sache#line 1000 "configure"
100058310Sache#include "confdefs.h"
100158310Sache#include <assert.h>
100258310SacheSyntax Error
100358310SacheEOF
100458310Sacheac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
100575406Sache{ (eval echo configure:1006: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
100658310Sacheac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
100758310Sacheif test -z "$ac_err"; then
100858310Sache  :
100958310Sacheelse
101058310Sache  echo "$ac_err" >&5
101158310Sache  echo "configure: failed program was:" >&5
101258310Sache  cat conftest.$ac_ext >&5
101358310Sache  rm -rf conftest*
101426497Sache  CPP=/lib/cpp
101526497Sachefi
101626497Sacherm -f conftest*
101726497Sachefi
101826497Sacherm -f conftest*
101958310Sachefi
102058310Sacherm -f conftest*
102126497Sache  ac_cv_prog_CPP="$CPP"
102226497Sachefi
102326497Sache  CPP="$ac_cv_prog_CPP"
102426497Sacheelse
102526497Sache  ac_cv_prog_CPP="$CPP"
102626497Sachefi
102726497Sacheecho "$ac_t""$CPP" 1>&6
102826497Sache
102935486Sacheac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
103035486Sacheecho $ac_n "checking for minix/config.h""... $ac_c" 1>&6
103175406Sacheecho "configure:1032: checking for minix/config.h" >&5
103235486Sacheif eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
103335486Sache  echo $ac_n "(cached) $ac_c" 1>&6
103435486Sacheelse
103535486Sache  cat > conftest.$ac_ext <<EOF
103675406Sache#line 1037 "configure"
103735486Sache#include "confdefs.h"
103835486Sache#include <minix/config.h>
103935486SacheEOF
104035486Sacheac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
104175406Sache{ (eval echo configure:1042: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
104258310Sacheac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
104335486Sacheif test -z "$ac_err"; then
104435486Sache  rm -rf conftest*
104535486Sache  eval "ac_cv_header_$ac_safe=yes"
104635486Sacheelse
104735486Sache  echo "$ac_err" >&5
104835486Sache  echo "configure: failed program was:" >&5
104935486Sache  cat conftest.$ac_ext >&5
105035486Sache  rm -rf conftest*
105135486Sache  eval "ac_cv_header_$ac_safe=no"
105235486Sachefi
105335486Sacherm -f conftest*
105435486Sachefi
105535486Sacheif eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
105635486Sache  echo "$ac_t""yes" 1>&6
105735486Sache  MINIX=yes
105835486Sacheelse
105935486Sache  echo "$ac_t""no" 1>&6
106035486SacheMINIX=
106135486Sachefi
106235486Sache
106335486Sacheif test "$MINIX" = yes; then
106435486Sache  cat >> confdefs.h <<\EOF
106535486Sache#define _POSIX_SOURCE 1
106635486SacheEOF
106735486Sache
106835486Sache  cat >> confdefs.h <<\EOF
106935486Sache#define _POSIX_1_SOURCE 2
107035486SacheEOF
107135486Sache
107235486Sache  cat >> confdefs.h <<\EOF
107335486Sache#define _MINIX 1
107435486SacheEOF
107535486Sache
107635486Sachefi
107735486Sache
107835486Sache
107935486Sache# If we're using gcc and the user hasn't specified CFLAGS, add -O to CFLAGS.
108035486Sachetest -n "$GCC" && test -n "$auto_cflags" && CFLAGS="$CFLAGS -O"
108135486Sache
108226497Sacheif test $ac_cv_prog_gcc = yes; then
108326497Sache    echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
108475406Sacheecho "configure:1085: checking whether ${CC-cc} needs -traditional" >&5
108526497Sacheif eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then
108626497Sache  echo $ac_n "(cached) $ac_c" 1>&6
108726497Sacheelse
108826497Sache    ac_pattern="Autoconf.*'x'"
108926497Sache  cat > conftest.$ac_ext <<EOF
109075406Sache#line 1091 "configure"
109126497Sache#include "confdefs.h"
109226497Sache#include <sgtty.h>
109326497SacheAutoconf TIOCGETP
109426497SacheEOF
109526497Sacheif (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
109626497Sache  egrep "$ac_pattern" >/dev/null 2>&1; then
109726497Sache  rm -rf conftest*
109826497Sache  ac_cv_prog_gcc_traditional=yes
109926497Sacheelse
110026497Sache  rm -rf conftest*
110126497Sache  ac_cv_prog_gcc_traditional=no
110226497Sachefi
110326497Sacherm -f conftest*
110426497Sache
110526497Sache
110626497Sache  if test $ac_cv_prog_gcc_traditional = no; then
110726497Sache    cat > conftest.$ac_ext <<EOF
110875406Sache#line 1109 "configure"
110926497Sache#include "confdefs.h"
111026497Sache#include <termio.h>
111126497SacheAutoconf TCGETA
111226497SacheEOF
111326497Sacheif (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
111426497Sache  egrep "$ac_pattern" >/dev/null 2>&1; then
111526497Sache  rm -rf conftest*
111626497Sache  ac_cv_prog_gcc_traditional=yes
111726497Sachefi
111826497Sacherm -f conftest*
111926497Sache
112026497Sache  fi
112126497Sachefi
112226497Sache
112326497Sacheecho "$ac_t""$ac_cv_prog_gcc_traditional" 1>&6
112426497Sache  if test $ac_cv_prog_gcc_traditional = yes; then
112526497Sache    CC="$CC -traditional"
112626497Sache  fi
112726497Sachefi
112826497Sache
112926497Sache# Find a good install program.  We prefer a C program (faster),
113026497Sache# so one script is as good as another.  But avoid the broken or
113126497Sache# incompatible versions:
113226497Sache# SysV /etc/install, /usr/sbin/install
113326497Sache# SunOS /usr/etc/install
113426497Sache# IRIX /sbin/install
113526497Sache# AIX /bin/install
113658310Sache# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
113726497Sache# AFS /usr/afsws/bin/install, which mishandles nonexistent args
113826497Sache# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
113926497Sache# ./install, which can be erroneously created by make from ./install.sh.
114026497Sacheecho $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
114175406Sacheecho "configure:1142: checking for a BSD compatible install" >&5
114226497Sacheif test -z "$INSTALL"; then
114326497Sacheif eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
114426497Sache  echo $ac_n "(cached) $ac_c" 1>&6
114526497Sacheelse
114658310Sache    IFS="${IFS= 	}"; ac_save_IFS="$IFS"; IFS=":"
114726497Sache  for ac_dir in $PATH; do
114826497Sache    # Account for people who put trailing slashes in PATH elements.
114926497Sache    case "$ac_dir/" in
115026497Sache    /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
115126497Sache    *)
115226497Sache      # OSF1 and SCO ODT 3.0 have their own names for install.
115358310Sache      # Don't use installbsd from OSF since it installs stuff as root
115458310Sache      # by default.
115558310Sache      for ac_prog in ginstall scoinst install; do
115626497Sache        if test -f $ac_dir/$ac_prog; then
115726497Sache	  if test $ac_prog = install &&
115826497Sache            grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
115926497Sache	    # AIX install.  It has an incompatible calling convention.
116026497Sache	    :
116126497Sache	  else
116226497Sache	    ac_cv_path_install="$ac_dir/$ac_prog -c"
116326497Sache	    break 2
116426497Sache	  fi
116526497Sache	fi
116626497Sache      done
116726497Sache      ;;
116826497Sache    esac
116926497Sache  done
117026497Sache  IFS="$ac_save_IFS"
117126497Sache
117226497Sachefi
117326497Sache  if test "${ac_cv_path_install+set}" = set; then
117426497Sache    INSTALL="$ac_cv_path_install"
117526497Sache  else
117626497Sache    # As a last resort, use the slow shell script.  We don't cache a
117726497Sache    # path for INSTALL within a source directory, because that will
117826497Sache    # break other packages using the cache if that directory is
117926497Sache    # removed, or if the path is relative.
118026497Sache    INSTALL="$ac_install_sh"
118126497Sache  fi
118226497Sachefi
118326497Sacheecho "$ac_t""$INSTALL" 1>&6
118426497Sache
118526497Sache# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
118626497Sache# It thinks the first close brace ends the variable substitution.
118726497Sachetest -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
118826497Sache
118958310Sachetest -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
119058310Sache
119126497Sachetest -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
119226497Sache
119347558Sache# Extract the first word of "ar", so it can be a program name with args.
119447558Sacheset dummy ar; ac_word=$2
119547558Sacheecho $ac_n "checking for $ac_word""... $ac_c" 1>&6
119675406Sacheecho "configure:1197: checking for $ac_word" >&5
119747558Sacheif eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
119847558Sache  echo $ac_n "(cached) $ac_c" 1>&6
119947558Sacheelse
120047558Sache  if test -n "$AR"; then
120147558Sache  ac_cv_prog_AR="$AR" # Let the user override the test.
120247558Sacheelse
120358310Sache  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
120458310Sache  ac_dummy="$PATH"
120558310Sache  for ac_dir in $ac_dummy; do
120647558Sache    test -z "$ac_dir" && ac_dir=.
120747558Sache    if test -f $ac_dir/$ac_word; then
120847558Sache      ac_cv_prog_AR="ar"
120947558Sache      break
121047558Sache    fi
121147558Sache  done
121247558Sache  IFS="$ac_save_ifs"
121347558Sachefi
121447558Sachefi
121547558SacheAR="$ac_cv_prog_AR"
121647558Sacheif test -n "$AR"; then
121747558Sache  echo "$ac_t""$AR" 1>&6
121847558Sacheelse
121947558Sache  echo "$ac_t""no" 1>&6
122047558Sachefi
122147558Sache
122247558Sachetest -n "$ARFLAGS" || ARFLAGS="cr"
122326497Sache# Extract the first word of "ranlib", so it can be a program name with args.
122426497Sacheset dummy ranlib; ac_word=$2
122526497Sacheecho $ac_n "checking for $ac_word""... $ac_c" 1>&6
122675406Sacheecho "configure:1227: checking for $ac_word" >&5
122726497Sacheif eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
122826497Sache  echo $ac_n "(cached) $ac_c" 1>&6
122926497Sacheelse
123026497Sache  if test -n "$RANLIB"; then
123126497Sache  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
123226497Sacheelse
123358310Sache  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
123458310Sache  ac_dummy="$PATH"
123558310Sache  for ac_dir in $ac_dummy; do
123626497Sache    test -z "$ac_dir" && ac_dir=.
123726497Sache    if test -f $ac_dir/$ac_word; then
123826497Sache      ac_cv_prog_RANLIB="ranlib"
123926497Sache      break
124026497Sache    fi
124126497Sache  done
124226497Sache  IFS="$ac_save_ifs"
124326497Sache  test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
124426497Sachefi
124526497Sachefi
124626497SacheRANLIB="$ac_cv_prog_RANLIB"
124726497Sacheif test -n "$RANLIB"; then
124826497Sache  echo "$ac_t""$RANLIB" 1>&6
124926497Sacheelse
125026497Sache  echo "$ac_t""no" 1>&6
125126497Sachefi
125226497Sache
125326497Sache
125447558SacheMAKE_SHELL=/bin/sh
125547558Sache
125647558Sache
125726497Sacheecho $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
125875406Sacheecho "configure:1259: checking return type of signal handlers" >&5
125926497Sacheif eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
126026497Sache  echo $ac_n "(cached) $ac_c" 1>&6
126126497Sacheelse
126226497Sache  cat > conftest.$ac_ext <<EOF
126375406Sache#line 1264 "configure"
126426497Sache#include "confdefs.h"
126526497Sache#include <sys/types.h>
126626497Sache#include <signal.h>
126726497Sache#ifdef signal
126826497Sache#undef signal
126926497Sache#endif
127026497Sache#ifdef __cplusplus
127126497Sacheextern "C" void (*signal (int, void (*)(int)))(int);
127226497Sache#else
127326497Sachevoid (*signal ()) ();
127426497Sache#endif
127526497Sache
127626497Sacheint main() {
127726497Sacheint i;
127826497Sache; return 0; }
127926497SacheEOF
128075406Sacheif { (eval echo configure:1281: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
128126497Sache  rm -rf conftest*
128226497Sache  ac_cv_type_signal=void
128326497Sacheelse
128426497Sache  echo "configure: failed program was:" >&5
128526497Sache  cat conftest.$ac_ext >&5
128626497Sache  rm -rf conftest*
128726497Sache  ac_cv_type_signal=int
128826497Sachefi
128926497Sacherm -f conftest*
129026497Sachefi
129126497Sache
129226497Sacheecho "$ac_t""$ac_cv_type_signal" 1>&6
129326497Sachecat >> confdefs.h <<EOF
129426497Sache#define RETSIGTYPE $ac_cv_type_signal
129526497SacheEOF
129626497Sache
129726497Sache
129826497Sache
129926497Sacheecho $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6
130075406Sacheecho "configure:1301: checking whether stat file-mode macros are broken" >&5
130126497Sacheif eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then
130226497Sache  echo $ac_n "(cached) $ac_c" 1>&6
130326497Sacheelse
130426497Sache  cat > conftest.$ac_ext <<EOF
130575406Sache#line 1306 "configure"
130626497Sache#include "confdefs.h"
130726497Sache#include <sys/types.h>
130826497Sache#include <sys/stat.h>
130926497Sache
131026497Sache#if defined(S_ISBLK) && defined(S_IFDIR)
131126497Sache# if S_ISBLK (S_IFDIR)
131226497SacheYou lose.
131326497Sache# endif
131426497Sache#endif
131526497Sache
131626497Sache#if defined(S_ISBLK) && defined(S_IFCHR)
131726497Sache# if S_ISBLK (S_IFCHR)
131826497SacheYou lose.
131926497Sache# endif
132026497Sache#endif
132126497Sache
132226497Sache#if defined(S_ISLNK) && defined(S_IFREG)
132326497Sache# if S_ISLNK (S_IFREG)
132426497SacheYou lose.
132526497Sache# endif
132626497Sache#endif
132726497Sache
132826497Sache#if defined(S_ISSOCK) && defined(S_IFREG)
132926497Sache# if S_ISSOCK (S_IFREG)
133026497SacheYou lose.
133126497Sache# endif
133226497Sache#endif
133326497Sache
133426497SacheEOF
133526497Sacheif (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
133626497Sache  egrep "You lose" >/dev/null 2>&1; then
133726497Sache  rm -rf conftest*
133826497Sache  ac_cv_header_stat_broken=yes
133926497Sacheelse
134026497Sache  rm -rf conftest*
134126497Sache  ac_cv_header_stat_broken=no
134226497Sachefi
134326497Sacherm -f conftest*
134426497Sache
134526497Sachefi
134626497Sache
134726497Sacheecho "$ac_t""$ac_cv_header_stat_broken" 1>&6
134826497Sacheif test $ac_cv_header_stat_broken = yes; then
134926497Sache  cat >> confdefs.h <<\EOF
135026497Sache#define STAT_MACROS_BROKEN 1
135126497SacheEOF
135226497Sache
135326497Sachefi
135426497Sache
135526497Sacheac_header_dirent=no
135626497Sachefor ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
135726497Sachedo
135826497Sacheac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
135926497Sacheecho $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
136075406Sacheecho "configure:1361: checking for $ac_hdr that defines DIR" >&5
136126497Sacheif eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
136226497Sache  echo $ac_n "(cached) $ac_c" 1>&6
136326497Sacheelse
136426497Sache  cat > conftest.$ac_ext <<EOF
136575406Sache#line 1366 "configure"
136626497Sache#include "confdefs.h"
136726497Sache#include <sys/types.h>
136826497Sache#include <$ac_hdr>
136926497Sacheint main() {
137026497SacheDIR *dirp = 0;
137126497Sache; return 0; }
137226497SacheEOF
137375406Sacheif { (eval echo configure:1374: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
137426497Sache  rm -rf conftest*
137526497Sache  eval "ac_cv_header_dirent_$ac_safe=yes"
137626497Sacheelse
137726497Sache  echo "configure: failed program was:" >&5
137826497Sache  cat conftest.$ac_ext >&5
137926497Sache  rm -rf conftest*
138026497Sache  eval "ac_cv_header_dirent_$ac_safe=no"
138126497Sachefi
138226497Sacherm -f conftest*
138326497Sachefi
138426497Sacheif eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
138526497Sache  echo "$ac_t""yes" 1>&6
138626497Sache    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
138726497Sache  cat >> confdefs.h <<EOF
138826497Sache#define $ac_tr_hdr 1
138926497SacheEOF
139026497Sache ac_header_dirent=$ac_hdr; break
139126497Sacheelse
139226497Sache  echo "$ac_t""no" 1>&6
139326497Sachefi
139426497Sachedone
139526497Sache# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
139626497Sacheif test $ac_header_dirent = dirent.h; then
139726497Sacheecho $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
139875406Sacheecho "configure:1399: checking for opendir in -ldir" >&5
139926497Sacheac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
140026497Sacheif eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
140126497Sache  echo $ac_n "(cached) $ac_c" 1>&6
140226497Sacheelse
140326497Sache  ac_save_LIBS="$LIBS"
140426497SacheLIBS="-ldir  $LIBS"
140526497Sachecat > conftest.$ac_ext <<EOF
140675406Sache#line 1407 "configure"
140726497Sache#include "confdefs.h"
140826497Sache/* Override any gcc2 internal prototype to avoid an error.  */
140926497Sache/* We use char because int might match the return type of a gcc2
141026497Sache    builtin and then its argument prototype would still apply.  */
141126497Sachechar opendir();
141226497Sache
141326497Sacheint main() {
141426497Sacheopendir()
141526497Sache; return 0; }
141626497SacheEOF
141775406Sacheif { (eval echo configure:1418: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
141826497Sache  rm -rf conftest*
141926497Sache  eval "ac_cv_lib_$ac_lib_var=yes"
142026497Sacheelse
142126497Sache  echo "configure: failed program was:" >&5
142226497Sache  cat conftest.$ac_ext >&5
142326497Sache  rm -rf conftest*
142426497Sache  eval "ac_cv_lib_$ac_lib_var=no"
142526497Sachefi
142626497Sacherm -f conftest*
142726497SacheLIBS="$ac_save_LIBS"
142826497Sache
142926497Sachefi
143026497Sacheif eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
143126497Sache  echo "$ac_t""yes" 1>&6
143226497Sache  LIBS="$LIBS -ldir"
143326497Sacheelse
143426497Sache  echo "$ac_t""no" 1>&6
143526497Sachefi
143626497Sache
143726497Sacheelse
143826497Sacheecho $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
143975406Sacheecho "configure:1440: checking for opendir in -lx" >&5
144026497Sacheac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
144126497Sacheif eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
144226497Sache  echo $ac_n "(cached) $ac_c" 1>&6
144326497Sacheelse
144426497Sache  ac_save_LIBS="$LIBS"
144526497SacheLIBS="-lx  $LIBS"
144626497Sachecat > conftest.$ac_ext <<EOF
144775406Sache#line 1448 "configure"
144826497Sache#include "confdefs.h"
144926497Sache/* Override any gcc2 internal prototype to avoid an error.  */
145026497Sache/* We use char because int might match the return type of a gcc2
145126497Sache    builtin and then its argument prototype would still apply.  */
145226497Sachechar opendir();
145326497Sache
145426497Sacheint main() {
145526497Sacheopendir()
145626497Sache; return 0; }
145726497SacheEOF
145875406Sacheif { (eval echo configure:1459: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
145926497Sache  rm -rf conftest*
146026497Sache  eval "ac_cv_lib_$ac_lib_var=yes"
146126497Sacheelse
146226497Sache  echo "configure: failed program was:" >&5
146326497Sache  cat conftest.$ac_ext >&5
146426497Sache  rm -rf conftest*
146526497Sache  eval "ac_cv_lib_$ac_lib_var=no"
146626497Sachefi
146726497Sacherm -f conftest*
146826497SacheLIBS="$ac_save_LIBS"
146926497Sache
147026497Sachefi
147126497Sacheif eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
147226497Sache  echo "$ac_t""yes" 1>&6
147326497Sache  LIBS="$LIBS -lx"
147426497Sacheelse
147526497Sache  echo "$ac_t""no" 1>&6
147626497Sachefi
147726497Sache
147826497Sachefi
147926497Sache
148026497Sache
148158310Sachefor ac_func in lstat memmove putenv select setenv setlocale \
148258310Sache		strcasecmp tcgetattr
148326497Sachedo
148426497Sacheecho $ac_n "checking for $ac_func""... $ac_c" 1>&6
148575406Sacheecho "configure:1486: checking for $ac_func" >&5
148626497Sacheif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
148726497Sache  echo $ac_n "(cached) $ac_c" 1>&6
148826497Sacheelse
148926497Sache  cat > conftest.$ac_ext <<EOF
149075406Sache#line 1491 "configure"
149126497Sache#include "confdefs.h"
149226497Sache/* System header to define __stub macros and hopefully few prototypes,
149326497Sache    which can conflict with char $ac_func(); below.  */
149426497Sache#include <assert.h>
149526497Sache/* Override any gcc2 internal prototype to avoid an error.  */
149626497Sache/* We use char because int might match the return type of a gcc2
149726497Sache    builtin and then its argument prototype would still apply.  */
149826497Sachechar $ac_func();
149926497Sache
150026497Sacheint main() {
150126497Sache
150226497Sache/* The GNU C library defines this for functions which it implements
150326497Sache    to always fail with ENOSYS.  Some functions are actually named
150426497Sache    something starting with __ and the normal name is an alias.  */
150526497Sache#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
150626497Sachechoke me
150726497Sache#else
150826497Sache$ac_func();
150926497Sache#endif
151026497Sache
151126497Sache; return 0; }
151226497SacheEOF
151375406Sacheif { (eval echo configure:1514: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
151426497Sache  rm -rf conftest*
151526497Sache  eval "ac_cv_func_$ac_func=yes"
151626497Sacheelse
151726497Sache  echo "configure: failed program was:" >&5
151826497Sache  cat conftest.$ac_ext >&5
151926497Sache  rm -rf conftest*
152026497Sache  eval "ac_cv_func_$ac_func=no"
152126497Sachefi
152226497Sacherm -f conftest*
152326497Sachefi
152426497Sache
152526497Sacheif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
152626497Sache  echo "$ac_t""yes" 1>&6
152726497Sache    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
152826497Sache  cat >> confdefs.h <<EOF
152926497Sache#define $ac_tr_func 1
153026497SacheEOF
153126497Sache 
153226497Sacheelse
153326497Sache  echo "$ac_t""no" 1>&6
153426497Sachefi
153526497Sachedone
153626497Sache
153726497Sache
153826497Sacheecho $ac_n "checking for working strcoll""... $ac_c" 1>&6
153975406Sacheecho "configure:1540: checking for working strcoll" >&5
154026497Sacheif eval "test \"`echo '$''{'ac_cv_func_strcoll_works'+set}'`\" = set"; then
154126497Sache  echo $ac_n "(cached) $ac_c" 1>&6
154226497Sacheelse
154326497Sache  if test "$cross_compiling" = yes; then
154426497Sache  ac_cv_func_strcoll_works=no
154526497Sacheelse
154626497Sache  cat > conftest.$ac_ext <<EOF
154775406Sache#line 1548 "configure"
154826497Sache#include "confdefs.h"
154926497Sache#include <string.h>
155026497Sachemain ()
155126497Sache{
155226497Sache  exit (strcoll ("abc", "def") >= 0 ||
155326497Sache	strcoll ("ABC", "DEF") >= 0 ||
155426497Sache	strcoll ("123", "456") >= 0);
155526497Sache}
155626497SacheEOF
155775406Sacheif { (eval echo configure:1558: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
155826497Sachethen
155926497Sache  ac_cv_func_strcoll_works=yes
156026497Sacheelse
156126497Sache  echo "configure: failed program was:" >&5
156226497Sache  cat conftest.$ac_ext >&5
156326497Sache  rm -fr conftest*
156426497Sache  ac_cv_func_strcoll_works=no
156526497Sachefi
156626497Sacherm -fr conftest*
156726497Sachefi
156826497Sache
156926497Sachefi
157026497Sache
157126497Sacheecho "$ac_t""$ac_cv_func_strcoll_works" 1>&6
157226497Sacheif test $ac_cv_func_strcoll_works = yes; then
157326497Sache  cat >> confdefs.h <<\EOF
157426497Sache#define HAVE_STRCOLL 1
157526497SacheEOF
157626497Sache
157726497Sachefi
157826497Sache
157926497Sache
158026497Sachefor ac_hdr in unistd.h stdlib.h varargs.h stdarg.h string.h \
158126497Sache		sys/ptem.h sys/pte.h sys/stream.h sys/select.h \
158226497Sache		termcap.h termios.h termio.h sys/file.h locale.h
158326497Sachedo
158426497Sacheac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
158526497Sacheecho $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
158675406Sacheecho "configure:1587: checking for $ac_hdr" >&5
158726497Sacheif eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
158826497Sache  echo $ac_n "(cached) $ac_c" 1>&6
158926497Sacheelse
159026497Sache  cat > conftest.$ac_ext <<EOF
159175406Sache#line 1592 "configure"
159226497Sache#include "confdefs.h"
159326497Sache#include <$ac_hdr>
159426497SacheEOF
159526497Sacheac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
159675406Sache{ (eval echo configure:1597: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
159758310Sacheac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
159826497Sacheif test -z "$ac_err"; then
159926497Sache  rm -rf conftest*
160026497Sache  eval "ac_cv_header_$ac_safe=yes"
160126497Sacheelse
160226497Sache  echo "$ac_err" >&5
160326497Sache  echo "configure: failed program was:" >&5
160426497Sache  cat conftest.$ac_ext >&5
160526497Sache  rm -rf conftest*
160626497Sache  eval "ac_cv_header_$ac_safe=no"
160726497Sachefi
160826497Sacherm -f conftest*
160926497Sachefi
161026497Sacheif eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
161126497Sache  echo "$ac_t""yes" 1>&6
161226497Sache    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
161326497Sache  cat >> confdefs.h <<EOF
161426497Sache#define $ac_tr_hdr 1
161526497SacheEOF
161626497Sache 
161726497Sacheelse
161826497Sache  echo "$ac_t""no" 1>&6
161926497Sachefi
162026497Sachedone
162126497Sache
162226497Sache
162326497Sache
162426497Sacheecho $ac_n "checking for type of signal functions""... $ac_c" 1>&6
162575406Sacheecho "configure:1626: checking for type of signal functions" >&5
162626497Sacheif eval "test \"`echo '$''{'bash_cv_signal_vintage'+set}'`\" = set"; then
162726497Sache  echo $ac_n "(cached) $ac_c" 1>&6
162826497Sacheelse
162926497Sache  
163026497Sache  cat > conftest.$ac_ext <<EOF
163175406Sache#line 1632 "configure"
163226497Sache#include "confdefs.h"
163326497Sache#include <signal.h>
163426497Sacheint main() {
163526497Sache
163626497Sache    sigset_t ss;
163726497Sache    struct sigaction sa;
163826497Sache    sigemptyset(&ss); sigsuspend(&ss);
163926497Sache    sigaction(SIGINT, &sa, (struct sigaction *) 0);
164026497Sache    sigprocmask(SIG_BLOCK, &ss, (sigset_t *) 0);
164126497Sache  
164226497Sache; return 0; }
164326497SacheEOF
164475406Sacheif { (eval echo configure:1645: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
164526497Sache  rm -rf conftest*
164626497Sache  bash_cv_signal_vintage=posix
164726497Sacheelse
164826497Sache  echo "configure: failed program was:" >&5
164926497Sache  cat conftest.$ac_ext >&5
165026497Sache  rm -rf conftest*
165126497Sache  
165226497Sache    cat > conftest.$ac_ext <<EOF
165375406Sache#line 1654 "configure"
165426497Sache#include "confdefs.h"
165526497Sache#include <signal.h>
165626497Sacheint main() {
165726497Sache
165826497Sache	int mask = sigmask(SIGINT);
165926497Sache	sigsetmask(mask); sigblock(mask); sigpause(mask);
166026497Sache    
166126497Sache; return 0; }
166226497SacheEOF
166375406Sacheif { (eval echo configure:1664: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
166426497Sache  rm -rf conftest*
166526497Sache  bash_cv_signal_vintage=4.2bsd
166626497Sacheelse
166726497Sache  echo "configure: failed program was:" >&5
166826497Sache  cat conftest.$ac_ext >&5
166926497Sache  rm -rf conftest*
167026497Sache  
167126497Sache      cat > conftest.$ac_ext <<EOF
167275406Sache#line 1673 "configure"
167326497Sache#include "confdefs.h"
167426497Sache
167526497Sache	#include <signal.h>
167626497Sache	RETSIGTYPE foo() { }
167726497Sacheint main() {
167826497Sache
167926497Sache		int mask = sigmask(SIGINT);
168026497Sache		sigset(SIGINT, foo); sigrelse(SIGINT);
168126497Sache		sighold(SIGINT); sigpause(SIGINT);
168226497Sache        
168326497Sache; return 0; }
168426497SacheEOF
168575406Sacheif { (eval echo configure:1686: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
168626497Sache  rm -rf conftest*
168726497Sache  bash_cv_signal_vintage=svr3
168826497Sacheelse
168926497Sache  echo "configure: failed program was:" >&5
169026497Sache  cat conftest.$ac_ext >&5
169126497Sache  rm -rf conftest*
169226497Sache  bash_cv_signal_vintage=v7
169326497Sache    
169426497Sachefi
169526497Sacherm -f conftest*
169626497Sache  
169726497Sachefi
169826497Sacherm -f conftest*
169926497Sache
170026497Sachefi
170126497Sacherm -f conftest*
170226497Sache
170326497Sachefi
170426497Sache
170526497Sacheecho "$ac_t""$bash_cv_signal_vintage" 1>&6
170626497Sacheif test "$bash_cv_signal_vintage" = posix; then
170726497Sachecat >> confdefs.h <<\EOF
170826497Sache#define HAVE_POSIX_SIGNALS 1
170926497SacheEOF
171026497Sache
171126497Sacheelif test "$bash_cv_signal_vintage" = "4.2bsd"; then
171226497Sachecat >> confdefs.h <<\EOF
171326497Sache#define HAVE_BSD_SIGNALS 1
171426497SacheEOF
171526497Sache
171626497Sacheelif test "$bash_cv_signal_vintage" = svr3; then
171726497Sachecat >> confdefs.h <<\EOF
171826497Sache#define HAVE_USG_SIGHOLD 1
171926497SacheEOF
172026497Sache
172126497Sachefi
172226497Sache
172326497Sache
172426497Sache
172526497Sacheecho $ac_n "checking if signal handlers must be reinstalled when invoked""... $ac_c" 1>&6
172675406Sacheecho "configure:1727: checking if signal handlers must be reinstalled when invoked" >&5
172726497Sacheif eval "test \"`echo '$''{'bash_cv_must_reinstall_sighandlers'+set}'`\" = set"; then
172826497Sache  echo $ac_n "(cached) $ac_c" 1>&6
172926497Sacheelse
173026497Sache  if test "$cross_compiling" = yes; then
173147558Sache  echo "configure: warning: cannot check signal handling if cross compiling -- defaulting to no" 1>&2
173235486Sache    bash_cv_must_reinstall_sighandlers=no
173335486Sache
173426497Sacheelse
173526497Sache  cat > conftest.$ac_ext <<EOF
173675406Sache#line 1737 "configure"
173726497Sache#include "confdefs.h"
173826497Sache
173926497Sache#include <signal.h>
174026497Sache#ifdef HAVE_UNISTD_H
174126497Sache#include <unistd.h>
174226497Sache#endif
174326497Sache
174426497Sachetypedef RETSIGTYPE sigfunc();
174526497Sache
174626497Sacheint nsigint;
174726497Sache
174826497Sache#ifdef HAVE_POSIX_SIGNALS
174926497Sachesigfunc *
175026497Sacheset_signal_handler(sig, handler)
175126497Sache     int sig;
175226497Sache     sigfunc *handler;
175326497Sache{
175426497Sache  struct sigaction act, oact;
175526497Sache  act.sa_handler = handler;
175626497Sache  act.sa_flags = 0;
175726497Sache  sigemptyset (&act.sa_mask);
175826497Sache  sigemptyset (&oact.sa_mask);
175926497Sache  sigaction (sig, &act, &oact);
176026497Sache  return (oact.sa_handler);
176126497Sache}
176226497Sache#else
176326497Sache#define set_signal_handler(s, h) signal(s, h)
176426497Sache#endif
176526497Sache
176626497SacheRETSIGTYPE
176726497Sachesigint(s)
176826497Sacheint s;
176926497Sache{
177026497Sache  nsigint++;
177126497Sache}
177226497Sache
177326497Sachemain()
177426497Sache{
177526497Sache	nsigint = 0;
177626497Sache	set_signal_handler(SIGINT, sigint);
177726497Sache	kill((int)getpid(), SIGINT);
177826497Sache	kill((int)getpid(), SIGINT);
177926497Sache	exit(nsigint != 2);
178026497Sache}
178126497Sache
178226497SacheEOF
178375406Sacheif { (eval echo configure:1784: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
178426497Sachethen
178526497Sache  bash_cv_must_reinstall_sighandlers=no
178626497Sacheelse
178726497Sache  echo "configure: failed program was:" >&5
178826497Sache  cat conftest.$ac_ext >&5
178926497Sache  rm -fr conftest*
179026497Sache  bash_cv_must_reinstall_sighandlers=yes
179126497Sachefi
179226497Sacherm -fr conftest*
179326497Sachefi
179426497Sache
179526497Sachefi
179626497Sache
179726497Sacheecho "$ac_t""$bash_cv_must_reinstall_sighandlers" 1>&6
179826497Sacheif test $bash_cv_must_reinstall_sighandlers = yes; then
179926497Sachecat >> confdefs.h <<\EOF
180026497Sache#define MUST_REINSTALL_SIGHANDLERS 1
180126497SacheEOF
180226497Sache
180326497Sachefi
180426497Sache
180526497Sache
180626497Sache
180726497Sacheecho $ac_n "checking for presence of POSIX-style sigsetjmp/siglongjmp""... $ac_c" 1>&6
180875406Sacheecho "configure:1809: checking for presence of POSIX-style sigsetjmp/siglongjmp" >&5
180926497Sacheif eval "test \"`echo '$''{'bash_cv_func_sigsetjmp'+set}'`\" = set"; then
181026497Sache  echo $ac_n "(cached) $ac_c" 1>&6
181126497Sacheelse
181226497Sache  if test "$cross_compiling" = yes; then
181347558Sache  echo "configure: warning: cannot check for sigsetjmp/siglongjmp if cross-compiling -- defaulting to missing" 1>&2
181435486Sache     bash_cv_func_sigsetjmp=missing
181535486Sache
181626497Sacheelse
181726497Sache  cat > conftest.$ac_ext <<EOF
181875406Sache#line 1819 "configure"
181926497Sache#include "confdefs.h"
182026497Sache
182126497Sache#ifdef HAVE_UNISTD_H
182226497Sache#include <unistd.h>
182326497Sache#endif
182426497Sache#include <sys/types.h>
182526497Sache#include <signal.h>
182626497Sache#include <setjmp.h>
182726497Sache
182826497Sachemain()
182926497Sache{
183026497Sache#if !defined (_POSIX_VERSION) || !defined (HAVE_POSIX_SIGNALS)
183126497Sacheexit (1);
183226497Sache#else
183326497Sache
183426497Sacheint code;
183526497Sachesigset_t set, oset;
183626497Sachesigjmp_buf xx;
183726497Sache
183826497Sache/* get the mask */
183926497Sachesigemptyset(&set);
184026497Sachesigemptyset(&oset);
184126497Sachesigprocmask(SIG_BLOCK, (sigset_t *)NULL, &set);
184226497Sachesigprocmask(SIG_BLOCK, (sigset_t *)NULL, &oset);
184326497Sache
184426497Sache/* save it */
184526497Sachecode = sigsetjmp(xx, 1);
184626497Sacheif (code)
184726497Sache  exit(0);	/* could get sigmask and compare to oset here. */
184826497Sache
184926497Sache/* change it */
185026497Sachesigaddset(&set, SIGINT);
185126497Sachesigprocmask(SIG_BLOCK, &set, (sigset_t *)NULL);
185226497Sache
185326497Sache/* and siglongjmp */
185426497Sachesiglongjmp(xx, 10);
185526497Sacheexit(1);
185626497Sache#endif
185726497Sache}
185826497SacheEOF
185975406Sacheif { (eval echo configure:1860: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
186026497Sachethen
186126497Sache  bash_cv_func_sigsetjmp=present
186226497Sacheelse
186326497Sache  echo "configure: failed program was:" >&5
186426497Sache  cat conftest.$ac_ext >&5
186526497Sache  rm -fr conftest*
186626497Sache  bash_cv_func_sigsetjmp=missing
186726497Sachefi
186826497Sacherm -fr conftest*
186926497Sachefi
187026497Sache
187126497Sachefi
187226497Sache
187326497Sacheecho "$ac_t""$bash_cv_func_sigsetjmp" 1>&6
187426497Sacheif test $bash_cv_func_sigsetjmp = present; then
187526497Sachecat >> confdefs.h <<\EOF
187626497Sache#define HAVE_POSIX_SIGSETJMP 1
187726497SacheEOF
187826497Sache
187926497Sachefi
188026497Sache
188126497Sacheecho $ac_n "checking for lstat""... $ac_c" 1>&6
188275406Sacheecho "configure:1883: checking for lstat" >&5
188326497Sacheif eval "test \"`echo '$''{'bash_cv_func_lstat'+set}'`\" = set"; then
188426497Sache  echo $ac_n "(cached) $ac_c" 1>&6
188526497Sacheelse
188626497Sache  cat > conftest.$ac_ext <<EOF
188775406Sache#line 1888 "configure"
188826497Sache#include "confdefs.h"
188926497Sache
189026497Sache#include <sys/types.h>
189126497Sache#include <sys/stat.h>
189226497Sache
189326497Sacheint main() {
189435486Sache lstat(".",(struct stat *)0); 
189526497Sache; return 0; }
189626497SacheEOF
189775406Sacheif { (eval echo configure:1898: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
189826497Sache  rm -rf conftest*
189926497Sache  bash_cv_func_lstat=yes
190026497Sacheelse
190126497Sache  echo "configure: failed program was:" >&5
190226497Sache  cat conftest.$ac_ext >&5
190326497Sache  rm -rf conftest*
190426497Sache  bash_cv_func_lstat=no
190526497Sachefi
190626497Sacherm -f conftest*
190726497Sachefi
190826497Sache
190926497Sacheecho "$ac_t""$bash_cv_func_lstat" 1>&6
191026497Sacheif test $bash_cv_func_lstat = yes; then
191126497Sache  cat >> confdefs.h <<\EOF
191226497Sache#define HAVE_LSTAT 1
191326497SacheEOF
191426497Sache
191526497Sachefi
191626497Sache
191775406Sacheecho $ac_n "checking whether getpw functions are declared in pwd.h""... $ac_c" 1>&6
191875406Sacheecho "configure:1919: checking whether getpw functions are declared in pwd.h" >&5
191975406Sacheif eval "test \"`echo '$''{'bash_cv_getpw_declared'+set}'`\" = set"; then
192026497Sache  echo $ac_n "(cached) $ac_c" 1>&6
192126497Sacheelse
192226497Sache  cat > conftest.$ac_ext <<EOF
192375406Sache#line 1924 "configure"
192426497Sache#include "confdefs.h"
192575406Sache
192626497Sache#include <sys/types.h>
192775406Sache#ifdef HAVE_UNISTD_H
192875406Sache#  include <unistd.h>
192975406Sache#endif
193026497Sache#include <pwd.h>
193175406Sache
193226497SacheEOF
193375406Sacheif (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
193475406Sache  egrep "getpwuid" >/dev/null 2>&1; then
193526497Sache  rm -rf conftest*
193675406Sache  bash_cv_getpw_declared=yes
193726497Sacheelse
193826497Sache  rm -rf conftest*
193975406Sache  bash_cv_getpw_declared=no
194026497Sachefi
194126497Sacherm -f conftest*
194275406Sache
194326497Sachefi
194426497Sache
194575406Sacheecho "$ac_t""$bash_cv_getpw_declared" 1>&6
194675406Sacheif test $bash_cv_getpw_declared = yes; then
194726497Sachecat >> confdefs.h <<\EOF
194826497Sache#define HAVE_GETPW_DECLS 1
194926497SacheEOF
195026497Sache
195126497Sachefi
195226497Sache
195326497Sache
195426497Sacheecho $ac_n "checking whether or not strcoll and strcmp differ""... $ac_c" 1>&6
195575406Sacheecho "configure:1956: checking whether or not strcoll and strcmp differ" >&5
195626497Sacheif eval "test \"`echo '$''{'bash_cv_func_strcoll_broken'+set}'`\" = set"; then
195726497Sache  echo $ac_n "(cached) $ac_c" 1>&6
195826497Sacheelse
195926497Sache  if test "$cross_compiling" = yes; then
196047558Sache  echo "configure: warning: cannot check strcoll if cross compiling -- defaulting to no" 1>&2
196135486Sache    bash_cv_func_strcoll_broken=no
196235486Sache
196326497Sacheelse
196426497Sache  cat > conftest.$ac_ext <<EOF
196575406Sache#line 1966 "configure"
196626497Sache#include "confdefs.h"
196726497Sache
196826497Sache#include <stdio.h>
196926497Sache#if defined (HAVE_LOCALE_H)
197026497Sache#include <locale.h>
197126497Sache#endif
197226497Sache
197326497Sachemain(c, v)
197426497Sacheint     c;
197526497Sachechar    *v[];
197626497Sache{
197726497Sache        int     r1, r2;
197826497Sache        char    *deflocale, *defcoll;
197926497Sache
198026497Sache#ifdef HAVE_SETLOCALE
198126497Sache        deflocale = setlocale(LC_ALL, "");
198226497Sache	defcoll = setlocale(LC_COLLATE, "");
198326497Sache#endif
198426497Sache
198526497Sache#ifdef HAVE_STRCOLL
198626497Sache	/* These two values are taken from tests/glob-test. */
198726497Sache        r1 = strcoll("abd", "aXd");
198826497Sache#else
198926497Sache	r1 = 0;
199026497Sache#endif
199126497Sache        r2 = strcmp("abd", "aXd");
199226497Sache
199326497Sache	/* These two should both be greater than 0.  It is permissible for
199426497Sache	   a system to return different values, as long as the sign is the
199526497Sache	   same. */
199626497Sache
199726497Sache        /* Exit with 1 (failure) if these two values are both > 0, since
199826497Sache	   this tests whether strcoll(3) is broken with respect to strcmp(3)
199926497Sache	   in the default locale. */
200026497Sache	exit (r1 > 0 && r2 > 0);
200126497Sache}
200226497Sache
200326497SacheEOF
200475406Sacheif { (eval echo configure:2005: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
200526497Sachethen
200626497Sache  bash_cv_func_strcoll_broken=yes
200726497Sacheelse
200826497Sache  echo "configure: failed program was:" >&5
200926497Sache  cat conftest.$ac_ext >&5
201026497Sache  rm -fr conftest*
201126497Sache  bash_cv_func_strcoll_broken=no
201226497Sachefi
201326497Sacherm -fr conftest*
201426497Sachefi
201526497Sache
201626497Sachefi
201726497Sache
201826497Sacheecho "$ac_t""$bash_cv_func_strcoll_broken" 1>&6
201926497Sacheif test $bash_cv_func_strcoll_broken = yes; then
202026497Sachecat >> confdefs.h <<\EOF
202126497Sache#define STRCOLL_BROKEN 1
202226497SacheEOF
202326497Sache
202426497Sachefi
202526497Sache
202626497Sache
202726497Sacheecho $ac_n "checking whether signal handlers are of type void""... $ac_c" 1>&6
202875406Sacheecho "configure:2029: checking whether signal handlers are of type void" >&5
202926497Sacheif eval "test \"`echo '$''{'bash_cv_void_sighandler'+set}'`\" = set"; then
203026497Sache  echo $ac_n "(cached) $ac_c" 1>&6
203126497Sacheelse
203226497Sache  cat > conftest.$ac_ext <<EOF
203375406Sache#line 2034 "configure"
203426497Sache#include "confdefs.h"
203526497Sache#include <sys/types.h>
203626497Sache#include <signal.h>
203726497Sache#ifdef signal
203826497Sache#undef signal
203926497Sache#endif
204026497Sache#ifdef __cplusplus
204126497Sacheextern "C"
204226497Sache#endif
204326497Sachevoid (*signal ()) ();
204426497Sacheint main() {
204526497Sacheint i;
204626497Sache; return 0; }
204726497SacheEOF
204875406Sacheif { (eval echo configure:2049: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
204926497Sache  rm -rf conftest*
205026497Sache  bash_cv_void_sighandler=yes
205126497Sacheelse
205226497Sache  echo "configure: failed program was:" >&5
205326497Sache  cat conftest.$ac_ext >&5
205426497Sache  rm -rf conftest*
205526497Sache  bash_cv_void_sighandler=no
205626497Sachefi
205726497Sacherm -f conftest*
205826497Sachefi
205926497Sacheecho "$ac_t""$bash_cv_void_sighandler" 1>&6
206026497Sacheif test $bash_cv_void_sighandler = yes; then
206126497Sachecat >> confdefs.h <<\EOF
206226497Sache#define VOID_SIGHANDLER 1
206326497SacheEOF
206426497Sache
206526497Sachefi
206626497Sache
206726497Sacheecho $ac_n "checking for TIOCGWINSZ in sys/ioctl.h""... $ac_c" 1>&6
206875406Sacheecho "configure:2069: checking for TIOCGWINSZ in sys/ioctl.h" >&5
206926497Sacheif eval "test \"`echo '$''{'bash_cv_tiocgwinsz_in_ioctl'+set}'`\" = set"; then
207026497Sache  echo $ac_n "(cached) $ac_c" 1>&6
207126497Sacheelse
207226497Sache  cat > conftest.$ac_ext <<EOF
207375406Sache#line 2074 "configure"
207426497Sache#include "confdefs.h"
207526497Sache#include <sys/types.h>
207626497Sache#include <sys/ioctl.h>
207726497Sacheint main() {
207826497Sacheint x = TIOCGWINSZ;
207926497Sache; return 0; }
208026497SacheEOF
208175406Sacheif { (eval echo configure:2082: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
208226497Sache  rm -rf conftest*
208326497Sache  bash_cv_tiocgwinsz_in_ioctl=yes
208426497Sacheelse
208526497Sache  echo "configure: failed program was:" >&5
208626497Sache  cat conftest.$ac_ext >&5
208726497Sache  rm -rf conftest*
208826497Sache  bash_cv_tiocgwinsz_in_ioctl=no
208926497Sachefi
209026497Sacherm -f conftest*
209126497Sachefi
209226497Sache
209326497Sacheecho "$ac_t""$bash_cv_tiocgwinsz_in_ioctl" 1>&6
209426497Sacheif test $bash_cv_tiocgwinsz_in_ioctl = yes; then   
209526497Sachecat >> confdefs.h <<\EOF
209626497Sache#define GWINSZ_IN_SYS_IOCTL 1
209726497SacheEOF
209826497Sache
209926497Sachefi
210026497Sache
210126497Sacheecho $ac_n "checking for TIOCSTAT in sys/ioctl.h""... $ac_c" 1>&6
210275406Sacheecho "configure:2103: checking for TIOCSTAT in sys/ioctl.h" >&5
210326497Sacheif eval "test \"`echo '$''{'bash_cv_tiocstat_in_ioctl'+set}'`\" = set"; then
210426497Sache  echo $ac_n "(cached) $ac_c" 1>&6
210526497Sacheelse
210626497Sache  cat > conftest.$ac_ext <<EOF
210775406Sache#line 2108 "configure"
210826497Sache#include "confdefs.h"
210926497Sache#include <sys/types.h>
211026497Sache#include <sys/ioctl.h>
211126497Sacheint main() {
211226497Sacheint x = TIOCSTAT;
211326497Sache; return 0; }
211426497SacheEOF
211575406Sacheif { (eval echo configure:2116: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
211626497Sache  rm -rf conftest*
211726497Sache  bash_cv_tiocstat_in_ioctl=yes
211826497Sacheelse
211926497Sache  echo "configure: failed program was:" >&5
212026497Sache  cat conftest.$ac_ext >&5
212126497Sache  rm -rf conftest*
212226497Sache  bash_cv_tiocstat_in_ioctl=no
212326497Sachefi
212426497Sacherm -f conftest*
212526497Sachefi
212626497Sache
212726497Sacheecho "$ac_t""$bash_cv_tiocstat_in_ioctl" 1>&6
212826497Sacheif test $bash_cv_tiocstat_in_ioctl = yes; then   
212926497Sachecat >> confdefs.h <<\EOF
213026497Sache#define TIOCSTAT_IN_SYS_IOCTL 1
213126497SacheEOF
213226497Sache
213326497Sachefi
213426497Sache
213526497Sacheecho $ac_n "checking for FIONREAD in sys/ioctl.h""... $ac_c" 1>&6
213675406Sacheecho "configure:2137: checking for FIONREAD in sys/ioctl.h" >&5
213726497Sacheif eval "test \"`echo '$''{'bash_cv_fionread_in_ioctl'+set}'`\" = set"; then
213826497Sache  echo $ac_n "(cached) $ac_c" 1>&6
213926497Sacheelse
214026497Sache  cat > conftest.$ac_ext <<EOF
214175406Sache#line 2142 "configure"
214226497Sache#include "confdefs.h"
214326497Sache#include <sys/types.h>
214426497Sache#include <sys/ioctl.h>
214526497Sacheint main() {
214626497Sacheint x = FIONREAD;
214726497Sache; return 0; }
214826497SacheEOF
214975406Sacheif { (eval echo configure:2150: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
215026497Sache  rm -rf conftest*
215126497Sache  bash_cv_fionread_in_ioctl=yes
215226497Sacheelse
215326497Sache  echo "configure: failed program was:" >&5
215426497Sache  cat conftest.$ac_ext >&5
215526497Sache  rm -rf conftest*
215626497Sache  bash_cv_fionread_in_ioctl=no
215726497Sachefi
215826497Sacherm -f conftest*
215926497Sachefi
216026497Sache
216126497Sacheecho "$ac_t""$bash_cv_fionread_in_ioctl" 1>&6
216226497Sacheif test $bash_cv_fionread_in_ioctl = yes; then   
216326497Sachecat >> confdefs.h <<\EOF
216426497Sache#define FIONREAD_IN_SYS_IOCTL 1
216526497SacheEOF
216626497Sache
216726497Sachefi
216826497Sache
216926497Sacheecho $ac_n "checking for speed_t in sys/types.h""... $ac_c" 1>&6
217075406Sacheecho "configure:2171: checking for speed_t in sys/types.h" >&5
217126497Sacheif eval "test \"`echo '$''{'bash_cv_speed_t_in_sys_types'+set}'`\" = set"; then
217226497Sache  echo $ac_n "(cached) $ac_c" 1>&6
217326497Sacheelse
217426497Sache  cat > conftest.$ac_ext <<EOF
217575406Sache#line 2176 "configure"
217626497Sache#include "confdefs.h"
217726497Sache#include <sys/types.h>
217826497Sacheint main() {
217926497Sachespeed_t x;
218026497Sache; return 0; }
218126497SacheEOF
218275406Sacheif { (eval echo configure:2183: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
218326497Sache  rm -rf conftest*
218426497Sache  bash_cv_speed_t_in_sys_types=yes
218526497Sacheelse
218626497Sache  echo "configure: failed program was:" >&5
218726497Sache  cat conftest.$ac_ext >&5
218826497Sache  rm -rf conftest*
218926497Sache  bash_cv_speed_t_in_sys_types=no
219026497Sachefi
219126497Sacherm -f conftest*
219226497Sachefi
219326497Sache
219426497Sacheecho "$ac_t""$bash_cv_speed_t_in_sys_types" 1>&6
219526497Sacheif test $bash_cv_speed_t_in_sys_types = yes; then   
219626497Sachecat >> confdefs.h <<\EOF
219726497Sache#define SPEED_T_IN_SYS_TYPES 1
219826497SacheEOF
219926497Sache
220026497Sachefi
220126497Sache
220235486Sacheecho $ac_n "checking for struct winsize in sys/ioctl.h and termios.h""... $ac_c" 1>&6
220375406Sacheecho "configure:2204: checking for struct winsize in sys/ioctl.h and termios.h" >&5
220435486Sacheif eval "test \"`echo '$''{'bash_cv_struct_winsize_header'+set}'`\" = set"; then
220535486Sache  echo $ac_n "(cached) $ac_c" 1>&6
220635486Sacheelse
220735486Sache  cat > conftest.$ac_ext <<EOF
220875406Sache#line 2209 "configure"
220935486Sache#include "confdefs.h"
221035486Sache#include <sys/types.h>
221135486Sache#include <sys/ioctl.h>
221235486Sacheint main() {
221335486Sachestruct winsize x;
221435486Sache; return 0; }
221535486SacheEOF
221675406Sacheif { (eval echo configure:2217: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
221735486Sache  rm -rf conftest*
221835486Sache  bash_cv_struct_winsize_header=ioctl_h
221935486Sacheelse
222035486Sache  echo "configure: failed program was:" >&5
222135486Sache  cat conftest.$ac_ext >&5
222235486Sache  rm -rf conftest*
222335486Sache  cat > conftest.$ac_ext <<EOF
222475406Sache#line 2225 "configure"
222535486Sache#include "confdefs.h"
222635486Sache#include <sys/types.h>
222735486Sache#include <termios.h>
222835486Sacheint main() {
222935486Sachestruct winsize x;
223035486Sache; return 0; }
223135486SacheEOF
223275406Sacheif { (eval echo configure:2233: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
223335486Sache  rm -rf conftest*
223435486Sache  bash_cv_struct_winsize_header=termios_h
223535486Sacheelse
223635486Sache  echo "configure: failed program was:" >&5
223735486Sache  cat conftest.$ac_ext >&5
223835486Sache  rm -rf conftest*
223935486Sache  bash_cv_struct_winsize_header=other
224035486Sachefi
224135486Sacherm -f conftest*
224226497Sache
224335486Sachefi
224435486Sacherm -f conftest*
224535486Sachefi
224635486Sache
224735486Sacheif test $bash_cv_struct_winsize_header = ioctl_h; then
224835486Sache  echo "$ac_t""sys/ioctl.h" 1>&6
224935486Sache  cat >> confdefs.h <<\EOF
225035486Sache#define STRUCT_WINSIZE_IN_SYS_IOCTL 1
225135486SacheEOF
225235486Sache
225335486Sacheelif test $bash_cv_struct_winsize_header = termios_h; then
225435486Sache  echo "$ac_t""termios.h" 1>&6
225535486Sache  cat >> confdefs.h <<\EOF
225635486Sache#define STRUCT_WINSIZE_IN_TERMIOS 1
225735486SacheEOF
225835486Sache
225935486Sacheelse
226035486Sache  echo "$ac_t""not found" 1>&6
226135486Sachefi
226235486Sache
226335486Sache
226426497Sacheecho $ac_n "checking if struct dirent has a d_ino member""... $ac_c" 1>&6
226575406Sacheecho "configure:2266: checking if struct dirent has a d_ino member" >&5
226626497Sacheif eval "test \"`echo '$''{'bash_cv_dirent_has_dino'+set}'`\" = set"; then
226726497Sache  echo $ac_n "(cached) $ac_c" 1>&6
226826497Sacheelse
226926497Sache  cat > conftest.$ac_ext <<EOF
227075406Sache#line 2271 "configure"
227126497Sache#include "confdefs.h"
227226497Sache
227326497Sache#include <stdio.h>
227426497Sache#include <sys/types.h>
227526497Sache#ifdef HAVE_UNISTD_H
227626497Sache# include <unistd.h>
227726497Sache#endif /* HAVE_UNISTD_H */
227826497Sache#if defined(HAVE_DIRENT_H)
227926497Sache# include <dirent.h>
228026497Sache#else
228126497Sache# define dirent direct
228226497Sache# ifdef HAVE_SYS_NDIR_H
228326497Sache#  include <sys/ndir.h>
228426497Sache# endif /* SYSNDIR */
228526497Sache# ifdef HAVE_SYS_DIR_H
228626497Sache#  include <sys/dir.h>
228726497Sache# endif /* SYSDIR */
228826497Sache# ifdef HAVE_NDIR_H
228926497Sache#  include <ndir.h>
229026497Sache# endif
229126497Sache#endif /* HAVE_DIRENT_H */
229226497Sache
229326497Sacheint main() {
229426497Sache
229526497Sachestruct dirent d; int z; z = d.d_ino;
229626497Sache
229726497Sache; return 0; }
229826497SacheEOF
229975406Sacheif { (eval echo configure:2300: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
230026497Sache  rm -rf conftest*
230126497Sache  bash_cv_dirent_has_dino=yes
230226497Sacheelse
230326497Sache  echo "configure: failed program was:" >&5
230426497Sache  cat conftest.$ac_ext >&5
230526497Sache  rm -rf conftest*
230626497Sache  bash_cv_dirent_has_dino=no
230726497Sachefi
230826497Sacherm -f conftest*
230926497Sachefi
231026497Sache
231126497Sacheecho "$ac_t""$bash_cv_dirent_has_dino" 1>&6
231226497Sacheif test $bash_cv_dirent_has_dino = yes; then
231326497Sachecat >> confdefs.h <<\EOF
231426497Sache#define STRUCT_DIRENT_HAS_D_INO 1
231526497SacheEOF
231626497Sache
231726497Sachefi
231826497Sache
231926497Sache
232026497Sacheecho $ac_n "checking if struct dirent has a d_fileno member""... $ac_c" 1>&6
232175406Sacheecho "configure:2322: checking if struct dirent has a d_fileno member" >&5
232226497Sacheif eval "test \"`echo '$''{'bash_cv_dirent_has_d_fileno'+set}'`\" = set"; then
232326497Sache  echo $ac_n "(cached) $ac_c" 1>&6
232426497Sacheelse
232526497Sache  cat > conftest.$ac_ext <<EOF
232675406Sache#line 2327 "configure"
232726497Sache#include "confdefs.h"
232826497Sache
232926497Sache#include <stdio.h>
233026497Sache#include <sys/types.h>
233126497Sache#ifdef HAVE_UNISTD_H
233226497Sache# include <unistd.h>
233326497Sache#endif /* HAVE_UNISTD_H */
233426497Sache#if defined(HAVE_DIRENT_H)
233526497Sache# include <dirent.h>
233626497Sache#else
233726497Sache# define dirent direct
233826497Sache# ifdef HAVE_SYS_NDIR_H
233926497Sache#  include <sys/ndir.h>
234026497Sache# endif /* SYSNDIR */
234126497Sache# ifdef HAVE_SYS_DIR_H
234226497Sache#  include <sys/dir.h>
234326497Sache# endif /* SYSDIR */
234426497Sache# ifdef HAVE_NDIR_H
234526497Sache#  include <ndir.h>
234626497Sache# endif
234726497Sache#endif /* HAVE_DIRENT_H */
234826497Sache
234926497Sacheint main() {
235026497Sache
235126497Sachestruct dirent d; int z; z = d.d_fileno;
235226497Sache
235326497Sache; return 0; }
235426497SacheEOF
235575406Sacheif { (eval echo configure:2356: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
235626497Sache  rm -rf conftest*
235726497Sache  bash_cv_dirent_has_d_fileno=yes
235826497Sacheelse
235926497Sache  echo "configure: failed program was:" >&5
236026497Sache  cat conftest.$ac_ext >&5
236126497Sache  rm -rf conftest*
236226497Sache  bash_cv_dirent_has_d_fileno=no
236326497Sachefi
236426497Sacherm -f conftest*
236526497Sachefi
236626497Sache
236726497Sacheecho "$ac_t""$bash_cv_dirent_has_d_fileno" 1>&6
236826497Sacheif test $bash_cv_dirent_has_d_fileno = yes; then
236926497Sachecat >> confdefs.h <<\EOF
237026497Sache#define STRUCT_DIRENT_HAS_D_FILENO 1
237126497SacheEOF
237226497Sache
237326497Sachefi
237426497Sache
237526497Sache
237635486Sachecase "$host_os" in
237735486Sacheaix*)   prefer_curses=yes ;;
237835486Sacheesac
237935486Sache
238035486Sacheif test "X$bash_cv_termcap_lib" = "X"; then
238135486Sache_bash_needmsg=yes
238235486Sacheelse
238335486Sacheecho $ac_n "checking which library has the termcap functions""... $ac_c" 1>&6
238475406Sacheecho "configure:2385: checking which library has the termcap functions" >&5
238535486Sache_bash_needmsg=
238635486Sachefi
238735486Sacheif eval "test \"`echo '$''{'bash_cv_termcap_lib'+set}'`\" = set"; then
238835486Sache  echo $ac_n "(cached) $ac_c" 1>&6
238935486Sacheelse
239035486Sache  echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
239175406Sacheecho "configure:2392: checking for tgetent in -ltermcap" >&5
239235486Sacheac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'`
239335486Sacheif eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
239435486Sache  echo $ac_n "(cached) $ac_c" 1>&6
239535486Sacheelse
239635486Sache  ac_save_LIBS="$LIBS"
239735486SacheLIBS="-ltermcap  $LIBS"
239835486Sachecat > conftest.$ac_ext <<EOF
239975406Sache#line 2400 "configure"
240035486Sache#include "confdefs.h"
240135486Sache/* Override any gcc2 internal prototype to avoid an error.  */
240235486Sache/* We use char because int might match the return type of a gcc2
240335486Sache    builtin and then its argument prototype would still apply.  */
240435486Sachechar tgetent();
240535486Sache
240635486Sacheint main() {
240735486Sachetgetent()
240835486Sache; return 0; }
240935486SacheEOF
241075406Sacheif { (eval echo configure:2411: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
241135486Sache  rm -rf conftest*
241235486Sache  eval "ac_cv_lib_$ac_lib_var=yes"
241335486Sacheelse
241435486Sache  echo "configure: failed program was:" >&5
241535486Sache  cat conftest.$ac_ext >&5
241635486Sache  rm -rf conftest*
241735486Sache  eval "ac_cv_lib_$ac_lib_var=no"
241835486Sachefi
241935486Sacherm -f conftest*
242035486SacheLIBS="$ac_save_LIBS"
242135486Sache
242235486Sachefi
242335486Sacheif eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
242435486Sache  echo "$ac_t""yes" 1>&6
242535486Sache  bash_cv_termcap_lib=libtermcap
242635486Sacheelse
242735486Sache  echo "$ac_t""no" 1>&6
242835486Sacheecho $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6
242975406Sacheecho "configure:2430: checking for tgetent in -lcurses" >&5
243035486Sacheac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'`
243135486Sacheif eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
243235486Sache  echo $ac_n "(cached) $ac_c" 1>&6
243335486Sacheelse
243435486Sache  ac_save_LIBS="$LIBS"
243535486SacheLIBS="-lcurses  $LIBS"
243635486Sachecat > conftest.$ac_ext <<EOF
243775406Sache#line 2438 "configure"
243835486Sache#include "confdefs.h"
243935486Sache/* Override any gcc2 internal prototype to avoid an error.  */
244035486Sache/* We use char because int might match the return type of a gcc2
244135486Sache    builtin and then its argument prototype would still apply.  */
244235486Sachechar tgetent();
244335486Sache
244435486Sacheint main() {
244535486Sachetgetent()
244635486Sache; return 0; }
244735486SacheEOF
244875406Sacheif { (eval echo configure:2449: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
244935486Sache  rm -rf conftest*
245035486Sache  eval "ac_cv_lib_$ac_lib_var=yes"
245135486Sacheelse
245235486Sache  echo "configure: failed program was:" >&5
245335486Sache  cat conftest.$ac_ext >&5
245435486Sache  rm -rf conftest*
245535486Sache  eval "ac_cv_lib_$ac_lib_var=no"
245635486Sachefi
245735486Sacherm -f conftest*
245835486SacheLIBS="$ac_save_LIBS"
245935486Sache
246035486Sachefi
246135486Sacheif eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
246235486Sache  echo "$ac_t""yes" 1>&6
246335486Sache  bash_cv_termcap_lib=libcurses
246435486Sacheelse
246535486Sache  echo "$ac_t""no" 1>&6
246635486Sacheecho $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6
246775406Sacheecho "configure:2468: checking for tgetent in -lncurses" >&5
246835486Sacheac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'`
246935486Sacheif eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
247035486Sache  echo $ac_n "(cached) $ac_c" 1>&6
247135486Sacheelse
247235486Sache  ac_save_LIBS="$LIBS"
247335486SacheLIBS="-lncurses  $LIBS"
247435486Sachecat > conftest.$ac_ext <<EOF
247575406Sache#line 2476 "configure"
247635486Sache#include "confdefs.h"
247735486Sache/* Override any gcc2 internal prototype to avoid an error.  */
247835486Sache/* We use char because int might match the return type of a gcc2
247935486Sache    builtin and then its argument prototype would still apply.  */
248035486Sachechar tgetent();
248135486Sache
248235486Sacheint main() {
248335486Sachetgetent()
248435486Sache; return 0; }
248535486SacheEOF
248675406Sacheif { (eval echo configure:2487: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
248735486Sache  rm -rf conftest*
248835486Sache  eval "ac_cv_lib_$ac_lib_var=yes"
248935486Sacheelse
249035486Sache  echo "configure: failed program was:" >&5
249135486Sache  cat conftest.$ac_ext >&5
249235486Sache  rm -rf conftest*
249335486Sache  eval "ac_cv_lib_$ac_lib_var=no"
249435486Sachefi
249535486Sacherm -f conftest*
249635486SacheLIBS="$ac_save_LIBS"
249735486Sache
249835486Sachefi
249935486Sacheif eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
250035486Sache  echo "$ac_t""yes" 1>&6
250135486Sache  bash_cv_termcap_lib=libncurses
250235486Sacheelse
250335486Sache  echo "$ac_t""no" 1>&6
250435486Sachebash_cv_termcap_lib=gnutermcap
250535486Sachefi
250635486Sache
250735486Sachefi
250835486Sache
250935486Sachefi
251035486Sache
251135486Sachefi
251235486Sache
251335486Sacheif test "X$_bash_needmsg" = "Xyes"; then
251435486Sacheecho $ac_n "checking which library has the termcap functions""... $ac_c" 1>&6
251575406Sacheecho "configure:2516: checking which library has the termcap functions" >&5
251635486Sachefi
251735486Sacheecho "$ac_t""using $bash_cv_termcap_lib" 1>&6
251835486Sacheif test $bash_cv_termcap_lib = gnutermcap && test -z "$prefer_curses"; then
251935486SacheLDFLAGS="$LDFLAGS -L./lib/termcap"
252035486SacheTERMCAP_LIB="./lib/termcap/libtermcap.a"
252135486SacheTERMCAP_DEP="./lib/termcap/libtermcap.a"
252235486Sacheelif test $bash_cv_termcap_lib = libtermcap && test -z "$prefer_curses"; then
252335486SacheTERMCAP_LIB=-ltermcap
252435486SacheTERMCAP_DEP=
252535486Sacheelif test $bash_cv_termcap_lib = libncurses; then
252635486SacheTERMCAP_LIB=-lncurses
252735486SacheTERMCAP_DEP=
252835486Sacheelse
252935486SacheTERMCAP_LIB=-lcurses
253035486SacheTERMCAP_DEP=
253135486Sachefi
253235486Sache
253335486Sacheif test "$TERMCAP_LIB" = "./lib/termcap/libtermcap.a"; then
253435486Sache	TERMCAP_LIB=-ltermcap	#default
253535486Sachefi
253635486Sache
253726497Sachecase "$host_cpu" in
253826497Sache*cray*)	LOCAL_CFLAGS=-DCRAY ;;
253975406Sache*s390*) LOCAL_CFLAGS=-fsigned-char ;;
254026497Sacheesac
254126497Sache
254226497Sachecase "$host_os" in
254326497Sacheisc*)	LOCAL_CFLAGS=-Disc386 ;;
254426497Sacheesac
254526497Sache
254647558Sache# shared library configuration section
254747558Sache#
254847558Sache# Shared object configuration section.  These values are generated by
254947558Sache# ${srcdir}/support/shobj-conf
255047558Sache#
255147558Sacheif test -f ${srcdir}/support/shobj-conf; then
255247558Sache        echo $ac_n "checking configuration for building shared libraries""... $ac_c" 1>&6
255375406Sacheecho "configure:2554: checking configuration for building shared libraries" >&5
255458310Sache        eval `${CONFIG_SHELL-/bin/sh} ${srcdir}/support/shobj-conf -C "${CC}" -c ${host_cpu} -o ${host_os} -v ${host_vendor}`
255547558Sache        
255647558Sache        
255747558Sache        
255847558Sache        
255947558Sache	
256047558Sache        
256147558Sache        
256247558Sache	
256347558Sache	
256447558Sache	
256547558Sache	
256647558Sache	
256747558Sache        echo "$ac_t""$SHLIB_STATUS" 1>&6
256858310Sache
256958310Sache	# shared library versioning
257058310Sache	# quoted for m4 so I can use character classes
257158310Sache	SHLIB_MAJOR=`expr "$LIBVERSION" : '\([0-9]\)\..*'`
257258310Sache	SHLIB_MINOR=`expr "$LIBVERSION" : '[0-9]\.\([0-9]\).*'`
257358310Sache	
257458310Sache	
257547558Sachefi
257647558Sache
257758310Sachecase "$host_os" in
257858310Sachemsdosdjgpp*)	BUILD_DIR=`pwd.exe` ;;	# to prevent //d/path/file
257958310Sache*)		BUILD_DIR=`pwd` ;;
258058310Sacheesac
258126497Sache
258226497Sache
258326497Sache
258426497Sache
258526497Sache
258626497Sache
258726497Sache
258826497Sache
258926497Sache
259035486Sache
259135486Sache
259235486Sache
259335486Sache
259435486Sache
259547558Sache
259647558Sache
259747558Sache
259858310Sache
259926497Sachetrap '' 1 2 15
260026497Sachecat > confcache <<\EOF
260126497Sache# This file is a shell script that caches the results of configure
260226497Sache# tests run on this system so they can be shared between configure
260326497Sache# scripts and configure runs.  It is not useful on other systems.
260426497Sache# If it contains results you don't want to keep, you may remove or edit it.
260526497Sache#
260626497Sache# By default, configure uses ./config.cache as the cache file,
260726497Sache# creating it if it does not exist already.  You can give configure
260826497Sache# the --cache-file=FILE option to use a different cache file; that is
260926497Sache# what configure does when it calls configure scripts in
261026497Sache# subdirectories, so they share the cache.
261126497Sache# Giving --cache-file=/dev/null disables caching, for debugging configure.
261226497Sache# config.status only pays attention to the cache file if you give it the
261326497Sache# --recheck option to rerun configure.
261426497Sache#
261526497SacheEOF
261626497Sache# The following way of writing the cache mishandles newlines in values,
261726497Sache# but we know of no workaround that is simple, portable, and efficient.
261826497Sache# So, don't put newlines in cache variables' values.
261926497Sache# Ultrix sh set writes to stderr and can't be redirected directly,
262026497Sache# and sets the high bit in the cache file unless we assign to the vars.
262126497Sache(set) 2>&1 |
262258310Sache  case `(ac_space=' '; set | grep ac_space) 2>&1` in
262326497Sache  *ac_space=\ *)
262426497Sache    # `set' does not quote correctly, so add quotes (double-quote substitution
262526497Sache    # turns \\\\ into \\, and sed turns \\ into \).
262626497Sache    sed -n \
262726497Sache      -e "s/'/'\\\\''/g" \
262826497Sache      -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
262926497Sache    ;;
263026497Sache  *)
263126497Sache    # `set' quotes correctly as required by POSIX, so do not add quotes.
263226497Sache    sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
263326497Sache    ;;
263426497Sache  esac >> confcache
263526497Sacheif cmp -s $cache_file confcache; then
263626497Sache  :
263726497Sacheelse
263826497Sache  if test -w $cache_file; then
263926497Sache    echo "updating cache $cache_file"
264026497Sache    cat confcache > $cache_file
264126497Sache  else
264226497Sache    echo "not updating unwritable cache $cache_file"
264326497Sache  fi
264426497Sachefi
264526497Sacherm -f confcache
264626497Sache
264726497Sachetrap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
264826497Sache
264926497Sachetest "x$prefix" = xNONE && prefix=$ac_default_prefix
265026497Sache# Let make expand exec_prefix.
265126497Sachetest "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
265226497Sache
265326497Sache# Any assignment to VPATH causes Sun make to only execute
265426497Sache# the first set of double-colon rules, so remove it if not needed.
265526497Sache# If there is a colon in the path, we need to keep it.
265626497Sacheif test "x$srcdir" = x.; then
265726497Sache  ac_vpsub='/^[ 	]*VPATH[ 	]*=[^:]*$/d'
265826497Sachefi
265926497Sache
266026497Sachetrap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
266126497Sache
266226497SacheDEFS=-DHAVE_CONFIG_H
266326497Sache
266426497Sache# Without the "./", some shells look in PATH for config.status.
266526497Sache: ${CONFIG_STATUS=./config.status}
266626497Sache
266726497Sacheecho creating $CONFIG_STATUS
266826497Sacherm -f $CONFIG_STATUS
266926497Sachecat > $CONFIG_STATUS <<EOF
267026497Sache#! /bin/sh
267126497Sache# Generated automatically by configure.
267226497Sache# Run this file to recreate the current configuration.
267326497Sache# This directory was configured as follows,
267426497Sache# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
267526497Sache#
267626497Sache# $0 $ac_configure_args
267726497Sache#
267826497Sache# Compiler output produced by configure, useful for debugging
267926497Sache# configure, is in ./config.log if it exists.
268026497Sache
268126497Sacheac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
268226497Sachefor ac_option
268326497Sachedo
268426497Sache  case "\$ac_option" in
268526497Sache  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
268626497Sache    echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
268726497Sache    exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
268826497Sache  -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
268958310Sache    echo "$CONFIG_STATUS generated by autoconf version 2.13"
269026497Sache    exit 0 ;;
269126497Sache  -help | --help | --hel | --he | --h)
269226497Sache    echo "\$ac_cs_usage"; exit 0 ;;
269326497Sache  *) echo "\$ac_cs_usage"; exit 1 ;;
269426497Sache  esac
269526497Sachedone
269626497Sache
269726497Sacheac_given_srcdir=$srcdir
269826497Sacheac_given_INSTALL="$INSTALL"
269926497Sache
270047558Sachetrap 'rm -fr `echo "Makefile doc/Makefile examples/Makefile shlib/Makefile config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
270126497SacheEOF
270226497Sachecat >> $CONFIG_STATUS <<EOF
270326497Sache
270426497Sache# Protect against being on the right side of a sed subst in config.status.
270526497Sachesed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
270626497Sache s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
270726497Sache$ac_vpsub
270826497Sache$extrasub
270958310Saches%@SHELL@%$SHELL%g
271026497Saches%@CFLAGS@%$CFLAGS%g
271126497Saches%@CPPFLAGS@%$CPPFLAGS%g
271226497Saches%@CXXFLAGS@%$CXXFLAGS%g
271358310Saches%@FFLAGS@%$FFLAGS%g
271426497Saches%@DEFS@%$DEFS%g
271526497Saches%@LDFLAGS@%$LDFLAGS%g
271626497Saches%@LIBS@%$LIBS%g
271726497Saches%@exec_prefix@%$exec_prefix%g
271826497Saches%@prefix@%$prefix%g
271926497Saches%@program_transform_name@%$program_transform_name%g
272026497Saches%@bindir@%$bindir%g
272126497Saches%@sbindir@%$sbindir%g
272226497Saches%@libexecdir@%$libexecdir%g
272326497Saches%@datadir@%$datadir%g
272426497Saches%@sysconfdir@%$sysconfdir%g
272526497Saches%@sharedstatedir@%$sharedstatedir%g
272626497Saches%@localstatedir@%$localstatedir%g
272726497Saches%@libdir@%$libdir%g
272826497Saches%@includedir@%$includedir%g
272926497Saches%@oldincludedir@%$oldincludedir%g
273026497Saches%@infodir@%$infodir%g
273126497Saches%@mandir@%$mandir%g
273226497Saches%@host@%$host%g
273326497Saches%@host_alias@%$host_alias%g
273426497Saches%@host_cpu@%$host_cpu%g
273526497Saches%@host_vendor@%$host_vendor%g
273626497Saches%@host_os@%$host_os%g
273775406Saches%@SET_MAKE@%$SET_MAKE%g
273826497Saches%@CC@%$CC%g
273926497Saches%@CPP@%$CPP%g
274026497Saches%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
274158310Saches%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
274226497Saches%@INSTALL_DATA@%$INSTALL_DATA%g
274347558Saches%@AR@%$AR%g
274426497Saches%@RANLIB@%$RANLIB%g
274547558Saches%@MAKE_SHELL@%$MAKE_SHELL%g
274647558Saches%@SHOBJ_CC@%$SHOBJ_CC%g
274747558Saches%@SHOBJ_CFLAGS@%$SHOBJ_CFLAGS%g
274847558Saches%@SHOBJ_LD@%$SHOBJ_LD%g
274947558Saches%@SHOBJ_LDFLAGS@%$SHOBJ_LDFLAGS%g
275047558Saches%@SHOBJ_XLDFLAGS@%$SHOBJ_XLDFLAGS%g
275147558Saches%@SHOBJ_LIBS@%$SHOBJ_LIBS%g
275247558Saches%@SHOBJ_STATUS@%$SHOBJ_STATUS%g
275347558Saches%@SHLIB_STATUS@%$SHLIB_STATUS%g
275447558Saches%@SHLIB_XLDFLAGS@%$SHLIB_XLDFLAGS%g
275547558Saches%@SHLIB_LIBSUFF@%$SHLIB_LIBSUFF%g
275647558Saches%@SHLIB_LIBVERSION@%$SHLIB_LIBVERSION%g
275747558Saches%@SHLIB_LIBS@%$SHLIB_LIBS%g
275858310Saches%@SHLIB_MAJOR@%$SHLIB_MAJOR%g
275958310Saches%@SHLIB_MINOR@%$SHLIB_MINOR%g
276035486Saches%@BUILD_DIR@%$BUILD_DIR%g
276126497Saches%@LOCAL_CFLAGS@%$LOCAL_CFLAGS%g
276235486Saches%@LOCAL_LDFLAGS@%$LOCAL_LDFLAGS%g
276326497Saches%@LOCAL_DEFS@%$LOCAL_DEFS%g
276447558Saches%@ARFLAGS@%$ARFLAGS%g
276526497Saches%@LIBVERSION@%$LIBVERSION%g
276635486Saches%@TERMCAP_LIB@%$TERMCAP_LIB%g
276726497Sache
276826497SacheCEOF
276926497SacheEOF
277026497Sache
277126497Sachecat >> $CONFIG_STATUS <<\EOF
277226497Sache
277326497Sache# Split the substitutions into bite-sized pieces for seds with
277426497Sache# small command number limits, like on Digital OSF/1 and HP-UX.
277526497Sacheac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
277626497Sacheac_file=1 # Number of current file.
277726497Sacheac_beg=1 # First line for current file.
277826497Sacheac_end=$ac_max_sed_cmds # Line after last line for current file.
277926497Sacheac_more_lines=:
278026497Sacheac_sed_cmds=""
278126497Sachewhile $ac_more_lines; do
278226497Sache  if test $ac_beg -gt 1; then
278326497Sache    sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
278426497Sache  else
278526497Sache    sed "${ac_end}q" conftest.subs > conftest.s$ac_file
278626497Sache  fi
278726497Sache  if test ! -s conftest.s$ac_file; then
278826497Sache    ac_more_lines=false
278926497Sache    rm -f conftest.s$ac_file
279026497Sache  else
279126497Sache    if test -z "$ac_sed_cmds"; then
279226497Sache      ac_sed_cmds="sed -f conftest.s$ac_file"
279326497Sache    else
279426497Sache      ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
279526497Sache    fi
279626497Sache    ac_file=`expr $ac_file + 1`
279726497Sache    ac_beg=$ac_end
279826497Sache    ac_end=`expr $ac_end + $ac_max_sed_cmds`
279926497Sache  fi
280026497Sachedone
280126497Sacheif test -z "$ac_sed_cmds"; then
280226497Sache  ac_sed_cmds=cat
280326497Sachefi
280426497SacheEOF
280526497Sache
280626497Sachecat >> $CONFIG_STATUS <<EOF
280726497Sache
280847558SacheCONFIG_FILES=\${CONFIG_FILES-"Makefile doc/Makefile examples/Makefile shlib/Makefile"}
280926497SacheEOF
281026497Sachecat >> $CONFIG_STATUS <<\EOF
281126497Sachefor ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
281226497Sache  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
281326497Sache  case "$ac_file" in
281426497Sache  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
281526497Sache       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
281626497Sache  *) ac_file_in="${ac_file}.in" ;;
281726497Sache  esac
281826497Sache
281926497Sache  # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
282026497Sache
282126497Sache  # Remove last slash and all that follows it.  Not all systems have dirname.
282226497Sache  ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
282326497Sache  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
282426497Sache    # The file is in a subdirectory.
282526497Sache    test ! -d "$ac_dir" && mkdir "$ac_dir"
282626497Sache    ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
282726497Sache    # A "../" for each directory in $ac_dir_suffix.
282826497Sache    ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
282926497Sache  else
283026497Sache    ac_dir_suffix= ac_dots=
283126497Sache  fi
283226497Sache
283326497Sache  case "$ac_given_srcdir" in
283426497Sache  .)  srcdir=.
283526497Sache      if test -z "$ac_dots"; then top_srcdir=.
283626497Sache      else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
283726497Sache  /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
283826497Sache  *) # Relative path.
283926497Sache    srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
284026497Sache    top_srcdir="$ac_dots$ac_given_srcdir" ;;
284126497Sache  esac
284226497Sache
284326497Sache  case "$ac_given_INSTALL" in
284426497Sache  [/$]*) INSTALL="$ac_given_INSTALL" ;;
284526497Sache  *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
284626497Sache  esac
284726497Sache
284826497Sache  echo creating "$ac_file"
284926497Sache  rm -f "$ac_file"
285026497Sache  configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
285126497Sache  case "$ac_file" in
285226497Sache  *Makefile*) ac_comsub="1i\\
285326497Sache# $configure_input" ;;
285426497Sache  *) ac_comsub= ;;
285526497Sache  esac
285626497Sache
285726497Sache  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
285826497Sache  sed -e "$ac_comsub
285926497Saches%@configure_input@%$configure_input%g
286026497Saches%@srcdir@%$srcdir%g
286126497Saches%@top_srcdir@%$top_srcdir%g
286226497Saches%@INSTALL@%$INSTALL%g
286326497Sache" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
286426497Sachefi; done
286526497Sacherm -f conftest.s*
286626497Sache
286726497Sache# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
286826497Sache# NAME is the cpp macro being defined and VALUE is the value it is being given.
286926497Sache#
287026497Sache# ac_d sets the value in "#define NAME VALUE" lines.
287126497Sacheac_dA='s%^\([ 	]*\)#\([ 	]*define[ 	][ 	]*\)'
287226497Sacheac_dB='\([ 	][ 	]*\)[^ 	]*%\1#\2'
287326497Sacheac_dC='\3'
287426497Sacheac_dD='%g'
287526497Sache# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
287626497Sacheac_uA='s%^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
287726497Sacheac_uB='\([ 	]\)%\1#\2define\3'
287826497Sacheac_uC=' '
287926497Sacheac_uD='\4%g'
288026497Sache# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
288126497Sacheac_eA='s%^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
288226497Sacheac_eB='$%\1#\2define\3'
288326497Sacheac_eC=' '
288426497Sacheac_eD='%g'
288526497Sache
288626497Sacheif test "${CONFIG_HEADERS+set}" != set; then
288726497SacheEOF
288826497Sachecat >> $CONFIG_STATUS <<EOF
288926497Sache  CONFIG_HEADERS="config.h"
289026497SacheEOF
289126497Sachecat >> $CONFIG_STATUS <<\EOF
289226497Sachefi
289326497Sachefor ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
289426497Sache  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
289526497Sache  case "$ac_file" in
289626497Sache  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
289726497Sache       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
289826497Sache  *) ac_file_in="${ac_file}.in" ;;
289926497Sache  esac
290026497Sache
290126497Sache  echo creating $ac_file
290226497Sache
290326497Sache  rm -f conftest.frag conftest.in conftest.out
290426497Sache  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
290526497Sache  cat $ac_file_inputs > conftest.in
290626497Sache
290726497SacheEOF
290826497Sache
290926497Sache# Transform confdefs.h into a sed script conftest.vals that substitutes
291026497Sache# the proper values into config.h.in to produce config.h.  And first:
291126497Sache# Protect against being on the right side of a sed subst in config.status.
291226497Sache# Protect against being in an unquoted here document in config.status.
291326497Sacherm -f conftest.vals
291426497Sachecat > conftest.hdr <<\EOF
291526497Saches/[\\&%]/\\&/g
291626497Saches%[\\$`]%\\&%g
291726497Saches%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
291826497Saches%ac_d%ac_u%gp
291926497Saches%ac_u%ac_e%gp
292026497SacheEOF
292126497Sachesed -n -f conftest.hdr confdefs.h > conftest.vals
292226497Sacherm -f conftest.hdr
292326497Sache
292426497Sache# This sed command replaces #undef with comments.  This is necessary, for
292526497Sache# example, in the case of _POSIX_SOURCE, which is predefined and required
292626497Sache# on some systems where configure will not decide to define it.
292726497Sachecat >> conftest.vals <<\EOF
292826497Saches%^[ 	]*#[ 	]*undef[ 	][ 	]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
292926497SacheEOF
293026497Sache
293126497Sache# Break up conftest.vals because some shells have a limit on
293226497Sache# the size of here documents, and old seds have small limits too.
293326497Sache
293426497Sacherm -f conftest.tail
293526497Sachewhile :
293626497Sachedo
293726497Sache  ac_lines=`grep -c . conftest.vals`
293826497Sache  # grep -c gives empty output for an empty file on some AIX systems.
293926497Sache  if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
294026497Sache  # Write a limited-size here document to conftest.frag.
294126497Sache  echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
294226497Sache  sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
294326497Sache  echo 'CEOF
294426497Sache  sed -f conftest.frag conftest.in > conftest.out
294526497Sache  rm -f conftest.in
294626497Sache  mv conftest.out conftest.in
294726497Sache' >> $CONFIG_STATUS
294826497Sache  sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
294926497Sache  rm -f conftest.vals
295026497Sache  mv conftest.tail conftest.vals
295126497Sachedone
295226497Sacherm -f conftest.vals
295326497Sache
295426497Sachecat >> $CONFIG_STATUS <<\EOF
295526497Sache  rm -f conftest.frag conftest.h
295626497Sache  echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
295726497Sache  cat conftest.in >> conftest.h
295826497Sache  rm -f conftest.in
295926497Sache  if cmp -s $ac_file conftest.h 2>/dev/null; then
296026497Sache    echo "$ac_file is unchanged"
296126497Sache    rm -f conftest.h
296226497Sache  else
296326497Sache    # Remove last slash and all that follows it.  Not all systems have dirname.
296426497Sache      ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
296526497Sache      if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
296626497Sache      # The file is in a subdirectory.
296726497Sache      test ! -d "$ac_dir" && mkdir "$ac_dir"
296826497Sache    fi
296926497Sache    rm -f $ac_file
297026497Sache    mv conftest.h $ac_file
297126497Sache  fi
297226497Sachefi; done
297326497Sache
297426497SacheEOF
297526497Sachecat >> $CONFIG_STATUS <<EOF
297626497Sache
297726497SacheEOF
297826497Sachecat >> $CONFIG_STATUS <<\EOF
297926497Sache
298026497Sache# Makefile uses this timestamp file to record whether config.h is up to date.
298126497Sacheecho > stamp-h
298226497Sache
298326497Sacheexit 0
298426497SacheEOF
298526497Sachechmod +x $CONFIG_STATUS
298626497Sacherm -fr confdefs* $ac_clean_files
298726497Sachetest "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
298826497Sache
2989