1#! /bin/sh
2
3# Guess values for system-dependent variables and create Makefiles.
4# Generated automatically using autoconf version 2.13
5# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
6#
7# This configure script is free software; the Free Software Foundation
8# gives unlimited permission to copy, distribute and modify it.
9
10# Defaults:
11ac_help=
12ac_default_prefix=/usr/local
13# Any additions from configure.in:
14ac_help="$ac_help
15
16  --enable-readline        Use libreadline [default]
17  --disable-readline       Link with a fake readline library
18                           useful for testing if libreadline is not available
19                           or if you don't want any command-line edition,
20		           history and completion !"
21
22# Initialize some variables set by options.
23# The variables have the same names as the options, with
24# dashes changed to underlines.
25build=NONE
26cache_file=./config.cache
27exec_prefix=NONE
28host=NONE
29no_create=
30nonopt=NONE
31no_recursion=
32prefix=NONE
33program_prefix=NONE
34program_suffix=NONE
35program_transform_name=s,x,x,
36silent=
37site=
38srcdir=
39target=NONE
40verbose=
41x_includes=NONE
42x_libraries=NONE
43bindir='${exec_prefix}/bin'
44sbindir='${exec_prefix}/sbin'
45libexecdir='${exec_prefix}/libexec'
46datadir='${prefix}/share'
47sysconfdir='${prefix}/etc'
48sharedstatedir='${prefix}/com'
49localstatedir='${prefix}/var'
50libdir='${exec_prefix}/lib'
51includedir='${prefix}/include'
52oldincludedir='/usr/include'
53infodir='${prefix}/info'
54mandir='${prefix}/man'
55
56# Initialize some other variables.
57subdirs=
58MFLAGS= MAKEFLAGS=
59SHELL=${CONFIG_SHELL-/bin/sh}
60# Maximum number of lines to put in a shell here document.
61ac_max_here_lines=12
62
63ac_prev=
64for ac_option
65do
66
67  # If the previous option needs an argument, assign it.
68  if test -n "$ac_prev"; then
69    eval "$ac_prev=\$ac_option"
70    ac_prev=
71    continue
72  fi
73
74  case "$ac_option" in
75  -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
76  *) ac_optarg= ;;
77  esac
78
79  # Accept the important Cygnus configure options, so we can diagnose typos.
80
81  case "$ac_option" in
82
83  -bindir | --bindir | --bindi | --bind | --bin | --bi)
84    ac_prev=bindir ;;
85  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
86    bindir="$ac_optarg" ;;
87
88  -build | --build | --buil | --bui | --bu)
89    ac_prev=build ;;
90  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
91    build="$ac_optarg" ;;
92
93  -cache-file | --cache-file | --cache-fil | --cache-fi \
94  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
95    ac_prev=cache_file ;;
96  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
97  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
98    cache_file="$ac_optarg" ;;
99
100  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
101    ac_prev=datadir ;;
102  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
103  | --da=*)
104    datadir="$ac_optarg" ;;
105
106  -disable-* | --disable-*)
107    ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
108    # Reject names that are not valid shell variable names.
109    if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
110      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
111    fi
112    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
113    eval "enable_${ac_feature}=no" ;;
114
115  -enable-* | --enable-*)
116    ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
117    # Reject names that are not valid shell variable names.
118    if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
119      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
120    fi
121    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
122    case "$ac_option" in
123      *=*) ;;
124      *) ac_optarg=yes ;;
125    esac
126    eval "enable_${ac_feature}='$ac_optarg'" ;;
127
128  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
129  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
130  | --exec | --exe | --ex)
131    ac_prev=exec_prefix ;;
132  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
133  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
134  | --exec=* | --exe=* | --ex=*)
135    exec_prefix="$ac_optarg" ;;
136
137  -gas | --gas | --ga | --g)
138    # Obsolete; use --with-gas.
139    with_gas=yes ;;
140
141  -help | --help | --hel | --he)
142    # Omit some internal or obsolete options to make the list less imposing.
143    # This message is too long to be a string in the A/UX 3.1 sh.
144    cat << EOF
145Usage: configure [options] [host]
146Options: [defaults in brackets after descriptions]
147Configuration:
148  --cache-file=FILE       cache test results in FILE
149  --help                  print this message
150  --no-create             do not create output files
151  --quiet, --silent       do not print \`checking...' messages
152  --version               print the version of autoconf that created configure
153Directory and file names:
154  --prefix=PREFIX         install architecture-independent files in PREFIX
155                          [$ac_default_prefix]
156  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
157                          [same as prefix]
158  --bindir=DIR            user executables in DIR [EPREFIX/bin]
159  --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
160  --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
161  --datadir=DIR           read-only architecture-independent data in DIR
162                          [PREFIX/share]
163  --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
164  --sharedstatedir=DIR    modifiable architecture-independent data in DIR
165                          [PREFIX/com]
166  --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
167  --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
168  --includedir=DIR        C header files in DIR [PREFIX/include]
169  --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
170  --infodir=DIR           info documentation in DIR [PREFIX/info]
171  --mandir=DIR            man documentation in DIR [PREFIX/man]
172  --srcdir=DIR            find the sources in DIR [configure dir or ..]
173  --program-prefix=PREFIX prepend PREFIX to installed program names
174  --program-suffix=SUFFIX append SUFFIX to installed program names
175  --program-transform-name=PROGRAM
176                          run sed PROGRAM on installed program names
177EOF
178    cat << EOF
179Host type:
180  --build=BUILD           configure for building on BUILD [BUILD=HOST]
181  --host=HOST             configure for HOST [guessed]
182  --target=TARGET         configure for TARGET [TARGET=HOST]
183Features and packages:
184  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
185  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
186  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
187  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
188  --x-includes=DIR        X include files are in DIR
189  --x-libraries=DIR       X library files are in DIR
190EOF
191    if test -n "$ac_help"; then
192      echo "--enable and --with options recognized:$ac_help"
193    fi
194    exit 0 ;;
195
196  -host | --host | --hos | --ho)
197    ac_prev=host ;;
198  -host=* | --host=* | --hos=* | --ho=*)
199    host="$ac_optarg" ;;
200
201  -includedir | --includedir | --includedi | --included | --include \
202  | --includ | --inclu | --incl | --inc)
203    ac_prev=includedir ;;
204  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
205  | --includ=* | --inclu=* | --incl=* | --inc=*)
206    includedir="$ac_optarg" ;;
207
208  -infodir | --infodir | --infodi | --infod | --info | --inf)
209    ac_prev=infodir ;;
210  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
211    infodir="$ac_optarg" ;;
212
213  -libdir | --libdir | --libdi | --libd)
214    ac_prev=libdir ;;
215  -libdir=* | --libdir=* | --libdi=* | --libd=*)
216    libdir="$ac_optarg" ;;
217
218  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
219  | --libexe | --libex | --libe)
220    ac_prev=libexecdir ;;
221  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
222  | --libexe=* | --libex=* | --libe=*)
223    libexecdir="$ac_optarg" ;;
224
225  -localstatedir | --localstatedir | --localstatedi | --localstated \
226  | --localstate | --localstat | --localsta | --localst \
227  | --locals | --local | --loca | --loc | --lo)
228    ac_prev=localstatedir ;;
229  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
230  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
231  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
232    localstatedir="$ac_optarg" ;;
233
234  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
235    ac_prev=mandir ;;
236  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
237    mandir="$ac_optarg" ;;
238
239  -nfp | --nfp | --nf)
240    # Obsolete; use --without-fp.
241    with_fp=no ;;
242
243  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
244  | --no-cr | --no-c)
245    no_create=yes ;;
246
247  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
248  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
249    no_recursion=yes ;;
250
251  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
252  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
253  | --oldin | --oldi | --old | --ol | --o)
254    ac_prev=oldincludedir ;;
255  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
256  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
257  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
258    oldincludedir="$ac_optarg" ;;
259
260  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
261    ac_prev=prefix ;;
262  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
263    prefix="$ac_optarg" ;;
264
265  -program-prefix | --program-prefix | --program-prefi | --program-pref \
266  | --program-pre | --program-pr | --program-p)
267    ac_prev=program_prefix ;;
268  -program-prefix=* | --program-prefix=* | --program-prefi=* \
269  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
270    program_prefix="$ac_optarg" ;;
271
272  -program-suffix | --program-suffix | --program-suffi | --program-suff \
273  | --program-suf | --program-su | --program-s)
274    ac_prev=program_suffix ;;
275  -program-suffix=* | --program-suffix=* | --program-suffi=* \
276  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
277    program_suffix="$ac_optarg" ;;
278
279  -program-transform-name | --program-transform-name \
280  | --program-transform-nam | --program-transform-na \
281  | --program-transform-n | --program-transform- \
282  | --program-transform | --program-transfor \
283  | --program-transfo | --program-transf \
284  | --program-trans | --program-tran \
285  | --progr-tra | --program-tr | --program-t)
286    ac_prev=program_transform_name ;;
287  -program-transform-name=* | --program-transform-name=* \
288  | --program-transform-nam=* | --program-transform-na=* \
289  | --program-transform-n=* | --program-transform-=* \
290  | --program-transform=* | --program-transfor=* \
291  | --program-transfo=* | --program-transf=* \
292  | --program-trans=* | --program-tran=* \
293  | --progr-tra=* | --program-tr=* | --program-t=*)
294    program_transform_name="$ac_optarg" ;;
295
296  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
297  | -silent | --silent | --silen | --sile | --sil)
298    silent=yes ;;
299
300  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
301    ac_prev=sbindir ;;
302  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
303  | --sbi=* | --sb=*)
304    sbindir="$ac_optarg" ;;
305
306  -sharedstatedir | --sharedstatedir | --sharedstatedi \
307  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
308  | --sharedst | --shareds | --shared | --share | --shar \
309  | --sha | --sh)
310    ac_prev=sharedstatedir ;;
311  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
312  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
313  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
314  | --sha=* | --sh=*)
315    sharedstatedir="$ac_optarg" ;;
316
317  -site | --site | --sit)
318    ac_prev=site ;;
319  -site=* | --site=* | --sit=*)
320    site="$ac_optarg" ;;
321
322  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
323    ac_prev=srcdir ;;
324  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
325    srcdir="$ac_optarg" ;;
326
327  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
328  | --syscon | --sysco | --sysc | --sys | --sy)
329    ac_prev=sysconfdir ;;
330  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
331  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
332    sysconfdir="$ac_optarg" ;;
333
334  -target | --target | --targe | --targ | --tar | --ta | --t)
335    ac_prev=target ;;
336  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
337    target="$ac_optarg" ;;
338
339  -v | -verbose | --verbose | --verbos | --verbo | --verb)
340    verbose=yes ;;
341
342  -version | --version | --versio | --versi | --vers)
343    echo "configure generated by autoconf version 2.13"
344    exit 0 ;;
345
346  -with-* | --with-*)
347    ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
348    # Reject names that are not valid shell variable names.
349    if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
350      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
351    fi
352    ac_package=`echo $ac_package| sed 's/-/_/g'`
353    case "$ac_option" in
354      *=*) ;;
355      *) ac_optarg=yes ;;
356    esac
357    eval "with_${ac_package}='$ac_optarg'" ;;
358
359  -without-* | --without-*)
360    ac_package=`echo $ac_option|sed -e 's/-*without-//'`
361    # Reject names that are not valid shell variable names.
362    if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
363      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
364    fi
365    ac_package=`echo $ac_package| sed 's/-/_/g'`
366    eval "with_${ac_package}=no" ;;
367
368  --x)
369    # Obsolete; use --with-x.
370    with_x=yes ;;
371
372  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
373  | --x-incl | --x-inc | --x-in | --x-i)
374    ac_prev=x_includes ;;
375  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
376  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
377    x_includes="$ac_optarg" ;;
378
379  -x-libraries | --x-libraries | --x-librarie | --x-librari \
380  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
381    ac_prev=x_libraries ;;
382  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
383  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
384    x_libraries="$ac_optarg" ;;
385
386  -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
387    ;;
388
389  *)
390    if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
391      echo "configure: warning: $ac_option: invalid host type" 1>&2
392    fi
393    if test "x$nonopt" != xNONE; then
394      { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
395    fi
396    nonopt="$ac_option"
397    ;;
398
399  esac
400done
401
402if test -n "$ac_prev"; then
403  { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
404fi
405
406trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
407
408# File descriptor usage:
409# 0 standard input
410# 1 file creation
411# 2 errors and warnings
412# 3 some systems may open it to /dev/tty
413# 4 used on the Kubota Titan
414# 6 checking for... messages and results
415# 5 compiler messages saved in config.log
416if test "$silent" = yes; then
417  exec 6>/dev/null
418else
419  exec 6>&1
420fi
421exec 5>./config.log
422
423echo "\
424This file contains any messages produced by compilers while
425running configure, to aid debugging if configure makes a mistake.
426" 1>&5
427
428# Strip out --no-create and --no-recursion so they do not pile up.
429# Also quote any args containing shell metacharacters.
430ac_configure_args=
431for ac_arg
432do
433  case "$ac_arg" in
434  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
435  | --no-cr | --no-c) ;;
436  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
437  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
438  *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
439  ac_configure_args="$ac_configure_args '$ac_arg'" ;;
440  *) ac_configure_args="$ac_configure_args $ac_arg" ;;
441  esac
442done
443
444# NLS nuisances.
445# Only set these to C if already set.  These must not be set unconditionally
446# because not all systems understand e.g. LANG=C (notably SCO).
447# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
448# Non-C LC_CTYPE values break the ctype check.
449if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
450if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
451if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
452if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
453
454# confdefs.h avoids OS command line length limits that DEFS can exceed.
455rm -rf conftest* confdefs.h
456# AIX cpp loses on an empty file, so make sure it contains at least a newline.
457echo > confdefs.h
458
459# A filename unique to this package, relative to the directory that
460# configure is in, which we can look for to find out if srcdir is correct.
461ac_unique_file=zmodem.c
462
463# Find the source files, if location was not specified.
464if test -z "$srcdir"; then
465  ac_srcdir_defaulted=yes
466  # Try the directory containing this script, then its parent.
467  ac_prog=$0
468  ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
469  test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
470  srcdir=$ac_confdir
471  if test ! -r $srcdir/$ac_unique_file; then
472    srcdir=..
473  fi
474else
475  ac_srcdir_defaulted=no
476fi
477if test ! -r $srcdir/$ac_unique_file; then
478  if test "$ac_srcdir_defaulted" = yes; then
479    { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
480  else
481    { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
482  fi
483fi
484srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
485
486# Prefer explicitly selected file to automatically selected ones.
487if test -z "$CONFIG_SITE"; then
488  if test "x$prefix" != xNONE; then
489    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
490  else
491    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
492  fi
493fi
494for ac_site_file in $CONFIG_SITE; do
495  if test -r "$ac_site_file"; then
496    echo "loading site script $ac_site_file"
497    . "$ac_site_file"
498  fi
499done
500
501if test -r "$cache_file"; then
502  echo "loading cache $cache_file"
503  . $cache_file
504else
505  echo "creating cache $cache_file"
506  > $cache_file
507fi
508
509ac_ext=c
510# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
511ac_cpp='$CPP $CPPFLAGS'
512ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
513ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
514cross_compiling=$ac_cv_prog_cc_cross
515
516ac_exeext=
517ac_objext=o
518if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
519  # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
520  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
521    ac_n= ac_c='
522' ac_t='	'
523  else
524    ac_n=-n ac_c= ac_t=
525  fi
526else
527  ac_n= ac_c='\c' ac_t=
528fi
529
530
531
532EXTRA_DEPS=""
533EXTRA_LIBS=""
534EXTRA_CFLAGS=""
535TERMCAP_LIB=""
536
537echo $ac_n "checking whether to use libreadline for cmd-line editing""... $ac_c" 1>&6
538echo "configure:539: checking whether to use libreadline for cmd-line editing" >&5
539fakereadline=""
540# Check whether --enable-readline or --disable-readline was given.
541if test "${enable_readline+set}" = set; then
542  enableval="$enable_readline"
543   case "$enableval" in
544  no)
545       echo "$ac_t""no" 1>&6
546       fakereadline="yes"
547       EXTRA_DEPS="$EXTRA_DEPS fake_readline"
548       EXTRA_CFLAGS="$EXTRA_CFLAGS -Ifake_readline"
549       EXTRA_LIBS="$EXTRA_LIBS fake_readline/libreadline.a"
550       ;;
551  *)
552       echo "$ac_t""yes" 1>&6
553  esac
554else
555  echo "$ac_t""yes" 1>&6
556
557fi
558
559
560ac_aux_dir=
561for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
562  if test -f $ac_dir/install-sh; then
563    ac_aux_dir=$ac_dir
564    ac_install_sh="$ac_aux_dir/install-sh -c"
565    break
566  elif test -f $ac_dir/install.sh; then
567    ac_aux_dir=$ac_dir
568    ac_install_sh="$ac_aux_dir/install.sh -c"
569    break
570  fi
571done
572if test -z "$ac_aux_dir"; then
573  { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
574fi
575ac_config_guess=$ac_aux_dir/config.guess
576ac_config_sub=$ac_aux_dir/config.sub
577ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
578
579# Find a good install program.  We prefer a C program (faster),
580# so one script is as good as another.  But avoid the broken or
581# incompatible versions:
582# SysV /etc/install, /usr/sbin/install
583# SunOS /usr/etc/install
584# IRIX /sbin/install
585# AIX /bin/install
586# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
587# AFS /usr/afsws/bin/install, which mishandles nonexistent args
588# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
589# ./install, which can be erroneously created by make from ./install.sh.
590echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
591echo "configure:592: checking for a BSD compatible install" >&5
592if test -z "$INSTALL"; then
593if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
594  echo $ac_n "(cached) $ac_c" 1>&6
595else
596    IFS="${IFS= 	}"; ac_save_IFS="$IFS"; IFS=":"
597  for ac_dir in $PATH; do
598    # Account for people who put trailing slashes in PATH elements.
599    case "$ac_dir/" in
600    /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
601    *)
602      # OSF1 and SCO ODT 3.0 have their own names for install.
603      # Don't use installbsd from OSF since it installs stuff as root
604      # by default.
605      for ac_prog in ginstall scoinst install; do
606        if test -f $ac_dir/$ac_prog; then
607	  if test $ac_prog = install &&
608            grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
609	    # AIX install.  It has an incompatible calling convention.
610	    :
611	  else
612	    ac_cv_path_install="$ac_dir/$ac_prog -c"
613	    break 2
614	  fi
615	fi
616      done
617      ;;
618    esac
619  done
620  IFS="$ac_save_IFS"
621
622fi
623  if test "${ac_cv_path_install+set}" = set; then
624    INSTALL="$ac_cv_path_install"
625  else
626    # As a last resort, use the slow shell script.  We don't cache a
627    # path for INSTALL within a source directory, because that will
628    # break other packages using the cache if that directory is
629    # removed, or if the path is relative.
630    INSTALL="$ac_install_sh"
631  fi
632fi
633echo "$ac_t""$INSTALL" 1>&6
634
635# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
636# It thinks the first close brace ends the variable substitution.
637test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
638
639test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
640
641test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
642
643# Extract the first word of "gmake", so it can be a program name with args.
644set dummy gmake; ac_word=$2
645echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
646echo "configure:647: checking for $ac_word" >&5
647if eval "test \"`echo '$''{'ac_cv_prog_MAKE'+set}'`\" = set"; then
648  echo $ac_n "(cached) $ac_c" 1>&6
649else
650  if test -n "$MAKE"; then
651  ac_cv_prog_MAKE="$MAKE" # Let the user override the test.
652else
653  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
654  ac_dummy="$PATH"
655  for ac_dir in $ac_dummy; do
656    test -z "$ac_dir" && ac_dir=.
657    if test -f $ac_dir/$ac_word; then
658      ac_cv_prog_MAKE="gmake"
659      break
660    fi
661  done
662  IFS="$ac_save_ifs"
663  test -z "$ac_cv_prog_MAKE" && ac_cv_prog_MAKE="make"
664fi
665fi
666MAKE="$ac_cv_prog_MAKE"
667if test -n "$MAKE"; then
668  echo "$ac_t""$MAKE" 1>&6
669else
670  echo "$ac_t""no" 1>&6
671fi
672
673# Extract the first word of "gtar", so it can be a program name with args.
674set dummy gtar; ac_word=$2
675echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
676echo "configure:677: checking for $ac_word" >&5
677if eval "test \"`echo '$''{'ac_cv_prog_TAR'+set}'`\" = set"; then
678  echo $ac_n "(cached) $ac_c" 1>&6
679else
680  if test -n "$TAR"; then
681  ac_cv_prog_TAR="$TAR" # Let the user override the test.
682else
683  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
684  ac_dummy="$PATH"
685  for ac_dir in $ac_dummy; do
686    test -z "$ac_dir" && ac_dir=.
687    if test -f $ac_dir/$ac_word; then
688      ac_cv_prog_TAR="gtar"
689      break
690    fi
691  done
692  IFS="$ac_save_ifs"
693  test -z "$ac_cv_prog_TAR" && ac_cv_prog_TAR="tar"
694fi
695fi
696TAR="$ac_cv_prog_TAR"
697if test -n "$TAR"; then
698  echo "$ac_t""$TAR" 1>&6
699else
700  echo "$ac_t""no" 1>&6
701fi
702
703# Extract the first word of "gar", so it can be a program name with args.
704set dummy gar; ac_word=$2
705echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
706echo "configure:707: checking for $ac_word" >&5
707if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
708  echo $ac_n "(cached) $ac_c" 1>&6
709else
710  if test -n "$AR"; then
711  ac_cv_prog_AR="$AR" # Let the user override the test.
712else
713  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
714  ac_dummy="$PATH"
715  for ac_dir in $ac_dummy; do
716    test -z "$ac_dir" && ac_dir=.
717    if test -f $ac_dir/$ac_word; then
718      ac_cv_prog_AR="gar"
719      break
720    fi
721  done
722  IFS="$ac_save_ifs"
723  test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
724fi
725fi
726AR="$ac_cv_prog_AR"
727if test -n "$AR"; then
728  echo "$ac_t""$AR" 1>&6
729else
730  echo "$ac_t""no" 1>&6
731fi
732
733# Extract the first word of "granlib", so it can be a program name with args.
734set dummy granlib; ac_word=$2
735echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
736echo "configure:737: checking for $ac_word" >&5
737if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
738  echo $ac_n "(cached) $ac_c" 1>&6
739else
740  if test -n "$RANLIB"; then
741  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
742else
743  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
744  ac_dummy="$PATH"
745  for ac_dir in $ac_dummy; do
746    test -z "$ac_dir" && ac_dir=.
747    if test -f $ac_dir/$ac_word; then
748      ac_cv_prog_RANLIB="granlib"
749      break
750    fi
751  done
752  IFS="$ac_save_ifs"
753  test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB="ranlib"
754fi
755fi
756RANLIB="$ac_cv_prog_RANLIB"
757if test -n "$RANLIB"; then
758  echo "$ac_t""$RANLIB" 1>&6
759else
760  echo "$ac_t""no" 1>&6
761fi
762
763
764# Extract the first word of "gcc", so it can be a program name with args.
765set dummy gcc; ac_word=$2
766echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
767echo "configure:768: checking for $ac_word" >&5
768if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
769  echo $ac_n "(cached) $ac_c" 1>&6
770else
771  if test -n "$CC"; then
772  ac_cv_prog_CC="$CC" # Let the user override the test.
773else
774  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
775  ac_dummy="$PATH"
776  for ac_dir in $ac_dummy; do
777    test -z "$ac_dir" && ac_dir=.
778    if test -f $ac_dir/$ac_word; then
779      ac_cv_prog_CC="gcc"
780      break
781    fi
782  done
783  IFS="$ac_save_ifs"
784fi
785fi
786CC="$ac_cv_prog_CC"
787if test -n "$CC"; then
788  echo "$ac_t""$CC" 1>&6
789else
790  echo "$ac_t""no" 1>&6
791fi
792
793if test -z "$CC"; then
794  # Extract the first word of "cc", so it can be a program name with args.
795set dummy cc; ac_word=$2
796echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
797echo "configure:798: checking for $ac_word" >&5
798if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
799  echo $ac_n "(cached) $ac_c" 1>&6
800else
801  if test -n "$CC"; then
802  ac_cv_prog_CC="$CC" # Let the user override the test.
803else
804  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
805  ac_prog_rejected=no
806  ac_dummy="$PATH"
807  for ac_dir in $ac_dummy; do
808    test -z "$ac_dir" && ac_dir=.
809    if test -f $ac_dir/$ac_word; then
810      if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
811        ac_prog_rejected=yes
812	continue
813      fi
814      ac_cv_prog_CC="cc"
815      break
816    fi
817  done
818  IFS="$ac_save_ifs"
819if test $ac_prog_rejected = yes; then
820  # We found a bogon in the path, so make sure we never use it.
821  set dummy $ac_cv_prog_CC
822  shift
823  if test $# -gt 0; then
824    # We chose a different compiler from the bogus one.
825    # However, it has the same basename, so the bogon will be chosen
826    # first if we set CC to just the basename; use the full file name.
827    shift
828    set dummy "$ac_dir/$ac_word" "$@"
829    shift
830    ac_cv_prog_CC="$@"
831  fi
832fi
833fi
834fi
835CC="$ac_cv_prog_CC"
836if test -n "$CC"; then
837  echo "$ac_t""$CC" 1>&6
838else
839  echo "$ac_t""no" 1>&6
840fi
841
842  if test -z "$CC"; then
843    case "`uname -s`" in
844    *win32* | *WIN32*)
845      # Extract the first word of "cl", so it can be a program name with args.
846set dummy cl; ac_word=$2
847echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
848echo "configure:849: checking for $ac_word" >&5
849if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
850  echo $ac_n "(cached) $ac_c" 1>&6
851else
852  if test -n "$CC"; then
853  ac_cv_prog_CC="$CC" # Let the user override the test.
854else
855  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
856  ac_dummy="$PATH"
857  for ac_dir in $ac_dummy; do
858    test -z "$ac_dir" && ac_dir=.
859    if test -f $ac_dir/$ac_word; then
860      ac_cv_prog_CC="cl"
861      break
862    fi
863  done
864  IFS="$ac_save_ifs"
865fi
866fi
867CC="$ac_cv_prog_CC"
868if test -n "$CC"; then
869  echo "$ac_t""$CC" 1>&6
870else
871  echo "$ac_t""no" 1>&6
872fi
873 ;;
874    esac
875  fi
876  test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
877fi
878
879echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
880echo "configure:881: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
881
882ac_ext=c
883# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
884ac_cpp='$CPP $CPPFLAGS'
885ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
886ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
887cross_compiling=$ac_cv_prog_cc_cross
888
889cat > conftest.$ac_ext << EOF
890
891#line 892 "configure"
892#include "confdefs.h"
893
894main(){return(0);}
895EOF
896if { (eval echo configure:897: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
897  ac_cv_prog_cc_works=yes
898  # If we can't run a trivial program, we are probably using a cross compiler.
899  if (./conftest; exit) 2>/dev/null; then
900    ac_cv_prog_cc_cross=no
901  else
902    ac_cv_prog_cc_cross=yes
903  fi
904else
905  echo "configure: failed program was:" >&5
906  cat conftest.$ac_ext >&5
907  ac_cv_prog_cc_works=no
908fi
909rm -fr conftest*
910ac_ext=c
911# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
912ac_cpp='$CPP $CPPFLAGS'
913ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
914ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
915cross_compiling=$ac_cv_prog_cc_cross
916
917echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
918if test $ac_cv_prog_cc_works = no; then
919  { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
920fi
921echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
922echo "configure:923: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
923echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
924cross_compiling=$ac_cv_prog_cc_cross
925
926echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
927echo "configure:928: checking whether we are using GNU C" >&5
928if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
929  echo $ac_n "(cached) $ac_c" 1>&6
930else
931  cat > conftest.c <<EOF
932#ifdef __GNUC__
933  yes;
934#endif
935EOF
936if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:937: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
937  ac_cv_prog_gcc=yes
938else
939  ac_cv_prog_gcc=no
940fi
941fi
942
943echo "$ac_t""$ac_cv_prog_gcc" 1>&6
944
945if test $ac_cv_prog_gcc = yes; then
946  GCC=yes
947else
948  GCC=
949fi
950
951ac_test_CFLAGS="${CFLAGS+set}"
952ac_save_CFLAGS="$CFLAGS"
953CFLAGS=
954echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
955echo "configure:956: checking whether ${CC-cc} accepts -g" >&5
956if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
957  echo $ac_n "(cached) $ac_c" 1>&6
958else
959  echo 'void f(){}' > conftest.c
960if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
961  ac_cv_prog_cc_g=yes
962else
963  ac_cv_prog_cc_g=no
964fi
965rm -f conftest*
966
967fi
968
969echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
970if test "$ac_test_CFLAGS" = set; then
971  CFLAGS="$ac_save_CFLAGS"
972elif test $ac_cv_prog_cc_g = yes; then
973  if test "$GCC" = yes; then
974    CFLAGS="-g -O2"
975  else
976    CFLAGS="-g"
977  fi
978else
979  if test "$GCC" = yes; then
980    CFLAGS="-O2"
981  else
982    CFLAGS=
983  fi
984fi
985
986echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
987echo "configure:988: checking how to run the C preprocessor" >&5
988# On Suns, sometimes $CPP names a directory.
989if test -n "$CPP" && test -d "$CPP"; then
990  CPP=
991fi
992if test -z "$CPP"; then
993if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
994  echo $ac_n "(cached) $ac_c" 1>&6
995else
996    # This must be in double quotes, not single quotes, because CPP may get
997  # substituted into the Makefile and "${CC-cc}" will confuse make.
998  CPP="${CC-cc} -E"
999  # On the NeXT, cc -E runs the code through the compiler's parser,
1000  # not just through cpp.
1001  cat > conftest.$ac_ext <<EOF
1002#line 1003 "configure"
1003#include "confdefs.h"
1004#include <assert.h>
1005Syntax Error
1006EOF
1007ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1008{ (eval echo configure:1009: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1009ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1010if test -z "$ac_err"; then
1011  :
1012else
1013  echo "$ac_err" >&5
1014  echo "configure: failed program was:" >&5
1015  cat conftest.$ac_ext >&5
1016  rm -rf conftest*
1017  CPP="${CC-cc} -E -traditional-cpp"
1018  cat > conftest.$ac_ext <<EOF
1019#line 1020 "configure"
1020#include "confdefs.h"
1021#include <assert.h>
1022Syntax Error
1023EOF
1024ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1025{ (eval echo configure:1026: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1026ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1027if test -z "$ac_err"; then
1028  :
1029else
1030  echo "$ac_err" >&5
1031  echo "configure: failed program was:" >&5
1032  cat conftest.$ac_ext >&5
1033  rm -rf conftest*
1034  CPP="${CC-cc} -nologo -E"
1035  cat > conftest.$ac_ext <<EOF
1036#line 1037 "configure"
1037#include "confdefs.h"
1038#include <assert.h>
1039Syntax Error
1040EOF
1041ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1042{ (eval echo configure:1043: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1043ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1044if test -z "$ac_err"; then
1045  :
1046else
1047  echo "$ac_err" >&5
1048  echo "configure: failed program was:" >&5
1049  cat conftest.$ac_ext >&5
1050  rm -rf conftest*
1051  CPP=/lib/cpp
1052fi
1053rm -f conftest*
1054fi
1055rm -f conftest*
1056fi
1057rm -f conftest*
1058  ac_cv_prog_CPP="$CPP"
1059fi
1060  CPP="$ac_cv_prog_CPP"
1061else
1062  ac_cv_prog_CPP="$CPP"
1063fi
1064echo "$ac_t""$CPP" 1>&6
1065
1066if test $ac_cv_prog_gcc = yes; then
1067    echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
1068echo "configure:1069: checking whether ${CC-cc} needs -traditional" >&5
1069if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then
1070  echo $ac_n "(cached) $ac_c" 1>&6
1071else
1072    ac_pattern="Autoconf.*'x'"
1073  cat > conftest.$ac_ext <<EOF
1074#line 1075 "configure"
1075#include "confdefs.h"
1076#include <sgtty.h>
1077Autoconf TIOCGETP
1078EOF
1079if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1080  egrep "$ac_pattern" >/dev/null 2>&1; then
1081  rm -rf conftest*
1082  ac_cv_prog_gcc_traditional=yes
1083else
1084  rm -rf conftest*
1085  ac_cv_prog_gcc_traditional=no
1086fi
1087rm -f conftest*
1088
1089
1090  if test $ac_cv_prog_gcc_traditional = no; then
1091    cat > conftest.$ac_ext <<EOF
1092#line 1093 "configure"
1093#include "confdefs.h"
1094#include <termio.h>
1095Autoconf TCGETA
1096EOF
1097if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1098  egrep "$ac_pattern" >/dev/null 2>&1; then
1099  rm -rf conftest*
1100  ac_cv_prog_gcc_traditional=yes
1101fi
1102rm -f conftest*
1103
1104  fi
1105fi
1106
1107echo "$ac_t""$ac_cv_prog_gcc_traditional" 1>&6
1108  if test $ac_cv_prog_gcc_traditional = yes; then
1109    CC="$CC -traditional"
1110  fi
1111fi
1112
1113
1114OLD_CFLAGS="$CFLAGS"
1115CFLAGS="$CFLAGS -Wall"
1116echo $ac_n "checking that the C compiler understands -Wall""... $ac_c" 1>&6
1117echo "configure:1118: checking that the C compiler understands -Wall" >&5
1118if eval "test \"`echo '$''{'zssh_cc_wall'+set}'`\" = set"; then
1119  echo $ac_n "(cached) $ac_c" 1>&6
1120else
1121
1122    cat > conftest.$ac_ext <<EOF
1123#line 1124 "configure"
1124#include "confdefs.h"
1125 
1126int main() {
1127 
1128; return 0; }
1129EOF
1130if { (eval echo configure:1131: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1131  rm -rf conftest*
1132  zssh_cc_wall=yes
1133else
1134  echo "configure: failed program was:" >&5
1135  cat conftest.$ac_ext >&5
1136  rm -rf conftest*
1137  zssh_cc_wall=no
1138fi
1139rm -f conftest*
1140fi
1141
1142echo "$ac_t""$zssh_cc_wall" 1>&6
1143if test x"$zssh_cc_wall" != x"yes"; then
1144  CFLAGS="$OLD_CFLAGS"
1145fi
1146
1147
1148
1149echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1150echo "configure:1151: checking for ANSI C header files" >&5
1151if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1152  echo $ac_n "(cached) $ac_c" 1>&6
1153else
1154  cat > conftest.$ac_ext <<EOF
1155#line 1156 "configure"
1156#include "confdefs.h"
1157#include <stdlib.h>
1158#include <stdarg.h>
1159#include <string.h>
1160#include <float.h>
1161EOF
1162ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1163{ (eval echo configure:1164: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1164ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1165if test -z "$ac_err"; then
1166  rm -rf conftest*
1167  ac_cv_header_stdc=yes
1168else
1169  echo "$ac_err" >&5
1170  echo "configure: failed program was:" >&5
1171  cat conftest.$ac_ext >&5
1172  rm -rf conftest*
1173  ac_cv_header_stdc=no
1174fi
1175rm -f conftest*
1176
1177if test $ac_cv_header_stdc = yes; then
1178  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1179cat > conftest.$ac_ext <<EOF
1180#line 1181 "configure"
1181#include "confdefs.h"
1182#include <string.h>
1183EOF
1184if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1185  egrep "memchr" >/dev/null 2>&1; then
1186  :
1187else
1188  rm -rf conftest*
1189  ac_cv_header_stdc=no
1190fi
1191rm -f conftest*
1192
1193fi
1194
1195if test $ac_cv_header_stdc = yes; then
1196  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1197cat > conftest.$ac_ext <<EOF
1198#line 1199 "configure"
1199#include "confdefs.h"
1200#include <stdlib.h>
1201EOF
1202if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1203  egrep "free" >/dev/null 2>&1; then
1204  :
1205else
1206  rm -rf conftest*
1207  ac_cv_header_stdc=no
1208fi
1209rm -f conftest*
1210
1211fi
1212
1213if test $ac_cv_header_stdc = yes; then
1214  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1215if test "$cross_compiling" = yes; then
1216  :
1217else
1218  cat > conftest.$ac_ext <<EOF
1219#line 1220 "configure"
1220#include "confdefs.h"
1221#include <ctype.h>
1222#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1223#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1224#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1225int main () { int i; for (i = 0; i < 256; i++)
1226if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1227exit (0); }
1228
1229EOF
1230if { (eval echo configure:1231: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1231then
1232  :
1233else
1234  echo "configure: failed program was:" >&5
1235  cat conftest.$ac_ext >&5
1236  rm -fr conftest*
1237  ac_cv_header_stdc=no
1238fi
1239rm -fr conftest*
1240fi
1241
1242fi
1243fi
1244
1245echo "$ac_t""$ac_cv_header_stdc" 1>&6
1246if test $ac_cv_header_stdc = yes; then
1247  cat >> confdefs.h <<\EOF
1248#define STDC_HEADERS 1
1249EOF
1250
1251fi
1252
1253echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
1254echo "configure:1255: checking for sys/wait.h that is POSIX.1 compatible" >&5
1255if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
1256  echo $ac_n "(cached) $ac_c" 1>&6
1257else
1258  cat > conftest.$ac_ext <<EOF
1259#line 1260 "configure"
1260#include "confdefs.h"
1261#include <sys/types.h>
1262#include <sys/wait.h>
1263#ifndef WEXITSTATUS
1264#define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
1265#endif
1266#ifndef WIFEXITED
1267#define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
1268#endif
1269int main() {
1270int s;
1271wait (&s);
1272s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
1273; return 0; }
1274EOF
1275if { (eval echo configure:1276: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1276  rm -rf conftest*
1277  ac_cv_header_sys_wait_h=yes
1278else
1279  echo "configure: failed program was:" >&5
1280  cat conftest.$ac_ext >&5
1281  rm -rf conftest*
1282  ac_cv_header_sys_wait_h=no
1283fi
1284rm -f conftest*
1285fi
1286
1287echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
1288if test $ac_cv_header_sys_wait_h = yes; then
1289  cat >> confdefs.h <<\EOF
1290#define HAVE_SYS_WAIT_H 1
1291EOF
1292
1293fi
1294
1295for ac_hdr in fcntl.h paths.h sys/ioctl.h sys/time.h termios.h unistd.h \
1296	err.h sys/cdefs.h sys/param.h util.h stropts.h
1297do
1298ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1299echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1300echo "configure:1301: checking for $ac_hdr" >&5
1301if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1302  echo $ac_n "(cached) $ac_c" 1>&6
1303else
1304  cat > conftest.$ac_ext <<EOF
1305#line 1306 "configure"
1306#include "confdefs.h"
1307#include <$ac_hdr>
1308EOF
1309ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1310{ (eval echo configure:1311: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1311ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1312if test -z "$ac_err"; then
1313  rm -rf conftest*
1314  eval "ac_cv_header_$ac_safe=yes"
1315else
1316  echo "$ac_err" >&5
1317  echo "configure: failed program was:" >&5
1318  cat conftest.$ac_ext >&5
1319  rm -rf conftest*
1320  eval "ac_cv_header_$ac_safe=no"
1321fi
1322rm -f conftest*
1323fi
1324if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1325  echo "$ac_t""yes" 1>&6
1326    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1327  cat >> confdefs.h <<EOF
1328#define $ac_tr_hdr 1
1329EOF
1330
1331else
1332  echo "$ac_t""no" 1>&6
1333fi
1334done
1335
1336
1337
1338
1339if test -z "$fakereadline"; then
1340
1341
1342if test "X$bash_cv_termcap_lib" = "X"; then
1343_bash_needmsg=yes
1344else
1345echo $ac_n "checking which library has the termcap functions""... $ac_c" 1>&6
1346echo "configure:1347: checking which library has the termcap functions" >&5
1347_bash_needmsg=
1348fi
1349if eval "test \"`echo '$''{'bash_cv_termcap_lib'+set}'`\" = set"; then
1350  echo $ac_n "(cached) $ac_c" 1>&6
1351else
1352  echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
1353echo "configure:1354: checking for tgetent in -ltermcap" >&5
1354ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'`
1355if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1356  echo $ac_n "(cached) $ac_c" 1>&6
1357else
1358  ac_save_LIBS="$LIBS"
1359LIBS="-ltermcap  $LIBS"
1360cat > conftest.$ac_ext <<EOF
1361#line 1362 "configure"
1362#include "confdefs.h"
1363/* Override any gcc2 internal prototype to avoid an error.  */
1364/* We use char because int might match the return type of a gcc2
1365    builtin and then its argument prototype would still apply.  */
1366char tgetent();
1367
1368int main() {
1369tgetent()
1370; return 0; }
1371EOF
1372if { (eval echo configure:1373: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1373  rm -rf conftest*
1374  eval "ac_cv_lib_$ac_lib_var=yes"
1375else
1376  echo "configure: failed program was:" >&5
1377  cat conftest.$ac_ext >&5
1378  rm -rf conftest*
1379  eval "ac_cv_lib_$ac_lib_var=no"
1380fi
1381rm -f conftest*
1382LIBS="$ac_save_LIBS"
1383
1384fi
1385if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1386  echo "$ac_t""yes" 1>&6
1387  bash_cv_termcap_lib=libtermcap
1388else
1389  echo "$ac_t""no" 1>&6
1390echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6
1391echo "configure:1392: checking for tgetent in -lcurses" >&5
1392ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'`
1393if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1394  echo $ac_n "(cached) $ac_c" 1>&6
1395else
1396  ac_save_LIBS="$LIBS"
1397LIBS="-lcurses  $LIBS"
1398cat > conftest.$ac_ext <<EOF
1399#line 1400 "configure"
1400#include "confdefs.h"
1401/* Override any gcc2 internal prototype to avoid an error.  */
1402/* We use char because int might match the return type of a gcc2
1403    builtin and then its argument prototype would still apply.  */
1404char tgetent();
1405
1406int main() {
1407tgetent()
1408; return 0; }
1409EOF
1410if { (eval echo configure:1411: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1411  rm -rf conftest*
1412  eval "ac_cv_lib_$ac_lib_var=yes"
1413else
1414  echo "configure: failed program was:" >&5
1415  cat conftest.$ac_ext >&5
1416  rm -rf conftest*
1417  eval "ac_cv_lib_$ac_lib_var=no"
1418fi
1419rm -f conftest*
1420LIBS="$ac_save_LIBS"
1421
1422fi
1423if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1424  echo "$ac_t""yes" 1>&6
1425  bash_cv_termcap_lib=libcurses
1426else
1427  echo "$ac_t""no" 1>&6
1428echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6
1429echo "configure:1430: checking for tgetent in -lncurses" >&5
1430ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'`
1431if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1432  echo $ac_n "(cached) $ac_c" 1>&6
1433else
1434  ac_save_LIBS="$LIBS"
1435LIBS="-lncurses  $LIBS"
1436cat > conftest.$ac_ext <<EOF
1437#line 1438 "configure"
1438#include "confdefs.h"
1439/* Override any gcc2 internal prototype to avoid an error.  */
1440/* We use char because int might match the return type of a gcc2
1441    builtin and then its argument prototype would still apply.  */
1442char tgetent();
1443
1444int main() {
1445tgetent()
1446; return 0; }
1447EOF
1448if { (eval echo configure:1449: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1449  rm -rf conftest*
1450  eval "ac_cv_lib_$ac_lib_var=yes"
1451else
1452  echo "configure: failed program was:" >&5
1453  cat conftest.$ac_ext >&5
1454  rm -rf conftest*
1455  eval "ac_cv_lib_$ac_lib_var=no"
1456fi
1457rm -f conftest*
1458LIBS="$ac_save_LIBS"
1459
1460fi
1461if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1462  echo "$ac_t""yes" 1>&6
1463  bash_cv_termcap_lib=libncurses
1464else
1465  echo "$ac_t""no" 1>&6
1466bash_cv_termcap_lib=libtermcap
1467fi
1468
1469fi
1470
1471fi
1472
1473fi
1474
1475if test "X$_bash_needmsg" = "Xyes"; then
1476echo $ac_n "checking which library has the termcap functions""... $ac_c" 1>&6
1477echo "configure:1478: checking which library has the termcap functions" >&5
1478fi
1479echo "$ac_t""using $bash_cv_termcap_lib" 1>&6
1480if test $bash_cv_termcap_lib = libtermcap && test -z "$prefer_curses"; then
1481TERMCAP_LIB=-ltermcap
1482TERMCAP_DEP=
1483elif test $bash_cv_termcap_lib = libncurses; then
1484TERMCAP_LIB=-lncurses
1485TERMCAP_DEP=
1486else
1487TERMCAP_LIB=-lcurses
1488TERMCAP_DEP=
1489fi
1490
1491  LIBS="$LIBS $TERMCAP_LIB"
1492
1493    for ac_hdr in readline/readline.h readline/history.h
1494do
1495ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1496echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1497echo "configure:1498: checking for $ac_hdr" >&5
1498if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1499  echo $ac_n "(cached) $ac_c" 1>&6
1500else
1501  cat > conftest.$ac_ext <<EOF
1502#line 1503 "configure"
1503#include "confdefs.h"
1504#include <$ac_hdr>
1505EOF
1506ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1507{ (eval echo configure:1508: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1508ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1509if test -z "$ac_err"; then
1510  rm -rf conftest*
1511  eval "ac_cv_header_$ac_safe=yes"
1512else
1513  echo "$ac_err" >&5
1514  echo "configure: failed program was:" >&5
1515  cat conftest.$ac_ext >&5
1516  rm -rf conftest*
1517  eval "ac_cv_header_$ac_safe=no"
1518fi
1519rm -f conftest*
1520fi
1521if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1522  echo "$ac_t""yes" 1>&6
1523    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1524  cat >> confdefs.h <<EOF
1525#define $ac_tr_hdr 1
1526EOF
1527
1528else
1529  echo "$ac_t""no" 1>&6
1530{ echo "configure: error:
1531*** the readline library headers were not found. Check 'config.log' for more details.
1532*** You may use --disable-readline option of configure to build without libreadline
1533*** or make sure libreadline *and* its headers are properly installed" 1>&2; exit 1; }
1534fi
1535done
1536
1537
1538  echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
1539echo "configure:1540: checking for readline in -lreadline" >&5
1540ac_lib_var=`echo readline'_'readline | sed 'y%./+-%__p_%'`
1541if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1542  echo $ac_n "(cached) $ac_c" 1>&6
1543else
1544  ac_save_LIBS="$LIBS"
1545LIBS="-lreadline  $LIBS"
1546cat > conftest.$ac_ext <<EOF
1547#line 1548 "configure"
1548#include "confdefs.h"
1549/* Override any gcc2 internal prototype to avoid an error.  */
1550/* We use char because int might match the return type of a gcc2
1551    builtin and then its argument prototype would still apply.  */
1552char readline();
1553
1554int main() {
1555readline()
1556; return 0; }
1557EOF
1558if { (eval echo configure:1559: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1559  rm -rf conftest*
1560  eval "ac_cv_lib_$ac_lib_var=yes"
1561else
1562  echo "configure: failed program was:" >&5
1563  cat conftest.$ac_ext >&5
1564  rm -rf conftest*
1565  eval "ac_cv_lib_$ac_lib_var=no"
1566fi
1567rm -f conftest*
1568LIBS="$ac_save_LIBS"
1569
1570fi
1571if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1572  echo "$ac_t""yes" 1>&6
1573    ac_tr_lib=HAVE_LIB`echo readline | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1574    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1575  cat >> confdefs.h <<EOF
1576#define $ac_tr_lib 1
1577EOF
1578
1579  LIBS="-lreadline $LIBS"
1580
1581else
1582  echo "$ac_t""no" 1>&6
1583{ echo "configure: error:
1584*** libreadline was not found. Check 'config.log' for more details.
1585*** You may use --disable-readline option of configure to build without libreadline
1586*** or make sure libreadline is properly installed" 1>&2; exit 1; }
1587fi
1588
1589
1590    echo $ac_n "checking for rl_username_completion_function""... $ac_c" 1>&6
1591echo "configure:1592: checking for rl_username_completion_function" >&5
1592if eval "test \"`echo '$''{'ac_cv_func_rl_username_completion_function'+set}'`\" = set"; then
1593  echo $ac_n "(cached) $ac_c" 1>&6
1594else
1595  cat > conftest.$ac_ext <<EOF
1596#line 1597 "configure"
1597#include "confdefs.h"
1598/* System header to define __stub macros and hopefully few prototypes,
1599    which can conflict with char rl_username_completion_function(); below.  */
1600#include <assert.h>
1601/* Override any gcc2 internal prototype to avoid an error.  */
1602/* We use char because int might match the return type of a gcc2
1603    builtin and then its argument prototype would still apply.  */
1604char rl_username_completion_function();
1605
1606int main() {
1607
1608/* The GNU C library defines this for functions which it implements
1609    to always fail with ENOSYS.  Some functions are actually named
1610    something starting with __ and the normal name is an alias.  */
1611#if defined (__stub_rl_username_completion_function) || defined (__stub___rl_username_completion_function)
1612choke me
1613#else
1614rl_username_completion_function();
1615#endif
1616
1617; return 0; }
1618EOF
1619if { (eval echo configure:1620: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1620  rm -rf conftest*
1621  eval "ac_cv_func_rl_username_completion_function=yes"
1622else
1623  echo "configure: failed program was:" >&5
1624  cat conftest.$ac_ext >&5
1625  rm -rf conftest*
1626  eval "ac_cv_func_rl_username_completion_function=no"
1627fi
1628rm -f conftest*
1629fi
1630
1631if eval "test \"`echo '$ac_cv_func_'rl_username_completion_function`\" = yes"; then
1632  echo "$ac_t""yes" 1>&6
1633  cat >> confdefs.h <<\EOF
1634#define HAVE_READLINE_4_2_OR_GREATER 1
1635EOF
1636
1637else
1638  echo "$ac_t""no" 1>&6
1639fi
1640
1641fi
1642
1643
1644
1645echo $ac_n "checking whether getpgrp takes no argument""... $ac_c" 1>&6
1646echo "configure:1647: checking whether getpgrp takes no argument" >&5
1647if eval "test \"`echo '$''{'ac_cv_func_getpgrp_void'+set}'`\" = set"; then
1648  echo $ac_n "(cached) $ac_c" 1>&6
1649else
1650  if test "$cross_compiling" = yes; then
1651  { echo "configure: error: cannot check getpgrp if cross compiling" 1>&2; exit 1; }
1652else
1653  cat > conftest.$ac_ext <<EOF
1654#line 1655 "configure"
1655#include "confdefs.h"
1656
1657/*
1658 * If this system has a BSD-style getpgrp(),
1659 * which takes a pid argument, exit unsuccessfully.
1660 *
1661 * Snarfed from Chet Ramey's bash pgrp.c test program
1662 */
1663#include <stdio.h>
1664#include <sys/types.h>
1665
1666int     pid;
1667int     pg1, pg2, pg3, pg4;
1668int     ng, np, s, child;
1669
1670main()
1671{
1672        pid = getpid();
1673        pg1 = getpgrp(0);
1674        pg2 = getpgrp();
1675        pg3 = getpgrp(pid);
1676        pg4 = getpgrp(1);
1677
1678        /*
1679         * If all of these values are the same, it's pretty sure that
1680         * we're on a system that ignores getpgrp's first argument.
1681         */
1682        if (pg2 == pg4 && pg1 == pg3 && pg2 == pg3)
1683                exit(0);
1684
1685        child = fork();
1686        if (child < 0)
1687                exit(1);
1688        else if (child == 0) {
1689                np = getpid();
1690                /*
1691                 * If this is Sys V, this will not work; pgrp will be
1692                 * set to np because setpgrp just changes a pgrp to be
1693                 * the same as the pid.
1694                 */
1695                setpgrp(np, pg1);
1696                ng = getpgrp(0);        /* Same result for Sys V and BSD */
1697                if (ng == pg1) {
1698                        exit(1);
1699                } else {
1700                        exit(0);
1701                }
1702        } else {
1703                wait(&s);
1704                exit(s>>8);
1705        }
1706}
1707
1708EOF
1709if { (eval echo configure:1710: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1710then
1711  ac_cv_func_getpgrp_void=yes
1712else
1713  echo "configure: failed program was:" >&5
1714  cat conftest.$ac_ext >&5
1715  rm -fr conftest*
1716  ac_cv_func_getpgrp_void=no
1717fi
1718rm -fr conftest*
1719fi
1720
1721
1722fi
1723
1724echo "$ac_t""$ac_cv_func_getpgrp_void" 1>&6
1725if test $ac_cv_func_getpgrp_void = yes; then
1726  cat >> confdefs.h <<\EOF
1727#define GETPGRP_VOID 1
1728EOF
1729
1730fi
1731
1732echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
1733echo "configure:1734: checking return type of signal handlers" >&5
1734if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
1735  echo $ac_n "(cached) $ac_c" 1>&6
1736else
1737  cat > conftest.$ac_ext <<EOF
1738#line 1739 "configure"
1739#include "confdefs.h"
1740#include <sys/types.h>
1741#include <signal.h>
1742#ifdef signal
1743#undef signal
1744#endif
1745#ifdef __cplusplus
1746extern "C" void (*signal (int, void (*)(int)))(int);
1747#else
1748void (*signal ()) ();
1749#endif
1750
1751int main() {
1752int i;
1753; return 0; }
1754EOF
1755if { (eval echo configure:1756: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1756  rm -rf conftest*
1757  ac_cv_type_signal=void
1758else
1759  echo "configure: failed program was:" >&5
1760  cat conftest.$ac_ext >&5
1761  rm -rf conftest*
1762  ac_cv_type_signal=int
1763fi
1764rm -f conftest*
1765fi
1766
1767echo "$ac_t""$ac_cv_type_signal" 1>&6
1768cat >> confdefs.h <<EOF
1769#define RETSIGTYPE $ac_cv_type_signal
1770EOF
1771
1772
1773for ac_func in strdup getpt isastream tcsetpgrp
1774do
1775echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1776echo "configure:1777: checking for $ac_func" >&5
1777if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1778  echo $ac_n "(cached) $ac_c" 1>&6
1779else
1780  cat > conftest.$ac_ext <<EOF
1781#line 1782 "configure"
1782#include "confdefs.h"
1783/* System header to define __stub macros and hopefully few prototypes,
1784    which can conflict with char $ac_func(); below.  */
1785#include <assert.h>
1786/* Override any gcc2 internal prototype to avoid an error.  */
1787/* We use char because int might match the return type of a gcc2
1788    builtin and then its argument prototype would still apply.  */
1789char $ac_func();
1790
1791int main() {
1792
1793/* The GNU C library defines this for functions which it implements
1794    to always fail with ENOSYS.  Some functions are actually named
1795    something starting with __ and the normal name is an alias.  */
1796#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1797choke me
1798#else
1799$ac_func();
1800#endif
1801
1802; return 0; }
1803EOF
1804if { (eval echo configure:1805: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1805  rm -rf conftest*
1806  eval "ac_cv_func_$ac_func=yes"
1807else
1808  echo "configure: failed program was:" >&5
1809  cat conftest.$ac_ext >&5
1810  rm -rf conftest*
1811  eval "ac_cv_func_$ac_func=no"
1812fi
1813rm -f conftest*
1814fi
1815
1816if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1817  echo "$ac_t""yes" 1>&6
1818    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1819  cat >> confdefs.h <<EOF
1820#define $ac_tr_func 1
1821EOF
1822
1823else
1824  echo "$ac_t""no" 1>&6
1825fi
1826done
1827
1828
1829
1830for ac_func in _getpty getpseudotty openpty grantpt unlockpt
1831do
1832echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1833echo "configure:1834: checking for $ac_func" >&5
1834if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1835  echo $ac_n "(cached) $ac_c" 1>&6
1836else
1837  cat > conftest.$ac_ext <<EOF
1838#line 1839 "configure"
1839#include "confdefs.h"
1840/* System header to define __stub macros and hopefully few prototypes,
1841    which can conflict with char $ac_func(); below.  */
1842#include <assert.h>
1843/* Override any gcc2 internal prototype to avoid an error.  */
1844/* We use char because int might match the return type of a gcc2
1845    builtin and then its argument prototype would still apply.  */
1846char $ac_func();
1847
1848int main() {
1849
1850/* The GNU C library defines this for functions which it implements
1851    to always fail with ENOSYS.  Some functions are actually named
1852    something starting with __ and the normal name is an alias.  */
1853#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1854choke me
1855#else
1856$ac_func();
1857#endif
1858
1859; return 0; }
1860EOF
1861if { (eval echo configure:1862: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1862  rm -rf conftest*
1863  eval "ac_cv_func_$ac_func=yes"
1864else
1865  echo "configure: failed program was:" >&5
1866  cat conftest.$ac_ext >&5
1867  rm -rf conftest*
1868  eval "ac_cv_func_$ac_func=no"
1869fi
1870rm -f conftest*
1871fi
1872
1873if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1874  echo "$ac_t""yes" 1>&6
1875    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1876  cat >> confdefs.h <<EOF
1877#define $ac_tr_func 1
1878EOF
1879
1880else
1881  echo "$ac_t""no" 1>&6
1882fi
1883done
1884
1885echo $ac_n "checking for pseudo ttys""... $ac_c" 1>&6
1886echo "configure:1887: checking for pseudo ttys" >&5
1887if test -c /dev/getpty && test $ac_cv_func_getpseudotty = yes
1888then
1889  cat >> confdefs.h <<\EOF
1890#define HAVE_GETPSEUDOTTY 1
1891EOF
1892
1893  echo "$ac_t""getpseudotty" 1>&6
1894else
1895if test -c /dev/ptmx && test -c /dev/pts/0
1896then
1897  cat >> confdefs.h <<\EOF
1898#define HAVE_DEV_PTMX 1
1899EOF
1900
1901  echo "$ac_t""streams ptys" 1>&6
1902else
1903if test -c /dev/ptc && test -c /dev/pts || test -d /dev/pts
1904then
1905  cat >> confdefs.h <<\EOF
1906#define HAVE_DEV_PTS_AND_PTC 1
1907EOF
1908
1909  echo "$ac_t""/dev/pts and /dev/ptc" 1>&6
1910else
1911if test -c /dev/ptyp10
1912then
1913  cat >> confdefs.h <<\EOF
1914#define HAVE_DEV_PTYP10 1
1915EOF
1916
1917  echo "$ac_t""sco-style ptys" 1>&6
1918else
1919  echo "$ac_t""bsd-style ptys" 1>&6
1920fi fi fi fi
1921
1922
1923
1924
1925
1926
1927
1928trap '' 1 2 15
1929cat > confcache <<\EOF
1930# This file is a shell script that caches the results of configure
1931# tests run on this system so they can be shared between configure
1932# scripts and configure runs.  It is not useful on other systems.
1933# If it contains results you don't want to keep, you may remove or edit it.
1934#
1935# By default, configure uses ./config.cache as the cache file,
1936# creating it if it does not exist already.  You can give configure
1937# the --cache-file=FILE option to use a different cache file; that is
1938# what configure does when it calls configure scripts in
1939# subdirectories, so they share the cache.
1940# Giving --cache-file=/dev/null disables caching, for debugging configure.
1941# config.status only pays attention to the cache file if you give it the
1942# --recheck option to rerun configure.
1943#
1944EOF
1945# The following way of writing the cache mishandles newlines in values,
1946# but we know of no workaround that is simple, portable, and efficient.
1947# So, don't put newlines in cache variables' values.
1948# Ultrix sh set writes to stderr and can't be redirected directly,
1949# and sets the high bit in the cache file unless we assign to the vars.
1950(set) 2>&1 |
1951  case `(ac_space=' '; set | grep ac_space) 2>&1` in
1952  *ac_space=\ *)
1953    # `set' does not quote correctly, so add quotes (double-quote substitution
1954    # turns \\\\ into \\, and sed turns \\ into \).
1955    sed -n \
1956      -e "s/'/'\\\\''/g" \
1957      -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
1958    ;;
1959  *)
1960    # `set' quotes correctly as required by POSIX, so do not add quotes.
1961    sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
1962    ;;
1963  esac >> confcache
1964if cmp -s $cache_file confcache; then
1965  :
1966else
1967  if test -w $cache_file; then
1968    echo "updating cache $cache_file"
1969    cat confcache > $cache_file
1970  else
1971    echo "not updating unwritable cache $cache_file"
1972  fi
1973fi
1974rm -f confcache
1975
1976trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
1977
1978test "x$prefix" = xNONE && prefix=$ac_default_prefix
1979# Let make expand exec_prefix.
1980test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
1981
1982# Any assignment to VPATH causes Sun make to only execute
1983# the first set of double-colon rules, so remove it if not needed.
1984# If there is a colon in the path, we need to keep it.
1985if test "x$srcdir" = x.; then
1986  ac_vpsub='/^[ 	]*VPATH[ 	]*=[^:]*$/d'
1987fi
1988
1989trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
1990
1991DEFS=-DHAVE_CONFIG_H
1992
1993# Without the "./", some shells look in PATH for config.status.
1994: ${CONFIG_STATUS=./config.status}
1995
1996echo creating $CONFIG_STATUS
1997rm -f $CONFIG_STATUS
1998cat > $CONFIG_STATUS <<EOF
1999#! /bin/sh
2000# Generated automatically by configure.
2001# Run this file to recreate the current configuration.
2002# This directory was configured as follows,
2003# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
2004#
2005# $0 $ac_configure_args
2006#
2007# Compiler output produced by configure, useful for debugging
2008# configure, is in ./config.log if it exists.
2009
2010ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
2011for ac_option
2012do
2013  case "\$ac_option" in
2014  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
2015    echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
2016    exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
2017  -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
2018    echo "$CONFIG_STATUS generated by autoconf version 2.13"
2019    exit 0 ;;
2020  -help | --help | --hel | --he | --h)
2021    echo "\$ac_cs_usage"; exit 0 ;;
2022  *) echo "\$ac_cs_usage"; exit 1 ;;
2023  esac
2024done
2025
2026ac_given_srcdir=$srcdir
2027ac_given_INSTALL="$INSTALL"
2028
2029trap 'rm -fr `echo "Makefile fake_readline/Makefile test/Makefile config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
2030EOF
2031cat >> $CONFIG_STATUS <<EOF
2032
2033# Protect against being on the right side of a sed subst in config.status.
2034sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
2035 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
2036$ac_vpsub
2037$extrasub
2038s%@SHELL@%$SHELL%g
2039s%@CFLAGS@%$CFLAGS%g
2040s%@CPPFLAGS@%$CPPFLAGS%g
2041s%@CXXFLAGS@%$CXXFLAGS%g
2042s%@FFLAGS@%$FFLAGS%g
2043s%@DEFS@%$DEFS%g
2044s%@LDFLAGS@%$LDFLAGS%g
2045s%@LIBS@%$LIBS%g
2046s%@exec_prefix@%$exec_prefix%g
2047s%@prefix@%$prefix%g
2048s%@program_transform_name@%$program_transform_name%g
2049s%@bindir@%$bindir%g
2050s%@sbindir@%$sbindir%g
2051s%@libexecdir@%$libexecdir%g
2052s%@datadir@%$datadir%g
2053s%@sysconfdir@%$sysconfdir%g
2054s%@sharedstatedir@%$sharedstatedir%g
2055s%@localstatedir@%$localstatedir%g
2056s%@libdir@%$libdir%g
2057s%@includedir@%$includedir%g
2058s%@oldincludedir@%$oldincludedir%g
2059s%@infodir@%$infodir%g
2060s%@mandir@%$mandir%g
2061s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
2062s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
2063s%@INSTALL_DATA@%$INSTALL_DATA%g
2064s%@MAKE@%$MAKE%g
2065s%@TAR@%$TAR%g
2066s%@AR@%$AR%g
2067s%@RANLIB@%$RANLIB%g
2068s%@CC@%$CC%g
2069s%@CPP@%$CPP%g
2070s%@EXTRA_DEPS@%$EXTRA_DEPS%g
2071s%@EXTRA_CFLAGS@%$EXTRA_CFLAGS%g
2072s%@EXTRA_LIBS@%$EXTRA_LIBS%g
2073s%@TERMCAP_LIB@%$TERMCAP_LIB%g
2074
2075CEOF
2076EOF
2077
2078cat >> $CONFIG_STATUS <<\EOF
2079
2080# Split the substitutions into bite-sized pieces for seds with
2081# small command number limits, like on Digital OSF/1 and HP-UX.
2082ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
2083ac_file=1 # Number of current file.
2084ac_beg=1 # First line for current file.
2085ac_end=$ac_max_sed_cmds # Line after last line for current file.
2086ac_more_lines=:
2087ac_sed_cmds=""
2088while $ac_more_lines; do
2089  if test $ac_beg -gt 1; then
2090    sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
2091  else
2092    sed "${ac_end}q" conftest.subs > conftest.s$ac_file
2093  fi
2094  if test ! -s conftest.s$ac_file; then
2095    ac_more_lines=false
2096    rm -f conftest.s$ac_file
2097  else
2098    if test -z "$ac_sed_cmds"; then
2099      ac_sed_cmds="sed -f conftest.s$ac_file"
2100    else
2101      ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
2102    fi
2103    ac_file=`expr $ac_file + 1`
2104    ac_beg=$ac_end
2105    ac_end=`expr $ac_end + $ac_max_sed_cmds`
2106  fi
2107done
2108if test -z "$ac_sed_cmds"; then
2109  ac_sed_cmds=cat
2110fi
2111EOF
2112
2113cat >> $CONFIG_STATUS <<EOF
2114
2115CONFIG_FILES=\${CONFIG_FILES-"Makefile fake_readline/Makefile test/Makefile"}
2116EOF
2117cat >> $CONFIG_STATUS <<\EOF
2118for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
2119  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
2120  case "$ac_file" in
2121  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
2122       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2123  *) ac_file_in="${ac_file}.in" ;;
2124  esac
2125
2126  # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
2127
2128  # Remove last slash and all that follows it.  Not all systems have dirname.
2129  ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2130  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
2131    # The file is in a subdirectory.
2132    test ! -d "$ac_dir" && mkdir "$ac_dir"
2133    ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
2134    # A "../" for each directory in $ac_dir_suffix.
2135    ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
2136  else
2137    ac_dir_suffix= ac_dots=
2138  fi
2139
2140  case "$ac_given_srcdir" in
2141  .)  srcdir=.
2142      if test -z "$ac_dots"; then top_srcdir=.
2143      else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
2144  /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
2145  *) # Relative path.
2146    srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
2147    top_srcdir="$ac_dots$ac_given_srcdir" ;;
2148  esac
2149
2150  case "$ac_given_INSTALL" in
2151  [/$]*) INSTALL="$ac_given_INSTALL" ;;
2152  *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
2153  esac
2154
2155  echo creating "$ac_file"
2156  rm -f "$ac_file"
2157  configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
2158  case "$ac_file" in
2159  *Makefile*) ac_comsub="1i\\
2160# $configure_input" ;;
2161  *) ac_comsub= ;;
2162  esac
2163
2164  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
2165  sed -e "$ac_comsub
2166s%@configure_input@%$configure_input%g
2167s%@srcdir@%$srcdir%g
2168s%@top_srcdir@%$top_srcdir%g
2169s%@INSTALL@%$INSTALL%g
2170" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
2171fi; done
2172rm -f conftest.s*
2173
2174# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
2175# NAME is the cpp macro being defined and VALUE is the value it is being given.
2176#
2177# ac_d sets the value in "#define NAME VALUE" lines.
2178ac_dA='s%^\([ 	]*\)#\([ 	]*define[ 	][ 	]*\)'
2179ac_dB='\([ 	][ 	]*\)[^ 	]*%\1#\2'
2180ac_dC='\3'
2181ac_dD='%g'
2182# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
2183ac_uA='s%^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
2184ac_uB='\([ 	]\)%\1#\2define\3'
2185ac_uC=' '
2186ac_uD='\4%g'
2187# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
2188ac_eA='s%^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
2189ac_eB='$%\1#\2define\3'
2190ac_eC=' '
2191ac_eD='%g'
2192
2193if test "${CONFIG_HEADERS+set}" != set; then
2194EOF
2195cat >> $CONFIG_STATUS <<EOF
2196  CONFIG_HEADERS="config.h"
2197EOF
2198cat >> $CONFIG_STATUS <<\EOF
2199fi
2200for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
2201  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
2202  case "$ac_file" in
2203  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
2204       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2205  *) ac_file_in="${ac_file}.in" ;;
2206  esac
2207
2208  echo creating $ac_file
2209
2210  rm -f conftest.frag conftest.in conftest.out
2211  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
2212  cat $ac_file_inputs > conftest.in
2213
2214EOF
2215
2216# Transform confdefs.h into a sed script conftest.vals that substitutes
2217# the proper values into config.h.in to produce config.h.  And first:
2218# Protect against being on the right side of a sed subst in config.status.
2219# Protect against being in an unquoted here document in config.status.
2220rm -f conftest.vals
2221cat > conftest.hdr <<\EOF
2222s/[\\&%]/\\&/g
2223s%[\\$`]%\\&%g
2224s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
2225s%ac_d%ac_u%gp
2226s%ac_u%ac_e%gp
2227EOF
2228sed -n -f conftest.hdr confdefs.h > conftest.vals
2229rm -f conftest.hdr
2230
2231# This sed command replaces #undef with comments.  This is necessary, for
2232# example, in the case of _POSIX_SOURCE, which is predefined and required
2233# on some systems where configure will not decide to define it.
2234cat >> conftest.vals <<\EOF
2235s%^[ 	]*#[ 	]*undef[ 	][ 	]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
2236EOF
2237
2238# Break up conftest.vals because some shells have a limit on
2239# the size of here documents, and old seds have small limits too.
2240
2241rm -f conftest.tail
2242while :
2243do
2244  ac_lines=`grep -c . conftest.vals`
2245  # grep -c gives empty output for an empty file on some AIX systems.
2246  if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
2247  # Write a limited-size here document to conftest.frag.
2248  echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
2249  sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
2250  echo 'CEOF
2251  sed -f conftest.frag conftest.in > conftest.out
2252  rm -f conftest.in
2253  mv conftest.out conftest.in
2254' >> $CONFIG_STATUS
2255  sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
2256  rm -f conftest.vals
2257  mv conftest.tail conftest.vals
2258done
2259rm -f conftest.vals
2260
2261cat >> $CONFIG_STATUS <<\EOF
2262  rm -f conftest.frag conftest.h
2263  echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
2264  cat conftest.in >> conftest.h
2265  rm -f conftest.in
2266  if cmp -s $ac_file conftest.h 2>/dev/null; then
2267    echo "$ac_file is unchanged"
2268    rm -f conftest.h
2269  else
2270    # Remove last slash and all that follows it.  Not all systems have dirname.
2271      ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2272      if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
2273      # The file is in a subdirectory.
2274      test ! -d "$ac_dir" && mkdir "$ac_dir"
2275    fi
2276    rm -f $ac_file
2277    mv conftest.h $ac_file
2278  fi
2279fi; done
2280
2281EOF
2282cat >> $CONFIG_STATUS <<EOF
2283
2284EOF
2285cat >> $CONFIG_STATUS <<\EOF
2286
2287exit 0
2288EOF
2289chmod +x $CONFIG_STATUS
2290rm -fr confdefs* $ac_clean_files
2291test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
2292
2293
2294