1#! /bin/sh
2# From configure.in Revision: 1.18 .
3# Guess values for system-dependent variables and create Makefiles.
4# Generated by GNU Autoconf 2.57.
5#
6# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
7# Free Software Foundation, Inc.
8# This configure script is free software; the Free Software Foundation
9# gives unlimited permission to copy, distribute and modify it.
10## --------------------- ##
11## M4sh Initialization.  ##
12## --------------------- ##
13
14# Be Bourne compatible
15if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
16  emulate sh
17  NULLCMD=:
18  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
19  # is contrary to our usage.  Disable this feature.
20  alias -g '${1+"$@"}'='"$@"'
21elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
22  set -o posix
23fi
24
25# Support unset when possible.
26if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
27  as_unset=unset
28else
29  as_unset=false
30fi
31
32
33# Work around bugs in pre-3.0 UWIN ksh.
34$as_unset ENV MAIL MAILPATH
35PS1='$ '
36PS2='> '
37PS4='+ '
38
39# NLS nuisances.
40for as_var in \
41  LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
42  LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
43  LC_TELEPHONE LC_TIME
44do
45  if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then
46    eval $as_var=C; export $as_var
47  else
48    $as_unset $as_var
49  fi
50done
51
52# Required to use basename.
53if expr a : '\(a\)' >/dev/null 2>&1; then
54  as_expr=expr
55else
56  as_expr=false
57fi
58
59if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
60  as_basename=basename
61else
62  as_basename=false
63fi
64
65
66# Name of the executable.
67as_me=`$as_basename "$0" ||
68$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
69	 X"$0" : 'X\(//\)$' \| \
70	 X"$0" : 'X\(/\)$' \| \
71	 .     : '\(.\)' 2>/dev/null ||
72echo X/"$0" |
73    sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
74  	  /^X\/\(\/\/\)$/{ s//\1/; q; }
75  	  /^X\/\(\/\).*/{ s//\1/; q; }
76  	  s/.*/./; q'`
77
78
79# PATH needs CR, and LINENO needs CR and PATH.
80# Avoid depending upon Character Ranges.
81as_cr_letters='abcdefghijklmnopqrstuvwxyz'
82as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
83as_cr_Letters=$as_cr_letters$as_cr_LETTERS
84as_cr_digits='0123456789'
85as_cr_alnum=$as_cr_Letters$as_cr_digits
86
87# The user is always right.
88if test "${PATH_SEPARATOR+set}" != set; then
89  echo "#! /bin/sh" >conf$$.sh
90  echo  "exit 0"   >>conf$$.sh
91  chmod +x conf$$.sh
92  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
93    PATH_SEPARATOR=';'
94  else
95    PATH_SEPARATOR=:
96  fi
97  rm -f conf$$.sh
98fi
99
100
101  as_lineno_1=$LINENO
102  as_lineno_2=$LINENO
103  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
104  test "x$as_lineno_1" != "x$as_lineno_2" &&
105  test "x$as_lineno_3"  = "x$as_lineno_2"  || {
106  # Find who we are.  Look in the path if we contain no path at all
107  # relative or not.
108  case $0 in
109    *[\\/]* ) as_myself=$0 ;;
110    *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
111for as_dir in $PATH
112do
113  IFS=$as_save_IFS
114  test -z "$as_dir" && as_dir=.
115  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
116done
117
118       ;;
119  esac
120  # We did not find ourselves, most probably we were run as `sh COMMAND'
121  # in which case we are not to be found in the path.
122  if test "x$as_myself" = x; then
123    as_myself=$0
124  fi
125  if test ! -f "$as_myself"; then
126    { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
127   { (exit 1); exit 1; }; }
128  fi
129  case $CONFIG_SHELL in
130  '')
131    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
132for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
133do
134  IFS=$as_save_IFS
135  test -z "$as_dir" && as_dir=.
136  for as_base in sh bash ksh sh5; do
137	 case $as_dir in
138	 /*)
139	   if ("$as_dir/$as_base" -c '
140  as_lineno_1=$LINENO
141  as_lineno_2=$LINENO
142  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
143  test "x$as_lineno_1" != "x$as_lineno_2" &&
144  test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
145	     $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
146	     $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
147	     CONFIG_SHELL=$as_dir/$as_base
148	     export CONFIG_SHELL
149	     exec "$CONFIG_SHELL" "$0" ${1+"$@"}
150	   fi;;
151	 esac
152       done
153done
154;;
155  esac
156
157  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
158  # uniformly replaced by the line number.  The first 'sed' inserts a
159  # line-number line before each line; the second 'sed' does the real
160  # work.  The second script uses 'N' to pair each line-number line
161  # with the numbered line, and appends trailing '-' during
162  # substitution so that $LINENO is not a special case at line end.
163  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
164  # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
165  sed '=' <$as_myself |
166    sed '
167      N
168      s,$,-,
169      : loop
170      s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
171      t loop
172      s,-$,,
173      s,^['$as_cr_digits']*\n,,
174    ' >$as_me.lineno &&
175  chmod +x $as_me.lineno ||
176    { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
177   { (exit 1); exit 1; }; }
178
179  # Don't try to exec as it changes $[0], causing all sort of problems
180  # (the dirname of $[0] is not the place where we might find the
181  # original and so on.  Autoconf is especially sensible to this).
182  . ./$as_me.lineno
183  # Exit status is that of the last command.
184  exit
185}
186
187
188case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
189  *c*,-n*) ECHO_N= ECHO_C='
190' ECHO_T='	' ;;
191  *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
192  *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
193esac
194
195if expr a : '\(a\)' >/dev/null 2>&1; then
196  as_expr=expr
197else
198  as_expr=false
199fi
200
201rm -f conf$$ conf$$.exe conf$$.file
202echo >conf$$.file
203if ln -s conf$$.file conf$$ 2>/dev/null; then
204  # We could just check for DJGPP; but this test a) works b) is more generic
205  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
206  if test -f conf$$.exe; then
207    # Don't use ln at all; we don't have any links
208    as_ln_s='cp -p'
209  else
210    as_ln_s='ln -s'
211  fi
212elif ln conf$$.file conf$$ 2>/dev/null; then
213  as_ln_s=ln
214else
215  as_ln_s='cp -p'
216fi
217rm -f conf$$ conf$$.exe conf$$.file
218
219if mkdir -p . 2>/dev/null; then
220  as_mkdir_p=:
221else
222  as_mkdir_p=false
223fi
224
225as_executable_p="test -f"
226
227# Sed expression to map a string onto a valid CPP name.
228as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
229
230# Sed expression to map a string onto a valid variable name.
231as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
232
233
234# IFS
235# We need space, tab and new line, in precisely that order.
236as_nl='
237'
238IFS=" 	$as_nl"
239
240# CDPATH.
241$as_unset CDPATH
242
243
244# Name of the host.
245# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
246# so uname gets run too.
247ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
248
249exec 6>&1
250
251#
252# Initializations.
253#
254ac_default_prefix=/usr/local
255ac_config_libobj_dir=.
256cross_compiling=no
257subdirs=
258MFLAGS=
259MAKEFLAGS=
260SHELL=${CONFIG_SHELL-/bin/sh}
261
262# Maximum number of lines to put in a shell here document.
263# This variable seems obsolete.  It should probably be removed, and
264# only ac_max_sed_lines should be used.
265: ${ac_max_here_lines=38}
266
267# Identity of this package.
268PACKAGE_NAME=
269PACKAGE_TARNAME=
270PACKAGE_VERSION=
271PACKAGE_STRING=
272PACKAGE_BUGREPORT=
273
274ac_unique_file="screen.c"
275# Factoring default headers for most tests.
276ac_includes_default="\
277#include <stdio.h>
278#if HAVE_SYS_TYPES_H
279# include <sys/types.h>
280#endif
281#if HAVE_SYS_STAT_H
282# include <sys/stat.h>
283#endif
284#if STDC_HEADERS
285# include <stdlib.h>
286# include <stddef.h>
287#else
288# if HAVE_STDLIB_H
289#  include <stdlib.h>
290# endif
291#endif
292#if HAVE_STRING_H
293# if !STDC_HEADERS && HAVE_MEMORY_H
294#  include <memory.h>
295# endif
296# include <string.h>
297#endif
298#if HAVE_STRINGS_H
299# include <strings.h>
300#endif
301#if HAVE_INTTYPES_H
302# include <inttypes.h>
303#else
304# if HAVE_STDINT_H
305#  include <stdint.h>
306# endif
307#endif
308#if HAVE_UNISTD_H
309# include <unistd.h>
310#endif"
311
312ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS VERSION ac_prefix_program CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP EGREP AWK INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA WRITEPATH XTERMPATH LIBOBJS LTLIBOBJS'
313ac_subst_files=''
314
315# Initialize some variables set by options.
316ac_init_help=
317ac_init_version=false
318# The variables have the same names as the options, with
319# dashes changed to underlines.
320cache_file=/dev/null
321exec_prefix=NONE
322no_create=
323no_recursion=
324prefix=NONE
325program_prefix=NONE
326program_suffix=NONE
327program_transform_name=s,x,x,
328silent=
329site=
330srcdir=
331verbose=
332x_includes=NONE
333x_libraries=NONE
334
335# Installation directory options.
336# These are left unexpanded so users can "make install exec_prefix=/foo"
337# and all the variables that are supposed to be based on exec_prefix
338# by default will actually change.
339# Use braces instead of parens because sh, perl, etc. also accept them.
340bindir='${exec_prefix}/bin'
341sbindir='${exec_prefix}/sbin'
342libexecdir='${exec_prefix}/libexec'
343datadir='${prefix}/share'
344sysconfdir='${prefix}/etc'
345sharedstatedir='${prefix}/com'
346localstatedir='${prefix}/var'
347libdir='${exec_prefix}/lib'
348includedir='${prefix}/include'
349oldincludedir='/usr/include'
350infodir='${prefix}/info'
351mandir='${prefix}/man'
352
353ac_prev=
354for ac_option
355do
356  # If the previous option needs an argument, assign it.
357  if test -n "$ac_prev"; then
358    eval "$ac_prev=\$ac_option"
359    ac_prev=
360    continue
361  fi
362
363  ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
364
365  # Accept the important Cygnus configure options, so we can diagnose typos.
366
367  case $ac_option in
368
369  -bindir | --bindir | --bindi | --bind | --bin | --bi)
370    ac_prev=bindir ;;
371  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
372    bindir=$ac_optarg ;;
373
374  -build | --build | --buil | --bui | --bu)
375    ac_prev=build_alias ;;
376  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
377    build_alias=$ac_optarg ;;
378
379  -cache-file | --cache-file | --cache-fil | --cache-fi \
380  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
381    ac_prev=cache_file ;;
382  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
383  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
384    cache_file=$ac_optarg ;;
385
386  --config-cache | -C)
387    cache_file=config.cache ;;
388
389  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
390    ac_prev=datadir ;;
391  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
392  | --da=*)
393    datadir=$ac_optarg ;;
394
395  -disable-* | --disable-*)
396    ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
397    # Reject names that are not valid shell variable names.
398    expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
399      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
400   { (exit 1); exit 1; }; }
401    ac_feature=`echo $ac_feature | sed 's/-/_/g'`
402    eval "enable_$ac_feature=no" ;;
403
404  -enable-* | --enable-*)
405    ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
406    # Reject names that are not valid shell variable names.
407    expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
408      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
409   { (exit 1); exit 1; }; }
410    ac_feature=`echo $ac_feature | sed 's/-/_/g'`
411    case $ac_option in
412      *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
413      *) ac_optarg=yes ;;
414    esac
415    eval "enable_$ac_feature='$ac_optarg'" ;;
416
417  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
418  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
419  | --exec | --exe | --ex)
420    ac_prev=exec_prefix ;;
421  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
422  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
423  | --exec=* | --exe=* | --ex=*)
424    exec_prefix=$ac_optarg ;;
425
426  -gas | --gas | --ga | --g)
427    # Obsolete; use --with-gas.
428    with_gas=yes ;;
429
430  -help | --help | --hel | --he | -h)
431    ac_init_help=long ;;
432  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
433    ac_init_help=recursive ;;
434  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
435    ac_init_help=short ;;
436
437  -host | --host | --hos | --ho)
438    ac_prev=host_alias ;;
439  -host=* | --host=* | --hos=* | --ho=*)
440    host_alias=$ac_optarg ;;
441
442  -includedir | --includedir | --includedi | --included | --include \
443  | --includ | --inclu | --incl | --inc)
444    ac_prev=includedir ;;
445  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
446  | --includ=* | --inclu=* | --incl=* | --inc=*)
447    includedir=$ac_optarg ;;
448
449  -infodir | --infodir | --infodi | --infod | --info | --inf)
450    ac_prev=infodir ;;
451  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
452    infodir=$ac_optarg ;;
453
454  -libdir | --libdir | --libdi | --libd)
455    ac_prev=libdir ;;
456  -libdir=* | --libdir=* | --libdi=* | --libd=*)
457    libdir=$ac_optarg ;;
458
459  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
460  | --libexe | --libex | --libe)
461    ac_prev=libexecdir ;;
462  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
463  | --libexe=* | --libex=* | --libe=*)
464    libexecdir=$ac_optarg ;;
465
466  -localstatedir | --localstatedir | --localstatedi | --localstated \
467  | --localstate | --localstat | --localsta | --localst \
468  | --locals | --local | --loca | --loc | --lo)
469    ac_prev=localstatedir ;;
470  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
471  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
472  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
473    localstatedir=$ac_optarg ;;
474
475  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
476    ac_prev=mandir ;;
477  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
478    mandir=$ac_optarg ;;
479
480  -nfp | --nfp | --nf)
481    # Obsolete; use --without-fp.
482    with_fp=no ;;
483
484  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
485  | --no-cr | --no-c | -n)
486    no_create=yes ;;
487
488  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
489  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
490    no_recursion=yes ;;
491
492  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
493  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
494  | --oldin | --oldi | --old | --ol | --o)
495    ac_prev=oldincludedir ;;
496  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
497  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
498  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
499    oldincludedir=$ac_optarg ;;
500
501  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
502    ac_prev=prefix ;;
503  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
504    prefix=$ac_optarg ;;
505
506  -program-prefix | --program-prefix | --program-prefi | --program-pref \
507  | --program-pre | --program-pr | --program-p)
508    ac_prev=program_prefix ;;
509  -program-prefix=* | --program-prefix=* | --program-prefi=* \
510  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
511    program_prefix=$ac_optarg ;;
512
513  -program-suffix | --program-suffix | --program-suffi | --program-suff \
514  | --program-suf | --program-su | --program-s)
515    ac_prev=program_suffix ;;
516  -program-suffix=* | --program-suffix=* | --program-suffi=* \
517  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
518    program_suffix=$ac_optarg ;;
519
520  -program-transform-name | --program-transform-name \
521  | --program-transform-nam | --program-transform-na \
522  | --program-transform-n | --program-transform- \
523  | --program-transform | --program-transfor \
524  | --program-transfo | --program-transf \
525  | --program-trans | --program-tran \
526  | --progr-tra | --program-tr | --program-t)
527    ac_prev=program_transform_name ;;
528  -program-transform-name=* | --program-transform-name=* \
529  | --program-transform-nam=* | --program-transform-na=* \
530  | --program-transform-n=* | --program-transform-=* \
531  | --program-transform=* | --program-transfor=* \
532  | --program-transfo=* | --program-transf=* \
533  | --program-trans=* | --program-tran=* \
534  | --progr-tra=* | --program-tr=* | --program-t=*)
535    program_transform_name=$ac_optarg ;;
536
537  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
538  | -silent | --silent | --silen | --sile | --sil)
539    silent=yes ;;
540
541  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
542    ac_prev=sbindir ;;
543  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
544  | --sbi=* | --sb=*)
545    sbindir=$ac_optarg ;;
546
547  -sharedstatedir | --sharedstatedir | --sharedstatedi \
548  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
549  | --sharedst | --shareds | --shared | --share | --shar \
550  | --sha | --sh)
551    ac_prev=sharedstatedir ;;
552  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
553  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
554  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
555  | --sha=* | --sh=*)
556    sharedstatedir=$ac_optarg ;;
557
558  -site | --site | --sit)
559    ac_prev=site ;;
560  -site=* | --site=* | --sit=*)
561    site=$ac_optarg ;;
562
563  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
564    ac_prev=srcdir ;;
565  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
566    srcdir=$ac_optarg ;;
567
568  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
569  | --syscon | --sysco | --sysc | --sys | --sy)
570    ac_prev=sysconfdir ;;
571  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
572  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
573    sysconfdir=$ac_optarg ;;
574
575  -target | --target | --targe | --targ | --tar | --ta | --t)
576    ac_prev=target_alias ;;
577  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
578    target_alias=$ac_optarg ;;
579
580  -v | -verbose | --verbose | --verbos | --verbo | --verb)
581    verbose=yes ;;
582
583  -version | --version | --versio | --versi | --vers | -V)
584    ac_init_version=: ;;
585
586  -with-* | --with-*)
587    ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
588    # Reject names that are not valid shell variable names.
589    expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
590      { echo "$as_me: error: invalid package name: $ac_package" >&2
591   { (exit 1); exit 1; }; }
592    ac_package=`echo $ac_package| sed 's/-/_/g'`
593    case $ac_option in
594      *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
595      *) ac_optarg=yes ;;
596    esac
597    eval "with_$ac_package='$ac_optarg'" ;;
598
599  -without-* | --without-*)
600    ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
601    # Reject names that are not valid shell variable names.
602    expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
603      { echo "$as_me: error: invalid package name: $ac_package" >&2
604   { (exit 1); exit 1; }; }
605    ac_package=`echo $ac_package | sed 's/-/_/g'`
606    eval "with_$ac_package=no" ;;
607
608  --x)
609    # Obsolete; use --with-x.
610    with_x=yes ;;
611
612  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
613  | --x-incl | --x-inc | --x-in | --x-i)
614    ac_prev=x_includes ;;
615  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
616  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
617    x_includes=$ac_optarg ;;
618
619  -x-libraries | --x-libraries | --x-librarie | --x-librari \
620  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
621    ac_prev=x_libraries ;;
622  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
623  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
624    x_libraries=$ac_optarg ;;
625
626  -*) { echo "$as_me: error: unrecognized option: $ac_option
627Try \`$0 --help' for more information." >&2
628   { (exit 1); exit 1; }; }
629    ;;
630
631  *=*)
632    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
633    # Reject names that are not valid shell variable names.
634    expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
635      { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
636   { (exit 1); exit 1; }; }
637    ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
638    eval "$ac_envvar='$ac_optarg'"
639    export $ac_envvar ;;
640
641  *)
642    # FIXME: should be removed in autoconf 3.0.
643    echo "$as_me: WARNING: you should use --build, --host, --target" >&2
644    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
645      echo "$as_me: WARNING: invalid host type: $ac_option" >&2
646    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
647    ;;
648
649  esac
650done
651
652if test -n "$ac_prev"; then
653  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
654  { echo "$as_me: error: missing argument to $ac_option" >&2
655   { (exit 1); exit 1; }; }
656fi
657
658# Be sure to have absolute paths.
659for ac_var in exec_prefix prefix
660do
661  eval ac_val=$`echo $ac_var`
662  case $ac_val in
663    [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
664    *)  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
665   { (exit 1); exit 1; }; };;
666  esac
667done
668
669# Be sure to have absolute paths.
670for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
671              localstatedir libdir includedir oldincludedir infodir mandir
672do
673  eval ac_val=$`echo $ac_var`
674  case $ac_val in
675    [\\/$]* | ?:[\\/]* ) ;;
676    *)  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
677   { (exit 1); exit 1; }; };;
678  esac
679done
680
681# There might be people who depend on the old broken behavior: `$host'
682# used to hold the argument of --host etc.
683# FIXME: To remove some day.
684build=$build_alias
685host=$host_alias
686target=$target_alias
687
688# FIXME: To remove some day.
689if test "x$host_alias" != x; then
690  if test "x$build_alias" = x; then
691    cross_compiling=maybe
692    echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
693    If a cross compiler is detected then cross compile mode will be used." >&2
694  elif test "x$build_alias" != "x$host_alias"; then
695    cross_compiling=yes
696  fi
697fi
698
699ac_tool_prefix=
700test -n "$host_alias" && ac_tool_prefix=$host_alias-
701
702test "$silent" = yes && exec 6>/dev/null
703
704
705# Find the source files, if location was not specified.
706if test -z "$srcdir"; then
707  ac_srcdir_defaulted=yes
708  # Try the directory containing this script, then its parent.
709  ac_confdir=`(dirname "$0") 2>/dev/null ||
710$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
711         X"$0" : 'X\(//\)[^/]' \| \
712         X"$0" : 'X\(//\)$' \| \
713         X"$0" : 'X\(/\)' \| \
714         .     : '\(.\)' 2>/dev/null ||
715echo X"$0" |
716    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
717  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
718  	  /^X\(\/\/\)$/{ s//\1/; q; }
719  	  /^X\(\/\).*/{ s//\1/; q; }
720  	  s/.*/./; q'`
721  srcdir=$ac_confdir
722  if test ! -r $srcdir/$ac_unique_file; then
723    srcdir=..
724  fi
725else
726  ac_srcdir_defaulted=no
727fi
728if test ! -r $srcdir/$ac_unique_file; then
729  if test "$ac_srcdir_defaulted" = yes; then
730    { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
731   { (exit 1); exit 1; }; }
732  else
733    { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
734   { (exit 1); exit 1; }; }
735  fi
736fi
737(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
738  { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
739   { (exit 1); exit 1; }; }
740srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
741ac_env_build_alias_set=${build_alias+set}
742ac_env_build_alias_value=$build_alias
743ac_cv_env_build_alias_set=${build_alias+set}
744ac_cv_env_build_alias_value=$build_alias
745ac_env_host_alias_set=${host_alias+set}
746ac_env_host_alias_value=$host_alias
747ac_cv_env_host_alias_set=${host_alias+set}
748ac_cv_env_host_alias_value=$host_alias
749ac_env_target_alias_set=${target_alias+set}
750ac_env_target_alias_value=$target_alias
751ac_cv_env_target_alias_set=${target_alias+set}
752ac_cv_env_target_alias_value=$target_alias
753ac_env_CC_set=${CC+set}
754ac_env_CC_value=$CC
755ac_cv_env_CC_set=${CC+set}
756ac_cv_env_CC_value=$CC
757ac_env_CFLAGS_set=${CFLAGS+set}
758ac_env_CFLAGS_value=$CFLAGS
759ac_cv_env_CFLAGS_set=${CFLAGS+set}
760ac_cv_env_CFLAGS_value=$CFLAGS
761ac_env_LDFLAGS_set=${LDFLAGS+set}
762ac_env_LDFLAGS_value=$LDFLAGS
763ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
764ac_cv_env_LDFLAGS_value=$LDFLAGS
765ac_env_CPPFLAGS_set=${CPPFLAGS+set}
766ac_env_CPPFLAGS_value=$CPPFLAGS
767ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
768ac_cv_env_CPPFLAGS_value=$CPPFLAGS
769ac_env_CPP_set=${CPP+set}
770ac_env_CPP_value=$CPP
771ac_cv_env_CPP_set=${CPP+set}
772ac_cv_env_CPP_value=$CPP
773
774#
775# Report the --help message.
776#
777if test "$ac_init_help" = "long"; then
778  # Omit some internal or obsolete options to make the list less imposing.
779  # This message is too long to be a string in the A/UX 3.1 sh.
780  cat <<_ACEOF
781\`configure' configures this package to adapt to many kinds of systems.
782
783Usage: $0 [OPTION]... [VAR=VALUE]...
784
785To assign environment variables (e.g., CC, CFLAGS...), specify them as
786VAR=VALUE.  See below for descriptions of some of the useful variables.
787
788Defaults for the options are specified in brackets.
789
790Configuration:
791  -h, --help              display this help and exit
792      --help=short        display options specific to this package
793      --help=recursive    display the short help of all the included packages
794  -V, --version           display version information and exit
795  -q, --quiet, --silent   do not print \`checking...' messages
796      --cache-file=FILE   cache test results in FILE [disabled]
797  -C, --config-cache      alias for \`--cache-file=config.cache'
798  -n, --no-create         do not create output files
799      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
800
801_ACEOF
802
803  cat <<_ACEOF
804Installation directories:
805  --prefix=PREFIX         install architecture-independent files in PREFIX
806                          [$ac_default_prefix]
807  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
808                          [PREFIX]
809
810By default, \`make install' will install all the files in
811\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
812an installation prefix other than \`$ac_default_prefix' using \`--prefix',
813for instance \`--prefix=\$HOME'.
814
815For better control, use the options below.
816
817Fine tuning of the installation directories:
818  --bindir=DIR           user executables [EPREFIX/bin]
819  --sbindir=DIR          system admin executables [EPREFIX/sbin]
820  --libexecdir=DIR       program executables [EPREFIX/libexec]
821  --datadir=DIR          read-only architecture-independent data [PREFIX/share]
822  --sysconfdir=DIR       read-only single-machine data [PREFIX/etc]
823  --sharedstatedir=DIR   modifiable architecture-independent data [PREFIX/com]
824  --localstatedir=DIR    modifiable single-machine data [PREFIX/var]
825  --libdir=DIR           object code libraries [EPREFIX/lib]
826  --includedir=DIR       C header files [PREFIX/include]
827  --oldincludedir=DIR    C header files for non-gcc [/usr/include]
828  --infodir=DIR          info documentation [PREFIX/info]
829  --mandir=DIR           man documentation [PREFIX/man]
830_ACEOF
831
832  cat <<\_ACEOF
833_ACEOF
834fi
835
836if test -n "$ac_init_help"; then
837
838  cat <<\_ACEOF
839
840Optional Features:
841  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
842  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
843  --disable-socket-dir    disable system wide socket-dir and use ~/.screen instead
844  --enable-pam            enable PAM support
845  --enable-locale         use localized month/day names
846  --enable-telnet         enable builtin telnet
847  --enable-colors256      enable support for 256 colors
848  --enable-rxvt_osc       enable support for rxvt OSC codes
849
850Optional Packages:
851  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
852  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
853  --with-socket-dir=path  where to put the per-user sockets
854  --with-pty-mode=mode    default mode for ptys
855  --with-pty-group=group  default group for ptys
856  --with-sys-screenrc=path  where to put the global screenrc file
857
858Some influential environment variables:
859  CC          C compiler command
860  CFLAGS      C compiler flags
861  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
862              nonstandard directory <lib dir>
863  CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
864              headers in a nonstandard directory <include dir>
865  CPP         C preprocessor
866
867Use these variables to override the choices made by `configure' or to help
868it to find libraries and programs with nonstandard names/locations.
869
870_ACEOF
871fi
872
873if test "$ac_init_help" = "recursive"; then
874  # If there are subdirs, report their specific --help.
875  ac_popdir=`pwd`
876  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
877    test -d $ac_dir || continue
878    ac_builddir=.
879
880if test "$ac_dir" != .; then
881  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
882  # A "../" for each directory in $ac_dir_suffix.
883  ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
884else
885  ac_dir_suffix= ac_top_builddir=
886fi
887
888case $srcdir in
889  .)  # No --srcdir option.  We are building in place.
890    ac_srcdir=.
891    if test -z "$ac_top_builddir"; then
892       ac_top_srcdir=.
893    else
894       ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
895    fi ;;
896  [\\/]* | ?:[\\/]* )  # Absolute path.
897    ac_srcdir=$srcdir$ac_dir_suffix;
898    ac_top_srcdir=$srcdir ;;
899  *) # Relative path.
900    ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
901    ac_top_srcdir=$ac_top_builddir$srcdir ;;
902esac
903# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
904# absolute.
905ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
906ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
907ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
908ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
909
910    cd $ac_dir
911    # Check for guested configure; otherwise get Cygnus style configure.
912    if test -f $ac_srcdir/configure.gnu; then
913      echo
914      $SHELL $ac_srcdir/configure.gnu  --help=recursive
915    elif test -f $ac_srcdir/configure; then
916      echo
917      $SHELL $ac_srcdir/configure  --help=recursive
918    elif test -f $ac_srcdir/configure.ac ||
919           test -f $ac_srcdir/configure.in; then
920      echo
921      $ac_configure --help
922    else
923      echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
924    fi
925    cd $ac_popdir
926  done
927fi
928
929test -n "$ac_init_help" && exit 0
930if $ac_init_version; then
931  cat <<\_ACEOF
932
933Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
934Free Software Foundation, Inc.
935This configure script is free software; the Free Software Foundation
936gives unlimited permission to copy, distribute and modify it.
937_ACEOF
938  exit 0
939fi
940exec 5>config.log
941cat >&5 <<_ACEOF
942This file contains any messages produced by compilers while
943running configure, to aid debugging if configure makes a mistake.
944
945It was created by $as_me, which was
946generated by GNU Autoconf 2.57.  Invocation command line was
947
948  $ $0 $@
949
950_ACEOF
951{
952cat <<_ASUNAME
953## --------- ##
954## Platform. ##
955## --------- ##
956
957hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
958uname -m = `(uname -m) 2>/dev/null || echo unknown`
959uname -r = `(uname -r) 2>/dev/null || echo unknown`
960uname -s = `(uname -s) 2>/dev/null || echo unknown`
961uname -v = `(uname -v) 2>/dev/null || echo unknown`
962
963/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
964/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
965
966/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
967/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
968/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
969hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
970/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
971/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
972/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
973
974_ASUNAME
975
976as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
977for as_dir in $PATH
978do
979  IFS=$as_save_IFS
980  test -z "$as_dir" && as_dir=.
981  echo "PATH: $as_dir"
982done
983
984} >&5
985
986cat >&5 <<_ACEOF
987
988
989## ----------- ##
990## Core tests. ##
991## ----------- ##
992
993_ACEOF
994
995
996# Keep a trace of the command line.
997# Strip out --no-create and --no-recursion so they do not pile up.
998# Strip out --silent because we don't want to record it for future runs.
999# Also quote any args containing shell meta-characters.
1000# Make two passes to allow for proper duplicate-argument suppression.
1001ac_configure_args=
1002ac_configure_args0=
1003ac_configure_args1=
1004ac_sep=
1005ac_must_keep_next=false
1006for ac_pass in 1 2
1007do
1008  for ac_arg
1009  do
1010    case $ac_arg in
1011    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1012    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1013    | -silent | --silent | --silen | --sile | --sil)
1014      continue ;;
1015    *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1016      ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1017    esac
1018    case $ac_pass in
1019    1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1020    2)
1021      ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1022      if test $ac_must_keep_next = true; then
1023        ac_must_keep_next=false # Got value, back to normal.
1024      else
1025        case $ac_arg in
1026          *=* | --config-cache | -C | -disable-* | --disable-* \
1027          | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1028          | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1029          | -with-* | --with-* | -without-* | --without-* | --x)
1030            case "$ac_configure_args0 " in
1031              "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1032            esac
1033            ;;
1034          -* ) ac_must_keep_next=true ;;
1035        esac
1036      fi
1037      ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1038      # Get rid of the leading space.
1039      ac_sep=" "
1040      ;;
1041    esac
1042  done
1043done
1044$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1045$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
1046
1047# When interrupted or exit'd, cleanup temporary files, and complete
1048# config.log.  We remove comments because anyway the quotes in there
1049# would cause problems or look ugly.
1050# WARNING: Be sure not to use single quotes in there, as some shells,
1051# such as our DU 5.0 friend, will then `close' the trap.
1052trap 'exit_status=$?
1053  # Save into config.log some information that might help in debugging.
1054  {
1055    echo
1056
1057    cat <<\_ASBOX
1058## ---------------- ##
1059## Cache variables. ##
1060## ---------------- ##
1061_ASBOX
1062    echo
1063    # The following way of writing the cache mishandles newlines in values,
1064{
1065  (set) 2>&1 |
1066    case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1067    *ac_space=\ *)
1068      sed -n \
1069        "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1070    	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1071      ;;
1072    *)
1073      sed -n \
1074        "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1075      ;;
1076    esac;
1077}
1078    echo
1079
1080    cat <<\_ASBOX
1081## ----------------- ##
1082## Output variables. ##
1083## ----------------- ##
1084_ASBOX
1085    echo
1086    for ac_var in $ac_subst_vars
1087    do
1088      eval ac_val=$`echo $ac_var`
1089      echo "$ac_var='"'"'$ac_val'"'"'"
1090    done | sort
1091    echo
1092
1093    if test -n "$ac_subst_files"; then
1094      cat <<\_ASBOX
1095## ------------- ##
1096## Output files. ##
1097## ------------- ##
1098_ASBOX
1099      echo
1100      for ac_var in $ac_subst_files
1101      do
1102	eval ac_val=$`echo $ac_var`
1103        echo "$ac_var='"'"'$ac_val'"'"'"
1104      done | sort
1105      echo
1106    fi
1107
1108    if test -s confdefs.h; then
1109      cat <<\_ASBOX
1110## ----------- ##
1111## confdefs.h. ##
1112## ----------- ##
1113_ASBOX
1114      echo
1115      sed "/^$/d" confdefs.h | sort
1116      echo
1117    fi
1118    test "$ac_signal" != 0 &&
1119      echo "$as_me: caught signal $ac_signal"
1120    echo "$as_me: exit $exit_status"
1121  } >&5
1122  rm -f core core.* *.core &&
1123  rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
1124    exit $exit_status
1125     ' 0
1126for ac_signal in 1 2 13 15; do
1127  trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1128done
1129ac_signal=0
1130
1131# confdefs.h avoids OS command line length limits that DEFS can exceed.
1132rm -rf conftest* confdefs.h
1133# AIX cpp loses on an empty file, so make sure it contains at least a newline.
1134echo >confdefs.h
1135
1136# Predefined preprocessor variables.
1137
1138cat >>confdefs.h <<_ACEOF
1139#define PACKAGE_NAME "$PACKAGE_NAME"
1140_ACEOF
1141
1142
1143cat >>confdefs.h <<_ACEOF
1144#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1145_ACEOF
1146
1147
1148cat >>confdefs.h <<_ACEOF
1149#define PACKAGE_VERSION "$PACKAGE_VERSION"
1150_ACEOF
1151
1152
1153cat >>confdefs.h <<_ACEOF
1154#define PACKAGE_STRING "$PACKAGE_STRING"
1155_ACEOF
1156
1157
1158cat >>confdefs.h <<_ACEOF
1159#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1160_ACEOF
1161
1162
1163# Let the site file select an alternate cache file if it wants to.
1164# Prefer explicitly selected file to automatically selected ones.
1165if test -z "$CONFIG_SITE"; then
1166  if test "x$prefix" != xNONE; then
1167    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1168  else
1169    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1170  fi
1171fi
1172for ac_site_file in $CONFIG_SITE; do
1173  if test -r "$ac_site_file"; then
1174    { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1175echo "$as_me: loading site script $ac_site_file" >&6;}
1176    sed 's/^/| /' "$ac_site_file" >&5
1177    . "$ac_site_file"
1178  fi
1179done
1180
1181if test -r "$cache_file"; then
1182  # Some versions of bash will fail to source /dev/null (special
1183  # files actually), so we avoid doing that.
1184  if test -f "$cache_file"; then
1185    { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1186echo "$as_me: loading cache $cache_file" >&6;}
1187    case $cache_file in
1188      [\\/]* | ?:[\\/]* ) . $cache_file;;
1189      *)                      . ./$cache_file;;
1190    esac
1191  fi
1192else
1193  { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1194echo "$as_me: creating cache $cache_file" >&6;}
1195  >$cache_file
1196fi
1197
1198# Check that the precious variables saved in the cache have kept the same
1199# value.
1200ac_cache_corrupted=false
1201for ac_var in `(set) 2>&1 |
1202               sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1203  eval ac_old_set=\$ac_cv_env_${ac_var}_set
1204  eval ac_new_set=\$ac_env_${ac_var}_set
1205  eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1206  eval ac_new_val="\$ac_env_${ac_var}_value"
1207  case $ac_old_set,$ac_new_set in
1208    set,)
1209      { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1210echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1211      ac_cache_corrupted=: ;;
1212    ,set)
1213      { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1214echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1215      ac_cache_corrupted=: ;;
1216    ,);;
1217    *)
1218      if test "x$ac_old_val" != "x$ac_new_val"; then
1219        { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1220echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1221        { echo "$as_me:$LINENO:   former value:  $ac_old_val" >&5
1222echo "$as_me:   former value:  $ac_old_val" >&2;}
1223        { echo "$as_me:$LINENO:   current value: $ac_new_val" >&5
1224echo "$as_me:   current value: $ac_new_val" >&2;}
1225        ac_cache_corrupted=:
1226      fi;;
1227  esac
1228  # Pass precious variables to config.status.
1229  if test "$ac_new_set" = set; then
1230    case $ac_new_val in
1231    *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1232      ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1233    *) ac_arg=$ac_var=$ac_new_val ;;
1234    esac
1235    case " $ac_configure_args " in
1236      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
1237      *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1238    esac
1239  fi
1240done
1241if $ac_cache_corrupted; then
1242  { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1243echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1244  { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1245echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1246   { (exit 1); exit 1; }; }
1247fi
1248
1249ac_ext=c
1250ac_cpp='$CPP $CPPFLAGS'
1251ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1252ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1253ac_compiler_gnu=$ac_cv_c_compiler_gnu
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273          ac_config_headers="$ac_config_headers config.h"
1274
1275
1276
1277rev=`sed < ${srcdir}/patchlevel.h -n -e '/#define REV/s/#define REV  *//p'`
1278vers=`sed < ${srcdir}/patchlevel.h -n -e '/#define VERS/s/#define VERS  *//p'`
1279pat=`sed < ${srcdir}/patchlevel.h -n -e '/#define PATCHLEVEL/s/#define PATCHLEVEL  *//p'`
1280VERSION="$rev.$vers.$pat"
1281echo "this is screen version $VERSION" 1>&6
1282
1283
1284if test "x$prefix" = xNONE; then
1285  echo $ECHO_N "checking for prefix by $ECHO_C" >&6
1286  # Extract the first word of "screen", so it can be a program name with args.
1287set dummy screen; ac_word=$2
1288echo "$as_me:$LINENO: checking for $ac_word" >&5
1289echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1290if test "${ac_cv_path_ac_prefix_program+set}" = set; then
1291  echo $ECHO_N "(cached) $ECHO_C" >&6
1292else
1293  case $ac_prefix_program in
1294  [\\/]* | ?:[\\/]*)
1295  ac_cv_path_ac_prefix_program="$ac_prefix_program" # Let the user override the test with a path.
1296  ;;
1297  *)
1298  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1299for as_dir in $PATH
1300do
1301  IFS=$as_save_IFS
1302  test -z "$as_dir" && as_dir=.
1303  for ac_exec_ext in '' $ac_executable_extensions; do
1304  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1305    ac_cv_path_ac_prefix_program="$as_dir/$ac_word$ac_exec_ext"
1306    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1307    break 2
1308  fi
1309done
1310done
1311
1312  ;;
1313esac
1314fi
1315ac_prefix_program=$ac_cv_path_ac_prefix_program
1316
1317if test -n "$ac_prefix_program"; then
1318  echo "$as_me:$LINENO: result: $ac_prefix_program" >&5
1319echo "${ECHO_T}$ac_prefix_program" >&6
1320else
1321  echo "$as_me:$LINENO: result: no" >&5
1322echo "${ECHO_T}no" >&6
1323fi
1324
1325  if test -n $ac_prefix_program; then
1326    prefix=`(dirname "$ac_prefix_program") 2>/dev/null ||
1327$as_expr X"$ac_prefix_program" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1328         X"$ac_prefix_program" : 'X\(//\)[^/]' \| \
1329         X"$ac_prefix_program" : 'X\(//\)$' \| \
1330         X"$ac_prefix_program" : 'X\(/\)' \| \
1331         .     : '\(.\)' 2>/dev/null ||
1332echo X"$ac_prefix_program" |
1333    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
1334  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
1335  	  /^X\(\/\/\)$/{ s//\1/; q; }
1336  	  /^X\(\/\).*/{ s//\1/; q; }
1337  	  s/.*/./; q'`
1338    prefix=`(dirname "$prefix") 2>/dev/null ||
1339$as_expr X"$prefix" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1340         X"$prefix" : 'X\(//\)[^/]' \| \
1341         X"$prefix" : 'X\(//\)$' \| \
1342         X"$prefix" : 'X\(/\)' \| \
1343         .     : '\(.\)' 2>/dev/null ||
1344echo X"$prefix" |
1345    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
1346  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
1347  	  /^X\(\/\/\)$/{ s//\1/; q; }
1348  	  /^X\(\/\).*/{ s//\1/; q; }
1349  	  s/.*/./; q'`
1350  fi
1351fi
1352
1353if test "x$prefix" = xNONE; then
1354  echo $ECHO_N "checking for prefix by $ECHO_C" >&6
1355  # Extract the first word of "gzip", so it can be a program name with args.
1356set dummy gzip; ac_word=$2
1357echo "$as_me:$LINENO: checking for $ac_word" >&5
1358echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1359if test "${ac_cv_path_ac_prefix_program+set}" = set; then
1360  echo $ECHO_N "(cached) $ECHO_C" >&6
1361else
1362  case $ac_prefix_program in
1363  [\\/]* | ?:[\\/]*)
1364  ac_cv_path_ac_prefix_program="$ac_prefix_program" # Let the user override the test with a path.
1365  ;;
1366  *)
1367  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1368for as_dir in $PATH
1369do
1370  IFS=$as_save_IFS
1371  test -z "$as_dir" && as_dir=.
1372  for ac_exec_ext in '' $ac_executable_extensions; do
1373  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1374    ac_cv_path_ac_prefix_program="$as_dir/$ac_word$ac_exec_ext"
1375    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1376    break 2
1377  fi
1378done
1379done
1380
1381  ;;
1382esac
1383fi
1384ac_prefix_program=$ac_cv_path_ac_prefix_program
1385
1386if test -n "$ac_prefix_program"; then
1387  echo "$as_me:$LINENO: result: $ac_prefix_program" >&5
1388echo "${ECHO_T}$ac_prefix_program" >&6
1389else
1390  echo "$as_me:$LINENO: result: no" >&5
1391echo "${ECHO_T}no" >&6
1392fi
1393
1394  if test -n $ac_prefix_program; then
1395    prefix=`(dirname "$ac_prefix_program") 2>/dev/null ||
1396$as_expr X"$ac_prefix_program" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1397         X"$ac_prefix_program" : 'X\(//\)[^/]' \| \
1398         X"$ac_prefix_program" : 'X\(//\)$' \| \
1399         X"$ac_prefix_program" : 'X\(/\)' \| \
1400         .     : '\(.\)' 2>/dev/null ||
1401echo X"$ac_prefix_program" |
1402    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
1403  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
1404  	  /^X\(\/\/\)$/{ s//\1/; q; }
1405  	  /^X\(\/\).*/{ s//\1/; q; }
1406  	  s/.*/./; q'`
1407    prefix=`(dirname "$prefix") 2>/dev/null ||
1408$as_expr X"$prefix" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1409         X"$prefix" : 'X\(//\)[^/]' \| \
1410         X"$prefix" : 'X\(//\)$' \| \
1411         X"$prefix" : 'X\(/\)' \| \
1412         .     : '\(.\)' 2>/dev/null ||
1413echo X"$prefix" |
1414    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
1415  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
1416  	  /^X\(\/\/\)$/{ s//\1/; q; }
1417  	  /^X\(\/\).*/{ s//\1/; q; }
1418  	  s/.*/./; q'`
1419  fi
1420fi
1421
1422
1423old_CFLAGS="$CFLAGS"
1424ac_ext=c
1425ac_cpp='$CPP $CPPFLAGS'
1426ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1427ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1428ac_compiler_gnu=$ac_cv_c_compiler_gnu
1429if test -n "$ac_tool_prefix"; then
1430  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1431set dummy ${ac_tool_prefix}gcc; ac_word=$2
1432echo "$as_me:$LINENO: checking for $ac_word" >&5
1433echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1434if test "${ac_cv_prog_CC+set}" = set; then
1435  echo $ECHO_N "(cached) $ECHO_C" >&6
1436else
1437  if test -n "$CC"; then
1438  ac_cv_prog_CC="$CC" # Let the user override the test.
1439else
1440as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1441for as_dir in $PATH
1442do
1443  IFS=$as_save_IFS
1444  test -z "$as_dir" && as_dir=.
1445  for ac_exec_ext in '' $ac_executable_extensions; do
1446  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1447    ac_cv_prog_CC="${ac_tool_prefix}gcc"
1448    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1449    break 2
1450  fi
1451done
1452done
1453
1454fi
1455fi
1456CC=$ac_cv_prog_CC
1457if test -n "$CC"; then
1458  echo "$as_me:$LINENO: result: $CC" >&5
1459echo "${ECHO_T}$CC" >&6
1460else
1461  echo "$as_me:$LINENO: result: no" >&5
1462echo "${ECHO_T}no" >&6
1463fi
1464
1465fi
1466if test -z "$ac_cv_prog_CC"; then
1467  ac_ct_CC=$CC
1468  # Extract the first word of "gcc", so it can be a program name with args.
1469set dummy gcc; ac_word=$2
1470echo "$as_me:$LINENO: checking for $ac_word" >&5
1471echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1472if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1473  echo $ECHO_N "(cached) $ECHO_C" >&6
1474else
1475  if test -n "$ac_ct_CC"; then
1476  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1477else
1478as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1479for as_dir in $PATH
1480do
1481  IFS=$as_save_IFS
1482  test -z "$as_dir" && as_dir=.
1483  for ac_exec_ext in '' $ac_executable_extensions; do
1484  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1485    ac_cv_prog_ac_ct_CC="gcc"
1486    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1487    break 2
1488  fi
1489done
1490done
1491
1492fi
1493fi
1494ac_ct_CC=$ac_cv_prog_ac_ct_CC
1495if test -n "$ac_ct_CC"; then
1496  echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1497echo "${ECHO_T}$ac_ct_CC" >&6
1498else
1499  echo "$as_me:$LINENO: result: no" >&5
1500echo "${ECHO_T}no" >&6
1501fi
1502
1503  CC=$ac_ct_CC
1504else
1505  CC="$ac_cv_prog_CC"
1506fi
1507
1508if test -z "$CC"; then
1509  if test -n "$ac_tool_prefix"; then
1510  # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1511set dummy ${ac_tool_prefix}cc; ac_word=$2
1512echo "$as_me:$LINENO: checking for $ac_word" >&5
1513echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1514if test "${ac_cv_prog_CC+set}" = set; then
1515  echo $ECHO_N "(cached) $ECHO_C" >&6
1516else
1517  if test -n "$CC"; then
1518  ac_cv_prog_CC="$CC" # Let the user override the test.
1519else
1520as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1521for as_dir in $PATH
1522do
1523  IFS=$as_save_IFS
1524  test -z "$as_dir" && as_dir=.
1525  for ac_exec_ext in '' $ac_executable_extensions; do
1526  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1527    ac_cv_prog_CC="${ac_tool_prefix}cc"
1528    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1529    break 2
1530  fi
1531done
1532done
1533
1534fi
1535fi
1536CC=$ac_cv_prog_CC
1537if test -n "$CC"; then
1538  echo "$as_me:$LINENO: result: $CC" >&5
1539echo "${ECHO_T}$CC" >&6
1540else
1541  echo "$as_me:$LINENO: result: no" >&5
1542echo "${ECHO_T}no" >&6
1543fi
1544
1545fi
1546if test -z "$ac_cv_prog_CC"; then
1547  ac_ct_CC=$CC
1548  # Extract the first word of "cc", so it can be a program name with args.
1549set dummy cc; ac_word=$2
1550echo "$as_me:$LINENO: checking for $ac_word" >&5
1551echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1552if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1553  echo $ECHO_N "(cached) $ECHO_C" >&6
1554else
1555  if test -n "$ac_ct_CC"; then
1556  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1557else
1558as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1559for as_dir in $PATH
1560do
1561  IFS=$as_save_IFS
1562  test -z "$as_dir" && as_dir=.
1563  for ac_exec_ext in '' $ac_executable_extensions; do
1564  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1565    ac_cv_prog_ac_ct_CC="cc"
1566    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1567    break 2
1568  fi
1569done
1570done
1571
1572fi
1573fi
1574ac_ct_CC=$ac_cv_prog_ac_ct_CC
1575if test -n "$ac_ct_CC"; then
1576  echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1577echo "${ECHO_T}$ac_ct_CC" >&6
1578else
1579  echo "$as_me:$LINENO: result: no" >&5
1580echo "${ECHO_T}no" >&6
1581fi
1582
1583  CC=$ac_ct_CC
1584else
1585  CC="$ac_cv_prog_CC"
1586fi
1587
1588fi
1589if test -z "$CC"; then
1590  # Extract the first word of "cc", so it can be a program name with args.
1591set dummy cc; ac_word=$2
1592echo "$as_me:$LINENO: checking for $ac_word" >&5
1593echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1594if test "${ac_cv_prog_CC+set}" = set; then
1595  echo $ECHO_N "(cached) $ECHO_C" >&6
1596else
1597  if test -n "$CC"; then
1598  ac_cv_prog_CC="$CC" # Let the user override the test.
1599else
1600  ac_prog_rejected=no
1601as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1602for as_dir in $PATH
1603do
1604  IFS=$as_save_IFS
1605  test -z "$as_dir" && as_dir=.
1606  for ac_exec_ext in '' $ac_executable_extensions; do
1607  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1608    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
1609       ac_prog_rejected=yes
1610       continue
1611     fi
1612    ac_cv_prog_CC="cc"
1613    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1614    break 2
1615  fi
1616done
1617done
1618
1619if test $ac_prog_rejected = yes; then
1620  # We found a bogon in the path, so make sure we never use it.
1621  set dummy $ac_cv_prog_CC
1622  shift
1623  if test $# != 0; then
1624    # We chose a different compiler from the bogus one.
1625    # However, it has the same basename, so the bogon will be chosen
1626    # first if we set CC to just the basename; use the full file name.
1627    shift
1628    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
1629  fi
1630fi
1631fi
1632fi
1633CC=$ac_cv_prog_CC
1634if test -n "$CC"; then
1635  echo "$as_me:$LINENO: result: $CC" >&5
1636echo "${ECHO_T}$CC" >&6
1637else
1638  echo "$as_me:$LINENO: result: no" >&5
1639echo "${ECHO_T}no" >&6
1640fi
1641
1642fi
1643if test -z "$CC"; then
1644  if test -n "$ac_tool_prefix"; then
1645  for ac_prog in cl
1646  do
1647    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1648set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1649echo "$as_me:$LINENO: checking for $ac_word" >&5
1650echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1651if test "${ac_cv_prog_CC+set}" = set; then
1652  echo $ECHO_N "(cached) $ECHO_C" >&6
1653else
1654  if test -n "$CC"; then
1655  ac_cv_prog_CC="$CC" # Let the user override the test.
1656else
1657as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1658for as_dir in $PATH
1659do
1660  IFS=$as_save_IFS
1661  test -z "$as_dir" && as_dir=.
1662  for ac_exec_ext in '' $ac_executable_extensions; do
1663  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1664    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1665    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1666    break 2
1667  fi
1668done
1669done
1670
1671fi
1672fi
1673CC=$ac_cv_prog_CC
1674if test -n "$CC"; then
1675  echo "$as_me:$LINENO: result: $CC" >&5
1676echo "${ECHO_T}$CC" >&6
1677else
1678  echo "$as_me:$LINENO: result: no" >&5
1679echo "${ECHO_T}no" >&6
1680fi
1681
1682    test -n "$CC" && break
1683  done
1684fi
1685if test -z "$CC"; then
1686  ac_ct_CC=$CC
1687  for ac_prog in cl
1688do
1689  # Extract the first word of "$ac_prog", so it can be a program name with args.
1690set dummy $ac_prog; ac_word=$2
1691echo "$as_me:$LINENO: checking for $ac_word" >&5
1692echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1693if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1694  echo $ECHO_N "(cached) $ECHO_C" >&6
1695else
1696  if test -n "$ac_ct_CC"; then
1697  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1698else
1699as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1700for as_dir in $PATH
1701do
1702  IFS=$as_save_IFS
1703  test -z "$as_dir" && as_dir=.
1704  for ac_exec_ext in '' $ac_executable_extensions; do
1705  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1706    ac_cv_prog_ac_ct_CC="$ac_prog"
1707    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1708    break 2
1709  fi
1710done
1711done
1712
1713fi
1714fi
1715ac_ct_CC=$ac_cv_prog_ac_ct_CC
1716if test -n "$ac_ct_CC"; then
1717  echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1718echo "${ECHO_T}$ac_ct_CC" >&6
1719else
1720  echo "$as_me:$LINENO: result: no" >&5
1721echo "${ECHO_T}no" >&6
1722fi
1723
1724  test -n "$ac_ct_CC" && break
1725done
1726
1727  CC=$ac_ct_CC
1728fi
1729
1730fi
1731
1732
1733test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
1734See \`config.log' for more details." >&5
1735echo "$as_me: error: no acceptable C compiler found in \$PATH
1736See \`config.log' for more details." >&2;}
1737   { (exit 1); exit 1; }; }
1738
1739# Provide some information about the compiler.
1740echo "$as_me:$LINENO:" \
1741     "checking for C compiler version" >&5
1742ac_compiler=`set X $ac_compile; echo $2`
1743{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
1744  (eval $ac_compiler --version </dev/null >&5) 2>&5
1745  ac_status=$?
1746  echo "$as_me:$LINENO: \$? = $ac_status" >&5
1747  (exit $ac_status); }
1748{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
1749  (eval $ac_compiler -v </dev/null >&5) 2>&5
1750  ac_status=$?
1751  echo "$as_me:$LINENO: \$? = $ac_status" >&5
1752  (exit $ac_status); }
1753{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
1754  (eval $ac_compiler -V </dev/null >&5) 2>&5
1755  ac_status=$?
1756  echo "$as_me:$LINENO: \$? = $ac_status" >&5
1757  (exit $ac_status); }
1758
1759cat >conftest.$ac_ext <<_ACEOF
1760#line $LINENO "configure"
1761/* confdefs.h.  */
1762_ACEOF
1763cat confdefs.h >>conftest.$ac_ext
1764cat >>conftest.$ac_ext <<_ACEOF
1765/* end confdefs.h.  */
1766
1767int
1768main ()
1769{
1770
1771  ;
1772  return 0;
1773}
1774_ACEOF
1775ac_clean_files_save=$ac_clean_files
1776ac_clean_files="$ac_clean_files a.out a.exe b.out"
1777# Try to create an executable without -o first, disregard a.out.
1778# It will help us diagnose broken compilers, and finding out an intuition
1779# of exeext.
1780echo "$as_me:$LINENO: checking for C compiler default output" >&5
1781echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1782ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1783if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
1784  (eval $ac_link_default) 2>&5
1785  ac_status=$?
1786  echo "$as_me:$LINENO: \$? = $ac_status" >&5
1787  (exit $ac_status); }; then
1788  # Find the output, starting from the most likely.  This scheme is
1789# not robust to junk in `.', hence go to wildcards (a.*) only as a last
1790# resort.
1791
1792# Be careful to initialize this variable, since it used to be cached.
1793# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
1794ac_cv_exeext=
1795# b.out is created by i960 compilers.
1796for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
1797do
1798  test -f "$ac_file" || continue
1799  case $ac_file in
1800    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
1801        ;;
1802    conftest.$ac_ext )
1803        # This is the source file.
1804        ;;
1805    [ab].out )
1806        # We found the default executable, but exeext='' is most
1807        # certainly right.
1808        break;;
1809    *.* )
1810        ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1811        # FIXME: I believe we export ac_cv_exeext for Libtool,
1812        # but it would be cool to find out if it's true.  Does anybody
1813        # maintain Libtool? --akim.
1814        export ac_cv_exeext
1815        break;;
1816    * )
1817        break;;
1818  esac
1819done
1820else
1821  echo "$as_me: failed program was:" >&5
1822sed 's/^/| /' conftest.$ac_ext >&5
1823
1824{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
1825See \`config.log' for more details." >&5
1826echo "$as_me: error: C compiler cannot create executables
1827See \`config.log' for more details." >&2;}
1828   { (exit 77); exit 77; }; }
1829fi
1830
1831ac_exeext=$ac_cv_exeext
1832echo "$as_me:$LINENO: result: $ac_file" >&5
1833echo "${ECHO_T}$ac_file" >&6
1834
1835# Check the compiler produces executables we can run.  If not, either
1836# the compiler is broken, or we cross compile.
1837echo "$as_me:$LINENO: checking whether the C compiler works" >&5
1838echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1839# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1840# If not cross compiling, check that we can run a simple program.
1841if test "$cross_compiling" != yes; then
1842  if { ac_try='./$ac_file'
1843  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1844  (eval $ac_try) 2>&5
1845  ac_status=$?
1846  echo "$as_me:$LINENO: \$? = $ac_status" >&5
1847  (exit $ac_status); }; }; then
1848    cross_compiling=no
1849  else
1850    if test "$cross_compiling" = maybe; then
1851	cross_compiling=yes
1852    else
1853	{ { echo "$as_me:$LINENO: error: cannot run C compiled programs.
1854If you meant to cross compile, use \`--host'.
1855See \`config.log' for more details." >&5
1856echo "$as_me: error: cannot run C compiled programs.
1857If you meant to cross compile, use \`--host'.
1858See \`config.log' for more details." >&2;}
1859   { (exit 1); exit 1; }; }
1860    fi
1861  fi
1862fi
1863echo "$as_me:$LINENO: result: yes" >&5
1864echo "${ECHO_T}yes" >&6
1865
1866rm -f a.out a.exe conftest$ac_cv_exeext b.out
1867ac_clean_files=$ac_clean_files_save
1868# Check the compiler produces executables we can run.  If not, either
1869# the compiler is broken, or we cross compile.
1870echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
1871echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1872echo "$as_me:$LINENO: result: $cross_compiling" >&5
1873echo "${ECHO_T}$cross_compiling" >&6
1874
1875echo "$as_me:$LINENO: checking for suffix of executables" >&5
1876echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
1877if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
1878  (eval $ac_link) 2>&5
1879  ac_status=$?
1880  echo "$as_me:$LINENO: \$? = $ac_status" >&5
1881  (exit $ac_status); }; then
1882  # If both `conftest.exe' and `conftest' are `present' (well, observable)
1883# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1884# work properly (i.e., refer to `conftest.exe'), while it won't with
1885# `rm'.
1886for ac_file in conftest.exe conftest conftest.*; do
1887  test -f "$ac_file" || continue
1888  case $ac_file in
1889    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
1890    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1891          export ac_cv_exeext
1892          break;;
1893    * ) break;;
1894  esac
1895done
1896else
1897  { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
1898See \`config.log' for more details." >&5
1899echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
1900See \`config.log' for more details." >&2;}
1901   { (exit 1); exit 1; }; }
1902fi
1903
1904rm -f conftest$ac_cv_exeext
1905echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
1906echo "${ECHO_T}$ac_cv_exeext" >&6
1907
1908rm -f conftest.$ac_ext
1909EXEEXT=$ac_cv_exeext
1910ac_exeext=$EXEEXT
1911echo "$as_me:$LINENO: checking for suffix of object files" >&5
1912echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
1913if test "${ac_cv_objext+set}" = set; then
1914  echo $ECHO_N "(cached) $ECHO_C" >&6
1915else
1916  cat >conftest.$ac_ext <<_ACEOF
1917#line $LINENO "configure"
1918/* confdefs.h.  */
1919_ACEOF
1920cat confdefs.h >>conftest.$ac_ext
1921cat >>conftest.$ac_ext <<_ACEOF
1922/* end confdefs.h.  */
1923
1924int
1925main ()
1926{
1927
1928  ;
1929  return 0;
1930}
1931_ACEOF
1932rm -f conftest.o conftest.obj
1933if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
1934  (eval $ac_compile) 2>&5
1935  ac_status=$?
1936  echo "$as_me:$LINENO: \$? = $ac_status" >&5
1937  (exit $ac_status); }; then
1938  for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1939  case $ac_file in
1940    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
1941    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1942       break;;
1943  esac
1944done
1945else
1946  echo "$as_me: failed program was:" >&5
1947sed 's/^/| /' conftest.$ac_ext >&5
1948
1949{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
1950See \`config.log' for more details." >&5
1951echo "$as_me: error: cannot compute suffix of object files: cannot compile
1952See \`config.log' for more details." >&2;}
1953   { (exit 1); exit 1; }; }
1954fi
1955
1956rm -f conftest.$ac_cv_objext conftest.$ac_ext
1957fi
1958echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
1959echo "${ECHO_T}$ac_cv_objext" >&6
1960OBJEXT=$ac_cv_objext
1961ac_objext=$OBJEXT
1962echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
1963echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1964if test "${ac_cv_c_compiler_gnu+set}" = set; then
1965  echo $ECHO_N "(cached) $ECHO_C" >&6
1966else
1967  cat >conftest.$ac_ext <<_ACEOF
1968#line $LINENO "configure"
1969/* confdefs.h.  */
1970_ACEOF
1971cat confdefs.h >>conftest.$ac_ext
1972cat >>conftest.$ac_ext <<_ACEOF
1973/* end confdefs.h.  */
1974
1975int
1976main ()
1977{
1978#ifndef __GNUC__
1979       choke me
1980#endif
1981
1982  ;
1983  return 0;
1984}
1985_ACEOF
1986rm -f conftest.$ac_objext
1987if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
1988  (eval $ac_compile) 2>&5
1989  ac_status=$?
1990  echo "$as_me:$LINENO: \$? = $ac_status" >&5
1991  (exit $ac_status); } &&
1992         { ac_try='test -s conftest.$ac_objext'
1993  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1994  (eval $ac_try) 2>&5
1995  ac_status=$?
1996  echo "$as_me:$LINENO: \$? = $ac_status" >&5
1997  (exit $ac_status); }; }; then
1998  ac_compiler_gnu=yes
1999else
2000  echo "$as_me: failed program was:" >&5
2001sed 's/^/| /' conftest.$ac_ext >&5
2002
2003ac_compiler_gnu=no
2004fi
2005rm -f conftest.$ac_objext conftest.$ac_ext
2006ac_cv_c_compiler_gnu=$ac_compiler_gnu
2007
2008fi
2009echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2010echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2011GCC=`test $ac_compiler_gnu = yes && echo yes`
2012ac_test_CFLAGS=${CFLAGS+set}
2013ac_save_CFLAGS=$CFLAGS
2014CFLAGS="-g"
2015echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2016echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2017if test "${ac_cv_prog_cc_g+set}" = set; then
2018  echo $ECHO_N "(cached) $ECHO_C" >&6
2019else
2020  cat >conftest.$ac_ext <<_ACEOF
2021#line $LINENO "configure"
2022/* confdefs.h.  */
2023_ACEOF
2024cat confdefs.h >>conftest.$ac_ext
2025cat >>conftest.$ac_ext <<_ACEOF
2026/* end confdefs.h.  */
2027
2028int
2029main ()
2030{
2031
2032  ;
2033  return 0;
2034}
2035_ACEOF
2036rm -f conftest.$ac_objext
2037if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2038  (eval $ac_compile) 2>&5
2039  ac_status=$?
2040  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2041  (exit $ac_status); } &&
2042         { ac_try='test -s conftest.$ac_objext'
2043  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2044  (eval $ac_try) 2>&5
2045  ac_status=$?
2046  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2047  (exit $ac_status); }; }; then
2048  ac_cv_prog_cc_g=yes
2049else
2050  echo "$as_me: failed program was:" >&5
2051sed 's/^/| /' conftest.$ac_ext >&5
2052
2053ac_cv_prog_cc_g=no
2054fi
2055rm -f conftest.$ac_objext conftest.$ac_ext
2056fi
2057echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2058echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
2059if test "$ac_test_CFLAGS" = set; then
2060  CFLAGS=$ac_save_CFLAGS
2061elif test $ac_cv_prog_cc_g = yes; then
2062  if test "$GCC" = yes; then
2063    CFLAGS="-g -O2"
2064  else
2065    CFLAGS="-g"
2066  fi
2067else
2068  if test "$GCC" = yes; then
2069    CFLAGS="-O2"
2070  else
2071    CFLAGS=
2072  fi
2073fi
2074echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
2075echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2076if test "${ac_cv_prog_cc_stdc+set}" = set; then
2077  echo $ECHO_N "(cached) $ECHO_C" >&6
2078else
2079  ac_cv_prog_cc_stdc=no
2080ac_save_CC=$CC
2081cat >conftest.$ac_ext <<_ACEOF
2082#line $LINENO "configure"
2083/* confdefs.h.  */
2084_ACEOF
2085cat confdefs.h >>conftest.$ac_ext
2086cat >>conftest.$ac_ext <<_ACEOF
2087/* end confdefs.h.  */
2088#include <stdarg.h>
2089#include <stdio.h>
2090#include <sys/types.h>
2091#include <sys/stat.h>
2092/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2093struct buf { int x; };
2094FILE * (*rcsopen) (struct buf *, struct stat *, int);
2095static char *e (p, i)
2096     char **p;
2097     int i;
2098{
2099  return p[i];
2100}
2101static char *f (char * (*g) (char **, int), char **p, ...)
2102{
2103  char *s;
2104  va_list v;
2105  va_start (v,p);
2106  s = g (p, va_arg (v,int));
2107  va_end (v);
2108  return s;
2109}
2110int test (int i, double x);
2111struct s1 {int (*f) (int a);};
2112struct s2 {int (*f) (double a);};
2113int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2114int argc;
2115char **argv;
2116int
2117main ()
2118{
2119return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2120  ;
2121  return 0;
2122}
2123_ACEOF
2124# Don't try gcc -ansi; that turns off useful extensions and
2125# breaks some systems' header files.
2126# AIX			-qlanglvl=ansi
2127# Ultrix and OSF/1	-std1
2128# HP-UX 10.20 and later	-Ae
2129# HP-UX older versions	-Aa -D_HPUX_SOURCE
2130# SVR4			-Xc -D__EXTENSIONS__
2131for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2132do
2133  CC="$ac_save_CC $ac_arg"
2134  rm -f conftest.$ac_objext
2135if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2136  (eval $ac_compile) 2>&5
2137  ac_status=$?
2138  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2139  (exit $ac_status); } &&
2140         { ac_try='test -s conftest.$ac_objext'
2141  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2142  (eval $ac_try) 2>&5
2143  ac_status=$?
2144  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2145  (exit $ac_status); }; }; then
2146  ac_cv_prog_cc_stdc=$ac_arg
2147break
2148else
2149  echo "$as_me: failed program was:" >&5
2150sed 's/^/| /' conftest.$ac_ext >&5
2151
2152fi
2153rm -f conftest.$ac_objext
2154done
2155rm -f conftest.$ac_ext conftest.$ac_objext
2156CC=$ac_save_CC
2157
2158fi
2159
2160case "x$ac_cv_prog_cc_stdc" in
2161  x|xno)
2162    echo "$as_me:$LINENO: result: none needed" >&5
2163echo "${ECHO_T}none needed" >&6 ;;
2164  *)
2165    echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
2166echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2167    CC="$CC $ac_cv_prog_cc_stdc" ;;
2168esac
2169
2170# Some people use a C++ compiler to compile C.  Since we use `exit',
2171# in C++ we need to declare it.  In case someone uses the same compiler
2172# for both compiling C and C++ we need to have the C++ compiler decide
2173# the declaration of exit, since it's the most demanding environment.
2174cat >conftest.$ac_ext <<_ACEOF
2175#ifndef __cplusplus
2176  choke me
2177#endif
2178_ACEOF
2179rm -f conftest.$ac_objext
2180if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2181  (eval $ac_compile) 2>&5
2182  ac_status=$?
2183  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2184  (exit $ac_status); } &&
2185         { ac_try='test -s conftest.$ac_objext'
2186  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2187  (eval $ac_try) 2>&5
2188  ac_status=$?
2189  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2190  (exit $ac_status); }; }; then
2191  for ac_declaration in \
2192   ''\
2193   '#include <stdlib.h>' \
2194   'extern "C" void std::exit (int) throw (); using std::exit;' \
2195   'extern "C" void std::exit (int); using std::exit;' \
2196   'extern "C" void exit (int) throw ();' \
2197   'extern "C" void exit (int);' \
2198   'void exit (int);'
2199do
2200  cat >conftest.$ac_ext <<_ACEOF
2201#line $LINENO "configure"
2202/* confdefs.h.  */
2203_ACEOF
2204cat confdefs.h >>conftest.$ac_ext
2205cat >>conftest.$ac_ext <<_ACEOF
2206/* end confdefs.h.  */
2207#include <stdlib.h>
2208$ac_declaration
2209int
2210main ()
2211{
2212exit (42);
2213  ;
2214  return 0;
2215}
2216_ACEOF
2217rm -f conftest.$ac_objext
2218if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2219  (eval $ac_compile) 2>&5
2220  ac_status=$?
2221  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2222  (exit $ac_status); } &&
2223         { ac_try='test -s conftest.$ac_objext'
2224  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2225  (eval $ac_try) 2>&5
2226  ac_status=$?
2227  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2228  (exit $ac_status); }; }; then
2229  :
2230else
2231  echo "$as_me: failed program was:" >&5
2232sed 's/^/| /' conftest.$ac_ext >&5
2233
2234continue
2235fi
2236rm -f conftest.$ac_objext conftest.$ac_ext
2237  cat >conftest.$ac_ext <<_ACEOF
2238#line $LINENO "configure"
2239/* confdefs.h.  */
2240_ACEOF
2241cat confdefs.h >>conftest.$ac_ext
2242cat >>conftest.$ac_ext <<_ACEOF
2243/* end confdefs.h.  */
2244$ac_declaration
2245int
2246main ()
2247{
2248exit (42);
2249  ;
2250  return 0;
2251}
2252_ACEOF
2253rm -f conftest.$ac_objext
2254if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2255  (eval $ac_compile) 2>&5
2256  ac_status=$?
2257  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2258  (exit $ac_status); } &&
2259         { ac_try='test -s conftest.$ac_objext'
2260  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2261  (eval $ac_try) 2>&5
2262  ac_status=$?
2263  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2264  (exit $ac_status); }; }; then
2265  break
2266else
2267  echo "$as_me: failed program was:" >&5
2268sed 's/^/| /' conftest.$ac_ext >&5
2269
2270fi
2271rm -f conftest.$ac_objext conftest.$ac_ext
2272done
2273rm -f conftest*
2274if test -n "$ac_declaration"; then
2275  echo '#ifdef __cplusplus' >>confdefs.h
2276  echo $ac_declaration      >>confdefs.h
2277  echo '#endif'             >>confdefs.h
2278fi
2279
2280else
2281  echo "$as_me: failed program was:" >&5
2282sed 's/^/| /' conftest.$ac_ext >&5
2283
2284fi
2285rm -f conftest.$ac_objext conftest.$ac_ext
2286ac_ext=c
2287ac_cpp='$CPP $CPPFLAGS'
2288ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2289ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2290ac_compiler_gnu=$ac_cv_c_compiler_gnu
2291
2292ac_ext=c
2293ac_cpp='$CPP $CPPFLAGS'
2294ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2295ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2296ac_compiler_gnu=$ac_cv_c_compiler_gnu
2297echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
2298echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2299# On Suns, sometimes $CPP names a directory.
2300if test -n "$CPP" && test -d "$CPP"; then
2301  CPP=
2302fi
2303if test -z "$CPP"; then
2304  if test "${ac_cv_prog_CPP+set}" = set; then
2305  echo $ECHO_N "(cached) $ECHO_C" >&6
2306else
2307      # Double quotes because CPP needs to be expanded
2308    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2309    do
2310      ac_preproc_ok=false
2311for ac_c_preproc_warn_flag in '' yes
2312do
2313  # Use a header file that comes with gcc, so configuring glibc
2314  # with a fresh cross-compiler works.
2315  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2316  # <limits.h> exists even on freestanding compilers.
2317  # On the NeXT, cc -E runs the code through the compiler's parser,
2318  # not just through cpp. "Syntax error" is here to catch this case.
2319  cat >conftest.$ac_ext <<_ACEOF
2320#line $LINENO "configure"
2321/* confdefs.h.  */
2322_ACEOF
2323cat confdefs.h >>conftest.$ac_ext
2324cat >>conftest.$ac_ext <<_ACEOF
2325/* end confdefs.h.  */
2326#ifdef __STDC__
2327# include <limits.h>
2328#else
2329# include <assert.h>
2330#endif
2331                     Syntax error
2332_ACEOF
2333if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2334  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2335  ac_status=$?
2336  grep -v '^ *+' conftest.er1 >conftest.err
2337  rm -f conftest.er1
2338  cat conftest.err >&5
2339  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2340  (exit $ac_status); } >/dev/null; then
2341  if test -s conftest.err; then
2342    ac_cpp_err=$ac_c_preproc_warn_flag
2343  else
2344    ac_cpp_err=
2345  fi
2346else
2347  ac_cpp_err=yes
2348fi
2349if test -z "$ac_cpp_err"; then
2350  :
2351else
2352  echo "$as_me: failed program was:" >&5
2353sed 's/^/| /' conftest.$ac_ext >&5
2354
2355  # Broken: fails on valid input.
2356continue
2357fi
2358rm -f conftest.err conftest.$ac_ext
2359
2360  # OK, works on sane cases.  Now check whether non-existent headers
2361  # can be detected and how.
2362  cat >conftest.$ac_ext <<_ACEOF
2363#line $LINENO "configure"
2364/* confdefs.h.  */
2365_ACEOF
2366cat confdefs.h >>conftest.$ac_ext
2367cat >>conftest.$ac_ext <<_ACEOF
2368/* end confdefs.h.  */
2369#include <ac_nonexistent.h>
2370_ACEOF
2371if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2372  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2373  ac_status=$?
2374  grep -v '^ *+' conftest.er1 >conftest.err
2375  rm -f conftest.er1
2376  cat conftest.err >&5
2377  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2378  (exit $ac_status); } >/dev/null; then
2379  if test -s conftest.err; then
2380    ac_cpp_err=$ac_c_preproc_warn_flag
2381  else
2382    ac_cpp_err=
2383  fi
2384else
2385  ac_cpp_err=yes
2386fi
2387if test -z "$ac_cpp_err"; then
2388  # Broken: success on invalid input.
2389continue
2390else
2391  echo "$as_me: failed program was:" >&5
2392sed 's/^/| /' conftest.$ac_ext >&5
2393
2394  # Passes both tests.
2395ac_preproc_ok=:
2396break
2397fi
2398rm -f conftest.err conftest.$ac_ext
2399
2400done
2401# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2402rm -f conftest.err conftest.$ac_ext
2403if $ac_preproc_ok; then
2404  break
2405fi
2406
2407    done
2408    ac_cv_prog_CPP=$CPP
2409
2410fi
2411  CPP=$ac_cv_prog_CPP
2412else
2413  ac_cv_prog_CPP=$CPP
2414fi
2415echo "$as_me:$LINENO: result: $CPP" >&5
2416echo "${ECHO_T}$CPP" >&6
2417ac_preproc_ok=false
2418for ac_c_preproc_warn_flag in '' yes
2419do
2420  # Use a header file that comes with gcc, so configuring glibc
2421  # with a fresh cross-compiler works.
2422  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2423  # <limits.h> exists even on freestanding compilers.
2424  # On the NeXT, cc -E runs the code through the compiler's parser,
2425  # not just through cpp. "Syntax error" is here to catch this case.
2426  cat >conftest.$ac_ext <<_ACEOF
2427#line $LINENO "configure"
2428/* confdefs.h.  */
2429_ACEOF
2430cat confdefs.h >>conftest.$ac_ext
2431cat >>conftest.$ac_ext <<_ACEOF
2432/* end confdefs.h.  */
2433#ifdef __STDC__
2434# include <limits.h>
2435#else
2436# include <assert.h>
2437#endif
2438                     Syntax error
2439_ACEOF
2440if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2441  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2442  ac_status=$?
2443  grep -v '^ *+' conftest.er1 >conftest.err
2444  rm -f conftest.er1
2445  cat conftest.err >&5
2446  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2447  (exit $ac_status); } >/dev/null; then
2448  if test -s conftest.err; then
2449    ac_cpp_err=$ac_c_preproc_warn_flag
2450  else
2451    ac_cpp_err=
2452  fi
2453else
2454  ac_cpp_err=yes
2455fi
2456if test -z "$ac_cpp_err"; then
2457  :
2458else
2459  echo "$as_me: failed program was:" >&5
2460sed 's/^/| /' conftest.$ac_ext >&5
2461
2462  # Broken: fails on valid input.
2463continue
2464fi
2465rm -f conftest.err conftest.$ac_ext
2466
2467  # OK, works on sane cases.  Now check whether non-existent headers
2468  # can be detected and how.
2469  cat >conftest.$ac_ext <<_ACEOF
2470#line $LINENO "configure"
2471/* confdefs.h.  */
2472_ACEOF
2473cat confdefs.h >>conftest.$ac_ext
2474cat >>conftest.$ac_ext <<_ACEOF
2475/* end confdefs.h.  */
2476#include <ac_nonexistent.h>
2477_ACEOF
2478if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2479  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2480  ac_status=$?
2481  grep -v '^ *+' conftest.er1 >conftest.err
2482  rm -f conftest.er1
2483  cat conftest.err >&5
2484  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2485  (exit $ac_status); } >/dev/null; then
2486  if test -s conftest.err; then
2487    ac_cpp_err=$ac_c_preproc_warn_flag
2488  else
2489    ac_cpp_err=
2490  fi
2491else
2492  ac_cpp_err=yes
2493fi
2494if test -z "$ac_cpp_err"; then
2495  # Broken: success on invalid input.
2496continue
2497else
2498  echo "$as_me: failed program was:" >&5
2499sed 's/^/| /' conftest.$ac_ext >&5
2500
2501  # Passes both tests.
2502ac_preproc_ok=:
2503break
2504fi
2505rm -f conftest.err conftest.$ac_ext
2506
2507done
2508# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2509rm -f conftest.err conftest.$ac_ext
2510if $ac_preproc_ok; then
2511  :
2512else
2513  { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
2514See \`config.log' for more details." >&5
2515echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
2516See \`config.log' for more details." >&2;}
2517   { (exit 1); exit 1; }; }
2518fi
2519
2520ac_ext=c
2521ac_cpp='$CPP $CPPFLAGS'
2522ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2523ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2524ac_compiler_gnu=$ac_cv_c_compiler_gnu
2525
2526
2527
2528echo "$as_me:$LINENO: checking for egrep" >&5
2529echo $ECHO_N "checking for egrep... $ECHO_C" >&6
2530if test "${ac_cv_prog_egrep+set}" = set; then
2531  echo $ECHO_N "(cached) $ECHO_C" >&6
2532else
2533  if echo a | (grep -E '(a|b)') >/dev/null 2>&1
2534    then ac_cv_prog_egrep='grep -E'
2535    else ac_cv_prog_egrep='egrep'
2536    fi
2537fi
2538echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
2539echo "${ECHO_T}$ac_cv_prog_egrep" >&6
2540 EGREP=$ac_cv_prog_egrep
2541
2542
2543if test $ac_cv_c_compiler_gnu = yes; then
2544    echo "$as_me:$LINENO: checking whether $CC needs -traditional" >&5
2545echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2546if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2547  echo $ECHO_N "(cached) $ECHO_C" >&6
2548else
2549    ac_pattern="Autoconf.*'x'"
2550  cat >conftest.$ac_ext <<_ACEOF
2551#line $LINENO "configure"
2552/* confdefs.h.  */
2553_ACEOF
2554cat confdefs.h >>conftest.$ac_ext
2555cat >>conftest.$ac_ext <<_ACEOF
2556/* end confdefs.h.  */
2557#include <sgtty.h>
2558Autoconf TIOCGETP
2559_ACEOF
2560if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2561  $EGREP "$ac_pattern" >/dev/null 2>&1; then
2562  ac_cv_prog_gcc_traditional=yes
2563else
2564  ac_cv_prog_gcc_traditional=no
2565fi
2566rm -f conftest*
2567
2568
2569  if test $ac_cv_prog_gcc_traditional = no; then
2570    cat >conftest.$ac_ext <<_ACEOF
2571#line $LINENO "configure"
2572/* confdefs.h.  */
2573_ACEOF
2574cat confdefs.h >>conftest.$ac_ext
2575cat >>conftest.$ac_ext <<_ACEOF
2576/* end confdefs.h.  */
2577#include <termio.h>
2578Autoconf TCGETA
2579_ACEOF
2580if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2581  $EGREP "$ac_pattern" >/dev/null 2>&1; then
2582  ac_cv_prog_gcc_traditional=yes
2583fi
2584rm -f conftest*
2585
2586  fi
2587fi
2588echo "$as_me:$LINENO: result: $ac_cv_prog_gcc_traditional" >&5
2589echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2590  if test $ac_cv_prog_gcc_traditional = yes; then
2591    CC="$CC -traditional"
2592  fi
2593fi
2594
2595echo "$as_me:$LINENO: checking for library containing strerror" >&5
2596echo $ECHO_N "checking for library containing strerror... $ECHO_C" >&6
2597if test "${ac_cv_search_strerror+set}" = set; then
2598  echo $ECHO_N "(cached) $ECHO_C" >&6
2599else
2600  ac_func_search_save_LIBS=$LIBS
2601ac_cv_search_strerror=no
2602cat >conftest.$ac_ext <<_ACEOF
2603#line $LINENO "configure"
2604/* confdefs.h.  */
2605_ACEOF
2606cat confdefs.h >>conftest.$ac_ext
2607cat >>conftest.$ac_ext <<_ACEOF
2608/* end confdefs.h.  */
2609
2610/* Override any gcc2 internal prototype to avoid an error.  */
2611#ifdef __cplusplus
2612extern "C"
2613#endif
2614/* We use char because int might match the return type of a gcc2
2615   builtin and then its argument prototype would still apply.  */
2616char strerror ();
2617int
2618main ()
2619{
2620strerror ();
2621  ;
2622  return 0;
2623}
2624_ACEOF
2625rm -f conftest.$ac_objext conftest$ac_exeext
2626if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2627  (eval $ac_link) 2>&5
2628  ac_status=$?
2629  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2630  (exit $ac_status); } &&
2631         { ac_try='test -s conftest$ac_exeext'
2632  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2633  (eval $ac_try) 2>&5
2634  ac_status=$?
2635  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2636  (exit $ac_status); }; }; then
2637  ac_cv_search_strerror="none required"
2638else
2639  echo "$as_me: failed program was:" >&5
2640sed 's/^/| /' conftest.$ac_ext >&5
2641
2642fi
2643rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
2644if test "$ac_cv_search_strerror" = no; then
2645  for ac_lib in cposix; do
2646    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
2647    cat >conftest.$ac_ext <<_ACEOF
2648#line $LINENO "configure"
2649/* confdefs.h.  */
2650_ACEOF
2651cat confdefs.h >>conftest.$ac_ext
2652cat >>conftest.$ac_ext <<_ACEOF
2653/* end confdefs.h.  */
2654
2655/* Override any gcc2 internal prototype to avoid an error.  */
2656#ifdef __cplusplus
2657extern "C"
2658#endif
2659/* We use char because int might match the return type of a gcc2
2660   builtin and then its argument prototype would still apply.  */
2661char strerror ();
2662int
2663main ()
2664{
2665strerror ();
2666  ;
2667  return 0;
2668}
2669_ACEOF
2670rm -f conftest.$ac_objext conftest$ac_exeext
2671if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2672  (eval $ac_link) 2>&5
2673  ac_status=$?
2674  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2675  (exit $ac_status); } &&
2676         { ac_try='test -s conftest$ac_exeext'
2677  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2678  (eval $ac_try) 2>&5
2679  ac_status=$?
2680  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2681  (exit $ac_status); }; }; then
2682  ac_cv_search_strerror="-l$ac_lib"
2683break
2684else
2685  echo "$as_me: failed program was:" >&5
2686sed 's/^/| /' conftest.$ac_ext >&5
2687
2688fi
2689rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
2690  done
2691fi
2692LIBS=$ac_func_search_save_LIBS
2693fi
2694echo "$as_me:$LINENO: result: $ac_cv_search_strerror" >&5
2695echo "${ECHO_T}$ac_cv_search_strerror" >&6
2696if test "$ac_cv_search_strerror" != no; then
2697  test "$ac_cv_search_strerror" = "none required" || LIBS="$ac_cv_search_strerror $LIBS"
2698
2699fi
2700
2701
2702if test "$cross_compiling" = yes; then
2703  { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
2704See \`config.log' for more details." >&5
2705echo "$as_me: error: cannot run test program while cross compiling
2706See \`config.log' for more details." >&2;}
2707   { (exit 1); exit 1; }; }
2708else
2709  cat >conftest.$ac_ext <<_ACEOF
2710#line $LINENO "configure"
2711/* confdefs.h.  */
2712_ACEOF
2713cat confdefs.h >>conftest.$ac_ext
2714cat >>conftest.$ac_ext <<_ACEOF
2715/* end confdefs.h.  */
2716main(){exit(0);}
2717_ACEOF
2718rm -f conftest$ac_exeext
2719if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2720  (eval $ac_link) 2>&5
2721  ac_status=$?
2722  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2723  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
2724  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2725  (eval $ac_try) 2>&5
2726  ac_status=$?
2727  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2728  (exit $ac_status); }; }; then
2729  :
2730else
2731  echo "$as_me: program exited with status $ac_status" >&5
2732echo "$as_me: failed program was:" >&5
2733sed 's/^/| /' conftest.$ac_ext >&5
2734
2735( exit $ac_status )
2736
2737if test $CC != cc ; then
2738echo "Your $CC failed - restarting with CC=cc" 1>&6
2739
2740echo "" 1>&6
2741
2742CC=cc
2743export CC
2744exec $0 $configure_args
2745fi
2746
2747fi
2748rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
2749fi
2750
2751if test "$cross_compiling" = yes; then
2752  { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
2753See \`config.log' for more details." >&5
2754echo "$as_me: error: cannot run test program while cross compiling
2755See \`config.log' for more details." >&2;}
2756   { (exit 1); exit 1; }; }
2757else
2758  cat >conftest.$ac_ext <<_ACEOF
2759#line $LINENO "configure"
2760/* confdefs.h.  */
2761_ACEOF
2762cat confdefs.h >>conftest.$ac_ext
2763cat >>conftest.$ac_ext <<_ACEOF
2764/* end confdefs.h.  */
2765main(){exit(0);}
2766_ACEOF
2767rm -f conftest$ac_exeext
2768if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2769  (eval $ac_link) 2>&5
2770  ac_status=$?
2771  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2772  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
2773  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2774  (eval $ac_try) 2>&5
2775  ac_status=$?
2776  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2777  (exit $ac_status); }; }; then
2778  :
2779else
2780  echo "$as_me: program exited with status $ac_status" >&5
2781echo "$as_me: failed program was:" >&5
2782sed 's/^/| /' conftest.$ac_ext >&5
2783
2784( exit $ac_status )
2785exec 5>&2
2786eval $ac_link
2787echo "CC=$CC; CFLAGS=$CFLAGS; LIBS=$LIBS;" 1>&6
2788
2789echo "$ac_compile" 1>&6
2790
2791{ { echo "$as_me:$LINENO: error: Can't run the compiler - sorry" >&5
2792echo "$as_me: error: Can't run the compiler - sorry" >&2;}
2793   { (exit 1); exit 1; }; }
2794fi
2795rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
2796fi
2797
2798if test "$cross_compiling" = yes; then
2799  { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
2800See \`config.log' for more details." >&5
2801echo "$as_me: error: cannot run test program while cross compiling
2802See \`config.log' for more details." >&2;}
2803   { (exit 1); exit 1; }; }
2804else
2805  cat >conftest.$ac_ext <<_ACEOF
2806#line $LINENO "configure"
2807/* confdefs.h.  */
2808_ACEOF
2809cat confdefs.h >>conftest.$ac_ext
2810cat >>conftest.$ac_ext <<_ACEOF
2811/* end confdefs.h.  */
2812
2813main()
2814{
2815  int __something_strange_();
2816  __something_strange_(0);
2817}
2818
2819_ACEOF
2820rm -f conftest$ac_exeext
2821if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2822  (eval $ac_link) 2>&5
2823  ac_status=$?
2824  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2825  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
2826  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2827  (eval $ac_try) 2>&5
2828  ac_status=$?
2829  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2830  (exit $ac_status); }; }; then
2831  { { echo "$as_me:$LINENO: error: Your compiler does not set the exit status - sorry" >&5
2832echo "$as_me: error: Your compiler does not set the exit status - sorry" >&2;}
2833   { (exit 1); exit 1; }; }
2834else
2835  echo "$as_me: program exited with status $ac_status" >&5
2836echo "$as_me: failed program was:" >&5
2837sed 's/^/| /' conftest.$ac_ext >&5
2838
2839fi
2840rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
2841fi
2842
2843for ac_prog in gawk mawk nawk awk
2844do
2845  # Extract the first word of "$ac_prog", so it can be a program name with args.
2846set dummy $ac_prog; ac_word=$2
2847echo "$as_me:$LINENO: checking for $ac_word" >&5
2848echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2849if test "${ac_cv_prog_AWK+set}" = set; then
2850  echo $ECHO_N "(cached) $ECHO_C" >&6
2851else
2852  if test -n "$AWK"; then
2853  ac_cv_prog_AWK="$AWK" # Let the user override the test.
2854else
2855as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2856for as_dir in $PATH
2857do
2858  IFS=$as_save_IFS
2859  test -z "$as_dir" && as_dir=.
2860  for ac_exec_ext in '' $ac_executable_extensions; do
2861  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2862    ac_cv_prog_AWK="$ac_prog"
2863    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2864    break 2
2865  fi
2866done
2867done
2868
2869fi
2870fi
2871AWK=$ac_cv_prog_AWK
2872if test -n "$AWK"; then
2873  echo "$as_me:$LINENO: result: $AWK" >&5
2874echo "${ECHO_T}$AWK" >&6
2875else
2876  echo "$as_me:$LINENO: result: no" >&5
2877echo "${ECHO_T}no" >&6
2878fi
2879
2880  test -n "$AWK" && break
2881done
2882
2883
2884ac_aux_dir=
2885for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
2886  if test -f $ac_dir/install-sh; then
2887    ac_aux_dir=$ac_dir
2888    ac_install_sh="$ac_aux_dir/install-sh -c"
2889    break
2890  elif test -f $ac_dir/install.sh; then
2891    ac_aux_dir=$ac_dir
2892    ac_install_sh="$ac_aux_dir/install.sh -c"
2893    break
2894  elif test -f $ac_dir/shtool; then
2895    ac_aux_dir=$ac_dir
2896    ac_install_sh="$ac_aux_dir/shtool install -c"
2897    break
2898  fi
2899done
2900if test -z "$ac_aux_dir"; then
2901  { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
2902echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
2903   { (exit 1); exit 1; }; }
2904fi
2905ac_config_guess="$SHELL $ac_aux_dir/config.guess"
2906ac_config_sub="$SHELL $ac_aux_dir/config.sub"
2907ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
2908
2909# Find a good install program.  We prefer a C program (faster),
2910# so one script is as good as another.  But avoid the broken or
2911# incompatible versions:
2912# SysV /etc/install, /usr/sbin/install
2913# SunOS /usr/etc/install
2914# IRIX /sbin/install
2915# AIX /bin/install
2916# AmigaOS /C/install, which installs bootblocks on floppy discs
2917# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2918# AFS /usr/afsws/bin/install, which mishandles nonexistent args
2919# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2920# ./install, which can be erroneously created by make from ./install.sh.
2921echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
2922echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
2923if test -z "$INSTALL"; then
2924if test "${ac_cv_path_install+set}" = set; then
2925  echo $ECHO_N "(cached) $ECHO_C" >&6
2926else
2927  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2928for as_dir in $PATH
2929do
2930  IFS=$as_save_IFS
2931  test -z "$as_dir" && as_dir=.
2932  # Account for people who put trailing slashes in PATH elements.
2933case $as_dir/ in
2934  ./ | .// | /cC/* | \
2935  /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
2936  /usr/ucb/* ) ;;
2937  *)
2938    # OSF1 and SCO ODT 3.0 have their own names for install.
2939    # Don't use installbsd from OSF since it installs stuff as root
2940    # by default.
2941    for ac_prog in ginstall scoinst install; do
2942      for ac_exec_ext in '' $ac_executable_extensions; do
2943        if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
2944          if test $ac_prog = install &&
2945            grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
2946            # AIX install.  It has an incompatible calling convention.
2947            :
2948          elif test $ac_prog = install &&
2949            grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
2950            # program-specific install script used by HP pwplus--don't use.
2951            :
2952          else
2953            ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
2954            break 3
2955          fi
2956        fi
2957      done
2958    done
2959    ;;
2960esac
2961done
2962
2963
2964fi
2965  if test "${ac_cv_path_install+set}" = set; then
2966    INSTALL=$ac_cv_path_install
2967  else
2968    # As a last resort, use the slow shell script.  We don't cache a
2969    # path for INSTALL within a source directory, because that will
2970    # break other packages using the cache if that directory is
2971    # removed, or if the path is relative.
2972    INSTALL=$ac_install_sh
2973  fi
2974fi
2975echo "$as_me:$LINENO: result: $INSTALL" >&5
2976echo "${ECHO_T}$INSTALL" >&6
2977
2978# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2979# It thinks the first close brace ends the variable substitution.
2980test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2981
2982test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2983
2984test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2985
2986
2987if test -f etc/toolcheck; then
2988{ echo "$as_me:$LINENO: checking for buggy tools..." >&5
2989echo "$as_me: checking for buggy tools..." >&6;}
2990sh etc/toolcheck 1>&6
2991fi
2992
2993
2994
2995echo "$as_me:$LINENO: checking if a system-wide socket dir should be used" >&5
2996echo $ECHO_N "checking if a system-wide socket dir should be used... $ECHO_C" >&6
2997# Check whether --enable-socket-dir or --disable-socket-dir was given.
2998if test "${enable_socket_dir+set}" = set; then
2999  enableval="$enable_socket_dir"
3000
3001	echo "$as_me:$LINENO: result: no.  ~/.screen will be used instead." >&5
3002echo "${ECHO_T}no.  ~/.screen will be used instead." >&6
3003
3004else
3005
3006	echo "$as_me:$LINENO: result: yes" >&5
3007echo "${ECHO_T}yes" >&6
3008	echo "$as_me:$LINENO: checking for the socket dir" >&5
3009echo $ECHO_N "checking for the socket dir... $ECHO_C" >&6
3010	SOCKDIR="(eff_uid ? \"/tmp/uscreens\" : \"/tmp/screens\")"
3011
3012# Check whether --with-socket-dir or --without-socket-dir was given.
3013if test "${with_socket_dir+set}" = set; then
3014  withval="$with_socket_dir"
3015   SOCKDIR="\"${withval}\""
3016fi;
3017	echo "$as_me:$LINENO: result: ${SOCKDIR}" >&5
3018echo "${ECHO_T}${SOCKDIR}" >&6
3019	cat >>confdefs.h <<_ACEOF
3020#define SOCKDIR $SOCKDIR
3021_ACEOF
3022
3023
3024
3025fi;
3026
3027
3028if test -n "$ISC"; then
3029  cat >>confdefs.h <<\_ACEOF
3030#define ISC 1
3031_ACEOF
3032 LIBS="$LIBS -linet"
3033fi
3034
3035
3036if test -f /sysV68 ; then
3037cat >>confdefs.h <<\_ACEOF
3038#define sysV68 1
3039_ACEOF
3040
3041fi
3042
3043{ echo "$as_me:$LINENO: checking for MIPS..." >&5
3044echo "$as_me: checking for MIPS..." >&6;}
3045if test -f /lib/libmld.a || test -f /usr/lib/libmld.a || test -f /usr/lib/cmplrs/cc/libmld.a; then
3046oldlibs="$LIBS"
3047test -f /bin/mx || LIBS="$LIBS -lmld" # for nlist. But not on alpha.
3048{ echo "$as_me:$LINENO: checking mld library..." >&5
3049echo "$as_me: checking mld library..." >&6;}
3050cat >conftest.$ac_ext <<_ACEOF
3051#line $LINENO "configure"
3052/* confdefs.h.  */
3053_ACEOF
3054cat confdefs.h >>conftest.$ac_ext
3055cat >>conftest.$ac_ext <<_ACEOF
3056/* end confdefs.h.  */
3057
3058int
3059main ()
3060{
3061
3062  ;
3063  return 0;
3064}
3065_ACEOF
3066rm -f conftest.$ac_objext conftest$ac_exeext
3067if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3068  (eval $ac_link) 2>&5
3069  ac_status=$?
3070  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3071  (exit $ac_status); } &&
3072         { ac_try='test -s conftest$ac_exeext'
3073  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3074  (eval $ac_try) 2>&5
3075  ac_status=$?
3076  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3077  (exit $ac_status); }; }; then
3078  :
3079else
3080  echo "$as_me: failed program was:" >&5
3081sed 's/^/| /' conftest.$ac_ext >&5
3082
3083LIBS="$oldlibs"
3084fi
3085rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3086if test -r /dev/ptc; then
3087cat >>confdefs.h <<\_ACEOF
3088#define MIPS 1
3089_ACEOF
3090
3091{ echo "$as_me:$LINENO: checking wait3..." >&5
3092echo "$as_me: checking wait3..." >&6;}
3093cat >conftest.$ac_ext <<_ACEOF
3094#line $LINENO "configure"
3095/* confdefs.h.  */
3096_ACEOF
3097cat confdefs.h >>conftest.$ac_ext
3098cat >>conftest.$ac_ext <<_ACEOF
3099/* end confdefs.h.  */
3100
3101int
3102main ()
3103{
3104wait3();
3105  ;
3106  return 0;
3107}
3108_ACEOF
3109rm -f conftest.$ac_objext conftest$ac_exeext
3110if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3111  (eval $ac_link) 2>&5
3112  ac_status=$?
3113  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3114  (exit $ac_status); } &&
3115         { ac_try='test -s conftest$ac_exeext'
3116  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3117  (eval $ac_try) 2>&5
3118  ac_status=$?
3119  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3120  (exit $ac_status); }; }; then
3121  :
3122else
3123  echo "$as_me: failed program was:" >&5
3124sed 's/^/| /' conftest.$ac_ext >&5
3125
3126{ echo "$as_me:$LINENO: checking wait2..." >&5
3127echo "$as_me: checking wait2..." >&6;}
3128cat >conftest.$ac_ext <<_ACEOF
3129#line $LINENO "configure"
3130/* confdefs.h.  */
3131_ACEOF
3132cat confdefs.h >>conftest.$ac_ext
3133cat >>conftest.$ac_ext <<_ACEOF
3134/* end confdefs.h.  */
3135
3136int
3137main ()
3138{
3139wait2();
3140  ;
3141  return 0;
3142}
3143_ACEOF
3144rm -f conftest.$ac_objext conftest$ac_exeext
3145if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3146  (eval $ac_link) 2>&5
3147  ac_status=$?
3148  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3149  (exit $ac_status); } &&
3150         { ac_try='test -s conftest$ac_exeext'
3151  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3152  (eval $ac_try) 2>&5
3153  ac_status=$?
3154  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3155  (exit $ac_status); }; }; then
3156  cat >>confdefs.h <<\_ACEOF
3157#define USE_WAIT2 1
3158_ACEOF
3159 LIBS="$LIBS -lbsd" ; CC="$CC -I/usr/include/bsd"
3160
3161else
3162  echo "$as_me: failed program was:" >&5
3163sed 's/^/| /' conftest.$ac_ext >&5
3164
3165fi
3166rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3167fi
3168rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3169fi
3170fi
3171
3172
3173{ echo "$as_me:$LINENO: checking for Ultrix..." >&5
3174echo "$as_me: checking for Ultrix..." >&6;}
3175cat >conftest.$ac_ext <<_ACEOF
3176#line $LINENO "configure"
3177/* confdefs.h.  */
3178_ACEOF
3179cat confdefs.h >>conftest.$ac_ext
3180cat >>conftest.$ac_ext <<_ACEOF
3181/* end confdefs.h.  */
3182#if defined(ultrix) || defined(__ultrix)
3183   yes;
3184#endif
3185
3186_ACEOF
3187if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3188  $EGREP "yes" >/dev/null 2>&1; then
3189  ULTRIX=1
3190fi
3191rm -f conftest*
3192
3193
3194if test -f /usr/lib/libpyr.a ; then
3195oldlibs="$LIBS"
3196LIBS="$LIBS -lpyr"
3197{ echo "$as_me:$LINENO: checking Pyramid OSX..." >&5
3198echo "$as_me: checking Pyramid OSX..." >&6;}
3199cat >conftest.$ac_ext <<_ACEOF
3200#line $LINENO "configure"
3201/* confdefs.h.  */
3202_ACEOF
3203cat confdefs.h >>conftest.$ac_ext
3204cat >>conftest.$ac_ext <<_ACEOF
3205/* end confdefs.h.  */
3206
3207int
3208main ()
3209{
3210open_controlling_pty("")
3211  ;
3212  return 0;
3213}
3214_ACEOF
3215rm -f conftest.$ac_objext conftest$ac_exeext
3216if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3217  (eval $ac_link) 2>&5
3218  ac_status=$?
3219  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3220  (exit $ac_status); } &&
3221         { ac_try='test -s conftest$ac_exeext'
3222  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3223  (eval $ac_try) 2>&5
3224  ac_status=$?
3225  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3226  (exit $ac_status); }; }; then
3227  cat >>confdefs.h <<\_ACEOF
3228#define OSX 1
3229_ACEOF
3230
3231else
3232  echo "$as_me: failed program was:" >&5
3233sed 's/^/| /' conftest.$ac_ext >&5
3234
3235LIBS="$oldlibs"
3236fi
3237rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3238fi
3239
3240{ echo "$as_me:$LINENO: checking for butterfly..." >&5
3241echo "$as_me: checking for butterfly..." >&6;}
3242cat >conftest.$ac_ext <<_ACEOF
3243#line $LINENO "configure"
3244/* confdefs.h.  */
3245_ACEOF
3246cat confdefs.h >>conftest.$ac_ext
3247cat >>conftest.$ac_ext <<_ACEOF
3248/* end confdefs.h.  */
3249#if defined(butterfly)
3250  yes;
3251#endif
3252
3253_ACEOF
3254if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3255  $EGREP "yes" >/dev/null 2>&1; then
3256  butterfly=1
3257fi
3258rm -f conftest*
3259
3260
3261if test -z "$butterfly"; then
3262if test -n "$ULTRIX"; then
3263  test -z "$GCC" && CC="$CC -YBSD"
3264fi
3265{ echo "$as_me:$LINENO: checking for POSIX.1..." >&5
3266echo "$as_me: checking for POSIX.1..." >&6;}
3267cat >conftest.$ac_ext <<_ACEOF
3268#line $LINENO "configure"
3269/* confdefs.h.  */
3270_ACEOF
3271cat confdefs.h >>conftest.$ac_ext
3272cat >>conftest.$ac_ext <<_ACEOF
3273/* end confdefs.h.  */
3274#include <sys/types.h>
3275#include <unistd.h>
3276main () {
3277#ifdef _POSIX_VERSION
3278  yes;
3279#endif
3280
3281_ACEOF
3282if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3283  $EGREP "yes" >/dev/null 2>&1; then
3284  echo "- you have a POSIX system" 1>&6
3285 cat >>confdefs.h <<\_ACEOF
3286#define POSIX 1
3287_ACEOF
3288 posix=1
3289fi
3290rm -f conftest*
3291
3292fi
3293
3294{ echo "$as_me:$LINENO: checking for System V..." >&5
3295echo "$as_me: checking for System V..." >&6;}
3296cat >conftest.$ac_ext <<_ACEOF
3297#line $LINENO "configure"
3298/* confdefs.h.  */
3299_ACEOF
3300cat confdefs.h >>conftest.$ac_ext
3301cat >>conftest.$ac_ext <<_ACEOF
3302/* end confdefs.h.  */
3303#include <sys/types.h>
3304#include <signal.h>
3305#include <fcntl.h>
3306int
3307main ()
3308{
3309int x = SIGCHLD | FNDELAY;
3310  ;
3311  return 0;
3312}
3313_ACEOF
3314rm -f conftest.$ac_objext
3315if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3316  (eval $ac_compile) 2>&5
3317  ac_status=$?
3318  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3319  (exit $ac_status); } &&
3320         { ac_try='test -s conftest.$ac_objext'
3321  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3322  (eval $ac_try) 2>&5
3323  ac_status=$?
3324  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3325  (exit $ac_status); }; }; then
3326  :
3327else
3328  echo "$as_me: failed program was:" >&5
3329sed 's/^/| /' conftest.$ac_ext >&5
3330
3331cat >>confdefs.h <<\_ACEOF
3332#define SYSV 1
3333_ACEOF
3334
3335fi
3336rm -f conftest.$ac_objext conftest.$ac_ext
3337
3338{ echo "$as_me:$LINENO: checking for sequent/ptx..." >&5
3339echo "$as_me: checking for sequent/ptx..." >&6;}
3340cat >conftest.$ac_ext <<_ACEOF
3341#line $LINENO "configure"
3342/* confdefs.h.  */
3343_ACEOF
3344cat confdefs.h >>conftest.$ac_ext
3345cat >>conftest.$ac_ext <<_ACEOF
3346/* end confdefs.h.  */
3347#ifdef _SEQUENT_
3348  yes;
3349#endif
3350
3351_ACEOF
3352if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3353  $EGREP "yes" >/dev/null 2>&1; then
3354  LIBS="$LIBS -lsocket -linet";seqptx=1
3355fi
3356rm -f conftest*
3357
3358
3359oldlibs="$LIBS"
3360LIBS="$LIBS -lelf"
3361{ echo "$as_me:$LINENO: checking SVR4..." >&5
3362echo "$as_me: checking SVR4..." >&6;}
3363echo "$as_me:$LINENO: checking for ANSI C header files" >&5
3364echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
3365if test "${ac_cv_header_stdc+set}" = set; then
3366  echo $ECHO_N "(cached) $ECHO_C" >&6
3367else
3368  cat >conftest.$ac_ext <<_ACEOF
3369#line $LINENO "configure"
3370/* confdefs.h.  */
3371_ACEOF
3372cat confdefs.h >>conftest.$ac_ext
3373cat >>conftest.$ac_ext <<_ACEOF
3374/* end confdefs.h.  */
3375#include <stdlib.h>
3376#include <stdarg.h>
3377#include <string.h>
3378#include <float.h>
3379
3380int
3381main ()
3382{
3383
3384  ;
3385  return 0;
3386}
3387_ACEOF
3388rm -f conftest.$ac_objext
3389if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3390  (eval $ac_compile) 2>&5
3391  ac_status=$?
3392  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3393  (exit $ac_status); } &&
3394         { ac_try='test -s conftest.$ac_objext'
3395  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3396  (eval $ac_try) 2>&5
3397  ac_status=$?
3398  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3399  (exit $ac_status); }; }; then
3400  ac_cv_header_stdc=yes
3401else
3402  echo "$as_me: failed program was:" >&5
3403sed 's/^/| /' conftest.$ac_ext >&5
3404
3405ac_cv_header_stdc=no
3406fi
3407rm -f conftest.$ac_objext conftest.$ac_ext
3408
3409if test $ac_cv_header_stdc = yes; then
3410  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3411  cat >conftest.$ac_ext <<_ACEOF
3412#line $LINENO "configure"
3413/* confdefs.h.  */
3414_ACEOF
3415cat confdefs.h >>conftest.$ac_ext
3416cat >>conftest.$ac_ext <<_ACEOF
3417/* end confdefs.h.  */
3418#include <string.h>
3419
3420_ACEOF
3421if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3422  $EGREP "memchr" >/dev/null 2>&1; then
3423  :
3424else
3425  ac_cv_header_stdc=no
3426fi
3427rm -f conftest*
3428
3429fi
3430
3431if test $ac_cv_header_stdc = yes; then
3432  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3433  cat >conftest.$ac_ext <<_ACEOF
3434#line $LINENO "configure"
3435/* confdefs.h.  */
3436_ACEOF
3437cat confdefs.h >>conftest.$ac_ext
3438cat >>conftest.$ac_ext <<_ACEOF
3439/* end confdefs.h.  */
3440#include <stdlib.h>
3441
3442_ACEOF
3443if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3444  $EGREP "free" >/dev/null 2>&1; then
3445  :
3446else
3447  ac_cv_header_stdc=no
3448fi
3449rm -f conftest*
3450
3451fi
3452
3453if test $ac_cv_header_stdc = yes; then
3454  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3455  if test "$cross_compiling" = yes; then
3456  :
3457else
3458  cat >conftest.$ac_ext <<_ACEOF
3459#line $LINENO "configure"
3460/* confdefs.h.  */
3461_ACEOF
3462cat confdefs.h >>conftest.$ac_ext
3463cat >>conftest.$ac_ext <<_ACEOF
3464/* end confdefs.h.  */
3465#include <ctype.h>
3466#if ((' ' & 0x0FF) == 0x020)
3467# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3468# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3469#else
3470# define ISLOWER(c) \
3471                   (('a' <= (c) && (c) <= 'i') \
3472                     || ('j' <= (c) && (c) <= 'r') \
3473                     || ('s' <= (c) && (c) <= 'z'))
3474# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
3475#endif
3476
3477#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3478int
3479main ()
3480{
3481  int i;
3482  for (i = 0; i < 256; i++)
3483    if (XOR (islower (i), ISLOWER (i))
3484        || toupper (i) != TOUPPER (i))
3485      exit(2);
3486  exit (0);
3487}
3488_ACEOF
3489rm -f conftest$ac_exeext
3490if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3491  (eval $ac_link) 2>&5
3492  ac_status=$?
3493  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3494  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3495  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3496  (eval $ac_try) 2>&5
3497  ac_status=$?
3498  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3499  (exit $ac_status); }; }; then
3500  :
3501else
3502  echo "$as_me: program exited with status $ac_status" >&5
3503echo "$as_me: failed program was:" >&5
3504sed 's/^/| /' conftest.$ac_ext >&5
3505
3506( exit $ac_status )
3507ac_cv_header_stdc=no
3508fi
3509rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
3510fi
3511fi
3512fi
3513echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
3514echo "${ECHO_T}$ac_cv_header_stdc" >&6
3515if test $ac_cv_header_stdc = yes; then
3516
3517cat >>confdefs.h <<\_ACEOF
3518#define STDC_HEADERS 1
3519_ACEOF
3520
3521fi
3522
3523# On IRIX 5.3, sys/types and inttypes.h are conflicting.
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
3534                  inttypes.h stdint.h unistd.h
3535do
3536as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3537echo "$as_me:$LINENO: checking for $ac_header" >&5
3538echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3539if eval "test \"\${$as_ac_Header+set}\" = set"; then
3540  echo $ECHO_N "(cached) $ECHO_C" >&6
3541else
3542  cat >conftest.$ac_ext <<_ACEOF
3543#line $LINENO "configure"
3544/* confdefs.h.  */
3545_ACEOF
3546cat confdefs.h >>conftest.$ac_ext
3547cat >>conftest.$ac_ext <<_ACEOF
3548/* end confdefs.h.  */
3549$ac_includes_default
3550
3551#include <$ac_header>
3552_ACEOF
3553rm -f conftest.$ac_objext
3554if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3555  (eval $ac_compile) 2>&5
3556  ac_status=$?
3557  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3558  (exit $ac_status); } &&
3559         { ac_try='test -s conftest.$ac_objext'
3560  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3561  (eval $ac_try) 2>&5
3562  ac_status=$?
3563  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3564  (exit $ac_status); }; }; then
3565  eval "$as_ac_Header=yes"
3566else
3567  echo "$as_me: failed program was:" >&5
3568sed 's/^/| /' conftest.$ac_ext >&5
3569
3570eval "$as_ac_Header=no"
3571fi
3572rm -f conftest.$ac_objext conftest.$ac_ext
3573fi
3574echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3575echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3576if test `eval echo '${'$as_ac_Header'}'` = yes; then
3577  cat >>confdefs.h <<_ACEOF
3578#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
3579_ACEOF
3580
3581fi
3582
3583done
3584
3585
3586cat >conftest.$ac_ext <<_ACEOF
3587#line $LINENO "configure"
3588/* confdefs.h.  */
3589_ACEOF
3590cat confdefs.h >>conftest.$ac_ext
3591cat >>conftest.$ac_ext <<_ACEOF
3592/* end confdefs.h.  */
3593#include <utmpx.h>
3594
3595int
3596main ()
3597{
3598
3599  ;
3600  return 0;
3601}
3602_ACEOF
3603rm -f conftest.$ac_objext conftest$ac_exeext
3604if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3605  (eval $ac_link) 2>&5
3606  ac_status=$?
3607  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3608  (exit $ac_status); } &&
3609         { ac_try='test -s conftest$ac_exeext'
3610  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3611  (eval $ac_try) 2>&5
3612  ac_status=$?
3613  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3614  (exit $ac_status); }; }; then
3615  if test "${ac_cv_header_dwarf_h+set}" = set; then
3616  echo "$as_me:$LINENO: checking for dwarf.h" >&5
3617echo $ECHO_N "checking for dwarf.h... $ECHO_C" >&6
3618if test "${ac_cv_header_dwarf_h+set}" = set; then
3619  echo $ECHO_N "(cached) $ECHO_C" >&6
3620fi
3621echo "$as_me:$LINENO: result: $ac_cv_header_dwarf_h" >&5
3622echo "${ECHO_T}$ac_cv_header_dwarf_h" >&6
3623else
3624  # Is the header compilable?
3625echo "$as_me:$LINENO: checking dwarf.h usability" >&5
3626echo $ECHO_N "checking dwarf.h usability... $ECHO_C" >&6
3627cat >conftest.$ac_ext <<_ACEOF
3628#line $LINENO "configure"
3629/* confdefs.h.  */
3630_ACEOF
3631cat confdefs.h >>conftest.$ac_ext
3632cat >>conftest.$ac_ext <<_ACEOF
3633/* end confdefs.h.  */
3634$ac_includes_default
3635#include <dwarf.h>
3636_ACEOF
3637rm -f conftest.$ac_objext
3638if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3639  (eval $ac_compile) 2>&5
3640  ac_status=$?
3641  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3642  (exit $ac_status); } &&
3643         { ac_try='test -s conftest.$ac_objext'
3644  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3645  (eval $ac_try) 2>&5
3646  ac_status=$?
3647  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3648  (exit $ac_status); }; }; then
3649  ac_header_compiler=yes
3650else
3651  echo "$as_me: failed program was:" >&5
3652sed 's/^/| /' conftest.$ac_ext >&5
3653
3654ac_header_compiler=no
3655fi
3656rm -f conftest.$ac_objext conftest.$ac_ext
3657echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
3658echo "${ECHO_T}$ac_header_compiler" >&6
3659
3660# Is the header present?
3661echo "$as_me:$LINENO: checking dwarf.h presence" >&5
3662echo $ECHO_N "checking dwarf.h presence... $ECHO_C" >&6
3663cat >conftest.$ac_ext <<_ACEOF
3664#line $LINENO "configure"
3665/* confdefs.h.  */
3666_ACEOF
3667cat confdefs.h >>conftest.$ac_ext
3668cat >>conftest.$ac_ext <<_ACEOF
3669/* end confdefs.h.  */
3670#include <dwarf.h>
3671_ACEOF
3672if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3673  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3674  ac_status=$?
3675  grep -v '^ *+' conftest.er1 >conftest.err
3676  rm -f conftest.er1
3677  cat conftest.err >&5
3678  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3679  (exit $ac_status); } >/dev/null; then
3680  if test -s conftest.err; then
3681    ac_cpp_err=$ac_c_preproc_warn_flag
3682  else
3683    ac_cpp_err=
3684  fi
3685else
3686  ac_cpp_err=yes
3687fi
3688if test -z "$ac_cpp_err"; then
3689  ac_header_preproc=yes
3690else
3691  echo "$as_me: failed program was:" >&5
3692sed 's/^/| /' conftest.$ac_ext >&5
3693
3694  ac_header_preproc=no
3695fi
3696rm -f conftest.err conftest.$ac_ext
3697echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
3698echo "${ECHO_T}$ac_header_preproc" >&6
3699
3700# So?  What about this header?
3701case $ac_header_compiler:$ac_header_preproc in
3702  yes:no )
3703    { echo "$as_me:$LINENO: WARNING: dwarf.h: accepted by the compiler, rejected by the preprocessor!" >&5
3704echo "$as_me: WARNING: dwarf.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
3705    { echo "$as_me:$LINENO: WARNING: dwarf.h: proceeding with the preprocessor's result" >&5
3706echo "$as_me: WARNING: dwarf.h: proceeding with the preprocessor's result" >&2;}
3707    (
3708      cat <<\_ASBOX
3709## ------------------------------------ ##
3710## Report this to bug-autoconf@gnu.org. ##
3711## ------------------------------------ ##
3712_ASBOX
3713    ) |
3714      sed "s/^/$as_me: WARNING:     /" >&2
3715    ;;
3716  no:yes )
3717    { echo "$as_me:$LINENO: WARNING: dwarf.h: present but cannot be compiled" >&5
3718echo "$as_me: WARNING: dwarf.h: present but cannot be compiled" >&2;}
3719    { echo "$as_me:$LINENO: WARNING: dwarf.h: check for missing prerequisite headers?" >&5
3720echo "$as_me: WARNING: dwarf.h: check for missing prerequisite headers?" >&2;}
3721    { echo "$as_me:$LINENO: WARNING: dwarf.h: proceeding with the preprocessor's result" >&5
3722echo "$as_me: WARNING: dwarf.h: proceeding with the preprocessor's result" >&2;}
3723    (
3724      cat <<\_ASBOX
3725## ------------------------------------ ##
3726## Report this to bug-autoconf@gnu.org. ##
3727## ------------------------------------ ##
3728_ASBOX
3729    ) |
3730      sed "s/^/$as_me: WARNING:     /" >&2
3731    ;;
3732esac
3733echo "$as_me:$LINENO: checking for dwarf.h" >&5
3734echo $ECHO_N "checking for dwarf.h... $ECHO_C" >&6
3735if test "${ac_cv_header_dwarf_h+set}" = set; then
3736  echo $ECHO_N "(cached) $ECHO_C" >&6
3737else
3738  ac_cv_header_dwarf_h=$ac_header_preproc
3739fi
3740echo "$as_me:$LINENO: result: $ac_cv_header_dwarf_h" >&5
3741echo "${ECHO_T}$ac_cv_header_dwarf_h" >&6
3742
3743fi
3744if test $ac_cv_header_dwarf_h = yes; then
3745  cat >>confdefs.h <<\_ACEOF
3746#define SVR4 1
3747_ACEOF
3748 cat >>confdefs.h <<\_ACEOF
3749#define BUGGYGETLOGIN 1
3750_ACEOF
3751
3752else
3753  if test "${ac_cv_header_elf_h+set}" = set; then
3754  echo "$as_me:$LINENO: checking for elf.h" >&5
3755echo $ECHO_N "checking for elf.h... $ECHO_C" >&6
3756if test "${ac_cv_header_elf_h+set}" = set; then
3757  echo $ECHO_N "(cached) $ECHO_C" >&6
3758fi
3759echo "$as_me:$LINENO: result: $ac_cv_header_elf_h" >&5
3760echo "${ECHO_T}$ac_cv_header_elf_h" >&6
3761else
3762  # Is the header compilable?
3763echo "$as_me:$LINENO: checking elf.h usability" >&5
3764echo $ECHO_N "checking elf.h usability... $ECHO_C" >&6
3765cat >conftest.$ac_ext <<_ACEOF
3766#line $LINENO "configure"
3767/* confdefs.h.  */
3768_ACEOF
3769cat confdefs.h >>conftest.$ac_ext
3770cat >>conftest.$ac_ext <<_ACEOF
3771/* end confdefs.h.  */
3772$ac_includes_default
3773#include <elf.h>
3774_ACEOF
3775rm -f conftest.$ac_objext
3776if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3777  (eval $ac_compile) 2>&5
3778  ac_status=$?
3779  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3780  (exit $ac_status); } &&
3781         { ac_try='test -s conftest.$ac_objext'
3782  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3783  (eval $ac_try) 2>&5
3784  ac_status=$?
3785  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3786  (exit $ac_status); }; }; then
3787  ac_header_compiler=yes
3788else
3789  echo "$as_me: failed program was:" >&5
3790sed 's/^/| /' conftest.$ac_ext >&5
3791
3792ac_header_compiler=no
3793fi
3794rm -f conftest.$ac_objext conftest.$ac_ext
3795echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
3796echo "${ECHO_T}$ac_header_compiler" >&6
3797
3798# Is the header present?
3799echo "$as_me:$LINENO: checking elf.h presence" >&5
3800echo $ECHO_N "checking elf.h presence... $ECHO_C" >&6
3801cat >conftest.$ac_ext <<_ACEOF
3802#line $LINENO "configure"
3803/* confdefs.h.  */
3804_ACEOF
3805cat confdefs.h >>conftest.$ac_ext
3806cat >>conftest.$ac_ext <<_ACEOF
3807/* end confdefs.h.  */
3808#include <elf.h>
3809_ACEOF
3810if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3811  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3812  ac_status=$?
3813  grep -v '^ *+' conftest.er1 >conftest.err
3814  rm -f conftest.er1
3815  cat conftest.err >&5
3816  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3817  (exit $ac_status); } >/dev/null; then
3818  if test -s conftest.err; then
3819    ac_cpp_err=$ac_c_preproc_warn_flag
3820  else
3821    ac_cpp_err=
3822  fi
3823else
3824  ac_cpp_err=yes
3825fi
3826if test -z "$ac_cpp_err"; then
3827  ac_header_preproc=yes
3828else
3829  echo "$as_me: failed program was:" >&5
3830sed 's/^/| /' conftest.$ac_ext >&5
3831
3832  ac_header_preproc=no
3833fi
3834rm -f conftest.err conftest.$ac_ext
3835echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
3836echo "${ECHO_T}$ac_header_preproc" >&6
3837
3838# So?  What about this header?
3839case $ac_header_compiler:$ac_header_preproc in
3840  yes:no )
3841    { echo "$as_me:$LINENO: WARNING: elf.h: accepted by the compiler, rejected by the preprocessor!" >&5
3842echo "$as_me: WARNING: elf.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
3843    { echo "$as_me:$LINENO: WARNING: elf.h: proceeding with the preprocessor's result" >&5
3844echo "$as_me: WARNING: elf.h: proceeding with the preprocessor's result" >&2;}
3845    (
3846      cat <<\_ASBOX
3847## ------------------------------------ ##
3848## Report this to bug-autoconf@gnu.org. ##
3849## ------------------------------------ ##
3850_ASBOX
3851    ) |
3852      sed "s/^/$as_me: WARNING:     /" >&2
3853    ;;
3854  no:yes )
3855    { echo "$as_me:$LINENO: WARNING: elf.h: present but cannot be compiled" >&5
3856echo "$as_me: WARNING: elf.h: present but cannot be compiled" >&2;}
3857    { echo "$as_me:$LINENO: WARNING: elf.h: check for missing prerequisite headers?" >&5
3858echo "$as_me: WARNING: elf.h: check for missing prerequisite headers?" >&2;}
3859    { echo "$as_me:$LINENO: WARNING: elf.h: proceeding with the preprocessor's result" >&5
3860echo "$as_me: WARNING: elf.h: proceeding with the preprocessor's result" >&2;}
3861    (
3862      cat <<\_ASBOX
3863## ------------------------------------ ##
3864## Report this to bug-autoconf@gnu.org. ##
3865## ------------------------------------ ##
3866_ASBOX
3867    ) |
3868      sed "s/^/$as_me: WARNING:     /" >&2
3869    ;;
3870esac
3871echo "$as_me:$LINENO: checking for elf.h" >&5
3872echo $ECHO_N "checking for elf.h... $ECHO_C" >&6
3873if test "${ac_cv_header_elf_h+set}" = set; then
3874  echo $ECHO_N "(cached) $ECHO_C" >&6
3875else
3876  ac_cv_header_elf_h=$ac_header_preproc
3877fi
3878echo "$as_me:$LINENO: result: $ac_cv_header_elf_h" >&5
3879echo "${ECHO_T}$ac_cv_header_elf_h" >&6
3880
3881fi
3882if test $ac_cv_header_elf_h = yes; then
3883  cat >>confdefs.h <<\_ACEOF
3884#define SVR4 1
3885_ACEOF
3886 cat >>confdefs.h <<\_ACEOF
3887#define BUGGYGETLOGIN 1
3888_ACEOF
3889
3890fi
3891
3892
3893fi
3894
3895
3896
3897else
3898  echo "$as_me: failed program was:" >&5
3899sed 's/^/| /' conftest.$ac_ext >&5
3900
3901LIBS="$oldlibs"
3902fi
3903rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3904
3905{ echo "$as_me:$LINENO: checking for Solaris 2.x..." >&5
3906echo "$as_me: checking for Solaris 2.x..." >&6;}
3907cat >conftest.$ac_ext <<_ACEOF
3908#line $LINENO "configure"
3909/* confdefs.h.  */
3910_ACEOF
3911cat confdefs.h >>conftest.$ac_ext
3912cat >>conftest.$ac_ext <<_ACEOF
3913/* end confdefs.h.  */
3914#if defined(SVR4) && defined(sun)
3915  yes
3916#endif
3917
3918_ACEOF
3919if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3920  $EGREP "yes" >/dev/null 2>&1; then
3921  LIBS="$LIBS -lsocket -lnsl -lkstat"
3922fi
3923rm -f conftest*
3924
3925
3926
3927
3928{ echo "$as_me:$LINENO: checking BSD job jontrol..." >&5
3929echo "$as_me: checking BSD job jontrol..." >&6;}
3930cat >conftest.$ac_ext <<_ACEOF
3931#line $LINENO "configure"
3932/* confdefs.h.  */
3933_ACEOF
3934cat confdefs.h >>conftest.$ac_ext
3935cat >>conftest.$ac_ext <<_ACEOF
3936/* end confdefs.h.  */
3937#include <sys/types.h>
3938#include <sys/ioctl.h>
3939
3940int
3941main ()
3942{
3943
3944#ifdef POSIX
3945tcsetpgrp(0, 0);
3946#else
3947int x = TIOCSPGRP;
3948#ifdef SYSV
3949setpgrp();
3950#else
3951int y = TIOCNOTTY;
3952#endif
3953#endif
3954
3955  ;
3956  return 0;
3957}
3958_ACEOF
3959rm -f conftest.$ac_objext conftest$ac_exeext
3960if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3961  (eval $ac_link) 2>&5
3962  ac_status=$?
3963  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3964  (exit $ac_status); } &&
3965         { ac_try='test -s conftest$ac_exeext'
3966  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3967  (eval $ac_try) 2>&5
3968  ac_status=$?
3969  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3970  (exit $ac_status); }; }; then
3971  echo "- you have jobcontrol" 1>&6
3972 cat >>confdefs.h <<\_ACEOF
3973#define BSDJOBS 1
3974_ACEOF
3975
3976else
3977  echo "$as_me: failed program was:" >&5
3978sed 's/^/| /' conftest.$ac_ext >&5
3979
3980echo "- you don't have jobcontrol" 1>&6
3981
3982fi
3983rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3984
3985{ echo "$as_me:$LINENO: checking setreuid..." >&5
3986echo "$as_me: checking setreuid..." >&6;}
3987cat >conftest.$ac_ext <<_ACEOF
3988#line $LINENO "configure"
3989/* confdefs.h.  */
3990_ACEOF
3991cat confdefs.h >>conftest.$ac_ext
3992cat >>conftest.$ac_ext <<_ACEOF
3993/* end confdefs.h.  */
3994
3995int
3996main ()
3997{
3998
3999#ifdef __hpux
4000setresuid(0, 0, 0);
4001#else
4002setreuid(0, 0);
4003#endif
4004
4005  ;
4006  return 0;
4007}
4008_ACEOF
4009rm -f conftest.$ac_objext conftest$ac_exeext
4010if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4011  (eval $ac_link) 2>&5
4012  ac_status=$?
4013  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4014  (exit $ac_status); } &&
4015         { ac_try='test -s conftest$ac_exeext'
4016  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4017  (eval $ac_try) 2>&5
4018  ac_status=$?
4019  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4020  (exit $ac_status); }; }; then
4021  cat >>confdefs.h <<\_ACEOF
4022#define HAVE_SETREUID 1
4023_ACEOF
4024
4025else
4026  echo "$as_me: failed program was:" >&5
4027sed 's/^/| /' conftest.$ac_ext >&5
4028
4029fi
4030rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4031{ echo "$as_me:$LINENO: checking seteuid..." >&5
4032echo "$as_me: checking seteuid..." >&6;}
4033cat >conftest.$ac_ext <<_ACEOF
4034#line $LINENO "configure"
4035/* confdefs.h.  */
4036_ACEOF
4037cat confdefs.h >>conftest.$ac_ext
4038cat >>conftest.$ac_ext <<_ACEOF
4039/* end confdefs.h.  */
4040
4041int
4042main ()
4043{
4044
4045#if defined(linux) || defined(NeXT) || defined(_AUX_SOURCE) || defined(AUX) || defined(ultrix) || (defined(sun) && defined(SVR4)) || defined(ISC) || defined(sony_news)
4046seteuid_is_broken(0);
4047#else
4048seteuid(0);
4049#endif
4050
4051  ;
4052  return 0;
4053}
4054_ACEOF
4055rm -f conftest.$ac_objext conftest$ac_exeext
4056if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4057  (eval $ac_link) 2>&5
4058  ac_status=$?
4059  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4060  (exit $ac_status); } &&
4061         { ac_try='test -s conftest$ac_exeext'
4062  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4063  (eval $ac_try) 2>&5
4064  ac_status=$?
4065  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4066  (exit $ac_status); }; }; then
4067  cat >>confdefs.h <<\_ACEOF
4068#define HAVE_SETEUID 1
4069_ACEOF
4070
4071else
4072  echo "$as_me: failed program was:" >&5
4073sed 's/^/| /' conftest.$ac_ext >&5
4074
4075fi
4076rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4077
4078
4079{ echo "$as_me:$LINENO: checking select..." >&5
4080echo "$as_me: checking select..." >&6;}
4081cat >conftest.$ac_ext <<_ACEOF
4082#line $LINENO "configure"
4083/* confdefs.h.  */
4084_ACEOF
4085cat confdefs.h >>conftest.$ac_ext
4086cat >>conftest.$ac_ext <<_ACEOF
4087/* end confdefs.h.  */
4088
4089int
4090main ()
4091{
4092select(0, 0, 0, 0, 0);
4093  ;
4094  return 0;
4095}
4096_ACEOF
4097rm -f conftest.$ac_objext conftest$ac_exeext
4098if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4099  (eval $ac_link) 2>&5
4100  ac_status=$?
4101  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4102  (exit $ac_status); } &&
4103         { ac_try='test -s conftest$ac_exeext'
4104  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4105  (eval $ac_try) 2>&5
4106  ac_status=$?
4107  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4108  (exit $ac_status); }; }; then
4109  :
4110else
4111  echo "$as_me: failed program was:" >&5
4112sed 's/^/| /' conftest.$ac_ext >&5
4113
4114LIBS="$LIBS -lnet -lnsl"
4115{ echo "$as_me:$LINENO: checking select with $LIBS..." >&5
4116echo "$as_me: checking select with $LIBS..." >&6;}
4117cat >conftest.$ac_ext <<_ACEOF
4118#line $LINENO "configure"
4119/* confdefs.h.  */
4120_ACEOF
4121cat confdefs.h >>conftest.$ac_ext
4122cat >>conftest.$ac_ext <<_ACEOF
4123/* end confdefs.h.  */
4124
4125int
4126main ()
4127{
4128select(0, 0, 0, 0, 0);
4129  ;
4130  return 0;
4131}
4132_ACEOF
4133rm -f conftest.$ac_objext conftest$ac_exeext
4134if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4135  (eval $ac_link) 2>&5
4136  ac_status=$?
4137  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4138  (exit $ac_status); } &&
4139         { ac_try='test -s conftest$ac_exeext'
4140  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4141  (eval $ac_try) 2>&5
4142  ac_status=$?
4143  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4144  (exit $ac_status); }; }; then
4145  :
4146else
4147  echo "$as_me: failed program was:" >&5
4148sed 's/^/| /' conftest.$ac_ext >&5
4149
4150{ { echo "$as_me:$LINENO: error: !!! no select - no screen" >&5
4151echo "$as_me: error: !!! no select - no screen" >&2;}
4152   { (exit 1); exit 1; }; }
4153fi
4154rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4155
4156fi
4157rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4158
4159{ echo "$as_me:$LINENO: checking fifos..." >&5
4160echo "$as_me: checking fifos..." >&6;}
4161if test "$cross_compiling" = yes; then
4162  { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
4163See \`config.log' for more details." >&5
4164echo "$as_me: error: cannot run test program while cross compiling
4165See \`config.log' for more details." >&2;}
4166   { (exit 1); exit 1; }; }
4167else
4168  cat >conftest.$ac_ext <<_ACEOF
4169#line $LINENO "configure"
4170/* confdefs.h.  */
4171_ACEOF
4172cat confdefs.h >>conftest.$ac_ext
4173cat >>conftest.$ac_ext <<_ACEOF
4174/* end confdefs.h.  */
4175
4176#include <sys/types.h>
4177#include <sys/stat.h>
4178#include <fcntl.h>
4179
4180#ifndef O_NONBLOCK
4181#define O_NONBLOCK O_NDELAY
4182#endif
4183#ifndef S_IFIFO
4184#define S_IFIFO 0010000
4185#endif
4186
4187char *fin = "/tmp/conftest$$";
4188
4189main()
4190{
4191  struct stat stb;
4192#ifdef FD_SET
4193  fd_set f;
4194#else
4195  int f;
4196#endif
4197
4198  (void)alarm(5);
4199#ifdef POSIX
4200  if (mkfifo(fin, 0777))
4201#else
4202  if (mknod(fin, S_IFIFO|0777, 0))
4203#endif
4204    exit(1);
4205  if (stat(fin, &stb) || (stb.st_mode & S_IFIFO) != S_IFIFO)
4206    exit(1);
4207  close(0);
4208#ifdef __386BSD__
4209  /*
4210   * The next test fails under 386BSD, but screen works using fifos.
4211   * Fifos in O_RDWR mode are only used for the BROKEN_PIPE case and for
4212   * the select() configuration test.
4213   */
4214  exit(0);
4215#endif
4216  if (open(fin, O_RDONLY | O_NONBLOCK))
4217    exit(1);
4218  if (fork() == 0)
4219    {
4220      close(0);
4221      if (open(fin, O_WRONLY | O_NONBLOCK))
4222	exit(1);
4223      close(0);
4224      if (open(fin, O_WRONLY | O_NONBLOCK))
4225	exit(1);
4226      if (write(0, "TEST", 4) == -1)
4227	exit(1);
4228      exit(0);
4229    }
4230#ifdef FD_SET
4231  FD_SET(0, &f);
4232#else
4233  f = 1;
4234#endif
4235  if (select(1, &f, 0, 0, 0) == -1)
4236    exit(1);
4237  exit(0);
4238}
4239
4240_ACEOF
4241rm -f conftest$ac_exeext
4242if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4243  (eval $ac_link) 2>&5
4244  ac_status=$?
4245  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4246  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4247  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4248  (eval $ac_try) 2>&5
4249  ac_status=$?
4250  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4251  (exit $ac_status); }; }; then
4252  echo "- your fifos are usable" 1>&6
4253 fifo=1
4254else
4255  echo "$as_me: program exited with status $ac_status" >&5
4256echo "$as_me: failed program was:" >&5
4257sed 's/^/| /' conftest.$ac_ext >&5
4258
4259( exit $ac_status )
4260echo "- your fifos are not usable" 1>&6
4261
4262fi
4263rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4264fi
4265rm -f /tmp/conftest*
4266
4267if test -n "$fifo"; then
4268{ echo "$as_me:$LINENO: checking for broken fifo implementation..." >&5
4269echo "$as_me: checking for broken fifo implementation..." >&6;}
4270if test "$cross_compiling" = yes; then
4271  { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
4272See \`config.log' for more details." >&5
4273echo "$as_me: error: cannot run test program while cross compiling
4274See \`config.log' for more details." >&2;}
4275   { (exit 1); exit 1; }; }
4276else
4277  cat >conftest.$ac_ext <<_ACEOF
4278#line $LINENO "configure"
4279/* confdefs.h.  */
4280_ACEOF
4281cat confdefs.h >>conftest.$ac_ext
4282cat >>conftest.$ac_ext <<_ACEOF
4283/* end confdefs.h.  */
4284
4285#include <sys/types.h>
4286#include <fcntl.h>
4287#include <sys/time.h>
4288#include <sys/stat.h>
4289
4290#ifndef O_NONBLOCK
4291#define O_NONBLOCK O_NDELAY
4292#endif
4293#ifndef S_IFIFO
4294#define S_IFIFO 0010000
4295#endif
4296
4297char *fin = "/tmp/conftest$$";
4298
4299main()
4300{
4301  struct timeval tv;
4302#ifdef FD_SET
4303  fd_set f;
4304#else
4305  int f;
4306#endif
4307
4308#ifdef POSIX
4309  if (mkfifo(fin, 0600))
4310#else
4311  if (mknod(fin, S_IFIFO|0600, 0))
4312#endif
4313    exit(1);
4314  close(0);
4315  if (open(fin, O_RDONLY|O_NONBLOCK))
4316    exit(1);
4317#ifdef FD_SET
4318  FD_SET(0, &f);
4319#else
4320  f = 1;
4321#endif
4322  tv.tv_sec = 1;
4323  tv.tv_usec = 0;
4324  if (select(1, &f, 0, 0, &tv))
4325    exit(1);
4326  exit(0);
4327}
4328
4329_ACEOF
4330rm -f conftest$ac_exeext
4331if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4332  (eval $ac_link) 2>&5
4333  ac_status=$?
4334  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4335  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4336  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4337  (eval $ac_try) 2>&5
4338  ac_status=$?
4339  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4340  (exit $ac_status); }; }; then
4341  echo "- your implementation is ok" 1>&6
4342
4343else
4344  echo "$as_me: program exited with status $ac_status" >&5
4345echo "$as_me: failed program was:" >&5
4346sed 's/^/| /' conftest.$ac_ext >&5
4347
4348( exit $ac_status )
4349echo "- you have a broken implementation" 1>&6
4350 cat >>confdefs.h <<\_ACEOF
4351#define BROKEN_PIPE 1
4352_ACEOF
4353 fifobr=1
4354fi
4355rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4356fi
4357rm -f /tmp/conftest*
4358fi
4359
4360
4361{ echo "$as_me:$LINENO: checking sockets..." >&5
4362echo "$as_me: checking sockets..." >&6;}
4363if test "$cross_compiling" = yes; then
4364  { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
4365See \`config.log' for more details." >&5
4366echo "$as_me: error: cannot run test program while cross compiling
4367See \`config.log' for more details." >&2;}
4368   { (exit 1); exit 1; }; }
4369else
4370  cat >conftest.$ac_ext <<_ACEOF
4371#line $LINENO "configure"
4372/* confdefs.h.  */
4373_ACEOF
4374cat confdefs.h >>conftest.$ac_ext
4375cat >>conftest.$ac_ext <<_ACEOF
4376/* end confdefs.h.  */
4377
4378#include <sys/types.h>
4379#include <sys/socket.h>
4380#include <sys/un.h>
4381#include <fcntl.h>
4382
4383char *son = "/tmp/conftest$$";
4384
4385main()
4386{
4387  int s1, s2, l;
4388  struct sockaddr_un a;
4389#ifdef FD_SET
4390  fd_set f;
4391#else
4392  int f;
4393#endif
4394
4395  (void)alarm(5);
4396  if ((s1 = socket(AF_UNIX, SOCK_STREAM, 0)) == -1)
4397    exit(1);
4398  a.sun_family = AF_UNIX;
4399  strcpy(a.sun_path, son);
4400  (void) unlink(son);
4401  if (bind(s1, (struct sockaddr *) &a, strlen(son)+2) == -1)
4402    exit(1);
4403  if (listen(s1, 2))
4404    exit(1);
4405  if (fork() == 0)
4406    {
4407      if ((s2 = socket(AF_UNIX, SOCK_STREAM, 0)) == -1)
4408	kill(getppid(), 3);
4409      (void)connect(s2, (struct sockaddr *)&a, strlen(son) + 2);
4410      if (write(s2, "HELLO", 5) == -1)
4411	kill(getppid(), 3);
4412      exit(0);
4413    }
4414  l = sizeof(a);
4415  close(0);
4416  if (accept(s1, &a, &l))
4417    exit(1);
4418#ifdef FD_SET
4419  FD_SET(0, &f);
4420#else
4421  f = 1;
4422#endif
4423  if (select(1, &f, 0, 0, 0) == -1)
4424    exit(1);
4425  exit(0);
4426}
4427
4428_ACEOF
4429rm -f conftest$ac_exeext
4430if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4431  (eval $ac_link) 2>&5
4432  ac_status=$?
4433  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4434  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4435  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4436  (eval $ac_try) 2>&5
4437  ac_status=$?
4438  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4439  (exit $ac_status); }; }; then
4440  echo "- your sockets are usable" 1>&6
4441 sock=1
4442else
4443  echo "$as_me: program exited with status $ac_status" >&5
4444echo "$as_me: failed program was:" >&5
4445sed 's/^/| /' conftest.$ac_ext >&5
4446
4447( exit $ac_status )
4448echo "- your sockets are not usable" 1>&6
4449
4450fi
4451rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4452fi
4453rm -f /tmp/conftest*
4454
4455if test -n "$sock"; then
4456{ echo "$as_me:$LINENO: checking socket implementation..." >&5
4457echo "$as_me: checking socket implementation..." >&6;}
4458if test "$cross_compiling" = yes; then
4459  { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
4460See \`config.log' for more details." >&5
4461echo "$as_me: error: cannot run test program while cross compiling
4462See \`config.log' for more details." >&2;}
4463   { (exit 1); exit 1; }; }
4464else
4465  cat >conftest.$ac_ext <<_ACEOF
4466#line $LINENO "configure"
4467/* confdefs.h.  */
4468_ACEOF
4469cat confdefs.h >>conftest.$ac_ext
4470cat >>conftest.$ac_ext <<_ACEOF
4471/* end confdefs.h.  */
4472
4473#include <sys/types.h>
4474#include <sys/stat.h>
4475#include <sys/socket.h>
4476#include <sys/un.h>
4477
4478char *son = "/tmp/conftest$$";
4479
4480main()
4481{
4482  int s;
4483  struct stat stb;
4484  struct sockaddr_un a;
4485  if ((s = socket(AF_UNIX, SOCK_STREAM, 0)) == -1)
4486    exit(0);
4487  a.sun_family = AF_UNIX;
4488  strcpy(a.sun_path, son);
4489  (void) unlink(son);
4490  if (bind(s, (struct sockaddr *) &a, strlen(son)+2) == -1)
4491    exit(0);
4492  if (stat(son, &stb))
4493    exit(1);
4494  close(s);
4495  exit(0);
4496}
4497
4498_ACEOF
4499rm -f conftest$ac_exeext
4500if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4501  (eval $ac_link) 2>&5
4502  ac_status=$?
4503  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4504  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4505  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4506  (eval $ac_try) 2>&5
4507  ac_status=$?
4508  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4509  (exit $ac_status); }; }; then
4510  echo "- you are normal" 1>&6
4511
4512else
4513  echo "$as_me: program exited with status $ac_status" >&5
4514echo "$as_me: failed program was:" >&5
4515sed 's/^/| /' conftest.$ac_ext >&5
4516
4517( exit $ac_status )
4518echo "- unix domain sockets are not kept in the filesystem" 1>&6
4519
4520cat >>confdefs.h <<\_ACEOF
4521#define SOCK_NOT_IN_FS 1
4522_ACEOF
4523 socknofs=1
4524fi
4525rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4526fi
4527rm -f /tmp/conftest*
4528fi
4529
4530
4531if test -n "$fifo"; then
4532  if test -n "$sock"; then
4533    if test -n "$nore"; then
4534      echo "- hmmm... better take the fifos" 1>&6
4535
4536      cat >>confdefs.h <<\_ACEOF
4537#define NAMEDPIPE 1
4538_ACEOF
4539
4540    elif test -n "$fifobr"; then
4541      echo "- as your fifos are broken lets use the sockets." 1>&6
4542
4543    else
4544      echo "- both sockets and fifos usable. let's take fifos." 1>&6
4545
4546      cat >>confdefs.h <<\_ACEOF
4547#define NAMEDPIPE 1
4548_ACEOF
4549
4550    fi
4551  else
4552    echo "- using named pipes" 1>&6
4553
4554    cat >>confdefs.h <<\_ACEOF
4555#define NAMEDPIPE 1
4556_ACEOF
4557
4558  fi
4559elif test -n "$sock"; then
4560  echo "- using unix-domain sockets" 1>&6
4561
4562else
4563  { { echo "$as_me:$LINENO: error: you have neither usable sockets nor usable pipes -> no screen" >&5
4564echo "$as_me: error: you have neither usable sockets nor usable pipes -> no screen" >&2;}
4565   { (exit 1); exit 1; }; }
4566fi
4567
4568
4569{ echo "$as_me:$LINENO: checking select return value..." >&5
4570echo "$as_me: checking select return value..." >&6;}
4571if test "$cross_compiling" = yes; then
4572  { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
4573See \`config.log' for more details." >&5
4574echo "$as_me: error: cannot run test program while cross compiling
4575See \`config.log' for more details." >&2;}
4576   { (exit 1); exit 1; }; }
4577else
4578  cat >conftest.$ac_ext <<_ACEOF
4579#line $LINENO "configure"
4580/* confdefs.h.  */
4581_ACEOF
4582cat confdefs.h >>conftest.$ac_ext
4583cat >>conftest.$ac_ext <<_ACEOF
4584/* end confdefs.h.  */
4585
4586#include <sys/types.h>
4587#include <sys/stat.h>
4588#include <fcntl.h>
4589
4590char *nam = "/tmp/conftest$$";
4591
4592#ifdef NAMEDPIPE
4593
4594#ifndef O_NONBLOCK
4595#define O_NONBLOCK O_NDELAY
4596#endif
4597#ifndef S_IFIFO
4598#define S_IFIFO 0010000
4599#endif
4600
4601
4602main()
4603{
4604#ifdef FD_SET
4605  fd_set f;
4606#else
4607  int f;
4608#endif
4609
4610#ifdef __FreeBSD__
4611/* From Andrew A. Chernov (ache@astral.msk.su):
4612 * opening RDWR fifo fails in BSD 4.4, but select return values are
4613 * right.
4614 */
4615  exit(0);
4616#endif
4617  (void)alarm(5);
4618#ifdef POSIX
4619  if (mkfifo(nam, 0777))
4620#else
4621  if (mknod(nam, S_IFIFO|0777, 0))
4622#endif
4623    exit(1);
4624  close(0);
4625  if (open(nam, O_RDWR | O_NONBLOCK))
4626    exit(1);
4627  if (write(0, "TEST", 4) == -1)
4628    exit(1);
4629
4630#else
4631
4632#include <sys/types.h>
4633#include <sys/socket.h>
4634#include <sys/un.h>
4635
4636main()
4637{
4638  int s1, s2, l;
4639  struct sockaddr_un a;
4640#ifdef FD_SET
4641  fd_set f;
4642#else
4643  int f;
4644#endif
4645
4646  (void)alarm(5);
4647  if ((s1 = socket(AF_UNIX, SOCK_STREAM, 0)) == -1)
4648    exit(1);
4649  a.sun_family = AF_UNIX;
4650  strcpy(a.sun_path, nam);
4651  (void) unlink(nam);
4652  if (bind(s1, (struct sockaddr *) &a, strlen(nam)+2) == -1)
4653    exit(1);
4654  if (listen(s1, 2))
4655    exit(1);
4656  if (fork() == 0)
4657    {
4658      if ((s2 = socket(AF_UNIX, SOCK_STREAM, 0)) == -1)
4659	kill(getppid(), 3);
4660      (void)connect(s2, (struct sockaddr *)&a, strlen(nam) + 2);
4661      if (write(s2, "HELLO", 5) == -1)
4662	kill(getppid(), 3);
4663      exit(0);
4664    }
4665  l = sizeof(a);
4666  close(0);
4667  if (accept(s1, (struct sockaddr *)&a, &l))
4668    exit(1);
4669#endif
4670
4671
4672#ifdef FD_SET
4673  FD_SET(0, &f);
4674#else
4675  f = 1;
4676#endif
4677  if (select(1, &f, 0, 0, 0) == -1)
4678    exit(1);
4679  if (select(1, &f, &f, 0, 0) != 2)
4680    exit(1);
4681  exit(0);
4682}
4683
4684_ACEOF
4685rm -f conftest$ac_exeext
4686if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4687  (eval $ac_link) 2>&5
4688  ac_status=$?
4689  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4690  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4691  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4692  (eval $ac_try) 2>&5
4693  ac_status=$?
4694  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4695  (exit $ac_status); }; }; then
4696  echo "- select is ok" 1>&6
4697
4698else
4699  echo "$as_me: program exited with status $ac_status" >&5
4700echo "$as_me: failed program was:" >&5
4701sed 's/^/| /' conftest.$ac_ext >&5
4702
4703( exit $ac_status )
4704echo "- select can't count" 1>&6
4705 cat >>confdefs.h <<\_ACEOF
4706#define SELECT_BROKEN 1
4707_ACEOF
4708
4709fi
4710rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4711fi
4712
4713{ echo "$as_me:$LINENO: checking for tgetent..." >&5
4714echo "$as_me: checking for tgetent..." >&6;}
4715cat >conftest.$ac_ext <<_ACEOF
4716#line $LINENO "configure"
4717/* confdefs.h.  */
4718_ACEOF
4719cat confdefs.h >>conftest.$ac_ext
4720cat >>conftest.$ac_ext <<_ACEOF
4721/* end confdefs.h.  */
4722
4723int
4724main ()
4725{
4726tgetent((char *)0, (char *)0);
4727  ;
4728  return 0;
4729}
4730_ACEOF
4731rm -f conftest.$ac_objext conftest$ac_exeext
4732if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4733  (eval $ac_link) 2>&5
4734  ac_status=$?
4735  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4736  (exit $ac_status); } &&
4737         { ac_try='test -s conftest$ac_exeext'
4738  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4739  (eval $ac_try) 2>&5
4740  ac_status=$?
4741  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4742  (exit $ac_status); }; }; then
4743  :
4744else
4745  echo "$as_me: failed program was:" >&5
4746sed 's/^/| /' conftest.$ac_ext >&5
4747
4748olibs="$LIBS"
4749LIBS="-lcurses $olibs"
4750{ echo "$as_me:$LINENO: checking libcurses..." >&5
4751echo "$as_me: checking libcurses..." >&6;}
4752cat >conftest.$ac_ext <<_ACEOF
4753#line $LINENO "configure"
4754/* confdefs.h.  */
4755_ACEOF
4756cat confdefs.h >>conftest.$ac_ext
4757cat >>conftest.$ac_ext <<_ACEOF
4758/* end confdefs.h.  */
4759
4760int
4761main ()
4762{
4763
4764#ifdef __hpux
4765__sorry_hpux_libcurses_is_totally_broken_in_10_10();
4766#else
4767tgetent((char *)0, (char *)0);
4768#endif
4769
4770  ;
4771  return 0;
4772}
4773_ACEOF
4774rm -f conftest.$ac_objext conftest$ac_exeext
4775if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4776  (eval $ac_link) 2>&5
4777  ac_status=$?
4778  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4779  (exit $ac_status); } &&
4780         { ac_try='test -s conftest$ac_exeext'
4781  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4782  (eval $ac_try) 2>&5
4783  ac_status=$?
4784  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4785  (exit $ac_status); }; }; then
4786  :
4787else
4788  echo "$as_me: failed program was:" >&5
4789sed 's/^/| /' conftest.$ac_ext >&5
4790
4791LIBS="-ltermcap $olibs"
4792{ echo "$as_me:$LINENO: checking libtermcap..." >&5
4793echo "$as_me: checking libtermcap..." >&6;}
4794cat >conftest.$ac_ext <<_ACEOF
4795#line $LINENO "configure"
4796/* confdefs.h.  */
4797_ACEOF
4798cat confdefs.h >>conftest.$ac_ext
4799cat >>conftest.$ac_ext <<_ACEOF
4800/* end confdefs.h.  */
4801
4802int
4803main ()
4804{
4805tgetent((char *)0, (char *)0);
4806  ;
4807  return 0;
4808}
4809_ACEOF
4810rm -f conftest.$ac_objext conftest$ac_exeext
4811if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4812  (eval $ac_link) 2>&5
4813  ac_status=$?
4814  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4815  (exit $ac_status); } &&
4816         { ac_try='test -s conftest$ac_exeext'
4817  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4818  (eval $ac_try) 2>&5
4819  ac_status=$?
4820  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4821  (exit $ac_status); }; }; then
4822  :
4823else
4824  echo "$as_me: failed program was:" >&5
4825sed 's/^/| /' conftest.$ac_ext >&5
4826
4827LIBS="-ltermlib $olibs"
4828{ echo "$as_me:$LINENO: checking libtermlib..." >&5
4829echo "$as_me: checking libtermlib..." >&6;}
4830cat >conftest.$ac_ext <<_ACEOF
4831#line $LINENO "configure"
4832/* confdefs.h.  */
4833_ACEOF
4834cat confdefs.h >>conftest.$ac_ext
4835cat >>conftest.$ac_ext <<_ACEOF
4836/* end confdefs.h.  */
4837
4838int
4839main ()
4840{
4841tgetent((char *)0, (char *)0);
4842  ;
4843  return 0;
4844}
4845_ACEOF
4846rm -f conftest.$ac_objext conftest$ac_exeext
4847if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4848  (eval $ac_link) 2>&5
4849  ac_status=$?
4850  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4851  (exit $ac_status); } &&
4852         { ac_try='test -s conftest$ac_exeext'
4853  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4854  (eval $ac_try) 2>&5
4855  ac_status=$?
4856  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4857  (exit $ac_status); }; }; then
4858  :
4859else
4860  echo "$as_me: failed program was:" >&5
4861sed 's/^/| /' conftest.$ac_ext >&5
4862
4863LIBS="-lncurses $olibs"
4864{ echo "$as_me:$LINENO: checking libncurses..." >&5
4865echo "$as_me: checking libncurses..." >&6;}
4866cat >conftest.$ac_ext <<_ACEOF
4867#line $LINENO "configure"
4868/* confdefs.h.  */
4869_ACEOF
4870cat confdefs.h >>conftest.$ac_ext
4871cat >>conftest.$ac_ext <<_ACEOF
4872/* end confdefs.h.  */
4873
4874int
4875main ()
4876{
4877tgetent((char *)0, (char *)0);
4878  ;
4879  return 0;
4880}
4881_ACEOF
4882rm -f conftest.$ac_objext conftest$ac_exeext
4883if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4884  (eval $ac_link) 2>&5
4885  ac_status=$?
4886  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4887  (exit $ac_status); } &&
4888         { ac_try='test -s conftest$ac_exeext'
4889  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4890  (eval $ac_try) 2>&5
4891  ac_status=$?
4892  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4893  (exit $ac_status); }; }; then
4894  :
4895else
4896  echo "$as_me: failed program was:" >&5
4897sed 's/^/| /' conftest.$ac_ext >&5
4898
4899{ { echo "$as_me:$LINENO: error: !!! no tgetent - no screen" >&5
4900echo "$as_me: error: !!! no tgetent - no screen" >&2;}
4901   { (exit 1); exit 1; }; }
4902fi
4903rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4904fi
4905rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4906fi
4907rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4908fi
4909rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4910fi
4911rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4912
4913if test "$cross_compiling" = yes; then
4914  { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
4915See \`config.log' for more details." >&5
4916echo "$as_me: error: cannot run test program while cross compiling
4917See \`config.log' for more details." >&2;}
4918   { (exit 1); exit 1; }; }
4919else
4920  cat >conftest.$ac_ext <<_ACEOF
4921#line $LINENO "configure"
4922/* confdefs.h.  */
4923_ACEOF
4924cat confdefs.h >>conftest.$ac_ext
4925cat >>conftest.$ac_ext <<_ACEOF
4926/* end confdefs.h.  */
4927
4928main()
4929{
4930 exit(strcmp(tgoto("%p1%d", 0, 1), "1") ? 0 : 1);
4931}
4932_ACEOF
4933rm -f conftest$ac_exeext
4934if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4935  (eval $ac_link) 2>&5
4936  ac_status=$?
4937  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4938  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4939  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4940  (eval $ac_try) 2>&5
4941  ac_status=$?
4942  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4943  (exit $ac_status); }; }; then
4944  echo "- you use the termcap database" 1>&6
4945
4946else
4947  echo "$as_me: program exited with status $ac_status" >&5
4948echo "$as_me: failed program was:" >&5
4949sed 's/^/| /' conftest.$ac_ext >&5
4950
4951( exit $ac_status )
4952echo "- you use the terminfo database" 1>&6
4953 cat >>confdefs.h <<\_ACEOF
4954#define TERMINFO 1
4955_ACEOF
4956
4957fi
4958rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4959fi
4960{ echo "$as_me:$LINENO: checking ospeed..." >&5
4961echo "$as_me: checking ospeed..." >&6;}
4962cat >conftest.$ac_ext <<_ACEOF
4963#line $LINENO "configure"
4964/* confdefs.h.  */
4965_ACEOF
4966cat confdefs.h >>conftest.$ac_ext
4967cat >>conftest.$ac_ext <<_ACEOF
4968/* end confdefs.h.  */
4969extern short ospeed;
4970int
4971main ()
4972{
4973ospeed=5;
4974  ;
4975  return 0;
4976}
4977_ACEOF
4978rm -f conftest.$ac_objext conftest$ac_exeext
4979if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4980  (eval $ac_link) 2>&5
4981  ac_status=$?
4982  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4983  (exit $ac_status); } &&
4984         { ac_try='test -s conftest$ac_exeext'
4985  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4986  (eval $ac_try) 2>&5
4987  ac_status=$?
4988  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4989  (exit $ac_status); }; }; then
4990  :
4991else
4992  echo "$as_me: failed program was:" >&5
4993sed 's/^/| /' conftest.$ac_ext >&5
4994
4995cat >>confdefs.h <<\_ACEOF
4996#define NEED_OSPEED 1
4997_ACEOF
4998
4999fi
5000rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5001
5002{ echo "$as_me:$LINENO: checking for /dev/ptc..." >&5
5003echo "$as_me: checking for /dev/ptc..." >&6;}
5004if test -r /dev/ptc; then
5005cat >>confdefs.h <<\_ACEOF
5006#define HAVE_DEV_PTC 1
5007_ACEOF
5008
5009fi
5010
5011{ echo "$as_me:$LINENO: checking for SVR4 ptys..." >&5
5012echo "$as_me: checking for SVR4 ptys..." >&6;}
5013sysvr4ptys=
5014if test -c /dev/ptmx ; then
5015cat >conftest.$ac_ext <<_ACEOF
5016#line $LINENO "configure"
5017/* confdefs.h.  */
5018_ACEOF
5019cat confdefs.h >>conftest.$ac_ext
5020cat >>conftest.$ac_ext <<_ACEOF
5021/* end confdefs.h.  */
5022
5023int
5024main ()
5025{
5026ptsname(0);grantpt(0);unlockpt(0);
5027  ;
5028  return 0;
5029}
5030_ACEOF
5031rm -f conftest.$ac_objext conftest$ac_exeext
5032if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5033  (eval $ac_link) 2>&5
5034  ac_status=$?
5035  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5036  (exit $ac_status); } &&
5037         { ac_try='test -s conftest$ac_exeext'
5038  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5039  (eval $ac_try) 2>&5
5040  ac_status=$?
5041  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5042  (exit $ac_status); }; }; then
5043  cat >>confdefs.h <<\_ACEOF
5044#define HAVE_SVR4_PTYS 1
5045_ACEOF
5046
5047sysvr4ptys=1
5048else
5049  echo "$as_me: failed program was:" >&5
5050sed 's/^/| /' conftest.$ac_ext >&5
5051
5052fi
5053rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5054fi
5055
5056
5057for ac_func in getpt
5058do
5059as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
5060echo "$as_me:$LINENO: checking for $ac_func" >&5
5061echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
5062if eval "test \"\${$as_ac_var+set}\" = set"; then
5063  echo $ECHO_N "(cached) $ECHO_C" >&6
5064else
5065  cat >conftest.$ac_ext <<_ACEOF
5066#line $LINENO "configure"
5067/* confdefs.h.  */
5068_ACEOF
5069cat confdefs.h >>conftest.$ac_ext
5070cat >>conftest.$ac_ext <<_ACEOF
5071/* end confdefs.h.  */
5072/* System header to define __stub macros and hopefully few prototypes,
5073    which can conflict with char $ac_func (); below.
5074    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5075    <limits.h> exists even on freestanding compilers.  */
5076#ifdef __STDC__
5077# include <limits.h>
5078#else
5079# include <assert.h>
5080#endif
5081/* Override any gcc2 internal prototype to avoid an error.  */
5082#ifdef __cplusplus
5083extern "C"
5084{
5085#endif
5086/* We use char because int might match the return type of a gcc2
5087   builtin and then its argument prototype would still apply.  */
5088char $ac_func ();
5089/* The GNU C library defines this for functions which it implements
5090    to always fail with ENOSYS.  Some functions are actually named
5091    something starting with __ and the normal name is an alias.  */
5092#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5093choke me
5094#else
5095char (*f) () = $ac_func;
5096#endif
5097#ifdef __cplusplus
5098}
5099#endif
5100
5101int
5102main ()
5103{
5104return f != $ac_func;
5105  ;
5106  return 0;
5107}
5108_ACEOF
5109rm -f conftest.$ac_objext conftest$ac_exeext
5110if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5111  (eval $ac_link) 2>&5
5112  ac_status=$?
5113  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5114  (exit $ac_status); } &&
5115         { ac_try='test -s conftest$ac_exeext'
5116  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5117  (eval $ac_try) 2>&5
5118  ac_status=$?
5119  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5120  (exit $ac_status); }; }; then
5121  eval "$as_ac_var=yes"
5122else
5123  echo "$as_me: failed program was:" >&5
5124sed 's/^/| /' conftest.$ac_ext >&5
5125
5126eval "$as_ac_var=no"
5127fi
5128rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5129fi
5130echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
5131echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
5132if test `eval echo '${'$as_ac_var'}'` = yes; then
5133  cat >>confdefs.h <<_ACEOF
5134#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
5135_ACEOF
5136
5137fi
5138done
5139
5140
5141if test -z "$sysvr4ptys"; then
5142
5143for ac_func in openpty
5144do
5145as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
5146echo "$as_me:$LINENO: checking for $ac_func" >&5
5147echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
5148if eval "test \"\${$as_ac_var+set}\" = set"; then
5149  echo $ECHO_N "(cached) $ECHO_C" >&6
5150else
5151  cat >conftest.$ac_ext <<_ACEOF
5152#line $LINENO "configure"
5153/* confdefs.h.  */
5154_ACEOF
5155cat confdefs.h >>conftest.$ac_ext
5156cat >>conftest.$ac_ext <<_ACEOF
5157/* end confdefs.h.  */
5158/* System header to define __stub macros and hopefully few prototypes,
5159    which can conflict with char $ac_func (); below.
5160    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5161    <limits.h> exists even on freestanding compilers.  */
5162#ifdef __STDC__
5163# include <limits.h>
5164#else
5165# include <assert.h>
5166#endif
5167/* Override any gcc2 internal prototype to avoid an error.  */
5168#ifdef __cplusplus
5169extern "C"
5170{
5171#endif
5172/* We use char because int might match the return type of a gcc2
5173   builtin and then its argument prototype would still apply.  */
5174char $ac_func ();
5175/* The GNU C library defines this for functions which it implements
5176    to always fail with ENOSYS.  Some functions are actually named
5177    something starting with __ and the normal name is an alias.  */
5178#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5179choke me
5180#else
5181char (*f) () = $ac_func;
5182#endif
5183#ifdef __cplusplus
5184}
5185#endif
5186
5187int
5188main ()
5189{
5190return f != $ac_func;
5191  ;
5192  return 0;
5193}
5194_ACEOF
5195rm -f conftest.$ac_objext conftest$ac_exeext
5196if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5197  (eval $ac_link) 2>&5
5198  ac_status=$?
5199  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5200  (exit $ac_status); } &&
5201         { ac_try='test -s conftest$ac_exeext'
5202  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5203  (eval $ac_try) 2>&5
5204  ac_status=$?
5205  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5206  (exit $ac_status); }; }; then
5207  eval "$as_ac_var=yes"
5208else
5209  echo "$as_me: failed program was:" >&5
5210sed 's/^/| /' conftest.$ac_ext >&5
5211
5212eval "$as_ac_var=no"
5213fi
5214rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5215fi
5216echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
5217echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
5218if test `eval echo '${'$as_ac_var'}'` = yes; then
5219  cat >>confdefs.h <<_ACEOF
5220#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
5221_ACEOF
5222
5223else
5224  echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
5225echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
5226if test "${ac_cv_lib_util_openpty+set}" = set; then
5227  echo $ECHO_N "(cached) $ECHO_C" >&6
5228else
5229  ac_check_lib_save_LIBS=$LIBS
5230LIBS="-lutil  $LIBS"
5231cat >conftest.$ac_ext <<_ACEOF
5232#line $LINENO "configure"
5233/* confdefs.h.  */
5234_ACEOF
5235cat confdefs.h >>conftest.$ac_ext
5236cat >>conftest.$ac_ext <<_ACEOF
5237/* end confdefs.h.  */
5238
5239/* Override any gcc2 internal prototype to avoid an error.  */
5240#ifdef __cplusplus
5241extern "C"
5242#endif
5243/* We use char because int might match the return type of a gcc2
5244   builtin and then its argument prototype would still apply.  */
5245char openpty ();
5246int
5247main ()
5248{
5249openpty ();
5250  ;
5251  return 0;
5252}
5253_ACEOF
5254rm -f conftest.$ac_objext conftest$ac_exeext
5255if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5256  (eval $ac_link) 2>&5
5257  ac_status=$?
5258  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5259  (exit $ac_status); } &&
5260         { ac_try='test -s conftest$ac_exeext'
5261  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5262  (eval $ac_try) 2>&5
5263  ac_status=$?
5264  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5265  (exit $ac_status); }; }; then
5266  ac_cv_lib_util_openpty=yes
5267else
5268  echo "$as_me: failed program was:" >&5
5269sed 's/^/| /' conftest.$ac_ext >&5
5270
5271ac_cv_lib_util_openpty=no
5272fi
5273rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5274LIBS=$ac_check_lib_save_LIBS
5275fi
5276echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
5277echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
5278if test $ac_cv_lib_util_openpty = yes; then
5279  cat >>confdefs.h <<\_ACEOF
5280#define HAVE_OPENPTY 1
5281_ACEOF
5282 LIBS="$LIBS -lutil"
5283fi
5284
5285fi
5286done
5287
5288fi
5289
5290{ echo "$as_me:$LINENO: checking for ptyranges..." >&5
5291echo "$as_me: checking for ptyranges..." >&6;}
5292if test -d /dev/ptym ; then
5293pdir='/dev/ptym'
5294else
5295pdir='/dev'
5296fi
5297cat >conftest.$ac_ext <<_ACEOF
5298#line $LINENO "configure"
5299/* confdefs.h.  */
5300_ACEOF
5301cat confdefs.h >>conftest.$ac_ext
5302cat >>conftest.$ac_ext <<_ACEOF
5303/* end confdefs.h.  */
5304#ifdef M_UNIX
5305   yes;
5306#endif
5307
5308_ACEOF
5309if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5310  $EGREP "yes" >/dev/null 2>&1; then
5311  ptys=`echo /dev/ptyp??`
5312else
5313  ptys=`echo $pdir/pty??`
5314fi
5315rm -f conftest*
5316
5317if test "$ptys" != "$pdir/pty??" ; then
5318p0=`echo $ptys | tr ' ' '\012' | sed -e 's/^.*\(.\).$/\1/g' | sort -u | tr -d '\012'`
5319p1=`echo $ptys | tr ' ' '\012' | sed -e 's/^.*\(.\)$/\1/g'  | sort -u | tr -d '\012'`
5320cat >>confdefs.h <<_ACEOF
5321#define PTYRANGE0 "$p0"
5322_ACEOF
5323
5324cat >>confdefs.h <<_ACEOF
5325#define PTYRANGE1 "$p1"
5326_ACEOF
5327
5328fi
5329
5330
5331# Check whether --with-pty-mode or --without-pty-mode was given.
5332if test "${with_pty_mode+set}" = set; then
5333  withval="$with_pty_mode"
5334   ptymode="${withval}"
5335fi;
5336
5337# Check whether --with-pty-group or --without-pty-group was given.
5338if test "${with_pty_group+set}" = set; then
5339  withval="$with_pty_group"
5340   ptygrp="${withval}"
5341fi;
5342test -n "$ptymode" || ptymode=0620
5343if test -n "$ptygrp" ; then
5344cat >>confdefs.h <<_ACEOF
5345#define PTYMODE $ptymode
5346_ACEOF
5347
5348cat >>confdefs.h <<_ACEOF
5349#define PTYGROUP $ptygrp
5350_ACEOF
5351
5352else
5353
5354{ echo "$as_me:$LINENO: checking default tty permissions/group..." >&5
5355echo "$as_me: checking default tty permissions/group..." >&6;}
5356rm -f conftest_grp
5357if test "$cross_compiling" = yes; then
5358  { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
5359See \`config.log' for more details." >&5
5360echo "$as_me: error: cannot run test program while cross compiling
5361See \`config.log' for more details." >&2;}
5362   { (exit 1); exit 1; }; }
5363else
5364  cat >conftest.$ac_ext <<_ACEOF
5365#line $LINENO "configure"
5366/* confdefs.h.  */
5367_ACEOF
5368cat confdefs.h >>conftest.$ac_ext
5369cat >>conftest.$ac_ext <<_ACEOF
5370/* end confdefs.h.  */
5371
5372#include <sys/types.h>
5373#include <sys/stat.h>
5374#include <stdio.h>
5375main()
5376{
5377  struct stat sb;
5378  char *x,*ttyname();
5379  int om, m;
5380  FILE *fp;
5381
5382  if (!(x = ttyname(0))) exit(1);
5383  if (stat(x, &sb)) exit(1);
5384  om = sb.st_mode;
5385  if (om & 002) exit(0);
5386  m = system("mesg y");
5387  if (m == -1 || m == 127) exit(1);
5388  if (stat(x, &sb)) exit(1);
5389  m = sb.st_mode;
5390  if (chmod(x, om)) exit(1);
5391  if (m & 002) exit(0);
5392  if (sb.st_gid == getgid()) exit(1);
5393  if (!(fp=fopen("conftest_grp", "w")))
5394    exit(1);
5395  fprintf(fp, "%d\n", sb.st_gid);
5396  fclose(fp);
5397  exit(0);
5398}
5399
5400_ACEOF
5401rm -f conftest$ac_exeext
5402if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5403  (eval $ac_link) 2>&5
5404  ac_status=$?
5405  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5406  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5407  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5408  (eval $ac_try) 2>&5
5409  ac_status=$?
5410  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5411  (exit $ac_status); }; }; then
5412
5413    if test -f conftest_grp; then
5414	ptygrp=`cat conftest_grp`
5415	echo "- pty mode: $ptymode, group: $ptygrp" 1>&6
5416
5417	cat >>confdefs.h <<_ACEOF
5418#define PTYMODE $ptymode
5419_ACEOF
5420
5421	cat >>confdefs.h <<_ACEOF
5422#define PTYGROUP $ptygrp
5423_ACEOF
5424
5425    else
5426	echo "- ptys are world accessable" 1>&6
5427
5428    fi
5429
5430else
5431  echo "$as_me: program exited with status $ac_status" >&5
5432echo "$as_me: failed program was:" >&5
5433sed 's/^/| /' conftest.$ac_ext >&5
5434
5435( exit $ac_status )
5436
5437    WRITEPATH=''
5438    XTERMPATH=''
5439    # Extract the first word of "write", so it can be a program name with args.
5440set dummy write; ac_word=$2
5441echo "$as_me:$LINENO: checking for $ac_word" >&5
5442echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5443if test "${ac_cv_path_WRITEPATH+set}" = set; then
5444  echo $ECHO_N "(cached) $ECHO_C" >&6
5445else
5446  case $WRITEPATH in
5447  [\\/]* | ?:[\\/]*)
5448  ac_cv_path_WRITEPATH="$WRITEPATH" # Let the user override the test with a path.
5449  ;;
5450  *)
5451  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5452for as_dir in $PATH
5453do
5454  IFS=$as_save_IFS
5455  test -z "$as_dir" && as_dir=.
5456  for ac_exec_ext in '' $ac_executable_extensions; do
5457  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5458    ac_cv_path_WRITEPATH="$as_dir/$ac_word$ac_exec_ext"
5459    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5460    break 2
5461  fi
5462done
5463done
5464
5465  ;;
5466esac
5467fi
5468WRITEPATH=$ac_cv_path_WRITEPATH
5469
5470if test -n "$WRITEPATH"; then
5471  echo "$as_me:$LINENO: result: $WRITEPATH" >&5
5472echo "${ECHO_T}$WRITEPATH" >&6
5473else
5474  echo "$as_me:$LINENO: result: no" >&5
5475echo "${ECHO_T}no" >&6
5476fi
5477
5478    # Extract the first word of "xterm", so it can be a program name with args.
5479set dummy xterm; ac_word=$2
5480echo "$as_me:$LINENO: checking for $ac_word" >&5
5481echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5482if test "${ac_cv_path_XTERMPATH+set}" = set; then
5483  echo $ECHO_N "(cached) $ECHO_C" >&6
5484else
5485  case $XTERMPATH in
5486  [\\/]* | ?:[\\/]*)
5487  ac_cv_path_XTERMPATH="$XTERMPATH" # Let the user override the test with a path.
5488  ;;
5489  *)
5490  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5491for as_dir in $PATH
5492do
5493  IFS=$as_save_IFS
5494  test -z "$as_dir" && as_dir=.
5495  for ac_exec_ext in '' $ac_executable_extensions; do
5496  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5497    ac_cv_path_XTERMPATH="$as_dir/$ac_word$ac_exec_ext"
5498    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5499    break 2
5500  fi
5501done
5502done
5503
5504  ;;
5505esac
5506fi
5507XTERMPATH=$ac_cv_path_XTERMPATH
5508
5509if test -n "$XTERMPATH"; then
5510  echo "$as_me:$LINENO: result: $XTERMPATH" >&5
5511echo "${ECHO_T}$XTERMPATH" >&6
5512else
5513  echo "$as_me:$LINENO: result: no" >&5
5514echo "${ECHO_T}no" >&6
5515fi
5516
5517    found=
5518    if test -n "$WRITEPATH$XTERMPATH"; then
5519      findfollow=
5520      lsfollow=
5521      found=`find $WRITEPATH $XTERMPATH -follow -print 2>/dev/null`
5522      if test -n "$found"; then
5523	findfollow=-follow
5524	lsfollow=L
5525      fi
5526      if test -n "$XTERMPATH"; then
5527	ptygrpn=`ls -l$lsfollow $XTERMPATH | sed -n -e 1p | $AWK '{print $4}'`
5528	if test tty != "$ptygrpn"; then
5529	  XTERMPATH=
5530	fi
5531      fi
5532    fi
5533    if test -n "$WRITEPATH$XTERMPATH"; then
5534      found=`find $WRITEPATH $XTERMPATH $findfollow -perm -2000 -print`
5535      if test -n "$found"; then
5536	ptygrp=`ls -ln$lsfollow $found | sed -n -e 1p | $AWK '{print $4}'`
5537	echo "- pty mode: $ptymode, group: $ptygrp" 1>&6
5538
5539	cat >>confdefs.h <<_ACEOF
5540#define PTYMODE $ptymode
5541_ACEOF
5542
5543	cat >>confdefs.h <<_ACEOF
5544#define PTYGROUP $ptygrp
5545_ACEOF
5546
5547      else
5548	echo "- ptys are world accessable" 1>&6
5549
5550      fi
5551    else
5552      echo "- can't determine - assume ptys are world accessable" 1>&6
5553
5554    fi
5555
5556
5557fi
5558rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5559fi
5560rm -f conftest_grp
5561fi
5562
5563{ echo "$as_me:$LINENO: checking getutent..." >&5
5564echo "$as_me: checking getutent..." >&6;}
5565cat >conftest.$ac_ext <<_ACEOF
5566#line $LINENO "configure"
5567/* confdefs.h.  */
5568_ACEOF
5569cat confdefs.h >>conftest.$ac_ext
5570cat >>conftest.$ac_ext <<_ACEOF
5571/* end confdefs.h.  */
5572
5573#include <time.h> /* to get time_t on SCO */
5574#include <sys/types.h>
5575#if defined(SVR4) && !defined(DGUX)
5576#include <utmpx.h>
5577#define utmp utmpx
5578#else
5579#include <utmp.h>
5580#endif
5581#ifdef __hpux
5582#define pututline _pututline
5583#endif
5584
5585int
5586main ()
5587{
5588int x = DEAD_PROCESS; pututline((struct utmp *)0); getutent();
5589  ;
5590  return 0;
5591}
5592_ACEOF
5593rm -f conftest.$ac_objext conftest$ac_exeext
5594if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5595  (eval $ac_link) 2>&5
5596  ac_status=$?
5597  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5598  (exit $ac_status); } &&
5599         { ac_try='test -s conftest$ac_exeext'
5600  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5601  (eval $ac_try) 2>&5
5602  ac_status=$?
5603  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5604  (exit $ac_status); }; }; then
5605  cat >>confdefs.h <<\_ACEOF
5606#define GETUTENT 1
5607_ACEOF
5608
5609else
5610  echo "$as_me: failed program was:" >&5
5611sed 's/^/| /' conftest.$ac_ext >&5
5612
5613olibs="$LIBS"
5614LIBS="$LIBS -lgen"
5615{ echo "$as_me:$LINENO: checking getutent with -lgen..." >&5
5616echo "$as_me: checking getutent with -lgen..." >&6;}
5617cat >conftest.$ac_ext <<_ACEOF
5618#line $LINENO "configure"
5619/* confdefs.h.  */
5620_ACEOF
5621cat confdefs.h >>conftest.$ac_ext
5622cat >>conftest.$ac_ext <<_ACEOF
5623/* end confdefs.h.  */
5624
5625#include <time.h>
5626#include <sys/types.h>
5627#if defined(SVR4) && !defined(DGUX)
5628#include <utmpx.h>
5629#define utmp utmpx
5630#else
5631#include <utmp.h>
5632#endif
5633#ifdef __hpux
5634#define pututline _pututline
5635#endif
5636
5637int
5638main ()
5639{
5640int x = DEAD_PROCESS; pututline((struct utmp *)0); getutent();
5641  ;
5642  return 0;
5643}
5644_ACEOF
5645rm -f conftest.$ac_objext conftest$ac_exeext
5646if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5647  (eval $ac_link) 2>&5
5648  ac_status=$?
5649  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5650  (exit $ac_status); } &&
5651         { ac_try='test -s conftest$ac_exeext'
5652  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5653  (eval $ac_try) 2>&5
5654  ac_status=$?
5655  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5656  (exit $ac_status); }; }; then
5657  cat >>confdefs.h <<\_ACEOF
5658#define GETUTENT 1
5659_ACEOF
5660
5661else
5662  echo "$as_me: failed program was:" >&5
5663sed 's/^/| /' conftest.$ac_ext >&5
5664
5665LIBS="$olibs"
5666fi
5667rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5668
5669fi
5670rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5671{ echo "$as_me:$LINENO: checking ut_host..." >&5
5672echo "$as_me: checking ut_host..." >&6;}
5673cat >conftest.$ac_ext <<_ACEOF
5674#line $LINENO "configure"
5675/* confdefs.h.  */
5676_ACEOF
5677cat confdefs.h >>conftest.$ac_ext
5678cat >>conftest.$ac_ext <<_ACEOF
5679/* end confdefs.h.  */
5680
5681#include <time.h>
5682#include <sys/types.h>
5683#if defined(SVR4) && !defined(DGUX)
5684#include <utmpx.h>
5685#define utmp utmpx
5686#else
5687#include <utmp.h>
5688#endif
5689
5690int
5691main ()
5692{
5693struct utmp u; u.ut_host[0] = 0;
5694  ;
5695  return 0;
5696}
5697_ACEOF
5698rm -f conftest.$ac_objext
5699if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5700  (eval $ac_compile) 2>&5
5701  ac_status=$?
5702  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5703  (exit $ac_status); } &&
5704         { ac_try='test -s conftest.$ac_objext'
5705  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5706  (eval $ac_try) 2>&5
5707  ac_status=$?
5708  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5709  (exit $ac_status); }; }; then
5710  cat >>confdefs.h <<\_ACEOF
5711#define UTHOST 1
5712_ACEOF
5713
5714else
5715  echo "$as_me: failed program was:" >&5
5716sed 's/^/| /' conftest.$ac_ext >&5
5717
5718fi
5719rm -f conftest.$ac_objext conftest.$ac_ext
5720if test "${ac_cv_header_utempter_h+set}" = set; then
5721  echo "$as_me:$LINENO: checking for utempter.h" >&5
5722echo $ECHO_N "checking for utempter.h... $ECHO_C" >&6
5723if test "${ac_cv_header_utempter_h+set}" = set; then
5724  echo $ECHO_N "(cached) $ECHO_C" >&6
5725fi
5726echo "$as_me:$LINENO: result: $ac_cv_header_utempter_h" >&5
5727echo "${ECHO_T}$ac_cv_header_utempter_h" >&6
5728else
5729  # Is the header compilable?
5730echo "$as_me:$LINENO: checking utempter.h usability" >&5
5731echo $ECHO_N "checking utempter.h usability... $ECHO_C" >&6
5732cat >conftest.$ac_ext <<_ACEOF
5733#line $LINENO "configure"
5734/* confdefs.h.  */
5735_ACEOF
5736cat confdefs.h >>conftest.$ac_ext
5737cat >>conftest.$ac_ext <<_ACEOF
5738/* end confdefs.h.  */
5739$ac_includes_default
5740#include <utempter.h>
5741_ACEOF
5742rm -f conftest.$ac_objext
5743if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5744  (eval $ac_compile) 2>&5
5745  ac_status=$?
5746  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5747  (exit $ac_status); } &&
5748         { ac_try='test -s conftest.$ac_objext'
5749  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5750  (eval $ac_try) 2>&5
5751  ac_status=$?
5752  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5753  (exit $ac_status); }; }; then
5754  ac_header_compiler=yes
5755else
5756  echo "$as_me: failed program was:" >&5
5757sed 's/^/| /' conftest.$ac_ext >&5
5758
5759ac_header_compiler=no
5760fi
5761rm -f conftest.$ac_objext conftest.$ac_ext
5762echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5763echo "${ECHO_T}$ac_header_compiler" >&6
5764
5765# Is the header present?
5766echo "$as_me:$LINENO: checking utempter.h presence" >&5
5767echo $ECHO_N "checking utempter.h presence... $ECHO_C" >&6
5768cat >conftest.$ac_ext <<_ACEOF
5769#line $LINENO "configure"
5770/* confdefs.h.  */
5771_ACEOF
5772cat confdefs.h >>conftest.$ac_ext
5773cat >>conftest.$ac_ext <<_ACEOF
5774/* end confdefs.h.  */
5775#include <utempter.h>
5776_ACEOF
5777if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
5778  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5779  ac_status=$?
5780  grep -v '^ *+' conftest.er1 >conftest.err
5781  rm -f conftest.er1
5782  cat conftest.err >&5
5783  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5784  (exit $ac_status); } >/dev/null; then
5785  if test -s conftest.err; then
5786    ac_cpp_err=$ac_c_preproc_warn_flag
5787  else
5788    ac_cpp_err=
5789  fi
5790else
5791  ac_cpp_err=yes
5792fi
5793if test -z "$ac_cpp_err"; then
5794  ac_header_preproc=yes
5795else
5796  echo "$as_me: failed program was:" >&5
5797sed 's/^/| /' conftest.$ac_ext >&5
5798
5799  ac_header_preproc=no
5800fi
5801rm -f conftest.err conftest.$ac_ext
5802echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5803echo "${ECHO_T}$ac_header_preproc" >&6
5804
5805# So?  What about this header?
5806case $ac_header_compiler:$ac_header_preproc in
5807  yes:no )
5808    { echo "$as_me:$LINENO: WARNING: utempter.h: accepted by the compiler, rejected by the preprocessor!" >&5
5809echo "$as_me: WARNING: utempter.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
5810    { echo "$as_me:$LINENO: WARNING: utempter.h: proceeding with the preprocessor's result" >&5
5811echo "$as_me: WARNING: utempter.h: proceeding with the preprocessor's result" >&2;}
5812    (
5813      cat <<\_ASBOX
5814## ------------------------------------ ##
5815## Report this to bug-autoconf@gnu.org. ##
5816## ------------------------------------ ##
5817_ASBOX
5818    ) |
5819      sed "s/^/$as_me: WARNING:     /" >&2
5820    ;;
5821  no:yes )
5822    { echo "$as_me:$LINENO: WARNING: utempter.h: present but cannot be compiled" >&5
5823echo "$as_me: WARNING: utempter.h: present but cannot be compiled" >&2;}
5824    { echo "$as_me:$LINENO: WARNING: utempter.h: check for missing prerequisite headers?" >&5
5825echo "$as_me: WARNING: utempter.h: check for missing prerequisite headers?" >&2;}
5826    { echo "$as_me:$LINENO: WARNING: utempter.h: proceeding with the preprocessor's result" >&5
5827echo "$as_me: WARNING: utempter.h: proceeding with the preprocessor's result" >&2;}
5828    (
5829      cat <<\_ASBOX
5830## ------------------------------------ ##
5831## Report this to bug-autoconf@gnu.org. ##
5832## ------------------------------------ ##
5833_ASBOX
5834    ) |
5835      sed "s/^/$as_me: WARNING:     /" >&2
5836    ;;
5837esac
5838echo "$as_me:$LINENO: checking for utempter.h" >&5
5839echo $ECHO_N "checking for utempter.h... $ECHO_C" >&6
5840if test "${ac_cv_header_utempter_h+set}" = set; then
5841  echo $ECHO_N "(cached) $ECHO_C" >&6
5842else
5843  ac_cv_header_utempter_h=$ac_header_preproc
5844fi
5845echo "$as_me:$LINENO: result: $ac_cv_header_utempter_h" >&5
5846echo "${ECHO_T}$ac_cv_header_utempter_h" >&6
5847
5848fi
5849if test $ac_cv_header_utempter_h = yes; then
5850  have_utempter=yes
5851else
5852  have_utempter=no
5853fi
5854
5855
5856if test "$have_utempter" = yes; then
5857  cat >>confdefs.h <<\_ACEOF
5858#define HAVE_UTEMPTER 1
5859_ACEOF
5860
5861  LIBS="$LIBS -lutempter"
5862fi
5863
5864{ echo "$as_me:$LINENO: checking for libutil(s)..." >&5
5865echo "$as_me: checking for libutil(s)..." >&6;}
5866test -f /usr/lib/libutils.a && LIBS="$LIBS -lutils"
5867test -f /usr/lib/libutil.a && LIBS="$LIBS -lutil"
5868
5869{ echo "$as_me:$LINENO: checking getloadavg..." >&5
5870echo "$as_me: checking getloadavg..." >&6;}
5871cat >conftest.$ac_ext <<_ACEOF
5872#line $LINENO "configure"
5873/* confdefs.h.  */
5874_ACEOF
5875cat confdefs.h >>conftest.$ac_ext
5876cat >>conftest.$ac_ext <<_ACEOF
5877/* end confdefs.h.  */
5878
5879int
5880main ()
5881{
5882getloadavg((double *)0, 0);
5883  ;
5884  return 0;
5885}
5886_ACEOF
5887rm -f conftest.$ac_objext conftest$ac_exeext
5888if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5889  (eval $ac_link) 2>&5
5890  ac_status=$?
5891  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5892  (exit $ac_status); } &&
5893         { ac_try='test -s conftest$ac_exeext'
5894  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5895  (eval $ac_try) 2>&5
5896  ac_status=$?
5897  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5898  (exit $ac_status); }; }; then
5899  cat >>confdefs.h <<\_ACEOF
5900#define LOADAV_GETLOADAVG 1
5901_ACEOF
5902 load=1
5903else
5904  echo "$as_me: failed program was:" >&5
5905sed 's/^/| /' conftest.$ac_ext >&5
5906
5907if test -f /usr/lib/libkvm.a ; then
5908olibs="$LIBS"
5909LIBS="$LIBS -lkvm"
5910{ echo "$as_me:$LINENO: checking getloadavg with -lkvm..." >&5
5911echo "$as_me: checking getloadavg with -lkvm..." >&6;}
5912cat >conftest.$ac_ext <<_ACEOF
5913#line $LINENO "configure"
5914/* confdefs.h.  */
5915_ACEOF
5916cat confdefs.h >>conftest.$ac_ext
5917cat >>conftest.$ac_ext <<_ACEOF
5918/* end confdefs.h.  */
5919
5920int
5921main ()
5922{
5923getloadavg((double *)0, 0);
5924  ;
5925  return 0;
5926}
5927_ACEOF
5928rm -f conftest.$ac_objext conftest$ac_exeext
5929if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5930  (eval $ac_link) 2>&5
5931  ac_status=$?
5932  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5933  (exit $ac_status); } &&
5934         { ac_try='test -s conftest$ac_exeext'
5935  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5936  (eval $ac_try) 2>&5
5937  ac_status=$?
5938  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5939  (exit $ac_status); }; }; then
5940  cat >>confdefs.h <<\_ACEOF
5941#define LOADAV_GETLOADAVG 1
5942_ACEOF
5943 load=1
5944else
5945  echo "$as_me: failed program was:" >&5
5946sed 's/^/| /' conftest.$ac_ext >&5
5947
5948LIBS="$olibs"
5949fi
5950rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5951fi
5952
5953fi
5954rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5955
5956if test -z "$load" ; then
5957cat >conftest.$ac_ext <<_ACEOF
5958#line $LINENO "configure"
5959/* confdefs.h.  */
5960_ACEOF
5961cat confdefs.h >>conftest.$ac_ext
5962cat >>conftest.$ac_ext <<_ACEOF
5963/* end confdefs.h.  */
5964#if defined(NeXT) || defined(apollo) || defined(linux)
5965  yes;
5966#endif
5967
5968_ACEOF
5969if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5970  $EGREP "yes" >/dev/null 2>&1; then
5971  load=1
5972fi
5973rm -f conftest*
5974
5975fi
5976if test -z "$load" ; then
5977{ echo "$as_me:$LINENO: checking for kernelfile..." >&5
5978echo "$as_me: checking for kernelfile..." >&6;}
5979for core in /unix /vmunix /dynix /hp-ux /xelos /dev/ksyms /kernel/unix /kernel/genunix /unicos /mach /netbsd /386bsd /dgux /bsd /stand/vmunix; do
5980  if test -f $core || test -c $core; then
5981    break
5982  fi
5983done
5984if test ! -f $core && test ! -c $core ; then
5985  echo "- no kernelfile found" 1>&6
5986
5987else
5988  echo "- using kernelfile '$core'" 1>&6
5989
5990  if test -r $core ; then
5991  cat >>confdefs.h <<_ACEOF
5992#define LOADAV_UNIX "$core"
5993_ACEOF
5994
5995  if test "${ac_cv_header_nlist_h+set}" = set; then
5996  echo "$as_me:$LINENO: checking for nlist.h" >&5
5997echo $ECHO_N "checking for nlist.h... $ECHO_C" >&6
5998if test "${ac_cv_header_nlist_h+set}" = set; then
5999  echo $ECHO_N "(cached) $ECHO_C" >&6
6000fi
6001echo "$as_me:$LINENO: result: $ac_cv_header_nlist_h" >&5
6002echo "${ECHO_T}$ac_cv_header_nlist_h" >&6
6003else
6004  # Is the header compilable?
6005echo "$as_me:$LINENO: checking nlist.h usability" >&5
6006echo $ECHO_N "checking nlist.h usability... $ECHO_C" >&6
6007cat >conftest.$ac_ext <<_ACEOF
6008#line $LINENO "configure"
6009/* confdefs.h.  */
6010_ACEOF
6011cat confdefs.h >>conftest.$ac_ext
6012cat >>conftest.$ac_ext <<_ACEOF
6013/* end confdefs.h.  */
6014$ac_includes_default
6015#include <nlist.h>
6016_ACEOF
6017rm -f conftest.$ac_objext
6018if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6019  (eval $ac_compile) 2>&5
6020  ac_status=$?
6021  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6022  (exit $ac_status); } &&
6023         { ac_try='test -s conftest.$ac_objext'
6024  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6025  (eval $ac_try) 2>&5
6026  ac_status=$?
6027  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6028  (exit $ac_status); }; }; then
6029  ac_header_compiler=yes
6030else
6031  echo "$as_me: failed program was:" >&5
6032sed 's/^/| /' conftest.$ac_ext >&5
6033
6034ac_header_compiler=no
6035fi
6036rm -f conftest.$ac_objext conftest.$ac_ext
6037echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6038echo "${ECHO_T}$ac_header_compiler" >&6
6039
6040# Is the header present?
6041echo "$as_me:$LINENO: checking nlist.h presence" >&5
6042echo $ECHO_N "checking nlist.h presence... $ECHO_C" >&6
6043cat >conftest.$ac_ext <<_ACEOF
6044#line $LINENO "configure"
6045/* confdefs.h.  */
6046_ACEOF
6047cat confdefs.h >>conftest.$ac_ext
6048cat >>conftest.$ac_ext <<_ACEOF
6049/* end confdefs.h.  */
6050#include <nlist.h>
6051_ACEOF
6052if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
6053  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6054  ac_status=$?
6055  grep -v '^ *+' conftest.er1 >conftest.err
6056  rm -f conftest.er1
6057  cat conftest.err >&5
6058  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6059  (exit $ac_status); } >/dev/null; then
6060  if test -s conftest.err; then
6061    ac_cpp_err=$ac_c_preproc_warn_flag
6062  else
6063    ac_cpp_err=
6064  fi
6065else
6066  ac_cpp_err=yes
6067fi
6068if test -z "$ac_cpp_err"; then
6069  ac_header_preproc=yes
6070else
6071  echo "$as_me: failed program was:" >&5
6072sed 's/^/| /' conftest.$ac_ext >&5
6073
6074  ac_header_preproc=no
6075fi
6076rm -f conftest.err conftest.$ac_ext
6077echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6078echo "${ECHO_T}$ac_header_preproc" >&6
6079
6080# So?  What about this header?
6081case $ac_header_compiler:$ac_header_preproc in
6082  yes:no )
6083    { echo "$as_me:$LINENO: WARNING: nlist.h: accepted by the compiler, rejected by the preprocessor!" >&5
6084echo "$as_me: WARNING: nlist.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6085    { echo "$as_me:$LINENO: WARNING: nlist.h: proceeding with the preprocessor's result" >&5
6086echo "$as_me: WARNING: nlist.h: proceeding with the preprocessor's result" >&2;}
6087    (
6088      cat <<\_ASBOX
6089## ------------------------------------ ##
6090## Report this to bug-autoconf@gnu.org. ##
6091## ------------------------------------ ##
6092_ASBOX
6093    ) |
6094      sed "s/^/$as_me: WARNING:     /" >&2
6095    ;;
6096  no:yes )
6097    { echo "$as_me:$LINENO: WARNING: nlist.h: present but cannot be compiled" >&5
6098echo "$as_me: WARNING: nlist.h: present but cannot be compiled" >&2;}
6099    { echo "$as_me:$LINENO: WARNING: nlist.h: check for missing prerequisite headers?" >&5
6100echo "$as_me: WARNING: nlist.h: check for missing prerequisite headers?" >&2;}
6101    { echo "$as_me:$LINENO: WARNING: nlist.h: proceeding with the preprocessor's result" >&5
6102echo "$as_me: WARNING: nlist.h: proceeding with the preprocessor's result" >&2;}
6103    (
6104      cat <<\_ASBOX
6105## ------------------------------------ ##
6106## Report this to bug-autoconf@gnu.org. ##
6107## ------------------------------------ ##
6108_ASBOX
6109    ) |
6110      sed "s/^/$as_me: WARNING:     /" >&2
6111    ;;
6112esac
6113echo "$as_me:$LINENO: checking for nlist.h" >&5
6114echo $ECHO_N "checking for nlist.h... $ECHO_C" >&6
6115if test "${ac_cv_header_nlist_h+set}" = set; then
6116  echo $ECHO_N "(cached) $ECHO_C" >&6
6117else
6118  ac_cv_header_nlist_h=$ac_header_preproc
6119fi
6120echo "$as_me:$LINENO: result: $ac_cv_header_nlist_h" >&5
6121echo "${ECHO_T}$ac_cv_header_nlist_h" >&6
6122
6123fi
6124if test $ac_cv_header_nlist_h = yes; then
6125  cat >>confdefs.h <<\_ACEOF
6126#define NLIST_STRUCT 1
6127_ACEOF
6128
6129     { echo "$as_me:$LINENO: checking n_un in struct nlist..." >&5
6130echo "$as_me: checking n_un in struct nlist..." >&6;}
6131     cat >conftest.$ac_ext <<_ACEOF
6132#line $LINENO "configure"
6133/* confdefs.h.  */
6134_ACEOF
6135cat confdefs.h >>conftest.$ac_ext
6136cat >>conftest.$ac_ext <<_ACEOF
6137/* end confdefs.h.  */
6138#include <nlist.h>
6139int
6140main ()
6141{
6142struct nlist n; n.n_un.n_name = 0;
6143  ;
6144  return 0;
6145}
6146_ACEOF
6147rm -f conftest.$ac_objext
6148if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6149  (eval $ac_compile) 2>&5
6150  ac_status=$?
6151  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6152  (exit $ac_status); } &&
6153         { ac_try='test -s conftest.$ac_objext'
6154  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6155  (eval $ac_try) 2>&5
6156  ac_status=$?
6157  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6158  (exit $ac_status); }; }; then
6159  cat >>confdefs.h <<\_ACEOF
6160#define NLIST_NAME_UNION 1
6161_ACEOF
6162
6163else
6164  echo "$as_me: failed program was:" >&5
6165sed 's/^/| /' conftest.$ac_ext >&5
6166
6167fi
6168rm -f conftest.$ac_objext conftest.$ac_ext
6169fi
6170
6171
6172
6173  { echo "$as_me:$LINENO: checking for nlist declaration..." >&5
6174echo "$as_me: checking for nlist declaration..." >&6;}
6175  cat >conftest.$ac_ext <<_ACEOF
6176#line $LINENO "configure"
6177/* confdefs.h.  */
6178_ACEOF
6179cat confdefs.h >>conftest.$ac_ext
6180cat >>conftest.$ac_ext <<_ACEOF
6181/* end confdefs.h.  */
6182
6183#ifdef NLIST_STRUCT
6184# include <nlist.h>
6185#else
6186# include <a.out.h>
6187#endif
6188
6189_ACEOF
6190if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6191  $EGREP "nlist(( |	)( |	)*.*\(|\()" >/dev/null 2>&1; then
6192  cat >>confdefs.h <<\_ACEOF
6193#define NLIST_DECLARED 1
6194_ACEOF
6195
6196fi
6197rm -f conftest*
6198
6199
6200  { echo "$as_me:$LINENO: checking for avenrun symbol..." >&5
6201echo "$as_me: checking for avenrun symbol..." >&6;}
6202  nlist64=
6203  for av in avenrun _avenrun _Loadavg avenrun _avenrun _Loadavg; do
6204  if test "$cross_compiling" = yes; then
6205  { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
6206See \`config.log' for more details." >&5
6207echo "$as_me: error: cannot run test program while cross compiling
6208See \`config.log' for more details." >&2;}
6209   { (exit 1); exit 1; }; }
6210else
6211  cat >conftest.$ac_ext <<_ACEOF
6212#line $LINENO "configure"
6213/* confdefs.h.  */
6214_ACEOF
6215cat confdefs.h >>conftest.$ac_ext
6216cat >>conftest.$ac_ext <<_ACEOF
6217/* end confdefs.h.  */
6218
6219#include <sys/types.h>
6220#ifdef NLIST_STRUCT
6221#include <nlist.h>
6222#else
6223#include <a.out.h>
6224#endif
6225
6226$nlist64
6227
6228struct nlist nl[2];
6229
6230main()
6231{
6232#if !defined(_AUX_SOURCE) && !defined(AUX)
6233# ifdef NLIST_NAME_UNION
6234  nl[0].n_un.n_name = "$av";
6235# else
6236  nl[0].n_name = "$av";
6237# endif
6238#else
6239  strncpy(nl[0].n_name, "$av", sizeof(nl[0].n_name));
6240#endif
6241  nlist(LOADAV_UNIX, nl);
6242  if (nl[0].n_value == 0)
6243    exit(1);
6244  exit(0);
6245}
6246
6247_ACEOF
6248rm -f conftest$ac_exeext
6249if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6250  (eval $ac_link) 2>&5
6251  ac_status=$?
6252  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6253  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6254  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6255  (eval $ac_try) 2>&5
6256  ac_status=$?
6257  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6258  (exit $ac_status); }; }; then
6259  avensym=$av;break
6260else
6261  echo "$as_me: program exited with status $ac_status" >&5
6262echo "$as_me: failed program was:" >&5
6263sed 's/^/| /' conftest.$ac_ext >&5
6264
6265fi
6266rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6267fi
6268  if test "$av" = _Loadavg; then
6269    nlist64='#define nlist nlist64'
6270  fi
6271  done
6272  if test -z "$avensym" ; then
6273    echo "- no avenrun symbol found" 1>&6
6274
6275  else
6276    echo "- using avenrun symbol '$avensym'" 1>&6
6277
6278    cat >>confdefs.h <<_ACEOF
6279#define LOADAV_AVENRUN "$avensym"
6280_ACEOF
6281
6282    if test -n "$nlist64"; then
6283      echo "- used nlist64 to find it" 1>&6
6284
6285      cat >>confdefs.h <<\_ACEOF
6286#define LOADAV_USE_NLIST64 1
6287_ACEOF
6288
6289    fi
6290    load=1
6291  fi
6292  else
6293    echo "Can't configure the load average display feature" 1>&6
6294
6295    echo "because $core is not readable by you." 1>&6
6296
6297    echo "To configure the load average display feature" 1>&6
6298
6299    echo "re-run configure as root if possible." 1>&6
6300
6301    echo "If you are not the system administrator then disregard" 1>&6
6302
6303    echo "this warning.  You can still use screen without" 1>&6
6304
6305    echo "the load average display feature." 1>&6
6306
6307  fi
6308fi
6309fi
6310
6311cat > conftest.c <<EOF
6312#include "confdefs.h"
6313
6314#include <sys/types.h>
6315#include <sys/param.h>
6316
6317_CUT_HERE_
6318
6319#if !defined(LOADAV_GETLOADAVG) && ((defined(hp300) && !defined(__hpux)) || defined(sun) || (defined(ultrix) && defined(mips)) || defined(_SEQUENT_) || defined(sgi) || (defined(SVR4) && !defined(__hpux)) || defined(sony_news) || (!defined(__osf__) && defined(__alpha)) || defined(_IBMR2) || defined(_AUX_SOURCE) || defined(AUX) || defined(m88k))
6320loadtype=long
6321# if defined(apollo) || defined(_IBMR2) || defined(_AUX_SOURCE) || defined(AUX)
6322loadscale=65536
6323# else
6324#  if defined(FSCALE) && !defined(__osf__)
6325#   undef FSCALE
6326loadscale=FSCALE
6327#  else
6328#   ifdef sgi
6329loadtype=int
6330loadscale=1024
6331#   else
6332#    if defined(MIPS) || defined(SVR4) || defined(m88k)
6333loadscale=256
6334#    else /* not MIPS */
6335loadscale=1000 	/* our default value */
6336#    endif /* MIPS */
6337#   endif /* sgi */
6338#  endif /* not FSCALE */
6339# endif /* not apollo */
6340#else
6341loadtype=double
6342loadscale=1
6343#endif
6344#ifdef alliant
6345loadnum=4
6346#else
6347loadnum=3
6348#endif
6349
6350EOF
6351eval "$ac_cpp conftest.c 2>&5 | sed -e '1,/_CUT_HERE_/d' -e 's/ //g' > conftest.out"
6352. ./conftest.out
6353rm -f conftest*
6354
6355
6356if test -n "$load" ; then cat >>confdefs.h <<\_ACEOF
6357#define LOADAV 1
6358_ACEOF
6359 fi
6360if test -n "$loadtype" ; then cat >>confdefs.h <<_ACEOF
6361#define LOADAV_TYPE $loadtype
6362_ACEOF
6363 fi
6364if test -n "$loadnum" ; then cat >>confdefs.h <<_ACEOF
6365#define LOADAV_NUM $loadnum
6366_ACEOF
6367 fi
6368if test -n "$loadscale" ; then cat >>confdefs.h <<_ACEOF
6369#define LOADAV_SCALE $loadscale
6370_ACEOF
6371 fi
6372
6373if test -n "$posix" ; then
6374
6375echo "assuming posix signal definition" 1>&6
6376
6377cat >>confdefs.h <<\_ACEOF
6378#define SIGVOID 1
6379_ACEOF
6380
6381
6382else
6383
6384{ echo "$as_me:$LINENO: checking return type of signal handlers..." >&5
6385echo "$as_me: checking return type of signal handlers..." >&6;}
6386cat >conftest.$ac_ext <<_ACEOF
6387#line $LINENO "configure"
6388/* confdefs.h.  */
6389_ACEOF
6390cat confdefs.h >>conftest.$ac_ext
6391cat >>conftest.$ac_ext <<_ACEOF
6392/* end confdefs.h.  */
6393#include <sys/types.h>
6394#include <signal.h>
6395#ifdef signal
6396#undef signal
6397#endif
6398extern void (*signal ()) ();
6399int
6400main ()
6401{
6402int i;
6403  ;
6404  return 0;
6405}
6406_ACEOF
6407rm -f conftest.$ac_objext
6408if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6409  (eval $ac_compile) 2>&5
6410  ac_status=$?
6411  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6412  (exit $ac_status); } &&
6413         { ac_try='test -s conftest.$ac_objext'
6414  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6415  (eval $ac_try) 2>&5
6416  ac_status=$?
6417  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6418  (exit $ac_status); }; }; then
6419  cat >>confdefs.h <<\_ACEOF
6420#define SIGVOID 1
6421_ACEOF
6422
6423else
6424  echo "$as_me: failed program was:" >&5
6425sed 's/^/| /' conftest.$ac_ext >&5
6426
6427fi
6428rm -f conftest.$ac_objext conftest.$ac_ext
6429{ echo "$as_me:$LINENO: checking sigset..." >&5
6430echo "$as_me: checking sigset..." >&6;}
6431cat >conftest.$ac_ext <<_ACEOF
6432#line $LINENO "configure"
6433/* confdefs.h.  */
6434_ACEOF
6435cat confdefs.h >>conftest.$ac_ext
6436cat >>conftest.$ac_ext <<_ACEOF
6437/* end confdefs.h.  */
6438
6439#include <sys/types.h>
6440#include <signal.h>
6441
6442int
6443main ()
6444{
6445
6446#ifdef SIGVOID
6447sigset(0, (void (*)())0);
6448#else
6449sigset(0, (int (*)())0);
6450#endif
6451
6452  ;
6453  return 0;
6454}
6455_ACEOF
6456rm -f conftest.$ac_objext conftest$ac_exeext
6457if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6458  (eval $ac_link) 2>&5
6459  ac_status=$?
6460  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6461  (exit $ac_status); } &&
6462         { ac_try='test -s conftest$ac_exeext'
6463  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6464  (eval $ac_try) 2>&5
6465  ac_status=$?
6466  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6467  (exit $ac_status); }; }; then
6468  cat >>confdefs.h <<\_ACEOF
6469#define USESIGSET 1
6470_ACEOF
6471
6472else
6473  echo "$as_me: failed program was:" >&5
6474sed 's/^/| /' conftest.$ac_ext >&5
6475
6476fi
6477rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6478{ echo "$as_me:$LINENO: checking signal implementation..." >&5
6479echo "$as_me: checking signal implementation..." >&6;}
6480if test "$cross_compiling" = yes; then
6481  { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
6482See \`config.log' for more details." >&5
6483echo "$as_me: error: cannot run test program while cross compiling
6484See \`config.log' for more details." >&2;}
6485   { (exit 1); exit 1; }; }
6486else
6487  cat >conftest.$ac_ext <<_ACEOF
6488#line $LINENO "configure"
6489/* confdefs.h.  */
6490_ACEOF
6491cat confdefs.h >>conftest.$ac_ext
6492cat >>conftest.$ac_ext <<_ACEOF
6493/* end confdefs.h.  */
6494
6495#include <sys/types.h>
6496#include <signal.h>
6497
6498#ifndef SIGCLD
6499#define SIGCLD SIGCHLD
6500#endif
6501#ifdef USESIGSET
6502#define signal sigset
6503#endif
6504
6505int got;
6506
6507#ifdef SIGVOID
6508void
6509#endif
6510hand()
6511{
6512  got++;
6513}
6514
6515main()
6516{
6517  /* on hpux we use sigvec to get bsd signals */
6518#ifdef __hpux
6519  (void)signal(SIGCLD, hand);
6520  kill(getpid(), SIGCLD);
6521  kill(getpid(), SIGCLD);
6522  if (got < 2)
6523    exit(1);
6524#endif
6525  exit(0);
6526}
6527
6528_ACEOF
6529rm -f conftest$ac_exeext
6530if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6531  (eval $ac_link) 2>&5
6532  ac_status=$?
6533  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6534  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6535  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6536  (eval $ac_try) 2>&5
6537  ac_status=$?
6538  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6539  (exit $ac_status); }; }; then
6540  :
6541else
6542  echo "$as_me: program exited with status $ac_status" >&5
6543echo "$as_me: failed program was:" >&5
6544sed 's/^/| /' conftest.$ac_ext >&5
6545
6546( exit $ac_status )
6547cat >>confdefs.h <<\_ACEOF
6548#define SYSVSIGS 1
6549_ACEOF
6550
6551fi
6552rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6553fi
6554
6555fi
6556
6557
6558{ echo "$as_me:$LINENO: checking for crypt and sec libraries..." >&5
6559echo "$as_me: checking for crypt and sec libraries..." >&6;}
6560test -f /lib/libcrypt_d.a || test -f /usr/lib/libcrypt_d.a && LIBS="$LIBS -lcrypt_d"
6561oldlibs="$LIBS"
6562LIBS="$LIBS -lcrypt"
6563{ echo "$as_me:$LINENO: checking crypt..." >&5
6564echo "$as_me: checking crypt..." >&6;}
6565cat >conftest.$ac_ext <<_ACEOF
6566#line $LINENO "configure"
6567/* confdefs.h.  */
6568_ACEOF
6569cat confdefs.h >>conftest.$ac_ext
6570cat >>conftest.$ac_ext <<_ACEOF
6571/* end confdefs.h.  */
6572
6573int
6574main ()
6575{
6576
6577  ;
6578  return 0;
6579}
6580_ACEOF
6581rm -f conftest.$ac_objext conftest$ac_exeext
6582if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6583  (eval $ac_link) 2>&5
6584  ac_status=$?
6585  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6586  (exit $ac_status); } &&
6587         { ac_try='test -s conftest$ac_exeext'
6588  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6589  (eval $ac_try) 2>&5
6590  ac_status=$?
6591  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6592  (exit $ac_status); }; }; then
6593  :
6594else
6595  echo "$as_me: failed program was:" >&5
6596sed 's/^/| /' conftest.$ac_ext >&5
6597
6598LIBS="$oldlibs"
6599fi
6600rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6601test -f /lib/libsec.a || test -f /usr/lib/libsec.a && LIBS="$LIBS -lsec"
6602test -f /lib/libshadow.a || test -f /usr/lib/libshadow.a && LIBS="$LIBS -lshadow"
6603oldlibs="$LIBS"
6604LIBS="$LIBS -lsun"
6605{ echo "$as_me:$LINENO: checking IRIX sun library..." >&5
6606echo "$as_me: checking IRIX sun library..." >&6;}
6607cat >conftest.$ac_ext <<_ACEOF
6608#line $LINENO "configure"
6609/* confdefs.h.  */
6610_ACEOF
6611cat confdefs.h >>conftest.$ac_ext
6612cat >>conftest.$ac_ext <<_ACEOF
6613/* end confdefs.h.  */
6614
6615int
6616main ()
6617{
6618
6619  ;
6620  return 0;
6621}
6622_ACEOF
6623rm -f conftest.$ac_objext conftest$ac_exeext
6624if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6625  (eval $ac_link) 2>&5
6626  ac_status=$?
6627  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6628  (exit $ac_status); } &&
6629         { ac_try='test -s conftest$ac_exeext'
6630  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6631  (eval $ac_try) 2>&5
6632  ac_status=$?
6633  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6634  (exit $ac_status); }; }; then
6635  :
6636else
6637  echo "$as_me: failed program was:" >&5
6638sed 's/^/| /' conftest.$ac_ext >&5
6639
6640LIBS="$oldlibs"
6641fi
6642rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6643
6644{ echo "$as_me:$LINENO: checking syslog..." >&5
6645echo "$as_me: checking syslog..." >&6;}
6646cat >conftest.$ac_ext <<_ACEOF
6647#line $LINENO "configure"
6648/* confdefs.h.  */
6649_ACEOF
6650cat confdefs.h >>conftest.$ac_ext
6651cat >>conftest.$ac_ext <<_ACEOF
6652/* end confdefs.h.  */
6653
6654int
6655main ()
6656{
6657closelog();
6658  ;
6659  return 0;
6660}
6661_ACEOF
6662rm -f conftest.$ac_objext conftest$ac_exeext
6663if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6664  (eval $ac_link) 2>&5
6665  ac_status=$?
6666  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6667  (exit $ac_status); } &&
6668         { ac_try='test -s conftest$ac_exeext'
6669  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6670  (eval $ac_try) 2>&5
6671  ac_status=$?
6672  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6673  (exit $ac_status); }; }; then
6674  :
6675else
6676  echo "$as_me: failed program was:" >&5
6677sed 's/^/| /' conftest.$ac_ext >&5
6678
6679oldlibs="$LIBS"
6680LIBS="$LIBS -lbsd"
6681{ echo "$as_me:$LINENO: checking syslog in libbsd.a..." >&5
6682echo "$as_me: checking syslog in libbsd.a..." >&6;}
6683cat >conftest.$ac_ext <<_ACEOF
6684#line $LINENO "configure"
6685/* confdefs.h.  */
6686_ACEOF
6687cat confdefs.h >>conftest.$ac_ext
6688cat >>conftest.$ac_ext <<_ACEOF
6689/* end confdefs.h.  */
6690
6691int
6692main ()
6693{
6694closelog();
6695  ;
6696  return 0;
6697}
6698_ACEOF
6699rm -f conftest.$ac_objext conftest$ac_exeext
6700if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6701  (eval $ac_link) 2>&5
6702  ac_status=$?
6703  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6704  (exit $ac_status); } &&
6705         { ac_try='test -s conftest$ac_exeext'
6706  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6707  (eval $ac_try) 2>&5
6708  ac_status=$?
6709  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6710  (exit $ac_status); }; }; then
6711  echo "- found." 1>&6
6712
6713else
6714  echo "$as_me: failed program was:" >&5
6715sed 's/^/| /' conftest.$ac_ext >&5
6716
6717LIBS="$oldlibs"
6718echo "- bad news: syslog missing." 1>&6
6719 cat >>confdefs.h <<\_ACEOF
6720#define NOSYSLOG 1
6721_ACEOF
6722
6723fi
6724rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6725fi
6726rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6727
6728cat >conftest.$ac_ext <<_ACEOF
6729#line $LINENO "configure"
6730/* confdefs.h.  */
6731_ACEOF
6732cat confdefs.h >>conftest.$ac_ext
6733cat >>conftest.$ac_ext <<_ACEOF
6734/* end confdefs.h.  */
6735#ifdef M_UNIX
6736   yes;
6737#endif
6738
6739_ACEOF
6740if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6741  $EGREP "yes" >/dev/null 2>&1; then
6742  LIBS="$LIBS -lsocket -lcrypt_i"
6743fi
6744rm -f conftest*
6745
6746
6747{ echo "$as_me:$LINENO: checking wait union..." >&5
6748echo "$as_me: checking wait union..." >&6;}
6749cat >conftest.$ac_ext <<_ACEOF
6750#line $LINENO "configure"
6751/* confdefs.h.  */
6752_ACEOF
6753cat confdefs.h >>conftest.$ac_ext
6754cat >>conftest.$ac_ext <<_ACEOF
6755/* end confdefs.h.  */
6756#include <sys/types.h>
6757#include <sys/wait.h>
6758
6759int
6760main ()
6761{
6762
6763  union wait x;
6764  int y;
6765#ifdef WEXITSTATUS
6766  y = WEXITSTATUS(x);
6767#endif
6768
6769  ;
6770  return 0;
6771}
6772_ACEOF
6773rm -f conftest.$ac_objext
6774if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6775  (eval $ac_compile) 2>&5
6776  ac_status=$?
6777  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6778  (exit $ac_status); } &&
6779         { ac_try='test -s conftest.$ac_objext'
6780  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6781  (eval $ac_try) 2>&5
6782  ac_status=$?
6783  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6784  (exit $ac_status); }; }; then
6785  cat >>confdefs.h <<\_ACEOF
6786#define BSDWAIT 1
6787_ACEOF
6788
6789else
6790  echo "$as_me: failed program was:" >&5
6791sed 's/^/| /' conftest.$ac_ext >&5
6792
6793fi
6794rm -f conftest.$ac_objext conftest.$ac_ext
6795
6796if test -z "$butterfly"; then
6797{ echo "$as_me:$LINENO: checking for termio or termios..." >&5
6798echo "$as_me: checking for termio or termios..." >&6;}
6799cat >conftest.$ac_ext <<_ACEOF
6800#line $LINENO "configure"
6801/* confdefs.h.  */
6802_ACEOF
6803cat confdefs.h >>conftest.$ac_ext
6804cat >>conftest.$ac_ext <<_ACEOF
6805/* end confdefs.h.  */
6806#include <termio.h>
6807_ACEOF
6808if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
6809  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6810  ac_status=$?
6811  grep -v '^ *+' conftest.er1 >conftest.err
6812  rm -f conftest.er1
6813  cat conftest.err >&5
6814  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6815  (exit $ac_status); } >/dev/null; then
6816  if test -s conftest.err; then
6817    ac_cpp_err=$ac_c_preproc_warn_flag
6818  else
6819    ac_cpp_err=
6820  fi
6821else
6822  ac_cpp_err=yes
6823fi
6824if test -z "$ac_cpp_err"; then
6825  cat >>confdefs.h <<\_ACEOF
6826#define TERMIO 1
6827_ACEOF
6828
6829else
6830  echo "$as_me: failed program was:" >&5
6831sed 's/^/| /' conftest.$ac_ext >&5
6832
6833  if test -n "$posix"; then
6834cat >conftest.$ac_ext <<_ACEOF
6835#line $LINENO "configure"
6836/* confdefs.h.  */
6837_ACEOF
6838cat confdefs.h >>conftest.$ac_ext
6839cat >>conftest.$ac_ext <<_ACEOF
6840/* end confdefs.h.  */
6841#include <termios.h>
6842_ACEOF
6843if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
6844  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6845  ac_status=$?
6846  grep -v '^ *+' conftest.er1 >conftest.err
6847  rm -f conftest.er1
6848  cat conftest.err >&5
6849  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6850  (exit $ac_status); } >/dev/null; then
6851  if test -s conftest.err; then
6852    ac_cpp_err=$ac_c_preproc_warn_flag
6853  else
6854    ac_cpp_err=
6855  fi
6856else
6857  ac_cpp_err=yes
6858fi
6859if test -z "$ac_cpp_err"; then
6860  cat >>confdefs.h <<\_ACEOF
6861#define TERMIO 1
6862_ACEOF
6863
6864else
6865  echo "$as_me: failed program was:" >&5
6866sed 's/^/| /' conftest.$ac_ext >&5
6867
6868
6869fi
6870rm -f conftest.err conftest.$ac_ext
6871fi
6872
6873fi
6874rm -f conftest.err conftest.$ac_ext
6875fi
6876
6877{ echo "$as_me:$LINENO: checking getspnam..." >&5
6878echo "$as_me: checking getspnam..." >&6;}
6879cat >conftest.$ac_ext <<_ACEOF
6880#line $LINENO "configure"
6881/* confdefs.h.  */
6882_ACEOF
6883cat confdefs.h >>conftest.$ac_ext
6884cat >>conftest.$ac_ext <<_ACEOF
6885/* end confdefs.h.  */
6886#include <shadow.h>
6887int
6888main ()
6889{
6890getspnam("x");
6891  ;
6892  return 0;
6893}
6894_ACEOF
6895rm -f conftest.$ac_objext conftest$ac_exeext
6896if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6897  (eval $ac_link) 2>&5
6898  ac_status=$?
6899  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6900  (exit $ac_status); } &&
6901         { ac_try='test -s conftest$ac_exeext'
6902  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6903  (eval $ac_try) 2>&5
6904  ac_status=$?
6905  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6906  (exit $ac_status); }; }; then
6907  cat >>confdefs.h <<\_ACEOF
6908#define SHADOWPW 1
6909_ACEOF
6910
6911else
6912  echo "$as_me: failed program was:" >&5
6913sed 's/^/| /' conftest.$ac_ext >&5
6914
6915fi
6916rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6917
6918{ echo "$as_me:$LINENO: checking getttyent..." >&5
6919echo "$as_me: checking getttyent..." >&6;}
6920cat >conftest.$ac_ext <<_ACEOF
6921#line $LINENO "configure"
6922/* confdefs.h.  */
6923_ACEOF
6924cat confdefs.h >>conftest.$ac_ext
6925cat >>conftest.$ac_ext <<_ACEOF
6926/* end confdefs.h.  */
6927
6928int
6929main ()
6930{
6931getttyent();
6932  ;
6933  return 0;
6934}
6935_ACEOF
6936rm -f conftest.$ac_objext conftest$ac_exeext
6937if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6938  (eval $ac_link) 2>&5
6939  ac_status=$?
6940  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6941  (exit $ac_status); } &&
6942         { ac_try='test -s conftest$ac_exeext'
6943  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6944  (eval $ac_try) 2>&5
6945  ac_status=$?
6946  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6947  (exit $ac_status); }; }; then
6948  cat >>confdefs.h <<\_ACEOF
6949#define GETTTYENT 1
6950_ACEOF
6951
6952else
6953  echo "$as_me: failed program was:" >&5
6954sed 's/^/| /' conftest.$ac_ext >&5
6955
6956fi
6957rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6958
6959{ echo "$as_me:$LINENO: checking fdwalk..." >&5
6960echo "$as_me: checking fdwalk..." >&6;}
6961cat >conftest.$ac_ext <<_ACEOF
6962#line $LINENO "configure"
6963/* confdefs.h.  */
6964_ACEOF
6965cat confdefs.h >>conftest.$ac_ext
6966cat >>conftest.$ac_ext <<_ACEOF
6967/* end confdefs.h.  */
6968#include <stdlib.h>
6969int
6970main ()
6971{
6972fdwalk(NULL, NULL);
6973  ;
6974  return 0;
6975}
6976_ACEOF
6977rm -f conftest.$ac_objext conftest$ac_exeext
6978if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6979  (eval $ac_link) 2>&5
6980  ac_status=$?
6981  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6982  (exit $ac_status); } &&
6983         { ac_try='test -s conftest$ac_exeext'
6984  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6985  (eval $ac_try) 2>&5
6986  ac_status=$?
6987  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6988  (exit $ac_status); }; }; then
6989  cat >>confdefs.h <<\_ACEOF
6990#define HAVE_FDWALK 1
6991_ACEOF
6992
6993else
6994  echo "$as_me: failed program was:" >&5
6995sed 's/^/| /' conftest.$ac_ext >&5
6996
6997fi
6998rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6999
7000{ echo "$as_me:$LINENO: checking whether memcpy/memmove/bcopy handles overlapping arguments..." >&5
7001echo "$as_me: checking whether memcpy/memmove/bcopy handles overlapping arguments..." >&6;}
7002if test "$cross_compiling" = yes; then
7003  { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
7004See \`config.log' for more details." >&5
7005echo "$as_me: error: cannot run test program while cross compiling
7006See \`config.log' for more details." >&2;}
7007   { (exit 1); exit 1; }; }
7008else
7009  cat >conftest.$ac_ext <<_ACEOF
7010#line $LINENO "configure"
7011/* confdefs.h.  */
7012_ACEOF
7013cat confdefs.h >>conftest.$ac_ext
7014cat >>conftest.$ac_ext <<_ACEOF
7015/* end confdefs.h.  */
7016
7017main() {
7018  char buf[10];
7019  strcpy(buf, "abcdefghi");
7020  bcopy(buf, buf + 2, 3);
7021  if (strncmp(buf, "ababcf", 6))
7022    exit(1);
7023  strcpy(buf, "abcdefghi");
7024  bcopy(buf + 2, buf, 3);
7025  if (strncmp(buf, "cdedef", 6))
7026    exit(1);
7027  exit(0); /* libc version works properly.  */
7028}
7029_ACEOF
7030rm -f conftest$ac_exeext
7031if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7032  (eval $ac_link) 2>&5
7033  ac_status=$?
7034  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7035  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7036  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7037  (eval $ac_try) 2>&5
7038  ac_status=$?
7039  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7040  (exit $ac_status); }; }; then
7041  cat >>confdefs.h <<\_ACEOF
7042#define USEBCOPY 1
7043_ACEOF
7044
7045else
7046  echo "$as_me: program exited with status $ac_status" >&5
7047echo "$as_me: failed program was:" >&5
7048sed 's/^/| /' conftest.$ac_ext >&5
7049
7050fi
7051rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7052fi
7053
7054if test "$cross_compiling" = yes; then
7055  { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
7056See \`config.log' for more details." >&5
7057echo "$as_me: error: cannot run test program while cross compiling
7058See \`config.log' for more details." >&2;}
7059   { (exit 1); exit 1; }; }
7060else
7061  cat >conftest.$ac_ext <<_ACEOF
7062#line $LINENO "configure"
7063/* confdefs.h.  */
7064_ACEOF
7065cat confdefs.h >>conftest.$ac_ext
7066cat >>conftest.$ac_ext <<_ACEOF
7067/* end confdefs.h.  */
7068
7069#define bcopy(s,d,l) memmove(d,s,l)
7070main() {
7071  char buf[10];
7072  strcpy(buf, "abcdefghi");
7073  bcopy(buf, buf + 2, 3);
7074  if (strncmp(buf, "ababcf", 6))
7075    exit(1);
7076  strcpy(buf, "abcdefghi");
7077  bcopy(buf + 2, buf, 3);
7078  if (strncmp(buf, "cdedef", 6))
7079    exit(1);
7080  exit(0); /* libc version works properly.  */
7081}
7082_ACEOF
7083rm -f conftest$ac_exeext
7084if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7085  (eval $ac_link) 2>&5
7086  ac_status=$?
7087  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7088  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7089  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7090  (eval $ac_try) 2>&5
7091  ac_status=$?
7092  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7093  (exit $ac_status); }; }; then
7094  cat >>confdefs.h <<\_ACEOF
7095#define USEMEMMOVE 1
7096_ACEOF
7097
7098else
7099  echo "$as_me: program exited with status $ac_status" >&5
7100echo "$as_me: failed program was:" >&5
7101sed 's/^/| /' conftest.$ac_ext >&5
7102
7103fi
7104rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7105fi
7106
7107
7108if test "$cross_compiling" = yes; then
7109  { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
7110See \`config.log' for more details." >&5
7111echo "$as_me: error: cannot run test program while cross compiling
7112See \`config.log' for more details." >&2;}
7113   { (exit 1); exit 1; }; }
7114else
7115  cat >conftest.$ac_ext <<_ACEOF
7116#line $LINENO "configure"
7117/* confdefs.h.  */
7118_ACEOF
7119cat confdefs.h >>conftest.$ac_ext
7120cat >>conftest.$ac_ext <<_ACEOF
7121/* end confdefs.h.  */
7122
7123#define bcopy(s,d,l) memcpy(d,s,l)
7124main() {
7125  char buf[10];
7126  strcpy(buf, "abcdefghi");
7127  bcopy(buf, buf + 2, 3);
7128  if (strncmp(buf, "ababcf", 6))
7129    exit(1);
7130  strcpy(buf, "abcdefghi");
7131  bcopy(buf + 2, buf, 3);
7132  if (strncmp(buf, "cdedef", 6))
7133    exit(1);
7134  exit(0); /* libc version works properly.  */
7135}
7136_ACEOF
7137rm -f conftest$ac_exeext
7138if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7139  (eval $ac_link) 2>&5
7140  ac_status=$?
7141  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7142  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7143  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7144  (eval $ac_try) 2>&5
7145  ac_status=$?
7146  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7147  (exit $ac_status); }; }; then
7148  cat >>confdefs.h <<\_ACEOF
7149#define USEMEMCPY 1
7150_ACEOF
7151
7152else
7153  echo "$as_me: program exited with status $ac_status" >&5
7154echo "$as_me: failed program was:" >&5
7155sed 's/^/| /' conftest.$ac_ext >&5
7156
7157fi
7158rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7159fi
7160
7161echo "$as_me:$LINENO: checking long file names" >&5
7162echo $ECHO_N "checking long file names... $ECHO_C" >&6
7163(echo 1 > /tmp/conftest9012345) 2>/dev/null
7164(echo 2 > /tmp/conftest9012346) 2>/dev/null
7165val=`cat /tmp/conftest9012345 2>/dev/null`
7166if test -f /tmp/conftest9012345 && test "$val" = 1; then
7167echo "$as_me:$LINENO: result: yes" >&5
7168echo "${ECHO_T}yes" >&6
7169else
7170echo "$as_me:$LINENO: result: no" >&5
7171echo "${ECHO_T}no" >&6
7172cat >>confdefs.h <<\_ACEOF
7173#define NAME_MAX 14
7174_ACEOF
7175
7176fi
7177rm -f /tmp/conftest*
7178
7179echo "$as_me:$LINENO: checking for vsprintf" >&5
7180echo $ECHO_N "checking for vsprintf... $ECHO_C" >&6
7181cat >conftest.$ac_ext <<_ACEOF
7182#line $LINENO "configure"
7183/* confdefs.h.  */
7184_ACEOF
7185cat confdefs.h >>conftest.$ac_ext
7186cat >>conftest.$ac_ext <<_ACEOF
7187/* end confdefs.h.  */
7188
7189int
7190main ()
7191{
7192vsprintf(0,0,0);
7193  ;
7194  return 0;
7195}
7196_ACEOF
7197rm -f conftest.$ac_objext conftest$ac_exeext
7198if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7199  (eval $ac_link) 2>&5
7200  ac_status=$?
7201  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7202  (exit $ac_status); } &&
7203         { ac_try='test -s conftest$ac_exeext'
7204  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7205  (eval $ac_try) 2>&5
7206  ac_status=$?
7207  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7208  (exit $ac_status); }; }; then
7209  echo "$as_me:$LINENO: result: yes" >&5
7210echo "${ECHO_T}yes" >&6;cat >>confdefs.h <<\_ACEOF
7211#define USEVARARGS 1
7212_ACEOF
7213
7214else
7215  echo "$as_me: failed program was:" >&5
7216sed 's/^/| /' conftest.$ac_ext >&5
7217
7218echo "$as_me:$LINENO: result: no" >&5
7219echo "${ECHO_T}no" >&6
7220fi
7221rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7222
7223
7224
7225
7226
7227
7228ac_header_dirent=no
7229for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
7230  as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7231echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
7232echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
7233if eval "test \"\${$as_ac_Header+set}\" = set"; then
7234  echo $ECHO_N "(cached) $ECHO_C" >&6
7235else
7236  cat >conftest.$ac_ext <<_ACEOF
7237#line $LINENO "configure"
7238/* confdefs.h.  */
7239_ACEOF
7240cat confdefs.h >>conftest.$ac_ext
7241cat >>conftest.$ac_ext <<_ACEOF
7242/* end confdefs.h.  */
7243#include <sys/types.h>
7244#include <$ac_hdr>
7245
7246int
7247main ()
7248{
7249if ((DIR *) 0)
7250return 0;
7251  ;
7252  return 0;
7253}
7254_ACEOF
7255rm -f conftest.$ac_objext
7256if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7257  (eval $ac_compile) 2>&5
7258  ac_status=$?
7259  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7260  (exit $ac_status); } &&
7261         { ac_try='test -s conftest.$ac_objext'
7262  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7263  (eval $ac_try) 2>&5
7264  ac_status=$?
7265  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7266  (exit $ac_status); }; }; then
7267  eval "$as_ac_Header=yes"
7268else
7269  echo "$as_me: failed program was:" >&5
7270sed 's/^/| /' conftest.$ac_ext >&5
7271
7272eval "$as_ac_Header=no"
7273fi
7274rm -f conftest.$ac_objext conftest.$ac_ext
7275fi
7276echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7277echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7278if test `eval echo '${'$as_ac_Header'}'` = yes; then
7279  cat >>confdefs.h <<_ACEOF
7280#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
7281_ACEOF
7282
7283ac_header_dirent=$ac_hdr; break
7284fi
7285
7286done
7287# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7288if test $ac_header_dirent = dirent.h; then
7289  echo "$as_me:$LINENO: checking for library containing opendir" >&5
7290echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
7291if test "${ac_cv_search_opendir+set}" = set; then
7292  echo $ECHO_N "(cached) $ECHO_C" >&6
7293else
7294  ac_func_search_save_LIBS=$LIBS
7295ac_cv_search_opendir=no
7296cat >conftest.$ac_ext <<_ACEOF
7297#line $LINENO "configure"
7298/* confdefs.h.  */
7299_ACEOF
7300cat confdefs.h >>conftest.$ac_ext
7301cat >>conftest.$ac_ext <<_ACEOF
7302/* end confdefs.h.  */
7303
7304/* Override any gcc2 internal prototype to avoid an error.  */
7305#ifdef __cplusplus
7306extern "C"
7307#endif
7308/* We use char because int might match the return type of a gcc2
7309   builtin and then its argument prototype would still apply.  */
7310char opendir ();
7311int
7312main ()
7313{
7314opendir ();
7315  ;
7316  return 0;
7317}
7318_ACEOF
7319rm -f conftest.$ac_objext conftest$ac_exeext
7320if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7321  (eval $ac_link) 2>&5
7322  ac_status=$?
7323  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7324  (exit $ac_status); } &&
7325         { ac_try='test -s conftest$ac_exeext'
7326  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7327  (eval $ac_try) 2>&5
7328  ac_status=$?
7329  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7330  (exit $ac_status); }; }; then
7331  ac_cv_search_opendir="none required"
7332else
7333  echo "$as_me: failed program was:" >&5
7334sed 's/^/| /' conftest.$ac_ext >&5
7335
7336fi
7337rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7338if test "$ac_cv_search_opendir" = no; then
7339  for ac_lib in dir; do
7340    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7341    cat >conftest.$ac_ext <<_ACEOF
7342#line $LINENO "configure"
7343/* confdefs.h.  */
7344_ACEOF
7345cat confdefs.h >>conftest.$ac_ext
7346cat >>conftest.$ac_ext <<_ACEOF
7347/* end confdefs.h.  */
7348
7349/* Override any gcc2 internal prototype to avoid an error.  */
7350#ifdef __cplusplus
7351extern "C"
7352#endif
7353/* We use char because int might match the return type of a gcc2
7354   builtin and then its argument prototype would still apply.  */
7355char opendir ();
7356int
7357main ()
7358{
7359opendir ();
7360  ;
7361  return 0;
7362}
7363_ACEOF
7364rm -f conftest.$ac_objext conftest$ac_exeext
7365if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7366  (eval $ac_link) 2>&5
7367  ac_status=$?
7368  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7369  (exit $ac_status); } &&
7370         { ac_try='test -s conftest$ac_exeext'
7371  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7372  (eval $ac_try) 2>&5
7373  ac_status=$?
7374  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7375  (exit $ac_status); }; }; then
7376  ac_cv_search_opendir="-l$ac_lib"
7377break
7378else
7379  echo "$as_me: failed program was:" >&5
7380sed 's/^/| /' conftest.$ac_ext >&5
7381
7382fi
7383rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7384  done
7385fi
7386LIBS=$ac_func_search_save_LIBS
7387fi
7388echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
7389echo "${ECHO_T}$ac_cv_search_opendir" >&6
7390if test "$ac_cv_search_opendir" != no; then
7391  test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
7392
7393fi
7394
7395else
7396  echo "$as_me:$LINENO: checking for library containing opendir" >&5
7397echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
7398if test "${ac_cv_search_opendir+set}" = set; then
7399  echo $ECHO_N "(cached) $ECHO_C" >&6
7400else
7401  ac_func_search_save_LIBS=$LIBS
7402ac_cv_search_opendir=no
7403cat >conftest.$ac_ext <<_ACEOF
7404#line $LINENO "configure"
7405/* confdefs.h.  */
7406_ACEOF
7407cat confdefs.h >>conftest.$ac_ext
7408cat >>conftest.$ac_ext <<_ACEOF
7409/* end confdefs.h.  */
7410
7411/* Override any gcc2 internal prototype to avoid an error.  */
7412#ifdef __cplusplus
7413extern "C"
7414#endif
7415/* We use char because int might match the return type of a gcc2
7416   builtin and then its argument prototype would still apply.  */
7417char opendir ();
7418int
7419main ()
7420{
7421opendir ();
7422  ;
7423  return 0;
7424}
7425_ACEOF
7426rm -f conftest.$ac_objext conftest$ac_exeext
7427if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7428  (eval $ac_link) 2>&5
7429  ac_status=$?
7430  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7431  (exit $ac_status); } &&
7432         { ac_try='test -s conftest$ac_exeext'
7433  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7434  (eval $ac_try) 2>&5
7435  ac_status=$?
7436  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7437  (exit $ac_status); }; }; then
7438  ac_cv_search_opendir="none required"
7439else
7440  echo "$as_me: failed program was:" >&5
7441sed 's/^/| /' conftest.$ac_ext >&5
7442
7443fi
7444rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7445if test "$ac_cv_search_opendir" = no; then
7446  for ac_lib in x; do
7447    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7448    cat >conftest.$ac_ext <<_ACEOF
7449#line $LINENO "configure"
7450/* confdefs.h.  */
7451_ACEOF
7452cat confdefs.h >>conftest.$ac_ext
7453cat >>conftest.$ac_ext <<_ACEOF
7454/* end confdefs.h.  */
7455
7456/* Override any gcc2 internal prototype to avoid an error.  */
7457#ifdef __cplusplus
7458extern "C"
7459#endif
7460/* We use char because int might match the return type of a gcc2
7461   builtin and then its argument prototype would still apply.  */
7462char opendir ();
7463int
7464main ()
7465{
7466opendir ();
7467  ;
7468  return 0;
7469}
7470_ACEOF
7471rm -f conftest.$ac_objext conftest$ac_exeext
7472if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7473  (eval $ac_link) 2>&5
7474  ac_status=$?
7475  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7476  (exit $ac_status); } &&
7477         { ac_try='test -s conftest$ac_exeext'
7478  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7479  (eval $ac_try) 2>&5
7480  ac_status=$?
7481  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7482  (exit $ac_status); }; }; then
7483  ac_cv_search_opendir="-l$ac_lib"
7484break
7485else
7486  echo "$as_me: failed program was:" >&5
7487sed 's/^/| /' conftest.$ac_ext >&5
7488
7489fi
7490rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7491  done
7492fi
7493LIBS=$ac_func_search_save_LIBS
7494fi
7495echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
7496echo "${ECHO_T}$ac_cv_search_opendir" >&6
7497if test "$ac_cv_search_opendir" != no; then
7498  test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
7499
7500fi
7501
7502fi
7503
7504
7505echo "$as_me:$LINENO: checking for setenv" >&5
7506echo $ECHO_N "checking for setenv... $ECHO_C" >&6
7507cat >conftest.$ac_ext <<_ACEOF
7508#line $LINENO "configure"
7509/* confdefs.h.  */
7510_ACEOF
7511cat confdefs.h >>conftest.$ac_ext
7512cat >>conftest.$ac_ext <<_ACEOF
7513/* end confdefs.h.  */
7514
7515int
7516main ()
7517{
7518setenv((char *)0,(char *)0);unsetenv((char *)0);
7519  ;
7520  return 0;
7521}
7522_ACEOF
7523rm -f conftest.$ac_objext conftest$ac_exeext
7524if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7525  (eval $ac_link) 2>&5
7526  ac_status=$?
7527  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7528  (exit $ac_status); } &&
7529         { ac_try='test -s conftest$ac_exeext'
7530  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7531  (eval $ac_try) 2>&5
7532  ac_status=$?
7533  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7534  (exit $ac_status); }; }; then
7535  echo "$as_me:$LINENO: result: yes" >&5
7536echo "${ECHO_T}yes" >&6;cat >>confdefs.h <<\_ACEOF
7537#define USESETENV 1
7538_ACEOF
7539
7540else
7541  echo "$as_me: failed program was:" >&5
7542sed 's/^/| /' conftest.$ac_ext >&5
7543
7544echo "$as_me:$LINENO: result: no" >&5
7545echo "${ECHO_T}no" >&6
7546echo "$as_me:$LINENO: checking for putenv" >&5
7547echo $ECHO_N "checking for putenv... $ECHO_C" >&6
7548cat >conftest.$ac_ext <<_ACEOF
7549#line $LINENO "configure"
7550/* confdefs.h.  */
7551_ACEOF
7552cat confdefs.h >>conftest.$ac_ext
7553cat >>conftest.$ac_ext <<_ACEOF
7554/* end confdefs.h.  */
7555
7556int
7557main ()
7558{
7559putenv((char *)0);unsetenv((char *)0);
7560  ;
7561  return 0;
7562}
7563_ACEOF
7564rm -f conftest.$ac_objext conftest$ac_exeext
7565if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7566  (eval $ac_link) 2>&5
7567  ac_status=$?
7568  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7569  (exit $ac_status); } &&
7570         { ac_try='test -s conftest$ac_exeext'
7571  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7572  (eval $ac_try) 2>&5
7573  ac_status=$?
7574  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7575  (exit $ac_status); }; }; then
7576  echo "$as_me:$LINENO: result: yes" >&5
7577echo "${ECHO_T}yes" >&6
7578else
7579  echo "$as_me: failed program was:" >&5
7580sed 's/^/| /' conftest.$ac_ext >&5
7581
7582echo "$as_me:$LINENO: result: no" >&5
7583echo "${ECHO_T}no" >&6;cat >>confdefs.h <<\_ACEOF
7584#define NEEDPUTENV 1
7585_ACEOF
7586
7587
7588fi
7589rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7590fi
7591rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7592echo "$as_me:$LINENO: checking for nl_langinfo(CODESET)" >&5
7593echo $ECHO_N "checking for nl_langinfo(CODESET)... $ECHO_C" >&6
7594cat >conftest.$ac_ext <<_ACEOF
7595#line $LINENO "configure"
7596/* confdefs.h.  */
7597_ACEOF
7598cat confdefs.h >>conftest.$ac_ext
7599cat >>conftest.$ac_ext <<_ACEOF
7600/* end confdefs.h.  */
7601
7602#include <langinfo.h>
7603
7604int
7605main ()
7606{
7607nl_langinfo(CODESET);
7608  ;
7609  return 0;
7610}
7611_ACEOF
7612rm -f conftest.$ac_objext conftest$ac_exeext
7613if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7614  (eval $ac_link) 2>&5
7615  ac_status=$?
7616  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7617  (exit $ac_status); } &&
7618         { ac_try='test -s conftest$ac_exeext'
7619  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7620  (eval $ac_try) 2>&5
7621  ac_status=$?
7622  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7623  (exit $ac_status); }; }; then
7624  echo "$as_me:$LINENO: result: yes" >&5
7625echo "${ECHO_T}yes" >&6;cat >>confdefs.h <<\_ACEOF
7626#define HAVE_NL_LANGINFO 1
7627_ACEOF
7628
7629else
7630  echo "$as_me: failed program was:" >&5
7631sed 's/^/| /' conftest.$ac_ext >&5
7632
7633echo "$as_me:$LINENO: result: no" >&5
7634echo "${ECHO_T}no" >&6
7635fi
7636rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7637
7638echo "$as_me:$LINENO: checking for library containing gethostname" >&5
7639echo $ECHO_N "checking for library containing gethostname... $ECHO_C" >&6
7640if test "${ac_cv_search_gethostname+set}" = set; then
7641  echo $ECHO_N "(cached) $ECHO_C" >&6
7642else
7643  ac_func_search_save_LIBS=$LIBS
7644ac_cv_search_gethostname=no
7645cat >conftest.$ac_ext <<_ACEOF
7646#line $LINENO "configure"
7647/* confdefs.h.  */
7648_ACEOF
7649cat confdefs.h >>conftest.$ac_ext
7650cat >>conftest.$ac_ext <<_ACEOF
7651/* end confdefs.h.  */
7652
7653/* Override any gcc2 internal prototype to avoid an error.  */
7654#ifdef __cplusplus
7655extern "C"
7656#endif
7657/* We use char because int might match the return type of a gcc2
7658   builtin and then its argument prototype would still apply.  */
7659char gethostname ();
7660int
7661main ()
7662{
7663gethostname ();
7664  ;
7665  return 0;
7666}
7667_ACEOF
7668rm -f conftest.$ac_objext conftest$ac_exeext
7669if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7670  (eval $ac_link) 2>&5
7671  ac_status=$?
7672  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7673  (exit $ac_status); } &&
7674         { ac_try='test -s conftest$ac_exeext'
7675  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7676  (eval $ac_try) 2>&5
7677  ac_status=$?
7678  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7679  (exit $ac_status); }; }; then
7680  ac_cv_search_gethostname="none required"
7681else
7682  echo "$as_me: failed program was:" >&5
7683sed 's/^/| /' conftest.$ac_ext >&5
7684
7685fi
7686rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7687if test "$ac_cv_search_gethostname" = no; then
7688  for ac_lib in nsl; do
7689    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7690    cat >conftest.$ac_ext <<_ACEOF
7691#line $LINENO "configure"
7692/* confdefs.h.  */
7693_ACEOF
7694cat confdefs.h >>conftest.$ac_ext
7695cat >>conftest.$ac_ext <<_ACEOF
7696/* end confdefs.h.  */
7697
7698/* Override any gcc2 internal prototype to avoid an error.  */
7699#ifdef __cplusplus
7700extern "C"
7701#endif
7702/* We use char because int might match the return type of a gcc2
7703   builtin and then its argument prototype would still apply.  */
7704char gethostname ();
7705int
7706main ()
7707{
7708gethostname ();
7709  ;
7710  return 0;
7711}
7712_ACEOF
7713rm -f conftest.$ac_objext conftest$ac_exeext
7714if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7715  (eval $ac_link) 2>&5
7716  ac_status=$?
7717  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7718  (exit $ac_status); } &&
7719         { ac_try='test -s conftest$ac_exeext'
7720  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7721  (eval $ac_try) 2>&5
7722  ac_status=$?
7723  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7724  (exit $ac_status); }; }; then
7725  ac_cv_search_gethostname="-l$ac_lib"
7726break
7727else
7728  echo "$as_me: failed program was:" >&5
7729sed 's/^/| /' conftest.$ac_ext >&5
7730
7731fi
7732rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7733  done
7734fi
7735LIBS=$ac_func_search_save_LIBS
7736fi
7737echo "$as_me:$LINENO: result: $ac_cv_search_gethostname" >&5
7738echo "${ECHO_T}$ac_cv_search_gethostname" >&6
7739if test "$ac_cv_search_gethostname" != no; then
7740  test "$ac_cv_search_gethostname" = "none required" || LIBS="$ac_cv_search_gethostname $LIBS"
7741
7742fi
7743
7744
7745
7746
7747
7748
7749
7750
7751
7752
7753
7754
7755
7756for ac_func in rename fchmod fchown strerror lstat _exit utimes vsnprintf getcwd setlocale strftime
7757do
7758as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7759echo "$as_me:$LINENO: checking for $ac_func" >&5
7760echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7761if eval "test \"\${$as_ac_var+set}\" = set"; then
7762  echo $ECHO_N "(cached) $ECHO_C" >&6
7763else
7764  cat >conftest.$ac_ext <<_ACEOF
7765#line $LINENO "configure"
7766/* confdefs.h.  */
7767_ACEOF
7768cat confdefs.h >>conftest.$ac_ext
7769cat >>conftest.$ac_ext <<_ACEOF
7770/* end confdefs.h.  */
7771/* System header to define __stub macros and hopefully few prototypes,
7772    which can conflict with char $ac_func (); below.
7773    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7774    <limits.h> exists even on freestanding compilers.  */
7775#ifdef __STDC__
7776# include <limits.h>
7777#else
7778# include <assert.h>
7779#endif
7780/* Override any gcc2 internal prototype to avoid an error.  */
7781#ifdef __cplusplus
7782extern "C"
7783{
7784#endif
7785/* We use char because int might match the return type of a gcc2
7786   builtin and then its argument prototype would still apply.  */
7787char $ac_func ();
7788/* The GNU C library defines this for functions which it implements
7789    to always fail with ENOSYS.  Some functions are actually named
7790    something starting with __ and the normal name is an alias.  */
7791#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7792choke me
7793#else
7794char (*f) () = $ac_func;
7795#endif
7796#ifdef __cplusplus
7797}
7798#endif
7799
7800int
7801main ()
7802{
7803return f != $ac_func;
7804  ;
7805  return 0;
7806}
7807_ACEOF
7808rm -f conftest.$ac_objext conftest$ac_exeext
7809if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7810  (eval $ac_link) 2>&5
7811  ac_status=$?
7812  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7813  (exit $ac_status); } &&
7814         { ac_try='test -s conftest$ac_exeext'
7815  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7816  (eval $ac_try) 2>&5
7817  ac_status=$?
7818  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7819  (exit $ac_status); }; }; then
7820  eval "$as_ac_var=yes"
7821else
7822  echo "$as_me: failed program was:" >&5
7823sed 's/^/| /' conftest.$ac_ext >&5
7824
7825eval "$as_ac_var=no"
7826fi
7827rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7828fi
7829echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
7830echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7831if test `eval echo '${'$as_ac_var'}'` = yes; then
7832  cat >>confdefs.h <<_ACEOF
7833#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7834_ACEOF
7835
7836fi
7837done
7838
7839
7840# Check whether --enable-pam or --disable-pam was given.
7841if test "${enable_pam+set}" = set; then
7842  enableval="$enable_pam"
7843
7844fi;
7845if test "$enable_pam" = "yes"; then
7846    echo "$as_me:$LINENO: checking for PAM support" >&5
7847echo $ECHO_N "checking for PAM support... $ECHO_C" >&6
7848    oldlibs="$LIBS"
7849    LIBS="$LIBS -lpam"
7850    cat >conftest.$ac_ext <<_ACEOF
7851#line $LINENO "configure"
7852/* confdefs.h.  */
7853_ACEOF
7854cat confdefs.h >>conftest.$ac_ext
7855cat >>conftest.$ac_ext <<_ACEOF
7856/* end confdefs.h.  */
7857#include <security/pam_appl.h>
7858int
7859main ()
7860{
7861
7862	pam_start(0, 0, 0, 0);
7863	pam_authenticate(0, 0);
7864	pam_end(0,0);
7865
7866  ;
7867  return 0;
7868}
7869_ACEOF
7870rm -f conftest.$ac_objext conftest$ac_exeext
7871if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7872  (eval $ac_link) 2>&5
7873  ac_status=$?
7874  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7875  (exit $ac_status); } &&
7876         { ac_try='test -s conftest$ac_exeext'
7877  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7878  (eval $ac_try) 2>&5
7879  ac_status=$?
7880  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7881  (exit $ac_status); }; }; then
7882  echo "$as_me:$LINENO: result: yes" >&5
7883echo "${ECHO_T}yes" >&6;cat >>confdefs.h <<\_ACEOF
7884#define USE_PAM 1
7885_ACEOF
7886
7887else
7888  echo "$as_me: failed program was:" >&5
7889sed 's/^/| /' conftest.$ac_ext >&5
7890
7891echo "$as_me:$LINENO: result: no" >&5
7892echo "${ECHO_T}no" >&6;LIBS="$oldlibs"
7893fi
7894rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7895fi
7896
7897# Check whether --enable-use_locale or --disable-use_locale was given.
7898if test "${enable_use_locale+set}" = set; then
7899  enableval="$enable_use_locale"
7900
7901fi;
7902if test "$enable_use_locale" = "yes"; then
7903  cat >>confdefs.h <<\_ACEOF
7904#define USE_LOCALE 1
7905_ACEOF
7906
7907fi
7908# Check whether --enable-telnet or --disable-telnet was given.
7909if test "${enable_telnet+set}" = set; then
7910  enableval="$enable_telnet"
7911
7912fi;
7913if test "$enable_telnet" = "yes"; then
7914  cat >>confdefs.h <<\_ACEOF
7915#define BUILTIN_TELNET 1
7916_ACEOF
7917
7918fi
7919# Check whether --enable-colors256 or --disable-colors256 was given.
7920if test "${enable_colors256+set}" = set; then
7921  enableval="$enable_colors256"
7922
7923fi;
7924if test "$enable_colors256" = "yes"; then
7925  cat >>confdefs.h <<\_ACEOF
7926#define COLORS256 1
7927_ACEOF
7928
7929fi
7930# Check whether --enable-rxvt_osc or --disable-rxvt_osc was given.
7931if test "${enable_rxvt_osc+set}" = set; then
7932  enableval="$enable_rxvt_osc"
7933
7934fi;
7935if test "$enable_rxvt_osc" = "yes"; then
7936  cat >>confdefs.h <<\_ACEOF
7937#define RXVT_OSC 1
7938_ACEOF
7939
7940fi
7941
7942if test -z "$old_CFLAGS"; then
7943  if test "x$CFLAGS" = "x-g"; then
7944    CFLAGS="-O"
7945  fi
7946fi
7947test -n "$seqptx" && LIBS="-ltermcap -lc -lsocket -linet -lnsl -lsec -lseq"
7948
7949if test "$cross_compiling" = yes; then
7950  { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
7951See \`config.log' for more details." >&5
7952echo "$as_me: error: cannot run test program while cross compiling
7953See \`config.log' for more details." >&2;}
7954   { (exit 1); exit 1; }; }
7955else
7956  cat >conftest.$ac_ext <<_ACEOF
7957#line $LINENO "configure"
7958/* confdefs.h.  */
7959_ACEOF
7960cat confdefs.h >>conftest.$ac_ext
7961cat >>conftest.$ac_ext <<_ACEOF
7962/* end confdefs.h.  */
7963main(){exit(0);}
7964_ACEOF
7965rm -f conftest$ac_exeext
7966if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7967  (eval $ac_link) 2>&5
7968  ac_status=$?
7969  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7970  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7971  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7972  (eval $ac_try) 2>&5
7973  ac_status=$?
7974  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7975  (exit $ac_status); }; }; then
7976  :
7977else
7978  echo "$as_me: program exited with status $ac_status" >&5
7979echo "$as_me: failed program was:" >&5
7980sed 's/^/| /' conftest.$ac_ext >&5
7981
7982( exit $ac_status )
7983{ { echo "$as_me:$LINENO: error: Can't run the compiler - internal error. Sorry." >&5
7984echo "$as_me: error: Can't run the compiler - internal error. Sorry." >&2;}
7985   { (exit 1); exit 1; }; }
7986fi
7987rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7988fi
7989
7990ETCSCREENRC="\"/usr/local/etc/screenrc\""
7991if test -n "$prefix"; then
7992ETCSCREENRC="\"$prefix/etc/screenrc\""
7993fi
7994echo "$as_me:$LINENO: checking for the global screenrc file" >&5
7995echo $ECHO_N "checking for the global screenrc file... $ECHO_C" >&6
7996
7997# Check whether --with-sys-screenrc or --without-sys-screenrc was given.
7998if test "${with_sys_screenrc+set}" = set; then
7999  withval="$with_sys_screenrc"
8000   ETCSCREENRC="\"${withval}\""
8001fi;
8002cat >>confdefs.h <<_ACEOF
8003#define ETCSCREENRC $ETCSCREENRC
8004_ACEOF
8005
8006echo "$as_me:$LINENO: result: $ETCSCREENRC" >&5
8007echo "${ECHO_T}$ETCSCREENRC" >&6
8008
8009SCREENENCODINGS="\"/usr/local/lib/screen/utf8encodings\""
8010if test -n "$datadir"; then
8011eval SCREENENCODINGS="$datadir/screen/utf8encodings"
8012SCREENENCODINGS="\"$SCREENENCODINGS\""
8013fi
8014echo "$as_me:$LINENO: checking for the utf8-encodings location" >&5
8015echo $ECHO_N "checking for the utf8-encodings location... $ECHO_C" >&6
8016cat >>confdefs.h <<_ACEOF
8017#define SCREENENCODINGS $SCREENENCODINGS
8018_ACEOF
8019
8020echo "$as_me:$LINENO: result: $SCREENENCODINGS" >&5
8021echo "${ECHO_T}$SCREENENCODINGS" >&6
8022
8023                    ac_config_files="$ac_config_files Makefile doc/Makefile"
8024          ac_config_commands="$ac_config_commands default"
8025cat >confcache <<\_ACEOF
8026# This file is a shell script that caches the results of configure
8027# tests run on this system so they can be shared between configure
8028# scripts and configure runs, see configure's option --config-cache.
8029# It is not useful on other systems.  If it contains results you don't
8030# want to keep, you may remove or edit it.
8031#
8032# config.status only pays attention to the cache file if you give it
8033# the --recheck option to rerun configure.
8034#
8035# `ac_cv_env_foo' variables (set or unset) will be overridden when
8036# loading this file, other *unset* `ac_cv_foo' will be assigned the
8037# following values.
8038
8039_ACEOF
8040
8041# The following way of writing the cache mishandles newlines in values,
8042# but we know of no workaround that is simple, portable, and efficient.
8043# So, don't put newlines in cache variables' values.
8044# Ultrix sh set writes to stderr and can't be redirected directly,
8045# and sets the high bit in the cache file unless we assign to the vars.
8046{
8047  (set) 2>&1 |
8048    case `(ac_space=' '; set | grep ac_space) 2>&1` in
8049    *ac_space=\ *)
8050      # `set' does not quote correctly, so add quotes (double-quote
8051      # substitution turns \\\\ into \\, and sed turns \\ into \).
8052      sed -n \
8053        "s/'/'\\\\''/g;
8054    	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
8055      ;;
8056    *)
8057      # `set' quotes correctly as required by POSIX, so do not add quotes.
8058      sed -n \
8059        "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
8060      ;;
8061    esac;
8062} |
8063  sed '
8064     t clear
8065     : clear
8066     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
8067     t end
8068     /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
8069     : end' >>confcache
8070if diff $cache_file confcache >/dev/null 2>&1; then :; else
8071  if test -w $cache_file; then
8072    test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
8073    cat confcache >$cache_file
8074  else
8075    echo "not updating unwritable cache $cache_file"
8076  fi
8077fi
8078rm -f confcache
8079
8080test "x$prefix" = xNONE && prefix=$ac_default_prefix
8081# Let make expand exec_prefix.
8082test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
8083
8084# VPATH may cause trouble with some makes, so we remove $(srcdir),
8085# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
8086# trailing colons and then remove the whole line if VPATH becomes empty
8087# (actually we leave an empty line to preserve line numbers).
8088if test "x$srcdir" = x.; then
8089  ac_vpsub='/^[ 	]*VPATH[ 	]*=/{
8090s/:*\$(srcdir):*/:/;
8091s/:*\${srcdir}:*/:/;
8092s/:*@srcdir@:*/:/;
8093s/^\([^=]*=[ 	]*\):*/\1/;
8094s/:*$//;
8095s/^[^=]*=[ 	]*$//;
8096}'
8097fi
8098
8099DEFS=-DHAVE_CONFIG_H
8100
8101ac_libobjs=
8102ac_ltlibobjs=
8103for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
8104  # 1. Remove the extension, and $U if already installed.
8105  ac_i=`echo "$ac_i" |
8106         sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
8107  # 2. Add them.
8108  ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
8109  ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
8110done
8111LIBOBJS=$ac_libobjs
8112
8113LTLIBOBJS=$ac_ltlibobjs
8114
8115
8116
8117: ${CONFIG_STATUS=./config.status}
8118ac_clean_files_save=$ac_clean_files
8119ac_clean_files="$ac_clean_files $CONFIG_STATUS"
8120{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
8121echo "$as_me: creating $CONFIG_STATUS" >&6;}
8122cat >$CONFIG_STATUS <<_ACEOF
8123#! $SHELL
8124# Generated by $as_me.
8125# Run this file to recreate the current configuration.
8126# Compiler output produced by configure, useful for debugging
8127# configure, is in config.log if it exists.
8128
8129debug=false
8130ac_cs_recheck=false
8131ac_cs_silent=false
8132SHELL=\${CONFIG_SHELL-$SHELL}
8133_ACEOF
8134
8135cat >>$CONFIG_STATUS <<\_ACEOF
8136## --------------------- ##
8137## M4sh Initialization.  ##
8138## --------------------- ##
8139
8140# Be Bourne compatible
8141if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
8142  emulate sh
8143  NULLCMD=:
8144  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
8145  # is contrary to our usage.  Disable this feature.
8146  alias -g '${1+"$@"}'='"$@"'
8147elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
8148  set -o posix
8149fi
8150
8151# Support unset when possible.
8152if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
8153  as_unset=unset
8154else
8155  as_unset=false
8156fi
8157
8158
8159# Work around bugs in pre-3.0 UWIN ksh.
8160$as_unset ENV MAIL MAILPATH
8161PS1='$ '
8162PS2='> '
8163PS4='+ '
8164
8165# NLS nuisances.
8166for as_var in \
8167  LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
8168  LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
8169  LC_TELEPHONE LC_TIME
8170do
8171  if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then
8172    eval $as_var=C; export $as_var
8173  else
8174    $as_unset $as_var
8175  fi
8176done
8177
8178# Required to use basename.
8179if expr a : '\(a\)' >/dev/null 2>&1; then
8180  as_expr=expr
8181else
8182  as_expr=false
8183fi
8184
8185if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
8186  as_basename=basename
8187else
8188  as_basename=false
8189fi
8190
8191
8192# Name of the executable.
8193as_me=`$as_basename "$0" ||
8194$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
8195	 X"$0" : 'X\(//\)$' \| \
8196	 X"$0" : 'X\(/\)$' \| \
8197	 .     : '\(.\)' 2>/dev/null ||
8198echo X/"$0" |
8199    sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
8200  	  /^X\/\(\/\/\)$/{ s//\1/; q; }
8201  	  /^X\/\(\/\).*/{ s//\1/; q; }
8202  	  s/.*/./; q'`
8203
8204
8205# PATH needs CR, and LINENO needs CR and PATH.
8206# Avoid depending upon Character Ranges.
8207as_cr_letters='abcdefghijklmnopqrstuvwxyz'
8208as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
8209as_cr_Letters=$as_cr_letters$as_cr_LETTERS
8210as_cr_digits='0123456789'
8211as_cr_alnum=$as_cr_Letters$as_cr_digits
8212
8213# The user is always right.
8214if test "${PATH_SEPARATOR+set}" != set; then
8215  echo "#! /bin/sh" >conf$$.sh
8216  echo  "exit 0"   >>conf$$.sh
8217  chmod +x conf$$.sh
8218  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
8219    PATH_SEPARATOR=';'
8220  else
8221    PATH_SEPARATOR=:
8222  fi
8223  rm -f conf$$.sh
8224fi
8225
8226
8227  as_lineno_1=$LINENO
8228  as_lineno_2=$LINENO
8229  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
8230  test "x$as_lineno_1" != "x$as_lineno_2" &&
8231  test "x$as_lineno_3"  = "x$as_lineno_2"  || {
8232  # Find who we are.  Look in the path if we contain no path at all
8233  # relative or not.
8234  case $0 in
8235    *[\\/]* ) as_myself=$0 ;;
8236    *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8237for as_dir in $PATH
8238do
8239  IFS=$as_save_IFS
8240  test -z "$as_dir" && as_dir=.
8241  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
8242done
8243
8244       ;;
8245  esac
8246  # We did not find ourselves, most probably we were run as `sh COMMAND'
8247  # in which case we are not to be found in the path.
8248  if test "x$as_myself" = x; then
8249    as_myself=$0
8250  fi
8251  if test ! -f "$as_myself"; then
8252    { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
8253echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
8254   { (exit 1); exit 1; }; }
8255  fi
8256  case $CONFIG_SHELL in
8257  '')
8258    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8259for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
8260do
8261  IFS=$as_save_IFS
8262  test -z "$as_dir" && as_dir=.
8263  for as_base in sh bash ksh sh5; do
8264	 case $as_dir in
8265	 /*)
8266	   if ("$as_dir/$as_base" -c '
8267  as_lineno_1=$LINENO
8268  as_lineno_2=$LINENO
8269  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
8270  test "x$as_lineno_1" != "x$as_lineno_2" &&
8271  test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
8272	     $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
8273	     $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
8274	     CONFIG_SHELL=$as_dir/$as_base
8275	     export CONFIG_SHELL
8276	     exec "$CONFIG_SHELL" "$0" ${1+"$@"}
8277	   fi;;
8278	 esac
8279       done
8280done
8281;;
8282  esac
8283
8284  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
8285  # uniformly replaced by the line number.  The first 'sed' inserts a
8286  # line-number line before each line; the second 'sed' does the real
8287  # work.  The second script uses 'N' to pair each line-number line
8288  # with the numbered line, and appends trailing '-' during
8289  # substitution so that $LINENO is not a special case at line end.
8290  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
8291  # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
8292  sed '=' <$as_myself |
8293    sed '
8294      N
8295      s,$,-,
8296      : loop
8297      s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
8298      t loop
8299      s,-$,,
8300      s,^['$as_cr_digits']*\n,,
8301    ' >$as_me.lineno &&
8302  chmod +x $as_me.lineno ||
8303    { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
8304echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
8305   { (exit 1); exit 1; }; }
8306
8307  # Don't try to exec as it changes $[0], causing all sort of problems
8308  # (the dirname of $[0] is not the place where we might find the
8309  # original and so on.  Autoconf is especially sensible to this).
8310  . ./$as_me.lineno
8311  # Exit status is that of the last command.
8312  exit
8313}
8314
8315
8316case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
8317  *c*,-n*) ECHO_N= ECHO_C='
8318' ECHO_T='	' ;;
8319  *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
8320  *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
8321esac
8322
8323if expr a : '\(a\)' >/dev/null 2>&1; then
8324  as_expr=expr
8325else
8326  as_expr=false
8327fi
8328
8329rm -f conf$$ conf$$.exe conf$$.file
8330echo >conf$$.file
8331if ln -s conf$$.file conf$$ 2>/dev/null; then
8332  # We could just check for DJGPP; but this test a) works b) is more generic
8333  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
8334  if test -f conf$$.exe; then
8335    # Don't use ln at all; we don't have any links
8336    as_ln_s='cp -p'
8337  else
8338    as_ln_s='ln -s'
8339  fi
8340elif ln conf$$.file conf$$ 2>/dev/null; then
8341  as_ln_s=ln
8342else
8343  as_ln_s='cp -p'
8344fi
8345rm -f conf$$ conf$$.exe conf$$.file
8346
8347if mkdir -p . 2>/dev/null; then
8348  as_mkdir_p=:
8349else
8350  as_mkdir_p=false
8351fi
8352
8353as_executable_p="test -f"
8354
8355# Sed expression to map a string onto a valid CPP name.
8356as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
8357
8358# Sed expression to map a string onto a valid variable name.
8359as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
8360
8361
8362# IFS
8363# We need space, tab and new line, in precisely that order.
8364as_nl='
8365'
8366IFS=" 	$as_nl"
8367
8368# CDPATH.
8369$as_unset CDPATH
8370
8371exec 6>&1
8372
8373# Open the log real soon, to keep \$[0] and so on meaningful, and to
8374# report actual input values of CONFIG_FILES etc. instead of their
8375# values after options handling.  Logging --version etc. is OK.
8376exec 5>>config.log
8377{
8378  echo
8379  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
8380## Running $as_me. ##
8381_ASBOX
8382} >&5
8383cat >&5 <<_CSEOF
8384
8385This file was extended by $as_me, which was
8386generated by GNU Autoconf 2.57.  Invocation command line was
8387
8388  CONFIG_FILES    = $CONFIG_FILES
8389  CONFIG_HEADERS  = $CONFIG_HEADERS
8390  CONFIG_LINKS    = $CONFIG_LINKS
8391  CONFIG_COMMANDS = $CONFIG_COMMANDS
8392  $ $0 $@
8393
8394_CSEOF
8395echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
8396echo >&5
8397_ACEOF
8398
8399# Files that config.status was made for.
8400if test -n "$ac_config_files"; then
8401  echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
8402fi
8403
8404if test -n "$ac_config_headers"; then
8405  echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
8406fi
8407
8408if test -n "$ac_config_links"; then
8409  echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
8410fi
8411
8412if test -n "$ac_config_commands"; then
8413  echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
8414fi
8415
8416cat >>$CONFIG_STATUS <<\_ACEOF
8417
8418ac_cs_usage="\
8419\`$as_me' instantiates files from templates according to the
8420current configuration.
8421
8422Usage: $0 [OPTIONS] [FILE]...
8423
8424  -h, --help       print this help, then exit
8425  -V, --version    print version number, then exit
8426  -q, --quiet      do not print progress messages
8427  -d, --debug      don't remove temporary files
8428      --recheck    update $as_me by reconfiguring in the same conditions
8429  --file=FILE[:TEMPLATE]
8430                   instantiate the configuration file FILE
8431  --header=FILE[:TEMPLATE]
8432                   instantiate the configuration header FILE
8433
8434Configuration files:
8435$config_files
8436
8437Configuration headers:
8438$config_headers
8439
8440Configuration commands:
8441$config_commands
8442
8443Report bugs to <bug-autoconf@gnu.org>."
8444_ACEOF
8445
8446cat >>$CONFIG_STATUS <<_ACEOF
8447ac_cs_version="\\
8448config.status
8449configured by $0, generated by GNU Autoconf 2.57,
8450  with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
8451
8452Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
8453Free Software Foundation, Inc.
8454This config.status script is free software; the Free Software Foundation
8455gives unlimited permission to copy, distribute and modify it."
8456srcdir=$srcdir
8457INSTALL="$INSTALL"
8458_ACEOF
8459
8460cat >>$CONFIG_STATUS <<\_ACEOF
8461# If no file are specified by the user, then we need to provide default
8462# value.  By we need to know if files were specified by the user.
8463ac_need_defaults=:
8464while test $# != 0
8465do
8466  case $1 in
8467  --*=*)
8468    ac_option=`expr "x$1" : 'x\([^=]*\)='`
8469    ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
8470    ac_shift=:
8471    ;;
8472  -*)
8473    ac_option=$1
8474    ac_optarg=$2
8475    ac_shift=shift
8476    ;;
8477  *) # This is not an option, so the user has probably given explicit
8478     # arguments.
8479     ac_option=$1
8480     ac_need_defaults=false;;
8481  esac
8482
8483  case $ac_option in
8484  # Handling of the options.
8485_ACEOF
8486cat >>$CONFIG_STATUS <<\_ACEOF
8487  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
8488    ac_cs_recheck=: ;;
8489  --version | --vers* | -V )
8490    echo "$ac_cs_version"; exit 0 ;;
8491  --he | --h)
8492    # Conflict between --help and --header
8493    { { echo "$as_me:$LINENO: error: ambiguous option: $1
8494Try \`$0 --help' for more information." >&5
8495echo "$as_me: error: ambiguous option: $1
8496Try \`$0 --help' for more information." >&2;}
8497   { (exit 1); exit 1; }; };;
8498  --help | --hel | -h )
8499    echo "$ac_cs_usage"; exit 0 ;;
8500  --debug | --d* | -d )
8501    debug=: ;;
8502  --file | --fil | --fi | --f )
8503    $ac_shift
8504    CONFIG_FILES="$CONFIG_FILES $ac_optarg"
8505    ac_need_defaults=false;;
8506  --header | --heade | --head | --hea )
8507    $ac_shift
8508    CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
8509    ac_need_defaults=false;;
8510  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
8511  | -silent | --silent | --silen | --sile | --sil | --si | --s)
8512    ac_cs_silent=: ;;
8513
8514  # This is an error.
8515  -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
8516Try \`$0 --help' for more information." >&5
8517echo "$as_me: error: unrecognized option: $1
8518Try \`$0 --help' for more information." >&2;}
8519   { (exit 1); exit 1; }; } ;;
8520
8521  *) ac_config_targets="$ac_config_targets $1" ;;
8522
8523  esac
8524  shift
8525done
8526
8527ac_configure_extra_args=
8528
8529if $ac_cs_silent; then
8530  exec 6>/dev/null
8531  ac_configure_extra_args="$ac_configure_extra_args --silent"
8532fi
8533
8534_ACEOF
8535cat >>$CONFIG_STATUS <<_ACEOF
8536if \$ac_cs_recheck; then
8537  echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
8538  exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
8539fi
8540
8541_ACEOF
8542
8543
8544
8545
8546
8547cat >>$CONFIG_STATUS <<\_ACEOF
8548for ac_config_target in $ac_config_targets
8549do
8550  case "$ac_config_target" in
8551  # Handling of arguments.
8552  "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
8553  "doc/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
8554  "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
8555  "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
8556  *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
8557echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
8558   { (exit 1); exit 1; }; };;
8559  esac
8560done
8561
8562# If the user did not use the arguments to specify the items to instantiate,
8563# then the envvar interface is used.  Set only those that are not.
8564# We use the long form for the default assignment because of an extremely
8565# bizarre bug on SunOS 4.1.3.
8566if $ac_need_defaults; then
8567  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
8568  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
8569  test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
8570fi
8571
8572# Have a temporary directory for convenience.  Make it in the build tree
8573# simply because there is no reason to put it here, and in addition,
8574# creating and moving files from /tmp can sometimes cause problems.
8575# Create a temporary directory, and hook for its removal unless debugging.
8576$debug ||
8577{
8578  trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
8579  trap '{ (exit 1); exit 1; }' 1 2 13 15
8580}
8581
8582# Create a (secure) tmp directory for tmp files.
8583
8584{
8585  tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
8586  test -n "$tmp" && test -d "$tmp"
8587}  ||
8588{
8589  tmp=./confstat$$-$RANDOM
8590  (umask 077 && mkdir $tmp)
8591} ||
8592{
8593   echo "$me: cannot create a temporary directory in ." >&2
8594   { (exit 1); exit 1; }
8595}
8596
8597_ACEOF
8598
8599cat >>$CONFIG_STATUS <<_ACEOF
8600
8601#
8602# CONFIG_FILES section.
8603#
8604
8605# No need to generate the scripts if there are no CONFIG_FILES.
8606# This happens for instance when ./config.status config.h
8607if test -n "\$CONFIG_FILES"; then
8608  # Protect against being on the right side of a sed subst in config.status.
8609  sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
8610   s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
8611s,@SHELL@,$SHELL,;t t
8612s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
8613s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
8614s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
8615s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
8616s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
8617s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
8618s,@exec_prefix@,$exec_prefix,;t t
8619s,@prefix@,$prefix,;t t
8620s,@program_transform_name@,$program_transform_name,;t t
8621s,@bindir@,$bindir,;t t
8622s,@sbindir@,$sbindir,;t t
8623s,@libexecdir@,$libexecdir,;t t
8624s,@datadir@,$datadir,;t t
8625s,@sysconfdir@,$sysconfdir,;t t
8626s,@sharedstatedir@,$sharedstatedir,;t t
8627s,@localstatedir@,$localstatedir,;t t
8628s,@libdir@,$libdir,;t t
8629s,@includedir@,$includedir,;t t
8630s,@oldincludedir@,$oldincludedir,;t t
8631s,@infodir@,$infodir,;t t
8632s,@mandir@,$mandir,;t t
8633s,@build_alias@,$build_alias,;t t
8634s,@host_alias@,$host_alias,;t t
8635s,@target_alias@,$target_alias,;t t
8636s,@DEFS@,$DEFS,;t t
8637s,@ECHO_C@,$ECHO_C,;t t
8638s,@ECHO_N@,$ECHO_N,;t t
8639s,@ECHO_T@,$ECHO_T,;t t
8640s,@LIBS@,$LIBS,;t t
8641s,@VERSION@,$VERSION,;t t
8642s,@ac_prefix_program@,$ac_prefix_program,;t t
8643s,@CC@,$CC,;t t
8644s,@CFLAGS@,$CFLAGS,;t t
8645s,@LDFLAGS@,$LDFLAGS,;t t
8646s,@CPPFLAGS@,$CPPFLAGS,;t t
8647s,@ac_ct_CC@,$ac_ct_CC,;t t
8648s,@EXEEXT@,$EXEEXT,;t t
8649s,@OBJEXT@,$OBJEXT,;t t
8650s,@CPP@,$CPP,;t t
8651s,@EGREP@,$EGREP,;t t
8652s,@AWK@,$AWK,;t t
8653s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
8654s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
8655s,@INSTALL_DATA@,$INSTALL_DATA,;t t
8656s,@WRITEPATH@,$WRITEPATH,;t t
8657s,@XTERMPATH@,$XTERMPATH,;t t
8658s,@LIBOBJS@,$LIBOBJS,;t t
8659s,@LTLIBOBJS@,$LTLIBOBJS,;t t
8660CEOF
8661
8662_ACEOF
8663
8664  cat >>$CONFIG_STATUS <<\_ACEOF
8665  # Split the substitutions into bite-sized pieces for seds with
8666  # small command number limits, like on Digital OSF/1 and HP-UX.
8667  ac_max_sed_lines=48
8668  ac_sed_frag=1 # Number of current file.
8669  ac_beg=1 # First line for current file.
8670  ac_end=$ac_max_sed_lines # Line after last line for current file.
8671  ac_more_lines=:
8672  ac_sed_cmds=
8673  while $ac_more_lines; do
8674    if test $ac_beg -gt 1; then
8675      sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
8676    else
8677      sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
8678    fi
8679    if test ! -s $tmp/subs.frag; then
8680      ac_more_lines=false
8681    else
8682      # The purpose of the label and of the branching condition is to
8683      # speed up the sed processing (if there are no `@' at all, there
8684      # is no need to browse any of the substitutions).
8685      # These are the two extra sed commands mentioned above.
8686      (echo ':t
8687  /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
8688      if test -z "$ac_sed_cmds"; then
8689  	ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
8690      else
8691  	ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
8692      fi
8693      ac_sed_frag=`expr $ac_sed_frag + 1`
8694      ac_beg=$ac_end
8695      ac_end=`expr $ac_end + $ac_max_sed_lines`
8696    fi
8697  done
8698  if test -z "$ac_sed_cmds"; then
8699    ac_sed_cmds=cat
8700  fi
8701fi # test -n "$CONFIG_FILES"
8702
8703_ACEOF
8704cat >>$CONFIG_STATUS <<\_ACEOF
8705for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
8706  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
8707  case $ac_file in
8708  - | *:- | *:-:* ) # input from stdin
8709        cat >$tmp/stdin
8710        ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
8711        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
8712  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
8713        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
8714  * )   ac_file_in=$ac_file.in ;;
8715  esac
8716
8717  # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
8718  ac_dir=`(dirname "$ac_file") 2>/dev/null ||
8719$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
8720         X"$ac_file" : 'X\(//\)[^/]' \| \
8721         X"$ac_file" : 'X\(//\)$' \| \
8722         X"$ac_file" : 'X\(/\)' \| \
8723         .     : '\(.\)' 2>/dev/null ||
8724echo X"$ac_file" |
8725    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
8726  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
8727  	  /^X\(\/\/\)$/{ s//\1/; q; }
8728  	  /^X\(\/\).*/{ s//\1/; q; }
8729  	  s/.*/./; q'`
8730  { if $as_mkdir_p; then
8731    mkdir -p "$ac_dir"
8732  else
8733    as_dir="$ac_dir"
8734    as_dirs=
8735    while test ! -d "$as_dir"; do
8736      as_dirs="$as_dir $as_dirs"
8737      as_dir=`(dirname "$as_dir") 2>/dev/null ||
8738$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
8739         X"$as_dir" : 'X\(//\)[^/]' \| \
8740         X"$as_dir" : 'X\(//\)$' \| \
8741         X"$as_dir" : 'X\(/\)' \| \
8742         .     : '\(.\)' 2>/dev/null ||
8743echo X"$as_dir" |
8744    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
8745  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
8746  	  /^X\(\/\/\)$/{ s//\1/; q; }
8747  	  /^X\(\/\).*/{ s//\1/; q; }
8748  	  s/.*/./; q'`
8749    done
8750    test ! -n "$as_dirs" || mkdir $as_dirs
8751  fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
8752echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
8753   { (exit 1); exit 1; }; }; }
8754
8755  ac_builddir=.
8756
8757if test "$ac_dir" != .; then
8758  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
8759  # A "../" for each directory in $ac_dir_suffix.
8760  ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
8761else
8762  ac_dir_suffix= ac_top_builddir=
8763fi
8764
8765case $srcdir in
8766  .)  # No --srcdir option.  We are building in place.
8767    ac_srcdir=.
8768    if test -z "$ac_top_builddir"; then
8769       ac_top_srcdir=.
8770    else
8771       ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
8772    fi ;;
8773  [\\/]* | ?:[\\/]* )  # Absolute path.
8774    ac_srcdir=$srcdir$ac_dir_suffix;
8775    ac_top_srcdir=$srcdir ;;
8776  *) # Relative path.
8777    ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
8778    ac_top_srcdir=$ac_top_builddir$srcdir ;;
8779esac
8780# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
8781# absolute.
8782ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
8783ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
8784ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
8785ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
8786
8787
8788  case $INSTALL in
8789  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
8790  *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
8791  esac
8792
8793  if test x"$ac_file" != x-; then
8794    { echo "$as_me:$LINENO: creating $ac_file" >&5
8795echo "$as_me: creating $ac_file" >&6;}
8796    rm -f "$ac_file"
8797  fi
8798  # Let's still pretend it is `configure' which instantiates (i.e., don't
8799  # use $as_me), people would be surprised to read:
8800  #    /* config.h.  Generated by config.status.  */
8801  if test x"$ac_file" = x-; then
8802    configure_input=
8803  else
8804    configure_input="$ac_file.  "
8805  fi
8806  configure_input=$configure_input"Generated from `echo $ac_file_in |
8807                                     sed 's,.*/,,'` by configure."
8808
8809  # First look for the input files in the build tree, otherwise in the
8810  # src tree.
8811  ac_file_inputs=`IFS=:
8812    for f in $ac_file_in; do
8813      case $f in
8814      -) echo $tmp/stdin ;;
8815      [\\/$]*)
8816         # Absolute (can't be DOS-style, as IFS=:)
8817         test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
8818echo "$as_me: error: cannot find input file: $f" >&2;}
8819   { (exit 1); exit 1; }; }
8820         echo $f;;
8821      *) # Relative
8822         if test -f "$f"; then
8823           # Build tree
8824           echo $f
8825         elif test -f "$srcdir/$f"; then
8826           # Source tree
8827           echo $srcdir/$f
8828         else
8829           # /dev/null tree
8830           { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
8831echo "$as_me: error: cannot find input file: $f" >&2;}
8832   { (exit 1); exit 1; }; }
8833         fi;;
8834      esac
8835    done` || { (exit 1); exit 1; }
8836_ACEOF
8837cat >>$CONFIG_STATUS <<_ACEOF
8838  sed "$ac_vpsub
8839$extrasub
8840_ACEOF
8841cat >>$CONFIG_STATUS <<\_ACEOF
8842:t
8843/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
8844s,@configure_input@,$configure_input,;t t
8845s,@srcdir@,$ac_srcdir,;t t
8846s,@abs_srcdir@,$ac_abs_srcdir,;t t
8847s,@top_srcdir@,$ac_top_srcdir,;t t
8848s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
8849s,@builddir@,$ac_builddir,;t t
8850s,@abs_builddir@,$ac_abs_builddir,;t t
8851s,@top_builddir@,$ac_top_builddir,;t t
8852s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
8853s,@INSTALL@,$ac_INSTALL,;t t
8854" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
8855  rm -f $tmp/stdin
8856  if test x"$ac_file" != x-; then
8857    mv $tmp/out $ac_file
8858  else
8859    cat $tmp/out
8860    rm -f $tmp/out
8861  fi
8862
8863done
8864_ACEOF
8865cat >>$CONFIG_STATUS <<\_ACEOF
8866
8867#
8868# CONFIG_HEADER section.
8869#
8870
8871# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
8872# NAME is the cpp macro being defined and VALUE is the value it is being given.
8873#
8874# ac_d sets the value in "#define NAME VALUE" lines.
8875ac_dA='s,^\([ 	]*\)#\([ 	]*define[ 	][ 	]*\)'
8876ac_dB='[ 	].*$,\1#\2'
8877ac_dC=' '
8878ac_dD=',;t'
8879# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
8880ac_uA='s,^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
8881ac_uB='$,\1#\2define\3'
8882ac_uC=' '
8883ac_uD=',;t'
8884
8885for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
8886  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
8887  case $ac_file in
8888  - | *:- | *:-:* ) # input from stdin
8889        cat >$tmp/stdin
8890        ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
8891        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
8892  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
8893        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
8894  * )   ac_file_in=$ac_file.in ;;
8895  esac
8896
8897  test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
8898echo "$as_me: creating $ac_file" >&6;}
8899
8900  # First look for the input files in the build tree, otherwise in the
8901  # src tree.
8902  ac_file_inputs=`IFS=:
8903    for f in $ac_file_in; do
8904      case $f in
8905      -) echo $tmp/stdin ;;
8906      [\\/$]*)
8907         # Absolute (can't be DOS-style, as IFS=:)
8908         test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
8909echo "$as_me: error: cannot find input file: $f" >&2;}
8910   { (exit 1); exit 1; }; }
8911         echo $f;;
8912      *) # Relative
8913         if test -f "$f"; then
8914           # Build tree
8915           echo $f
8916         elif test -f "$srcdir/$f"; then
8917           # Source tree
8918           echo $srcdir/$f
8919         else
8920           # /dev/null tree
8921           { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
8922echo "$as_me: error: cannot find input file: $f" >&2;}
8923   { (exit 1); exit 1; }; }
8924         fi;;
8925      esac
8926    done` || { (exit 1); exit 1; }
8927  # Remove the trailing spaces.
8928  sed 's/[ 	]*$//' $ac_file_inputs >$tmp/in
8929
8930_ACEOF
8931
8932# Transform confdefs.h into two sed scripts, `conftest.defines' and
8933# `conftest.undefs', that substitutes the proper values into
8934# config.h.in to produce config.h.  The first handles `#define'
8935# templates, and the second `#undef' templates.
8936# And first: Protect against being on the right side of a sed subst in
8937# config.status.  Protect against being in an unquoted here document
8938# in config.status.
8939rm -f conftest.defines conftest.undefs
8940# Using a here document instead of a string reduces the quoting nightmare.
8941# Putting comments in sed scripts is not portable.
8942#
8943# `end' is used to avoid that the second main sed command (meant for
8944# 0-ary CPP macros) applies to n-ary macro definitions.
8945# See the Autoconf documentation for `clear'.
8946cat >confdef2sed.sed <<\_ACEOF
8947s/[\\&,]/\\&/g
8948s,[\\$`],\\&,g
8949t clear
8950: clear
8951s,^[ 	]*#[ 	]*define[ 	][ 	]*\([^ 	(][^ 	(]*\)\(([^)]*)\)[ 	]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
8952t end
8953s,^[ 	]*#[ 	]*define[ 	][ 	]*\([^ 	][^ 	]*\)[ 	]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
8954: end
8955_ACEOF
8956# If some macros were called several times there might be several times
8957# the same #defines, which is useless.  Nevertheless, we may not want to
8958# sort them, since we want the *last* AC-DEFINE to be honored.
8959uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
8960sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
8961rm -f confdef2sed.sed
8962
8963# This sed command replaces #undef with comments.  This is necessary, for
8964# example, in the case of _POSIX_SOURCE, which is predefined and required
8965# on some systems where configure will not decide to define it.
8966cat >>conftest.undefs <<\_ACEOF
8967s,^[ 	]*#[ 	]*undef[ 	][ 	]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
8968_ACEOF
8969
8970# Break up conftest.defines because some shells have a limit on the size
8971# of here documents, and old seds have small limits too (100 cmds).
8972echo '  # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
8973echo '  if grep "^[ 	]*#[ 	]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
8974echo '  # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
8975echo '  :' >>$CONFIG_STATUS
8976rm -f conftest.tail
8977while grep . conftest.defines >/dev/null
8978do
8979  # Write a limited-size here document to $tmp/defines.sed.
8980  echo '  cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
8981  # Speed up: don't consider the non `#define' lines.
8982  echo '/^[ 	]*#[ 	]*define/!b' >>$CONFIG_STATUS
8983  # Work around the forget-to-reset-the-flag bug.
8984  echo 't clr' >>$CONFIG_STATUS
8985  echo ': clr' >>$CONFIG_STATUS
8986  sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
8987  echo 'CEOF
8988  sed -f $tmp/defines.sed $tmp/in >$tmp/out
8989  rm -f $tmp/in
8990  mv $tmp/out $tmp/in
8991' >>$CONFIG_STATUS
8992  sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
8993  rm -f conftest.defines
8994  mv conftest.tail conftest.defines
8995done
8996rm -f conftest.defines
8997echo '  fi # grep' >>$CONFIG_STATUS
8998echo >>$CONFIG_STATUS
8999
9000# Break up conftest.undefs because some shells have a limit on the size
9001# of here documents, and old seds have small limits too (100 cmds).
9002echo '  # Handle all the #undef templates' >>$CONFIG_STATUS
9003rm -f conftest.tail
9004while grep . conftest.undefs >/dev/null
9005do
9006  # Write a limited-size here document to $tmp/undefs.sed.
9007  echo '  cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
9008  # Speed up: don't consider the non `#undef'
9009  echo '/^[ 	]*#[ 	]*undef/!b' >>$CONFIG_STATUS
9010  # Work around the forget-to-reset-the-flag bug.
9011  echo 't clr' >>$CONFIG_STATUS
9012  echo ': clr' >>$CONFIG_STATUS
9013  sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
9014  echo 'CEOF
9015  sed -f $tmp/undefs.sed $tmp/in >$tmp/out
9016  rm -f $tmp/in
9017  mv $tmp/out $tmp/in
9018' >>$CONFIG_STATUS
9019  sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
9020  rm -f conftest.undefs
9021  mv conftest.tail conftest.undefs
9022done
9023rm -f conftest.undefs
9024
9025cat >>$CONFIG_STATUS <<\_ACEOF
9026  # Let's still pretend it is `configure' which instantiates (i.e., don't
9027  # use $as_me), people would be surprised to read:
9028  #    /* config.h.  Generated by config.status.  */
9029  if test x"$ac_file" = x-; then
9030    echo "/* Generated by configure.  */" >$tmp/config.h
9031  else
9032    echo "/* $ac_file.  Generated by configure.  */" >$tmp/config.h
9033  fi
9034  cat $tmp/in >>$tmp/config.h
9035  rm -f $tmp/in
9036  if test x"$ac_file" != x-; then
9037    if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
9038      { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
9039echo "$as_me: $ac_file is unchanged" >&6;}
9040    else
9041      ac_dir=`(dirname "$ac_file") 2>/dev/null ||
9042$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
9043         X"$ac_file" : 'X\(//\)[^/]' \| \
9044         X"$ac_file" : 'X\(//\)$' \| \
9045         X"$ac_file" : 'X\(/\)' \| \
9046         .     : '\(.\)' 2>/dev/null ||
9047echo X"$ac_file" |
9048    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
9049  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
9050  	  /^X\(\/\/\)$/{ s//\1/; q; }
9051  	  /^X\(\/\).*/{ s//\1/; q; }
9052  	  s/.*/./; q'`
9053      { if $as_mkdir_p; then
9054    mkdir -p "$ac_dir"
9055  else
9056    as_dir="$ac_dir"
9057    as_dirs=
9058    while test ! -d "$as_dir"; do
9059      as_dirs="$as_dir $as_dirs"
9060      as_dir=`(dirname "$as_dir") 2>/dev/null ||
9061$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
9062         X"$as_dir" : 'X\(//\)[^/]' \| \
9063         X"$as_dir" : 'X\(//\)$' \| \
9064         X"$as_dir" : 'X\(/\)' \| \
9065         .     : '\(.\)' 2>/dev/null ||
9066echo X"$as_dir" |
9067    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
9068  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
9069  	  /^X\(\/\/\)$/{ s//\1/; q; }
9070  	  /^X\(\/\).*/{ s//\1/; q; }
9071  	  s/.*/./; q'`
9072    done
9073    test ! -n "$as_dirs" || mkdir $as_dirs
9074  fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
9075echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
9076   { (exit 1); exit 1; }; }; }
9077
9078      rm -f $ac_file
9079      mv $tmp/config.h $ac_file
9080    fi
9081  else
9082    cat $tmp/config.h
9083    rm -f $tmp/config.h
9084  fi
9085done
9086_ACEOF
9087cat >>$CONFIG_STATUS <<\_ACEOF
9088
9089#
9090# CONFIG_COMMANDS section.
9091#
9092for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
9093  ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
9094  ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
9095  ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
9096$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
9097         X"$ac_dest" : 'X\(//\)[^/]' \| \
9098         X"$ac_dest" : 'X\(//\)$' \| \
9099         X"$ac_dest" : 'X\(/\)' \| \
9100         .     : '\(.\)' 2>/dev/null ||
9101echo X"$ac_dest" |
9102    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
9103  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
9104  	  /^X\(\/\/\)$/{ s//\1/; q; }
9105  	  /^X\(\/\).*/{ s//\1/; q; }
9106  	  s/.*/./; q'`
9107  ac_builddir=.
9108
9109if test "$ac_dir" != .; then
9110  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
9111  # A "../" for each directory in $ac_dir_suffix.
9112  ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
9113else
9114  ac_dir_suffix= ac_top_builddir=
9115fi
9116
9117case $srcdir in
9118  .)  # No --srcdir option.  We are building in place.
9119    ac_srcdir=.
9120    if test -z "$ac_top_builddir"; then
9121       ac_top_srcdir=.
9122    else
9123       ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
9124    fi ;;
9125  [\\/]* | ?:[\\/]* )  # Absolute path.
9126    ac_srcdir=$srcdir$ac_dir_suffix;
9127    ac_top_srcdir=$srcdir ;;
9128  *) # Relative path.
9129    ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
9130    ac_top_srcdir=$ac_top_builddir$srcdir ;;
9131esac
9132# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
9133# absolute.
9134ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
9135ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
9136ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
9137ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
9138
9139
9140  { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
9141echo "$as_me: executing $ac_dest commands" >&6;}
9142  case $ac_dest in
9143    default )
9144# a hook for preserving undef directive in config.h
9145mv config.h conftest
9146sed -e 's@^\(.*\)defin.\( .*\) .*/\*\(.*KEEP_UNDEF_HERE\)@\1undef\2	/\*\3@' < conftest > config.h
9147rm -f conftest
9148 ;;
9149  esac
9150done
9151_ACEOF
9152
9153cat >>$CONFIG_STATUS <<\_ACEOF
9154
9155{ (exit 0); exit 0; }
9156_ACEOF
9157chmod +x $CONFIG_STATUS
9158ac_clean_files=$ac_clean_files_save
9159
9160
9161# configure is writing to config.log, and then calls config.status.
9162# config.status does its own redirection, appending to config.log.
9163# Unfortunately, on DOS this fails, as config.log is still kept open
9164# by configure, so config.status won't be able to write to it; its
9165# output is simply discarded.  So we exec the FD to /dev/null,
9166# effectively closing config.log, so it can be properly (re)opened and
9167# appended to by config.status.  When coming back to configure, we
9168# need to make the FD available again.
9169if test "$no_create" != yes; then
9170  ac_cs_success=:
9171  ac_config_status_args=
9172  test "$silent" = yes &&
9173    ac_config_status_args="$ac_config_status_args --quiet"
9174  exec 5>/dev/null
9175  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
9176  exec 5>>config.log
9177  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
9178  # would make configure fail if this is the last instruction.
9179  $ac_cs_success || { (exit 1); exit 1; }
9180fi
9181
9182
9183echo ""
9184if test -z "$AWK"; then
9185echo "!!! Since you have no awk you must copy the files 'comm.h.dist'"
9186echo "!!! and 'term.h.dist' to 'comm.h' and 'term.h'."
9187echo "!!! Do _not_ change the user configuration section in config.h!"
9188echo "Please check the pathnames in the Makefile."
9189else
9190echo "Now please check the pathnames in the Makefile and in the user"
9191echo "configuration section in config.h."
9192fi
9193echo "Then type 'make' to make screen. Good luck."
9194echo ""
9195