configure revision d522f475
1#! /bin/sh
2# Guess values for system-dependent variables and create Makefiles.
3# Generated by Autoconf 2.52.20080325.
4#
5# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
6# Free Software Foundation, Inc.
7# This configure script is free software; the Free Software Foundation
8# gives unlimited permission to copy, distribute and modify it.
9
10# Avoid depending upon Character Ranges.
11as_cr_letters='abcdefghijklmnopqrstuvwxyz'
12as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
13as_cr_Letters=$as_cr_letters$as_cr_LETTERS
14as_cr_digits='0123456789'
15as_cr_alnum=$as_cr_Letters$as_cr_digits
16
17# Sed expression to map a string onto a valid variable name.
18as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
19
20# Sed expression to map a string onto a valid CPP name.
21as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
22
23# Be Bourne compatible
24if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
25  emulate sh
26  NULLCMD=:
27elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
28  set -o posix
29fi
30
31# Name of the executable.
32as_me=`echo "$0" |sed 's,.*[\\/],,'`
33
34if expr a : '\(a\)' >/dev/null 2>&1; then
35  as_expr=expr
36else
37  as_expr=false
38fi
39
40rm -f conf$$ conf$$.exe conf$$.file
41echo >conf$$.file
42if ln -s conf$$.file conf$$ 2>/dev/null; then
43  # We could just check for DJGPP; but this test a) works b) is more generic
44  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
45  if test -f conf$$.exe; then
46    # Don't use ln at all; we don't have any links
47    as_ln_s='cp -p'
48  else
49    as_ln_s='ln -s'
50  fi
51elif ln conf$$.file conf$$ 2>/dev/null; then
52  as_ln_s=ln
53else
54  as_ln_s='cp -p'
55fi
56rm -f conf$$ conf$$.exe conf$$.file
57
58as_executable_p="test -f"
59
60# Support unset when possible.
61if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
62  as_unset=unset
63else
64  as_unset=false
65fi
66
67# NLS nuisances.
68$as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
69$as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
70$as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
71$as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
72$as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
73$as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
74$as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
75$as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
76
77# IFS
78# We need space, tab and new line, in precisely that order.
79as_nl='
80'
81IFS=" 	$as_nl"
82
83# CDPATH.
84$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
85
86# Name of the host.
87# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
88# so uname gets run too.
89ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
90
91exec 6>&1
92
93#
94# Initializations.
95#
96ac_default_prefix=/usr/local
97cross_compiling=no
98subdirs=
99MFLAGS= MAKEFLAGS=
100SHELL=${CONFIG_SHELL-/bin/sh}
101
102# Maximum number of lines to put in a shell here document.
103# This variable seems obsolete.  It should probably be removed, and
104# only ac_max_sed_lines should be used.
105: ${ac_max_here_lines=38}
106
107ac_unique_file="charproc.c"
108# Factoring default headers for most tests.
109ac_includes_default="\
110#include <stdio.h>
111#if HAVE_SYS_TYPES_H
112# include <sys/types.h>
113#endif
114#if HAVE_SYS_STAT_H
115# include <sys/stat.h>
116#endif
117#if STDC_HEADERS
118# include <stdlib.h>
119# include <stddef.h>
120#else
121# if HAVE_STDLIB_H
122#  include <stdlib.h>
123# endif
124#endif
125#if HAVE_STRING_H
126# if !STDC_HEADERS && HAVE_MEMORY_H
127#  include <memory.h>
128# endif
129# include <string.h>
130#endif
131#if HAVE_STRINGS_H
132# include <strings.h>
133#endif
134#if HAVE_INTTYPES_H
135# include <inttypes.h>
136#else
137# if HAVE_STDINT_H
138#  include <stdint.h>
139# endif
140#endif
141#if HAVE_UNISTD_H
142# include <unistd.h>
143#endif"
144
145# Initialize some variables set by options.
146ac_init_help=
147ac_init_version=false
148# The variables have the same names as the options, with
149# dashes changed to underlines.
150cache_file=/dev/null
151exec_prefix=NONE
152no_create=
153no_recursion=
154prefix=NONE
155program_prefix=NONE
156program_suffix=NONE
157program_transform_name=s,x,x,
158silent=
159site=
160srcdir=
161verbose=
162x_includes=NONE
163x_libraries=NONE
164
165# Installation directory options.
166# These are left unexpanded so users can "make install exec_prefix=/foo"
167# and all the variables that are supposed to be based on exec_prefix
168# by default will actually change.
169# Use braces instead of parens because sh, perl, etc. also accept them.
170bindir='${exec_prefix}/bin'
171sbindir='${exec_prefix}/sbin'
172libexecdir='${exec_prefix}/libexec'
173datadir='${prefix}/share'
174sysconfdir='${prefix}/etc'
175sharedstatedir='${prefix}/com'
176localstatedir='${prefix}/var'
177libdir='${exec_prefix}/lib'
178includedir='${prefix}/include'
179oldincludedir='/usr/include'
180infodir='${prefix}/info'
181mandir='${prefix}/man'
182
183# Identity of this package.
184PACKAGE_NAME=
185PACKAGE_TARNAME=
186PACKAGE_VERSION=
187PACKAGE_STRING=
188PACKAGE_BUGREPORT=
189
190ac_prev=
191for ac_option
192do
193  # If the previous option needs an argument, assign it.
194  if test -n "$ac_prev"; then
195    eval "$ac_prev=\$ac_option"
196    ac_prev=
197    continue
198  fi
199
200  ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
201
202  # Accept the important Cygnus configure options, so we can diagnose typos.
203
204  case $ac_option in
205
206  -bindir | --bindir | --bindi | --bind | --bin | --bi)
207    ac_prev=bindir ;;
208  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
209    bindir=$ac_optarg ;;
210
211  -build | --build | --buil | --bui | --bu)
212    ac_prev=build_alias ;;
213  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
214    build_alias=$ac_optarg ;;
215
216  -cache-file | --cache-file | --cache-fil | --cache-fi \
217  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
218    ac_prev=cache_file ;;
219  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
220  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
221    cache_file=$ac_optarg ;;
222
223  --config-cache | -C)
224    cache_file=config.cache ;;
225
226  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
227    ac_prev=datadir ;;
228  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
229  | --da=*)
230    datadir=$ac_optarg ;;
231
232  -disable-* | --disable-*)
233    ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
234    # Reject names that are not valid shell variable names.
235    expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
236      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
237   { (exit 1); exit 1; }; }
238    ac_feature=`echo $ac_feature | sed 's/-/_/g'`
239    eval "enable_$ac_feature=no" ;;
240
241  -enable-* | --enable-*)
242    ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
243    # Reject names that are not valid shell variable names.
244    expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
245      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
246   { (exit 1); exit 1; }; }
247    ac_feature=`echo $ac_feature | sed 's/-/_/g'`
248    case $ac_option in
249      *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
250      *) ac_optarg=yes ;;
251    esac
252    eval "enable_$ac_feature='$ac_optarg'" ;;
253
254  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
255  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
256  | --exec | --exe | --ex)
257    ac_prev=exec_prefix ;;
258  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
259  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
260  | --exec=* | --exe=* | --ex=*)
261    exec_prefix=$ac_optarg ;;
262
263  -gas | --gas | --ga | --g)
264    # Obsolete; use --with-gas.
265    with_gas=yes ;;
266
267  -help | --help | --hel | --he | -h)
268    ac_init_help=long ;;
269  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
270    ac_init_help=recursive ;;
271  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
272    ac_init_help=short ;;
273
274  -host | --host | --hos | --ho)
275    ac_prev=host_alias ;;
276  -host=* | --host=* | --hos=* | --ho=*)
277    host_alias=$ac_optarg ;;
278
279  -includedir | --includedir | --includedi | --included | --include \
280  | --includ | --inclu | --incl | --inc)
281    ac_prev=includedir ;;
282  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
283  | --includ=* | --inclu=* | --incl=* | --inc=*)
284    includedir=$ac_optarg ;;
285
286  -infodir | --infodir | --infodi | --infod | --info | --inf)
287    ac_prev=infodir ;;
288  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
289    infodir=$ac_optarg ;;
290
291  -libdir | --libdir | --libdi | --libd)
292    ac_prev=libdir ;;
293  -libdir=* | --libdir=* | --libdi=* | --libd=*)
294    libdir=$ac_optarg ;;
295
296  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
297  | --libexe | --libex | --libe)
298    ac_prev=libexecdir ;;
299  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
300  | --libexe=* | --libex=* | --libe=*)
301    libexecdir=$ac_optarg ;;
302
303  -localstatedir | --localstatedir | --localstatedi | --localstated \
304  | --localstate | --localstat | --localsta | --localst \
305  | --locals | --local | --loca | --loc | --lo)
306    ac_prev=localstatedir ;;
307  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
308  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
309  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
310    localstatedir=$ac_optarg ;;
311
312  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
313    ac_prev=mandir ;;
314  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
315    mandir=$ac_optarg ;;
316
317  -nfp | --nfp | --nf)
318    # Obsolete; use --without-fp.
319    with_fp=no ;;
320
321  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
322  | --no-cr | --no-c)
323    no_create=yes ;;
324
325  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
326  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
327    no_recursion=yes ;;
328
329  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
330  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
331  | --oldin | --oldi | --old | --ol | --o)
332    ac_prev=oldincludedir ;;
333  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
334  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
335  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
336    oldincludedir=$ac_optarg ;;
337
338  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
339    ac_prev=prefix ;;
340  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
341    prefix=$ac_optarg ;;
342
343  -program-prefix | --program-prefix | --program-prefi | --program-pref \
344  | --program-pre | --program-pr | --program-p)
345    ac_prev=program_prefix ;;
346  -program-prefix=* | --program-prefix=* | --program-prefi=* \
347  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
348    program_prefix=$ac_optarg ;;
349
350  -program-suffix | --program-suffix | --program-suffi | --program-suff \
351  | --program-suf | --program-su | --program-s)
352    ac_prev=program_suffix ;;
353  -program-suffix=* | --program-suffix=* | --program-suffi=* \
354  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
355    program_suffix=$ac_optarg ;;
356
357  -program-transform-name | --program-transform-name \
358  | --program-transform-nam | --program-transform-na \
359  | --program-transform-n | --program-transform- \
360  | --program-transform | --program-transfor \
361  | --program-transfo | --program-transf \
362  | --program-trans | --program-tran \
363  | --progr-tra | --program-tr | --program-t)
364    ac_prev=program_transform_name ;;
365  -program-transform-name=* | --program-transform-name=* \
366  | --program-transform-nam=* | --program-transform-na=* \
367  | --program-transform-n=* | --program-transform-=* \
368  | --program-transform=* | --program-transfor=* \
369  | --program-transfo=* | --program-transf=* \
370  | --program-trans=* | --program-tran=* \
371  | --progr-tra=* | --program-tr=* | --program-t=*)
372    program_transform_name=$ac_optarg ;;
373
374  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
375  | -silent | --silent | --silen | --sile | --sil)
376    silent=yes ;;
377
378  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
379    ac_prev=sbindir ;;
380  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
381  | --sbi=* | --sb=*)
382    sbindir=$ac_optarg ;;
383
384  -sharedstatedir | --sharedstatedir | --sharedstatedi \
385  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
386  | --sharedst | --shareds | --shared | --share | --shar \
387  | --sha | --sh)
388    ac_prev=sharedstatedir ;;
389  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
390  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
391  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
392  | --sha=* | --sh=*)
393    sharedstatedir=$ac_optarg ;;
394
395  -site | --site | --sit)
396    ac_prev=site ;;
397  -site=* | --site=* | --sit=*)
398    site=$ac_optarg ;;
399
400  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
401    ac_prev=srcdir ;;
402  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
403    srcdir=$ac_optarg ;;
404
405  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
406  | --syscon | --sysco | --sysc | --sys | --sy)
407    ac_prev=sysconfdir ;;
408  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
409  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
410    sysconfdir=$ac_optarg ;;
411
412  -target | --target | --targe | --targ | --tar | --ta | --t)
413    ac_prev=target_alias ;;
414  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
415    target_alias=$ac_optarg ;;
416
417  -v | -verbose | --verbose | --verbos | --verbo | --verb)
418    verbose=yes ;;
419
420  -version | --version | --versio | --versi | --vers | -V)
421    ac_init_version=: ;;
422
423  -with-* | --with-*)
424    ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
425    # Reject names that are not valid shell variable names.
426    expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
427      { echo "$as_me: error: invalid package name: $ac_package" >&2
428   { (exit 1); exit 1; }; }
429    ac_package=`echo $ac_package| sed 's/-/_/g'`
430    case $ac_option in
431      *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
432      *) ac_optarg=yes ;;
433    esac
434    eval "with_$ac_package='$ac_optarg'" ;;
435
436  -without-* | --without-*)
437    ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
438    # Reject names that are not valid shell variable names.
439    expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
440      { echo "$as_me: error: invalid package name: $ac_package" >&2
441   { (exit 1); exit 1; }; }
442    ac_package=`echo $ac_package | sed 's/-/_/g'`
443    eval "with_$ac_package=no" ;;
444
445  --x)
446    # Obsolete; use --with-x.
447    with_x=yes ;;
448
449  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
450  | --x-incl | --x-inc | --x-in | --x-i)
451    ac_prev=x_includes ;;
452  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
453  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
454    x_includes=$ac_optarg ;;
455
456  -x-libraries | --x-libraries | --x-librarie | --x-librari \
457  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
458    ac_prev=x_libraries ;;
459  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
460  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
461    x_libraries=$ac_optarg ;;
462
463  -*) { echo "$as_me: error: unrecognized option: $ac_option
464Try \`$0 --help' for more information." >&2
465   { (exit 1); exit 1; }; }
466    ;;
467
468  *=*)
469    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
470    # Reject names that are not valid shell variable names.
471    expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
472      { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
473   { (exit 1); exit 1; }; }
474    ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
475    eval "$ac_envvar='$ac_optarg'"
476    export $ac_envvar ;;
477
478  *)
479    # FIXME: should be removed in autoconf 3.0.
480    echo "$as_me: WARNING: you should use --build, --host, --target" >&2
481    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
482      echo "$as_me: WARNING: invalid host type: $ac_option" >&2
483    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
484    ;;
485
486  esac
487done
488
489if test -n "$ac_prev"; then
490  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
491  { echo "$as_me: error: missing argument to $ac_option" >&2
492   { (exit 1); exit 1; }; }
493fi
494
495# Be sure to have absolute paths.
496for ac_var in exec_prefix prefix
497do
498  eval ac_val=$`echo $ac_var`
499  case $ac_val in
500    [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
501    *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
502   { (exit 1); exit 1; }; };;
503  esac
504done
505
506# Be sure to have absolute paths.
507for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
508              localstatedir libdir includedir oldincludedir infodir mandir
509do
510  eval ac_val=$`echo $ac_var`
511  case $ac_val in
512    [\\/$]* | ?:[\\/]* ) ;;
513    *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
514   { (exit 1); exit 1; }; };;
515  esac
516done
517
518# There might be people who depend on the old broken behavior: `$host'
519# used to hold the argument of --host etc.
520build=$build_alias
521host=$host_alias
522target=$target_alias
523
524# FIXME: should be removed in autoconf 3.0.
525if test "x$host_alias" != x; then
526  if test "x$build_alias" = x; then
527    cross_compiling=maybe
528    echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
529    If a cross compiler is detected then cross compile mode will be used." >&2
530  elif test "x$build_alias" != "x$host_alias"; then
531    cross_compiling=yes
532  fi
533fi
534
535ac_tool_prefix=
536test -n "$host_alias" && ac_tool_prefix=$host_alias-
537
538test "$silent" = yes && exec 6>/dev/null
539
540# Find the source files, if location was not specified.
541if test -z "$srcdir"; then
542  ac_srcdir_defaulted=yes
543  # Try the directory containing this script, then its parent.
544  ac_prog=$0
545  ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
546  test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
547  srcdir=$ac_confdir
548  if test ! -r $srcdir/$ac_unique_file; then
549    srcdir=..
550  fi
551else
552  ac_srcdir_defaulted=no
553fi
554if test ! -r $srcdir/$ac_unique_file; then
555  if test "$ac_srcdir_defaulted" = yes; then
556    { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
557   { (exit 1); exit 1; }; }
558  else
559    { echo "$as_me: error: cannot find sources in $srcdir" >&2
560   { (exit 1); exit 1; }; }
561  fi
562fi
563srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
564ac_env_build_alias_set=${build_alias+set}
565ac_env_build_alias_value=$build_alias
566ac_cv_env_build_alias_set=${build_alias+set}
567ac_cv_env_build_alias_value=$build_alias
568ac_env_host_alias_set=${host_alias+set}
569ac_env_host_alias_value=$host_alias
570ac_cv_env_host_alias_set=${host_alias+set}
571ac_cv_env_host_alias_value=$host_alias
572ac_env_target_alias_set=${target_alias+set}
573ac_env_target_alias_value=$target_alias
574ac_cv_env_target_alias_set=${target_alias+set}
575ac_cv_env_target_alias_value=$target_alias
576ac_env_CC_set=${CC+set}
577ac_env_CC_value=$CC
578ac_cv_env_CC_set=${CC+set}
579ac_cv_env_CC_value=$CC
580ac_env_CFLAGS_set=${CFLAGS+set}
581ac_env_CFLAGS_value=$CFLAGS
582ac_cv_env_CFLAGS_set=${CFLAGS+set}
583ac_cv_env_CFLAGS_value=$CFLAGS
584ac_env_LDFLAGS_set=${LDFLAGS+set}
585ac_env_LDFLAGS_value=$LDFLAGS
586ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
587ac_cv_env_LDFLAGS_value=$LDFLAGS
588ac_env_CPPFLAGS_set=${CPPFLAGS+set}
589ac_env_CPPFLAGS_value=$CPPFLAGS
590ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
591ac_cv_env_CPPFLAGS_value=$CPPFLAGS
592ac_env_CPP_set=${CPP+set}
593ac_env_CPP_value=$CPP
594ac_cv_env_CPP_set=${CPP+set}
595ac_cv_env_CPP_value=$CPP
596
597#
598# Report the --help message.
599#
600if test "$ac_init_help" = "long"; then
601  # Omit some internal or obsolete options to make the list less imposing.
602  # This message is too long to be a string in the A/UX 3.1 sh.
603  cat <<EOF
604\`configure' configures this package to adapt to many kinds of systems.
605
606Usage: $0 [OPTION]... [VAR=VALUE]...
607
608To assign environment variables (e.g., CC, CFLAGS...), specify them as
609VAR=VALUE.  See below for descriptions of some of the useful variables.
610
611Defaults for the options are specified in brackets.
612
613Configuration:
614  -h, --help              display this help and exit
615      --help=short        display options specific to this package
616      --help=recursive    display the short help of all the included packages
617  -V, --version           display version information and exit
618  -q, --quiet, --silent   do not print \`checking...' messages
619      --cache-file=FILE   cache test results in FILE [disabled]
620  -C, --config-cache      alias for \`--cache-file=config.cache'
621  -n, --no-create         do not create output files
622      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
623
624EOF
625
626  cat <<EOF
627Installation directories:
628  --prefix=PREFIX         install architecture-independent files in PREFIX
629                          [$ac_default_prefix]
630  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
631                          [PREFIX]
632
633By default, \`make install' will install all the files in
634\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
635an installation prefix other than \`$ac_default_prefix' using \`--prefix',
636for instance \`--prefix=\$HOME'.
637
638For better control, use the options below.
639
640Fine tuning of the installation directories:
641  --bindir=DIR            user executables [EPREFIX/bin]
642  --sbindir=DIR           system admin executables [EPREFIX/sbin]
643  --libexecdir=DIR        program executables [EPREFIX/libexec]
644  --datadir=DIR           read-only architecture-independent data [PREFIX/share]
645  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
646  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
647  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
648  --libdir=DIR            object code libraries [EPREFIX/lib]
649  --includedir=DIR        C header files [PREFIX/include]
650  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
651  --infodir=DIR           info documentation [PREFIX/info]
652  --mandir=DIR            man documentation [PREFIX/man]
653EOF
654
655  cat <<\EOF
656
657Program names:
658  --program-prefix=PREFIX            prepend PREFIX to installed program names
659  --program-suffix=SUFFIX            append SUFFIX to installed program names
660  --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
661
662X features:
663  --x-includes=DIR    X include files are in DIR
664  --x-libraries=DIR   X library files are in DIR
665
666System types:
667  --build=BUILD           configure for building on BUILD [guessed]
668  --host=HOST       build programs to run on HOST [BUILD]
669EOF
670fi
671
672if test -n "$ac_init_help"; then
673
674  cat <<\EOF
675
676Optional Features:
677  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
678  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
679
680Optional Packages:
681  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
682  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
683
684Compile/Install Options:
685  --disable-full-tgetent  disable check for full tgetent function
686  --with-app-defaults=DIR directory in which to install resource files (default: EPREFIX/lib/X11/app-defaults)
687  --with-icondir=DIR      directory in which to install icons (default: EPREFIX/share/pixmaps)
688  --disable-desktop       disable install of xterm desktop files
689  --with-reference=XXX    program to use as permissions-reference
690  --with-xterm-symlink=XXX make symbolic link to installed xterm
691  --disable-setuid        disable setuid in xterm, do not install setuid/setgid
692  --disable-setgid        disable setgid in xterm, do not install setuid/setgid
693  --with-setuid=XXX       use the given setuid user
694  --with-utmp-setgid=XXX  use setgid to match utmp/utmpx file
695  --with-utempter         use utempter library for access to utmp
696  --with-tty-group=XXX    use XXX for the tty-group
697  --with-x                use the X Window System
698  --with-Xaw3d            link with Xaw 3d library
699  --with-neXtaw           link with neXT Athena library
700  --with-XawPlus          link with Athena-Plus library
701  --enable-narrowproto    enable narrow prototypes for X libraries
702  --disable-imake         disable use of imake for definitions
703Terminal Configuration:
704  --with-terminal-id=V    set default decTerminalID (default: vt100)
705  --with-terminal-type=T  set default $TERM (default: xterm)
706  --with-own-terminfo=P   set default $TERMINFO (default: from environment)
707Optional Features:
708  --disable-active-icon   disable X11R6.3 active-icon feature
709  --disable-ansi-color    disable ANSI color
710  --disable-16-color      disable 16-color support
711  --enable-256-color      enable 256-color support
712  --enable-88-color       enable 88-color support
713  --disable-blink-cursor  disable support for blinking cursor
714  --enable-broken-osc     allow broken Linux OSC-strings
715  --enable-broken-st      allow broken string-terminators
716  --disable-c1-print      disallow -k8 option for printable 128-159
717  --disable-bold-color    disable PC-style mapping of bold colors
718  --disable-color-class   disable separate color class resources
719  --disable-color-mode    disable default colorMode resource
720  --disable-highlighting  disable support for color highlighting
721  --disable-doublechars   disable support for double-size chars
722  --disable-boxchars      disable fallback-support for box chars
723  --enable-exec-xterm     enable "spawn-new-terminal" action
724  --disable-freetype      disable freetype library-support
725  --with-freetype-cflags  -D/-I options for compiling with FreeType
726  --with-freetype-libs    -L/-l options to link FreeType
727  --enable-hp-fkeys       enable support for HP-style function keys
728  --enable-sco-fkeys      enable support for SCO-style function keys
729  --disable-sun-fkeys     disable support for Sun-style function keys
730  --disable-i18n          disable internationalization
731  --disable-initial-erase disable setup for stty erase
732  --disable-input-method  disable input-method
733  --enable-load-vt-fonts  enable load-vt-fonts() action
734  --enable-logging        enable logging
735  --enable-logfile-exec   enable exec'd logfile filter
736  --disable-maximize      disable actions for iconify/deiconify/maximize/restore
737  --disable-num-lock      disable NumLock keypad support
738  --enable-paste64        enable get/set base64 selection data
739  --disable-pty-handshake disable pty-handshake support
740  --enable-readline-mouse enable support for mouse in readline applications
741  --disable-regex         disable regular-expression selections
742  --with-pcre             use PCRE for regular-expressions
743  --disable-rightbar      disable right-scrollbar support
744  --disable-samename      disable check for redundant name-change
745  --disable-session-mgt   disable support for session management
746  --disable-tcap-fkeys    disable termcap function-keys support
747  --enable-tcap-query     compile-in termcap-query support
748  --disable-tek4014       disable tek4014 emulation
749  --enable-toolbar        compile-in toolbar for pulldown menus
750  --disable-vt52          disable VT52 emulation
751  --enable-mini-luit      enable mini-luit (built-in Latin9 support)
752  --enable-luit           enable luit filter (Unicode translation)
753  --enable-wide-chars     enable wide-character support
754  --enable-dabbrev        enable dynamic-abbreviation support
755  --enable-dec-locator    enable DECterm Locator support
756  --disable-rectangles    disable VT420 rectangle support
757  --disable-ziconbeep     disable -ziconbeep option
758Testing/development Options:
759  --enable-trace          test: set to enable debugging traces
760  --disable-leaks         test: set to test memory leaks
761  --disable-echo          display "compiling" commands
762  --enable-xmc-glitch     test: enable xmc magic-cookie emulation
763  --enable-warnings       test: turn on GCC compiler warnings
764
765Some influential environment variables:
766  CC          C compiler command
767  CFLAGS      C compiler flags
768  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
769              nonstandard directory <lib dir>
770  CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
771              headers in a nonstandard directory <include dir>
772  CPP         C preprocessor
773
774Use these variables to override the choices made by `configure' or to help
775it to find libraries and programs with nonstandard names/locations.
776
777EOF
778fi
779
780if test "$ac_init_help" = "recursive"; then
781  # If there are subdirs, report their specific --help.
782  ac_popdir=`pwd`
783  for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
784    cd $ac_subdir
785    # A "../" for each directory in /$ac_subdir.
786    ac_dots=`echo $ac_subdir |
787             sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
788
789    case $srcdir in
790    .) # No --srcdir option.  We are building in place.
791      ac_sub_srcdir=$srcdir ;;
792    [\\/]* | ?:[\\/]* ) # Absolute path.
793      ac_sub_srcdir=$srcdir/$ac_subdir ;;
794    *) # Relative path.
795      ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
796    esac
797
798    # Check for guested configure; otherwise get Cygnus style configure.
799    if test -f $ac_sub_srcdir/configure.gnu; then
800      echo
801      $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
802    elif test -f $ac_sub_srcdir/configure; then
803      echo
804      $SHELL $ac_sub_srcdir/configure  --help=recursive
805    elif test -f $ac_sub_srcdir/configure.ac ||
806           test -f $ac_sub_srcdir/configure.in; then
807      echo
808      $ac_configure --help
809    else
810      echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
811    fi
812    cd $ac_popdir
813  done
814fi
815
816test -n "$ac_init_help" && exit 0
817if $ac_init_version; then
818  cat <<\EOF
819
820Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
821Free Software Foundation, Inc.
822This configure script is free software; the Free Software Foundation
823gives unlimited permission to copy, distribute and modify it.
824EOF
825  exit 0
826fi
827exec 5>config.log
828cat >&5 <<EOF
829This file contains any messages produced by compilers while
830running configure, to aid debugging if configure makes a mistake.
831
832It was created by $as_me, which was
833generated by GNU Autoconf 2.52.20080325.  Invocation command line was
834
835  $ $0 $@
836
837EOF
838{
839cat <<_ASUNAME
840## ---------- ##
841## Platform.  ##
842## ---------- ##
843
844hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
845uname -m = `(uname -m) 2>/dev/null || echo unknown`
846uname -r = `(uname -r) 2>/dev/null || echo unknown`
847uname -s = `(uname -s) 2>/dev/null || echo unknown`
848uname -v = `(uname -v) 2>/dev/null || echo unknown`
849
850/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
851/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
852
853/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
854/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
855/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
856hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
857/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
858/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
859/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
860
861PATH = $PATH
862
863_ASUNAME
864} >&5
865
866cat >&5 <<EOF
867## ------------ ##
868## Core tests.  ##
869## ------------ ##
870
871EOF
872
873# Keep a trace of the command line.
874# Strip out --no-create and --no-recursion so they do not pile up.
875# Also quote any args containing shell meta-characters.
876ac_configure_args=
877ac_sep=
878for ac_arg
879do
880  case $ac_arg in
881  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
882  | --no-cr | --no-c) ;;
883  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
884  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
885  *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
886    ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
887    ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
888    ac_sep=" " ;;
889  *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
890     ac_sep=" " ;;
891  esac
892  # Get rid of the leading space.
893done
894
895# When interrupted or exit'd, cleanup temporary files, and complete
896# config.log.  We remove comments because anyway the quotes in there
897# would cause problems or look ugly.
898trap 'exit_status=$?
899  # Save into config.log some information that might help in debugging.
900  echo >&5
901  echo "## ----------------- ##" >&5
902  echo "## Cache variables.  ##" >&5
903  echo "## ----------------- ##" >&5
904  echo >&5
905  # The following way of writing the cache mishandles newlines in values,
906{
907  (set) 2>&1 |
908    case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
909    *ac_space=\ *)
910      sed -n \
911        "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
912    	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
913      ;;
914    *)
915      sed -n \
916        "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
917      ;;
918    esac;
919} >&5
920  sed "/^$/d" confdefs.h >conftest.log
921  if test -s conftest.log; then
922    echo >&5
923    echo "## ------------ ##" >&5
924    echo "## confdefs.h.  ##" >&5
925    echo "## ------------ ##" >&5
926    echo >&5
927    cat conftest.log >&5
928  fi
929  (echo; echo) >&5
930  test "$ac_signal" != 0 &&
931    echo "$as_me: caught signal $ac_signal" >&5
932  echo "$as_me: exit $exit_status" >&5
933  rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
934    exit $exit_status
935     ' 0
936for ac_signal in 1 2 13 15; do
937  trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
938done
939ac_signal=0
940
941# confdefs.h avoids OS command line length limits that DEFS can exceed.
942rm -rf conftest* confdefs.h
943# AIX cpp loses on an empty file, so make sure it contains at least a newline.
944echo >confdefs.h
945
946# Let the site file select an alternate cache file if it wants to.
947# Prefer explicitly selected file to automatically selected ones.
948if test -z "$CONFIG_SITE"; then
949  if test "x$prefix" != xNONE; then
950    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
951  else
952    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
953  fi
954fi
955for ac_site_file in $CONFIG_SITE; do
956  if test -r "$ac_site_file"; then
957    { echo "$as_me:957: loading site script $ac_site_file" >&5
958echo "$as_me: loading site script $ac_site_file" >&6;}
959    cat "$ac_site_file" >&5
960    . "$ac_site_file"
961  fi
962done
963
964if test -r "$cache_file"; then
965  # Some versions of bash will fail to source /dev/null (special
966  # files actually), so we avoid doing that.
967  if test -f "$cache_file"; then
968    { echo "$as_me:968: loading cache $cache_file" >&5
969echo "$as_me: loading cache $cache_file" >&6;}
970    case $cache_file in
971      [\\/]* | ?:[\\/]* ) . $cache_file;;
972      *)                      . ./$cache_file;;
973    esac
974  fi
975else
976  { echo "$as_me:976: creating cache $cache_file" >&5
977echo "$as_me: creating cache $cache_file" >&6;}
978  >$cache_file
979fi
980
981# Check that the precious variables saved in the cache have kept the same
982# value.
983ac_cache_corrupted=false
984for ac_var in `(set) 2>&1 |
985               sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
986  eval ac_old_set=\$ac_cv_env_${ac_var}_set
987  eval ac_new_set=\$ac_env_${ac_var}_set
988  eval ac_old_val="\$ac_cv_env_${ac_var}_value"
989  eval ac_new_val="\$ac_env_${ac_var}_value"
990  case $ac_old_set,$ac_new_set in
991    set,)
992      { echo "$as_me:992: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
993echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
994      ac_cache_corrupted=: ;;
995    ,set)
996      { echo "$as_me:996: error: \`$ac_var' was not set in the previous run" >&5
997echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
998      ac_cache_corrupted=: ;;
999    ,);;
1000    *)
1001      if test "x$ac_old_val" != "x$ac_new_val"; then
1002        { echo "$as_me:1002: error: \`$ac_var' has changed since the previous run:" >&5
1003echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1004        { echo "$as_me:1004:   former value:  $ac_old_val" >&5
1005echo "$as_me:   former value:  $ac_old_val" >&2;}
1006        { echo "$as_me:1006:   current value: $ac_new_val" >&5
1007echo "$as_me:   current value: $ac_new_val" >&2;}
1008        ac_cache_corrupted=:
1009      fi;;
1010  esac
1011  # Pass precious variables to config.status.  It doesn't matter if
1012  # we pass some twice (in addition to the command line arguments).
1013  if test "$ac_new_set" = set; then
1014    case $ac_new_val in
1015    *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1016      ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1017      ac_configure_args="$ac_configure_args '$ac_arg'"
1018      ;;
1019    *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1020       ;;
1021    esac
1022  fi
1023done
1024if $ac_cache_corrupted; then
1025  { echo "$as_me:1025: error: changes in the environment can compromise the build" >&5
1026echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1027  { { echo "$as_me:1027: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1028echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1029   { (exit 1); exit 1; }; }
1030fi
1031
1032ac_ext=c
1033ac_cpp='$CPP $CPPFLAGS'
1034ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1035ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1036ac_compiler_gnu=$ac_cv_c_compiler_gnu
1037ac_main_return=return
1038
1039case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
1040  *c*,-n*) ECHO_N= ECHO_C='
1041' ECHO_T='	' ;;
1042  *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
1043  *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
1044esac
1045echo "#! $SHELL" >conftest.sh
1046echo  "exit 0"   >>conftest.sh
1047chmod +x conftest.sh
1048if { (echo "$as_me:1048: PATH=\".;.\"; conftest.sh") >&5
1049  (PATH=".;."; conftest.sh) 2>&5
1050  ac_status=$?
1051  echo "$as_me:1051: \$? = $ac_status" >&5
1052  (exit $ac_status); }; then
1053  ac_path_separator=';'
1054else
1055  ac_path_separator=:
1056fi
1057PATH_SEPARATOR="$ac_path_separator"
1058rm -f conftest.sh
1059
1060ac_config_headers="$ac_config_headers xtermcfg.h:xtermcfg.hin"
1061
1062ac_aux_dir=
1063for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1064  if test -f $ac_dir/install-sh; then
1065    ac_aux_dir=$ac_dir
1066    ac_install_sh="$ac_aux_dir/install-sh -c"
1067    break
1068  elif test -f $ac_dir/install.sh; then
1069    ac_aux_dir=$ac_dir
1070    ac_install_sh="$ac_aux_dir/install.sh -c"
1071    break
1072  elif test -f $ac_dir/shtool; then
1073    ac_aux_dir=$ac_dir
1074    ac_install_sh="$ac_aux_dir/shtool install -c"
1075    break
1076  fi
1077done
1078if test -z "$ac_aux_dir"; then
1079  { { echo "$as_me:1079: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1080echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1081   { (exit 1); exit 1; }; }
1082fi
1083ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1084ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1085ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1086
1087# Make sure we can run config.sub.
1088$ac_config_sub sun4 >/dev/null 2>&1 ||
1089  { { echo "$as_me:1089: error: cannot run $ac_config_sub" >&5
1090echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1091   { (exit 1); exit 1; }; }
1092
1093echo "$as_me:1093: checking build system type" >&5
1094echo $ECHO_N "checking build system type... $ECHO_C" >&6
1095if test "${ac_cv_build+set}" = set; then
1096  echo $ECHO_N "(cached) $ECHO_C" >&6
1097else
1098  ac_cv_build_alias=$build_alias
1099test -z "$ac_cv_build_alias" &&
1100  ac_cv_build_alias=`$ac_config_guess`
1101test -z "$ac_cv_build_alias" &&
1102  { { echo "$as_me:1102: error: cannot guess build type; you must specify one" >&5
1103echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1104   { (exit 1); exit 1; }; }
1105ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1106  { { echo "$as_me:1106: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1107echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1108   { (exit 1); exit 1; }; }
1109
1110fi
1111echo "$as_me:1111: result: $ac_cv_build" >&5
1112echo "${ECHO_T}$ac_cv_build" >&6
1113build=$ac_cv_build
1114build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1115build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1116build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1117
1118if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1119	echo "$as_me:1119: checking host system type" >&5
1120echo $ECHO_N "checking host system type... $ECHO_C" >&6
1121if test "${ac_cv_host+set}" = set; then
1122  echo $ECHO_N "(cached) $ECHO_C" >&6
1123else
1124  ac_cv_host_alias=$host_alias
1125test -z "$ac_cv_host_alias" &&
1126  ac_cv_host_alias=$ac_cv_build_alias
1127ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1128  { { echo "$as_me:1128: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1129echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1130   { (exit 1); exit 1; }; }
1131
1132fi
1133echo "$as_me:1133: result: $ac_cv_host" >&5
1134echo "${ECHO_T}$ac_cv_host" >&6
1135host=$ac_cv_host
1136host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1137host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1138host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1139
1140	system_name="$host_os"
1141else
1142	system_name="`(uname -s -r) 2>/dev/null`"
1143	if test -z "$system_name" ; then
1144		system_name="`(hostname) 2>/dev/null`"
1145	fi
1146fi
1147test -n "$system_name" && cat >>confdefs.h <<EOF
1148#define SYSTEM_NAME "$system_name"
1149EOF
1150
1151if test "${cf_cv_system_name+set}" = set; then
1152  echo $ECHO_N "(cached) $ECHO_C" >&6
1153else
1154  cf_cv_system_name="$system_name"
1155fi
1156
1157test -z "$system_name" && system_name="$cf_cv_system_name"
1158test -n "$cf_cv_system_name" && echo "$as_me:1158: result: Configuring for $cf_cv_system_name" >&5
1159echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1160
1161if test ".$system_name" != ".$cf_cv_system_name" ; then
1162	echo "$as_me:1162: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1163echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1164	{ { echo "$as_me:1164: error: \"Please remove config.cache and try again.\"" >&5
1165echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1166   { (exit 1); exit 1; }; }
1167fi
1168
1169###	checks for alternative programs
1170
1171case "$host_os" in
1172openedition)	: ${CFLAGS="-O2 -Wc,dll -Wl,EDIT=NO"}
1173		: ${CPPFLAGS="-D_ALL_SOURCE"}
1174		: ${LIBS="/usr/lib/Xaw.x /usr/lib/SM.x /usr/lib/ICE.x /usr/lib/X11.x"}
1175		: ${CC=c89};;
1176darwin*)
1177		: ${LDFLAGS}="${LDFLAGS} -Wl,-bind_at_load";;
1178esac
1179
1180ac_ext=c
1181ac_cpp='$CPP $CPPFLAGS'
1182ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1183ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1184ac_compiler_gnu=$ac_cv_c_compiler_gnu
1185ac_main_return=return
1186if test -n "$ac_tool_prefix"; then
1187  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1188set dummy ${ac_tool_prefix}gcc; ac_word=$2
1189echo "$as_me:1189: checking for $ac_word" >&5
1190echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1191if test "${ac_cv_prog_CC+set}" = set; then
1192  echo $ECHO_N "(cached) $ECHO_C" >&6
1193else
1194  if test -n "$CC"; then
1195  ac_cv_prog_CC="$CC" # Let the user override the test.
1196else
1197  ac_save_IFS=$IFS; IFS=$ac_path_separator
1198ac_dummy="$PATH"
1199for ac_dir in $ac_dummy; do
1200  IFS=$ac_save_IFS
1201  test -z "$ac_dir" && ac_dir=.
1202  $as_executable_p "$ac_dir/$ac_word" || continue
1203ac_cv_prog_CC="${ac_tool_prefix}gcc"
1204echo "$as_me:1204: found $ac_dir/$ac_word" >&5
1205break
1206done
1207
1208fi
1209fi
1210CC=$ac_cv_prog_CC
1211if test -n "$CC"; then
1212  echo "$as_me:1212: result: $CC" >&5
1213echo "${ECHO_T}$CC" >&6
1214else
1215  echo "$as_me:1215: result: no" >&5
1216echo "${ECHO_T}no" >&6
1217fi
1218
1219fi
1220if test -z "$ac_cv_prog_CC"; then
1221  ac_ct_CC=$CC
1222  # Extract the first word of "gcc", so it can be a program name with args.
1223set dummy gcc; ac_word=$2
1224echo "$as_me:1224: checking for $ac_word" >&5
1225echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1226if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1227  echo $ECHO_N "(cached) $ECHO_C" >&6
1228else
1229  if test -n "$ac_ct_CC"; then
1230  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1231else
1232  ac_save_IFS=$IFS; IFS=$ac_path_separator
1233ac_dummy="$PATH"
1234for ac_dir in $ac_dummy; do
1235  IFS=$ac_save_IFS
1236  test -z "$ac_dir" && ac_dir=.
1237  $as_executable_p "$ac_dir/$ac_word" || continue
1238ac_cv_prog_ac_ct_CC="gcc"
1239echo "$as_me:1239: found $ac_dir/$ac_word" >&5
1240break
1241done
1242
1243fi
1244fi
1245ac_ct_CC=$ac_cv_prog_ac_ct_CC
1246if test -n "$ac_ct_CC"; then
1247  echo "$as_me:1247: result: $ac_ct_CC" >&5
1248echo "${ECHO_T}$ac_ct_CC" >&6
1249else
1250  echo "$as_me:1250: result: no" >&5
1251echo "${ECHO_T}no" >&6
1252fi
1253
1254  CC=$ac_ct_CC
1255else
1256  CC="$ac_cv_prog_CC"
1257fi
1258
1259if test -z "$CC"; then
1260  if test -n "$ac_tool_prefix"; then
1261  # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1262set dummy ${ac_tool_prefix}cc; ac_word=$2
1263echo "$as_me:1263: checking for $ac_word" >&5
1264echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1265if test "${ac_cv_prog_CC+set}" = set; then
1266  echo $ECHO_N "(cached) $ECHO_C" >&6
1267else
1268  if test -n "$CC"; then
1269  ac_cv_prog_CC="$CC" # Let the user override the test.
1270else
1271  ac_save_IFS=$IFS; IFS=$ac_path_separator
1272ac_dummy="$PATH"
1273for ac_dir in $ac_dummy; do
1274  IFS=$ac_save_IFS
1275  test -z "$ac_dir" && ac_dir=.
1276  $as_executable_p "$ac_dir/$ac_word" || continue
1277ac_cv_prog_CC="${ac_tool_prefix}cc"
1278echo "$as_me:1278: found $ac_dir/$ac_word" >&5
1279break
1280done
1281
1282fi
1283fi
1284CC=$ac_cv_prog_CC
1285if test -n "$CC"; then
1286  echo "$as_me:1286: result: $CC" >&5
1287echo "${ECHO_T}$CC" >&6
1288else
1289  echo "$as_me:1289: result: no" >&5
1290echo "${ECHO_T}no" >&6
1291fi
1292
1293fi
1294if test -z "$ac_cv_prog_CC"; then
1295  ac_ct_CC=$CC
1296  # Extract the first word of "cc", so it can be a program name with args.
1297set dummy cc; ac_word=$2
1298echo "$as_me:1298: checking for $ac_word" >&5
1299echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1300if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1301  echo $ECHO_N "(cached) $ECHO_C" >&6
1302else
1303  if test -n "$ac_ct_CC"; then
1304  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1305else
1306  ac_save_IFS=$IFS; IFS=$ac_path_separator
1307ac_dummy="$PATH"
1308for ac_dir in $ac_dummy; do
1309  IFS=$ac_save_IFS
1310  test -z "$ac_dir" && ac_dir=.
1311  $as_executable_p "$ac_dir/$ac_word" || continue
1312ac_cv_prog_ac_ct_CC="cc"
1313echo "$as_me:1313: found $ac_dir/$ac_word" >&5
1314break
1315done
1316
1317fi
1318fi
1319ac_ct_CC=$ac_cv_prog_ac_ct_CC
1320if test -n "$ac_ct_CC"; then
1321  echo "$as_me:1321: result: $ac_ct_CC" >&5
1322echo "${ECHO_T}$ac_ct_CC" >&6
1323else
1324  echo "$as_me:1324: result: no" >&5
1325echo "${ECHO_T}no" >&6
1326fi
1327
1328  CC=$ac_ct_CC
1329else
1330  CC="$ac_cv_prog_CC"
1331fi
1332
1333fi
1334if test -z "$CC"; then
1335  # Extract the first word of "cc", so it can be a program name with args.
1336set dummy cc; ac_word=$2
1337echo "$as_me:1337: checking for $ac_word" >&5
1338echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1339if test "${ac_cv_prog_CC+set}" = set; then
1340  echo $ECHO_N "(cached) $ECHO_C" >&6
1341else
1342  if test -n "$CC"; then
1343  ac_cv_prog_CC="$CC" # Let the user override the test.
1344else
1345  ac_prog_rejected=no
1346  ac_save_IFS=$IFS; IFS=$ac_path_separator
1347ac_dummy="$PATH"
1348for ac_dir in $ac_dummy; do
1349  IFS=$ac_save_IFS
1350  test -z "$ac_dir" && ac_dir=.
1351  $as_executable_p "$ac_dir/$ac_word" || continue
1352if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1353  ac_prog_rejected=yes
1354  continue
1355fi
1356ac_cv_prog_CC="cc"
1357echo "$as_me:1357: found $ac_dir/$ac_word" >&5
1358break
1359done
1360
1361if test $ac_prog_rejected = yes; then
1362  # We found a bogon in the path, so make sure we never use it.
1363  set dummy $ac_cv_prog_CC
1364  shift
1365  if test $# != 0; then
1366    # We chose a different compiler from the bogus one.
1367    # However, it has the same basename, so the bogon will be chosen
1368    # first if we set CC to just the basename; use the full file name.
1369    shift
1370    set dummy "$ac_dir/$ac_word" ${1+"$@"}
1371    shift
1372    ac_cv_prog_CC="$@"
1373  fi
1374fi
1375fi
1376fi
1377CC=$ac_cv_prog_CC
1378if test -n "$CC"; then
1379  echo "$as_me:1379: result: $CC" >&5
1380echo "${ECHO_T}$CC" >&6
1381else
1382  echo "$as_me:1382: result: no" >&5
1383echo "${ECHO_T}no" >&6
1384fi
1385
1386fi
1387if test -z "$CC"; then
1388  if test -n "$ac_tool_prefix"; then
1389  for ac_prog in cl
1390  do
1391    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1392set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1393echo "$as_me:1393: checking for $ac_word" >&5
1394echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1395if test "${ac_cv_prog_CC+set}" = set; then
1396  echo $ECHO_N "(cached) $ECHO_C" >&6
1397else
1398  if test -n "$CC"; then
1399  ac_cv_prog_CC="$CC" # Let the user override the test.
1400else
1401  ac_save_IFS=$IFS; IFS=$ac_path_separator
1402ac_dummy="$PATH"
1403for ac_dir in $ac_dummy; do
1404  IFS=$ac_save_IFS
1405  test -z "$ac_dir" && ac_dir=.
1406  $as_executable_p "$ac_dir/$ac_word" || continue
1407ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1408echo "$as_me:1408: found $ac_dir/$ac_word" >&5
1409break
1410done
1411
1412fi
1413fi
1414CC=$ac_cv_prog_CC
1415if test -n "$CC"; then
1416  echo "$as_me:1416: result: $CC" >&5
1417echo "${ECHO_T}$CC" >&6
1418else
1419  echo "$as_me:1419: result: no" >&5
1420echo "${ECHO_T}no" >&6
1421fi
1422
1423    test -n "$CC" && break
1424  done
1425fi
1426if test -z "$CC"; then
1427  ac_ct_CC=$CC
1428  for ac_prog in cl
1429do
1430  # Extract the first word of "$ac_prog", so it can be a program name with args.
1431set dummy $ac_prog; ac_word=$2
1432echo "$as_me:1432: checking for $ac_word" >&5
1433echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1434if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1435  echo $ECHO_N "(cached) $ECHO_C" >&6
1436else
1437  if test -n "$ac_ct_CC"; then
1438  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1439else
1440  ac_save_IFS=$IFS; IFS=$ac_path_separator
1441ac_dummy="$PATH"
1442for ac_dir in $ac_dummy; do
1443  IFS=$ac_save_IFS
1444  test -z "$ac_dir" && ac_dir=.
1445  $as_executable_p "$ac_dir/$ac_word" || continue
1446ac_cv_prog_ac_ct_CC="$ac_prog"
1447echo "$as_me:1447: found $ac_dir/$ac_word" >&5
1448break
1449done
1450
1451fi
1452fi
1453ac_ct_CC=$ac_cv_prog_ac_ct_CC
1454if test -n "$ac_ct_CC"; then
1455  echo "$as_me:1455: result: $ac_ct_CC" >&5
1456echo "${ECHO_T}$ac_ct_CC" >&6
1457else
1458  echo "$as_me:1458: result: no" >&5
1459echo "${ECHO_T}no" >&6
1460fi
1461
1462  test -n "$ac_ct_CC" && break
1463done
1464
1465  CC=$ac_ct_CC
1466fi
1467
1468fi
1469
1470test -z "$CC" && { { echo "$as_me:1470: error: no acceptable cc found in \$PATH" >&5
1471echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1472   { (exit 1); exit 1; }; }
1473
1474# Provide some information about the compiler.
1475echo "$as_me:1475:" \
1476     "checking for C compiler version" >&5
1477ac_compiler=`set X $ac_compile; echo $2`
1478{ (eval echo "$as_me:1478: \"$ac_compiler --version </dev/null >&5\"") >&5
1479  (eval $ac_compiler --version </dev/null >&5) 2>&5
1480  ac_status=$?
1481  echo "$as_me:1481: \$? = $ac_status" >&5
1482  (exit $ac_status); }
1483{ (eval echo "$as_me:1483: \"$ac_compiler -v </dev/null >&5\"") >&5
1484  (eval $ac_compiler -v </dev/null >&5) 2>&5
1485  ac_status=$?
1486  echo "$as_me:1486: \$? = $ac_status" >&5
1487  (exit $ac_status); }
1488{ (eval echo "$as_me:1488: \"$ac_compiler -V </dev/null >&5\"") >&5
1489  (eval $ac_compiler -V </dev/null >&5) 2>&5
1490  ac_status=$?
1491  echo "$as_me:1491: \$? = $ac_status" >&5
1492  (exit $ac_status); }
1493
1494cat >conftest.$ac_ext <<_ACEOF
1495#line 1495 "configure"
1496#include "confdefs.h"
1497
1498int
1499main ()
1500{
1501
1502  ;
1503  return 0;
1504}
1505_ACEOF
1506ac_clean_files_save=$ac_clean_files
1507ac_clean_files="$ac_clean_files a.out a.exe"
1508# Try to create an executable without -o first, disregard a.out.
1509# It will help us diagnose broken compilers, and finding out an intuition
1510# of exeext.
1511echo "$as_me:1511: checking for C compiler default output" >&5
1512echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1513ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1514if { (eval echo "$as_me:1514: \"$ac_link_default\"") >&5
1515  (eval $ac_link_default) 2>&5
1516  ac_status=$?
1517  echo "$as_me:1517: \$? = $ac_status" >&5
1518  (exit $ac_status); }; then
1519  # Find the output, starting from the most likely.  This scheme is
1520# not robust to junk in `.', hence go to wildcards (a.*) only as a last
1521# resort.
1522for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1523                ls a.out conftest 2>/dev/null;
1524                ls a.* conftest.* 2>/dev/null`; do
1525  case $ac_file in
1526    *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
1527    a.out ) # We found the default executable, but exeext='' is most
1528            # certainly right.
1529            break;;
1530    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1531          # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1532          export ac_cv_exeext
1533          break;;
1534    * ) break;;
1535  esac
1536done
1537else
1538  echo "$as_me: failed program was:" >&5
1539cat conftest.$ac_ext >&5
1540{ { echo "$as_me:1540: error: C compiler cannot create executables" >&5
1541echo "$as_me: error: C compiler cannot create executables" >&2;}
1542   { (exit 77); exit 77; }; }
1543fi
1544
1545ac_exeext=$ac_cv_exeext
1546echo "$as_me:1546: result: $ac_file" >&5
1547echo "${ECHO_T}$ac_file" >&6
1548
1549# Check the compiler produces executables we can run.  If not, either
1550# the compiler is broken, or we cross compile.
1551echo "$as_me:1551: checking whether the C compiler works" >&5
1552echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1553# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1554# If not cross compiling, check that we can run a simple program.
1555if test "$cross_compiling" != yes; then
1556  if { ac_try='./$ac_file'
1557  { (eval echo "$as_me:1557: \"$ac_try\"") >&5
1558  (eval $ac_try) 2>&5
1559  ac_status=$?
1560  echo "$as_me:1560: \$? = $ac_status" >&5
1561  (exit $ac_status); }; }; then
1562    cross_compiling=no
1563  else
1564    if test "$cross_compiling" = maybe; then
1565	cross_compiling=yes
1566    else
1567	{ { echo "$as_me:1567: error: cannot run C compiled programs.
1568If you meant to cross compile, use \`--host'." >&5
1569echo "$as_me: error: cannot run C compiled programs.
1570If you meant to cross compile, use \`--host'." >&2;}
1571   { (exit 1); exit 1; }; }
1572    fi
1573  fi
1574fi
1575echo "$as_me:1575: result: yes" >&5
1576echo "${ECHO_T}yes" >&6
1577
1578rm -f a.out a.exe conftest$ac_cv_exeext
1579ac_clean_files=$ac_clean_files_save
1580# Check the compiler produces executables we can run.  If not, either
1581# the compiler is broken, or we cross compile.
1582echo "$as_me:1582: checking whether we are cross compiling" >&5
1583echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1584echo "$as_me:1584: result: $cross_compiling" >&5
1585echo "${ECHO_T}$cross_compiling" >&6
1586
1587echo "$as_me:1587: checking for executable suffix" >&5
1588echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1589if { (eval echo "$as_me:1589: \"$ac_link\"") >&5
1590  (eval $ac_link) 2>&5
1591  ac_status=$?
1592  echo "$as_me:1592: \$? = $ac_status" >&5
1593  (exit $ac_status); }; then
1594  # If both `conftest.exe' and `conftest' are `present' (well, observable)
1595# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1596# work properly (i.e., refer to `conftest.exe'), while it won't with
1597# `rm'.
1598for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1599  case $ac_file in
1600    *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
1601    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1602          export ac_cv_exeext
1603          break;;
1604    * ) break;;
1605  esac
1606done
1607else
1608  { { echo "$as_me:1608: error: cannot compute EXEEXT: cannot compile and link" >&5
1609echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1610   { (exit 1); exit 1; }; }
1611fi
1612
1613rm -f conftest$ac_cv_exeext
1614echo "$as_me:1614: result: $ac_cv_exeext" >&5
1615echo "${ECHO_T}$ac_cv_exeext" >&6
1616
1617rm -f conftest.$ac_ext
1618EXEEXT=$ac_cv_exeext
1619ac_exeext=$EXEEXT
1620echo "$as_me:1620: checking for object suffix" >&5
1621echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1622if test "${ac_cv_objext+set}" = set; then
1623  echo $ECHO_N "(cached) $ECHO_C" >&6
1624else
1625  cat >conftest.$ac_ext <<_ACEOF
1626#line 1626 "configure"
1627#include "confdefs.h"
1628
1629int
1630main ()
1631{
1632
1633  ;
1634  return 0;
1635}
1636_ACEOF
1637rm -f conftest.o conftest.obj
1638if { (eval echo "$as_me:1638: \"$ac_compile\"") >&5
1639  (eval $ac_compile) 2>&5
1640  ac_status=$?
1641  echo "$as_me:1641: \$? = $ac_status" >&5
1642  (exit $ac_status); }; then
1643  for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1644  case $ac_file in
1645    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb ) ;;
1646    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1647       break;;
1648  esac
1649done
1650else
1651  echo "$as_me: failed program was:" >&5
1652cat conftest.$ac_ext >&5
1653{ { echo "$as_me:1653: error: cannot compute OBJEXT: cannot compile" >&5
1654echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1655   { (exit 1); exit 1; }; }
1656fi
1657
1658rm -f conftest.$ac_cv_objext conftest.$ac_ext
1659fi
1660echo "$as_me:1660: result: $ac_cv_objext" >&5
1661echo "${ECHO_T}$ac_cv_objext" >&6
1662OBJEXT=$ac_cv_objext
1663ac_objext=$OBJEXT
1664echo "$as_me:1664: checking whether we are using the GNU C compiler" >&5
1665echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1666if test "${ac_cv_c_compiler_gnu+set}" = set; then
1667  echo $ECHO_N "(cached) $ECHO_C" >&6
1668else
1669  cat >conftest.$ac_ext <<_ACEOF
1670#line 1670 "configure"
1671#include "confdefs.h"
1672
1673int
1674main ()
1675{
1676#ifndef __GNUC__
1677       choke me
1678#endif
1679
1680  ;
1681  return 0;
1682}
1683_ACEOF
1684rm -f conftest.$ac_objext
1685if { (eval echo "$as_me:1685: \"$ac_compile\"") >&5
1686  (eval $ac_compile) 2>&5
1687  ac_status=$?
1688  echo "$as_me:1688: \$? = $ac_status" >&5
1689  (exit $ac_status); } &&
1690         { ac_try='test -s conftest.$ac_objext'
1691  { (eval echo "$as_me:1691: \"$ac_try\"") >&5
1692  (eval $ac_try) 2>&5
1693  ac_status=$?
1694  echo "$as_me:1694: \$? = $ac_status" >&5
1695  (exit $ac_status); }; }; then
1696  ac_compiler_gnu=yes
1697else
1698  echo "$as_me: failed program was:" >&5
1699cat conftest.$ac_ext >&5
1700ac_compiler_gnu=no
1701fi
1702rm -f conftest.$ac_objext conftest.$ac_ext
1703ac_cv_c_compiler_gnu=$ac_compiler_gnu
1704
1705fi
1706echo "$as_me:1706: result: $ac_cv_c_compiler_gnu" >&5
1707echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1708GCC=`test $ac_compiler_gnu = yes && echo yes`
1709ac_test_CFLAGS=${CFLAGS+set}
1710ac_save_CFLAGS=$CFLAGS
1711CFLAGS="-g"
1712echo "$as_me:1712: checking whether $CC accepts -g" >&5
1713echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1714if test "${ac_cv_prog_cc_g+set}" = set; then
1715  echo $ECHO_N "(cached) $ECHO_C" >&6
1716else
1717  cat >conftest.$ac_ext <<_ACEOF
1718#line 1718 "configure"
1719#include "confdefs.h"
1720
1721int
1722main ()
1723{
1724
1725  ;
1726  return 0;
1727}
1728_ACEOF
1729rm -f conftest.$ac_objext
1730if { (eval echo "$as_me:1730: \"$ac_compile\"") >&5
1731  (eval $ac_compile) 2>&5
1732  ac_status=$?
1733  echo "$as_me:1733: \$? = $ac_status" >&5
1734  (exit $ac_status); } &&
1735         { ac_try='test -s conftest.$ac_objext'
1736  { (eval echo "$as_me:1736: \"$ac_try\"") >&5
1737  (eval $ac_try) 2>&5
1738  ac_status=$?
1739  echo "$as_me:1739: \$? = $ac_status" >&5
1740  (exit $ac_status); }; }; then
1741  ac_cv_prog_cc_g=yes
1742else
1743  echo "$as_me: failed program was:" >&5
1744cat conftest.$ac_ext >&5
1745ac_cv_prog_cc_g=no
1746fi
1747rm -f conftest.$ac_objext conftest.$ac_ext
1748fi
1749echo "$as_me:1749: result: $ac_cv_prog_cc_g" >&5
1750echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1751if test "$ac_test_CFLAGS" = set; then
1752  CFLAGS=$ac_save_CFLAGS
1753elif test $ac_cv_prog_cc_g = yes; then
1754  if test "$GCC" = yes; then
1755    CFLAGS="-g -O2"
1756  else
1757    CFLAGS="-g"
1758  fi
1759else
1760  if test "$GCC" = yes; then
1761    CFLAGS="-O2"
1762  else
1763    CFLAGS=
1764  fi
1765fi
1766# Some people use a C++ compiler to compile C.  Since we use `exit',
1767# in C++ we need to declare it.  In case someone uses the same compiler
1768# for both compiling C and C++ we need to have the C++ compiler decide
1769# the declaration of exit, since it's the most demanding environment.
1770cat >conftest.$ac_ext <<_ACEOF
1771#ifndef __cplusplus
1772  choke me
1773#endif
1774_ACEOF
1775rm -f conftest.$ac_objext
1776if { (eval echo "$as_me:1776: \"$ac_compile\"") >&5
1777  (eval $ac_compile) 2>&5
1778  ac_status=$?
1779  echo "$as_me:1779: \$? = $ac_status" >&5
1780  (exit $ac_status); } &&
1781         { ac_try='test -s conftest.$ac_objext'
1782  { (eval echo "$as_me:1782: \"$ac_try\"") >&5
1783  (eval $ac_try) 2>&5
1784  ac_status=$?
1785  echo "$as_me:1785: \$? = $ac_status" >&5
1786  (exit $ac_status); }; }; then
1787  for ac_declaration in \
1788   ''\
1789   '#include <stdlib.h>' \
1790   'extern "C" void std::exit (int) throw (); using std::exit;' \
1791   'extern "C" void std::exit (int); using std::exit;' \
1792   'extern "C" void exit (int) throw ();' \
1793   'extern "C" void exit (int);' \
1794   'void exit (int);'
1795do
1796  cat >conftest.$ac_ext <<_ACEOF
1797#line 1797 "configure"
1798#include "confdefs.h"
1799#include <stdlib.h>
1800$ac_declaration
1801int
1802main ()
1803{
1804exit (42);
1805  ;
1806  return 0;
1807}
1808_ACEOF
1809rm -f conftest.$ac_objext
1810if { (eval echo "$as_me:1810: \"$ac_compile\"") >&5
1811  (eval $ac_compile) 2>&5
1812  ac_status=$?
1813  echo "$as_me:1813: \$? = $ac_status" >&5
1814  (exit $ac_status); } &&
1815         { ac_try='test -s conftest.$ac_objext'
1816  { (eval echo "$as_me:1816: \"$ac_try\"") >&5
1817  (eval $ac_try) 2>&5
1818  ac_status=$?
1819  echo "$as_me:1819: \$? = $ac_status" >&5
1820  (exit $ac_status); }; }; then
1821  :
1822else
1823  echo "$as_me: failed program was:" >&5
1824cat conftest.$ac_ext >&5
1825continue
1826fi
1827rm -f conftest.$ac_objext conftest.$ac_ext
1828  cat >conftest.$ac_ext <<_ACEOF
1829#line 1829 "configure"
1830#include "confdefs.h"
1831$ac_declaration
1832int
1833main ()
1834{
1835exit (42);
1836  ;
1837  return 0;
1838}
1839_ACEOF
1840rm -f conftest.$ac_objext
1841if { (eval echo "$as_me:1841: \"$ac_compile\"") >&5
1842  (eval $ac_compile) 2>&5
1843  ac_status=$?
1844  echo "$as_me:1844: \$? = $ac_status" >&5
1845  (exit $ac_status); } &&
1846         { ac_try='test -s conftest.$ac_objext'
1847  { (eval echo "$as_me:1847: \"$ac_try\"") >&5
1848  (eval $ac_try) 2>&5
1849  ac_status=$?
1850  echo "$as_me:1850: \$? = $ac_status" >&5
1851  (exit $ac_status); }; }; then
1852  break
1853else
1854  echo "$as_me: failed program was:" >&5
1855cat conftest.$ac_ext >&5
1856fi
1857rm -f conftest.$ac_objext conftest.$ac_ext
1858done
1859rm -f conftest*
1860if test -n "$ac_declaration"; then
1861  echo '#ifdef __cplusplus' >>confdefs.h
1862  echo $ac_declaration      >>confdefs.h
1863  echo '#endif'             >>confdefs.h
1864fi
1865
1866else
1867  echo "$as_me: failed program was:" >&5
1868cat conftest.$ac_ext >&5
1869fi
1870rm -f conftest.$ac_objext conftest.$ac_ext
1871ac_ext=c
1872ac_cpp='$CPP $CPPFLAGS'
1873ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1874ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1875ac_compiler_gnu=$ac_cv_c_compiler_gnu
1876ac_main_return=return
1877
1878ac_ext=c
1879ac_cpp='$CPP $CPPFLAGS'
1880ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1881ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1882ac_compiler_gnu=$ac_cv_c_compiler_gnu
1883ac_main_return=return
1884echo "$as_me:1884: checking how to run the C preprocessor" >&5
1885echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
1886# On Suns, sometimes $CPP names a directory.
1887if test -n "$CPP" && test -d "$CPP"; then
1888  CPP=
1889fi
1890if test -z "$CPP"; then
1891  if test "${ac_cv_prog_CPP+set}" = set; then
1892  echo $ECHO_N "(cached) $ECHO_C" >&6
1893else
1894      # Double quotes because CPP needs to be expanded
1895    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
1896    do
1897      ac_preproc_ok=false
1898for ac_c_preproc_warn_flag in '' yes
1899do
1900  # Use a header file that comes with gcc, so configuring glibc
1901  # with a fresh cross-compiler works.
1902  # On the NeXT, cc -E runs the code through the compiler's parser,
1903  # not just through cpp. "Syntax error" is here to catch this case.
1904  cat >conftest.$ac_ext <<_ACEOF
1905#line 1905 "configure"
1906#include "confdefs.h"
1907#include <assert.h>
1908                     Syntax error
1909_ACEOF
1910if { (eval echo "$as_me:1910: \"$ac_cpp conftest.$ac_ext\"") >&5
1911  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
1912  ac_status=$?
1913  egrep -v '^ *\+' conftest.er1 >conftest.err
1914  rm -f conftest.er1
1915  cat conftest.err >&5
1916  echo "$as_me:1916: \$? = $ac_status" >&5
1917  (exit $ac_status); } >/dev/null; then
1918  if test -s conftest.err; then
1919    ac_cpp_err=$ac_c_preproc_warn_flag
1920  else
1921    ac_cpp_err=
1922  fi
1923else
1924  ac_cpp_err=yes
1925fi
1926if test -z "$ac_cpp_err"; then
1927  :
1928else
1929  echo "$as_me: failed program was:" >&5
1930  cat conftest.$ac_ext >&5
1931  # Broken: fails on valid input.
1932continue
1933fi
1934rm -f conftest.err conftest.$ac_ext
1935
1936  # OK, works on sane cases.  Now check whether non-existent headers
1937  # can be detected and how.
1938  cat >conftest.$ac_ext <<_ACEOF
1939#line 1939 "configure"
1940#include "confdefs.h"
1941#include <ac_nonexistent.h>
1942_ACEOF
1943if { (eval echo "$as_me:1943: \"$ac_cpp conftest.$ac_ext\"") >&5
1944  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
1945  ac_status=$?
1946  egrep -v '^ *\+' conftest.er1 >conftest.err
1947  rm -f conftest.er1
1948  cat conftest.err >&5
1949  echo "$as_me:1949: \$? = $ac_status" >&5
1950  (exit $ac_status); } >/dev/null; then
1951  if test -s conftest.err; then
1952    ac_cpp_err=$ac_c_preproc_warn_flag
1953  else
1954    ac_cpp_err=
1955  fi
1956else
1957  ac_cpp_err=yes
1958fi
1959if test -z "$ac_cpp_err"; then
1960  # Broken: success on invalid input.
1961continue
1962else
1963  echo "$as_me: failed program was:" >&5
1964  cat conftest.$ac_ext >&5
1965  # Passes both tests.
1966ac_preproc_ok=:
1967break
1968fi
1969rm -f conftest.err conftest.$ac_ext
1970
1971done
1972# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
1973rm -f conftest.err conftest.$ac_ext
1974if $ac_preproc_ok; then
1975  break
1976fi
1977
1978    done
1979    ac_cv_prog_CPP=$CPP
1980
1981fi
1982  CPP=$ac_cv_prog_CPP
1983else
1984  ac_cv_prog_CPP=$CPP
1985fi
1986echo "$as_me:1986: result: $CPP" >&5
1987echo "${ECHO_T}$CPP" >&6
1988ac_preproc_ok=false
1989for ac_c_preproc_warn_flag in '' yes
1990do
1991  # Use a header file that comes with gcc, so configuring glibc
1992  # with a fresh cross-compiler works.
1993  # On the NeXT, cc -E runs the code through the compiler's parser,
1994  # not just through cpp. "Syntax error" is here to catch this case.
1995  cat >conftest.$ac_ext <<_ACEOF
1996#line 1996 "configure"
1997#include "confdefs.h"
1998#include <assert.h>
1999                     Syntax error
2000_ACEOF
2001if { (eval echo "$as_me:2001: \"$ac_cpp conftest.$ac_ext\"") >&5
2002  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2003  ac_status=$?
2004  egrep -v '^ *\+' conftest.er1 >conftest.err
2005  rm -f conftest.er1
2006  cat conftest.err >&5
2007  echo "$as_me:2007: \$? = $ac_status" >&5
2008  (exit $ac_status); } >/dev/null; then
2009  if test -s conftest.err; then
2010    ac_cpp_err=$ac_c_preproc_warn_flag
2011  else
2012    ac_cpp_err=
2013  fi
2014else
2015  ac_cpp_err=yes
2016fi
2017if test -z "$ac_cpp_err"; then
2018  :
2019else
2020  echo "$as_me: failed program was:" >&5
2021  cat conftest.$ac_ext >&5
2022  # Broken: fails on valid input.
2023continue
2024fi
2025rm -f conftest.err conftest.$ac_ext
2026
2027  # OK, works on sane cases.  Now check whether non-existent headers
2028  # can be detected and how.
2029  cat >conftest.$ac_ext <<_ACEOF
2030#line 2030 "configure"
2031#include "confdefs.h"
2032#include <ac_nonexistent.h>
2033_ACEOF
2034if { (eval echo "$as_me:2034: \"$ac_cpp conftest.$ac_ext\"") >&5
2035  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2036  ac_status=$?
2037  egrep -v '^ *\+' conftest.er1 >conftest.err
2038  rm -f conftest.er1
2039  cat conftest.err >&5
2040  echo "$as_me:2040: \$? = $ac_status" >&5
2041  (exit $ac_status); } >/dev/null; then
2042  if test -s conftest.err; then
2043    ac_cpp_err=$ac_c_preproc_warn_flag
2044  else
2045    ac_cpp_err=
2046  fi
2047else
2048  ac_cpp_err=yes
2049fi
2050if test -z "$ac_cpp_err"; then
2051  # Broken: success on invalid input.
2052continue
2053else
2054  echo "$as_me: failed program was:" >&5
2055  cat conftest.$ac_ext >&5
2056  # Passes both tests.
2057ac_preproc_ok=:
2058break
2059fi
2060rm -f conftest.err conftest.$ac_ext
2061
2062done
2063# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2064rm -f conftest.err conftest.$ac_ext
2065if $ac_preproc_ok; then
2066  :
2067else
2068  { { echo "$as_me:2068: error: C preprocessor \"$CPP\" fails sanity check" >&5
2069echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2070   { (exit 1); exit 1; }; }
2071fi
2072
2073ac_ext=c
2074ac_cpp='$CPP $CPPFLAGS'
2075ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2076ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2077ac_compiler_gnu=$ac_cv_c_compiler_gnu
2078ac_main_return=return
2079
2080if test $ac_cv_c_compiler_gnu = yes; then
2081    echo "$as_me:2081: checking whether $CC needs -traditional" >&5
2082echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2083if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2084  echo $ECHO_N "(cached) $ECHO_C" >&6
2085else
2086    ac_pattern="Autoconf.*'x'"
2087  cat >conftest.$ac_ext <<_ACEOF
2088#line 2088 "configure"
2089#include "confdefs.h"
2090#include <sgtty.h>
2091int Autoconf = TIOCGETP;
2092_ACEOF
2093if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2094  egrep "$ac_pattern" >/dev/null 2>&1; then
2095  ac_cv_prog_gcc_traditional=yes
2096else
2097  ac_cv_prog_gcc_traditional=no
2098fi
2099rm -f conftest*
2100
2101  if test $ac_cv_prog_gcc_traditional = no; then
2102    cat >conftest.$ac_ext <<_ACEOF
2103#line 2103 "configure"
2104#include "confdefs.h"
2105#include <termio.h>
2106int Autoconf = TCGETA;
2107_ACEOF
2108if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2109  egrep "$ac_pattern" >/dev/null 2>&1; then
2110  ac_cv_prog_gcc_traditional=yes
2111fi
2112rm -f conftest*
2113
2114  fi
2115fi
2116echo "$as_me:2116: result: $ac_cv_prog_gcc_traditional" >&5
2117echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2118  if test $ac_cv_prog_gcc_traditional = yes; then
2119    CC="$CC -traditional"
2120  fi
2121fi
2122
2123for ac_prog in mawk gawk nawk awk
2124do
2125  # Extract the first word of "$ac_prog", so it can be a program name with args.
2126set dummy $ac_prog; ac_word=$2
2127echo "$as_me:2127: checking for $ac_word" >&5
2128echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2129if test "${ac_cv_prog_AWK+set}" = set; then
2130  echo $ECHO_N "(cached) $ECHO_C" >&6
2131else
2132  if test -n "$AWK"; then
2133  ac_cv_prog_AWK="$AWK" # Let the user override the test.
2134else
2135  ac_save_IFS=$IFS; IFS=$ac_path_separator
2136ac_dummy="$PATH"
2137for ac_dir in $ac_dummy; do
2138  IFS=$ac_save_IFS
2139  test -z "$ac_dir" && ac_dir=.
2140  $as_executable_p "$ac_dir/$ac_word" || continue
2141ac_cv_prog_AWK="$ac_prog"
2142echo "$as_me:2142: found $ac_dir/$ac_word" >&5
2143break
2144done
2145
2146fi
2147fi
2148AWK=$ac_cv_prog_AWK
2149if test -n "$AWK"; then
2150  echo "$as_me:2150: result: $AWK" >&5
2151echo "${ECHO_T}$AWK" >&6
2152else
2153  echo "$as_me:2153: result: no" >&5
2154echo "${ECHO_T}no" >&6
2155fi
2156
2157  test -n "$AWK" && break
2158done
2159
2160# Find a good install program.  We prefer a C program (faster),
2161# so one script is as good as another.  But avoid the broken or
2162# incompatible versions:
2163# SysV /etc/install, /usr/sbin/install
2164# SunOS /usr/etc/install
2165# IRIX /sbin/install
2166# AIX /bin/install
2167# AmigaOS /C/install, which installs bootblocks on floppy discs
2168# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2169# AFS /usr/afsws/bin/install, which mishandles nonexistent args
2170# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2171# ./install, which can be erroneously created by make from ./install.sh.
2172echo "$as_me:2172: checking for a BSD compatible install" >&5
2173echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
2174if test -z "$INSTALL"; then
2175if test "${ac_cv_path_install+set}" = set; then
2176  echo $ECHO_N "(cached) $ECHO_C" >&6
2177else
2178    ac_save_IFS=$IFS; IFS=$ac_path_separator
2179  for ac_dir in $PATH; do
2180    IFS=$ac_save_IFS
2181    # Account for people who put trailing slashes in PATH elements.
2182    case $ac_dir/ in
2183    / | ./ | .// | /cC/* \
2184    | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
2185    | /usr/ucb/* ) ;;
2186    *)
2187      # OSF1 and SCO ODT 3.0 have their own names for install.
2188      # Don't use installbsd from OSF since it installs stuff as root
2189      # by default.
2190      for ac_prog in ginstall scoinst install; do
2191        if $as_executable_p "$ac_dir/$ac_prog"; then
2192	  if test $ac_prog = install &&
2193            grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2194	    # AIX install.  It has an incompatible calling convention.
2195	    :
2196	  elif test $ac_prog = install &&
2197	    grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2198	    # program-specific install script used by HP pwplus--don't use.
2199	    :
2200	  else
2201	    ac_cv_path_install="$ac_dir/$ac_prog -c"
2202	    break 2
2203	  fi
2204	fi
2205      done
2206      ;;
2207    esac
2208  done
2209
2210fi
2211  if test "${ac_cv_path_install+set}" = set; then
2212    INSTALL=$ac_cv_path_install
2213  else
2214    # As a last resort, use the slow shell script.  We don't cache a
2215    # path for INSTALL within a source directory, because that will
2216    # break other packages using the cache if that directory is
2217    # removed, or if the path is relative.
2218    INSTALL=$ac_install_sh
2219  fi
2220fi
2221echo "$as_me:2221: result: $INSTALL" >&5
2222echo "${ECHO_T}$INSTALL" >&6
2223
2224# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2225# It thinks the first close brace ends the variable substitution.
2226test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2227
2228test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2229
2230test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2231
2232echo "$as_me:2232: checking whether ln -s works" >&5
2233echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
2234LN_S=$as_ln_s
2235if test "$LN_S" = "ln -s"; then
2236  echo "$as_me:2236: result: yes" >&5
2237echo "${ECHO_T}yes" >&6
2238else
2239  echo "$as_me:2239: result: no, using $LN_S" >&5
2240echo "${ECHO_T}no, using $LN_S" >&6
2241fi
2242
2243test "$program_prefix" != NONE &&
2244  program_transform_name="s,^,$program_prefix,;$program_transform_name"
2245# Use a double $ so make ignores it.
2246test "$program_suffix" != NONE &&
2247  program_transform_name="s,\$,$program_suffix,;$program_transform_name"
2248# Double any \ or $.  echo might interpret backslashes.
2249# By default was `s,x,x', remove it if useless.
2250cat <<\_ACEOF >conftest.sed
2251s/[\\$]/&&/g;s/;s,x,x,$//
2252_ACEOF
2253program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
2254rm conftest.sed
2255
2256for ac_prog in tdlint lint alint
2257do
2258  # Extract the first word of "$ac_prog", so it can be a program name with args.
2259set dummy $ac_prog; ac_word=$2
2260echo "$as_me:2260: checking for $ac_word" >&5
2261echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2262if test "${ac_cv_prog_LINT+set}" = set; then
2263  echo $ECHO_N "(cached) $ECHO_C" >&6
2264else
2265  if test -n "$LINT"; then
2266  ac_cv_prog_LINT="$LINT" # Let the user override the test.
2267else
2268  ac_save_IFS=$IFS; IFS=$ac_path_separator
2269ac_dummy="$PATH"
2270for ac_dir in $ac_dummy; do
2271  IFS=$ac_save_IFS
2272  test -z "$ac_dir" && ac_dir=.
2273  $as_executable_p "$ac_dir/$ac_word" || continue
2274ac_cv_prog_LINT="$ac_prog"
2275echo "$as_me:2275: found $ac_dir/$ac_word" >&5
2276break
2277done
2278
2279fi
2280fi
2281LINT=$ac_cv_prog_LINT
2282if test -n "$LINT"; then
2283  echo "$as_me:2283: result: $LINT" >&5
2284echo "${ECHO_T}$LINT" >&6
2285else
2286  echo "$as_me:2286: result: no" >&5
2287echo "${ECHO_T}no" >&6
2288fi
2289
2290  test -n "$LINT" && break
2291done
2292
2293###	checks for UNIX variants that set C preprocessor variables
2294
2295echo "$as_me:2295: checking for AIX" >&5
2296echo $ECHO_N "checking for AIX... $ECHO_C" >&6
2297cat >conftest.$ac_ext <<_ACEOF
2298#line 2298 "configure"
2299#include "confdefs.h"
2300#ifdef _AIX
2301  yes
2302#endif
2303
2304_ACEOF
2305if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2306  egrep "yes" >/dev/null 2>&1; then
2307  echo "$as_me:2307: result: yes" >&5
2308echo "${ECHO_T}yes" >&6
2309cat >>confdefs.h <<\EOF
2310#define _ALL_SOURCE 1
2311EOF
2312
2313else
2314  echo "$as_me:2314: result: no" >&5
2315echo "${ECHO_T}no" >&6
2316fi
2317rm -f conftest*
2318
2319echo "$as_me:2319: checking for POSIXized ISC" >&5
2320echo $ECHO_N "checking for POSIXized ISC... $ECHO_C" >&6
2321if test -d /etc/conf/kconfig.d &&
2322   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
2323then
2324  echo "$as_me:2324: result: yes" >&5
2325echo "${ECHO_T}yes" >&6
2326  ISC=yes # If later tests want to check for ISC.
2327
2328cat >>confdefs.h <<\EOF
2329#define _POSIX_SOURCE 1
2330EOF
2331
2332  if test "$GCC" = yes; then
2333    CC="$CC -posix"
2334  else
2335    CC="$CC -Xp"
2336  fi
2337else
2338  echo "$as_me:2338: result: no" >&5
2339echo "${ECHO_T}no" >&6
2340  ISC=
2341fi
2342
2343###	checks for compiler characteristics
2344
2345echo "$as_me:2345: checking for ${CC-cc} option to accept ANSI C" >&5
2346echo $ECHO_N "checking for ${CC-cc} option to accept ANSI C... $ECHO_C" >&6
2347if test "${cf_cv_ansi_cc+set}" = set; then
2348  echo $ECHO_N "(cached) $ECHO_C" >&6
2349else
2350
2351cf_cv_ansi_cc=no
2352cf_save_CFLAGS="$CFLAGS"
2353cf_save_CPPFLAGS="$CPPFLAGS"
2354# Don't try gcc -ansi; that turns off useful extensions and
2355# breaks some systems' header files.
2356# AIX			-qlanglvl=ansi
2357# Ultrix and OSF/1	-std1
2358# HP-UX			-Aa -D_HPUX_SOURCE
2359# SVR4			-Xc
2360# UnixWare 1.2		(cannot use -Xc, since ANSI/POSIX clashes)
2361for cf_arg in "-DCC_HAS_PROTOS" \
2362	"" \
2363	-qlanglvl=ansi \
2364	-std1 \
2365	-Ae \
2366	"-Aa -D_HPUX_SOURCE" \
2367	-Xc
2368do
2369
2370cf_fix_cppflags=no
2371cf_new_cflags=
2372cf_new_cppflags=
2373cf_new_extra_cppflags=
2374
2375for cf_add_cflags in $cf_arg
2376do
2377case $cf_fix_cppflags in
2378no)
2379	case $cf_add_cflags in #(vi
2380	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2381		case $cf_add_cflags in
2382		-D*)
2383			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2384
2385			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2386			&& test -z "${cf_tst_cflags}" \
2387			&& cf_fix_cppflags=yes
2388
2389			if test $cf_fix_cppflags = yes ; then
2390				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2391				continue
2392			elif test "${cf_tst_cflags}" = "\"'" ; then
2393				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2394				continue
2395			fi
2396			;;
2397		esac
2398		case "$CPPFLAGS" in
2399		*$cf_add_cflags) #(vi
2400			;;
2401		*) #(vi
2402			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2403			;;
2404		esac
2405		;;
2406	*)
2407		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2408		;;
2409	esac
2410	;;
2411yes)
2412	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2413
2414	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2415
2416	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2417	&& test -z "${cf_tst_cflags}" \
2418	&& cf_fix_cppflags=no
2419	;;
2420esac
2421done
2422
2423if test -n "$cf_new_cflags" ; then
2424
2425	CFLAGS="$CFLAGS $cf_new_cflags"
2426fi
2427
2428if test -n "$cf_new_cppflags" ; then
2429
2430	CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
2431fi
2432
2433if test -n "$cf_new_extra_cppflags" ; then
2434
2435	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2436fi
2437
2438	cat >conftest.$ac_ext <<_ACEOF
2439#line 2439 "configure"
2440#include "confdefs.h"
2441
2442#ifndef CC_HAS_PROTOS
2443#if !defined(__STDC__) || (__STDC__ != 1)
2444choke me
2445#endif
2446#endif
2447
2448int
2449main ()
2450{
2451
2452	int test (int i, double x);
2453	struct s1 {int (*f) (int a);};
2454	struct s2 {int (*f) (double a);};
2455  ;
2456  return 0;
2457}
2458_ACEOF
2459rm -f conftest.$ac_objext
2460if { (eval echo "$as_me:2460: \"$ac_compile\"") >&5
2461  (eval $ac_compile) 2>&5
2462  ac_status=$?
2463  echo "$as_me:2463: \$? = $ac_status" >&5
2464  (exit $ac_status); } &&
2465         { ac_try='test -s conftest.$ac_objext'
2466  { (eval echo "$as_me:2466: \"$ac_try\"") >&5
2467  (eval $ac_try) 2>&5
2468  ac_status=$?
2469  echo "$as_me:2469: \$? = $ac_status" >&5
2470  (exit $ac_status); }; }; then
2471  cf_cv_ansi_cc="$cf_arg"; break
2472else
2473  echo "$as_me: failed program was:" >&5
2474cat conftest.$ac_ext >&5
2475fi
2476rm -f conftest.$ac_objext conftest.$ac_ext
2477done
2478CFLAGS="$cf_save_CFLAGS"
2479CPPFLAGS="$cf_save_CPPFLAGS"
2480
2481fi
2482echo "$as_me:2482: result: $cf_cv_ansi_cc" >&5
2483echo "${ECHO_T}$cf_cv_ansi_cc" >&6
2484
2485if test "$cf_cv_ansi_cc" != "no"; then
2486if test ".$cf_cv_ansi_cc" != ".-DCC_HAS_PROTOS"; then
2487
2488cf_fix_cppflags=no
2489cf_new_cflags=
2490cf_new_cppflags=
2491cf_new_extra_cppflags=
2492
2493for cf_add_cflags in $cf_cv_ansi_cc
2494do
2495case $cf_fix_cppflags in
2496no)
2497	case $cf_add_cflags in #(vi
2498	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2499		case $cf_add_cflags in
2500		-D*)
2501			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2502
2503			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2504			&& test -z "${cf_tst_cflags}" \
2505			&& cf_fix_cppflags=yes
2506
2507			if test $cf_fix_cppflags = yes ; then
2508				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2509				continue
2510			elif test "${cf_tst_cflags}" = "\"'" ; then
2511				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2512				continue
2513			fi
2514			;;
2515		esac
2516		case "$CPPFLAGS" in
2517		*$cf_add_cflags) #(vi
2518			;;
2519		*) #(vi
2520			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2521			;;
2522		esac
2523		;;
2524	*)
2525		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2526		;;
2527	esac
2528	;;
2529yes)
2530	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2531
2532	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2533
2534	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2535	&& test -z "${cf_tst_cflags}" \
2536	&& cf_fix_cppflags=no
2537	;;
2538esac
2539done
2540
2541if test -n "$cf_new_cflags" ; then
2542
2543	CFLAGS="$CFLAGS $cf_new_cflags"
2544fi
2545
2546if test -n "$cf_new_cppflags" ; then
2547
2548	CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
2549fi
2550
2551if test -n "$cf_new_extra_cppflags" ; then
2552
2553	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2554fi
2555
2556else
2557	cat >>confdefs.h <<\EOF
2558#define CC_HAS_PROTOS 1
2559EOF
2560
2561fi
2562fi
2563
2564echo "$as_me:2564: checking for $CC option to accept ANSI C" >&5
2565echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2566if test "${ac_cv_prog_cc_stdc+set}" = set; then
2567  echo $ECHO_N "(cached) $ECHO_C" >&6
2568else
2569  ac_cv_prog_cc_stdc=no
2570ac_save_CC=$CC
2571cat >conftest.$ac_ext <<_ACEOF
2572#line 2572 "configure"
2573#include "confdefs.h"
2574#include <stdarg.h>
2575#include <stdio.h>
2576#include <sys/types.h>
2577#include <sys/stat.h>
2578/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2579struct buf { int x; };
2580FILE * (*rcsopen) (struct buf *, struct stat *, int);
2581static char *e (p, i)
2582     char **p;
2583     int i;
2584{
2585  return p[i];
2586}
2587static char *f (char * (*g) (char **, int), char **p, ...)
2588{
2589  char *s;
2590  va_list v;
2591  va_start (v,p);
2592  s = g (p, va_arg (v,int));
2593  va_end (v);
2594  return s;
2595}
2596int test (int i, double x);
2597struct s1 {int (*f) (int a);};
2598struct s2 {int (*f) (double a);};
2599int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2600int argc;
2601char **argv;
2602int
2603main ()
2604{
2605return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2606  ;
2607  return 0;
2608}
2609_ACEOF
2610# Don't try gcc -ansi; that turns off useful extensions and
2611# breaks some systems' header files.
2612# AIX			-qlanglvl=ansi
2613# Ultrix and OSF/1	-std1
2614# HP-UX 10.20 and later	-Ae
2615# HP-UX older versions	-Aa -D_HPUX_SOURCE
2616# SVR4			-Xc -D__EXTENSIONS__
2617for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2618do
2619  CC="$ac_save_CC $ac_arg"
2620  rm -f conftest.$ac_objext
2621if { (eval echo "$as_me:2621: \"$ac_compile\"") >&5
2622  (eval $ac_compile) 2>&5
2623  ac_status=$?
2624  echo "$as_me:2624: \$? = $ac_status" >&5
2625  (exit $ac_status); } &&
2626         { ac_try='test -s conftest.$ac_objext'
2627  { (eval echo "$as_me:2627: \"$ac_try\"") >&5
2628  (eval $ac_try) 2>&5
2629  ac_status=$?
2630  echo "$as_me:2630: \$? = $ac_status" >&5
2631  (exit $ac_status); }; }; then
2632  ac_cv_prog_cc_stdc=$ac_arg
2633break
2634else
2635  echo "$as_me: failed program was:" >&5
2636cat conftest.$ac_ext >&5
2637fi
2638rm -f conftest.$ac_objext
2639done
2640rm -f conftest.$ac_ext conftest.$ac_objext
2641CC=$ac_save_CC
2642
2643fi
2644
2645case "x$ac_cv_prog_cc_stdc" in
2646  x|xno)
2647    echo "$as_me:2647: result: none needed" >&5
2648echo "${ECHO_T}none needed" >&6 ;;
2649  *)
2650    echo "$as_me:2650: result: $ac_cv_prog_cc_stdc" >&5
2651echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2652    CC="$CC $ac_cv_prog_cc_stdc" ;;
2653esac
2654
2655echo "$as_me:2655: checking for an ANSI C-conforming const" >&5
2656echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
2657if test "${ac_cv_c_const+set}" = set; then
2658  echo $ECHO_N "(cached) $ECHO_C" >&6
2659else
2660  cat >conftest.$ac_ext <<_ACEOF
2661#line 2661 "configure"
2662#include "confdefs.h"
2663
2664int
2665main ()
2666{
2667/* FIXME: Include the comments suggested by Paul. */
2668#ifndef __cplusplus
2669  /* Ultrix mips cc rejects this.  */
2670  typedef int charset[2];
2671  const charset x;
2672  /* SunOS 4.1.1 cc rejects this.  */
2673  char const *const *ccp;
2674  char **p;
2675  /* NEC SVR4.0.2 mips cc rejects this.  */
2676  struct point {int x, y;};
2677  static struct point const zero = {0,0};
2678  /* AIX XL C 1.02.0.0 rejects this.
2679     It does not let you subtract one const X* pointer from another in
2680     an arm of an if-expression whose if-part is not a constant
2681     expression */
2682  const char *g = "string";
2683  ccp = &g + (g ? g-g : 0);
2684  /* HPUX 7.0 cc rejects these. */
2685  ++ccp;
2686  p = (char**) ccp;
2687  ccp = (char const *const *) p;
2688  { /* SCO 3.2v4 cc rejects this.  */
2689    char *t;
2690    char const *s = 0 ? (char *) 0 : (char const *) 0;
2691
2692    *t++ = 0;
2693  }
2694  { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
2695    int x[] = {25, 17};
2696    const int *foo = &x[0];
2697    ++foo;
2698  }
2699  { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
2700    typedef const int *iptr;
2701    iptr p = 0;
2702    ++p;
2703  }
2704  { /* AIX XL C 1.02.0.0 rejects this saying
2705       "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
2706    struct s { int j; const int *ap[3]; };
2707    struct s *b; b->j = 5;
2708  }
2709  { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
2710    const int foo = 10;
2711  }
2712#endif
2713
2714  ;
2715  return 0;
2716}
2717_ACEOF
2718rm -f conftest.$ac_objext
2719if { (eval echo "$as_me:2719: \"$ac_compile\"") >&5
2720  (eval $ac_compile) 2>&5
2721  ac_status=$?
2722  echo "$as_me:2722: \$? = $ac_status" >&5
2723  (exit $ac_status); } &&
2724         { ac_try='test -s conftest.$ac_objext'
2725  { (eval echo "$as_me:2725: \"$ac_try\"") >&5
2726  (eval $ac_try) 2>&5
2727  ac_status=$?
2728  echo "$as_me:2728: \$? = $ac_status" >&5
2729  (exit $ac_status); }; }; then
2730  ac_cv_c_const=yes
2731else
2732  echo "$as_me: failed program was:" >&5
2733cat conftest.$ac_ext >&5
2734ac_cv_c_const=no
2735fi
2736rm -f conftest.$ac_objext conftest.$ac_ext
2737fi
2738echo "$as_me:2738: result: $ac_cv_c_const" >&5
2739echo "${ECHO_T}$ac_cv_c_const" >&6
2740if test $ac_cv_c_const = no; then
2741
2742cat >>confdefs.h <<\EOF
2743#define const
2744EOF
2745
2746fi
2747
2748case $cf_cv_system_name in
2749os2*)
2750    CFLAGS="$CFLAGS -Zmt"
2751    CPPFLAGS="$CPPFLAGS -D__ST_MT_ERRNO__"
2752    CXXFLAGS="$CXXFLAGS -Zmt"
2753    # autoconf's macro sets -Zexe and suffix both, which conflict:w
2754    LDFLAGS="$LDFLAGS -Zmt -Zcrtdll"
2755    ac_cv_exeext=.exe
2756    ;;
2757esac
2758
2759PROG_EXT="$EXEEXT"
2760
2761test -n "$PROG_EXT" && cat >>confdefs.h <<EOF
2762#define PROG_EXT "$PROG_EXT"
2763EOF
2764
2765echo "$as_me:2765: checking if $CC -U and -D options work together" >&5
2766echo $ECHO_N "checking if $CC -U and -D options work together... $ECHO_C" >&6
2767if test "${cf_cv_cc_u_d_options+set}" = set; then
2768  echo $ECHO_N "(cached) $ECHO_C" >&6
2769else
2770
2771	cf_save_CPPFLAGS="$CPPFLAGS"
2772	CPPFLAGS="-UU_D_OPTIONS -DU_D_OPTIONS -DD_U_OPTIONS -UD_U_OPTIONS"
2773	cat >conftest.$ac_ext <<_ACEOF
2774#line 2774 "configure"
2775#include "confdefs.h"
2776
2777int
2778main ()
2779{
2780
2781#ifndef U_D_OPTIONS
2782make an undefined-error
2783#endif
2784#ifdef  D_U_OPTIONS
2785make a defined-error
2786#endif
2787
2788  ;
2789  return 0;
2790}
2791_ACEOF
2792rm -f conftest.$ac_objext
2793if { (eval echo "$as_me:2793: \"$ac_compile\"") >&5
2794  (eval $ac_compile) 2>&5
2795  ac_status=$?
2796  echo "$as_me:2796: \$? = $ac_status" >&5
2797  (exit $ac_status); } &&
2798         { ac_try='test -s conftest.$ac_objext'
2799  { (eval echo "$as_me:2799: \"$ac_try\"") >&5
2800  (eval $ac_try) 2>&5
2801  ac_status=$?
2802  echo "$as_me:2802: \$? = $ac_status" >&5
2803  (exit $ac_status); }; }; then
2804
2805	cf_cv_cc_u_d_options=yes
2806else
2807  echo "$as_me: failed program was:" >&5
2808cat conftest.$ac_ext >&5
2809
2810	cf_cv_cc_u_d_options=no
2811fi
2812rm -f conftest.$ac_objext conftest.$ac_ext
2813	CPPFLAGS="$cf_save_CPPFLAGS"
2814
2815fi
2816echo "$as_me:2816: result: $cf_cv_cc_u_d_options" >&5
2817echo "${ECHO_T}$cf_cv_cc_u_d_options" >&6
2818
2819cf_XOPEN_SOURCE=500
2820cf_POSIX_C_SOURCE=199506L
2821
2822case $host_os in #(vi
2823aix[45]*) #(vi
2824	CPPFLAGS="$CPPFLAGS -D_ALL_SOURCE"
2825	;;
2826freebsd*) #(vi
2827	# 5.x headers associate
2828	#	_XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
2829	#	_XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
2830	cf_POSIX_C_SOURCE=200112L
2831	cf_XOPEN_SOURCE=600
2832	CPPFLAGS="$CPPFLAGS -D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
2833	;;
2834hpux*) #(vi
2835	CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE"
2836	;;
2837irix[56].*) #(vi
2838	CPPFLAGS="$CPPFLAGS -D_SGI_SOURCE"
2839	;;
2840linux*|gnu*|k*bsd*-gnu) #(vi
2841
2842echo "$as_me:2842: checking if we must define _GNU_SOURCE" >&5
2843echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
2844if test "${cf_cv_gnu_source+set}" = set; then
2845  echo $ECHO_N "(cached) $ECHO_C" >&6
2846else
2847
2848cat >conftest.$ac_ext <<_ACEOF
2849#line 2849 "configure"
2850#include "confdefs.h"
2851#include <sys/types.h>
2852int
2853main ()
2854{
2855
2856#ifndef _XOPEN_SOURCE
2857make an error
2858#endif
2859  ;
2860  return 0;
2861}
2862_ACEOF
2863rm -f conftest.$ac_objext
2864if { (eval echo "$as_me:2864: \"$ac_compile\"") >&5
2865  (eval $ac_compile) 2>&5
2866  ac_status=$?
2867  echo "$as_me:2867: \$? = $ac_status" >&5
2868  (exit $ac_status); } &&
2869         { ac_try='test -s conftest.$ac_objext'
2870  { (eval echo "$as_me:2870: \"$ac_try\"") >&5
2871  (eval $ac_try) 2>&5
2872  ac_status=$?
2873  echo "$as_me:2873: \$? = $ac_status" >&5
2874  (exit $ac_status); }; }; then
2875  cf_cv_gnu_source=no
2876else
2877  echo "$as_me: failed program was:" >&5
2878cat conftest.$ac_ext >&5
2879cf_save="$CPPFLAGS"
2880	 CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
2881	 cat >conftest.$ac_ext <<_ACEOF
2882#line 2882 "configure"
2883#include "confdefs.h"
2884#include <sys/types.h>
2885int
2886main ()
2887{
2888
2889#ifdef _XOPEN_SOURCE
2890make an error
2891#endif
2892  ;
2893  return 0;
2894}
2895_ACEOF
2896rm -f conftest.$ac_objext
2897if { (eval echo "$as_me:2897: \"$ac_compile\"") >&5
2898  (eval $ac_compile) 2>&5
2899  ac_status=$?
2900  echo "$as_me:2900: \$? = $ac_status" >&5
2901  (exit $ac_status); } &&
2902         { ac_try='test -s conftest.$ac_objext'
2903  { (eval echo "$as_me:2903: \"$ac_try\"") >&5
2904  (eval $ac_try) 2>&5
2905  ac_status=$?
2906  echo "$as_me:2906: \$? = $ac_status" >&5
2907  (exit $ac_status); }; }; then
2908  cf_cv_gnu_source=no
2909else
2910  echo "$as_me: failed program was:" >&5
2911cat conftest.$ac_ext >&5
2912cf_cv_gnu_source=yes
2913fi
2914rm -f conftest.$ac_objext conftest.$ac_ext
2915	CPPFLAGS="$cf_save"
2916
2917fi
2918rm -f conftest.$ac_objext conftest.$ac_ext
2919
2920fi
2921echo "$as_me:2921: result: $cf_cv_gnu_source" >&5
2922echo "${ECHO_T}$cf_cv_gnu_source" >&6
2923test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
2924
2925	;;
2926mirbsd*) #(vi
2927	# setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <arpa/inet.h>
2928	;;
2929netbsd*) #(vi
2930	# setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
2931	;;
2932openbsd*) #(vi
2933	# setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
2934	;;
2935osf[45]*) #(vi
2936	CPPFLAGS="$CPPFLAGS -D_OSF_SOURCE"
2937	;;
2938nto-qnx*) #(vi
2939	CPPFLAGS="$CPPFLAGS -D_QNX_SOURCE"
2940	;;
2941sco*) #(vi
2942	# setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
2943	;;
2944solaris*) #(vi
2945	CPPFLAGS="$CPPFLAGS -D__EXTENSIONS__"
2946	;;
2947*)
2948	echo "$as_me:2948: checking if we should define _XOPEN_SOURCE" >&5
2949echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
2950if test "${cf_cv_xopen_source+set}" = set; then
2951  echo $ECHO_N "(cached) $ECHO_C" >&6
2952else
2953
2954	cat >conftest.$ac_ext <<_ACEOF
2955#line 2955 "configure"
2956#include "confdefs.h"
2957#include <sys/types.h>
2958int
2959main ()
2960{
2961
2962#ifndef _XOPEN_SOURCE
2963make an error
2964#endif
2965  ;
2966  return 0;
2967}
2968_ACEOF
2969rm -f conftest.$ac_objext
2970if { (eval echo "$as_me:2970: \"$ac_compile\"") >&5
2971  (eval $ac_compile) 2>&5
2972  ac_status=$?
2973  echo "$as_me:2973: \$? = $ac_status" >&5
2974  (exit $ac_status); } &&
2975         { ac_try='test -s conftest.$ac_objext'
2976  { (eval echo "$as_me:2976: \"$ac_try\"") >&5
2977  (eval $ac_try) 2>&5
2978  ac_status=$?
2979  echo "$as_me:2979: \$? = $ac_status" >&5
2980  (exit $ac_status); }; }; then
2981  cf_cv_xopen_source=no
2982else
2983  echo "$as_me: failed program was:" >&5
2984cat conftest.$ac_ext >&5
2985cf_save="$CPPFLAGS"
2986	 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
2987	 cat >conftest.$ac_ext <<_ACEOF
2988#line 2988 "configure"
2989#include "confdefs.h"
2990#include <sys/types.h>
2991int
2992main ()
2993{
2994
2995#ifdef _XOPEN_SOURCE
2996make an error
2997#endif
2998  ;
2999  return 0;
3000}
3001_ACEOF
3002rm -f conftest.$ac_objext
3003if { (eval echo "$as_me:3003: \"$ac_compile\"") >&5
3004  (eval $ac_compile) 2>&5
3005  ac_status=$?
3006  echo "$as_me:3006: \$? = $ac_status" >&5
3007  (exit $ac_status); } &&
3008         { ac_try='test -s conftest.$ac_objext'
3009  { (eval echo "$as_me:3009: \"$ac_try\"") >&5
3010  (eval $ac_try) 2>&5
3011  ac_status=$?
3012  echo "$as_me:3012: \$? = $ac_status" >&5
3013  (exit $ac_status); }; }; then
3014  cf_cv_xopen_source=no
3015else
3016  echo "$as_me: failed program was:" >&5
3017cat conftest.$ac_ext >&5
3018cf_cv_xopen_source=$cf_XOPEN_SOURCE
3019fi
3020rm -f conftest.$ac_objext conftest.$ac_ext
3021	CPPFLAGS="$cf_save"
3022
3023fi
3024rm -f conftest.$ac_objext conftest.$ac_ext
3025
3026fi
3027echo "$as_me:3027: result: $cf_cv_xopen_source" >&5
3028echo "${ECHO_T}$cf_cv_xopen_source" >&6
3029	if test "$cf_cv_xopen_source" != no ; then
3030
3031# remove _XOPEN_SOURCE symbol from $CFLAGS
3032CFLAGS=`echo "$CFLAGS" | \
3033	sed	-e 's/-[UD]_XOPEN_SOURCE\(=[^ 	]*\)\?[ 	]/ /g' \
3034		-e 's/-[UD]_XOPEN_SOURCE\(=[^ 	]*\)\?$//g'`
3035
3036# remove _XOPEN_SOURCE symbol from $CPPFLAGS
3037CPPFLAGS=`echo "$CPPFLAGS" | \
3038	sed	-e 's/-[UD]_XOPEN_SOURCE\(=[^ 	]*\)\?[ 	]/ /g' \
3039		-e 's/-[UD]_XOPEN_SOURCE\(=[^ 	]*\)\?$//g'`
3040
3041		test "$cf_cv_cc_u_d_options" = yes && \
3042			CPPFLAGS="$CPPFLAGS -U_XOPEN_SOURCE"
3043		CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_cv_xopen_source"
3044	fi
3045
3046cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
3047
3048cf_save_CFLAGS="$CFLAGS"
3049cf_save_CPPFLAGS="$CPPFLAGS"
3050
3051# remove _POSIX_C_SOURCE symbol from $cf_save_CFLAGS
3052cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
3053	sed	-e 's/-[UD]_POSIX_C_SOURCE\(=[^ 	]*\)\?[ 	]/ /g' \
3054		-e 's/-[UD]_POSIX_C_SOURCE\(=[^ 	]*\)\?$//g'`
3055
3056# remove _POSIX_C_SOURCE symbol from $cf_save_CPPFLAGS
3057cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
3058	sed	-e 's/-[UD]_POSIX_C_SOURCE\(=[^ 	]*\)\?[ 	]/ /g' \
3059		-e 's/-[UD]_POSIX_C_SOURCE\(=[^ 	]*\)\?$//g'`
3060
3061echo "$as_me:3061: checking if we should define _POSIX_C_SOURCE" >&5
3062echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
3063if test "${cf_cv_posix_c_source+set}" = set; then
3064  echo $ECHO_N "(cached) $ECHO_C" >&6
3065else
3066
3067echo "${as_me-configure}:3067: testing if the symbol is already defined go no further ..." 1>&5
3068
3069	cat >conftest.$ac_ext <<_ACEOF
3070#line 3070 "configure"
3071#include "confdefs.h"
3072#include <sys/types.h>
3073int
3074main ()
3075{
3076
3077#ifndef _POSIX_C_SOURCE
3078make an error
3079#endif
3080  ;
3081  return 0;
3082}
3083_ACEOF
3084rm -f conftest.$ac_objext
3085if { (eval echo "$as_me:3085: \"$ac_compile\"") >&5
3086  (eval $ac_compile) 2>&5
3087  ac_status=$?
3088  echo "$as_me:3088: \$? = $ac_status" >&5
3089  (exit $ac_status); } &&
3090         { ac_try='test -s conftest.$ac_objext'
3091  { (eval echo "$as_me:3091: \"$ac_try\"") >&5
3092  (eval $ac_try) 2>&5
3093  ac_status=$?
3094  echo "$as_me:3094: \$? = $ac_status" >&5
3095  (exit $ac_status); }; }; then
3096  cf_cv_posix_c_source=no
3097else
3098  echo "$as_me: failed program was:" >&5
3099cat conftest.$ac_ext >&5
3100cf_want_posix_source=no
3101	 case .$cf_POSIX_C_SOURCE in #(vi
3102	 .[12]??*) #(vi
3103		cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
3104		;;
3105	 .2) #(vi
3106		cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
3107		cf_want_posix_source=yes
3108		;;
3109	 .*)
3110		cf_want_posix_source=yes
3111		;;
3112	 esac
3113	 if test "$cf_want_posix_source" = yes ; then
3114		cat >conftest.$ac_ext <<_ACEOF
3115#line 3115 "configure"
3116#include "confdefs.h"
3117#include <sys/types.h>
3118int
3119main ()
3120{
3121
3122#ifdef _POSIX_SOURCE
3123make an error
3124#endif
3125  ;
3126  return 0;
3127}
3128_ACEOF
3129rm -f conftest.$ac_objext
3130if { (eval echo "$as_me:3130: \"$ac_compile\"") >&5
3131  (eval $ac_compile) 2>&5
3132  ac_status=$?
3133  echo "$as_me:3133: \$? = $ac_status" >&5
3134  (exit $ac_status); } &&
3135         { ac_try='test -s conftest.$ac_objext'
3136  { (eval echo "$as_me:3136: \"$ac_try\"") >&5
3137  (eval $ac_try) 2>&5
3138  ac_status=$?
3139  echo "$as_me:3139: \$? = $ac_status" >&5
3140  (exit $ac_status); }; }; then
3141  :
3142else
3143  echo "$as_me: failed program was:" >&5
3144cat conftest.$ac_ext >&5
3145cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
3146fi
3147rm -f conftest.$ac_objext conftest.$ac_ext
3148	 fi
3149
3150echo "${as_me-configure}:3150: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
3151
3152	 CFLAGS="$cf_trim_CFLAGS"
3153	 CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
3154
3155echo "${as_me-configure}:3155: testing if the second compile does not leave our definition intact error ..." 1>&5
3156
3157	 cat >conftest.$ac_ext <<_ACEOF
3158#line 3158 "configure"
3159#include "confdefs.h"
3160#include <sys/types.h>
3161int
3162main ()
3163{
3164
3165#ifndef _POSIX_C_SOURCE
3166make an error
3167#endif
3168  ;
3169  return 0;
3170}
3171_ACEOF
3172rm -f conftest.$ac_objext
3173if { (eval echo "$as_me:3173: \"$ac_compile\"") >&5
3174  (eval $ac_compile) 2>&5
3175  ac_status=$?
3176  echo "$as_me:3176: \$? = $ac_status" >&5
3177  (exit $ac_status); } &&
3178         { ac_try='test -s conftest.$ac_objext'
3179  { (eval echo "$as_me:3179: \"$ac_try\"") >&5
3180  (eval $ac_try) 2>&5
3181  ac_status=$?
3182  echo "$as_me:3182: \$? = $ac_status" >&5
3183  (exit $ac_status); }; }; then
3184  :
3185else
3186  echo "$as_me: failed program was:" >&5
3187cat conftest.$ac_ext >&5
3188cf_cv_posix_c_source=no
3189fi
3190rm -f conftest.$ac_objext conftest.$ac_ext
3191	 CFLAGS="$cf_save_CFLAGS"
3192	 CPPFLAGS="$cf_save_CPPFLAGS"
3193
3194fi
3195rm -f conftest.$ac_objext conftest.$ac_ext
3196
3197fi
3198echo "$as_me:3198: result: $cf_cv_posix_c_source" >&5
3199echo "${ECHO_T}$cf_cv_posix_c_source" >&6
3200
3201if test "$cf_cv_posix_c_source" != no ; then
3202	CFLAGS="$cf_trim_CFLAGS"
3203	CPPFLAGS="$cf_trim_CPPFLAGS"
3204	if test "$cf_cv_cc_u_d_options" = yes ; then
3205		cf_temp_posix_c_source=`echo "$cf_cv_posix_c_source" | \
3206				sed -e 's/-D/-U/g' -e 's/=[^ 	]*//g'`
3207		CPPFLAGS="$CPPFLAGS $cf_temp_posix_c_source"
3208	fi
3209	CPPFLAGS="$CPPFLAGS $cf_cv_posix_c_source"
3210fi
3211
3212	;;
3213esac
3214
3215echo "$as_me:3215: checking if SIGWINCH is defined" >&5
3216echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
3217if test "${cf_cv_define_sigwinch+set}" = set; then
3218  echo $ECHO_N "(cached) $ECHO_C" >&6
3219else
3220
3221	cat >conftest.$ac_ext <<_ACEOF
3222#line 3222 "configure"
3223#include "confdefs.h"
3224
3225#include <sys/types.h>
3226#include <sys/signal.h>
3227
3228int
3229main ()
3230{
3231int x = SIGWINCH
3232  ;
3233  return 0;
3234}
3235_ACEOF
3236rm -f conftest.$ac_objext
3237if { (eval echo "$as_me:3237: \"$ac_compile\"") >&5
3238  (eval $ac_compile) 2>&5
3239  ac_status=$?
3240  echo "$as_me:3240: \$? = $ac_status" >&5
3241  (exit $ac_status); } &&
3242         { ac_try='test -s conftest.$ac_objext'
3243  { (eval echo "$as_me:3243: \"$ac_try\"") >&5
3244  (eval $ac_try) 2>&5
3245  ac_status=$?
3246  echo "$as_me:3246: \$? = $ac_status" >&5
3247  (exit $ac_status); }; }; then
3248  cf_cv_define_sigwinch=yes
3249else
3250  echo "$as_me: failed program was:" >&5
3251cat conftest.$ac_ext >&5
3252cat >conftest.$ac_ext <<_ACEOF
3253#line 3253 "configure"
3254#include "confdefs.h"
3255
3256#undef _XOPEN_SOURCE
3257#undef _POSIX_SOURCE
3258#undef _POSIX_C_SOURCE
3259#include <sys/types.h>
3260#include <sys/signal.h>
3261
3262int
3263main ()
3264{
3265int x = SIGWINCH
3266  ;
3267  return 0;
3268}
3269_ACEOF
3270rm -f conftest.$ac_objext
3271if { (eval echo "$as_me:3271: \"$ac_compile\"") >&5
3272  (eval $ac_compile) 2>&5
3273  ac_status=$?
3274  echo "$as_me:3274: \$? = $ac_status" >&5
3275  (exit $ac_status); } &&
3276         { ac_try='test -s conftest.$ac_objext'
3277  { (eval echo "$as_me:3277: \"$ac_try\"") >&5
3278  (eval $ac_try) 2>&5
3279  ac_status=$?
3280  echo "$as_me:3280: \$? = $ac_status" >&5
3281  (exit $ac_status); }; }; then
3282  cf_cv_define_sigwinch=maybe
3283else
3284  echo "$as_me: failed program was:" >&5
3285cat conftest.$ac_ext >&5
3286cf_cv_define_sigwinch=no
3287fi
3288rm -f conftest.$ac_objext conftest.$ac_ext
3289
3290fi
3291rm -f conftest.$ac_objext conftest.$ac_ext
3292
3293fi
3294echo "$as_me:3294: result: $cf_cv_define_sigwinch" >&5
3295echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
3296
3297if test "$cf_cv_define_sigwinch" = maybe ; then
3298echo "$as_me:3298: checking for actual SIGWINCH definition" >&5
3299echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
3300if test "${cf_cv_fixup_sigwinch+set}" = set; then
3301  echo $ECHO_N "(cached) $ECHO_C" >&6
3302else
3303
3304cf_cv_fixup_sigwinch=unknown
3305cf_sigwinch=32
3306while test $cf_sigwinch != 1
3307do
3308	cat >conftest.$ac_ext <<_ACEOF
3309#line 3309 "configure"
3310#include "confdefs.h"
3311
3312#undef _XOPEN_SOURCE
3313#undef _POSIX_SOURCE
3314#undef _POSIX_C_SOURCE
3315#include <sys/types.h>
3316#include <sys/signal.h>
3317
3318int
3319main ()
3320{
3321
3322#if SIGWINCH != $cf_sigwinch
3323make an error
3324#endif
3325int x = SIGWINCH
3326  ;
3327  return 0;
3328}
3329_ACEOF
3330rm -f conftest.$ac_objext
3331if { (eval echo "$as_me:3331: \"$ac_compile\"") >&5
3332  (eval $ac_compile) 2>&5
3333  ac_status=$?
3334  echo "$as_me:3334: \$? = $ac_status" >&5
3335  (exit $ac_status); } &&
3336         { ac_try='test -s conftest.$ac_objext'
3337  { (eval echo "$as_me:3337: \"$ac_try\"") >&5
3338  (eval $ac_try) 2>&5
3339  ac_status=$?
3340  echo "$as_me:3340: \$? = $ac_status" >&5
3341  (exit $ac_status); }; }; then
3342  cf_cv_fixup_sigwinch=$cf_sigwinch
3343	 break
3344else
3345  echo "$as_me: failed program was:" >&5
3346cat conftest.$ac_ext >&5
3347fi
3348rm -f conftest.$ac_objext conftest.$ac_ext
3349
3350cf_sigwinch=`expr $cf_sigwinch - 1`
3351done
3352
3353fi
3354echo "$as_me:3354: result: $cf_cv_fixup_sigwinch" >&5
3355echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
3356
3357	if test "$cf_cv_fixup_sigwinch" != unknown ; then
3358		CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
3359	fi
3360fi
3361
3362###	checks for header files
3363
3364for ac_header in \
3365ncurses/term.h \
3366stdlib.h \
3367sys/ttydefaults.h \
3368term.h \
3369termios.h \
3370unistd.h \
3371wchar.h \
3372
3373do
3374as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3375echo "$as_me:3375: checking for $ac_header" >&5
3376echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3377if eval "test \"\${$as_ac_Header+set}\" = set"; then
3378  echo $ECHO_N "(cached) $ECHO_C" >&6
3379else
3380  cat >conftest.$ac_ext <<_ACEOF
3381#line 3381 "configure"
3382#include "confdefs.h"
3383#include <$ac_header>
3384_ACEOF
3385if { (eval echo "$as_me:3385: \"$ac_cpp conftest.$ac_ext\"") >&5
3386  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3387  ac_status=$?
3388  egrep -v '^ *\+' conftest.er1 >conftest.err
3389  rm -f conftest.er1
3390  cat conftest.err >&5
3391  echo "$as_me:3391: \$? = $ac_status" >&5
3392  (exit $ac_status); } >/dev/null; then
3393  if test -s conftest.err; then
3394    ac_cpp_err=$ac_c_preproc_warn_flag
3395  else
3396    ac_cpp_err=
3397  fi
3398else
3399  ac_cpp_err=yes
3400fi
3401if test -z "$ac_cpp_err"; then
3402  eval "$as_ac_Header=yes"
3403else
3404  echo "$as_me: failed program was:" >&5
3405  cat conftest.$ac_ext >&5
3406  eval "$as_ac_Header=no"
3407fi
3408rm -f conftest.err conftest.$ac_ext
3409fi
3410echo "$as_me:3410: result: `eval echo '${'$as_ac_Header'}'`" >&5
3411echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3412if test `eval echo '${'$as_ac_Header'}'` = yes; then
3413  cat >>confdefs.h <<EOF
3414#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
3415EOF
3416
3417fi
3418done
3419
3420echo "$as_me:3420: checking whether time.h and sys/time.h may both be included" >&5
3421echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
3422if test "${ac_cv_header_time+set}" = set; then
3423  echo $ECHO_N "(cached) $ECHO_C" >&6
3424else
3425  cat >conftest.$ac_ext <<_ACEOF
3426#line 3426 "configure"
3427#include "confdefs.h"
3428#include <sys/types.h>
3429#include <sys/time.h>
3430#include <time.h>
3431
3432int
3433main ()
3434{
3435if ((struct tm *) 0)
3436return 0;
3437  ;
3438  return 0;
3439}
3440_ACEOF
3441rm -f conftest.$ac_objext
3442if { (eval echo "$as_me:3442: \"$ac_compile\"") >&5
3443  (eval $ac_compile) 2>&5
3444  ac_status=$?
3445  echo "$as_me:3445: \$? = $ac_status" >&5
3446  (exit $ac_status); } &&
3447         { ac_try='test -s conftest.$ac_objext'
3448  { (eval echo "$as_me:3448: \"$ac_try\"") >&5
3449  (eval $ac_try) 2>&5
3450  ac_status=$?
3451  echo "$as_me:3451: \$? = $ac_status" >&5
3452  (exit $ac_status); }; }; then
3453  ac_cv_header_time=yes
3454else
3455  echo "$as_me: failed program was:" >&5
3456cat conftest.$ac_ext >&5
3457ac_cv_header_time=no
3458fi
3459rm -f conftest.$ac_objext conftest.$ac_ext
3460fi
3461echo "$as_me:3461: result: $ac_cv_header_time" >&5
3462echo "${ECHO_T}$ac_cv_header_time" >&6
3463if test $ac_cv_header_time = yes; then
3464
3465cat >>confdefs.h <<\EOF
3466#define TIME_WITH_SYS_TIME 1
3467EOF
3468
3469fi
3470
3471  echo "$as_me:3471: checking for nl_langinfo and CODESET" >&5
3472echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
3473if test "${am_cv_langinfo_codeset+set}" = set; then
3474  echo $ECHO_N "(cached) $ECHO_C" >&6
3475else
3476  cat >conftest.$ac_ext <<_ACEOF
3477#line 3477 "configure"
3478#include "confdefs.h"
3479#include <langinfo.h>
3480int
3481main ()
3482{
3483char* cs = nl_langinfo(CODESET);
3484  ;
3485  return 0;
3486}
3487_ACEOF
3488rm -f conftest.$ac_objext conftest$ac_exeext
3489if { (eval echo "$as_me:3489: \"$ac_link\"") >&5
3490  (eval $ac_link) 2>&5
3491  ac_status=$?
3492  echo "$as_me:3492: \$? = $ac_status" >&5
3493  (exit $ac_status); } &&
3494         { ac_try='test -s conftest$ac_exeext'
3495  { (eval echo "$as_me:3495: \"$ac_try\"") >&5
3496  (eval $ac_try) 2>&5
3497  ac_status=$?
3498  echo "$as_me:3498: \$? = $ac_status" >&5
3499  (exit $ac_status); }; }; then
3500  am_cv_langinfo_codeset=yes
3501else
3502  echo "$as_me: failed program was:" >&5
3503cat conftest.$ac_ext >&5
3504am_cv_langinfo_codeset=no
3505fi
3506rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3507
3508fi
3509echo "$as_me:3509: result: $am_cv_langinfo_codeset" >&5
3510echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
3511  if test $am_cv_langinfo_codeset = yes; then
3512
3513cat >>confdefs.h <<\EOF
3514#define HAVE_LANGINFO_CODESET 1
3515EOF
3516
3517  fi
3518
3519###	checks for typedefs
3520
3521echo "$as_me:3521: checking for signal global datatype" >&5
3522echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
3523if test "${cf_cv_sig_atomic_t+set}" = set; then
3524  echo $ECHO_N "(cached) $ECHO_C" >&6
3525else
3526
3527	for cf_type in \
3528		"volatile sig_atomic_t" \
3529		"sig_atomic_t" \
3530		"int"
3531	do
3532	cat >conftest.$ac_ext <<_ACEOF
3533#line 3533 "configure"
3534#include "confdefs.h"
3535
3536#include <sys/types.h>
3537#include <signal.h>
3538#include <stdio.h>
3539
3540extern $cf_type x;
3541$cf_type x;
3542static void handler(int sig)
3543{
3544	x = 5;
3545}
3546int
3547main ()
3548{
3549signal(SIGINT, handler);
3550		 x = 1
3551  ;
3552  return 0;
3553}
3554_ACEOF
3555rm -f conftest.$ac_objext
3556if { (eval echo "$as_me:3556: \"$ac_compile\"") >&5
3557  (eval $ac_compile) 2>&5
3558  ac_status=$?
3559  echo "$as_me:3559: \$? = $ac_status" >&5
3560  (exit $ac_status); } &&
3561         { ac_try='test -s conftest.$ac_objext'
3562  { (eval echo "$as_me:3562: \"$ac_try\"") >&5
3563  (eval $ac_try) 2>&5
3564  ac_status=$?
3565  echo "$as_me:3565: \$? = $ac_status" >&5
3566  (exit $ac_status); }; }; then
3567  cf_cv_sig_atomic_t=$cf_type
3568else
3569  echo "$as_me: failed program was:" >&5
3570cat conftest.$ac_ext >&5
3571cf_cv_sig_atomic_t=no
3572fi
3573rm -f conftest.$ac_objext conftest.$ac_ext
3574		test "$cf_cv_sig_atomic_t" != no && break
3575	done
3576
3577fi
3578
3579echo "$as_me:3579: result: $cf_cv_sig_atomic_t" >&5
3580echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
3581test "$cf_cv_sig_atomic_t" != no && cat >>confdefs.h <<EOF
3582#define SIG_ATOMIC_T $cf_cv_sig_atomic_t
3583EOF
3584
3585echo "$as_me:3585: checking for size_t in <sys/types.h> or <stdio.h>" >&5
3586echo $ECHO_N "checking for size_t in <sys/types.h> or <stdio.h>... $ECHO_C" >&6
3587if test "${cf_cv_type_size_t+set}" = set; then
3588  echo $ECHO_N "(cached) $ECHO_C" >&6
3589else
3590
3591	cat >conftest.$ac_ext <<_ACEOF
3592#line 3592 "configure"
3593#include "confdefs.h"
3594
3595#include <sys/types.h>
3596#ifdef STDC_HEADERS
3597#include <stdlib.h>
3598#include <stddef.h>
3599#endif
3600#include <stdio.h>
3601int
3602main ()
3603{
3604size_t x
3605  ;
3606  return 0;
3607}
3608_ACEOF
3609rm -f conftest.$ac_objext
3610if { (eval echo "$as_me:3610: \"$ac_compile\"") >&5
3611  (eval $ac_compile) 2>&5
3612  ac_status=$?
3613  echo "$as_me:3613: \$? = $ac_status" >&5
3614  (exit $ac_status); } &&
3615         { ac_try='test -s conftest.$ac_objext'
3616  { (eval echo "$as_me:3616: \"$ac_try\"") >&5
3617  (eval $ac_try) 2>&5
3618  ac_status=$?
3619  echo "$as_me:3619: \$? = $ac_status" >&5
3620  (exit $ac_status); }; }; then
3621  cf_cv_type_size_t=yes
3622else
3623  echo "$as_me: failed program was:" >&5
3624cat conftest.$ac_ext >&5
3625cf_cv_type_size_t=no
3626fi
3627rm -f conftest.$ac_objext conftest.$ac_ext
3628
3629fi
3630
3631echo "$as_me:3631: result: $cf_cv_type_size_t" >&5
3632echo "${ECHO_T}$cf_cv_type_size_t" >&6
3633test $cf_cv_type_size_t = no && cat >>confdefs.h <<\EOF
3634#define size_t unsigned
3635EOF
3636
3637echo "$as_me:3637: checking for ANSI C header files" >&5
3638echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
3639if test "${ac_cv_header_stdc+set}" = set; then
3640  echo $ECHO_N "(cached) $ECHO_C" >&6
3641else
3642  cat >conftest.$ac_ext <<_ACEOF
3643#line 3643 "configure"
3644#include "confdefs.h"
3645#include <stdlib.h>
3646#include <stdarg.h>
3647#include <string.h>
3648#include <float.h>
3649
3650_ACEOF
3651if { (eval echo "$as_me:3651: \"$ac_cpp conftest.$ac_ext\"") >&5
3652  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3653  ac_status=$?
3654  egrep -v '^ *\+' conftest.er1 >conftest.err
3655  rm -f conftest.er1
3656  cat conftest.err >&5
3657  echo "$as_me:3657: \$? = $ac_status" >&5
3658  (exit $ac_status); } >/dev/null; then
3659  if test -s conftest.err; then
3660    ac_cpp_err=$ac_c_preproc_warn_flag
3661  else
3662    ac_cpp_err=
3663  fi
3664else
3665  ac_cpp_err=yes
3666fi
3667if test -z "$ac_cpp_err"; then
3668  ac_cv_header_stdc=yes
3669else
3670  echo "$as_me: failed program was:" >&5
3671  cat conftest.$ac_ext >&5
3672  ac_cv_header_stdc=no
3673fi
3674rm -f conftest.err conftest.$ac_ext
3675
3676if test $ac_cv_header_stdc = yes; then
3677  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3678  cat >conftest.$ac_ext <<_ACEOF
3679#line 3679 "configure"
3680#include "confdefs.h"
3681#include <string.h>
3682
3683_ACEOF
3684if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3685  egrep "memchr" >/dev/null 2>&1; then
3686  :
3687else
3688  ac_cv_header_stdc=no
3689fi
3690rm -f conftest*
3691
3692fi
3693
3694if test $ac_cv_header_stdc = yes; then
3695  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3696  cat >conftest.$ac_ext <<_ACEOF
3697#line 3697 "configure"
3698#include "confdefs.h"
3699#include <stdlib.h>
3700
3701_ACEOF
3702if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3703  egrep "free" >/dev/null 2>&1; then
3704  :
3705else
3706  ac_cv_header_stdc=no
3707fi
3708rm -f conftest*
3709
3710fi
3711
3712if test $ac_cv_header_stdc = yes; then
3713  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3714  if test "$cross_compiling" = yes; then
3715  :
3716else
3717  cat >conftest.$ac_ext <<_ACEOF
3718#line 3718 "configure"
3719#include "confdefs.h"
3720#include <ctype.h>
3721#if ((' ' & 0x0FF) == 0x020)
3722# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3723# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3724#else
3725# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
3726                     || ('j' <= (c) && (c) <= 'r') \
3727                     || ('s' <= (c) && (c) <= 'z'))
3728# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
3729#endif
3730
3731#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3732int
3733main ()
3734{
3735  int i;
3736  for (i = 0; i < 256; i++)
3737    if (XOR (islower (i), ISLOWER (i))
3738        || toupper (i) != TOUPPER (i))
3739      $ac_main_return(2);
3740  $ac_main_return (0);
3741}
3742_ACEOF
3743rm -f conftest$ac_exeext
3744if { (eval echo "$as_me:3744: \"$ac_link\"") >&5
3745  (eval $ac_link) 2>&5
3746  ac_status=$?
3747  echo "$as_me:3747: \$? = $ac_status" >&5
3748  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3749  { (eval echo "$as_me:3749: \"$ac_try\"") >&5
3750  (eval $ac_try) 2>&5
3751  ac_status=$?
3752  echo "$as_me:3752: \$? = $ac_status" >&5
3753  (exit $ac_status); }; }; then
3754  :
3755else
3756  echo "$as_me: program exited with status $ac_status" >&5
3757echo "$as_me: failed program was:" >&5
3758cat conftest.$ac_ext >&5
3759ac_cv_header_stdc=no
3760fi
3761rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
3762fi
3763fi
3764fi
3765echo "$as_me:3765: result: $ac_cv_header_stdc" >&5
3766echo "${ECHO_T}$ac_cv_header_stdc" >&6
3767if test $ac_cv_header_stdc = yes; then
3768
3769cat >>confdefs.h <<\EOF
3770#define STDC_HEADERS 1
3771EOF
3772
3773fi
3774
3775# On IRIX 5.3, sys/types and inttypes.h are conflicting.
3776
3777for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
3778                  inttypes.h stdint.h unistd.h
3779do
3780as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3781echo "$as_me:3781: checking for $ac_header" >&5
3782echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3783if eval "test \"\${$as_ac_Header+set}\" = set"; then
3784  echo $ECHO_N "(cached) $ECHO_C" >&6
3785else
3786  cat >conftest.$ac_ext <<_ACEOF
3787#line 3787 "configure"
3788#include "confdefs.h"
3789$ac_includes_default
3790#include <$ac_header>
3791_ACEOF
3792rm -f conftest.$ac_objext
3793if { (eval echo "$as_me:3793: \"$ac_compile\"") >&5
3794  (eval $ac_compile) 2>&5
3795  ac_status=$?
3796  echo "$as_me:3796: \$? = $ac_status" >&5
3797  (exit $ac_status); } &&
3798         { ac_try='test -s conftest.$ac_objext'
3799  { (eval echo "$as_me:3799: \"$ac_try\"") >&5
3800  (eval $ac_try) 2>&5
3801  ac_status=$?
3802  echo "$as_me:3802: \$? = $ac_status" >&5
3803  (exit $ac_status); }; }; then
3804  eval "$as_ac_Header=yes"
3805else
3806  echo "$as_me: failed program was:" >&5
3807cat conftest.$ac_ext >&5
3808eval "$as_ac_Header=no"
3809fi
3810rm -f conftest.$ac_objext conftest.$ac_ext
3811fi
3812echo "$as_me:3812: result: `eval echo '${'$as_ac_Header'}'`" >&5
3813echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3814if test `eval echo '${'$as_ac_Header'}'` = yes; then
3815  cat >>confdefs.h <<EOF
3816#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
3817EOF
3818
3819fi
3820done
3821
3822echo "$as_me:3822: checking for time_t" >&5
3823echo $ECHO_N "checking for time_t... $ECHO_C" >&6
3824if test "${ac_cv_type_time_t+set}" = set; then
3825  echo $ECHO_N "(cached) $ECHO_C" >&6
3826else
3827  cat >conftest.$ac_ext <<_ACEOF
3828#line 3828 "configure"
3829#include "confdefs.h"
3830$ac_includes_default
3831int
3832main ()
3833{
3834if ((time_t *) 0)
3835  return 0;
3836if (sizeof (time_t))
3837  return 0;
3838  ;
3839  return 0;
3840}
3841_ACEOF
3842rm -f conftest.$ac_objext
3843if { (eval echo "$as_me:3843: \"$ac_compile\"") >&5
3844  (eval $ac_compile) 2>&5
3845  ac_status=$?
3846  echo "$as_me:3846: \$? = $ac_status" >&5
3847  (exit $ac_status); } &&
3848         { ac_try='test -s conftest.$ac_objext'
3849  { (eval echo "$as_me:3849: \"$ac_try\"") >&5
3850  (eval $ac_try) 2>&5
3851  ac_status=$?
3852  echo "$as_me:3852: \$? = $ac_status" >&5
3853  (exit $ac_status); }; }; then
3854  ac_cv_type_time_t=yes
3855else
3856  echo "$as_me: failed program was:" >&5
3857cat conftest.$ac_ext >&5
3858ac_cv_type_time_t=no
3859fi
3860rm -f conftest.$ac_objext conftest.$ac_ext
3861fi
3862echo "$as_me:3862: result: $ac_cv_type_time_t" >&5
3863echo "${ECHO_T}$ac_cv_type_time_t" >&6
3864if test $ac_cv_type_time_t = yes; then
3865  :
3866else
3867
3868cat >>confdefs.h <<EOF
3869#define time_t long
3870EOF
3871
3872fi
3873
3874echo "$as_me:3874: checking for mode_t" >&5
3875echo $ECHO_N "checking for mode_t... $ECHO_C" >&6
3876if test "${ac_cv_type_mode_t+set}" = set; then
3877  echo $ECHO_N "(cached) $ECHO_C" >&6
3878else
3879  cat >conftest.$ac_ext <<_ACEOF
3880#line 3880 "configure"
3881#include "confdefs.h"
3882$ac_includes_default
3883int
3884main ()
3885{
3886if ((mode_t *) 0)
3887  return 0;
3888if (sizeof (mode_t))
3889  return 0;
3890  ;
3891  return 0;
3892}
3893_ACEOF
3894rm -f conftest.$ac_objext
3895if { (eval echo "$as_me:3895: \"$ac_compile\"") >&5
3896  (eval $ac_compile) 2>&5
3897  ac_status=$?
3898  echo "$as_me:3898: \$? = $ac_status" >&5
3899  (exit $ac_status); } &&
3900         { ac_try='test -s conftest.$ac_objext'
3901  { (eval echo "$as_me:3901: \"$ac_try\"") >&5
3902  (eval $ac_try) 2>&5
3903  ac_status=$?
3904  echo "$as_me:3904: \$? = $ac_status" >&5
3905  (exit $ac_status); }; }; then
3906  ac_cv_type_mode_t=yes
3907else
3908  echo "$as_me: failed program was:" >&5
3909cat conftest.$ac_ext >&5
3910ac_cv_type_mode_t=no
3911fi
3912rm -f conftest.$ac_objext conftest.$ac_ext
3913fi
3914echo "$as_me:3914: result: $ac_cv_type_mode_t" >&5
3915echo "${ECHO_T}$ac_cv_type_mode_t" >&6
3916if test $ac_cv_type_mode_t = yes; then
3917  :
3918else
3919
3920cat >>confdefs.h <<EOF
3921#define mode_t int
3922EOF
3923
3924fi
3925
3926echo "$as_me:3926: checking for pid_t" >&5
3927echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
3928if test "${ac_cv_type_pid_t+set}" = set; then
3929  echo $ECHO_N "(cached) $ECHO_C" >&6
3930else
3931  cat >conftest.$ac_ext <<_ACEOF
3932#line 3932 "configure"
3933#include "confdefs.h"
3934$ac_includes_default
3935int
3936main ()
3937{
3938if ((pid_t *) 0)
3939  return 0;
3940if (sizeof (pid_t))
3941  return 0;
3942  ;
3943  return 0;
3944}
3945_ACEOF
3946rm -f conftest.$ac_objext
3947if { (eval echo "$as_me:3947: \"$ac_compile\"") >&5
3948  (eval $ac_compile) 2>&5
3949  ac_status=$?
3950  echo "$as_me:3950: \$? = $ac_status" >&5
3951  (exit $ac_status); } &&
3952         { ac_try='test -s conftest.$ac_objext'
3953  { (eval echo "$as_me:3953: \"$ac_try\"") >&5
3954  (eval $ac_try) 2>&5
3955  ac_status=$?
3956  echo "$as_me:3956: \$? = $ac_status" >&5
3957  (exit $ac_status); }; }; then
3958  ac_cv_type_pid_t=yes
3959else
3960  echo "$as_me: failed program was:" >&5
3961cat conftest.$ac_ext >&5
3962ac_cv_type_pid_t=no
3963fi
3964rm -f conftest.$ac_objext conftest.$ac_ext
3965fi
3966echo "$as_me:3966: result: $ac_cv_type_pid_t" >&5
3967echo "${ECHO_T}$ac_cv_type_pid_t" >&6
3968if test $ac_cv_type_pid_t = yes; then
3969  :
3970else
3971
3972cat >>confdefs.h <<EOF
3973#define pid_t int
3974EOF
3975
3976fi
3977
3978echo "$as_me:3978: checking for uid_t in sys/types.h" >&5
3979echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
3980if test "${ac_cv_type_uid_t+set}" = set; then
3981  echo $ECHO_N "(cached) $ECHO_C" >&6
3982else
3983  cat >conftest.$ac_ext <<_ACEOF
3984#line 3984 "configure"
3985#include "confdefs.h"
3986#include <sys/types.h>
3987
3988_ACEOF
3989if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3990  egrep "uid_t" >/dev/null 2>&1; then
3991  ac_cv_type_uid_t=yes
3992else
3993  ac_cv_type_uid_t=no
3994fi
3995rm -f conftest*
3996
3997fi
3998echo "$as_me:3998: result: $ac_cv_type_uid_t" >&5
3999echo "${ECHO_T}$ac_cv_type_uid_t" >&6
4000if test $ac_cv_type_uid_t = no; then
4001
4002cat >>confdefs.h <<\EOF
4003#define uid_t int
4004EOF
4005
4006cat >>confdefs.h <<\EOF
4007#define gid_t int
4008EOF
4009
4010fi
4011
4012echo "$as_me:4012: checking for off_t" >&5
4013echo $ECHO_N "checking for off_t... $ECHO_C" >&6
4014if test "${ac_cv_type_off_t+set}" = set; then
4015  echo $ECHO_N "(cached) $ECHO_C" >&6
4016else
4017  cat >conftest.$ac_ext <<_ACEOF
4018#line 4018 "configure"
4019#include "confdefs.h"
4020$ac_includes_default
4021int
4022main ()
4023{
4024if ((off_t *) 0)
4025  return 0;
4026if (sizeof (off_t))
4027  return 0;
4028  ;
4029  return 0;
4030}
4031_ACEOF
4032rm -f conftest.$ac_objext
4033if { (eval echo "$as_me:4033: \"$ac_compile\"") >&5
4034  (eval $ac_compile) 2>&5
4035  ac_status=$?
4036  echo "$as_me:4036: \$? = $ac_status" >&5
4037  (exit $ac_status); } &&
4038         { ac_try='test -s conftest.$ac_objext'
4039  { (eval echo "$as_me:4039: \"$ac_try\"") >&5
4040  (eval $ac_try) 2>&5
4041  ac_status=$?
4042  echo "$as_me:4042: \$? = $ac_status" >&5
4043  (exit $ac_status); }; }; then
4044  ac_cv_type_off_t=yes
4045else
4046  echo "$as_me: failed program was:" >&5
4047cat conftest.$ac_ext >&5
4048ac_cv_type_off_t=no
4049fi
4050rm -f conftest.$ac_objext conftest.$ac_ext
4051fi
4052echo "$as_me:4052: result: $ac_cv_type_off_t" >&5
4053echo "${ECHO_T}$ac_cv_type_off_t" >&6
4054if test $ac_cv_type_off_t = yes; then
4055  :
4056else
4057
4058cat >>confdefs.h <<EOF
4059#define off_t long
4060EOF
4061
4062fi
4063
4064###	checks for library functions
4065
4066for ac_func in \
4067	bcopy \
4068	gethostname \
4069	getlogin \
4070	memmove \
4071	putenv \
4072	sched_yield \
4073	strerror \
4074	strftime \
4075	tcgetattr \
4076	waitpid \
4077	wcswidth \
4078	wcwidth
4079do
4080as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
4081echo "$as_me:4081: checking for $ac_func" >&5
4082echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
4083if eval "test \"\${$as_ac_var+set}\" = set"; then
4084  echo $ECHO_N "(cached) $ECHO_C" >&6
4085else
4086  cat >conftest.$ac_ext <<_ACEOF
4087#line 4087 "configure"
4088#include "confdefs.h"
4089/* System header to define __stub macros and hopefully few prototypes,
4090    which can conflict with char $ac_func (); below.  */
4091#include <assert.h>
4092/* Override any gcc2 internal prototype to avoid an error.  */
4093#ifdef __cplusplus
4094extern "C"
4095#endif
4096/* We use char because int might match the return type of a gcc2
4097   builtin and then its argument prototype would still apply.  */
4098char $ac_func ();
4099char (*f) ();
4100
4101int
4102main ()
4103{
4104/* The GNU C library defines this for functions which it implements
4105    to always fail with ENOSYS.  Some functions are actually named
4106    something starting with __ and the normal name is an alias.  */
4107#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4108choke me
4109#else
4110f = $ac_func;
4111#endif
4112
4113  ;
4114  return 0;
4115}
4116_ACEOF
4117rm -f conftest.$ac_objext conftest$ac_exeext
4118if { (eval echo "$as_me:4118: \"$ac_link\"") >&5
4119  (eval $ac_link) 2>&5
4120  ac_status=$?
4121  echo "$as_me:4121: \$? = $ac_status" >&5
4122  (exit $ac_status); } &&
4123         { ac_try='test -s conftest$ac_exeext'
4124  { (eval echo "$as_me:4124: \"$ac_try\"") >&5
4125  (eval $ac_try) 2>&5
4126  ac_status=$?
4127  echo "$as_me:4127: \$? = $ac_status" >&5
4128  (exit $ac_status); }; }; then
4129  eval "$as_ac_var=yes"
4130else
4131  echo "$as_me: failed program was:" >&5
4132cat conftest.$ac_ext >&5
4133eval "$as_ac_var=no"
4134fi
4135rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4136fi
4137echo "$as_me:4137: result: `eval echo '${'$as_ac_var'}'`" >&5
4138echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
4139if test `eval echo '${'$as_ac_var'}'` = yes; then
4140  cat >>confdefs.h <<EOF
4141#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
4142EOF
4143
4144fi
4145done
4146
4147echo "$as_me:4147: checking for memmove" >&5
4148echo $ECHO_N "checking for memmove... $ECHO_C" >&6
4149if test "${ac_cv_func_memmove+set}" = set; then
4150  echo $ECHO_N "(cached) $ECHO_C" >&6
4151else
4152  cat >conftest.$ac_ext <<_ACEOF
4153#line 4153 "configure"
4154#include "confdefs.h"
4155/* System header to define __stub macros and hopefully few prototypes,
4156    which can conflict with char memmove (); below.  */
4157#include <assert.h>
4158/* Override any gcc2 internal prototype to avoid an error.  */
4159#ifdef __cplusplus
4160extern "C"
4161#endif
4162/* We use char because int might match the return type of a gcc2
4163   builtin and then its argument prototype would still apply.  */
4164char memmove ();
4165char (*f) ();
4166
4167int
4168main ()
4169{
4170/* The GNU C library defines this for functions which it implements
4171    to always fail with ENOSYS.  Some functions are actually named
4172    something starting with __ and the normal name is an alias.  */
4173#if defined (__stub_memmove) || defined (__stub___memmove)
4174choke me
4175#else
4176f = memmove;
4177#endif
4178
4179  ;
4180  return 0;
4181}
4182_ACEOF
4183rm -f conftest.$ac_objext conftest$ac_exeext
4184if { (eval echo "$as_me:4184: \"$ac_link\"") >&5
4185  (eval $ac_link) 2>&5
4186  ac_status=$?
4187  echo "$as_me:4187: \$? = $ac_status" >&5
4188  (exit $ac_status); } &&
4189         { ac_try='test -s conftest$ac_exeext'
4190  { (eval echo "$as_me:4190: \"$ac_try\"") >&5
4191  (eval $ac_try) 2>&5
4192  ac_status=$?
4193  echo "$as_me:4193: \$? = $ac_status" >&5
4194  (exit $ac_status); }; }; then
4195  ac_cv_func_memmove=yes
4196else
4197  echo "$as_me: failed program was:" >&5
4198cat conftest.$ac_ext >&5
4199ac_cv_func_memmove=no
4200fi
4201rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4202fi
4203echo "$as_me:4203: result: $ac_cv_func_memmove" >&5
4204echo "${ECHO_T}$ac_cv_func_memmove" >&6
4205if test $ac_cv_func_memmove = yes; then
4206  :
4207else
4208
4209echo "$as_me:4209: checking for bcopy" >&5
4210echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
4211if test "${ac_cv_func_bcopy+set}" = set; then
4212  echo $ECHO_N "(cached) $ECHO_C" >&6
4213else
4214  cat >conftest.$ac_ext <<_ACEOF
4215#line 4215 "configure"
4216#include "confdefs.h"
4217/* System header to define __stub macros and hopefully few prototypes,
4218    which can conflict with char bcopy (); below.  */
4219#include <assert.h>
4220/* Override any gcc2 internal prototype to avoid an error.  */
4221#ifdef __cplusplus
4222extern "C"
4223#endif
4224/* We use char because int might match the return type of a gcc2
4225   builtin and then its argument prototype would still apply.  */
4226char bcopy ();
4227char (*f) ();
4228
4229int
4230main ()
4231{
4232/* The GNU C library defines this for functions which it implements
4233    to always fail with ENOSYS.  Some functions are actually named
4234    something starting with __ and the normal name is an alias.  */
4235#if defined (__stub_bcopy) || defined (__stub___bcopy)
4236choke me
4237#else
4238f = bcopy;
4239#endif
4240
4241  ;
4242  return 0;
4243}
4244_ACEOF
4245rm -f conftest.$ac_objext conftest$ac_exeext
4246if { (eval echo "$as_me:4246: \"$ac_link\"") >&5
4247  (eval $ac_link) 2>&5
4248  ac_status=$?
4249  echo "$as_me:4249: \$? = $ac_status" >&5
4250  (exit $ac_status); } &&
4251         { ac_try='test -s conftest$ac_exeext'
4252  { (eval echo "$as_me:4252: \"$ac_try\"") >&5
4253  (eval $ac_try) 2>&5
4254  ac_status=$?
4255  echo "$as_me:4255: \$? = $ac_status" >&5
4256  (exit $ac_status); }; }; then
4257  ac_cv_func_bcopy=yes
4258else
4259  echo "$as_me: failed program was:" >&5
4260cat conftest.$ac_ext >&5
4261ac_cv_func_bcopy=no
4262fi
4263rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4264fi
4265echo "$as_me:4265: result: $ac_cv_func_bcopy" >&5
4266echo "${ECHO_T}$ac_cv_func_bcopy" >&6
4267if test $ac_cv_func_bcopy = yes; then
4268
4269	echo "$as_me:4269: checking if bcopy does overlapping moves" >&5
4270echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
4271if test "${cf_cv_good_bcopy+set}" = set; then
4272  echo $ECHO_N "(cached) $ECHO_C" >&6
4273else
4274
4275		if test "$cross_compiling" = yes; then
4276  cf_cv_good_bcopy=unknown
4277else
4278  cat >conftest.$ac_ext <<_ACEOF
4279#line 4279 "configure"
4280#include "confdefs.h"
4281
4282int main() {
4283	static char data[] = "abcdefghijklmnopqrstuwwxyz";
4284	char temp[40];
4285	bcopy(data, temp, sizeof(data));
4286	bcopy(temp+10, temp, 15);
4287	bcopy(temp+5, temp+15, 10);
4288	${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
4289}
4290
4291_ACEOF
4292rm -f conftest$ac_exeext
4293if { (eval echo "$as_me:4293: \"$ac_link\"") >&5
4294  (eval $ac_link) 2>&5
4295  ac_status=$?
4296  echo "$as_me:4296: \$? = $ac_status" >&5
4297  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4298  { (eval echo "$as_me:4298: \"$ac_try\"") >&5
4299  (eval $ac_try) 2>&5
4300  ac_status=$?
4301  echo "$as_me:4301: \$? = $ac_status" >&5
4302  (exit $ac_status); }; }; then
4303  cf_cv_good_bcopy=yes
4304else
4305  echo "$as_me: program exited with status $ac_status" >&5
4306echo "$as_me: failed program was:" >&5
4307cat conftest.$ac_ext >&5
4308cf_cv_good_bcopy=no
4309fi
4310rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4311fi
4312
4313fi
4314echo "$as_me:4314: result: $cf_cv_good_bcopy" >&5
4315echo "${ECHO_T}$cf_cv_good_bcopy" >&6
4316
4317else
4318  cf_cv_good_bcopy=no
4319fi
4320
4321	if test "$cf_cv_good_bcopy" = yes ; then
4322		cat >>confdefs.h <<\EOF
4323#define USE_OK_BCOPY 1
4324EOF
4325
4326	else
4327		cat >>confdefs.h <<\EOF
4328#define USE_MY_MEMMOVE 1
4329EOF
4330
4331	fi
4332
4333fi
4334
4335for ac_header in lastlog.h paths.h
4336do
4337as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4338echo "$as_me:4338: checking for $ac_header" >&5
4339echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4340if eval "test \"\${$as_ac_Header+set}\" = set"; then
4341  echo $ECHO_N "(cached) $ECHO_C" >&6
4342else
4343  cat >conftest.$ac_ext <<_ACEOF
4344#line 4344 "configure"
4345#include "confdefs.h"
4346#include <$ac_header>
4347_ACEOF
4348if { (eval echo "$as_me:4348: \"$ac_cpp conftest.$ac_ext\"") >&5
4349  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4350  ac_status=$?
4351  egrep -v '^ *\+' conftest.er1 >conftest.err
4352  rm -f conftest.er1
4353  cat conftest.err >&5
4354  echo "$as_me:4354: \$? = $ac_status" >&5
4355  (exit $ac_status); } >/dev/null; then
4356  if test -s conftest.err; then
4357    ac_cpp_err=$ac_c_preproc_warn_flag
4358  else
4359    ac_cpp_err=
4360  fi
4361else
4362  ac_cpp_err=yes
4363fi
4364if test -z "$ac_cpp_err"; then
4365  eval "$as_ac_Header=yes"
4366else
4367  echo "$as_me: failed program was:" >&5
4368  cat conftest.$ac_ext >&5
4369  eval "$as_ac_Header=no"
4370fi
4371rm -f conftest.err conftest.$ac_ext
4372fi
4373echo "$as_me:4373: result: `eval echo '${'$as_ac_Header'}'`" >&5
4374echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4375if test `eval echo '${'$as_ac_Header'}'` = yes; then
4376  cat >>confdefs.h <<EOF
4377#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4378EOF
4379
4380fi
4381done
4382
4383echo "$as_me:4383: checking for lastlog path" >&5
4384echo $ECHO_N "checking for lastlog path... $ECHO_C" >&6
4385if test "${cf_cv_path_lastlog+set}" = set; then
4386  echo $ECHO_N "(cached) $ECHO_C" >&6
4387else
4388
4389cat >conftest.$ac_ext <<_ACEOF
4390#line 4390 "configure"
4391#include "confdefs.h"
4392
4393#include <sys/types.h>
4394#ifdef HAVE_LASTLOG_H
4395#include <lastlog.h>
4396#else
4397#ifdef HAVE_PATHS_H
4398#include <paths.h>
4399#endif
4400#endif
4401int
4402main ()
4403{
4404char *path = _PATH_LASTLOG
4405  ;
4406  return 0;
4407}
4408_ACEOF
4409rm -f conftest.$ac_objext
4410if { (eval echo "$as_me:4410: \"$ac_compile\"") >&5
4411  (eval $ac_compile) 2>&5
4412  ac_status=$?
4413  echo "$as_me:4413: \$? = $ac_status" >&5
4414  (exit $ac_status); } &&
4415         { ac_try='test -s conftest.$ac_objext'
4416  { (eval echo "$as_me:4416: \"$ac_try\"") >&5
4417  (eval $ac_try) 2>&5
4418  ac_status=$?
4419  echo "$as_me:4419: \$? = $ac_status" >&5
4420  (exit $ac_status); }; }; then
4421  cf_cv_path_lastlog="_PATH_LASTLOG"
4422else
4423  echo "$as_me: failed program was:" >&5
4424cat conftest.$ac_ext >&5
4425if test -f /usr/adm/lastlog ; then
4426	 	cf_cv_path_lastlog=/usr/adm/lastlog
4427	else
4428		cf_cv_path_lastlog=no
4429	fi
4430fi
4431rm -f conftest.$ac_objext conftest.$ac_ext
4432
4433fi
4434echo "$as_me:4434: result: $cf_cv_path_lastlog" >&5
4435echo "${ECHO_T}$cf_cv_path_lastlog" >&6
4436test $cf_cv_path_lastlog != no && cat >>confdefs.h <<\EOF
4437#define USE_LASTLOG 1
4438EOF
4439
4440echo "$as_me:4440: checking for utmp implementation" >&5
4441echo $ECHO_N "checking for utmp implementation... $ECHO_C" >&6
4442if test "${cf_cv_have_utmp+set}" = set; then
4443  echo $ECHO_N "(cached) $ECHO_C" >&6
4444else
4445
4446	cf_cv_have_utmp=no
4447for cf_header in utmpx utmp ; do
4448cf_utmp_includes="
4449#include <sys/types.h>
4450#include <${cf_header}.h>
4451#define getutent getutxent
4452#ifdef USE_LASTLOG
4453#include <lastlog.h>	/* may conflict with utmpx.h on Linux */
4454#endif
4455"
4456	cat >conftest.$ac_ext <<_ACEOF
4457#line 4457 "configure"
4458#include "confdefs.h"
4459$cf_utmp_includes
4460int
4461main ()
4462{
4463struct $cf_header x;
4464	 char *name = x.ut_name; /* utmp.h and compatible definitions */
4465
4466  ;
4467  return 0;
4468}
4469_ACEOF
4470rm -f conftest.$ac_objext
4471if { (eval echo "$as_me:4471: \"$ac_compile\"") >&5
4472  (eval $ac_compile) 2>&5
4473  ac_status=$?
4474  echo "$as_me:4474: \$? = $ac_status" >&5
4475  (exit $ac_status); } &&
4476         { ac_try='test -s conftest.$ac_objext'
4477  { (eval echo "$as_me:4477: \"$ac_try\"") >&5
4478  (eval $ac_try) 2>&5
4479  ac_status=$?
4480  echo "$as_me:4480: \$? = $ac_status" >&5
4481  (exit $ac_status); }; }; then
4482  cf_cv_have_utmp=$cf_header
4483	 break
4484else
4485  echo "$as_me: failed program was:" >&5
4486cat conftest.$ac_ext >&5
4487
4488	cat >conftest.$ac_ext <<_ACEOF
4489#line 4489 "configure"
4490#include "confdefs.h"
4491$cf_utmp_includes
4492int
4493main ()
4494{
4495struct $cf_header x;
4496	 char *name = x.ut_user; /* utmpx.h must declare this */
4497
4498  ;
4499  return 0;
4500}
4501_ACEOF
4502rm -f conftest.$ac_objext
4503if { (eval echo "$as_me:4503: \"$ac_compile\"") >&5
4504  (eval $ac_compile) 2>&5
4505  ac_status=$?
4506  echo "$as_me:4506: \$? = $ac_status" >&5
4507  (exit $ac_status); } &&
4508         { ac_try='test -s conftest.$ac_objext'
4509  { (eval echo "$as_me:4509: \"$ac_try\"") >&5
4510  (eval $ac_try) 2>&5
4511  ac_status=$?
4512  echo "$as_me:4512: \$? = $ac_status" >&5
4513  (exit $ac_status); }; }; then
4514  cf_cv_have_utmp=$cf_header
4515	 break
4516
4517else
4518  echo "$as_me: failed program was:" >&5
4519cat conftest.$ac_ext >&5
4520fi
4521rm -f conftest.$ac_objext conftest.$ac_ext
4522fi
4523rm -f conftest.$ac_objext conftest.$ac_ext
4524done
4525
4526fi
4527echo "$as_me:4527: result: $cf_cv_have_utmp" >&5
4528echo "${ECHO_T}$cf_cv_have_utmp" >&6
4529
4530if test $cf_cv_have_utmp != no ; then
4531	cat >>confdefs.h <<\EOF
4532#define HAVE_UTMP 1
4533EOF
4534
4535	test $cf_cv_have_utmp = utmpx && cat >>confdefs.h <<\EOF
4536#define UTMPX_FOR_UTMP 1
4537EOF
4538
4539if test $cf_cv_have_utmp != no ; then
4540echo "$as_me:4540: checking if ${cf_cv_have_utmp}.ut_host is declared" >&5
4541echo $ECHO_N "checking if ${cf_cv_have_utmp}.ut_host is declared... $ECHO_C" >&6
4542if test "${cf_cv_have_utmp_ut_host+set}" = set; then
4543  echo $ECHO_N "(cached) $ECHO_C" >&6
4544else
4545
4546	cat >conftest.$ac_ext <<_ACEOF
4547#line 4547 "configure"
4548#include "confdefs.h"
4549
4550#include <sys/types.h>
4551#include <${cf_cv_have_utmp}.h>
4552int
4553main ()
4554{
4555struct $cf_cv_have_utmp x; char *y = &x.ut_host[0]
4556  ;
4557  return 0;
4558}
4559_ACEOF
4560rm -f conftest.$ac_objext
4561if { (eval echo "$as_me:4561: \"$ac_compile\"") >&5
4562  (eval $ac_compile) 2>&5
4563  ac_status=$?
4564  echo "$as_me:4564: \$? = $ac_status" >&5
4565  (exit $ac_status); } &&
4566         { ac_try='test -s conftest.$ac_objext'
4567  { (eval echo "$as_me:4567: \"$ac_try\"") >&5
4568  (eval $ac_try) 2>&5
4569  ac_status=$?
4570  echo "$as_me:4570: \$? = $ac_status" >&5
4571  (exit $ac_status); }; }; then
4572  cf_cv_have_utmp_ut_host=yes
4573else
4574  echo "$as_me: failed program was:" >&5
4575cat conftest.$ac_ext >&5
4576cf_cv_have_utmp_ut_host=no
4577fi
4578rm -f conftest.$ac_objext conftest.$ac_ext
4579
4580fi
4581
4582echo "$as_me:4582: result: $cf_cv_have_utmp_ut_host" >&5
4583echo "${ECHO_T}$cf_cv_have_utmp_ut_host" >&6
4584test $cf_cv_have_utmp_ut_host != no && cat >>confdefs.h <<\EOF
4585#define HAVE_UTMP_UT_HOST 1
4586EOF
4587
4588fi
4589
4590if test $cf_cv_have_utmp != no ; then
4591echo "$as_me:4591: checking if ${cf_cv_have_utmp}.ut_syslen is declared" >&5
4592echo $ECHO_N "checking if ${cf_cv_have_utmp}.ut_syslen is declared... $ECHO_C" >&6
4593if test "${cf_cv_have_utmp_ut_syslen+set}" = set; then
4594  echo $ECHO_N "(cached) $ECHO_C" >&6
4595else
4596
4597	cat >conftest.$ac_ext <<_ACEOF
4598#line 4598 "configure"
4599#include "confdefs.h"
4600
4601#include <sys/types.h>
4602#include <${cf_cv_have_utmp}.h>
4603int
4604main ()
4605{
4606struct $cf_cv_have_utmp x; int y = x.ut_syslen
4607  ;
4608  return 0;
4609}
4610_ACEOF
4611rm -f conftest.$ac_objext
4612if { (eval echo "$as_me:4612: \"$ac_compile\"") >&5
4613  (eval $ac_compile) 2>&5
4614  ac_status=$?
4615  echo "$as_me:4615: \$? = $ac_status" >&5
4616  (exit $ac_status); } &&
4617         { ac_try='test -s conftest.$ac_objext'
4618  { (eval echo "$as_me:4618: \"$ac_try\"") >&5
4619  (eval $ac_try) 2>&5
4620  ac_status=$?
4621  echo "$as_me:4621: \$? = $ac_status" >&5
4622  (exit $ac_status); }; }; then
4623  cf_cv_have_utmp_ut_syslen=yes
4624else
4625  echo "$as_me: failed program was:" >&5
4626cat conftest.$ac_ext >&5
4627cf_cv_have_utmp_ut_syslen=no
4628fi
4629rm -f conftest.$ac_objext conftest.$ac_ext
4630
4631fi
4632
4633echo "$as_me:4633: result: $cf_cv_have_utmp_ut_syslen" >&5
4634echo "${ECHO_T}$cf_cv_have_utmp_ut_syslen" >&6
4635test $cf_cv_have_utmp_ut_syslen != no && cat >>confdefs.h <<\EOF
4636#define HAVE_UTMP_UT_SYSLEN 1
4637EOF
4638
4639fi
4640
4641if test $cf_cv_have_utmp != no ; then
4642echo "$as_me:4642: checking if ${cf_cv_have_utmp}.ut_name is declared" >&5
4643echo $ECHO_N "checking if ${cf_cv_have_utmp}.ut_name is declared... $ECHO_C" >&6
4644if test "${cf_cv_have_utmp_ut_name+set}" = set; then
4645  echo $ECHO_N "(cached) $ECHO_C" >&6
4646else
4647
4648	cf_cv_have_utmp_ut_name=no
4649cf_utmp_includes="
4650#include <sys/types.h>
4651#include <${cf_cv_have_utmp}.h>
4652#define getutent getutxent
4653#ifdef USE_LASTLOG
4654#include <lastlog.h>		/* may conflict with utmpx.h on Linux */
4655#endif
4656"
4657for cf_header in ut_name ut_user ; do
4658	cat >conftest.$ac_ext <<_ACEOF
4659#line 4659 "configure"
4660#include "confdefs.h"
4661$cf_utmp_includes
4662int
4663main ()
4664{
4665struct $cf_cv_have_utmp x;
4666	 char *name = x.$cf_header;
4667
4668  ;
4669  return 0;
4670}
4671_ACEOF
4672rm -f conftest.$ac_objext
4673if { (eval echo "$as_me:4673: \"$ac_compile\"") >&5
4674  (eval $ac_compile) 2>&5
4675  ac_status=$?
4676  echo "$as_me:4676: \$? = $ac_status" >&5
4677  (exit $ac_status); } &&
4678         { ac_try='test -s conftest.$ac_objext'
4679  { (eval echo "$as_me:4679: \"$ac_try\"") >&5
4680  (eval $ac_try) 2>&5
4681  ac_status=$?
4682  echo "$as_me:4682: \$? = $ac_status" >&5
4683  (exit $ac_status); }; }; then
4684  cf_cv_have_utmp_ut_name=$cf_header
4685	 break
4686else
4687  echo "$as_me: failed program was:" >&5
4688cat conftest.$ac_ext >&5
4689fi
4690rm -f conftest.$ac_objext conftest.$ac_ext
4691done
4692
4693fi
4694echo "$as_me:4694: result: $cf_cv_have_utmp_ut_name" >&5
4695echo "${ECHO_T}$cf_cv_have_utmp_ut_name" >&6
4696
4697case $cf_cv_have_utmp_ut_name in #(vi
4698no) #(vi
4699	{ { echo "$as_me:4699: error: Cannot find declaration for ut.ut_name" >&5
4700echo "$as_me: error: Cannot find declaration for ut.ut_name" >&2;}
4701   { (exit 1); exit 1; }; }
4702	;;
4703ut_user)
4704	cat >>confdefs.h <<\EOF
4705#define ut_name ut_user
4706EOF
4707
4708	;;
4709esac
4710fi
4711
4712if test $cf_cv_have_utmp != no ; then
4713echo "$as_me:4713: checking for exit-status in $cf_cv_have_utmp" >&5
4714echo $ECHO_N "checking for exit-status in $cf_cv_have_utmp... $ECHO_C" >&6
4715if test "${cf_cv_have_utmp_ut_xstatus+set}" = set; then
4716  echo $ECHO_N "(cached) $ECHO_C" >&6
4717else
4718
4719for cf_result in \
4720	ut_exit.__e_exit \
4721	ut_exit.e_exit \
4722	ut_exit.ut_e_exit \
4723	ut_exit.ut_exit
4724do
4725cat >conftest.$ac_ext <<_ACEOF
4726#line 4726 "configure"
4727#include "confdefs.h"
4728
4729#include <sys/types.h>
4730#include <${cf_cv_have_utmp}.h>
4731int
4732main ()
4733{
4734struct $cf_cv_have_utmp x; long y = x.$cf_result = 0
4735  ;
4736  return 0;
4737}
4738_ACEOF
4739rm -f conftest.$ac_objext
4740if { (eval echo "$as_me:4740: \"$ac_compile\"") >&5
4741  (eval $ac_compile) 2>&5
4742  ac_status=$?
4743  echo "$as_me:4743: \$? = $ac_status" >&5
4744  (exit $ac_status); } &&
4745         { ac_try='test -s conftest.$ac_objext'
4746  { (eval echo "$as_me:4746: \"$ac_try\"") >&5
4747  (eval $ac_try) 2>&5
4748  ac_status=$?
4749  echo "$as_me:4749: \$? = $ac_status" >&5
4750  (exit $ac_status); }; }; then
4751  cf_cv_have_utmp_ut_xstatus=$cf_result
4752	 break
4753else
4754  echo "$as_me: failed program was:" >&5
4755cat conftest.$ac_ext >&5
4756cf_cv_have_utmp_ut_xstatus=no
4757fi
4758rm -f conftest.$ac_objext conftest.$ac_ext
4759done
4760
4761fi
4762echo "$as_me:4762: result: $cf_cv_have_utmp_ut_xstatus" >&5
4763echo "${ECHO_T}$cf_cv_have_utmp_ut_xstatus" >&6
4764if test $cf_cv_have_utmp_ut_xstatus != no ; then
4765	cat >>confdefs.h <<\EOF
4766#define HAVE_UTMP_UT_XSTATUS 1
4767EOF
4768
4769	cat >>confdefs.h <<EOF
4770#define ut_xstatus $cf_cv_have_utmp_ut_xstatus
4771EOF
4772
4773fi
4774fi
4775
4776if test $cf_cv_have_utmp != no ; then
4777echo "$as_me:4777: checking if ${cf_cv_have_utmp}.ut_xtime is declared" >&5
4778echo $ECHO_N "checking if ${cf_cv_have_utmp}.ut_xtime is declared... $ECHO_C" >&6
4779if test "${cf_cv_have_utmp_ut_xtime+set}" = set; then
4780  echo $ECHO_N "(cached) $ECHO_C" >&6
4781else
4782
4783	cat >conftest.$ac_ext <<_ACEOF
4784#line 4784 "configure"
4785#include "confdefs.h"
4786
4787#include <sys/types.h>
4788#include <${cf_cv_have_utmp}.h>
4789int
4790main ()
4791{
4792struct $cf_cv_have_utmp x; long y = x.ut_xtime = 0
4793  ;
4794  return 0;
4795}
4796_ACEOF
4797rm -f conftest.$ac_objext
4798if { (eval echo "$as_me:4798: \"$ac_compile\"") >&5
4799  (eval $ac_compile) 2>&5
4800  ac_status=$?
4801  echo "$as_me:4801: \$? = $ac_status" >&5
4802  (exit $ac_status); } &&
4803         { ac_try='test -s conftest.$ac_objext'
4804  { (eval echo "$as_me:4804: \"$ac_try\"") >&5
4805  (eval $ac_try) 2>&5
4806  ac_status=$?
4807  echo "$as_me:4807: \$? = $ac_status" >&5
4808  (exit $ac_status); }; }; then
4809  cf_cv_have_utmp_ut_xtime=yes
4810else
4811  echo "$as_me: failed program was:" >&5
4812cat conftest.$ac_ext >&5
4813cat >conftest.$ac_ext <<_ACEOF
4814#line 4814 "configure"
4815#include "confdefs.h"
4816
4817#include <sys/types.h>
4818#include <${cf_cv_have_utmp}.h>
4819int
4820main ()
4821{
4822struct $cf_cv_have_utmp x; long y = x.ut_tv.tv_sec
4823  ;
4824  return 0;
4825}
4826_ACEOF
4827rm -f conftest.$ac_objext
4828if { (eval echo "$as_me:4828: \"$ac_compile\"") >&5
4829  (eval $ac_compile) 2>&5
4830  ac_status=$?
4831  echo "$as_me:4831: \$? = $ac_status" >&5
4832  (exit $ac_status); } &&
4833         { ac_try='test -s conftest.$ac_objext'
4834  { (eval echo "$as_me:4834: \"$ac_try\"") >&5
4835  (eval $ac_try) 2>&5
4836  ac_status=$?
4837  echo "$as_me:4837: \$? = $ac_status" >&5
4838  (exit $ac_status); }; }; then
4839  cf_cv_have_utmp_ut_xtime=define
4840else
4841  echo "$as_me: failed program was:" >&5
4842cat conftest.$ac_ext >&5
4843cf_cv_have_utmp_ut_xtime=no
4844fi
4845rm -f conftest.$ac_objext conftest.$ac_ext
4846
4847fi
4848rm -f conftest.$ac_objext conftest.$ac_ext
4849
4850fi
4851echo "$as_me:4851: result: $cf_cv_have_utmp_ut_xtime" >&5
4852echo "${ECHO_T}$cf_cv_have_utmp_ut_xtime" >&6
4853if test $cf_cv_have_utmp_ut_xtime != no ; then
4854	cat >>confdefs.h <<\EOF
4855#define HAVE_UTMP_UT_XTIME 1
4856EOF
4857
4858	if test $cf_cv_have_utmp_ut_xtime = define ; then
4859		cat >>confdefs.h <<\EOF
4860#define ut_xtime ut_tv.tv_sec
4861EOF
4862
4863	fi
4864fi
4865fi
4866
4867if test $cf_cv_have_utmp != no ; then
4868echo "$as_me:4868: checking if ${cf_cv_have_utmp}.ut_session is declared" >&5
4869echo $ECHO_N "checking if ${cf_cv_have_utmp}.ut_session is declared... $ECHO_C" >&6
4870if test "${cf_cv_have_utmp_ut_session+set}" = set; then
4871  echo $ECHO_N "(cached) $ECHO_C" >&6
4872else
4873
4874	cat >conftest.$ac_ext <<_ACEOF
4875#line 4875 "configure"
4876#include "confdefs.h"
4877
4878#include <sys/types.h>
4879#include <${cf_cv_have_utmp}.h>
4880int
4881main ()
4882{
4883struct $cf_cv_have_utmp x; long y = x.ut_session
4884  ;
4885  return 0;
4886}
4887_ACEOF
4888rm -f conftest.$ac_objext
4889if { (eval echo "$as_me:4889: \"$ac_compile\"") >&5
4890  (eval $ac_compile) 2>&5
4891  ac_status=$?
4892  echo "$as_me:4892: \$? = $ac_status" >&5
4893  (exit $ac_status); } &&
4894         { ac_try='test -s conftest.$ac_objext'
4895  { (eval echo "$as_me:4895: \"$ac_try\"") >&5
4896  (eval $ac_try) 2>&5
4897  ac_status=$?
4898  echo "$as_me:4898: \$? = $ac_status" >&5
4899  (exit $ac_status); }; }; then
4900  cf_cv_have_utmp_ut_session=yes
4901else
4902  echo "$as_me: failed program was:" >&5
4903cat conftest.$ac_ext >&5
4904cf_cv_have_utmp_ut_session=no
4905fi
4906rm -f conftest.$ac_objext conftest.$ac_ext
4907
4908fi
4909echo "$as_me:4909: result: $cf_cv_have_utmp_ut_session" >&5
4910echo "${ECHO_T}$cf_cv_have_utmp_ut_session" >&6
4911if test $cf_cv_have_utmp_ut_session != no ; then
4912	cat >>confdefs.h <<\EOF
4913#define HAVE_UTMP_UT_SESSION 1
4914EOF
4915
4916fi
4917fi
4918
4919echo "$as_me:4919: checking if $cf_cv_have_utmp is SYSV flavor" >&5
4920echo $ECHO_N "checking if $cf_cv_have_utmp is SYSV flavor... $ECHO_C" >&6
4921if test "${cf_cv_sysv_utmp+set}" = set; then
4922  echo $ECHO_N "(cached) $ECHO_C" >&6
4923else
4924
4925test "$cf_cv_have_utmp" = "utmp" && cf_prefix="ut" || cf_prefix="utx"
4926cat >conftest.$ac_ext <<_ACEOF
4927#line 4927 "configure"
4928#include "confdefs.h"
4929
4930#include <sys/types.h>
4931#include <${cf_cv_have_utmp}.h>
4932int
4933main ()
4934{
4935
4936struct $cf_cv_have_utmp x;
4937	set${cf_prefix}ent ();
4938	get${cf_prefix}id(&x);
4939	put${cf_prefix}line(&x);
4940	end${cf_prefix}ent();
4941  ;
4942  return 0;
4943}
4944_ACEOF
4945rm -f conftest.$ac_objext conftest$ac_exeext
4946if { (eval echo "$as_me:4946: \"$ac_link\"") >&5
4947  (eval $ac_link) 2>&5
4948  ac_status=$?
4949  echo "$as_me:4949: \$? = $ac_status" >&5
4950  (exit $ac_status); } &&
4951         { ac_try='test -s conftest$ac_exeext'
4952  { (eval echo "$as_me:4952: \"$ac_try\"") >&5
4953  (eval $ac_try) 2>&5
4954  ac_status=$?
4955  echo "$as_me:4955: \$? = $ac_status" >&5
4956  (exit $ac_status); }; }; then
4957  cf_cv_sysv_utmp=yes
4958else
4959  echo "$as_me: failed program was:" >&5
4960cat conftest.$ac_ext >&5
4961cf_cv_sysv_utmp=no
4962fi
4963rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4964
4965fi
4966echo "$as_me:4966: result: $cf_cv_sysv_utmp" >&5
4967echo "${ECHO_T}$cf_cv_sysv_utmp" >&6
4968test $cf_cv_sysv_utmp = yes && cat >>confdefs.h <<\EOF
4969#define USE_SYSV_UTMP 1
4970EOF
4971
4972fi
4973
4974for ac_header in lastlog.h
4975do
4976as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4977echo "$as_me:4977: checking for $ac_header" >&5
4978echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4979if eval "test \"\${$as_ac_Header+set}\" = set"; then
4980  echo $ECHO_N "(cached) $ECHO_C" >&6
4981else
4982  cat >conftest.$ac_ext <<_ACEOF
4983#line 4983 "configure"
4984#include "confdefs.h"
4985#include <$ac_header>
4986_ACEOF
4987if { (eval echo "$as_me:4987: \"$ac_cpp conftest.$ac_ext\"") >&5
4988  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4989  ac_status=$?
4990  egrep -v '^ *\+' conftest.er1 >conftest.err
4991  rm -f conftest.er1
4992  cat conftest.err >&5
4993  echo "$as_me:4993: \$? = $ac_status" >&5
4994  (exit $ac_status); } >/dev/null; then
4995  if test -s conftest.err; then
4996    ac_cpp_err=$ac_c_preproc_warn_flag
4997  else
4998    ac_cpp_err=
4999  fi
5000else
5001  ac_cpp_err=yes
5002fi
5003if test -z "$ac_cpp_err"; then
5004  eval "$as_ac_Header=yes"
5005else
5006  echo "$as_me: failed program was:" >&5
5007  cat conftest.$ac_ext >&5
5008  eval "$as_ac_Header=no"
5009fi
5010rm -f conftest.err conftest.$ac_ext
5011fi
5012echo "$as_me:5012: result: `eval echo '${'$as_ac_Header'}'`" >&5
5013echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5014if test `eval echo '${'$as_ac_Header'}'` = yes; then
5015  cat >>confdefs.h <<EOF
5016#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5017EOF
5018
5019fi
5020done
5021
5022echo "$as_me:5022: checking for struct lastlog" >&5
5023echo $ECHO_N "checking for struct lastlog... $ECHO_C" >&6
5024if test "${cf_cv_struct_lastlog+set}" = set; then
5025  echo $ECHO_N "(cached) $ECHO_C" >&6
5026else
5027
5028if test "$cross_compiling" = yes; then
5029
5030cf_cv_struct_lastlog=unknown
5031else
5032  cat >conftest.$ac_ext <<_ACEOF
5033#line 5033 "configure"
5034#include "confdefs.h"
5035
5036#include <sys/types.h>
5037#include <time.h>
5038#include <lastlog.h>
5039
5040int main()
5041{
5042	struct lastlog data;
5043	return (sizeof(data.ll_time) != sizeof(time_t));
5044}
5045_ACEOF
5046rm -f conftest$ac_exeext
5047if { (eval echo "$as_me:5047: \"$ac_link\"") >&5
5048  (eval $ac_link) 2>&5
5049  ac_status=$?
5050  echo "$as_me:5050: \$? = $ac_status" >&5
5051  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5052  { (eval echo "$as_me:5052: \"$ac_try\"") >&5
5053  (eval $ac_try) 2>&5
5054  ac_status=$?
5055  echo "$as_me:5055: \$? = $ac_status" >&5
5056  (exit $ac_status); }; }; then
5057
5058cf_cv_struct_lastlog=yes
5059else
5060  echo "$as_me: program exited with status $ac_status" >&5
5061echo "$as_me: failed program was:" >&5
5062cat conftest.$ac_ext >&5
5063
5064cf_cv_struct_lastlog=no
5065fi
5066rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5067fi
5068fi
5069echo "$as_me:5069: result: $cf_cv_struct_lastlog" >&5
5070echo "${ECHO_T}$cf_cv_struct_lastlog" >&6
5071
5072test $cf_cv_struct_lastlog != no && cat >>confdefs.h <<\EOF
5073#define USE_STRUCT_LASTLOG 1
5074EOF
5075
5076for ac_header in \
5077sys/param.h \
5078
5079do
5080as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5081echo "$as_me:5081: checking for $ac_header" >&5
5082echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5083if eval "test \"\${$as_ac_Header+set}\" = set"; then
5084  echo $ECHO_N "(cached) $ECHO_C" >&6
5085else
5086  cat >conftest.$ac_ext <<_ACEOF
5087#line 5087 "configure"
5088#include "confdefs.h"
5089#include <$ac_header>
5090_ACEOF
5091if { (eval echo "$as_me:5091: \"$ac_cpp conftest.$ac_ext\"") >&5
5092  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5093  ac_status=$?
5094  egrep -v '^ *\+' conftest.er1 >conftest.err
5095  rm -f conftest.er1
5096  cat conftest.err >&5
5097  echo "$as_me:5097: \$? = $ac_status" >&5
5098  (exit $ac_status); } >/dev/null; then
5099  if test -s conftest.err; then
5100    ac_cpp_err=$ac_c_preproc_warn_flag
5101  else
5102    ac_cpp_err=
5103  fi
5104else
5105  ac_cpp_err=yes
5106fi
5107if test -z "$ac_cpp_err"; then
5108  eval "$as_ac_Header=yes"
5109else
5110  echo "$as_me: failed program was:" >&5
5111  cat conftest.$ac_ext >&5
5112  eval "$as_ac_Header=no"
5113fi
5114rm -f conftest.err conftest.$ac_ext
5115fi
5116echo "$as_me:5116: result: `eval echo '${'$as_ac_Header'}'`" >&5
5117echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5118if test `eval echo '${'$as_ac_Header'}'` = yes; then
5119  cat >>confdefs.h <<EOF
5120#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5121EOF
5122
5123fi
5124done
5125
5126echo "$as_me:5126: checking if POSIX saved-ids are supported" >&5
5127echo $ECHO_N "checking if POSIX saved-ids are supported... $ECHO_C" >&6
5128if test "${cf_cv_posix_saved_ids+set}" = set; then
5129  echo $ECHO_N "(cached) $ECHO_C" >&6
5130else
5131
5132cat >conftest.$ac_ext <<_ACEOF
5133#line 5133 "configure"
5134#include "confdefs.h"
5135
5136#include <unistd.h>
5137#ifdef HAVE_SYS_PARAM_H
5138#include <sys/param.h>		/* this may define "BSD" */
5139#endif
5140
5141int
5142main ()
5143{
5144
5145#if defined(_POSIX_SAVED_IDS) && (_POSIX_SAVED_IDS > 0)
5146	void *p = (void *) seteuid;
5147	int x = seteuid(geteuid());
5148#elif defined(BSD) && (BSD >= 199103)
5149/* The BSD's may implement the runtime check - and it fails.
5150 * However, saved-ids work almost like POSIX (close enough for most uses).
5151 */
5152#else
5153make an error
5154#endif
5155
5156  ;
5157  return 0;
5158}
5159_ACEOF
5160rm -f conftest.$ac_objext conftest$ac_exeext
5161if { (eval echo "$as_me:5161: \"$ac_link\"") >&5
5162  (eval $ac_link) 2>&5
5163  ac_status=$?
5164  echo "$as_me:5164: \$? = $ac_status" >&5
5165  (exit $ac_status); } &&
5166         { ac_try='test -s conftest$ac_exeext'
5167  { (eval echo "$as_me:5167: \"$ac_try\"") >&5
5168  (eval $ac_try) 2>&5
5169  ac_status=$?
5170  echo "$as_me:5170: \$? = $ac_status" >&5
5171  (exit $ac_status); }; }; then
5172  cf_cv_posix_saved_ids=yes
5173
5174else
5175  echo "$as_me: failed program was:" >&5
5176cat conftest.$ac_ext >&5
5177
5178if test "$cross_compiling" = yes; then
5179  cf_cv_posix_saved_ids=unknown
5180else
5181  cat >conftest.$ac_ext <<_ACEOF
5182#line 5182 "configure"
5183#include "confdefs.h"
5184
5185#ifdef HAVE_STDLIB_H
5186#include <stdlib.h>
5187#endif
5188#include <unistd.h>
5189int main()
5190{
5191	void *p = (void *) seteuid;
5192	long code = sysconf(_SC_SAVED_IDS);
5193	${cf_cv_main_return:-return}  ((code > 0) ? 0 : 1);
5194}
5195_ACEOF
5196rm -f conftest$ac_exeext
5197if { (eval echo "$as_me:5197: \"$ac_link\"") >&5
5198  (eval $ac_link) 2>&5
5199  ac_status=$?
5200  echo "$as_me:5200: \$? = $ac_status" >&5
5201  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5202  { (eval echo "$as_me:5202: \"$ac_try\"") >&5
5203  (eval $ac_try) 2>&5
5204  ac_status=$?
5205  echo "$as_me:5205: \$? = $ac_status" >&5
5206  (exit $ac_status); }; }; then
5207  cf_cv_posix_saved_ids=yes
5208else
5209  echo "$as_me: program exited with status $ac_status" >&5
5210echo "$as_me: failed program was:" >&5
5211cat conftest.$ac_ext >&5
5212cf_cv_posix_saved_ids=no
5213fi
5214rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5215fi
5216
5217fi
5218rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5219
5220fi
5221echo "$as_me:5221: result: $cf_cv_posix_saved_ids" >&5
5222echo "${ECHO_T}$cf_cv_posix_saved_ids" >&6
5223
5224test "$cf_cv_posix_saved_ids" = yes && cat >>confdefs.h <<\EOF
5225#define HAVE_POSIX_SAVED_IDS 1
5226EOF
5227
5228# compute a reasonable value for $TERM to give tgetent(), since we may be
5229# running in 'screen', which sets $TERMCAP to a specific entry that is not
5230# necessarily in /etc/termcap - unsetenv is not portable, so we cannot simply
5231# discard $TERMCAP.
5232cf_TERMVAR=vt100
5233test -n "$TERMCAP" && cf_TERMVAR="$TERM"
5234test -z "$cf_TERMVAR" && cf_TERMVAR=vt100
5235
5236echo "$as_me:5236: checking if we want full tgetent function" >&5
5237echo $ECHO_N "checking if we want full tgetent function... $ECHO_C" >&6
5238
5239# Check whether --enable-full-tgetent or --disable-full-tgetent was given.
5240if test "${enable_full_tgetent+set}" = set; then
5241  enableval="$enable_full_tgetent"
5242  test "$enableval" != no && enableval=yes
5243  if test "$enableval" != "yes" ; then
5244    cf_full_tgetent=no
5245  else
5246    cf_full_tgetent=yes
5247  fi
5248else
5249  enableval=yes
5250  cf_full_tgetent=yes
5251
5252fi;
5253echo "$as_me:5253: result: $cf_full_tgetent" >&5
5254echo "${ECHO_T}$cf_full_tgetent" >&6
5255
5256if test "$cf_full_tgetent" = yes ; then
5257	cf_test_message="full tgetent"
5258else
5259	cf_test_message="tgetent"
5260fi
5261
5262echo "$as_me:5262: checking for $cf_test_message function" >&5
5263echo $ECHO_N "checking for $cf_test_message function... $ECHO_C" >&6
5264if test "${cf_cv_lib_tgetent+set}" = set; then
5265  echo $ECHO_N "(cached) $ECHO_C" >&6
5266else
5267
5268cf_save_LIBS="$LIBS"
5269cf_cv_lib_tgetent=no
5270if test "$cf_full_tgetent" = yes ; then
5271	cf_TERMLIB="termcap termlib ncurses curses"
5272	cf_TERMTST="buffer[0] == 0"
5273else
5274	cf_TERMLIB="termlib ncurses curses"
5275	cf_TERMTST="0"
5276fi
5277for cf_termlib in '' $cf_TERMLIB ; do
5278	LIBS="$cf_save_LIBS"
5279	test -n "$cf_termlib" && LIBS="$LIBS -l$cf_termlib"
5280	if test "$cross_compiling" = yes; then
5281  echo "cross-compiling, cannot verify if a termcap/tgetent is present in $cf_termlib" 1>&5
5282else
5283  cat >conftest.$ac_ext <<_ACEOF
5284#line 5284 "configure"
5285#include "confdefs.h"
5286
5287/* terminfo implementations ignore the buffer argument, making it useless for
5288 * the xterm application, which uses this information to make a new TERMCAP
5289 * environment variable.
5290 */
5291int main()
5292{
5293	char buffer[1024];
5294	buffer[0] = 0;
5295	tgetent(buffer, "$cf_TERMVAR");
5296	${cf_cv_main_return:-return} ($cf_TERMTST); }
5297_ACEOF
5298rm -f conftest$ac_exeext
5299if { (eval echo "$as_me:5299: \"$ac_link\"") >&5
5300  (eval $ac_link) 2>&5
5301  ac_status=$?
5302  echo "$as_me:5302: \$? = $ac_status" >&5
5303  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5304  { (eval echo "$as_me:5304: \"$ac_try\"") >&5
5305  (eval $ac_try) 2>&5
5306  ac_status=$?
5307  echo "$as_me:5307: \$? = $ac_status" >&5
5308  (exit $ac_status); }; }; then
5309  echo "yes, there is a termcap/tgetent in $cf_termlib" 1>&5
5310	 if test -n "$cf_termlib" ; then
5311	 	cf_cv_lib_tgetent="-l$cf_termlib"
5312	 else
5313	 	cf_cv_lib_tgetent=yes
5314	 fi
5315	 break
5316else
5317  echo "$as_me: program exited with status $ac_status" >&5
5318echo "$as_me: failed program was:" >&5
5319cat conftest.$ac_ext >&5
5320echo "no, there is no termcap/tgetent in $cf_termlib" 1>&5
5321fi
5322rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5323fi
5324done
5325LIBS="$cf_save_LIBS"
5326
5327fi
5328echo "$as_me:5328: result: $cf_cv_lib_tgetent" >&5
5329echo "${ECHO_T}$cf_cv_lib_tgetent" >&6
5330
5331# If we found a working tgetent(), set LIBS and check for termcap.h.
5332# (LIBS cannot be set inside AC_CACHE_CHECK; the commands there should
5333# not have side effects other than setting the cache variable, because
5334# they are not executed when a cached value exists.)
5335if test "$cf_cv_lib_tgetent" != no ; then
5336	test "$cf_cv_lib_tgetent" != yes && LIBS="$LIBS $cf_cv_lib_tgetent"
5337	cat >>confdefs.h <<\EOF
5338#define USE_TERMCAP 1
5339EOF
5340
5341	cat >conftest.$ac_ext <<_ACEOF
5342#line 5342 "configure"
5343#include "confdefs.h"
5344
5345#include <termcap.h>
5346int
5347main ()
5348{
5349
5350#ifdef NCURSES_VERSION
5351make an error
5352#endif
5353  ;
5354  return 0;
5355}
5356_ACEOF
5357rm -f conftest.$ac_objext
5358if { (eval echo "$as_me:5358: \"$ac_compile\"") >&5
5359  (eval $ac_compile) 2>&5
5360  ac_status=$?
5361  echo "$as_me:5361: \$? = $ac_status" >&5
5362  (exit $ac_status); } &&
5363         { ac_try='test -s conftest.$ac_objext'
5364  { (eval echo "$as_me:5364: \"$ac_try\"") >&5
5365  (eval $ac_try) 2>&5
5366  ac_status=$?
5367  echo "$as_me:5367: \$? = $ac_status" >&5
5368  (exit $ac_status); }; }; then
5369  cat >>confdefs.h <<\EOF
5370#define HAVE_TERMCAP_H 1
5371EOF
5372
5373else
5374  echo "$as_me: failed program was:" >&5
5375cat conftest.$ac_ext >&5
5376fi
5377rm -f conftest.$ac_objext conftest.$ac_ext
5378else
5379        # If we didn't find a tgetent() that supports the buffer
5380        # argument, look again to see whether we can find even
5381        # a crippled one.  A crippled tgetent() is still useful to
5382        # validate values for the TERM environment variable given to
5383        # child processes.
5384	echo "$as_me:5384: checking for partial tgetent function" >&5
5385echo $ECHO_N "checking for partial tgetent function... $ECHO_C" >&6
5386if test "${cf_cv_lib_part_tgetent+set}" = set; then
5387  echo $ECHO_N "(cached) $ECHO_C" >&6
5388else
5389
5390	cf_cv_lib_part_tgetent=no
5391	for cf_termlib in $cf_TERMLIB ; do
5392		LIBS="$cf_save_LIBS -l$cf_termlib"
5393		cat >conftest.$ac_ext <<_ACEOF
5394#line 5394 "configure"
5395#include "confdefs.h"
5396
5397int
5398main ()
5399{
5400tgetent(0, "$cf_TERMVAR")
5401  ;
5402  return 0;
5403}
5404_ACEOF
5405rm -f conftest.$ac_objext conftest$ac_exeext
5406if { (eval echo "$as_me:5406: \"$ac_link\"") >&5
5407  (eval $ac_link) 2>&5
5408  ac_status=$?
5409  echo "$as_me:5409: \$? = $ac_status" >&5
5410  (exit $ac_status); } &&
5411         { ac_try='test -s conftest$ac_exeext'
5412  { (eval echo "$as_me:5412: \"$ac_try\"") >&5
5413  (eval $ac_try) 2>&5
5414  ac_status=$?
5415  echo "$as_me:5415: \$? = $ac_status" >&5
5416  (exit $ac_status); }; }; then
5417  echo "there is a terminfo/tgetent in $cf_termlib" 1>&5
5418			 cf_cv_lib_part_tgetent="-l$cf_termlib"
5419			 break
5420else
5421  echo "$as_me: failed program was:" >&5
5422cat conftest.$ac_ext >&5
5423fi
5424rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5425	done
5426	LIBS="$cf_save_LIBS"
5427
5428fi
5429echo "$as_me:5429: result: $cf_cv_lib_part_tgetent" >&5
5430echo "${ECHO_T}$cf_cv_lib_part_tgetent" >&6
5431
5432	if test "$cf_cv_lib_part_tgetent" != no ; then
5433		LIBS="$LIBS $cf_cv_lib_part_tgetent"
5434
5435for ac_header in termcap.h
5436do
5437as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5438echo "$as_me:5438: checking for $ac_header" >&5
5439echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5440if eval "test \"\${$as_ac_Header+set}\" = set"; then
5441  echo $ECHO_N "(cached) $ECHO_C" >&6
5442else
5443  cat >conftest.$ac_ext <<_ACEOF
5444#line 5444 "configure"
5445#include "confdefs.h"
5446#include <$ac_header>
5447_ACEOF
5448if { (eval echo "$as_me:5448: \"$ac_cpp conftest.$ac_ext\"") >&5
5449  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5450  ac_status=$?
5451  egrep -v '^ *\+' conftest.er1 >conftest.err
5452  rm -f conftest.er1
5453  cat conftest.err >&5
5454  echo "$as_me:5454: \$? = $ac_status" >&5
5455  (exit $ac_status); } >/dev/null; then
5456  if test -s conftest.err; then
5457    ac_cpp_err=$ac_c_preproc_warn_flag
5458  else
5459    ac_cpp_err=
5460  fi
5461else
5462  ac_cpp_err=yes
5463fi
5464if test -z "$ac_cpp_err"; then
5465  eval "$as_ac_Header=yes"
5466else
5467  echo "$as_me: failed program was:" >&5
5468  cat conftest.$ac_ext >&5
5469  eval "$as_ac_Header=no"
5470fi
5471rm -f conftest.err conftest.$ac_ext
5472fi
5473echo "$as_me:5473: result: `eval echo '${'$as_ac_Header'}'`" >&5
5474echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5475if test `eval echo '${'$as_ac_Header'}'` = yes; then
5476  cat >>confdefs.h <<EOF
5477#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5478EOF
5479
5480fi
5481done
5482
5483                # If this is linking against ncurses, we'll trigger the
5484                # ifdef in resize.c that turns the termcap stuff back off.
5485		cat >>confdefs.h <<\EOF
5486#define USE_TERMINFO 1
5487EOF
5488
5489	fi
5490fi
5491
5492echo "$as_me:5492: checking for directory to install resource files" >&5
5493echo $ECHO_N "checking for directory to install resource files... $ECHO_C" >&6
5494
5495# Check whether --with-app-defaults or --without-app-defaults was given.
5496if test "${with_app_defaults+set}" = set; then
5497  withval="$with_app_defaults"
5498
5499else
5500  withval="${appsdir-'\$(exec_prefix)/lib/X11/app-defaults'}"
5501fi; if test -n "'\$(exec_prefix)/lib/X11/app-defaults'" ; then
5502
5503if test "x$prefix" != xNONE; then
5504  cf_path_syntax="$prefix"
5505else
5506  cf_path_syntax="$ac_default_prefix"
5507fi
5508
5509case ".$withval" in #(vi
5510.\$\(*\)*|.\'*\'*) #(vi
5511  ;;
5512..|./*|.\\*) #(vi
5513  ;;
5514.[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
5515  ;;
5516.\${*prefix}*) #(vi
5517  eval withval="$withval"
5518  case ".$withval" in #(vi
5519  .NONE/*)
5520    withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
5521    ;;
5522  esac
5523  ;; #(vi
5524.no|.NONE/*)
5525  withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
5526  ;;
5527*)
5528  { { echo "$as_me:5528: error: expected a pathname, not \"$withval\"" >&5
5529echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
5530   { (exit 1); exit 1; }; }
5531  ;;
5532esac
5533
5534fi
5535appsdir="$withval"
5536
5537echo "$as_me:5537: result: $appsdir" >&5
5538echo "${ECHO_T}$appsdir" >&6
5539
5540no_appsdir=
5541test "$appsdir" = no && no_appsdir="#"
5542
5543echo "$as_me:5543: checking for directory to install icons" >&5
5544echo $ECHO_N "checking for directory to install icons... $ECHO_C" >&6
5545
5546# Check whether --with-icondir or --without-icondir was given.
5547if test "${with_icondir+set}" = set; then
5548  withval="$with_icondir"
5549
5550else
5551  withval="${icondir-'\$(exec_prefix)/share/pixmaps'}"
5552fi; if test -n "'\$(exec_prefix)/share/pixmaps'" ; then
5553
5554if test "x$prefix" != xNONE; then
5555  cf_path_syntax="$prefix"
5556else
5557  cf_path_syntax="$ac_default_prefix"
5558fi
5559
5560case ".$withval" in #(vi
5561.\$\(*\)*|.\'*\'*) #(vi
5562  ;;
5563..|./*|.\\*) #(vi
5564  ;;
5565.[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
5566  ;;
5567.\${*prefix}*) #(vi
5568  eval withval="$withval"
5569  case ".$withval" in #(vi
5570  .NONE/*)
5571    withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
5572    ;;
5573  esac
5574  ;; #(vi
5575.no|.NONE/*)
5576  withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
5577  ;;
5578*)
5579  { { echo "$as_me:5579: error: expected a pathname, not \"$withval\"" >&5
5580echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
5581   { (exit 1); exit 1; }; }
5582  ;;
5583esac
5584
5585fi
5586icondir="$withval"
5587
5588echo "$as_me:5588: result: $icondir" >&5
5589echo "${ECHO_T}$icondir" >&6
5590
5591no_icondir=
5592test "$icondir" = no && no_icondir="#"
5593
5594# Comment-out the install-desktop rule if the desktop-utils are not found.
5595echo "$as_me:5595: checking if you want to install desktop files" >&5
5596echo $ECHO_N "checking if you want to install desktop files... $ECHO_C" >&6
5597
5598# Check whether --enable-desktop or --disable-desktop was given.
5599if test "${enable_desktop+set}" = set; then
5600  enableval="$enable_desktop"
5601  test "$enableval" != no && enableval=yes
5602  if test "$enableval" != "yes" ; then
5603    enable_desktop=$enableval
5604  else
5605    enable_desktop=$enableval
5606  fi
5607else
5608  enableval=yes
5609  enable_desktop=$enableval
5610
5611fi;
5612echo "$as_me:5612: result: $enable_desktop" >&5
5613echo "${ECHO_T}$enable_desktop" >&6
5614
5615desktop_utils=
5616if test "$enable_desktop" = yes ; then
5617# Extract the first word of "desktop-file-install", so it can be a program name with args.
5618set dummy desktop-file-install; ac_word=$2
5619echo "$as_me:5619: checking for $ac_word" >&5
5620echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5621if test "${ac_cv_prog_desktop_utils+set}" = set; then
5622  echo $ECHO_N "(cached) $ECHO_C" >&6
5623else
5624  if test -n "$desktop_utils"; then
5625  ac_cv_prog_desktop_utils="$desktop_utils" # Let the user override the test.
5626else
5627  ac_save_IFS=$IFS; IFS=$ac_path_separator
5628ac_dummy="$PATH"
5629for ac_dir in $ac_dummy; do
5630  IFS=$ac_save_IFS
5631  test -z "$ac_dir" && ac_dir=.
5632  $as_executable_p "$ac_dir/$ac_word" || continue
5633ac_cv_prog_desktop_utils="yes"
5634echo "$as_me:5634: found $ac_dir/$ac_word" >&5
5635break
5636done
5637
5638  test -z "$ac_cv_prog_desktop_utils" && ac_cv_prog_desktop_utils="no"
5639fi
5640fi
5641desktop_utils=$ac_cv_prog_desktop_utils
5642if test -n "$desktop_utils"; then
5643  echo "$as_me:5643: result: $desktop_utils" >&5
5644echo "${ECHO_T}$desktop_utils" >&6
5645else
5646  echo "$as_me:5646: result: no" >&5
5647echo "${ECHO_T}no" >&6
5648fi
5649
5650fi
5651
5652test "$desktop_utils" = yes && desktop_utils= || desktop_utils="#"
5653
5654# inherit SINSTALL_OPTS from environment to allow packager to customize it.
5655
5656echo "$as_me:5656: checking for install-permissions reference" >&5
5657echo $ECHO_N "checking for install-permissions reference... $ECHO_C" >&6
5658
5659# Check whether --with-reference or --without-reference was given.
5660if test "${with_reference+set}" = set; then
5661  withval="$with_reference"
5662  with_reference=$withval
5663else
5664  with_reference=xterm
5665fi;
5666echo "$as_me:5666: result: $with_reference" >&5
5667echo "${ECHO_T}$with_reference" >&6
5668
5669with_full_paths=yes
5670
5671test -z "$XTERM_PATH" && XTERM_PATH=$with_reference
5672for ac_prog in $XTERM_PATH $with_reference
5673do
5674  # Extract the first word of "$ac_prog", so it can be a program name with args.
5675set dummy $ac_prog; ac_word=$2
5676echo "$as_me:5676: checking for $ac_word" >&5
5677echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5678if test "${ac_cv_path_XTERM_PATH+set}" = set; then
5679  echo $ECHO_N "(cached) $ECHO_C" >&6
5680else
5681  case $XTERM_PATH in
5682  [\\/]* | ?:[\\/]*)
5683  ac_cv_path_XTERM_PATH="$XTERM_PATH" # Let the user override the test with a path.
5684  ;;
5685  *)
5686  ac_save_IFS=$IFS; IFS=$ac_path_separator
5687ac_dummy="$PATH"
5688for ac_dir in $ac_dummy; do
5689  IFS=$ac_save_IFS
5690  test -z "$ac_dir" && ac_dir=.
5691  if $as_executable_p "$ac_dir/$ac_word"; then
5692   ac_cv_path_XTERM_PATH="$ac_dir/$ac_word"
5693   echo "$as_me:5693: found $ac_dir/$ac_word" >&5
5694   break
5695fi
5696done
5697
5698  ;;
5699esac
5700fi
5701XTERM_PATH=$ac_cv_path_XTERM_PATH
5702
5703if test -n "$XTERM_PATH"; then
5704  echo "$as_me:5704: result: $XTERM_PATH" >&5
5705echo "${ECHO_T}$XTERM_PATH" >&6
5706else
5707  echo "$as_me:5707: result: no" >&5
5708echo "${ECHO_T}no" >&6
5709fi
5710
5711  test -n "$XTERM_PATH" && break
5712done
5713test -n "$XTERM_PATH" || XTERM_PATH="$XTERM_PATH"
5714
5715cf_path_prog=""
5716cf_path_args=""
5717IFS="${IFS= 	}"; cf_save_ifs="$IFS"
5718case $host_os in #(vi
5719os2*) #(vi
5720	IFS="${IFS};"
5721	;;
5722*)
5723	IFS="${IFS}:"
5724	;;
5725esac
5726
5727for cf_temp in $ac_cv_path_XTERM_PATH
5728do
5729	if test -z "$cf_path_prog" ; then
5730		if test "$with_full_paths" = yes ; then
5731
5732if test "x$prefix" != xNONE; then
5733  cf_path_syntax="$prefix"
5734else
5735  cf_path_syntax="$ac_default_prefix"
5736fi
5737
5738case ".$cf_temp" in #(vi
5739.\$\(*\)*|.\'*\'*) #(vi
5740  ;;
5741..|./*|.\\*) #(vi
5742  ;;
5743.[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
5744  ;;
5745.\${*prefix}*) #(vi
5746  eval cf_temp="$cf_temp"
5747  case ".$cf_temp" in #(vi
5748  .NONE/*)
5749    cf_temp=`echo $cf_temp | sed -e s%NONE%$cf_path_syntax%`
5750    ;;
5751  esac
5752  ;; #(vi
5753.no|.NONE/*)
5754  cf_temp=`echo $cf_temp | sed -e s%NONE%$cf_path_syntax%`
5755  ;;
5756*)
5757  break
5758  ;;
5759esac
5760
5761			cf_path_prog="$cf_temp"
5762		else
5763			cf_path_prog="`basename $cf_temp`"
5764		fi
5765	elif test -z "$cf_path_args" ; then
5766		cf_path_args="$cf_temp"
5767	else
5768		cf_path_args="$cf_path_args $cf_temp"
5769	fi
5770done
5771IFS="$cf_save_ifs"
5772
5773if test -n "$cf_path_prog" ; then
5774
5775echo "${as_me-configure}:5775: testing defining path for ${cf_path_prog} ..." 1>&5
5776
5777	cat >>confdefs.h <<EOF
5778#define XTERM_PATH_PATH "$cf_path_prog"
5779EOF
5780
5781	test -n "$cf_path_args" && cat >>confdefs.h <<EOF
5782#define XTERM_PATH_ARGS "$cf_path_args"
5783EOF
5784
5785fi
5786
5787# If any of --program-prefix, --program-suffix or --program-transform-name is
5788# given, accept an option tell the makefile to create a symbolic link, e.g.,
5789# to "xterm" on install.
5790XTERM_SYMLINK=NONE
5791
5792if test "$program_transform_name" != "'s,,,'" ; then
5793cf_name=`echo "$program_transform_name" | sed -e 's,\\$\\$,$,g'`
5794cf_name=`echo xterm |sed -e "$cf_name"`
5795echo "$as_me:5795: checking for symbolic link to create to $cf_name" >&5
5796echo $ECHO_N "checking for symbolic link to create to $cf_name... $ECHO_C" >&6
5797
5798# Check whether --with-xterm-symlink or --without-xterm-symlink was given.
5799if test "${with_xterm_symlink+set}" = set; then
5800  withval="$with_xterm_symlink"
5801  with_symlink=$withval
5802else
5803  with_symlink=xterm
5804fi;
5805echo "$as_me:5805: result: $with_symlink" >&5
5806echo "${ECHO_T}$with_symlink" >&6
5807test "$with_symlink" = yes && with_symlink=xterm
5808test -n "$with_symlink" && \
5809	test "$with_symlink" != no && \
5810	test "$with_symlink" != $cf_name && \
5811	XTERM_SYMLINK="$with_symlink"
5812fi
5813
5814echo "$as_me:5814: checking if you want to disable setuid" >&5
5815echo $ECHO_N "checking if you want to disable setuid... $ECHO_C" >&6
5816
5817# Check whether --enable-setuid or --disable-setuid was given.
5818if test "${enable_setuid+set}" = set; then
5819  enableval="$enable_setuid"
5820  test "$enableval" != no && enableval=yes
5821  if test "$enableval" != "yes" ; then
5822    disable_setuid=yes
5823  else
5824    disable_setuid=no
5825  fi
5826else
5827  enableval=yes
5828  disable_setuid=no
5829
5830fi;
5831echo "$as_me:5831: result: $disable_setuid" >&5
5832echo "${ECHO_T}$disable_setuid" >&6
5833
5834echo "$as_me:5834: checking if you want to disable setgid" >&5
5835echo $ECHO_N "checking if you want to disable setgid... $ECHO_C" >&6
5836
5837# Check whether --enable-setgid or --disable-setgid was given.
5838if test "${enable_setgid+set}" = set; then
5839  enableval="$enable_setgid"
5840  test "$enableval" != no && enableval=yes
5841  if test "$enableval" != "yes" ; then
5842    disable_setgid=yes
5843  else
5844    disable_setgid=no
5845  fi
5846else
5847  enableval=yes
5848  disable_setgid=no
5849
5850fi;
5851echo "$as_me:5851: result: $disable_setgid" >&5
5852echo "${ECHO_T}$disable_setgid" >&6
5853
5854echo "$as_me:5854: checking if you want to run xterm setuid to a given user" >&5
5855echo $ECHO_N "checking if you want to run xterm setuid to a given user... $ECHO_C" >&6
5856
5857# Check whether --with-setuid or --without-setuid was given.
5858if test "${with_setuid+set}" = set; then
5859  withval="$with_setuid"
5860  use_given_setuid=$withval
5861else
5862  use_given_setuid=no
5863fi;
5864echo "$as_me:5864: result: $use_given_setuid" >&5
5865echo "${ECHO_T}$use_given_setuid" >&6
5866
5867if test "$use_given_setuid" != no ; then
5868	if test "$use_given_setuid" = yes ; then
5869		cf_cv_given_setuid=root
5870	else
5871		cf_cv_given_setuid=$use_given_setuid
5872	fi
5873	SINSTALL_OPTS="$SINSTALL_OPTS u+s -u $cf_cv_given_setuid"
5874fi
5875
5876echo "$as_me:5876: checking if you want to run xterm setgid to match utmp/utmpx file" >&5
5877echo $ECHO_N "checking if you want to run xterm setgid to match utmp/utmpx file... $ECHO_C" >&6
5878
5879# Check whether --with-utmp-setgid or --without-utmp-setgid was given.
5880if test "${with_utmp_setgid+set}" = set; then
5881  withval="$with_utmp_setgid"
5882  use_utmp_setgid=$withval
5883else
5884  use_utmp_setgid=no
5885fi;
5886echo "$as_me:5886: result: $use_utmp_setgid" >&5
5887echo "${ECHO_T}$use_utmp_setgid" >&6
5888
5889if test "$use_utmp_setgid" != no ; then
5890	if test "$use_utmp_setgid" = yes ; then
5891
5892if test $cf_cv_have_utmp != no ; then
5893echo "$as_me:5893: checking for utmp/utmpx group" >&5
5894echo $ECHO_N "checking for utmp/utmpx group... $ECHO_C" >&6
5895if test "${cf_cv_utmp_group+set}" = set; then
5896  echo $ECHO_N "(cached) $ECHO_C" >&6
5897else
5898
5899for cf_utmp_path in /var/adm /var/run
5900do
5901	for cf_utmp_file in utmpx utmp
5902	do
5903		if test -f $cf_utmp_path/$cf_utmp_file
5904		then
5905			cf_cv_utmp_group=root
5906
5907			cf_option="-l -L"
5908
5909			# Expect listing to have fields like this:
5910			#-r--r--r--   1 user      group       34293 Jul 18 16:29 pathname
5911			ls $cf_option $cf_utmp_path/$cf_utmp_file >conftest
5912			read cf_mode cf_links cf_usr cf_grp cf_size cf_date1 cf_date2 cf_date3 cf_rest <conftest
5913			if test -z "$cf_rest" ; then
5914				cf_option="$cf_option -g"
5915				ls $cf_option $cf_utmp_path/$cf_utmp_file >conftest
5916				read cf_mode cf_links cf_usr cf_grp cf_size cf_date1 cf_date2 cf_date3 cf_rest <conftest
5917			fi
5918			rm -f conftest
5919
5920			# If we have a pathname, and the date fields look right, assume we've
5921			# captured the group as well.
5922			if test -n "$cf_rest" ; then
5923				cf_test=`echo "${cf_date2}${cf_date3}" | sed -e 's/[0-9:]//g'`
5924				if test -z "$cf_test" ; then
5925					cf_cv_utmp_group=$cf_grp;
5926				fi
5927			fi
5928			break
5929		fi
5930	done
5931	test -n "$cf_cv_utmp_group" && break
5932done
5933
5934fi
5935echo "$as_me:5935: result: $cf_cv_utmp_group" >&5
5936echo "${ECHO_T}$cf_cv_utmp_group" >&6
5937else
5938	{ { echo "$as_me:5938: error: cannot find utmp group" >&5
5939echo "$as_me: error: cannot find utmp group" >&2;}
5940   { (exit 1); exit 1; }; }
5941fi
5942
5943	else
5944		cf_cv_utmp_group=$use_utmp_setgid
5945	fi
5946	if test "$cf_cv_posix_saved_ids" != yes ; then
5947		{ { echo "$as_me:5947: error: Your system does not support POSIX saved-ids" >&5
5948echo "$as_me: error: Your system does not support POSIX saved-ids" >&2;}
5949   { (exit 1); exit 1; }; }
5950	fi
5951	cat >>confdefs.h <<\EOF
5952#define USE_UTMP_SETGID 1
5953EOF
5954
5955	SINSTALL_OPTS="$SINSTALL_OPTS g+s -g $cf_cv_utmp_group"
5956fi
5957
5958echo "$as_me:5958: checking if you want to link with utempter" >&5
5959echo $ECHO_N "checking if you want to link with utempter... $ECHO_C" >&6
5960
5961# Check whether --with-utempter or --without-utempter was given.
5962if test "${with_utempter+set}" = set; then
5963  withval="$with_utempter"
5964  use_utempter=$withval
5965else
5966  use_utempter=no
5967fi;
5968echo "$as_me:5968: result: $use_utempter" >&5
5969echo "${ECHO_T}$use_utempter" >&6
5970
5971if test "$use_utempter" = yes ; then
5972
5973echo "$as_me:5973: checking if we can link with utempter library" >&5
5974echo $ECHO_N "checking if we can link with utempter library... $ECHO_C" >&6
5975if test "${cf_cv_have_utempter+set}" = set; then
5976  echo $ECHO_N "(cached) $ECHO_C" >&6
5977else
5978
5979cf_save_LIBS="$LIBS"
5980LIBS="-lutempter $LIBS"
5981cat >conftest.$ac_ext <<_ACEOF
5982#line 5982 "configure"
5983#include "confdefs.h"
5984
5985#include <utempter.h>
5986
5987int
5988main ()
5989{
5990
5991	addToUtmp("/dev/tty", 0, 1);
5992	removeFromUtmp();
5993
5994  ;
5995  return 0;
5996}
5997_ACEOF
5998rm -f conftest.$ac_objext conftest$ac_exeext
5999if { (eval echo "$as_me:5999: \"$ac_link\"") >&5
6000  (eval $ac_link) 2>&5
6001  ac_status=$?
6002  echo "$as_me:6002: \$? = $ac_status" >&5
6003  (exit $ac_status); } &&
6004         { ac_try='test -s conftest$ac_exeext'
6005  { (eval echo "$as_me:6005: \"$ac_try\"") >&5
6006  (eval $ac_try) 2>&5
6007  ac_status=$?
6008  echo "$as_me:6008: \$? = $ac_status" >&5
6009  (exit $ac_status); }; }; then
6010
6011	cf_cv_have_utempter=yes
6012else
6013  echo "$as_me: failed program was:" >&5
6014cat conftest.$ac_ext >&5
6015
6016	cf_cv_have_utempter=no
6017fi
6018rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6019LIBS="$cf_save_LIBS"
6020
6021fi
6022echo "$as_me:6022: result: $cf_cv_have_utempter" >&5
6023echo "${ECHO_T}$cf_cv_have_utempter" >&6
6024if test "$cf_cv_have_utempter" = yes ; then
6025	cat >>confdefs.h <<\EOF
6026#define USE_UTEMPTER 1
6027EOF
6028
6029	LIBS="-lutempter $LIBS"
6030fi
6031
6032	test "$cf_cv_have_utempter" != yes && use_utempter=no
6033else
6034	use_utempter=no
6035fi
6036
6037# Some configurations permit (or require) either setuid or setgid mode.
6038# Let the user decide.
6039if test "$use_utempter" = yes ; then
6040	if test "${enable_setuid+set}" != set ; then
6041		disable_setuid=yes
6042		test -n "$verbose" && echo "	No --disable-setuid option given, force to yes" 1>&6
6043
6044echo "${as_me-configure}:6044: testing No --disable-setuid option given, force to yes ..." 1>&5
6045
6046	fi
6047fi
6048
6049###	checks for external data
6050
6051echo "$as_me:6051: checking if external errno is declared" >&5
6052echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
6053if test "${cf_cv_dcl_errno+set}" = set; then
6054  echo $ECHO_N "(cached) $ECHO_C" >&6
6055else
6056
6057    cat >conftest.$ac_ext <<_ACEOF
6058#line 6058 "configure"
6059#include "confdefs.h"
6060
6061#ifdef HAVE_STDLIB_H
6062#include <stdlib.h>
6063#endif
6064#include <stdio.h>
6065#include <sys/types.h>
6066#include <errno.h>
6067int
6068main ()
6069{
6070long x = (long) errno
6071  ;
6072  return 0;
6073}
6074_ACEOF
6075rm -f conftest.$ac_objext
6076if { (eval echo "$as_me:6076: \"$ac_compile\"") >&5
6077  (eval $ac_compile) 2>&5
6078  ac_status=$?
6079  echo "$as_me:6079: \$? = $ac_status" >&5
6080  (exit $ac_status); } &&
6081         { ac_try='test -s conftest.$ac_objext'
6082  { (eval echo "$as_me:6082: \"$ac_try\"") >&5
6083  (eval $ac_try) 2>&5
6084  ac_status=$?
6085  echo "$as_me:6085: \$? = $ac_status" >&5
6086  (exit $ac_status); }; }; then
6087  cf_cv_dcl_errno=yes
6088else
6089  echo "$as_me: failed program was:" >&5
6090cat conftest.$ac_ext >&5
6091cf_cv_dcl_errno=no
6092fi
6093rm -f conftest.$ac_objext conftest.$ac_ext
6094
6095fi
6096echo "$as_me:6096: result: $cf_cv_dcl_errno" >&5
6097echo "${ECHO_T}$cf_cv_dcl_errno" >&6
6098
6099if test "$cf_cv_dcl_errno" = no ; then
6100
6101cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
6102
6103    cat >>confdefs.h <<EOF
6104#define $cf_result 1
6105EOF
6106
6107fi
6108
6109# It's possible (for near-UNIX clones) that the data doesn't exist
6110
6111echo "$as_me:6111: checking if external errno exists" >&5
6112echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
6113if test "${cf_cv_have_errno+set}" = set; then
6114  echo $ECHO_N "(cached) $ECHO_C" >&6
6115else
6116
6117    cat >conftest.$ac_ext <<_ACEOF
6118#line 6118 "configure"
6119#include "confdefs.h"
6120
6121#undef errno
6122extern int errno;
6123
6124int
6125main ()
6126{
6127errno = 2
6128  ;
6129  return 0;
6130}
6131_ACEOF
6132rm -f conftest.$ac_objext conftest$ac_exeext
6133if { (eval echo "$as_me:6133: \"$ac_link\"") >&5
6134  (eval $ac_link) 2>&5
6135  ac_status=$?
6136  echo "$as_me:6136: \$? = $ac_status" >&5
6137  (exit $ac_status); } &&
6138         { ac_try='test -s conftest$ac_exeext'
6139  { (eval echo "$as_me:6139: \"$ac_try\"") >&5
6140  (eval $ac_try) 2>&5
6141  ac_status=$?
6142  echo "$as_me:6142: \$? = $ac_status" >&5
6143  (exit $ac_status); }; }; then
6144  cf_cv_have_errno=yes
6145else
6146  echo "$as_me: failed program was:" >&5
6147cat conftest.$ac_ext >&5
6148cf_cv_have_errno=no
6149fi
6150rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6151
6152fi
6153echo "$as_me:6153: result: $cf_cv_have_errno" >&5
6154echo "${ECHO_T}$cf_cv_have_errno" >&6
6155
6156if test "$cf_cv_have_errno" = yes ; then
6157
6158cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
6159
6160    cat >>confdefs.h <<EOF
6161#define $cf_result 1
6162EOF
6163
6164fi
6165
6166echo "$as_me:6166: checking for explicit tty group name" >&5
6167echo $ECHO_N "checking for explicit tty group name... $ECHO_C" >&6
6168
6169# Check whether --with-tty-group or --without-tty-group was given.
6170if test "${with_tty_group+set}" = set; then
6171  withval="$with_tty_group"
6172  cf_tty_group=$withval
6173else
6174  cf_tty_group=auto...
6175fi;
6176test -z "$cf_tty_group"    && cf_tty_group=auto...
6177test "$cf_tty_group" = yes && cf_tty_group=auto...
6178echo "$as_me:6178: result: $cf_tty_group" >&5
6179echo "${ECHO_T}$cf_tty_group" >&6
6180
6181if test "$cf_tty_group" = "auto..." ; then
6182echo "$as_me:6182: checking for tty group name" >&5
6183echo $ECHO_N "checking for tty group name... $ECHO_C" >&6
6184if test "${cf_cv_tty_group_name+set}" = set; then
6185  echo $ECHO_N "(cached) $ECHO_C" >&6
6186else
6187
6188# If we are configuring as root, it is hard to get a clue about the tty group.
6189# But we'll guess based on how our connection is set up - assuming it is done
6190# properly.
6191
6192cf_uid=`id | sed -e 's/^^=*=//' -e 's/(.*$//'`
6193# )vi
6194if test "$cf_uid" != 0 ; then
6195cf_cv_tty_group_name=
6196cf_tty_name=`tty`
6197test "$cf_tty_name" = "not a tty" && cf_tty_name=/dev/tty
6198test -z "$cf_tty_name" && cf_tty_name=/dev/tty
6199if test -c "$cf_tty_name"
6200then
6201	cf_option="-l -L"
6202
6203	# Expect listing to have fields like this:
6204	#-rwxrwxrwx   1 user      group       34293 Jul 18 16:29 pathname
6205	ls $cf_option $cf_tty_name >conftest.out
6206	read cf_mode cf_links cf_usr cf_grp cf_size cf_date1 cf_date2 cf_date3 cf_rest <conftest.out
6207	if test -z "$cf_rest" ; then
6208		cf_option="$cf_option -g"
6209		ls $cf_option $cf_tty_name >conftest.out
6210		read cf_mode cf_links cf_usr cf_grp cf_size cf_date1 cf_date2 cf_date3 cf_rest <conftest.out
6211	fi
6212	rm -f conftest.out
6213	cf_cv_tty_group_name=$cf_grp
6214fi
6215fi
6216
6217# If we cannot deduce the tty group, fall back on hardcoded cases
6218
6219if test -z "$cf_cv_tty_group_name"
6220then
6221case $host_os in #(vi
6222osf*) #(vi
6223	cf_cv_tty_group_name="terminal"
6224	;;
6225*)
6226	cf_cv_tty_group_name="unknown"
6227	if ( egrep '^tty:' /etc/group 2>/dev/null 1>/dev/null ) then
6228		cf_cv_tty_group_name="tty"
6229	fi
6230	;;
6231esac
6232fi
6233
6234fi
6235echo "$as_me:6235: result: $cf_cv_tty_group_name" >&5
6236echo "${ECHO_T}$cf_cv_tty_group_name" >&6
6237cf_tty_group="$cf_cv_tty_group_name"
6238else
6239	# if configure option, always do this
6240	cat >>confdefs.h <<\EOF
6241#define USE_TTY_GROUP 1
6242EOF
6243
6244fi
6245
6246cat >>confdefs.h <<EOF
6247#define TTY_GROUP_NAME "$cf_tty_group"
6248EOF
6249
6250# This is only a double-check that the group-name we obtained above really
6251# does apply to the device.  We cannot perform this test if we are in batch
6252# mode, or if we are cross-compiling.
6253
6254echo "$as_me:6254: checking if we may use the $cf_tty_group group" >&5
6255echo $ECHO_N "checking if we may use the $cf_tty_group group... $ECHO_C" >&6
6256if test "${cf_cv_tty_group+set}" = set; then
6257  echo $ECHO_N "(cached) $ECHO_C" >&6
6258else
6259
6260cf_tty_name=`tty`
6261if test "$cf_tty_name" != "not a tty"
6262then
6263if test "$cross_compiling" = yes; then
6264  cf_cv_tty_group=unknown
6265else
6266  cat >conftest.$ac_ext <<_ACEOF
6267#line 6267 "configure"
6268#include "confdefs.h"
6269
6270#include <unistd.h>
6271#include <sys/types.h>
6272#include <sys/stat.h>
6273#include <grp.h>
6274int main()
6275{
6276	struct stat sb;
6277	struct group *ttygrp = getgrnam(TTY_GROUP_NAME);
6278	char *name = ttyname(0);
6279
6280	endgrent();
6281	if (ttygrp != 0
6282	 && name != 0
6283	 && stat(name, &sb) == 0
6284	 && sb.st_gid != getgid()
6285	 && sb.st_gid == ttygrp->gr_gid) {
6286		${cf_cv_main_return:-return} (0);
6287	}
6288	${cf_cv_main_return:-return} (1);
6289}
6290
6291_ACEOF
6292rm -f conftest$ac_exeext
6293if { (eval echo "$as_me:6293: \"$ac_link\"") >&5
6294  (eval $ac_link) 2>&5
6295  ac_status=$?
6296  echo "$as_me:6296: \$? = $ac_status" >&5
6297  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6298  { (eval echo "$as_me:6298: \"$ac_try\"") >&5
6299  (eval $ac_try) 2>&5
6300  ac_status=$?
6301  echo "$as_me:6301: \$? = $ac_status" >&5
6302  (exit $ac_status); }; }; then
6303  cf_cv_tty_group=yes
6304else
6305  echo "$as_me: program exited with status $ac_status" >&5
6306echo "$as_me: failed program was:" >&5
6307cat conftest.$ac_ext >&5
6308cf_cv_tty_group=no
6309fi
6310rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6311fi
6312elif test "$cross_compiling" = yes; then
6313	cf_cv_tty_group=unknown
6314else
6315	cf_cv_tty_group=yes
6316fi
6317
6318fi
6319echo "$as_me:6319: result: $cf_cv_tty_group" >&5
6320echo "${ECHO_T}$cf_cv_tty_group" >&6
6321
6322if test $cf_cv_tty_group = no ; then
6323	{ echo "$as_me:6323: WARNING: Cannot use $cf_tty_group group" >&5
6324echo "$as_me: WARNING: Cannot use $cf_tty_group group" >&2;}
6325else
6326	cat >>confdefs.h <<\EOF
6327#define USE_TTY_GROUP 1
6328EOF
6329
6330fi
6331
6332###	checks for system services and user specified options
6333
6334echo "$as_me:6334: checking for sys/wait.h that is POSIX.1 compatible" >&5
6335echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6
6336if test "${ac_cv_header_sys_wait_h+set}" = set; then
6337  echo $ECHO_N "(cached) $ECHO_C" >&6
6338else
6339  cat >conftest.$ac_ext <<_ACEOF
6340#line 6340 "configure"
6341#include "confdefs.h"
6342#include <sys/types.h>
6343#include <sys/wait.h>
6344#ifndef WEXITSTATUS
6345# define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
6346#endif
6347#ifndef WIFEXITED
6348# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
6349#endif
6350
6351int
6352main ()
6353{
6354  int s;
6355  wait (&s);
6356  s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
6357  ;
6358  return 0;
6359}
6360_ACEOF
6361rm -f conftest.$ac_objext
6362if { (eval echo "$as_me:6362: \"$ac_compile\"") >&5
6363  (eval $ac_compile) 2>&5
6364  ac_status=$?
6365  echo "$as_me:6365: \$? = $ac_status" >&5
6366  (exit $ac_status); } &&
6367         { ac_try='test -s conftest.$ac_objext'
6368  { (eval echo "$as_me:6368: \"$ac_try\"") >&5
6369  (eval $ac_try) 2>&5
6370  ac_status=$?
6371  echo "$as_me:6371: \$? = $ac_status" >&5
6372  (exit $ac_status); }; }; then
6373  ac_cv_header_sys_wait_h=yes
6374else
6375  echo "$as_me: failed program was:" >&5
6376cat conftest.$ac_ext >&5
6377ac_cv_header_sys_wait_h=no
6378fi
6379rm -f conftest.$ac_objext conftest.$ac_ext
6380fi
6381echo "$as_me:6381: result: $ac_cv_header_sys_wait_h" >&5
6382echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6
6383if test $ac_cv_header_sys_wait_h = yes; then
6384
6385cat >>confdefs.h <<\EOF
6386#define HAVE_SYS_WAIT_H 1
6387EOF
6388
6389fi
6390
6391echo "$as_me:6391: checking for POSIX wait functions" >&5
6392echo $ECHO_N "checking for POSIX wait functions... $ECHO_C" >&6
6393if test "${cf_cv_posix_wait+set}" = set; then
6394  echo $ECHO_N "(cached) $ECHO_C" >&6
6395else
6396
6397cat >conftest.$ac_ext <<_ACEOF
6398#line 6398 "configure"
6399#include "confdefs.h"
6400
6401#include <stdlib.h>
6402#include <stdio.h>
6403#include <sys/types.h>
6404#ifdef HAVE_SYS_WAIT_H
6405#include <sys/wait.h>
6406#endif
6407
6408int
6409main ()
6410{
6411
6412	int stat_loc;
6413	pid_t pid = waitpid(-1, &stat_loc, WNOHANG|WUNTRACED);
6414	pid_t pid2 = wait(&stat_loc);
6415
6416  ;
6417  return 0;
6418}
6419_ACEOF
6420rm -f conftest.$ac_objext conftest$ac_exeext
6421if { (eval echo "$as_me:6421: \"$ac_link\"") >&5
6422  (eval $ac_link) 2>&5
6423  ac_status=$?
6424  echo "$as_me:6424: \$? = $ac_status" >&5
6425  (exit $ac_status); } &&
6426         { ac_try='test -s conftest$ac_exeext'
6427  { (eval echo "$as_me:6427: \"$ac_try\"") >&5
6428  (eval $ac_try) 2>&5
6429  ac_status=$?
6430  echo "$as_me:6430: \$? = $ac_status" >&5
6431  (exit $ac_status); }; }; then
6432  cf_cv_posix_wait=yes
6433else
6434  echo "$as_me: failed program was:" >&5
6435cat conftest.$ac_ext >&5
6436cf_cv_posix_wait=no
6437fi
6438rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6439
6440fi
6441echo "$as_me:6441: result: $cf_cv_posix_wait" >&5
6442echo "${ECHO_T}$cf_cv_posix_wait" >&6
6443test "$cf_cv_posix_wait" = yes && cat >>confdefs.h <<\EOF
6444#define USE_POSIX_WAIT 1
6445EOF
6446
6447echo "$as_me:6447: checking if external sys_nerr is declared" >&5
6448echo $ECHO_N "checking if external sys_nerr is declared... $ECHO_C" >&6
6449if test "${cf_cv_dcl_sys_nerr+set}" = set; then
6450  echo $ECHO_N "(cached) $ECHO_C" >&6
6451else
6452
6453    cat >conftest.$ac_ext <<_ACEOF
6454#line 6454 "configure"
6455#include "confdefs.h"
6456
6457#ifdef HAVE_STDLIB_H
6458#include <stdlib.h>
6459#endif
6460#include <stdio.h>
6461#include <sys/types.h>
6462#include <errno.h>
6463int
6464main ()
6465{
6466long x = (long) sys_nerr
6467  ;
6468  return 0;
6469}
6470_ACEOF
6471rm -f conftest.$ac_objext
6472if { (eval echo "$as_me:6472: \"$ac_compile\"") >&5
6473  (eval $ac_compile) 2>&5
6474  ac_status=$?
6475  echo "$as_me:6475: \$? = $ac_status" >&5
6476  (exit $ac_status); } &&
6477         { ac_try='test -s conftest.$ac_objext'
6478  { (eval echo "$as_me:6478: \"$ac_try\"") >&5
6479  (eval $ac_try) 2>&5
6480  ac_status=$?
6481  echo "$as_me:6481: \$? = $ac_status" >&5
6482  (exit $ac_status); }; }; then
6483  cf_cv_dcl_sys_nerr=yes
6484else
6485  echo "$as_me: failed program was:" >&5
6486cat conftest.$ac_ext >&5
6487cf_cv_dcl_sys_nerr=no
6488fi
6489rm -f conftest.$ac_objext conftest.$ac_ext
6490
6491fi
6492echo "$as_me:6492: result: $cf_cv_dcl_sys_nerr" >&5
6493echo "${ECHO_T}$cf_cv_dcl_sys_nerr" >&6
6494
6495if test "$cf_cv_dcl_sys_nerr" = no ; then
6496
6497cf_result=`echo "decl_sys_nerr" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
6498
6499    cat >>confdefs.h <<EOF
6500#define $cf_result 1
6501EOF
6502
6503fi
6504
6505# It's possible (for near-UNIX clones) that the data doesn't exist
6506
6507echo "$as_me:6507: checking if external sys_nerr exists" >&5
6508echo $ECHO_N "checking if external sys_nerr exists... $ECHO_C" >&6
6509if test "${cf_cv_have_sys_nerr+set}" = set; then
6510  echo $ECHO_N "(cached) $ECHO_C" >&6
6511else
6512
6513    cat >conftest.$ac_ext <<_ACEOF
6514#line 6514 "configure"
6515#include "confdefs.h"
6516
6517#undef sys_nerr
6518extern int sys_nerr;
6519
6520int
6521main ()
6522{
6523sys_nerr = 2
6524  ;
6525  return 0;
6526}
6527_ACEOF
6528rm -f conftest.$ac_objext conftest$ac_exeext
6529if { (eval echo "$as_me:6529: \"$ac_link\"") >&5
6530  (eval $ac_link) 2>&5
6531  ac_status=$?
6532  echo "$as_me:6532: \$? = $ac_status" >&5
6533  (exit $ac_status); } &&
6534         { ac_try='test -s conftest$ac_exeext'
6535  { (eval echo "$as_me:6535: \"$ac_try\"") >&5
6536  (eval $ac_try) 2>&5
6537  ac_status=$?
6538  echo "$as_me:6538: \$? = $ac_status" >&5
6539  (exit $ac_status); }; }; then
6540  cf_cv_have_sys_nerr=yes
6541else
6542  echo "$as_me: failed program was:" >&5
6543cat conftest.$ac_ext >&5
6544cf_cv_have_sys_nerr=no
6545fi
6546rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6547
6548fi
6549echo "$as_me:6549: result: $cf_cv_have_sys_nerr" >&5
6550echo "${ECHO_T}$cf_cv_have_sys_nerr" >&6
6551
6552if test "$cf_cv_have_sys_nerr" = yes ; then
6553
6554cf_result=`echo "have_sys_nerr" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
6555
6556    cat >>confdefs.h <<EOF
6557#define $cf_result 1
6558EOF
6559
6560fi
6561
6562echo "$as_me:6562: checking if external sys_errlist is declared" >&5
6563echo $ECHO_N "checking if external sys_errlist is declared... $ECHO_C" >&6
6564if test "${cf_cv_dcl_sys_errlist+set}" = set; then
6565  echo $ECHO_N "(cached) $ECHO_C" >&6
6566else
6567
6568    cat >conftest.$ac_ext <<_ACEOF
6569#line 6569 "configure"
6570#include "confdefs.h"
6571
6572#ifdef HAVE_STDLIB_H
6573#include <stdlib.h>
6574#endif
6575#include <stdio.h>
6576#include <sys/types.h>
6577#include <errno.h>
6578int
6579main ()
6580{
6581long x = (long) sys_errlist
6582  ;
6583  return 0;
6584}
6585_ACEOF
6586rm -f conftest.$ac_objext
6587if { (eval echo "$as_me:6587: \"$ac_compile\"") >&5
6588  (eval $ac_compile) 2>&5
6589  ac_status=$?
6590  echo "$as_me:6590: \$? = $ac_status" >&5
6591  (exit $ac_status); } &&
6592         { ac_try='test -s conftest.$ac_objext'
6593  { (eval echo "$as_me:6593: \"$ac_try\"") >&5
6594  (eval $ac_try) 2>&5
6595  ac_status=$?
6596  echo "$as_me:6596: \$? = $ac_status" >&5
6597  (exit $ac_status); }; }; then
6598  cf_cv_dcl_sys_errlist=yes
6599else
6600  echo "$as_me: failed program was:" >&5
6601cat conftest.$ac_ext >&5
6602cf_cv_dcl_sys_errlist=no
6603fi
6604rm -f conftest.$ac_objext conftest.$ac_ext
6605
6606fi
6607echo "$as_me:6607: result: $cf_cv_dcl_sys_errlist" >&5
6608echo "${ECHO_T}$cf_cv_dcl_sys_errlist" >&6
6609
6610if test "$cf_cv_dcl_sys_errlist" = no ; then
6611
6612cf_result=`echo "decl_sys_errlist" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
6613
6614    cat >>confdefs.h <<EOF
6615#define $cf_result 1
6616EOF
6617
6618fi
6619
6620# It's possible (for near-UNIX clones) that the data doesn't exist
6621
6622echo "$as_me:6622: checking if external sys_errlist exists" >&5
6623echo $ECHO_N "checking if external sys_errlist exists... $ECHO_C" >&6
6624if test "${cf_cv_have_sys_errlist+set}" = set; then
6625  echo $ECHO_N "(cached) $ECHO_C" >&6
6626else
6627
6628    cat >conftest.$ac_ext <<_ACEOF
6629#line 6629 "configure"
6630#include "confdefs.h"
6631
6632#undef sys_errlist
6633extern int sys_errlist;
6634
6635int
6636main ()
6637{
6638sys_errlist = 2
6639  ;
6640  return 0;
6641}
6642_ACEOF
6643rm -f conftest.$ac_objext conftest$ac_exeext
6644if { (eval echo "$as_me:6644: \"$ac_link\"") >&5
6645  (eval $ac_link) 2>&5
6646  ac_status=$?
6647  echo "$as_me:6647: \$? = $ac_status" >&5
6648  (exit $ac_status); } &&
6649         { ac_try='test -s conftest$ac_exeext'
6650  { (eval echo "$as_me:6650: \"$ac_try\"") >&5
6651  (eval $ac_try) 2>&5
6652  ac_status=$?
6653  echo "$as_me:6653: \$? = $ac_status" >&5
6654  (exit $ac_status); }; }; then
6655  cf_cv_have_sys_errlist=yes
6656else
6657  echo "$as_me: failed program was:" >&5
6658cat conftest.$ac_ext >&5
6659cf_cv_have_sys_errlist=no
6660fi
6661rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6662
6663fi
6664echo "$as_me:6664: result: $cf_cv_have_sys_errlist" >&5
6665echo "${ECHO_T}$cf_cv_have_sys_errlist" >&6
6666
6667if test "$cf_cv_have_sys_errlist" = yes ; then
6668
6669cf_result=`echo "have_sys_errlist" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
6670
6671    cat >>confdefs.h <<EOF
6672#define $cf_result 1
6673EOF
6674
6675fi
6676
6677for ac_header in \
6678termios.h \
6679stdlib.h \
6680X11/Intrinsic.h \
6681
6682do
6683as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6684echo "$as_me:6684: checking for $ac_header" >&5
6685echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6686if eval "test \"\${$as_ac_Header+set}\" = set"; then
6687  echo $ECHO_N "(cached) $ECHO_C" >&6
6688else
6689  cat >conftest.$ac_ext <<_ACEOF
6690#line 6690 "configure"
6691#include "confdefs.h"
6692#include <$ac_header>
6693_ACEOF
6694if { (eval echo "$as_me:6694: \"$ac_cpp conftest.$ac_ext\"") >&5
6695  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6696  ac_status=$?
6697  egrep -v '^ *\+' conftest.er1 >conftest.err
6698  rm -f conftest.er1
6699  cat conftest.err >&5
6700  echo "$as_me:6700: \$? = $ac_status" >&5
6701  (exit $ac_status); } >/dev/null; then
6702  if test -s conftest.err; then
6703    ac_cpp_err=$ac_c_preproc_warn_flag
6704  else
6705    ac_cpp_err=
6706  fi
6707else
6708  ac_cpp_err=yes
6709fi
6710if test -z "$ac_cpp_err"; then
6711  eval "$as_ac_Header=yes"
6712else
6713  echo "$as_me: failed program was:" >&5
6714  cat conftest.$ac_ext >&5
6715  eval "$as_ac_Header=no"
6716fi
6717rm -f conftest.err conftest.$ac_ext
6718fi
6719echo "$as_me:6719: result: `eval echo '${'$as_ac_Header'}'`" >&5
6720echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
6721if test `eval echo '${'$as_ac_Header'}'` = yes; then
6722  cat >>confdefs.h <<EOF
6723#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6724EOF
6725
6726fi
6727done
6728
6729echo "$as_me:6729: checking if we should define SYSV" >&5
6730echo $ECHO_N "checking if we should define SYSV... $ECHO_C" >&6
6731if test "${cf_cv_sysv+set}" = set; then
6732  echo $ECHO_N "(cached) $ECHO_C" >&6
6733else
6734
6735cat >conftest.$ac_ext <<_ACEOF
6736#line 6736 "configure"
6737#include "confdefs.h"
6738
6739#undef  SYSV
6740#define SYSV 1			/* get Xos.h to declare sys_errlist[] */
6741#ifdef HAVE_STDLIB_H
6742#include <stdlib.h>		/* look for wchar_t */
6743#endif
6744#ifdef HAVE_X11_INTRINSIC_H
6745#include <X11/Intrinsic.h>	/* Intrinsic.h has other traps... */
6746#endif
6747#ifdef HAVE_TERMIOS_H		/* needed for HPUX 10.20 */
6748#include <termios.h>
6749#define STRUCT_TERMIOS struct termios
6750#else
6751#define STRUCT_TERMIOS struct termio
6752#endif
6753#include <curses.h>
6754#include <term.h>		/* eliminate most BSD hacks */
6755#include <errno.h>		/* declare sys_errlist on older systems */
6756#include <sys/termio.h>		/* eliminate most of the remaining ones */
6757
6758int
6759main ()
6760{
6761
6762static STRUCT_TERMIOS d_tio;
6763	d_tio.c_cc[VINTR] = 0;
6764	d_tio.c_cc[VQUIT] = 0;
6765	d_tio.c_cc[VERASE] = 0;
6766	d_tio.c_cc[VKILL] = 0;
6767	d_tio.c_cc[VEOF] = 0;
6768	d_tio.c_cc[VEOL] = 0;
6769	d_tio.c_cc[VMIN] = 0;
6770	d_tio.c_cc[VTIME] = 0;
6771#if defined(HAVE_SYS_ERRLIST) && !defined(DECL_SYS_ERRLIST)
6772sys_errlist[0] = "";		/* Cygwin mis-declares this */
6773#endif
6774
6775  ;
6776  return 0;
6777}
6778_ACEOF
6779rm -f conftest.$ac_objext
6780if { (eval echo "$as_me:6780: \"$ac_compile\"") >&5
6781  (eval $ac_compile) 2>&5
6782  ac_status=$?
6783  echo "$as_me:6783: \$? = $ac_status" >&5
6784  (exit $ac_status); } &&
6785         { ac_try='test -s conftest.$ac_objext'
6786  { (eval echo "$as_me:6786: \"$ac_try\"") >&5
6787  (eval $ac_try) 2>&5
6788  ac_status=$?
6789  echo "$as_me:6789: \$? = $ac_status" >&5
6790  (exit $ac_status); }; }; then
6791  cf_cv_sysv=yes
6792else
6793  echo "$as_me: failed program was:" >&5
6794cat conftest.$ac_ext >&5
6795cf_cv_sysv=no
6796fi
6797rm -f conftest.$ac_objext conftest.$ac_ext
6798
6799fi
6800echo "$as_me:6800: result: $cf_cv_sysv" >&5
6801echo "${ECHO_T}$cf_cv_sysv" >&6
6802test "$cf_cv_sysv" = yes && cat >>confdefs.h <<\EOF
6803#define SYSV 1
6804EOF
6805
6806echo "$as_me:6806: checking for elf_begin in -lelf" >&5
6807echo $ECHO_N "checking for elf_begin in -lelf... $ECHO_C" >&6
6808if test "${ac_cv_lib_elf_elf_begin+set}" = set; then
6809  echo $ECHO_N "(cached) $ECHO_C" >&6
6810else
6811  ac_check_lib_save_LIBS=$LIBS
6812LIBS="-lelf  $LIBS"
6813cat >conftest.$ac_ext <<_ACEOF
6814#line 6814 "configure"
6815#include "confdefs.h"
6816
6817/* Override any gcc2 internal prototype to avoid an error.  */
6818#ifdef __cplusplus
6819extern "C"
6820#endif
6821/* We use char because int might match the return type of a gcc2
6822   builtin and then its argument prototype would still apply.  */
6823char elf_begin ();
6824int
6825main ()
6826{
6827elf_begin ();
6828  ;
6829  return 0;
6830}
6831_ACEOF
6832rm -f conftest.$ac_objext conftest$ac_exeext
6833if { (eval echo "$as_me:6833: \"$ac_link\"") >&5
6834  (eval $ac_link) 2>&5
6835  ac_status=$?
6836  echo "$as_me:6836: \$? = $ac_status" >&5
6837  (exit $ac_status); } &&
6838         { ac_try='test -s conftest$ac_exeext'
6839  { (eval echo "$as_me:6839: \"$ac_try\"") >&5
6840  (eval $ac_try) 2>&5
6841  ac_status=$?
6842  echo "$as_me:6842: \$? = $ac_status" >&5
6843  (exit $ac_status); }; }; then
6844  ac_cv_lib_elf_elf_begin=yes
6845else
6846  echo "$as_me: failed program was:" >&5
6847cat conftest.$ac_ext >&5
6848ac_cv_lib_elf_elf_begin=no
6849fi
6850rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6851LIBS=$ac_check_lib_save_LIBS
6852fi
6853echo "$as_me:6853: result: $ac_cv_lib_elf_elf_begin" >&5
6854echo "${ECHO_T}$ac_cv_lib_elf_elf_begin" >&6
6855if test $ac_cv_lib_elf_elf_begin = yes; then
6856
6857echo "$as_me:6857: checking if this is an SVR4 system" >&5
6858echo $ECHO_N "checking if this is an SVR4 system... $ECHO_C" >&6
6859if test "${cf_cv_svr4+set}" = set; then
6860  echo $ECHO_N "(cached) $ECHO_C" >&6
6861else
6862
6863cat >conftest.$ac_ext <<_ACEOF
6864#line 6864 "configure"
6865#include "confdefs.h"
6866
6867#include <elf.h>
6868#include <sys/termio.h>
6869
6870int
6871main ()
6872{
6873
6874static struct termio d_tio;
6875	d_tio.c_cc[VINTR] = 0;
6876	d_tio.c_cc[VQUIT] = 0;
6877	d_tio.c_cc[VERASE] = 0;
6878	d_tio.c_cc[VKILL] = 0;
6879	d_tio.c_cc[VEOF] = 0;
6880	d_tio.c_cc[VEOL] = 0;
6881	d_tio.c_cc[VMIN] = 0;
6882	d_tio.c_cc[VTIME] = 0;
6883	d_tio.c_cc[VLNEXT] = 0;
6884
6885  ;
6886  return 0;
6887}
6888_ACEOF
6889rm -f conftest.$ac_objext
6890if { (eval echo "$as_me:6890: \"$ac_compile\"") >&5
6891  (eval $ac_compile) 2>&5
6892  ac_status=$?
6893  echo "$as_me:6893: \$? = $ac_status" >&5
6894  (exit $ac_status); } &&
6895         { ac_try='test -s conftest.$ac_objext'
6896  { (eval echo "$as_me:6896: \"$ac_try\"") >&5
6897  (eval $ac_try) 2>&5
6898  ac_status=$?
6899  echo "$as_me:6899: \$? = $ac_status" >&5
6900  (exit $ac_status); }; }; then
6901  cf_cv_svr4=yes
6902else
6903  echo "$as_me: failed program was:" >&5
6904cat conftest.$ac_ext >&5
6905cf_cv_svr4=no
6906fi
6907rm -f conftest.$ac_objext conftest.$ac_ext
6908
6909fi
6910echo "$as_me:6910: result: $cf_cv_svr4" >&5
6911echo "${ECHO_T}$cf_cv_svr4" >&6
6912
6913fi
6914
6915test "$cf_cv_svr4" = yes && cat >>confdefs.h <<\EOF
6916#define SVR4 1
6917EOF
6918
6919echo "$as_me:6919: checking for X" >&5
6920echo $ECHO_N "checking for X... $ECHO_C" >&6
6921
6922# Check whether --with-x or --without-x was given.
6923if test "${with_x+set}" = set; then
6924  withval="$with_x"
6925
6926fi;
6927# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
6928if test "x$with_x" = xno; then
6929  # The user explicitly disabled X.
6930  have_x=disabled
6931else
6932  if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
6933    # Both variables are already set.
6934    have_x=yes
6935  else
6936    if test "${ac_cv_have_x+set}" = set; then
6937  echo $ECHO_N "(cached) $ECHO_C" >&6
6938else
6939  # One or both of the vars are not set, and there is no cached value.
6940ac_x_includes=no ac_x_libraries=no
6941rm -fr conftest.dir
6942if mkdir conftest.dir; then
6943  cd conftest.dir
6944  # Make sure to not put "make" in the Imakefile rules, since we grep it out.
6945  cat >Imakefile <<'EOF'
6946acfindx:
6947	@echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
6948EOF
6949  if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
6950    # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
6951    eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
6952    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
6953    for ac_extension in a so sl dylib dll; do
6954      if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
6955         test -f $ac_im_libdir/libX11.$ac_extension; then
6956        ac_im_usrlibdir=$ac_im_libdir; break
6957      fi
6958    done
6959    # Screen out bogus values from the imake configuration.  They are
6960    # bogus both because they are the default anyway, and because
6961    # using them would break gcc on systems where it needs fixed includes.
6962    case $ac_im_incroot in
6963	/usr/include) ;;
6964	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
6965    esac
6966    case $ac_im_usrlibdir in
6967	/usr/lib | /lib) ;;
6968	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
6969    esac
6970  fi
6971  cd ..
6972  rm -fr conftest.dir
6973fi
6974
6975# Standard set of common directories for X headers.
6976# Check X11 before X11Rn because it is often a symlink to the current release.
6977ac_x_header_dirs='
6978/usr/X11/include
6979/usr/X11R6/include
6980/usr/X11R5/include
6981/usr/X11R4/include
6982
6983/usr/include/X11
6984/usr/include/X11R6
6985/usr/include/X11R5
6986/usr/include/X11R4
6987
6988/usr/local/X11/include
6989/usr/local/X11R6/include
6990/usr/local/X11R5/include
6991/usr/local/X11R4/include
6992
6993/usr/local/include/X11
6994/usr/local/include/X11R6
6995/usr/local/include/X11R5
6996/usr/local/include/X11R4
6997
6998/usr/X386/include
6999/usr/x386/include
7000/usr/XFree86/include/X11
7001
7002/usr/include
7003/usr/local/include
7004/usr/unsupported/include
7005/usr/athena/include
7006/usr/local/x11r5/include
7007/usr/lpp/Xamples/include
7008
7009/usr/openwin/include
7010/usr/openwin/share/include'
7011
7012if test "$ac_x_includes" = no; then
7013  # Guess where to find include files, by looking for Intrinsic.h.
7014  # First, try using that file with no special directory specified.
7015  cat >conftest.$ac_ext <<_ACEOF
7016#line 7016 "configure"
7017#include "confdefs.h"
7018#include <X11/Intrinsic.h>
7019_ACEOF
7020if { (eval echo "$as_me:7020: \"$ac_cpp conftest.$ac_ext\"") >&5
7021  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7022  ac_status=$?
7023  egrep -v '^ *\+' conftest.er1 >conftest.err
7024  rm -f conftest.er1
7025  cat conftest.err >&5
7026  echo "$as_me:7026: \$? = $ac_status" >&5
7027  (exit $ac_status); } >/dev/null; then
7028  if test -s conftest.err; then
7029    ac_cpp_err=$ac_c_preproc_warn_flag
7030  else
7031    ac_cpp_err=
7032  fi
7033else
7034  ac_cpp_err=yes
7035fi
7036if test -z "$ac_cpp_err"; then
7037  # We can compile using X headers with no special include directory.
7038ac_x_includes=
7039else
7040  echo "$as_me: failed program was:" >&5
7041  cat conftest.$ac_ext >&5
7042  for ac_dir in $ac_x_header_dirs; do
7043  if test -r "$ac_dir/X11/Intrinsic.h"; then
7044    ac_x_includes=$ac_dir
7045    break
7046  fi
7047done
7048fi
7049rm -f conftest.err conftest.$ac_ext
7050fi # $ac_x_includes = no
7051
7052if test "$ac_x_libraries" = no; then
7053  # Check for the libraries.
7054  # See if we find them without any special options.
7055  # Don't add to $LIBS permanently.
7056  ac_save_LIBS=$LIBS
7057  LIBS="-lXt $LIBS"
7058  cat >conftest.$ac_ext <<_ACEOF
7059#line 7059 "configure"
7060#include "confdefs.h"
7061#include <X11/Intrinsic.h>
7062int
7063main ()
7064{
7065XtMalloc (0)
7066  ;
7067  return 0;
7068}
7069_ACEOF
7070rm -f conftest.$ac_objext conftest$ac_exeext
7071if { (eval echo "$as_me:7071: \"$ac_link\"") >&5
7072  (eval $ac_link) 2>&5
7073  ac_status=$?
7074  echo "$as_me:7074: \$? = $ac_status" >&5
7075  (exit $ac_status); } &&
7076         { ac_try='test -s conftest$ac_exeext'
7077  { (eval echo "$as_me:7077: \"$ac_try\"") >&5
7078  (eval $ac_try) 2>&5
7079  ac_status=$?
7080  echo "$as_me:7080: \$? = $ac_status" >&5
7081  (exit $ac_status); }; }; then
7082  LIBS=$ac_save_LIBS
7083# We can link X programs with no special library path.
7084ac_x_libraries=
7085else
7086  echo "$as_me: failed program was:" >&5
7087cat conftest.$ac_ext >&5
7088LIBS=$ac_save_LIBS
7089for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
7090do
7091  # Don't even attempt the hair of trying to link an X program!
7092  for ac_extension in a so sl dylib dll; do
7093    if test -r $ac_dir/libXt.$ac_extension; then
7094      ac_x_libraries=$ac_dir
7095      break 2
7096    fi
7097  done
7098done
7099fi
7100rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7101fi # $ac_x_libraries = no
7102
7103if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
7104  # Didn't find X anywhere.  Cache the known absence of X.
7105  ac_cv_have_x="have_x=no"
7106else
7107  # Record where we found X for the cache.
7108  ac_cv_have_x="have_x=yes \
7109	        ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
7110fi
7111fi
7112
7113  fi
7114  eval "$ac_cv_have_x"
7115fi # $with_x != no
7116
7117if test "$have_x" != yes; then
7118  echo "$as_me:7118: result: $have_x" >&5
7119echo "${ECHO_T}$have_x" >&6
7120  no_x=yes
7121else
7122  # If each of the values was on the command line, it overrides each guess.
7123  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
7124  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
7125  # Update the cache value to reflect the command line values.
7126  ac_cv_have_x="have_x=yes \
7127		ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
7128  echo "$as_me:7128: result: libraries $x_libraries, headers $x_includes" >&5
7129echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6
7130fi
7131
7132if test "$no_x" = yes; then
7133  # Not all programs may use this symbol, but it does not hurt to define it.
7134
7135cat >>confdefs.h <<\EOF
7136#define X_DISPLAY_MISSING 1
7137EOF
7138
7139  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
7140else
7141  if test -n "$x_includes"; then
7142    X_CFLAGS="$X_CFLAGS -I$x_includes"
7143  fi
7144
7145  # It would also be nice to do this for all -L options, not just this one.
7146  if test -n "$x_libraries"; then
7147    X_LIBS="$X_LIBS -L$x_libraries"
7148    # For Solaris; some versions of Sun CC require a space after -R and
7149    # others require no space.  Words are not sufficient . . . .
7150    case `(uname -sr) 2>/dev/null` in
7151    "SunOS 5"*)
7152      echo "$as_me:7152: checking whether -R must be followed by a space" >&5
7153echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6
7154      ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
7155      cat >conftest.$ac_ext <<_ACEOF
7156#line 7156 "configure"
7157#include "confdefs.h"
7158
7159int
7160main ()
7161{
7162
7163  ;
7164  return 0;
7165}
7166_ACEOF
7167rm -f conftest.$ac_objext conftest$ac_exeext
7168if { (eval echo "$as_me:7168: \"$ac_link\"") >&5
7169  (eval $ac_link) 2>&5
7170  ac_status=$?
7171  echo "$as_me:7171: \$? = $ac_status" >&5
7172  (exit $ac_status); } &&
7173         { ac_try='test -s conftest$ac_exeext'
7174  { (eval echo "$as_me:7174: \"$ac_try\"") >&5
7175  (eval $ac_try) 2>&5
7176  ac_status=$?
7177  echo "$as_me:7177: \$? = $ac_status" >&5
7178  (exit $ac_status); }; }; then
7179  ac_R_nospace=yes
7180else
7181  echo "$as_me: failed program was:" >&5
7182cat conftest.$ac_ext >&5
7183ac_R_nospace=no
7184fi
7185rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7186      if test $ac_R_nospace = yes; then
7187	echo "$as_me:7187: result: no" >&5
7188echo "${ECHO_T}no" >&6
7189	X_LIBS="$X_LIBS -R$x_libraries"
7190      else
7191	LIBS="$ac_xsave_LIBS -R $x_libraries"
7192	cat >conftest.$ac_ext <<_ACEOF
7193#line 7193 "configure"
7194#include "confdefs.h"
7195
7196int
7197main ()
7198{
7199
7200  ;
7201  return 0;
7202}
7203_ACEOF
7204rm -f conftest.$ac_objext conftest$ac_exeext
7205if { (eval echo "$as_me:7205: \"$ac_link\"") >&5
7206  (eval $ac_link) 2>&5
7207  ac_status=$?
7208  echo "$as_me:7208: \$? = $ac_status" >&5
7209  (exit $ac_status); } &&
7210         { ac_try='test -s conftest$ac_exeext'
7211  { (eval echo "$as_me:7211: \"$ac_try\"") >&5
7212  (eval $ac_try) 2>&5
7213  ac_status=$?
7214  echo "$as_me:7214: \$? = $ac_status" >&5
7215  (exit $ac_status); }; }; then
7216  ac_R_space=yes
7217else
7218  echo "$as_me: failed program was:" >&5
7219cat conftest.$ac_ext >&5
7220ac_R_space=no
7221fi
7222rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7223	if test $ac_R_space = yes; then
7224	  echo "$as_me:7224: result: yes" >&5
7225echo "${ECHO_T}yes" >&6
7226	  X_LIBS="$X_LIBS -R $x_libraries"
7227	else
7228	  echo "$as_me:7228: result: neither works" >&5
7229echo "${ECHO_T}neither works" >&6
7230	fi
7231      fi
7232      LIBS=$ac_xsave_LIBS
7233    esac
7234  fi
7235
7236  # Check for system-dependent libraries X programs must link with.
7237  # Do this before checking for the system-independent R6 libraries
7238  # (-lICE), since we may need -lsocket or whatever for X linking.
7239
7240  if test "$ISC" = yes; then
7241    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
7242  else
7243    # Martyn Johnson says this is needed for Ultrix, if the X
7244    # libraries were built with DECnet support.  And Karl Berry says
7245    # the Alpha needs dnet_stub (dnet does not exist).
7246    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
7247    cat >conftest.$ac_ext <<_ACEOF
7248#line 7248 "configure"
7249#include "confdefs.h"
7250
7251/* Override any gcc2 internal prototype to avoid an error.  */
7252#ifdef __cplusplus
7253extern "C"
7254#endif
7255/* We use char because int might match the return type of a gcc2
7256   builtin and then its argument prototype would still apply.  */
7257char XOpenDisplay ();
7258int
7259main ()
7260{
7261XOpenDisplay ();
7262  ;
7263  return 0;
7264}
7265_ACEOF
7266rm -f conftest.$ac_objext conftest$ac_exeext
7267if { (eval echo "$as_me:7267: \"$ac_link\"") >&5
7268  (eval $ac_link) 2>&5
7269  ac_status=$?
7270  echo "$as_me:7270: \$? = $ac_status" >&5
7271  (exit $ac_status); } &&
7272         { ac_try='test -s conftest$ac_exeext'
7273  { (eval echo "$as_me:7273: \"$ac_try\"") >&5
7274  (eval $ac_try) 2>&5
7275  ac_status=$?
7276  echo "$as_me:7276: \$? = $ac_status" >&5
7277  (exit $ac_status); }; }; then
7278  :
7279else
7280  echo "$as_me: failed program was:" >&5
7281cat conftest.$ac_ext >&5
7282echo "$as_me:7282: checking for dnet_ntoa in -ldnet" >&5
7283echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6
7284if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
7285  echo $ECHO_N "(cached) $ECHO_C" >&6
7286else
7287  ac_check_lib_save_LIBS=$LIBS
7288LIBS="-ldnet  $LIBS"
7289cat >conftest.$ac_ext <<_ACEOF
7290#line 7290 "configure"
7291#include "confdefs.h"
7292
7293/* Override any gcc2 internal prototype to avoid an error.  */
7294#ifdef __cplusplus
7295extern "C"
7296#endif
7297/* We use char because int might match the return type of a gcc2
7298   builtin and then its argument prototype would still apply.  */
7299char dnet_ntoa ();
7300int
7301main ()
7302{
7303dnet_ntoa ();
7304  ;
7305  return 0;
7306}
7307_ACEOF
7308rm -f conftest.$ac_objext conftest$ac_exeext
7309if { (eval echo "$as_me:7309: \"$ac_link\"") >&5
7310  (eval $ac_link) 2>&5
7311  ac_status=$?
7312  echo "$as_me:7312: \$? = $ac_status" >&5
7313  (exit $ac_status); } &&
7314         { ac_try='test -s conftest$ac_exeext'
7315  { (eval echo "$as_me:7315: \"$ac_try\"") >&5
7316  (eval $ac_try) 2>&5
7317  ac_status=$?
7318  echo "$as_me:7318: \$? = $ac_status" >&5
7319  (exit $ac_status); }; }; then
7320  ac_cv_lib_dnet_dnet_ntoa=yes
7321else
7322  echo "$as_me: failed program was:" >&5
7323cat conftest.$ac_ext >&5
7324ac_cv_lib_dnet_dnet_ntoa=no
7325fi
7326rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7327LIBS=$ac_check_lib_save_LIBS
7328fi
7329echo "$as_me:7329: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
7330echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6
7331if test $ac_cv_lib_dnet_dnet_ntoa = yes; then
7332  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
7333fi
7334
7335    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
7336      echo "$as_me:7336: checking for dnet_ntoa in -ldnet_stub" >&5
7337echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6
7338if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then
7339  echo $ECHO_N "(cached) $ECHO_C" >&6
7340else
7341  ac_check_lib_save_LIBS=$LIBS
7342LIBS="-ldnet_stub  $LIBS"
7343cat >conftest.$ac_ext <<_ACEOF
7344#line 7344 "configure"
7345#include "confdefs.h"
7346
7347/* Override any gcc2 internal prototype to avoid an error.  */
7348#ifdef __cplusplus
7349extern "C"
7350#endif
7351/* We use char because int might match the return type of a gcc2
7352   builtin and then its argument prototype would still apply.  */
7353char dnet_ntoa ();
7354int
7355main ()
7356{
7357dnet_ntoa ();
7358  ;
7359  return 0;
7360}
7361_ACEOF
7362rm -f conftest.$ac_objext conftest$ac_exeext
7363if { (eval echo "$as_me:7363: \"$ac_link\"") >&5
7364  (eval $ac_link) 2>&5
7365  ac_status=$?
7366  echo "$as_me:7366: \$? = $ac_status" >&5
7367  (exit $ac_status); } &&
7368         { ac_try='test -s conftest$ac_exeext'
7369  { (eval echo "$as_me:7369: \"$ac_try\"") >&5
7370  (eval $ac_try) 2>&5
7371  ac_status=$?
7372  echo "$as_me:7372: \$? = $ac_status" >&5
7373  (exit $ac_status); }; }; then
7374  ac_cv_lib_dnet_stub_dnet_ntoa=yes
7375else
7376  echo "$as_me: failed program was:" >&5
7377cat conftest.$ac_ext >&5
7378ac_cv_lib_dnet_stub_dnet_ntoa=no
7379fi
7380rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7381LIBS=$ac_check_lib_save_LIBS
7382fi
7383echo "$as_me:7383: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
7384echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6
7385if test $ac_cv_lib_dnet_stub_dnet_ntoa = yes; then
7386  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
7387fi
7388
7389    fi
7390fi
7391rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7392    LIBS="$ac_xsave_LIBS"
7393
7394    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
7395    # to get the SysV transport functions.
7396    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
7397    # needs -lnsl.
7398    # The nsl library prevents programs from opening the X display
7399    # on Irix 5.2, according to T.E. Dickey.
7400    # The functions gethostbyname, getservbyname, and inet_addr are
7401    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
7402    echo "$as_me:7402: checking for gethostbyname" >&5
7403echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6
7404if test "${ac_cv_func_gethostbyname+set}" = set; then
7405  echo $ECHO_N "(cached) $ECHO_C" >&6
7406else
7407  cat >conftest.$ac_ext <<_ACEOF
7408#line 7408 "configure"
7409#include "confdefs.h"
7410/* System header to define __stub macros and hopefully few prototypes,
7411    which can conflict with char gethostbyname (); below.  */
7412#include <assert.h>
7413/* Override any gcc2 internal prototype to avoid an error.  */
7414#ifdef __cplusplus
7415extern "C"
7416#endif
7417/* We use char because int might match the return type of a gcc2
7418   builtin and then its argument prototype would still apply.  */
7419char gethostbyname ();
7420char (*f) ();
7421
7422int
7423main ()
7424{
7425/* The GNU C library defines this for functions which it implements
7426    to always fail with ENOSYS.  Some functions are actually named
7427    something starting with __ and the normal name is an alias.  */
7428#if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
7429choke me
7430#else
7431f = gethostbyname;
7432#endif
7433
7434  ;
7435  return 0;
7436}
7437_ACEOF
7438rm -f conftest.$ac_objext conftest$ac_exeext
7439if { (eval echo "$as_me:7439: \"$ac_link\"") >&5
7440  (eval $ac_link) 2>&5
7441  ac_status=$?
7442  echo "$as_me:7442: \$? = $ac_status" >&5
7443  (exit $ac_status); } &&
7444         { ac_try='test -s conftest$ac_exeext'
7445  { (eval echo "$as_me:7445: \"$ac_try\"") >&5
7446  (eval $ac_try) 2>&5
7447  ac_status=$?
7448  echo "$as_me:7448: \$? = $ac_status" >&5
7449  (exit $ac_status); }; }; then
7450  ac_cv_func_gethostbyname=yes
7451else
7452  echo "$as_me: failed program was:" >&5
7453cat conftest.$ac_ext >&5
7454ac_cv_func_gethostbyname=no
7455fi
7456rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7457fi
7458echo "$as_me:7458: result: $ac_cv_func_gethostbyname" >&5
7459echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6
7460
7461    if test $ac_cv_func_gethostbyname = no; then
7462      echo "$as_me:7462: checking for gethostbyname in -lnsl" >&5
7463echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6
7464if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
7465  echo $ECHO_N "(cached) $ECHO_C" >&6
7466else
7467  ac_check_lib_save_LIBS=$LIBS
7468LIBS="-lnsl  $LIBS"
7469cat >conftest.$ac_ext <<_ACEOF
7470#line 7470 "configure"
7471#include "confdefs.h"
7472
7473/* Override any gcc2 internal prototype to avoid an error.  */
7474#ifdef __cplusplus
7475extern "C"
7476#endif
7477/* We use char because int might match the return type of a gcc2
7478   builtin and then its argument prototype would still apply.  */
7479char gethostbyname ();
7480int
7481main ()
7482{
7483gethostbyname ();
7484  ;
7485  return 0;
7486}
7487_ACEOF
7488rm -f conftest.$ac_objext conftest$ac_exeext
7489if { (eval echo "$as_me:7489: \"$ac_link\"") >&5
7490  (eval $ac_link) 2>&5
7491  ac_status=$?
7492  echo "$as_me:7492: \$? = $ac_status" >&5
7493  (exit $ac_status); } &&
7494         { ac_try='test -s conftest$ac_exeext'
7495  { (eval echo "$as_me:7495: \"$ac_try\"") >&5
7496  (eval $ac_try) 2>&5
7497  ac_status=$?
7498  echo "$as_me:7498: \$? = $ac_status" >&5
7499  (exit $ac_status); }; }; then
7500  ac_cv_lib_nsl_gethostbyname=yes
7501else
7502  echo "$as_me: failed program was:" >&5
7503cat conftest.$ac_ext >&5
7504ac_cv_lib_nsl_gethostbyname=no
7505fi
7506rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7507LIBS=$ac_check_lib_save_LIBS
7508fi
7509echo "$as_me:7509: result: $ac_cv_lib_nsl_gethostbyname" >&5
7510echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6
7511if test $ac_cv_lib_nsl_gethostbyname = yes; then
7512  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
7513fi
7514
7515      if test $ac_cv_lib_nsl_gethostbyname = no; then
7516        echo "$as_me:7516: checking for gethostbyname in -lbsd" >&5
7517echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6
7518if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then
7519  echo $ECHO_N "(cached) $ECHO_C" >&6
7520else
7521  ac_check_lib_save_LIBS=$LIBS
7522LIBS="-lbsd  $LIBS"
7523cat >conftest.$ac_ext <<_ACEOF
7524#line 7524 "configure"
7525#include "confdefs.h"
7526
7527/* Override any gcc2 internal prototype to avoid an error.  */
7528#ifdef __cplusplus
7529extern "C"
7530#endif
7531/* We use char because int might match the return type of a gcc2
7532   builtin and then its argument prototype would still apply.  */
7533char gethostbyname ();
7534int
7535main ()
7536{
7537gethostbyname ();
7538  ;
7539  return 0;
7540}
7541_ACEOF
7542rm -f conftest.$ac_objext conftest$ac_exeext
7543if { (eval echo "$as_me:7543: \"$ac_link\"") >&5
7544  (eval $ac_link) 2>&5
7545  ac_status=$?
7546  echo "$as_me:7546: \$? = $ac_status" >&5
7547  (exit $ac_status); } &&
7548         { ac_try='test -s conftest$ac_exeext'
7549  { (eval echo "$as_me:7549: \"$ac_try\"") >&5
7550  (eval $ac_try) 2>&5
7551  ac_status=$?
7552  echo "$as_me:7552: \$? = $ac_status" >&5
7553  (exit $ac_status); }; }; then
7554  ac_cv_lib_bsd_gethostbyname=yes
7555else
7556  echo "$as_me: failed program was:" >&5
7557cat conftest.$ac_ext >&5
7558ac_cv_lib_bsd_gethostbyname=no
7559fi
7560rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7561LIBS=$ac_check_lib_save_LIBS
7562fi
7563echo "$as_me:7563: result: $ac_cv_lib_bsd_gethostbyname" >&5
7564echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6
7565if test $ac_cv_lib_bsd_gethostbyname = yes; then
7566  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
7567fi
7568
7569      fi
7570    fi
7571
7572    # lieder@skyler.mavd.honeywell.com says without -lsocket,
7573    # socket/setsockopt and other routines are undefined under SCO ODT
7574    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
7575    # on later versions), says Simon Leinen: it contains gethostby*
7576    # variants that don't use the nameserver (or something).  -lsocket
7577    # must be given before -lnsl if both are needed.  We assume that
7578    # if connect needs -lnsl, so does gethostbyname.
7579    echo "$as_me:7579: checking for connect" >&5
7580echo $ECHO_N "checking for connect... $ECHO_C" >&6
7581if test "${ac_cv_func_connect+set}" = set; then
7582  echo $ECHO_N "(cached) $ECHO_C" >&6
7583else
7584  cat >conftest.$ac_ext <<_ACEOF
7585#line 7585 "configure"
7586#include "confdefs.h"
7587/* System header to define __stub macros and hopefully few prototypes,
7588    which can conflict with char connect (); below.  */
7589#include <assert.h>
7590/* Override any gcc2 internal prototype to avoid an error.  */
7591#ifdef __cplusplus
7592extern "C"
7593#endif
7594/* We use char because int might match the return type of a gcc2
7595   builtin and then its argument prototype would still apply.  */
7596char connect ();
7597char (*f) ();
7598
7599int
7600main ()
7601{
7602/* The GNU C library defines this for functions which it implements
7603    to always fail with ENOSYS.  Some functions are actually named
7604    something starting with __ and the normal name is an alias.  */
7605#if defined (__stub_connect) || defined (__stub___connect)
7606choke me
7607#else
7608f = connect;
7609#endif
7610
7611  ;
7612  return 0;
7613}
7614_ACEOF
7615rm -f conftest.$ac_objext conftest$ac_exeext
7616if { (eval echo "$as_me:7616: \"$ac_link\"") >&5
7617  (eval $ac_link) 2>&5
7618  ac_status=$?
7619  echo "$as_me:7619: \$? = $ac_status" >&5
7620  (exit $ac_status); } &&
7621         { ac_try='test -s conftest$ac_exeext'
7622  { (eval echo "$as_me:7622: \"$ac_try\"") >&5
7623  (eval $ac_try) 2>&5
7624  ac_status=$?
7625  echo "$as_me:7625: \$? = $ac_status" >&5
7626  (exit $ac_status); }; }; then
7627  ac_cv_func_connect=yes
7628else
7629  echo "$as_me: failed program was:" >&5
7630cat conftest.$ac_ext >&5
7631ac_cv_func_connect=no
7632fi
7633rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7634fi
7635echo "$as_me:7635: result: $ac_cv_func_connect" >&5
7636echo "${ECHO_T}$ac_cv_func_connect" >&6
7637
7638    if test $ac_cv_func_connect = no; then
7639      echo "$as_me:7639: checking for connect in -lsocket" >&5
7640echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6
7641if test "${ac_cv_lib_socket_connect+set}" = set; then
7642  echo $ECHO_N "(cached) $ECHO_C" >&6
7643else
7644  ac_check_lib_save_LIBS=$LIBS
7645LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
7646cat >conftest.$ac_ext <<_ACEOF
7647#line 7647 "configure"
7648#include "confdefs.h"
7649
7650/* Override any gcc2 internal prototype to avoid an error.  */
7651#ifdef __cplusplus
7652extern "C"
7653#endif
7654/* We use char because int might match the return type of a gcc2
7655   builtin and then its argument prototype would still apply.  */
7656char connect ();
7657int
7658main ()
7659{
7660connect ();
7661  ;
7662  return 0;
7663}
7664_ACEOF
7665rm -f conftest.$ac_objext conftest$ac_exeext
7666if { (eval echo "$as_me:7666: \"$ac_link\"") >&5
7667  (eval $ac_link) 2>&5
7668  ac_status=$?
7669  echo "$as_me:7669: \$? = $ac_status" >&5
7670  (exit $ac_status); } &&
7671         { ac_try='test -s conftest$ac_exeext'
7672  { (eval echo "$as_me:7672: \"$ac_try\"") >&5
7673  (eval $ac_try) 2>&5
7674  ac_status=$?
7675  echo "$as_me:7675: \$? = $ac_status" >&5
7676  (exit $ac_status); }; }; then
7677  ac_cv_lib_socket_connect=yes
7678else
7679  echo "$as_me: failed program was:" >&5
7680cat conftest.$ac_ext >&5
7681ac_cv_lib_socket_connect=no
7682fi
7683rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7684LIBS=$ac_check_lib_save_LIBS
7685fi
7686echo "$as_me:7686: result: $ac_cv_lib_socket_connect" >&5
7687echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6
7688if test $ac_cv_lib_socket_connect = yes; then
7689  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
7690fi
7691
7692    fi
7693
7694    # Guillermo Gomez says -lposix is necessary on A/UX.
7695    echo "$as_me:7695: checking for remove" >&5
7696echo $ECHO_N "checking for remove... $ECHO_C" >&6
7697if test "${ac_cv_func_remove+set}" = set; then
7698  echo $ECHO_N "(cached) $ECHO_C" >&6
7699else
7700  cat >conftest.$ac_ext <<_ACEOF
7701#line 7701 "configure"
7702#include "confdefs.h"
7703/* System header to define __stub macros and hopefully few prototypes,
7704    which can conflict with char remove (); below.  */
7705#include <assert.h>
7706/* Override any gcc2 internal prototype to avoid an error.  */
7707#ifdef __cplusplus
7708extern "C"
7709#endif
7710/* We use char because int might match the return type of a gcc2
7711   builtin and then its argument prototype would still apply.  */
7712char remove ();
7713char (*f) ();
7714
7715int
7716main ()
7717{
7718/* The GNU C library defines this for functions which it implements
7719    to always fail with ENOSYS.  Some functions are actually named
7720    something starting with __ and the normal name is an alias.  */
7721#if defined (__stub_remove) || defined (__stub___remove)
7722choke me
7723#else
7724f = remove;
7725#endif
7726
7727  ;
7728  return 0;
7729}
7730_ACEOF
7731rm -f conftest.$ac_objext conftest$ac_exeext
7732if { (eval echo "$as_me:7732: \"$ac_link\"") >&5
7733  (eval $ac_link) 2>&5
7734  ac_status=$?
7735  echo "$as_me:7735: \$? = $ac_status" >&5
7736  (exit $ac_status); } &&
7737         { ac_try='test -s conftest$ac_exeext'
7738  { (eval echo "$as_me:7738: \"$ac_try\"") >&5
7739  (eval $ac_try) 2>&5
7740  ac_status=$?
7741  echo "$as_me:7741: \$? = $ac_status" >&5
7742  (exit $ac_status); }; }; then
7743  ac_cv_func_remove=yes
7744else
7745  echo "$as_me: failed program was:" >&5
7746cat conftest.$ac_ext >&5
7747ac_cv_func_remove=no
7748fi
7749rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7750fi
7751echo "$as_me:7751: result: $ac_cv_func_remove" >&5
7752echo "${ECHO_T}$ac_cv_func_remove" >&6
7753
7754    if test $ac_cv_func_remove = no; then
7755      echo "$as_me:7755: checking for remove in -lposix" >&5
7756echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6
7757if test "${ac_cv_lib_posix_remove+set}" = set; then
7758  echo $ECHO_N "(cached) $ECHO_C" >&6
7759else
7760  ac_check_lib_save_LIBS=$LIBS
7761LIBS="-lposix  $LIBS"
7762cat >conftest.$ac_ext <<_ACEOF
7763#line 7763 "configure"
7764#include "confdefs.h"
7765
7766/* Override any gcc2 internal prototype to avoid an error.  */
7767#ifdef __cplusplus
7768extern "C"
7769#endif
7770/* We use char because int might match the return type of a gcc2
7771   builtin and then its argument prototype would still apply.  */
7772char remove ();
7773int
7774main ()
7775{
7776remove ();
7777  ;
7778  return 0;
7779}
7780_ACEOF
7781rm -f conftest.$ac_objext conftest$ac_exeext
7782if { (eval echo "$as_me:7782: \"$ac_link\"") >&5
7783  (eval $ac_link) 2>&5
7784  ac_status=$?
7785  echo "$as_me:7785: \$? = $ac_status" >&5
7786  (exit $ac_status); } &&
7787         { ac_try='test -s conftest$ac_exeext'
7788  { (eval echo "$as_me:7788: \"$ac_try\"") >&5
7789  (eval $ac_try) 2>&5
7790  ac_status=$?
7791  echo "$as_me:7791: \$? = $ac_status" >&5
7792  (exit $ac_status); }; }; then
7793  ac_cv_lib_posix_remove=yes
7794else
7795  echo "$as_me: failed program was:" >&5
7796cat conftest.$ac_ext >&5
7797ac_cv_lib_posix_remove=no
7798fi
7799rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7800LIBS=$ac_check_lib_save_LIBS
7801fi
7802echo "$as_me:7802: result: $ac_cv_lib_posix_remove" >&5
7803echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6
7804if test $ac_cv_lib_posix_remove = yes; then
7805  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
7806fi
7807
7808    fi
7809
7810    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
7811    echo "$as_me:7811: checking for shmat" >&5
7812echo $ECHO_N "checking for shmat... $ECHO_C" >&6
7813if test "${ac_cv_func_shmat+set}" = set; then
7814  echo $ECHO_N "(cached) $ECHO_C" >&6
7815else
7816  cat >conftest.$ac_ext <<_ACEOF
7817#line 7817 "configure"
7818#include "confdefs.h"
7819/* System header to define __stub macros and hopefully few prototypes,
7820    which can conflict with char shmat (); below.  */
7821#include <assert.h>
7822/* Override any gcc2 internal prototype to avoid an error.  */
7823#ifdef __cplusplus
7824extern "C"
7825#endif
7826/* We use char because int might match the return type of a gcc2
7827   builtin and then its argument prototype would still apply.  */
7828char shmat ();
7829char (*f) ();
7830
7831int
7832main ()
7833{
7834/* The GNU C library defines this for functions which it implements
7835    to always fail with ENOSYS.  Some functions are actually named
7836    something starting with __ and the normal name is an alias.  */
7837#if defined (__stub_shmat) || defined (__stub___shmat)
7838choke me
7839#else
7840f = shmat;
7841#endif
7842
7843  ;
7844  return 0;
7845}
7846_ACEOF
7847rm -f conftest.$ac_objext conftest$ac_exeext
7848if { (eval echo "$as_me:7848: \"$ac_link\"") >&5
7849  (eval $ac_link) 2>&5
7850  ac_status=$?
7851  echo "$as_me:7851: \$? = $ac_status" >&5
7852  (exit $ac_status); } &&
7853         { ac_try='test -s conftest$ac_exeext'
7854  { (eval echo "$as_me:7854: \"$ac_try\"") >&5
7855  (eval $ac_try) 2>&5
7856  ac_status=$?
7857  echo "$as_me:7857: \$? = $ac_status" >&5
7858  (exit $ac_status); }; }; then
7859  ac_cv_func_shmat=yes
7860else
7861  echo "$as_me: failed program was:" >&5
7862cat conftest.$ac_ext >&5
7863ac_cv_func_shmat=no
7864fi
7865rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7866fi
7867echo "$as_me:7867: result: $ac_cv_func_shmat" >&5
7868echo "${ECHO_T}$ac_cv_func_shmat" >&6
7869
7870    if test $ac_cv_func_shmat = no; then
7871      echo "$as_me:7871: checking for shmat in -lipc" >&5
7872echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6
7873if test "${ac_cv_lib_ipc_shmat+set}" = set; then
7874  echo $ECHO_N "(cached) $ECHO_C" >&6
7875else
7876  ac_check_lib_save_LIBS=$LIBS
7877LIBS="-lipc  $LIBS"
7878cat >conftest.$ac_ext <<_ACEOF
7879#line 7879 "configure"
7880#include "confdefs.h"
7881
7882/* Override any gcc2 internal prototype to avoid an error.  */
7883#ifdef __cplusplus
7884extern "C"
7885#endif
7886/* We use char because int might match the return type of a gcc2
7887   builtin and then its argument prototype would still apply.  */
7888char shmat ();
7889int
7890main ()
7891{
7892shmat ();
7893  ;
7894  return 0;
7895}
7896_ACEOF
7897rm -f conftest.$ac_objext conftest$ac_exeext
7898if { (eval echo "$as_me:7898: \"$ac_link\"") >&5
7899  (eval $ac_link) 2>&5
7900  ac_status=$?
7901  echo "$as_me:7901: \$? = $ac_status" >&5
7902  (exit $ac_status); } &&
7903         { ac_try='test -s conftest$ac_exeext'
7904  { (eval echo "$as_me:7904: \"$ac_try\"") >&5
7905  (eval $ac_try) 2>&5
7906  ac_status=$?
7907  echo "$as_me:7907: \$? = $ac_status" >&5
7908  (exit $ac_status); }; }; then
7909  ac_cv_lib_ipc_shmat=yes
7910else
7911  echo "$as_me: failed program was:" >&5
7912cat conftest.$ac_ext >&5
7913ac_cv_lib_ipc_shmat=no
7914fi
7915rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7916LIBS=$ac_check_lib_save_LIBS
7917fi
7918echo "$as_me:7918: result: $ac_cv_lib_ipc_shmat" >&5
7919echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6
7920if test $ac_cv_lib_ipc_shmat = yes; then
7921  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
7922fi
7923
7924    fi
7925  fi
7926
7927  # Check for libraries that X11R6 Xt/Xaw programs need.
7928  ac_save_LDFLAGS=$LDFLAGS
7929  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
7930  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
7931  # check for ICE first), but we must link in the order -lSM -lICE or
7932  # we get undefined symbols.  So assume we have SM if we have ICE.
7933  # These have to be linked with before -lX11, unlike the other
7934  # libraries we check for below, so use a different variable.
7935  # John Interrante, Karl Berry
7936  echo "$as_me:7936: checking for IceConnectionNumber in -lICE" >&5
7937echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6
7938if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then
7939  echo $ECHO_N "(cached) $ECHO_C" >&6
7940else
7941  ac_check_lib_save_LIBS=$LIBS
7942LIBS="-lICE $X_EXTRA_LIBS $LIBS"
7943cat >conftest.$ac_ext <<_ACEOF
7944#line 7944 "configure"
7945#include "confdefs.h"
7946
7947/* Override any gcc2 internal prototype to avoid an error.  */
7948#ifdef __cplusplus
7949extern "C"
7950#endif
7951/* We use char because int might match the return type of a gcc2
7952   builtin and then its argument prototype would still apply.  */
7953char IceConnectionNumber ();
7954int
7955main ()
7956{
7957IceConnectionNumber ();
7958  ;
7959  return 0;
7960}
7961_ACEOF
7962rm -f conftest.$ac_objext conftest$ac_exeext
7963if { (eval echo "$as_me:7963: \"$ac_link\"") >&5
7964  (eval $ac_link) 2>&5
7965  ac_status=$?
7966  echo "$as_me:7966: \$? = $ac_status" >&5
7967  (exit $ac_status); } &&
7968         { ac_try='test -s conftest$ac_exeext'
7969  { (eval echo "$as_me:7969: \"$ac_try\"") >&5
7970  (eval $ac_try) 2>&5
7971  ac_status=$?
7972  echo "$as_me:7972: \$? = $ac_status" >&5
7973  (exit $ac_status); }; }; then
7974  ac_cv_lib_ICE_IceConnectionNumber=yes
7975else
7976  echo "$as_me: failed program was:" >&5
7977cat conftest.$ac_ext >&5
7978ac_cv_lib_ICE_IceConnectionNumber=no
7979fi
7980rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7981LIBS=$ac_check_lib_save_LIBS
7982fi
7983echo "$as_me:7983: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
7984echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6
7985if test $ac_cv_lib_ICE_IceConnectionNumber = yes; then
7986  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
7987fi
7988
7989  LDFLAGS=$ac_save_LDFLAGS
7990
7991fi
7992
7993# SYSTEM_NAME=`echo "$cf_cv_system_name"|tr ' ' -`
7994
7995cf_have_X_LIBS=no
7996
7997LDFLAGS="$X_LIBS $LDFLAGS"
7998
7999test -n "$verbose" && echo "	checking additions to CFLAGS" 1>&6
8000
8001echo "${as_me-configure}:8001: testing checking additions to CFLAGS ..." 1>&5
8002
8003cf_check_cflags="$CFLAGS"
8004cf_check_cppflags="$CPPFLAGS"
8005
8006cf_fix_cppflags=no
8007cf_new_cflags=
8008cf_new_cppflags=
8009cf_new_extra_cppflags=
8010
8011for cf_add_cflags in $X_CFLAGS
8012do
8013case $cf_fix_cppflags in
8014no)
8015	case $cf_add_cflags in #(vi
8016	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8017		case $cf_add_cflags in
8018		-D*)
8019			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8020
8021			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8022			&& test -z "${cf_tst_cflags}" \
8023			&& cf_fix_cppflags=yes
8024
8025			if test $cf_fix_cppflags = yes ; then
8026				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8027				continue
8028			elif test "${cf_tst_cflags}" = "\"'" ; then
8029				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8030				continue
8031			fi
8032			;;
8033		esac
8034		case "$CPPFLAGS" in
8035		*$cf_add_cflags) #(vi
8036			;;
8037		*) #(vi
8038			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8039			;;
8040		esac
8041		;;
8042	*)
8043		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8044		;;
8045	esac
8046	;;
8047yes)
8048	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8049
8050	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8051
8052	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8053	&& test -z "${cf_tst_cflags}" \
8054	&& cf_fix_cppflags=no
8055	;;
8056esac
8057done
8058
8059if test -n "$cf_new_cflags" ; then
8060	test -n "$verbose" && echo "	add to \$CFLAGS $cf_new_cflags" 1>&6
8061
8062echo "${as_me-configure}:8062: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
8063
8064	CFLAGS="$CFLAGS $cf_new_cflags"
8065fi
8066
8067if test -n "$cf_new_cppflags" ; then
8068	test -n "$verbose" && echo "	add to \$CPPFLAGS $cf_new_cppflags" 1>&6
8069
8070echo "${as_me-configure}:8070: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
8071
8072	CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
8073fi
8074
8075if test -n "$cf_new_extra_cppflags" ; then
8076	test -n "$verbose" && echo "	add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
8077
8078echo "${as_me-configure}:8078: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
8079
8080	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8081fi
8082
8083if test "$cf_check_cflags" != "$CFLAGS" ; then
8084cat >conftest.$ac_ext <<_ACEOF
8085#line 8085 "configure"
8086#include "confdefs.h"
8087#include <stdio.h>
8088int
8089main ()
8090{
8091printf("Hello world");
8092  ;
8093  return 0;
8094}
8095_ACEOF
8096rm -f conftest.$ac_objext conftest$ac_exeext
8097if { (eval echo "$as_me:8097: \"$ac_link\"") >&5
8098  (eval $ac_link) 2>&5
8099  ac_status=$?
8100  echo "$as_me:8100: \$? = $ac_status" >&5
8101  (exit $ac_status); } &&
8102         { ac_try='test -s conftest$ac_exeext'
8103  { (eval echo "$as_me:8103: \"$ac_try\"") >&5
8104  (eval $ac_try) 2>&5
8105  ac_status=$?
8106  echo "$as_me:8106: \$? = $ac_status" >&5
8107  (exit $ac_status); }; }; then
8108  :
8109else
8110  echo "$as_me: failed program was:" >&5
8111cat conftest.$ac_ext >&5
8112test -n "$verbose" && echo "	test-compile failed.  Undoing change to \$CFLAGS" 1>&6
8113
8114echo "${as_me-configure}:8114: testing test-compile failed.  Undoing change to \$CFLAGS ..." 1>&5
8115
8116	 if test "$cf_check_cppflags" != "$CPPFLAGS" ; then
8117		 test -n "$verbose" && echo "	but keeping change to \$CPPFLAGS" 1>&6
8118
8119echo "${as_me-configure}:8119: testing but keeping change to \$CPPFLAGS ..." 1>&5
8120
8121	 fi
8122	 CFLAGS="$cf_check_flags"
8123fi
8124rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8125fi
8126
8127echo "$as_me:8127: checking for XOpenDisplay" >&5
8128echo $ECHO_N "checking for XOpenDisplay... $ECHO_C" >&6
8129if test "${ac_cv_func_XOpenDisplay+set}" = set; then
8130  echo $ECHO_N "(cached) $ECHO_C" >&6
8131else
8132  cat >conftest.$ac_ext <<_ACEOF
8133#line 8133 "configure"
8134#include "confdefs.h"
8135/* System header to define __stub macros and hopefully few prototypes,
8136    which can conflict with char XOpenDisplay (); below.  */
8137#include <assert.h>
8138/* Override any gcc2 internal prototype to avoid an error.  */
8139#ifdef __cplusplus
8140extern "C"
8141#endif
8142/* We use char because int might match the return type of a gcc2
8143   builtin and then its argument prototype would still apply.  */
8144char XOpenDisplay ();
8145char (*f) ();
8146
8147int
8148main ()
8149{
8150/* The GNU C library defines this for functions which it implements
8151    to always fail with ENOSYS.  Some functions are actually named
8152    something starting with __ and the normal name is an alias.  */
8153#if defined (__stub_XOpenDisplay) || defined (__stub___XOpenDisplay)
8154choke me
8155#else
8156f = XOpenDisplay;
8157#endif
8158
8159  ;
8160  return 0;
8161}
8162_ACEOF
8163rm -f conftest.$ac_objext conftest$ac_exeext
8164if { (eval echo "$as_me:8164: \"$ac_link\"") >&5
8165  (eval $ac_link) 2>&5
8166  ac_status=$?
8167  echo "$as_me:8167: \$? = $ac_status" >&5
8168  (exit $ac_status); } &&
8169         { ac_try='test -s conftest$ac_exeext'
8170  { (eval echo "$as_me:8170: \"$ac_try\"") >&5
8171  (eval $ac_try) 2>&5
8172  ac_status=$?
8173  echo "$as_me:8173: \$? = $ac_status" >&5
8174  (exit $ac_status); }; }; then
8175  ac_cv_func_XOpenDisplay=yes
8176else
8177  echo "$as_me: failed program was:" >&5
8178cat conftest.$ac_ext >&5
8179ac_cv_func_XOpenDisplay=no
8180fi
8181rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8182fi
8183echo "$as_me:8183: result: $ac_cv_func_XOpenDisplay" >&5
8184echo "${ECHO_T}$ac_cv_func_XOpenDisplay" >&6
8185if test $ac_cv_func_XOpenDisplay = yes; then
8186  :
8187else
8188
8189echo "$as_me:8189: checking for XOpenDisplay in -lX11" >&5
8190echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6
8191if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then
8192  echo $ECHO_N "(cached) $ECHO_C" >&6
8193else
8194  ac_check_lib_save_LIBS=$LIBS
8195LIBS="-lX11 $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
8196cat >conftest.$ac_ext <<_ACEOF
8197#line 8197 "configure"
8198#include "confdefs.h"
8199
8200/* Override any gcc2 internal prototype to avoid an error.  */
8201#ifdef __cplusplus
8202extern "C"
8203#endif
8204/* We use char because int might match the return type of a gcc2
8205   builtin and then its argument prototype would still apply.  */
8206char XOpenDisplay ();
8207int
8208main ()
8209{
8210XOpenDisplay ();
8211  ;
8212  return 0;
8213}
8214_ACEOF
8215rm -f conftest.$ac_objext conftest$ac_exeext
8216if { (eval echo "$as_me:8216: \"$ac_link\"") >&5
8217  (eval $ac_link) 2>&5
8218  ac_status=$?
8219  echo "$as_me:8219: \$? = $ac_status" >&5
8220  (exit $ac_status); } &&
8221         { ac_try='test -s conftest$ac_exeext'
8222  { (eval echo "$as_me:8222: \"$ac_try\"") >&5
8223  (eval $ac_try) 2>&5
8224  ac_status=$?
8225  echo "$as_me:8225: \$? = $ac_status" >&5
8226  (exit $ac_status); }; }; then
8227  ac_cv_lib_X11_XOpenDisplay=yes
8228else
8229  echo "$as_me: failed program was:" >&5
8230cat conftest.$ac_ext >&5
8231ac_cv_lib_X11_XOpenDisplay=no
8232fi
8233rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8234LIBS=$ac_check_lib_save_LIBS
8235fi
8236echo "$as_me:8236: result: $ac_cv_lib_X11_XOpenDisplay" >&5
8237echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6
8238if test $ac_cv_lib_X11_XOpenDisplay = yes; then
8239  LIBS="-lX11 $LIBS"
8240fi
8241
8242fi
8243
8244echo "$as_me:8244: checking for XtAppInitialize" >&5
8245echo $ECHO_N "checking for XtAppInitialize... $ECHO_C" >&6
8246if test "${ac_cv_func_XtAppInitialize+set}" = set; then
8247  echo $ECHO_N "(cached) $ECHO_C" >&6
8248else
8249  cat >conftest.$ac_ext <<_ACEOF
8250#line 8250 "configure"
8251#include "confdefs.h"
8252/* System header to define __stub macros and hopefully few prototypes,
8253    which can conflict with char XtAppInitialize (); below.  */
8254#include <assert.h>
8255/* Override any gcc2 internal prototype to avoid an error.  */
8256#ifdef __cplusplus
8257extern "C"
8258#endif
8259/* We use char because int might match the return type of a gcc2
8260   builtin and then its argument prototype would still apply.  */
8261char XtAppInitialize ();
8262char (*f) ();
8263
8264int
8265main ()
8266{
8267/* The GNU C library defines this for functions which it implements
8268    to always fail with ENOSYS.  Some functions are actually named
8269    something starting with __ and the normal name is an alias.  */
8270#if defined (__stub_XtAppInitialize) || defined (__stub___XtAppInitialize)
8271choke me
8272#else
8273f = XtAppInitialize;
8274#endif
8275
8276  ;
8277  return 0;
8278}
8279_ACEOF
8280rm -f conftest.$ac_objext conftest$ac_exeext
8281if { (eval echo "$as_me:8281: \"$ac_link\"") >&5
8282  (eval $ac_link) 2>&5
8283  ac_status=$?
8284  echo "$as_me:8284: \$? = $ac_status" >&5
8285  (exit $ac_status); } &&
8286         { ac_try='test -s conftest$ac_exeext'
8287  { (eval echo "$as_me:8287: \"$ac_try\"") >&5
8288  (eval $ac_try) 2>&5
8289  ac_status=$?
8290  echo "$as_me:8290: \$? = $ac_status" >&5
8291  (exit $ac_status); }; }; then
8292  ac_cv_func_XtAppInitialize=yes
8293else
8294  echo "$as_me: failed program was:" >&5
8295cat conftest.$ac_ext >&5
8296ac_cv_func_XtAppInitialize=no
8297fi
8298rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8299fi
8300echo "$as_me:8300: result: $ac_cv_func_XtAppInitialize" >&5
8301echo "${ECHO_T}$ac_cv_func_XtAppInitialize" >&6
8302if test $ac_cv_func_XtAppInitialize = yes; then
8303  :
8304else
8305
8306echo "$as_me:8306: checking for XtAppInitialize in -lXt" >&5
8307echo $ECHO_N "checking for XtAppInitialize in -lXt... $ECHO_C" >&6
8308if test "${ac_cv_lib_Xt_XtAppInitialize+set}" = set; then
8309  echo $ECHO_N "(cached) $ECHO_C" >&6
8310else
8311  ac_check_lib_save_LIBS=$LIBS
8312LIBS="-lXt $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
8313cat >conftest.$ac_ext <<_ACEOF
8314#line 8314 "configure"
8315#include "confdefs.h"
8316
8317/* Override any gcc2 internal prototype to avoid an error.  */
8318#ifdef __cplusplus
8319extern "C"
8320#endif
8321/* We use char because int might match the return type of a gcc2
8322   builtin and then its argument prototype would still apply.  */
8323char XtAppInitialize ();
8324int
8325main ()
8326{
8327XtAppInitialize ();
8328  ;
8329  return 0;
8330}
8331_ACEOF
8332rm -f conftest.$ac_objext conftest$ac_exeext
8333if { (eval echo "$as_me:8333: \"$ac_link\"") >&5
8334  (eval $ac_link) 2>&5
8335  ac_status=$?
8336  echo "$as_me:8336: \$? = $ac_status" >&5
8337  (exit $ac_status); } &&
8338         { ac_try='test -s conftest$ac_exeext'
8339  { (eval echo "$as_me:8339: \"$ac_try\"") >&5
8340  (eval $ac_try) 2>&5
8341  ac_status=$?
8342  echo "$as_me:8342: \$? = $ac_status" >&5
8343  (exit $ac_status); }; }; then
8344  ac_cv_lib_Xt_XtAppInitialize=yes
8345else
8346  echo "$as_me: failed program was:" >&5
8347cat conftest.$ac_ext >&5
8348ac_cv_lib_Xt_XtAppInitialize=no
8349fi
8350rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8351LIBS=$ac_check_lib_save_LIBS
8352fi
8353echo "$as_me:8353: result: $ac_cv_lib_Xt_XtAppInitialize" >&5
8354echo "${ECHO_T}$ac_cv_lib_Xt_XtAppInitialize" >&6
8355if test $ac_cv_lib_Xt_XtAppInitialize = yes; then
8356  cat >>confdefs.h <<\EOF
8357#define HAVE_LIBXT 1
8358EOF
8359
8360	 cf_have_X_LIBS=Xt
8361	 LIBS="-lXt $X_PRE_LIBS $LIBS $X_EXTRA_LIBS"
8362fi
8363
8364fi
8365
8366if test $cf_have_X_LIBS = no ; then
8367	{ echo "$as_me:8367: WARNING: Unable to successfully link X Toolkit library (-lXt) with
8368test program.  You will have to check and add the proper libraries by hand
8369to makefile." >&5
8370echo "$as_me: WARNING: Unable to successfully link X Toolkit library (-lXt) with
8371test program.  You will have to check and add the proper libraries by hand
8372to makefile." >&2;}
8373fi
8374
8375for ac_header in \
8376	X11/DECkeysym.h \
8377	X11/Sunkeysym.h \
8378	X11/XF86keysym.h \
8379	X11/Xpoll.h \
8380
8381do
8382as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8383echo "$as_me:8383: checking for $ac_header" >&5
8384echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8385if eval "test \"\${$as_ac_Header+set}\" = set"; then
8386  echo $ECHO_N "(cached) $ECHO_C" >&6
8387else
8388  cat >conftest.$ac_ext <<_ACEOF
8389#line 8389 "configure"
8390#include "confdefs.h"
8391#include <$ac_header>
8392_ACEOF
8393if { (eval echo "$as_me:8393: \"$ac_cpp conftest.$ac_ext\"") >&5
8394  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8395  ac_status=$?
8396  egrep -v '^ *\+' conftest.er1 >conftest.err
8397  rm -f conftest.er1
8398  cat conftest.err >&5
8399  echo "$as_me:8399: \$? = $ac_status" >&5
8400  (exit $ac_status); } >/dev/null; then
8401  if test -s conftest.err; then
8402    ac_cpp_err=$ac_c_preproc_warn_flag
8403  else
8404    ac_cpp_err=
8405  fi
8406else
8407  ac_cpp_err=yes
8408fi
8409if test -z "$ac_cpp_err"; then
8410  eval "$as_ac_Header=yes"
8411else
8412  echo "$as_me: failed program was:" >&5
8413  cat conftest.$ac_ext >&5
8414  eval "$as_ac_Header=no"
8415fi
8416rm -f conftest.err conftest.$ac_ext
8417fi
8418echo "$as_me:8418: result: `eval echo '${'$as_ac_Header'}'`" >&5
8419echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8420if test `eval echo '${'$as_ac_Header'}'` = yes; then
8421  cat >>confdefs.h <<EOF
8422#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8423EOF
8424
8425fi
8426done
8427
8428cf_x_athena=${cf_x_athena-Xaw}
8429
8430echo "$as_me:8430: checking if you want to link with Xaw 3d library" >&5
8431echo $ECHO_N "checking if you want to link with Xaw 3d library... $ECHO_C" >&6
8432withval=
8433
8434# Check whether --with-Xaw3d or --without-Xaw3d was given.
8435if test "${with_Xaw3d+set}" = set; then
8436  withval="$with_Xaw3d"
8437
8438fi;
8439if test "$withval" = yes ; then
8440	cf_x_athena=Xaw3d
8441	echo "$as_me:8441: result: yes" >&5
8442echo "${ECHO_T}yes" >&6
8443else
8444	echo "$as_me:8444: result: no" >&5
8445echo "${ECHO_T}no" >&6
8446fi
8447
8448echo "$as_me:8448: checking if you want to link with neXT Athena library" >&5
8449echo $ECHO_N "checking if you want to link with neXT Athena library... $ECHO_C" >&6
8450withval=
8451
8452# Check whether --with-neXtaw or --without-neXtaw was given.
8453if test "${with_neXtaw+set}" = set; then
8454  withval="$with_neXtaw"
8455
8456fi;
8457if test "$withval" = yes ; then
8458	cf_x_athena=neXtaw
8459	echo "$as_me:8459: result: yes" >&5
8460echo "${ECHO_T}yes" >&6
8461else
8462	echo "$as_me:8462: result: no" >&5
8463echo "${ECHO_T}no" >&6
8464fi
8465
8466echo "$as_me:8466: checking if you want to link with Athena-Plus library" >&5
8467echo $ECHO_N "checking if you want to link with Athena-Plus library... $ECHO_C" >&6
8468withval=
8469
8470# Check whether --with-XawPlus or --without-XawPlus was given.
8471if test "${with_XawPlus+set}" = set; then
8472  withval="$with_XawPlus"
8473
8474fi;
8475if test "$withval" = yes ; then
8476	cf_x_athena=XawPlus
8477	echo "$as_me:8477: result: yes" >&5
8478echo "${ECHO_T}yes" >&6
8479else
8480	echo "$as_me:8480: result: no" >&5
8481echo "${ECHO_T}no" >&6
8482fi
8483
8484echo "$as_me:8484: checking for XextCreateExtension in -lXext" >&5
8485echo $ECHO_N "checking for XextCreateExtension in -lXext... $ECHO_C" >&6
8486if test "${ac_cv_lib_Xext_XextCreateExtension+set}" = set; then
8487  echo $ECHO_N "(cached) $ECHO_C" >&6
8488else
8489  ac_check_lib_save_LIBS=$LIBS
8490LIBS="-lXext  $LIBS"
8491cat >conftest.$ac_ext <<_ACEOF
8492#line 8492 "configure"
8493#include "confdefs.h"
8494
8495/* Override any gcc2 internal prototype to avoid an error.  */
8496#ifdef __cplusplus
8497extern "C"
8498#endif
8499/* We use char because int might match the return type of a gcc2
8500   builtin and then its argument prototype would still apply.  */
8501char XextCreateExtension ();
8502int
8503main ()
8504{
8505XextCreateExtension ();
8506  ;
8507  return 0;
8508}
8509_ACEOF
8510rm -f conftest.$ac_objext conftest$ac_exeext
8511if { (eval echo "$as_me:8511: \"$ac_link\"") >&5
8512  (eval $ac_link) 2>&5
8513  ac_status=$?
8514  echo "$as_me:8514: \$? = $ac_status" >&5
8515  (exit $ac_status); } &&
8516         { ac_try='test -s conftest$ac_exeext'
8517  { (eval echo "$as_me:8517: \"$ac_try\"") >&5
8518  (eval $ac_try) 2>&5
8519  ac_status=$?
8520  echo "$as_me:8520: \$? = $ac_status" >&5
8521  (exit $ac_status); }; }; then
8522  ac_cv_lib_Xext_XextCreateExtension=yes
8523else
8524  echo "$as_me: failed program was:" >&5
8525cat conftest.$ac_ext >&5
8526ac_cv_lib_Xext_XextCreateExtension=no
8527fi
8528rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8529LIBS=$ac_check_lib_save_LIBS
8530fi
8531echo "$as_me:8531: result: $ac_cv_lib_Xext_XextCreateExtension" >&5
8532echo "${ECHO_T}$ac_cv_lib_Xext_XextCreateExtension" >&6
8533if test $ac_cv_lib_Xext_XextCreateExtension = yes; then
8534  LIBS="-lXext $LIBS"
8535fi
8536
8537cf_x_athena_lib=""
8538
8539cf_x_athena_root=$cf_x_athena
8540cf_x_athena_include=""
8541
8542for cf_path in default \
8543	/usr/contrib/X11R6 \
8544	/usr/contrib/X11R5 \
8545	/usr/lib/X11R5 \
8546	/usr/local
8547do
8548	if test -z "$cf_x_athena_include" ; then
8549		cf_save="$CPPFLAGS"
8550		cf_test=X11/$cf_x_athena_root/SimpleMenu.h
8551		if test $cf_path != default ; then
8552			CPPFLAGS="-I$cf_path/include $cf_save"
8553			echo "$as_me:8553: checking for $cf_test in $cf_path" >&5
8554echo $ECHO_N "checking for $cf_test in $cf_path... $ECHO_C" >&6
8555		else
8556			echo "$as_me:8556: checking for $cf_test" >&5
8557echo $ECHO_N "checking for $cf_test... $ECHO_C" >&6
8558		fi
8559		cat >conftest.$ac_ext <<_ACEOF
8560#line 8560 "configure"
8561#include "confdefs.h"
8562
8563#include <X11/Intrinsic.h>
8564#include <$cf_test>
8565int
8566main ()
8567{
8568
8569  ;
8570  return 0;
8571}
8572_ACEOF
8573rm -f conftest.$ac_objext
8574if { (eval echo "$as_me:8574: \"$ac_compile\"") >&5
8575  (eval $ac_compile) 2>&5
8576  ac_status=$?
8577  echo "$as_me:8577: \$? = $ac_status" >&5
8578  (exit $ac_status); } &&
8579         { ac_try='test -s conftest.$ac_objext'
8580  { (eval echo "$as_me:8580: \"$ac_try\"") >&5
8581  (eval $ac_try) 2>&5
8582  ac_status=$?
8583  echo "$as_me:8583: \$? = $ac_status" >&5
8584  (exit $ac_status); }; }; then
8585  cf_result=yes
8586else
8587  echo "$as_me: failed program was:" >&5
8588cat conftest.$ac_ext >&5
8589cf_result=no
8590fi
8591rm -f conftest.$ac_objext conftest.$ac_ext
8592		echo "$as_me:8592: result: $cf_result" >&5
8593echo "${ECHO_T}$cf_result" >&6
8594		if test "$cf_result" = yes ; then
8595			cf_x_athena_include=$cf_path
8596			break
8597		else
8598			CPPFLAGS="$cf_save"
8599		fi
8600	fi
8601done
8602
8603if test -z "$cf_x_athena_include" ; then
8604	{ echo "$as_me:8604: WARNING: Unable to successfully find Athena header files with test program" >&5
8605echo "$as_me: WARNING: Unable to successfully find Athena header files with test program" >&2;}
8606elif test "$cf_x_athena_include" != default ; then
8607	CPPFLAGS="$CPPFLAGS -I$cf_x_athena_include"
8608fi
8609
8610cf_x_athena_root=$cf_x_athena
8611cf_x_athena_lib=""
8612
8613for cf_path in default \
8614	/usr/contrib/X11R6 \
8615	/usr/contrib/X11R5 \
8616	/usr/lib/X11R5 \
8617	/usr/local
8618do
8619	for cf_lib in \
8620		"-l$cf_x_athena_root -lXmu" \
8621		"-l$cf_x_athena_root -lXpm -lXmu" \
8622		"-l${cf_x_athena_root}_s -lXmu_s"
8623	do
8624		if test -z "$cf_x_athena_lib" ; then
8625			cf_save="$LIBS"
8626			cf_test=XawSimpleMenuAddGlobalActions
8627			if test $cf_path != default ; then
8628				LIBS="-L$cf_path/lib $cf_lib $LIBS"
8629				echo "$as_me:8629: checking for $cf_lib in $cf_path" >&5
8630echo $ECHO_N "checking for $cf_lib in $cf_path... $ECHO_C" >&6
8631			else
8632				LIBS="$cf_lib $LIBS"
8633				echo "$as_me:8633: checking for $cf_test in $cf_lib" >&5
8634echo $ECHO_N "checking for $cf_test in $cf_lib... $ECHO_C" >&6
8635			fi
8636			cat >conftest.$ac_ext <<_ACEOF
8637#line 8637 "configure"
8638#include "confdefs.h"
8639
8640int
8641main ()
8642{
8643$cf_test()
8644  ;
8645  return 0;
8646}
8647_ACEOF
8648rm -f conftest.$ac_objext conftest$ac_exeext
8649if { (eval echo "$as_me:8649: \"$ac_link\"") >&5
8650  (eval $ac_link) 2>&5
8651  ac_status=$?
8652  echo "$as_me:8652: \$? = $ac_status" >&5
8653  (exit $ac_status); } &&
8654         { ac_try='test -s conftest$ac_exeext'
8655  { (eval echo "$as_me:8655: \"$ac_try\"") >&5
8656  (eval $ac_try) 2>&5
8657  ac_status=$?
8658  echo "$as_me:8658: \$? = $ac_status" >&5
8659  (exit $ac_status); }; }; then
8660  cf_result=yes
8661else
8662  echo "$as_me: failed program was:" >&5
8663cat conftest.$ac_ext >&5
8664cf_result=no
8665fi
8666rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8667			echo "$as_me:8667: result: $cf_result" >&5
8668echo "${ECHO_T}$cf_result" >&6
8669			if test "$cf_result" = yes ; then
8670				cf_x_athena_lib="$cf_lib"
8671				break
8672			fi
8673			LIBS="$cf_save"
8674		fi
8675	done
8676done
8677
8678if test -z "$cf_x_athena_lib" ; then
8679	{ { echo "$as_me:8679: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&5
8680echo "$as_me: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&2;}
8681   { (exit 1); exit 1; }; }
8682fi
8683
8684cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
8685
8686cat >>confdefs.h <<EOF
8687#define $cf_x_athena_LIBS 1
8688EOF
8689
8690for ac_header in X11/Xpoll.h
8691do
8692as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8693echo "$as_me:8693: checking for $ac_header" >&5
8694echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8695if eval "test \"\${$as_ac_Header+set}\" = set"; then
8696  echo $ECHO_N "(cached) $ECHO_C" >&6
8697else
8698  cat >conftest.$ac_ext <<_ACEOF
8699#line 8699 "configure"
8700#include "confdefs.h"
8701#include <$ac_header>
8702_ACEOF
8703if { (eval echo "$as_me:8703: \"$ac_cpp conftest.$ac_ext\"") >&5
8704  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8705  ac_status=$?
8706  egrep -v '^ *\+' conftest.er1 >conftest.err
8707  rm -f conftest.er1
8708  cat conftest.err >&5
8709  echo "$as_me:8709: \$? = $ac_status" >&5
8710  (exit $ac_status); } >/dev/null; then
8711  if test -s conftest.err; then
8712    ac_cpp_err=$ac_c_preproc_warn_flag
8713  else
8714    ac_cpp_err=
8715  fi
8716else
8717  ac_cpp_err=yes
8718fi
8719if test -z "$ac_cpp_err"; then
8720  eval "$as_ac_Header=yes"
8721else
8722  echo "$as_me: failed program was:" >&5
8723  cat conftest.$ac_ext >&5
8724  eval "$as_ac_Header=no"
8725fi
8726rm -f conftest.err conftest.$ac_ext
8727fi
8728echo "$as_me:8728: result: `eval echo '${'$as_ac_Header'}'`" >&5
8729echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8730if test `eval echo '${'$as_ac_Header'}'` = yes; then
8731  cat >>confdefs.h <<EOF
8732#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8733EOF
8734
8735fi
8736done
8737
8738echo "$as_me:8738: checking for declaration of fd_set" >&5
8739echo $ECHO_N "checking for declaration of fd_set... $ECHO_C" >&6
8740if test "${cf_cv_type_fd_set+set}" = set; then
8741  echo $ECHO_N "(cached) $ECHO_C" >&6
8742else
8743
8744echo "${as_me-configure}:8744: testing sys/types alone ..." 1>&5
8745
8746cat >conftest.$ac_ext <<_ACEOF
8747#line 8747 "configure"
8748#include "confdefs.h"
8749
8750#include <sys/types.h>
8751int
8752main ()
8753{
8754fd_set x
8755  ;
8756  return 0;
8757}
8758_ACEOF
8759rm -f conftest.$ac_objext
8760if { (eval echo "$as_me:8760: \"$ac_compile\"") >&5
8761  (eval $ac_compile) 2>&5
8762  ac_status=$?
8763  echo "$as_me:8763: \$? = $ac_status" >&5
8764  (exit $ac_status); } &&
8765         { ac_try='test -s conftest.$ac_objext'
8766  { (eval echo "$as_me:8766: \"$ac_try\"") >&5
8767  (eval $ac_try) 2>&5
8768  ac_status=$?
8769  echo "$as_me:8769: \$? = $ac_status" >&5
8770  (exit $ac_status); }; }; then
8771  cf_cv_type_fd_set=sys/types.h
8772else
8773  echo "$as_me: failed program was:" >&5
8774cat conftest.$ac_ext >&5
8775
8776echo "${as_me-configure}:8776: testing X11/Xpoll.h ..." 1>&5
8777
8778cat >conftest.$ac_ext <<_ACEOF
8779#line 8779 "configure"
8780#include "confdefs.h"
8781
8782#ifdef HAVE_X11_XPOLL_H
8783#include <X11/Xpoll.h>
8784#endif
8785int
8786main ()
8787{
8788fd_set x
8789  ;
8790  return 0;
8791}
8792_ACEOF
8793rm -f conftest.$ac_objext
8794if { (eval echo "$as_me:8794: \"$ac_compile\"") >&5
8795  (eval $ac_compile) 2>&5
8796  ac_status=$?
8797  echo "$as_me:8797: \$? = $ac_status" >&5
8798  (exit $ac_status); } &&
8799         { ac_try='test -s conftest.$ac_objext'
8800  { (eval echo "$as_me:8800: \"$ac_try\"") >&5
8801  (eval $ac_try) 2>&5
8802  ac_status=$?
8803  echo "$as_me:8803: \$? = $ac_status" >&5
8804  (exit $ac_status); }; }; then
8805  cf_cv_type_fd_set=X11/Xpoll.h
8806else
8807  echo "$as_me: failed program was:" >&5
8808cat conftest.$ac_ext >&5
8809
8810echo "${as_me-configure}:8810: testing sys/select.h ..." 1>&5
8811
8812cat >conftest.$ac_ext <<_ACEOF
8813#line 8813 "configure"
8814#include "confdefs.h"
8815
8816#include <sys/types.h>
8817#include <sys/select.h>
8818int
8819main ()
8820{
8821fd_set x
8822  ;
8823  return 0;
8824}
8825_ACEOF
8826rm -f conftest.$ac_objext
8827if { (eval echo "$as_me:8827: \"$ac_compile\"") >&5
8828  (eval $ac_compile) 2>&5
8829  ac_status=$?
8830  echo "$as_me:8830: \$? = $ac_status" >&5
8831  (exit $ac_status); } &&
8832         { ac_try='test -s conftest.$ac_objext'
8833  { (eval echo "$as_me:8833: \"$ac_try\"") >&5
8834  (eval $ac_try) 2>&5
8835  ac_status=$?
8836  echo "$as_me:8836: \$? = $ac_status" >&5
8837  (exit $ac_status); }; }; then
8838  cf_cv_type_fd_set=sys/select.h
8839else
8840  echo "$as_me: failed program was:" >&5
8841cat conftest.$ac_ext >&5
8842cf_cv_type_fd_set=unknown
8843fi
8844rm -f conftest.$ac_objext conftest.$ac_ext
8845fi
8846rm -f conftest.$ac_objext conftest.$ac_ext
8847fi
8848rm -f conftest.$ac_objext conftest.$ac_ext
8849fi
8850echo "$as_me:8850: result: $cf_cv_type_fd_set" >&5
8851echo "${ECHO_T}$cf_cv_type_fd_set" >&6
8852if test $cf_cv_type_fd_set = sys/select.h ; then
8853	cat >>confdefs.h <<\EOF
8854#define USE_SYS_SELECT_H 1
8855EOF
8856
8857fi
8858
8859echo "$as_me:8859: checking for declaration of fd_mask" >&5
8860echo $ECHO_N "checking for declaration of fd_mask... $ECHO_C" >&6
8861if test "${cf_cv_type_fd_mask+set}" = set; then
8862  echo $ECHO_N "(cached) $ECHO_C" >&6
8863else
8864
8865    if test x$cf_cv_type_fd_set = xX11/Xpoll.h ; then
8866        cat >conftest.$ac_ext <<_ACEOF
8867#line 8867 "configure"
8868#include "confdefs.h"
8869
8870#include <X11/Xpoll.h>
8871int
8872main ()
8873{
8874fd_mask x
8875  ;
8876  return 0;
8877}
8878_ACEOF
8879rm -f conftest.$ac_objext
8880if { (eval echo "$as_me:8880: \"$ac_compile\"") >&5
8881  (eval $ac_compile) 2>&5
8882  ac_status=$?
8883  echo "$as_me:8883: \$? = $ac_status" >&5
8884  (exit $ac_status); } &&
8885         { ac_try='test -s conftest.$ac_objext'
8886  { (eval echo "$as_me:8886: \"$ac_try\"") >&5
8887  (eval $ac_try) 2>&5
8888  ac_status=$?
8889  echo "$as_me:8889: \$? = $ac_status" >&5
8890  (exit $ac_status); }; }; then
8891  :
8892else
8893  echo "$as_me: failed program was:" >&5
8894cat conftest.$ac_ext >&5
8895
8896echo "${as_me-configure}:8896: testing if we must define CSRG_BASED ..." 1>&5
8897
8898# Xosdefs.h on Mac OS X may not define this (but it should).
8899            cat >conftest.$ac_ext <<_ACEOF
8900#line 8900 "configure"
8901#include "confdefs.h"
8902
8903#define CSRG_BASED
8904#include <X11/Xpoll.h>
8905int
8906main ()
8907{
8908fd_mask x
8909  ;
8910  return 0;
8911}
8912_ACEOF
8913rm -f conftest.$ac_objext
8914if { (eval echo "$as_me:8914: \"$ac_compile\"") >&5
8915  (eval $ac_compile) 2>&5
8916  ac_status=$?
8917  echo "$as_me:8917: \$? = $ac_status" >&5
8918  (exit $ac_status); } &&
8919         { ac_try='test -s conftest.$ac_objext'
8920  { (eval echo "$as_me:8920: \"$ac_try\"") >&5
8921  (eval $ac_try) 2>&5
8922  ac_status=$?
8923  echo "$as_me:8923: \$? = $ac_status" >&5
8924  (exit $ac_status); }; }; then
8925  cf_cv_type_fd_mask=CSRG_BASED
8926else
8927  echo "$as_me: failed program was:" >&5
8928cat conftest.$ac_ext >&5
8929fi
8930rm -f conftest.$ac_objext conftest.$ac_ext
8931fi
8932rm -f conftest.$ac_objext conftest.$ac_ext
8933    else
8934        cf_cv_type_fd_mask=$cf_cv_type_fd_set
8935    fi
8936
8937fi
8938echo "$as_me:8938: result: $cf_cv_type_fd_mask" >&5
8939echo "${ECHO_T}$cf_cv_type_fd_mask" >&6
8940if test x$cf_cv_type_fd_mask = xCSRG_BASED ; then
8941    cat >>confdefs.h <<\EOF
8942#define CSRG_BASED 1
8943EOF
8944
8945fi
8946
8947echo "$as_me:8947: checking for IRIX 6.5 baud-rate redefinitions" >&5
8948echo $ECHO_N "checking for IRIX 6.5 baud-rate redefinitions... $ECHO_C" >&6
8949if test "${cf_cv_termio_c_ispeed+set}" = set; then
8950  echo $ECHO_N "(cached) $ECHO_C" >&6
8951else
8952
8953cat >conftest.$ac_ext <<_ACEOF
8954#line 8954 "configure"
8955#include "confdefs.h"
8956
8957#include <sys/types.h>
8958#include <sys/termio.h>
8959int
8960main ()
8961{
8962
8963struct termio foo;
8964foo.c_ispeed = B38400;
8965foo.c_ospeed = B9600;
8966
8967  ;
8968  return 0;
8969}
8970_ACEOF
8971rm -f conftest.$ac_objext
8972if { (eval echo "$as_me:8972: \"$ac_compile\"") >&5
8973  (eval $ac_compile) 2>&5
8974  ac_status=$?
8975  echo "$as_me:8975: \$? = $ac_status" >&5
8976  (exit $ac_status); } &&
8977         { ac_try='test -s conftest.$ac_objext'
8978  { (eval echo "$as_me:8978: \"$ac_try\"") >&5
8979  (eval $ac_try) 2>&5
8980  ac_status=$?
8981  echo "$as_me:8981: \$? = $ac_status" >&5
8982  (exit $ac_status); }; }; then
8983  cf_cv_termio_c_ispeed=yes
8984
8985else
8986  echo "$as_me: failed program was:" >&5
8987cat conftest.$ac_ext >&5
8988cf_cv_termio_c_ispeed=no
8989fi
8990rm -f conftest.$ac_objext conftest.$ac_ext
8991
8992fi
8993echo "$as_me:8993: result: $cf_cv_termio_c_ispeed" >&5
8994echo "${ECHO_T}$cf_cv_termio_c_ispeed" >&6
8995test "$cf_cv_termio_c_ispeed" = yes && cat >>confdefs.h <<\EOF
8996#define HAVE_TERMIO_C_ISPEED 1
8997EOF
8998
8999LIBS="$LIBS $X_EXTRA_LIBS"
9000
9001# Check for openpty() in -lutil if the UNIX98-style pty functions are not
9002# available. E.g. for GNU libc 2.0.
9003case $host_os in #(vi
9004freebsd*|netbsd*)	# 2004/8/15 - revisit this if/when grantpt is known to work.
9005
9006echo "$as_me:9006: checking for openpty in -lutil" >&5
9007echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
9008if test "${ac_cv_lib_util_openpty+set}" = set; then
9009  echo $ECHO_N "(cached) $ECHO_C" >&6
9010else
9011  ac_check_lib_save_LIBS=$LIBS
9012LIBS="-lutil  $LIBS"
9013cat >conftest.$ac_ext <<_ACEOF
9014#line 9014 "configure"
9015#include "confdefs.h"
9016
9017/* Override any gcc2 internal prototype to avoid an error.  */
9018#ifdef __cplusplus
9019extern "C"
9020#endif
9021/* We use char because int might match the return type of a gcc2
9022   builtin and then its argument prototype would still apply.  */
9023char openpty ();
9024int
9025main ()
9026{
9027openpty ();
9028  ;
9029  return 0;
9030}
9031_ACEOF
9032rm -f conftest.$ac_objext conftest$ac_exeext
9033if { (eval echo "$as_me:9033: \"$ac_link\"") >&5
9034  (eval $ac_link) 2>&5
9035  ac_status=$?
9036  echo "$as_me:9036: \$? = $ac_status" >&5
9037  (exit $ac_status); } &&
9038         { ac_try='test -s conftest$ac_exeext'
9039  { (eval echo "$as_me:9039: \"$ac_try\"") >&5
9040  (eval $ac_try) 2>&5
9041  ac_status=$?
9042  echo "$as_me:9042: \$? = $ac_status" >&5
9043  (exit $ac_status); }; }; then
9044  ac_cv_lib_util_openpty=yes
9045else
9046  echo "$as_me: failed program was:" >&5
9047cat conftest.$ac_ext >&5
9048ac_cv_lib_util_openpty=no
9049fi
9050rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9051LIBS=$ac_check_lib_save_LIBS
9052fi
9053echo "$as_me:9053: result: $ac_cv_lib_util_openpty" >&5
9054echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
9055if test $ac_cv_lib_util_openpty = yes; then
9056  cat >>confdefs.h <<EOF
9057#define HAVE_LIBUTIL 1
9058EOF
9059
9060  LIBS="-lutil $LIBS"
9061
9062fi
9063
9064	;;
9065*)
9066
9067for ac_func in grantpt
9068do
9069as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9070echo "$as_me:9070: checking for $ac_func" >&5
9071echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9072if eval "test \"\${$as_ac_var+set}\" = set"; then
9073  echo $ECHO_N "(cached) $ECHO_C" >&6
9074else
9075  cat >conftest.$ac_ext <<_ACEOF
9076#line 9076 "configure"
9077#include "confdefs.h"
9078/* System header to define __stub macros and hopefully few prototypes,
9079    which can conflict with char $ac_func (); below.  */
9080#include <assert.h>
9081/* Override any gcc2 internal prototype to avoid an error.  */
9082#ifdef __cplusplus
9083extern "C"
9084#endif
9085/* We use char because int might match the return type of a gcc2
9086   builtin and then its argument prototype would still apply.  */
9087char $ac_func ();
9088char (*f) ();
9089
9090int
9091main ()
9092{
9093/* The GNU C library defines this for functions which it implements
9094    to always fail with ENOSYS.  Some functions are actually named
9095    something starting with __ and the normal name is an alias.  */
9096#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9097choke me
9098#else
9099f = $ac_func;
9100#endif
9101
9102  ;
9103  return 0;
9104}
9105_ACEOF
9106rm -f conftest.$ac_objext conftest$ac_exeext
9107if { (eval echo "$as_me:9107: \"$ac_link\"") >&5
9108  (eval $ac_link) 2>&5
9109  ac_status=$?
9110  echo "$as_me:9110: \$? = $ac_status" >&5
9111  (exit $ac_status); } &&
9112         { ac_try='test -s conftest$ac_exeext'
9113  { (eval echo "$as_me:9113: \"$ac_try\"") >&5
9114  (eval $ac_try) 2>&5
9115  ac_status=$?
9116  echo "$as_me:9116: \$? = $ac_status" >&5
9117  (exit $ac_status); }; }; then
9118  eval "$as_ac_var=yes"
9119else
9120  echo "$as_me: failed program was:" >&5
9121cat conftest.$ac_ext >&5
9122eval "$as_ac_var=no"
9123fi
9124rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9125fi
9126echo "$as_me:9126: result: `eval echo '${'$as_ac_var'}'`" >&5
9127echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
9128if test `eval echo '${'$as_ac_var'}'` = yes; then
9129  cat >>confdefs.h <<EOF
9130#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9131EOF
9132
9133else
9134
9135echo "$as_me:9135: checking for openpty in -lutil" >&5
9136echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
9137if test "${ac_cv_lib_util_openpty+set}" = set; then
9138  echo $ECHO_N "(cached) $ECHO_C" >&6
9139else
9140  ac_check_lib_save_LIBS=$LIBS
9141LIBS="-lutil  $LIBS"
9142cat >conftest.$ac_ext <<_ACEOF
9143#line 9143 "configure"
9144#include "confdefs.h"
9145
9146/* Override any gcc2 internal prototype to avoid an error.  */
9147#ifdef __cplusplus
9148extern "C"
9149#endif
9150/* We use char because int might match the return type of a gcc2
9151   builtin and then its argument prototype would still apply.  */
9152char openpty ();
9153int
9154main ()
9155{
9156openpty ();
9157  ;
9158  return 0;
9159}
9160_ACEOF
9161rm -f conftest.$ac_objext conftest$ac_exeext
9162if { (eval echo "$as_me:9162: \"$ac_link\"") >&5
9163  (eval $ac_link) 2>&5
9164  ac_status=$?
9165  echo "$as_me:9165: \$? = $ac_status" >&5
9166  (exit $ac_status); } &&
9167         { ac_try='test -s conftest$ac_exeext'
9168  { (eval echo "$as_me:9168: \"$ac_try\"") >&5
9169  (eval $ac_try) 2>&5
9170  ac_status=$?
9171  echo "$as_me:9171: \$? = $ac_status" >&5
9172  (exit $ac_status); }; }; then
9173  ac_cv_lib_util_openpty=yes
9174else
9175  echo "$as_me: failed program was:" >&5
9176cat conftest.$ac_ext >&5
9177ac_cv_lib_util_openpty=no
9178fi
9179rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9180LIBS=$ac_check_lib_save_LIBS
9181fi
9182echo "$as_me:9182: result: $ac_cv_lib_util_openpty" >&5
9183echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
9184if test $ac_cv_lib_util_openpty = yes; then
9185  cat >>confdefs.h <<EOF
9186#define HAVE_LIBUTIL 1
9187EOF
9188
9189  LIBS="-lutil $LIBS"
9190
9191fi
9192
9193fi
9194done
9195
9196	;;
9197esac
9198
9199echo "$as_me:9199: checking for XKB Bell extension" >&5
9200echo $ECHO_N "checking for XKB Bell extension... $ECHO_C" >&6
9201if test "${cf_cv_xkb_bell_ext+set}" = set; then
9202  echo $ECHO_N "(cached) $ECHO_C" >&6
9203else
9204
9205cat >conftest.$ac_ext <<_ACEOF
9206#line 9206 "configure"
9207#include "confdefs.h"
9208
9209#include <X11/XKBlib.h>		/* has the prototype */
9210#include <X11/extensions/XKBbells.h>	/* has the XkbBI_xxx definitions */
9211
9212int
9213main ()
9214{
9215
9216int x = XkbBI_Info
9217	|XkbBI_MinorError
9218	|XkbBI_MajorError
9219	|XkbBI_TerminalBell
9220	|XkbBI_MarginBell;
9221
9222  ;
9223  return 0;
9224}
9225_ACEOF
9226rm -f conftest.$ac_objext conftest$ac_exeext
9227if { (eval echo "$as_me:9227: \"$ac_link\"") >&5
9228  (eval $ac_link) 2>&5
9229  ac_status=$?
9230  echo "$as_me:9230: \$? = $ac_status" >&5
9231  (exit $ac_status); } &&
9232         { ac_try='test -s conftest$ac_exeext'
9233  { (eval echo "$as_me:9233: \"$ac_try\"") >&5
9234  (eval $ac_try) 2>&5
9235  ac_status=$?
9236  echo "$as_me:9236: \$? = $ac_status" >&5
9237  (exit $ac_status); }; }; then
9238  cf_cv_xkb_bell_ext=yes
9239else
9240  echo "$as_me: failed program was:" >&5
9241cat conftest.$ac_ext >&5
9242cf_cv_xkb_bell_ext=no
9243fi
9244rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9245
9246fi
9247echo "$as_me:9247: result: $cf_cv_xkb_bell_ext" >&5
9248echo "${ECHO_T}$cf_cv_xkb_bell_ext" >&6
9249
9250test "$cf_cv_xkb_bell_ext" = yes && cat >>confdefs.h <<\EOF
9251#define HAVE_XKB_BELL_EXT 1
9252EOF
9253
9254for ac_func in Xutf8LookupString
9255do
9256as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9257echo "$as_me:9257: checking for $ac_func" >&5
9258echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9259if eval "test \"\${$as_ac_var+set}\" = set"; then
9260  echo $ECHO_N "(cached) $ECHO_C" >&6
9261else
9262  cat >conftest.$ac_ext <<_ACEOF
9263#line 9263 "configure"
9264#include "confdefs.h"
9265/* System header to define __stub macros and hopefully few prototypes,
9266    which can conflict with char $ac_func (); below.  */
9267#include <assert.h>
9268/* Override any gcc2 internal prototype to avoid an error.  */
9269#ifdef __cplusplus
9270extern "C"
9271#endif
9272/* We use char because int might match the return type of a gcc2
9273   builtin and then its argument prototype would still apply.  */
9274char $ac_func ();
9275char (*f) ();
9276
9277int
9278main ()
9279{
9280/* The GNU C library defines this for functions which it implements
9281    to always fail with ENOSYS.  Some functions are actually named
9282    something starting with __ and the normal name is an alias.  */
9283#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9284choke me
9285#else
9286f = $ac_func;
9287#endif
9288
9289  ;
9290  return 0;
9291}
9292_ACEOF
9293rm -f conftest.$ac_objext conftest$ac_exeext
9294if { (eval echo "$as_me:9294: \"$ac_link\"") >&5
9295  (eval $ac_link) 2>&5
9296  ac_status=$?
9297  echo "$as_me:9297: \$? = $ac_status" >&5
9298  (exit $ac_status); } &&
9299         { ac_try='test -s conftest$ac_exeext'
9300  { (eval echo "$as_me:9300: \"$ac_try\"") >&5
9301  (eval $ac_try) 2>&5
9302  ac_status=$?
9303  echo "$as_me:9303: \$? = $ac_status" >&5
9304  (exit $ac_status); }; }; then
9305  eval "$as_ac_var=yes"
9306else
9307  echo "$as_me: failed program was:" >&5
9308cat conftest.$ac_ext >&5
9309eval "$as_ac_var=no"
9310fi
9311rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9312fi
9313echo "$as_me:9313: result: `eval echo '${'$as_ac_var'}'`" >&5
9314echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
9315if test `eval echo '${'$as_ac_var'}'` = yes; then
9316  cat >>confdefs.h <<EOF
9317#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9318EOF
9319
9320else
9321
9322	EXTRAHDRS="$EXTRAHDRS xutf8.h"
9323	EXTRASRCS="$EXTRASRCS xutf8.c"
9324	EXTRAOBJS="$EXTRAOBJS xutf8.o"
9325
9326fi
9327done
9328
9329echo "$as_me:9329: checking if you want narrow prototypes for X libraries" >&5
9330echo $ECHO_N "checking if you want narrow prototypes for X libraries... $ECHO_C" >&6
9331
9332case `$ac_config_guess` in #(vi
9333*cygwin*|*freebsd*|*gnu*|*irix5*|*irix6*|*linux-gnu*|*netbsd*|*openbsd*|*qnx*|*sco*|*sgi*) #(vi
9334	cf_default_narrowproto=yes
9335	;;
9336*)
9337	cf_default_narrowproto=no
9338	;;
9339esac
9340
9341# Check whether --enable-narrowproto or --disable-narrowproto was given.
9342if test "${enable_narrowproto+set}" = set; then
9343  enableval="$enable_narrowproto"
9344  test "$enableval" != no && enableval=yes
9345  if test "$enableval" != "$cf_default_narrowproto" ; then
9346    enable_narrowproto=$enableval
9347  else
9348    enable_narrowproto=$cf_default_narrowproto
9349  fi
9350else
9351  enableval=$cf_default_narrowproto
9352  enable_narrowproto=$cf_default_narrowproto
9353
9354fi;
9355echo "$as_me:9355: result: $enable_narrowproto" >&5
9356echo "${ECHO_T}$enable_narrowproto" >&6
9357
9358echo "$as_me:9358: checking if we should use imake to help" >&5
9359echo $ECHO_N "checking if we should use imake to help... $ECHO_C" >&6
9360
9361# Check whether --enable-imake or --disable-imake was given.
9362if test "${enable_imake+set}" = set; then
9363  enableval="$enable_imake"
9364  test "$enableval" != no && enableval=yes
9365  if test "$enableval" != "yes" ; then
9366    enable_imake=no
9367  else
9368    enable_imake=yes
9369  fi
9370else
9371  enableval=yes
9372  enable_imake=yes
9373
9374fi;
9375echo "$as_me:9375: result: $enable_imake" >&5
9376echo "${ECHO_T}$enable_imake" >&6
9377
9378if test "$enable_imake" = yes ; then
9379
9380for ac_prog in xmkmf imake
9381do
9382  # Extract the first word of "$ac_prog", so it can be a program name with args.
9383set dummy $ac_prog; ac_word=$2
9384echo "$as_me:9384: checking for $ac_word" >&5
9385echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9386if test "${ac_cv_path_IMAKE+set}" = set; then
9387  echo $ECHO_N "(cached) $ECHO_C" >&6
9388else
9389  case $IMAKE in
9390  [\\/]* | ?:[\\/]*)
9391  ac_cv_path_IMAKE="$IMAKE" # Let the user override the test with a path.
9392  ;;
9393  *)
9394  ac_save_IFS=$IFS; IFS=$ac_path_separator
9395ac_dummy="$PATH"
9396for ac_dir in $ac_dummy; do
9397  IFS=$ac_save_IFS
9398  test -z "$ac_dir" && ac_dir=.
9399  if $as_executable_p "$ac_dir/$ac_word"; then
9400   ac_cv_path_IMAKE="$ac_dir/$ac_word"
9401   echo "$as_me:9401: found $ac_dir/$ac_word" >&5
9402   break
9403fi
9404done
9405
9406  ;;
9407esac
9408fi
9409IMAKE=$ac_cv_path_IMAKE
9410
9411if test -n "$IMAKE"; then
9412  echo "$as_me:9412: result: $IMAKE" >&5
9413echo "${ECHO_T}$IMAKE" >&6
9414else
9415  echo "$as_me:9415: result: no" >&5
9416echo "${ECHO_T}no" >&6
9417fi
9418
9419  test -n "$IMAKE" && break
9420done
9421
9422if test -n "$IMAKE" ; then
9423
9424case $IMAKE in # (vi
9425*/imake)
9426	cf_imake_opts="-DUseInstalled=YES" # (vi
9427	;;
9428*/util/xmkmf)
9429	# A single parameter tells xmkmf where the config-files are:
9430	cf_imake_opts="`echo $IMAKE|sed -e s,/config/util/xmkmf,,`" # (vi
9431	;;
9432*)
9433	cf_imake_opts=
9434	;;
9435esac
9436
9437# If it's installed properly, imake (or its wrapper, xmkmf) will point to the
9438# config directory.
9439if mkdir conftestdir; then
9440	CDPATH=; export CDPATH
9441	cf_makefile=`cd $srcdir;pwd`/Imakefile
9442	cd conftestdir
9443
9444	cat >fix_cflags.sed <<'CF_EOF'
9445s/\\//g
9446s/[ 	][ 	]*/ /g
9447s/"//g
9448:pack
9449s/\(=[^ ][^ ]*\) \([^-]\)/\1	\2/g
9450t pack
9451s/\(-D[a-zA-Z0-9_][a-zA-Z0-9_]*\)=\([^\'0-9 ][^ ]*\)/\1='\\"\2\\"'/g
9452s/^IMAKE[ ]/IMAKE_CFLAGS="/
9453s/	/ /g
9454s/$/"/
9455CF_EOF
9456
9457	cat >fix_lflags.sed <<'CF_EOF'
9458s/^IMAKE[ 	]*/IMAKE_LOADFLAGS="/
9459s/$/"/
9460CF_EOF
9461
9462	echo >./Imakefile
9463	test -f $cf_makefile && cat $cf_makefile >>./Imakefile
9464
9465	cat >> ./Imakefile <<'CF_EOF'
9466findstddefs:
9467	@echo IMAKE ${ALLDEFINES} $(MAIN_DEFINES) $(VENDORMANDEFS)       | sed -f fix_cflags.sed
9468	@echo IMAKE ${EXTRA_LOAD_FLAGS} | sed -f fix_lflags.sed
9469CF_EOF
9470
9471	if ( $IMAKE $cf_imake_opts 1>/dev/null 2>&5 && test -f Makefile)
9472	then
9473		test -n "$verbose" && echo "	Using $IMAKE $cf_imake_opts" 1>&6
9474
9475echo "${as_me-configure}:9475: testing Using $IMAKE $cf_imake_opts ..." 1>&5
9476
9477	else
9478		# sometimes imake doesn't have the config path compiled in.  Find it.
9479		cf_config=
9480		for cf_libpath in $X_LIBS $LIBS ; do
9481			case $cf_libpath in # (vi
9482			-L*)
9483				cf_libpath=`echo .$cf_libpath | sed -e 's/^...//'`
9484				cf_libpath=$cf_libpath/X11/config
9485				if test -d $cf_libpath ; then
9486					cf_config=$cf_libpath
9487					break
9488				fi
9489				;;
9490			esac
9491		done
9492		if test -z "$cf_config" ; then
9493			{ echo "$as_me:9493: WARNING: Could not find imake config-directory" >&5
9494echo "$as_me: WARNING: Could not find imake config-directory" >&2;}
9495		else
9496			cf_imake_opts="$cf_imake_opts -I$cf_config"
9497			if ( $IMAKE -v $cf_imake_opts 2>&5)
9498			then
9499				test -n "$verbose" && echo "	Using $IMAKE $cf_config" 1>&6
9500
9501echo "${as_me-configure}:9501: testing Using $IMAKE $cf_config ..." 1>&5
9502
9503			else
9504				{ echo "$as_me:9504: WARNING: Cannot run $IMAKE" >&5
9505echo "$as_me: WARNING: Cannot run $IMAKE" >&2;}
9506			fi
9507		fi
9508	fi
9509
9510	# GNU make sometimes prints "make[1]: Entering...", which
9511	# would confuse us.
9512	eval `make findstddefs 2>/dev/null | grep -v make`
9513
9514	cd ..
9515	rm -rf conftestdir
9516
9517	# We use ${ALLDEFINES} rather than ${STD_DEFINES} because the former
9518	# declares XTFUNCPROTO there.  However, some vendors (e.g., SGI) have
9519	# modified it to support site.cf, adding a kludge for the /usr/include
9520	# directory.  Try to filter that out, otherwise gcc won't find its
9521	# headers.
9522	if test -n "$GCC" ; then
9523	    if test -n "$IMAKE_CFLAGS" ; then
9524		cf_nostdinc=""
9525		cf_std_incl=""
9526		cf_cpp_opts=""
9527		for cf_opt in $IMAKE_CFLAGS
9528		do
9529		    case "$cf_opt" in
9530		    -nostdinc) #(vi
9531			cf_nostdinc="$cf_opt"
9532			;;
9533		    -I/usr/include) #(vi
9534			cf_std_incl="$cf_opt"
9535			;;
9536		    *) #(vi
9537			cf_cpp_opts="$cf_cpp_opts $cf_opt"
9538			;;
9539		    esac
9540		done
9541		if test -z "$cf_nostdinc" ; then
9542		    IMAKE_CFLAGS="$cf_cpp_opts $cf_std_incl"
9543		elif test -z "$cf_std_incl" ; then
9544		    IMAKE_CFLAGS="$cf_cpp_opts $cf_nostdinc"
9545		else
9546		    test -n "$verbose" && echo "	suppressed \"$cf_nostdinc\" and \"$cf_std_incl\"" 1>&6
9547
9548echo "${as_me-configure}:9548: testing suppressed \"$cf_nostdinc\" and \"$cf_std_incl\" ..." 1>&5
9549
9550		    IMAKE_CFLAGS="$cf_cpp_opts"
9551		fi
9552	    fi
9553	fi
9554fi
9555
9556# Some imake configurations define PROJECTROOT with an empty value.  Remove
9557# the empty definition.
9558case $IMAKE_CFLAGS in
9559*-DPROJECTROOT=/*)
9560	;;
9561*)
9562	IMAKE_CFLAGS=`echo "$IMAKE_CFLAGS" |sed -e "s,-DPROJECTROOT=[ 	], ,"`
9563	;;
9564esac
9565
9566fi
9567
9568test -n "$verbose" && echo "	IMAKE_CFLAGS $IMAKE_CFLAGS" 1>&6
9569
9570echo "${as_me-configure}:9570: testing IMAKE_CFLAGS $IMAKE_CFLAGS ..." 1>&5
9571
9572test -n "$verbose" && echo "	IMAKE_LOADFLAGS $IMAKE_LOADFLAGS" 1>&6
9573
9574echo "${as_me-configure}:9574: testing IMAKE_LOADFLAGS $IMAKE_LOADFLAGS ..." 1>&5
9575
9576fi
9577
9578if test -n "$IMAKE" && test -n "$IMAKE_CFLAGS" ; then
9579
9580cf_fix_cppflags=no
9581cf_new_cflags=
9582cf_new_cppflags=
9583cf_new_extra_cppflags=
9584
9585for cf_add_cflags in $IMAKE_CFLAGS
9586do
9587case $cf_fix_cppflags in
9588no)
9589	case $cf_add_cflags in #(vi
9590	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
9591		case $cf_add_cflags in
9592		-D*)
9593			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9594
9595			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
9596			&& test -z "${cf_tst_cflags}" \
9597			&& cf_fix_cppflags=yes
9598
9599			if test $cf_fix_cppflags = yes ; then
9600				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9601				continue
9602			elif test "${cf_tst_cflags}" = "\"'" ; then
9603				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9604				continue
9605			fi
9606			;;
9607		esac
9608		case "$CPPFLAGS" in
9609		*$cf_add_cflags) #(vi
9610			;;
9611		*) #(vi
9612			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
9613			;;
9614		esac
9615		;;
9616	*)
9617		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
9618		;;
9619	esac
9620	;;
9621yes)
9622	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9623
9624	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9625
9626	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
9627	&& test -z "${cf_tst_cflags}" \
9628	&& cf_fix_cppflags=no
9629	;;
9630esac
9631done
9632
9633if test -n "$cf_new_cflags" ; then
9634
9635	CFLAGS="$CFLAGS $cf_new_cflags"
9636fi
9637
9638if test -n "$cf_new_cppflags" ; then
9639
9640	CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
9641fi
9642
9643if test -n "$cf_new_extra_cppflags" ; then
9644
9645	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
9646fi
9647
9648else
9649	IMAKE_CFLAGS=
9650	IMAKE_LOADFLAGS=
9651	test -n "$verbose" && echo "	make fallback definitions" 1>&6
9652
9653echo "${as_me-configure}:9653: testing make fallback definitions ..." 1>&5
9654
9655	# We prefer config.guess' values when we can get them, to avoid
9656	# inconsistent results with uname (AIX for instance).  However,
9657	# config.guess is not always consistent either.
9658	case $host_os in
9659	*[0-9].[0-9]*)
9660		UNAME_RELEASE="$host_os"
9661		;;
9662	*)
9663		UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
9664		;;
9665	esac
9666
9667	case .$UNAME_RELEASE in
9668	*[0-9].[0-9]*)
9669		OSMAJORVERSION=`echo "$UNAME_RELEASE" |sed -e 's/^[^0-9]*//' -e 's/\..*//'`
9670		OSMINORVERSION=`echo "$UNAME_RELEASE" |sed -e 's/^[^0-9]*//' -e 's/^[^.]*\.//' -e 's/\..*//' -e 's/[^0-9].*//' `
9671		test -z "$OSMAJORVERSION" && OSMAJORVERSION=1
9672		test -z "$OSMINORVERSION" && OSMINORVERSION=0
9673		IMAKE_CFLAGS="-DOSMAJORVERSION=$OSMAJORVERSION -DOSMINORVERSION=$OSMINORVERSION $IMAKE_CFLAGS"
9674		;;
9675	esac
9676
9677	# FUNCPROTO is standard with X11R6, but XFree86 drops it, leaving some
9678	# fallback/fragments for NeedPrototypes, etc.
9679	IMAKE_CFLAGS="-DFUNCPROTO=15 $IMAKE_CFLAGS"
9680
9681	# If this is not set properly, Xaw's scrollbars will not work
9682	if test "$enable_narrowproto" = yes ; then
9683		IMAKE_CFLAGS="-DNARROWPROTO=1 $IMAKE_CFLAGS"
9684	fi
9685
9686	# Other special definitions:
9687	case $host_os in
9688	aix*)
9689		# imake on AIX 5.1 defines AIXV3.  really.
9690		IMAKE_CFLAGS="-DAIXV3 -DAIXV4 $IMAKE_CFLAGS"
9691		;;
9692	irix[56].*) #(vi
9693		# these are needed to make SIGWINCH work in xterm
9694		IMAKE_CFLAGS="-DSYSV -DSVR4 $IMAKE_CFLAGS"
9695		;;
9696	esac
9697
9698cf_fix_cppflags=no
9699cf_new_cflags=
9700cf_new_cppflags=
9701cf_new_extra_cppflags=
9702
9703for cf_add_cflags in $IMAKE_CFLAGS
9704do
9705case $cf_fix_cppflags in
9706no)
9707	case $cf_add_cflags in #(vi
9708	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
9709		case $cf_add_cflags in
9710		-D*)
9711			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9712
9713			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
9714			&& test -z "${cf_tst_cflags}" \
9715			&& cf_fix_cppflags=yes
9716
9717			if test $cf_fix_cppflags = yes ; then
9718				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9719				continue
9720			elif test "${cf_tst_cflags}" = "\"'" ; then
9721				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9722				continue
9723			fi
9724			;;
9725		esac
9726		case "$CPPFLAGS" in
9727		*$cf_add_cflags) #(vi
9728			;;
9729		*) #(vi
9730			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
9731			;;
9732		esac
9733		;;
9734	*)
9735		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
9736		;;
9737	esac
9738	;;
9739yes)
9740	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9741
9742	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9743
9744	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
9745	&& test -z "${cf_tst_cflags}" \
9746	&& cf_fix_cppflags=no
9747	;;
9748esac
9749done
9750
9751if test -n "$cf_new_cflags" ; then
9752
9753	CFLAGS="$CFLAGS $cf_new_cflags"
9754fi
9755
9756if test -n "$cf_new_cppflags" ; then
9757
9758	CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
9759fi
9760
9761if test -n "$cf_new_extra_cppflags" ; then
9762
9763	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
9764fi
9765
9766fi
9767
9768echo "$as_me:9768: checking for default terminal-id" >&5
9769echo $ECHO_N "checking for default terminal-id... $ECHO_C" >&6
9770
9771# Check whether --with-terminal-id or --without-terminal-id was given.
9772if test "${with_terminal_id+set}" = set; then
9773  withval="$with_terminal_id"
9774  default_termid=$withval
9775else
9776  default_termid=vt100
9777fi;
9778echo "$as_me:9778: result: $default_termid" >&5
9779echo "${ECHO_T}$default_termid" >&6
9780case $default_termid in
9781vt*)	default_termid=`echo $default_termid | sed -e 's/^..//'`
9782	;;
9783esac
9784cat >>confdefs.h <<EOF
9785#define DFT_DECID "$default_termid"
9786EOF
9787
9788echo "$as_me:9788: checking for default terminal-type" >&5
9789echo $ECHO_N "checking for default terminal-type... $ECHO_C" >&6
9790
9791# Check whether --with-terminal-type or --without-terminal-type was given.
9792if test "${with_terminal_type+set}" = set; then
9793  withval="$with_terminal_type"
9794  default_TERM=$withval
9795else
9796  default_TERM=xterm
9797fi;
9798echo "$as_me:9798: result: $default_TERM" >&5
9799echo "${ECHO_T}$default_TERM" >&6
9800cat >>confdefs.h <<EOF
9801#define DFT_TERMTYPE "$default_TERM"
9802EOF
9803
9804echo "$as_me:9804: checking for private terminfo-directory" >&5
9805echo $ECHO_N "checking for private terminfo-directory... $ECHO_C" >&6
9806
9807# Check whether --with-own-terminfo or --without-own-terminfo was given.
9808if test "${with_own_terminfo+set}" = set; then
9809  withval="$with_own_terminfo"
9810  TERMINFO_DIR=$withval
9811else
9812  TERMINFO_DIR=${TERMINFO-none}
9813fi;
9814echo "$as_me:9814: result: $TERMINFO_DIR" >&5
9815echo "${ECHO_T}$TERMINFO_DIR" >&6
9816if test "$TERMINFO_DIR" = yes ; then
9817	{ echo "$as_me:9817: WARNING: no value given" >&5
9818echo "$as_me: WARNING: no value given" >&2;}
9819elif test "$TERMINFO_DIR" != none ; then
9820	if test -d $TERMINFO_DIR ; then
9821		cat >>confdefs.h <<EOF
9822#define OWN_TERMINFO_DIR "$TERMINFO_DIR"
9823EOF
9824
9825	else
9826		{ echo "$as_me:9826: WARNING: not a directory" >&5
9827echo "$as_me: WARNING: not a directory" >&2;}
9828	fi
9829elif test "$prefix" != NONE ; then
9830	TERMINFO_DIR='${prefix}/lib/terminfo'
9831elif test -d /usr/lib/terminfo ; then
9832	TERMINFO_DIR=/usr/lib/terminfo
9833else
9834	TERMINFO_DIR=
9835fi
9836SET_TERMINFO=
9837if test -n "$TERMINFO_DIR" ; then
9838	TERMINFO_DIR='$(DESTDIR)'$TERMINFO_DIR
9839	SET_TERMINFO='TERMINFO=$(TERMINFO_DIR)'
9840fi
9841
9842###############################################################################
9843
9844echo "$as_me:9844: checking if you want active-icons" >&5
9845echo $ECHO_N "checking if you want active-icons... $ECHO_C" >&6
9846
9847# Check whether --enable-active-icon or --disable-active-icon was given.
9848if test "${enable_active_icon+set}" = set; then
9849  enableval="$enable_active_icon"
9850  test "$enableval" != no && enableval=yes
9851  if test "$enableval" != "yes" ; then
9852    enable_active_icon=no
9853  else
9854    enable_active_icon=yes
9855  fi
9856else
9857  enableval=yes
9858  enable_active_icon=yes
9859
9860fi;
9861echo "$as_me:9861: result: $enable_active_icon" >&5
9862echo "${ECHO_T}$enable_active_icon" >&6
9863if test "$enable_active_icon" = no ; then
9864	cat >>confdefs.h <<\EOF
9865#define NO_ACTIVE_ICON 1
9866EOF
9867
9868fi
9869
9870echo "$as_me:9870: checking if you want ANSI color" >&5
9871echo $ECHO_N "checking if you want ANSI color... $ECHO_C" >&6
9872
9873# Check whether --enable-ansi-color or --disable-ansi-color was given.
9874if test "${enable_ansi_color+set}" = set; then
9875  enableval="$enable_ansi_color"
9876  test "$enableval" != no && enableval=yes
9877  if test "$enableval" != "yes" ; then
9878    enable_ansi_color=no
9879  else
9880    enable_ansi_color=yes
9881  fi
9882else
9883  enableval=yes
9884  enable_ansi_color=yes
9885
9886fi;
9887echo "$as_me:9887: result: $enable_ansi_color" >&5
9888echo "${ECHO_T}$enable_ansi_color" >&6
9889test "$enable_ansi_color" = no && cat >>confdefs.h <<\EOF
9890#define OPT_ISO_COLORS 0
9891EOF
9892
9893if test "$enable_ansi_color" = yes ; then
9894
9895	echo "$as_me:9895: checking if you want 16 colors like aixterm" >&5
9896echo $ECHO_N "checking if you want 16 colors like aixterm... $ECHO_C" >&6
9897
9898# Check whether --enable-16-color or --disable-16-color was given.
9899if test "${enable_16_color+set}" = set; then
9900  enableval="$enable_16_color"
9901  test "$enableval" != no && enableval=yes
9902  if test "$enableval" != "yes" ; then
9903    enable_16_color=no
9904  else
9905    enable_16_color=yes
9906  fi
9907else
9908  enableval=yes
9909  enable_16_color=yes
9910
9911fi;
9912	echo "$as_me:9912: result: $enable_16_color" >&5
9913echo "${ECHO_T}$enable_16_color" >&6
9914	test "$enable_16_color" = no && cat >>confdefs.h <<\EOF
9915#define OPT_AIX_COLORS 0
9916EOF
9917
9918	echo "$as_me:9918: checking if you want 256 colors" >&5
9919echo $ECHO_N "checking if you want 256 colors... $ECHO_C" >&6
9920
9921# Check whether --enable-256-color or --disable-256-color was given.
9922if test "${enable_256_color+set}" = set; then
9923  enableval="$enable_256_color"
9924  test "$enableval" != yes && enableval=no
9925  if test "$enableval" != "no" ; then
9926    enable_256_color=yes
9927  else
9928    enable_256_color=no
9929  fi
9930else
9931  enableval=no
9932  enable_256_color=no
9933
9934fi;
9935	echo "$as_me:9935: result: $enable_256_color" >&5
9936echo "${ECHO_T}$enable_256_color" >&6
9937	if test "$enable_256_color" = yes ; then
9938		CHARPROC_DEPS="$CHARPROC_DEPS 256colres.h"
9939		EXTRAHDRS="$EXTRAHDRS 256colres.h"
9940		cat >>confdefs.h <<\EOF
9941#define OPT_256_COLORS 1
9942EOF
9943
9944	else
9945	echo "$as_me:9945: checking if you want 88 colors" >&5
9946echo $ECHO_N "checking if you want 88 colors... $ECHO_C" >&6
9947
9948# Check whether --enable-88-color or --disable-88-color was given.
9949if test "${enable_88_color+set}" = set; then
9950  enableval="$enable_88_color"
9951  test "$enableval" != yes && enableval=no
9952  if test "$enableval" != "no" ; then
9953    enable_88_color=yes
9954  else
9955    enable_88_color=no
9956  fi
9957else
9958  enableval=no
9959  enable_88_color=no
9960
9961fi;
9962	echo "$as_me:9962: result: $enable_88_color" >&5
9963echo "${ECHO_T}$enable_88_color" >&6
9964	if test "$enable_88_color" = yes ; then
9965		CHARPROC_DEPS="$CHARPROC_DEPS 88colres.h"
9966		EXTRAHDRS="$EXTRAHDRS 88colres.h"
9967		cat >>confdefs.h <<\EOF
9968#define OPT_88_COLORS 1
9969EOF
9970
9971	fi
9972	fi
9973
9974fi
9975
9976echo "$as_me:9976: checking if you want blinking cursor" >&5
9977echo $ECHO_N "checking if you want blinking cursor... $ECHO_C" >&6
9978
9979# Check whether --enable-blink-cursor or --disable-blink-cursor was given.
9980if test "${enable_blink_cursor+set}" = set; then
9981  enableval="$enable_blink_cursor"
9982  test "$enableval" != no && enableval=yes
9983  if test "$enableval" != "yes" ; then
9984    enable_blink_curs=no
9985  else
9986    enable_blink_curs=yes
9987  fi
9988else
9989  enableval=yes
9990  enable_blink_curs=yes
9991
9992fi;
9993echo "$as_me:9993: result: $enable_blink_curs" >&5
9994echo "${ECHO_T}$enable_blink_curs" >&6
9995test "$enable_blink_curs" = no && cat >>confdefs.h <<\EOF
9996#define OPT_BLINK_CURS 0
9997EOF
9998
9999echo "$as_me:9999: checking if you want to ignore Linux's broken palette-strings" >&5
10000echo $ECHO_N "checking if you want to ignore Linux's broken palette-strings... $ECHO_C" >&6
10001
10002case $host_os in #(vi
10003linux*)
10004	assume_broken_osc=yes ;; #(vi
10005*)
10006	assume_broken_osc=no ;;
10007esac
10008
10009# Check whether --enable-broken-osc or --disable-broken-osc was given.
10010if test "${enable_broken_osc+set}" = set; then
10011  enableval="$enable_broken_osc"
10012  test "$enableval" != no && enableval=yes
10013  if test "$enableval" != "$assume_broken_osc" ; then
10014    enable_broken_osc=$enableval
10015  else
10016    enable_broken_osc=$enableval
10017  fi
10018else
10019  enableval=$assume_broken_osc
10020  enable_broken_osc=$enableval
10021
10022fi;
10023echo "$as_me:10023: result: $enable_broken_osc" >&5
10024echo "${ECHO_T}$enable_broken_osc" >&6
10025if test "$enable_broken_osc" = yes ; then
10026	cat >>confdefs.h <<\EOF
10027#define OPT_BROKEN_OSC 1
10028EOF
10029
10030else
10031	cat >>confdefs.h <<\EOF
10032#define OPT_BROKEN_OSC 0
10033EOF
10034
10035fi
10036
10037echo "$as_me:10037: checking if you want to allow broken string-terminators" >&5
10038echo $ECHO_N "checking if you want to allow broken string-terminators... $ECHO_C" >&6
10039
10040# Check whether --enable-broken-st or --disable-broken-st was given.
10041if test "${enable_broken_st+set}" = set; then
10042  enableval="$enable_broken_st"
10043  test "$enableval" != yes && enableval=no
10044  if test "$enableval" != "no" ; then
10045    enable_broken_st=yes
10046  else
10047    enable_broken_st=no
10048  fi
10049else
10050  enableval=no
10051  enable_broken_st=no
10052
10053fi;
10054echo "$as_me:10054: result: $enable_broken_st" >&5
10055echo "${ECHO_T}$enable_broken_st" >&6
10056test "$enable_broken_st" = no && cat >>confdefs.h <<\EOF
10057#define OPT_BROKEN_ST 0
10058EOF
10059
10060echo "$as_me:10060: checking if you want printable 128-159" >&5
10061echo $ECHO_N "checking if you want printable 128-159... $ECHO_C" >&6
10062
10063# Check whether --enable-c1-print or --disable-c1-print was given.
10064if test "${enable_c1_print+set}" = set; then
10065  enableval="$enable_c1_print"
10066  test "$enableval" != no && enableval=yes
10067  if test "$enableval" != "yes" ; then
10068    enable_c1_print=no
10069  else
10070    enable_c1_print=yes
10071  fi
10072else
10073  enableval=yes
10074  enable_c1_print=yes
10075
10076fi;
10077echo "$as_me:10077: result: $enable_c1_print" >&5
10078echo "${ECHO_T}$enable_c1_print" >&6
10079test "$enable_c1_print" = no && cat >>confdefs.h <<\EOF
10080#define OPT_C1_PRINT 0
10081EOF
10082
10083if test "$enable_ansi_color" = yes ; then
10084
10085	echo "$as_me:10085: checking if you want bold colors mapped like IBM PC" >&5
10086echo $ECHO_N "checking if you want bold colors mapped like IBM PC... $ECHO_C" >&6
10087
10088# Check whether --enable-bold-color or --disable-bold-color was given.
10089if test "${enable_bold_color+set}" = set; then
10090  enableval="$enable_bold_color"
10091  test "$enableval" != no && enableval=yes
10092  if test "$enableval" != "yes" ; then
10093    enable_pc_color=no
10094  else
10095    enable_pc_color=yes
10096  fi
10097else
10098  enableval=yes
10099  enable_pc_color=yes
10100
10101fi;
10102	echo "$as_me:10102: result: $enable_pc_color" >&5
10103echo "${ECHO_T}$enable_pc_color" >&6
10104	test "$enable_pc_color" = no && cat >>confdefs.h <<\EOF
10105#define OPT_PC_COLORS 0
10106EOF
10107
10108	echo "$as_me:10108: checking if you want separate color-classes" >&5
10109echo $ECHO_N "checking if you want separate color-classes... $ECHO_C" >&6
10110
10111# Check whether --enable-color-class or --disable-color-class was given.
10112if test "${enable_color_class+set}" = set; then
10113  enableval="$enable_color_class"
10114  test "$enableval" != no && enableval=yes
10115  if test "$enableval" != "yes" ; then
10116    enable_color_class=no
10117  else
10118    enable_color_class=yes
10119  fi
10120else
10121  enableval=yes
10122  enable_color_class=yes
10123
10124fi;
10125	echo "$as_me:10125: result: $enable_color_class" >&5
10126echo "${ECHO_T}$enable_color_class" >&6
10127	test "$enable_color_class" = no && cat >>confdefs.h <<\EOF
10128#define OPT_COLOR_CLASS FALSE
10129EOF
10130
10131	echo "$as_me:10131: checking if you want color-mode enabled by default" >&5
10132echo $ECHO_N "checking if you want color-mode enabled by default... $ECHO_C" >&6
10133
10134# Check whether --enable-color-mode or --disable-color-mode was given.
10135if test "${enable_color_mode+set}" = set; then
10136  enableval="$enable_color_mode"
10137  test "$enableval" != no && enableval=yes
10138  if test "$enableval" != "yes" ; then
10139    default_colormode=no
10140  else
10141    default_colormode=yes
10142  fi
10143else
10144  enableval=yes
10145  default_colormode=yes
10146
10147fi;
10148	echo "$as_me:10148: result: $default_colormode" >&5
10149echo "${ECHO_T}$default_colormode" >&6
10150	test "$default_colormode" = no && cat >>confdefs.h <<\EOF
10151#define DFT_COLORMODE FALSE
10152EOF
10153
10154fi
10155
10156echo "$as_me:10156: checking if you want support for color highlighting" >&5
10157echo $ECHO_N "checking if you want support for color highlighting... $ECHO_C" >&6
10158
10159# Check whether --enable-highlighting or --disable-highlighting was given.
10160if test "${enable_highlighting+set}" = set; then
10161  enableval="$enable_highlighting"
10162  test "$enableval" != no && enableval=yes
10163  if test "$enableval" != "yes" ; then
10164    default_highlight=no
10165  else
10166    default_highlight=yes
10167  fi
10168else
10169  enableval=yes
10170  default_highlight=yes
10171
10172fi;
10173echo "$as_me:10173: result: $default_highlight" >&5
10174echo "${ECHO_T}$default_highlight" >&6
10175test "$default_highlight" = no && cat >>confdefs.h <<\EOF
10176#define OPT_HIGHLIGHT_COLOR 0
10177EOF
10178
10179echo "$as_me:10179: checking if you want support for doublesize characters" >&5
10180echo $ECHO_N "checking if you want support for doublesize characters... $ECHO_C" >&6
10181
10182# Check whether --enable-doublechars or --disable-doublechars was given.
10183if test "${enable_doublechars+set}" = set; then
10184  enableval="$enable_doublechars"
10185  test "$enableval" != no && enableval=yes
10186  if test "$enableval" != "yes" ; then
10187    enable_doublechars=no
10188  else
10189    enable_doublechars=yes
10190  fi
10191else
10192  enableval=yes
10193  enable_doublechars=yes
10194
10195fi;
10196echo "$as_me:10196: result: $enable_doublechars" >&5
10197echo "${ECHO_T}$enable_doublechars" >&6
10198test "$enable_doublechars" = no && cat >>confdefs.h <<\EOF
10199#define OPT_DEC_CHRSET 0
10200EOF
10201
10202echo "$as_me:10202: checking if you want fallback-support for box characters" >&5
10203echo $ECHO_N "checking if you want fallback-support for box characters... $ECHO_C" >&6
10204
10205# Check whether --enable-boxchars or --disable-boxchars was given.
10206if test "${enable_boxchars+set}" = set; then
10207  enableval="$enable_boxchars"
10208  test "$enableval" != no && enableval=yes
10209  if test "$enableval" != "yes" ; then
10210    enable_boxchars=no
10211  else
10212    enable_boxchars=yes
10213  fi
10214else
10215  enableval=yes
10216  enable_boxchars=yes
10217
10218fi;
10219echo "$as_me:10219: result: $enable_boxchars" >&5
10220echo "${ECHO_T}$enable_boxchars" >&6
10221test "$enable_boxchars" = no && cat >>confdefs.h <<\EOF
10222#define OPT_BOX_CHARS 0
10223EOF
10224
10225echo "$as_me:10225: checking if you want to allow spawning new xterms" >&5
10226echo $ECHO_N "checking if you want to allow spawning new xterms... $ECHO_C" >&6
10227
10228# Check whether --enable-exec-xterm or --disable-exec-xterm was given.
10229if test "${enable_exec_xterm+set}" = set; then
10230  enableval="$enable_exec_xterm"
10231  test "$enableval" != yes && enableval=no
10232  if test "$enableval" != "no" ; then
10233    enable_exec_xterm=yes
10234  else
10235    enable_exec_xterm=no
10236  fi
10237else
10238  enableval=no
10239  enable_exec_xterm=no
10240
10241fi;
10242echo "$as_me:10242: result: $enable_exec_xterm" >&5
10243echo "${ECHO_T}$enable_exec_xterm" >&6
10244if test "$enable_exec_xterm" = yes ; then
10245
10246echo "$as_me:10246: checking for proc tree with cwd-support" >&5
10247echo $ECHO_N "checking for proc tree with cwd-support... $ECHO_C" >&6
10248if test "${cf_cv_procfs_cwd+set}" = set; then
10249  echo $ECHO_N "(cached) $ECHO_C" >&6
10250else
10251
10252cf_cv_procfs_cwd=no
10253for cf_path in /proc /compat/linux/proc /usr/compat/linux/proc
10254do
10255	if test -d $cf_path && \
10256	   test -d $cf_path/$$ && \
10257	   ( test -d $cf_path/$$/cwd || \
10258	     test -L $cf_path/$$/cwd ); then
10259		cf_cv_procfs_cwd=$cf_path
10260		break
10261	fi
10262done
10263
10264fi
10265echo "$as_me:10265: result: $cf_cv_procfs_cwd" >&5
10266echo "${ECHO_T}$cf_cv_procfs_cwd" >&6
10267
10268	if test "$cf_cv_procfs_cwd" = no ; then
10269		{ echo "$as_me:10269: WARNING: no suitable proc filesystem found" >&5
10270echo "$as_me: WARNING: no suitable proc filesystem found" >&2;}
10271	else
10272		cat >>confdefs.h <<EOF
10273#define PROCFS_ROOT "$cf_cv_procfs_cwd"
10274EOF
10275
10276		cat >>confdefs.h <<\EOF
10277#define OPT_EXEC_XTERM 1
10278EOF
10279
10280	fi
10281fi
10282
10283echo "$as_me:10283: checking if you want to use FreeType library" >&5
10284echo $ECHO_N "checking if you want to use FreeType library... $ECHO_C" >&6
10285
10286# Check whether --enable-freetype or --disable-freetype was given.
10287if test "${enable_freetype+set}" = set; then
10288  enableval="$enable_freetype"
10289  test "$enableval" != no && enableval=yes
10290  if test "$enableval" != "yes" ; then
10291    enable_freetype=no
10292  else
10293    enable_freetype=yes
10294  fi
10295else
10296  enableval=yes
10297  enable_freetype=yes
10298
10299fi;
10300echo "$as_me:10300: result: $enable_freetype" >&5
10301echo "${ECHO_T}$enable_freetype" >&6
10302if test "$enable_freetype" = yes ; then
10303
10304cf_extra_freetype_libs=
10305FREETYPE_CONFIG=
10306FREETYPE_PARAMS=
10307
10308echo "$as_me:10308: checking if you specified -D/-I options for FreeType" >&5
10309echo $ECHO_N "checking if you specified -D/-I options for FreeType... $ECHO_C" >&6
10310
10311# Check whether --with-freetype-cflags or --without-freetype-cflags was given.
10312if test "${with_freetype_cflags+set}" = set; then
10313  withval="$with_freetype_cflags"
10314  cf_cv_x_freetype_incs="$with_freetype_cflags"
10315else
10316  cf_cv_x_freetype_incs=no
10317fi;
10318echo "$as_me:10318: result: $cf_cv_x_freetype_incs" >&5
10319echo "${ECHO_T}$cf_cv_x_freetype_incs" >&6
10320
10321echo "$as_me:10321: checking if you specified -L/-l options for FreeType" >&5
10322echo $ECHO_N "checking if you specified -L/-l options for FreeType... $ECHO_C" >&6
10323
10324# Check whether --with-freetype-libs or --without-freetype-libs was given.
10325if test "${with_freetype_libs+set}" = set; then
10326  withval="$with_freetype_libs"
10327  cf_cv_x_freetype_libs="$with_freetype_libs"
10328else
10329  cf_cv_x_freetype_libs=no
10330fi;
10331echo "$as_me:10331: result: $cf_cv_x_freetype_libs" >&5
10332echo "${ECHO_T}$cf_cv_x_freetype_libs" >&6
10333
10334# Extract the first word of "pkg-config", so it can be a program name with args.
10335set dummy pkg-config; ac_word=$2
10336echo "$as_me:10336: checking for $ac_word" >&5
10337echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
10338if test "${ac_cv_path_FREETYPE_PKG_CONFIG+set}" = set; then
10339  echo $ECHO_N "(cached) $ECHO_C" >&6
10340else
10341  case $FREETYPE_PKG_CONFIG in
10342  [\\/]* | ?:[\\/]*)
10343  ac_cv_path_FREETYPE_PKG_CONFIG="$FREETYPE_PKG_CONFIG" # Let the user override the test with a path.
10344  ;;
10345  *)
10346  ac_save_IFS=$IFS; IFS=$ac_path_separator
10347ac_dummy="$PATH"
10348for ac_dir in $ac_dummy; do
10349  IFS=$ac_save_IFS
10350  test -z "$ac_dir" && ac_dir=.
10351  if $as_executable_p "$ac_dir/$ac_word"; then
10352   ac_cv_path_FREETYPE_PKG_CONFIG="$ac_dir/$ac_word"
10353   echo "$as_me:10353: found $ac_dir/$ac_word" >&5
10354   break
10355fi
10356done
10357
10358  test -z "$ac_cv_path_FREETYPE_PKG_CONFIG" && ac_cv_path_FREETYPE_PKG_CONFIG="none"
10359  ;;
10360esac
10361fi
10362FREETYPE_PKG_CONFIG=$ac_cv_path_FREETYPE_PKG_CONFIG
10363
10364if test -n "$FREETYPE_PKG_CONFIG"; then
10365  echo "$as_me:10365: result: $FREETYPE_PKG_CONFIG" >&5
10366echo "${ECHO_T}$FREETYPE_PKG_CONFIG" >&6
10367else
10368  echo "$as_me:10368: result: no" >&5
10369echo "${ECHO_T}no" >&6
10370fi
10371
10372if test "$FREETYPE_PKG_CONFIG" != none && "$FREETYPE_PKG_CONFIG" --exists xft; then
10373	FREETYPE_CONFIG=$FREETYPE_PKG_CONFIG
10374	FREETYPE_PARAMS=xft
10375else
10376	# Extract the first word of "xft-config", so it can be a program name with args.
10377set dummy xft-config; ac_word=$2
10378echo "$as_me:10378: checking for $ac_word" >&5
10379echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
10380if test "${ac_cv_path_FREETYPE_XFT_CONFIG+set}" = set; then
10381  echo $ECHO_N "(cached) $ECHO_C" >&6
10382else
10383  case $FREETYPE_XFT_CONFIG in
10384  [\\/]* | ?:[\\/]*)
10385  ac_cv_path_FREETYPE_XFT_CONFIG="$FREETYPE_XFT_CONFIG" # Let the user override the test with a path.
10386  ;;
10387  *)
10388  ac_save_IFS=$IFS; IFS=$ac_path_separator
10389ac_dummy="$PATH"
10390for ac_dir in $ac_dummy; do
10391  IFS=$ac_save_IFS
10392  test -z "$ac_dir" && ac_dir=.
10393  if $as_executable_p "$ac_dir/$ac_word"; then
10394   ac_cv_path_FREETYPE_XFT_CONFIG="$ac_dir/$ac_word"
10395   echo "$as_me:10395: found $ac_dir/$ac_word" >&5
10396   break
10397fi
10398done
10399
10400  test -z "$ac_cv_path_FREETYPE_XFT_CONFIG" && ac_cv_path_FREETYPE_XFT_CONFIG="none"
10401  ;;
10402esac
10403fi
10404FREETYPE_XFT_CONFIG=$ac_cv_path_FREETYPE_XFT_CONFIG
10405
10406if test -n "$FREETYPE_XFT_CONFIG"; then
10407  echo "$as_me:10407: result: $FREETYPE_XFT_CONFIG" >&5
10408echo "${ECHO_T}$FREETYPE_XFT_CONFIG" >&6
10409else
10410  echo "$as_me:10410: result: no" >&5
10411echo "${ECHO_T}no" >&6
10412fi
10413
10414	if test "$FREETYPE_XFT_CONFIG" != none; then
10415		FREETYPE_CONFIG=$FREETYPE_XFT_CONFIG
10416	else
10417		cf_extra_freetype_libs="-lXft"
10418		# Extract the first word of "freetype-config", so it can be a program name with args.
10419set dummy freetype-config; ac_word=$2
10420echo "$as_me:10420: checking for $ac_word" >&5
10421echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
10422if test "${ac_cv_path_FREETYPE_OLD_CONFIG+set}" = set; then
10423  echo $ECHO_N "(cached) $ECHO_C" >&6
10424else
10425  case $FREETYPE_OLD_CONFIG in
10426  [\\/]* | ?:[\\/]*)
10427  ac_cv_path_FREETYPE_OLD_CONFIG="$FREETYPE_OLD_CONFIG" # Let the user override the test with a path.
10428  ;;
10429  *)
10430  ac_save_IFS=$IFS; IFS=$ac_path_separator
10431ac_dummy="$PATH"
10432for ac_dir in $ac_dummy; do
10433  IFS=$ac_save_IFS
10434  test -z "$ac_dir" && ac_dir=.
10435  if $as_executable_p "$ac_dir/$ac_word"; then
10436   ac_cv_path_FREETYPE_OLD_CONFIG="$ac_dir/$ac_word"
10437   echo "$as_me:10437: found $ac_dir/$ac_word" >&5
10438   break
10439fi
10440done
10441
10442  test -z "$ac_cv_path_FREETYPE_OLD_CONFIG" && ac_cv_path_FREETYPE_OLD_CONFIG="none"
10443  ;;
10444esac
10445fi
10446FREETYPE_OLD_CONFIG=$ac_cv_path_FREETYPE_OLD_CONFIG
10447
10448if test -n "$FREETYPE_OLD_CONFIG"; then
10449  echo "$as_me:10449: result: $FREETYPE_OLD_CONFIG" >&5
10450echo "${ECHO_T}$FREETYPE_OLD_CONFIG" >&6
10451else
10452  echo "$as_me:10452: result: no" >&5
10453echo "${ECHO_T}no" >&6
10454fi
10455
10456		if test "$FREETYPE_OLD_CONFIG" != none; then
10457			FREETYPE_CONFIG=$FREETYPE_OLD_CONFIG
10458		fi
10459	fi
10460fi
10461
10462if test -n "$FREETYPE_CONFIG" ; then
10463
10464if test "$cf_cv_x_freetype_incs" = no ; then
10465echo "$as_me:10465: checking for $FREETYPE_CONFIG cflags" >&5
10466echo $ECHO_N "checking for $FREETYPE_CONFIG cflags... $ECHO_C" >&6
10467cf_cv_x_freetype_incs="`$FREETYPE_CONFIG $FREETYPE_PARAMS --cflags 2>/dev/null`"
10468echo "$as_me:10468: result: $cf_cv_x_freetype_incs" >&5
10469echo "${ECHO_T}$cf_cv_x_freetype_incs" >&6
10470fi
10471
10472if test "$cf_cv_x_freetype_libs" = no ; then
10473echo "$as_me:10473: checking for $FREETYPE_CONFIG libs" >&5
10474echo $ECHO_N "checking for $FREETYPE_CONFIG libs... $ECHO_C" >&6
10475cf_cv_x_freetype_libs="$cf_extra_freetype_libs `$FREETYPE_CONFIG $FREETYPE_PARAMS --libs 2>/dev/null`"
10476echo "$as_me:10476: result: $cf_cv_x_freetype_libs" >&5
10477echo "${ECHO_T}$cf_cv_x_freetype_libs" >&6
10478fi
10479
10480fi
10481
10482if test "$cf_cv_x_freetype_incs" = no ; then
10483	cf_cv_x_freetype_incs=
10484fi
10485
10486if test "$cf_cv_x_freetype_libs" = no ; then
10487	cf_cv_x_freetype_libs=-lXft
10488fi
10489
10490echo "$as_me:10490: checking if we can link with FreeType libraries" >&5
10491echo $ECHO_N "checking if we can link with FreeType libraries... $ECHO_C" >&6
10492
10493cf_save_LIBS="$LIBS"
10494cf_save_INCS="$CPPFLAGS"
10495
10496LIBS="$cf_cv_x_freetype_libs $LIBS"
10497CPPFLAGS="$cf_cv_x_freetype_incs $CPPFLAGS"
10498
10499cat >conftest.$ac_ext <<_ACEOF
10500#line 10500 "configure"
10501#include "confdefs.h"
10502
10503#include <X11/Xlib.h>
10504#include <X11/extensions/Xrender.h>
10505#include <X11/Xft/Xft.h>
10506int
10507main ()
10508{
10509
10510	XftPattern  *pat = XftNameParse ("name");
10511  ;
10512  return 0;
10513}
10514_ACEOF
10515rm -f conftest.$ac_objext conftest$ac_exeext
10516if { (eval echo "$as_me:10516: \"$ac_link\"") >&5
10517  (eval $ac_link) 2>&5
10518  ac_status=$?
10519  echo "$as_me:10519: \$? = $ac_status" >&5
10520  (exit $ac_status); } &&
10521         { ac_try='test -s conftest$ac_exeext'
10522  { (eval echo "$as_me:10522: \"$ac_try\"") >&5
10523  (eval $ac_try) 2>&5
10524  ac_status=$?
10525  echo "$as_me:10525: \$? = $ac_status" >&5
10526  (exit $ac_status); }; }; then
10527  cf_cv_found_freetype=yes
10528else
10529  echo "$as_me: failed program was:" >&5
10530cat conftest.$ac_ext >&5
10531cf_cv_found_freetype=no
10532fi
10533rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10534echo "$as_me:10534: result: $cf_cv_found_freetype" >&5
10535echo "${ECHO_T}$cf_cv_found_freetype" >&6
10536
10537LIBS="$cf_save_LIBS"
10538CPPFLAGS="$cf_save_INCS"
10539
10540if test "$cf_cv_found_freetype" = yes ; then
10541	LIBS="$cf_cv_x_freetype_libs $LIBS"
10542
10543cf_fix_cppflags=no
10544cf_new_cflags=
10545cf_new_cppflags=
10546cf_new_extra_cppflags=
10547
10548for cf_add_cflags in $cf_cv_x_freetype_incs
10549do
10550case $cf_fix_cppflags in
10551no)
10552	case $cf_add_cflags in #(vi
10553	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
10554		case $cf_add_cflags in
10555		-D*)
10556			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10557
10558			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10559			&& test -z "${cf_tst_cflags}" \
10560			&& cf_fix_cppflags=yes
10561
10562			if test $cf_fix_cppflags = yes ; then
10563				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10564				continue
10565			elif test "${cf_tst_cflags}" = "\"'" ; then
10566				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10567				continue
10568			fi
10569			;;
10570		esac
10571		case "$CPPFLAGS" in
10572		*$cf_add_cflags) #(vi
10573			;;
10574		*) #(vi
10575			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10576			;;
10577		esac
10578		;;
10579	*)
10580		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10581		;;
10582	esac
10583	;;
10584yes)
10585	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10586
10587	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10588
10589	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10590	&& test -z "${cf_tst_cflags}" \
10591	&& cf_fix_cppflags=no
10592	;;
10593esac
10594done
10595
10596if test -n "$cf_new_cflags" ; then
10597
10598	CFLAGS="$CFLAGS $cf_new_cflags"
10599fi
10600
10601if test -n "$cf_new_cppflags" ; then
10602
10603	CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
10604fi
10605
10606if test -n "$cf_new_extra_cppflags" ; then
10607
10608	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10609fi
10610
10611	cat >>confdefs.h <<\EOF
10612#define XRENDERFONT 1
10613EOF
10614
10615for ac_func in \
10616	XftDrawCharSpec \
10617	XftDrawSetClip \
10618	XftDrawSetClipRectangles \
10619
10620do
10621as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
10622echo "$as_me:10622: checking for $ac_func" >&5
10623echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
10624if eval "test \"\${$as_ac_var+set}\" = set"; then
10625  echo $ECHO_N "(cached) $ECHO_C" >&6
10626else
10627  cat >conftest.$ac_ext <<_ACEOF
10628#line 10628 "configure"
10629#include "confdefs.h"
10630/* System header to define __stub macros and hopefully few prototypes,
10631    which can conflict with char $ac_func (); below.  */
10632#include <assert.h>
10633/* Override any gcc2 internal prototype to avoid an error.  */
10634#ifdef __cplusplus
10635extern "C"
10636#endif
10637/* We use char because int might match the return type of a gcc2
10638   builtin and then its argument prototype would still apply.  */
10639char $ac_func ();
10640char (*f) ();
10641
10642int
10643main ()
10644{
10645/* The GNU C library defines this for functions which it implements
10646    to always fail with ENOSYS.  Some functions are actually named
10647    something starting with __ and the normal name is an alias.  */
10648#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10649choke me
10650#else
10651f = $ac_func;
10652#endif
10653
10654  ;
10655  return 0;
10656}
10657_ACEOF
10658rm -f conftest.$ac_objext conftest$ac_exeext
10659if { (eval echo "$as_me:10659: \"$ac_link\"") >&5
10660  (eval $ac_link) 2>&5
10661  ac_status=$?
10662  echo "$as_me:10662: \$? = $ac_status" >&5
10663  (exit $ac_status); } &&
10664         { ac_try='test -s conftest$ac_exeext'
10665  { (eval echo "$as_me:10665: \"$ac_try\"") >&5
10666  (eval $ac_try) 2>&5
10667  ac_status=$?
10668  echo "$as_me:10668: \$? = $ac_status" >&5
10669  (exit $ac_status); }; }; then
10670  eval "$as_ac_var=yes"
10671else
10672  echo "$as_me: failed program was:" >&5
10673cat conftest.$ac_ext >&5
10674eval "$as_ac_var=no"
10675fi
10676rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10677fi
10678echo "$as_me:10678: result: `eval echo '${'$as_ac_var'}'`" >&5
10679echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
10680if test `eval echo '${'$as_ac_var'}'` = yes; then
10681  cat >>confdefs.h <<EOF
10682#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10683EOF
10684
10685fi
10686done
10687
10688else
10689	{ echo "$as_me:10689: WARNING: No libraries found for FreeType" >&5
10690echo "$as_me: WARNING: No libraries found for FreeType" >&2;}
10691	CPPFLAGS=`echo "$CPPFLAGS" | sed -e s/-DXRENDERFONT//`
10692fi
10693
10694# FIXME: revisit this if needed
10695
10696else
10697	CPPFLAGS=`echo "$CPPFLAGS" | sed -e s/-DXRENDERFONT//`
10698fi
10699
10700echo "$as_me:10700: checking if you want support for HP-style function keys" >&5
10701echo $ECHO_N "checking if you want support for HP-style function keys... $ECHO_C" >&6
10702
10703# Check whether --enable-hp-fkeys or --disable-hp-fkeys was given.
10704if test "${enable_hp_fkeys+set}" = set; then
10705  enableval="$enable_hp_fkeys"
10706  test "$enableval" != yes && enableval=no
10707  if test "$enableval" != "no" ; then
10708    enable_hp_fkeys=yes
10709  else
10710    enable_hp_fkeys=no
10711  fi
10712else
10713  enableval=no
10714  enable_hp_fkeys=no
10715
10716fi;
10717echo "$as_me:10717: result: $enable_hp_fkeys" >&5
10718echo "${ECHO_T}$enable_hp_fkeys" >&6
10719if test "$enable_hp_fkeys" = yes ; then
10720	cat >>confdefs.h <<\EOF
10721#define OPT_HP_FUNC_KEYS 1
10722EOF
10723
10724fi
10725
10726echo "$as_me:10726: checking if you want support for SCO-style function keys" >&5
10727echo $ECHO_N "checking if you want support for SCO-style function keys... $ECHO_C" >&6
10728
10729# Check whether --enable-sco-fkeys or --disable-sco-fkeys was given.
10730if test "${enable_sco_fkeys+set}" = set; then
10731  enableval="$enable_sco_fkeys"
10732  test "$enableval" != yes && enableval=no
10733  if test "$enableval" != "no" ; then
10734    enable_sco_fkeys=yes
10735  else
10736    enable_sco_fkeys=no
10737  fi
10738else
10739  enableval=no
10740  enable_sco_fkeys=no
10741
10742fi;
10743echo "$as_me:10743: result: $enable_sco_fkeys" >&5
10744echo "${ECHO_T}$enable_sco_fkeys" >&6
10745if test "$enable_sco_fkeys" = yes ; then
10746	cat >>confdefs.h <<\EOF
10747#define OPT_SCO_FUNC_KEYS 1
10748EOF
10749
10750fi
10751
10752echo "$as_me:10752: checking if you want support for Sun-style function keys" >&5
10753echo $ECHO_N "checking if you want support for Sun-style function keys... $ECHO_C" >&6
10754
10755# Check whether --enable-sun-fkeys or --disable-sun-fkeys was given.
10756if test "${enable_sun_fkeys+set}" = set; then
10757  enableval="$enable_sun_fkeys"
10758  test "$enableval" != no && enableval=yes
10759  if test "$enableval" != "yes" ; then
10760    enable_sun_fkeys=no
10761  else
10762    enable_sun_fkeys=yes
10763  fi
10764else
10765  enableval=yes
10766  enable_sun_fkeys=yes
10767
10768fi;
10769echo "$as_me:10769: result: $enable_sun_fkeys" >&5
10770echo "${ECHO_T}$enable_sun_fkeys" >&6
10771if test "$enable_sun_fkeys" = no ; then
10772	cat >>confdefs.h <<\EOF
10773#define OPT_SUN_FUNC_KEYS 0
10774EOF
10775
10776fi
10777
10778echo "$as_me:10778: checking if you want support for internationalization" >&5
10779echo $ECHO_N "checking if you want support for internationalization... $ECHO_C" >&6
10780
10781# Check whether --enable-i18n or --disable-i18n was given.
10782if test "${enable_i18n+set}" = set; then
10783  enableval="$enable_i18n"
10784  test "$enableval" != no && enableval=yes
10785  if test "$enableval" != "yes" ; then
10786    enable_i18n=no
10787  else
10788    enable_i18n=yes
10789  fi
10790else
10791  enableval=yes
10792  enable_i18n=yes
10793
10794fi;
10795echo "$as_me:10795: result: $enable_i18n" >&5
10796echo "${ECHO_T}$enable_i18n" >&6
10797if test "$enable_i18n" = no ; then
10798	cat >>confdefs.h <<\EOF
10799#define OPT_I18N_SUPPORT 0
10800EOF
10801
10802fi
10803
10804echo "$as_me:10804: checking if you want support for initial-erase setup" >&5
10805echo $ECHO_N "checking if you want support for initial-erase setup... $ECHO_C" >&6
10806
10807# Check whether --enable-initial-erase or --disable-initial-erase was given.
10808if test "${enable_initial_erase+set}" = set; then
10809  enableval="$enable_initial_erase"
10810  test "$enableval" != no && enableval=yes
10811  if test "$enableval" != "yes" ; then
10812    enable_ie=no
10813  else
10814    enable_ie=yes
10815  fi
10816else
10817  enableval=yes
10818  enable_ie=yes
10819
10820fi;
10821echo "$as_me:10821: result: $enable_ie" >&5
10822echo "${ECHO_T}$enable_ie" >&6
10823if test "$enable_ie" = no ; then
10824	cat >>confdefs.h <<\EOF
10825#define OPT_INITIAL_ERASE 0
10826EOF
10827
10828fi
10829
10830echo "$as_me:10830: checking if you want support for input-method" >&5
10831echo $ECHO_N "checking if you want support for input-method... $ECHO_C" >&6
10832
10833# Check whether --enable-input-method or --disable-input-method was given.
10834if test "${enable_input_method+set}" = set; then
10835  enableval="$enable_input_method"
10836  test "$enableval" != no && enableval=yes
10837  if test "$enableval" != "yes" ; then
10838    enable_ximp=no
10839  else
10840    enable_ximp=yes
10841  fi
10842else
10843  enableval=yes
10844  enable_ximp=yes
10845
10846fi;
10847echo "$as_me:10847: result: $enable_ximp" >&5
10848echo "${ECHO_T}$enable_ximp" >&6
10849
10850echo "$as_me:10850: checking if X libraries support input-method" >&5
10851echo $ECHO_N "checking if X libraries support input-method... $ECHO_C" >&6
10852if test "${cf_cv_input_method+set}" = set; then
10853  echo $ECHO_N "(cached) $ECHO_C" >&6
10854else
10855
10856cat >conftest.$ac_ext <<_ACEOF
10857#line 10857 "configure"
10858#include "confdefs.h"
10859
10860#include <X11/IntrinsicP.h>
10861#include <X11/Xatom.h>
10862#include <X11/Xutil.h>
10863#include <X11/Xmu/Atoms.h>
10864#include <X11/Xmu/Converters.h>
10865#include <X11/Xaw/XawImP.h>
10866
10867int
10868main ()
10869{
10870
10871{
10872	XIM xim;
10873	XIMStyles *xim_styles = 0;
10874	XIMStyle input_style;
10875	Widget w = 0;
10876
10877	XSetLocaleModifiers("@im=none");
10878	xim = XOpenIM(XtDisplay(w), NULL, NULL, NULL);
10879	XGetIMValues(xim, XNQueryInputStyle, &xim_styles, NULL);
10880	XCloseIM(xim);
10881	input_style = (XIMPreeditNothing | XIMStatusNothing);
10882}
10883
10884  ;
10885  return 0;
10886}
10887_ACEOF
10888rm -f conftest.$ac_objext conftest$ac_exeext
10889if { (eval echo "$as_me:10889: \"$ac_link\"") >&5
10890  (eval $ac_link) 2>&5
10891  ac_status=$?
10892  echo "$as_me:10892: \$? = $ac_status" >&5
10893  (exit $ac_status); } &&
10894         { ac_try='test -s conftest$ac_exeext'
10895  { (eval echo "$as_me:10895: \"$ac_try\"") >&5
10896  (eval $ac_try) 2>&5
10897  ac_status=$?
10898  echo "$as_me:10898: \$? = $ac_status" >&5
10899  (exit $ac_status); }; }; then
10900  cf_cv_input_method=yes
10901else
10902  echo "$as_me: failed program was:" >&5
10903cat conftest.$ac_ext >&5
10904cf_cv_input_method=no
10905fi
10906rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10907fi
10908echo "$as_me:10908: result: $cf_cv_input_method" >&5
10909echo "${ECHO_T}$cf_cv_input_method" >&6
10910
10911test "$cf_cv_input_method" = no && enable_ximp=no
10912if test "$enable_ximp" = no ; then
10913	cat >>confdefs.h <<\EOF
10914#define OPT_INPUT_METHOD 0
10915EOF
10916
10917fi
10918
10919echo "$as_me:10919: checking if you want support for load-vt-fonts" >&5
10920echo $ECHO_N "checking if you want support for load-vt-fonts... $ECHO_C" >&6
10921
10922# Check whether --enable-load-vt-fonts or --disable-load-vt-fonts was given.
10923if test "${enable_load_vt_fonts+set}" = set; then
10924  enableval="$enable_load_vt_fonts"
10925  test "$enableval" != yes && enableval=no
10926  if test "$enableval" != "no" ; then
10927    enable_load_vt_fonts=yes
10928  else
10929    enable_load_vt_fonts=no
10930  fi
10931else
10932  enableval=no
10933  enable_load_vt_fonts=no
10934
10935fi;
10936echo "$as_me:10936: result: $enable_load_vt_fonts" >&5
10937echo "${ECHO_T}$enable_load_vt_fonts" >&6
10938if test "$enable_load_vt_fonts" = yes ; then
10939	cat >>confdefs.h <<\EOF
10940#define OPT_LOAD_VTFONTS 1
10941EOF
10942
10943fi
10944
10945echo "$as_me:10945: checking if you want support for logging" >&5
10946echo $ECHO_N "checking if you want support for logging... $ECHO_C" >&6
10947
10948# Check whether --enable-logging or --disable-logging was given.
10949if test "${enable_logging+set}" = set; then
10950  enableval="$enable_logging"
10951  test "$enableval" != yes && enableval=no
10952  if test "$enableval" != "no" ; then
10953    enable_logging=yes
10954  else
10955    enable_logging=no
10956  fi
10957else
10958  enableval=no
10959  enable_logging=no
10960
10961fi;
10962echo "$as_me:10962: result: $enable_logging" >&5
10963echo "${ECHO_T}$enable_logging" >&6
10964if test "$enable_logging" = yes ; then
10965	cat >>confdefs.h <<\EOF
10966#define ALLOWLOGGING 1
10967EOF
10968
10969	echo "$as_me:10969: checking if you want to allow logging via a pipe" >&5
10970echo $ECHO_N "checking if you want to allow logging via a pipe... $ECHO_C" >&6
10971
10972# Check whether --enable-logfile-exec or --disable-logfile-exec was given.
10973if test "${enable_logfile_exec+set}" = set; then
10974  enableval="$enable_logfile_exec"
10975  test "$enableval" != yes && enableval=no
10976  if test "$enableval" != "no" ; then
10977    enable_log_exec=yes
10978  else
10979    enable_log_exec=no
10980  fi
10981else
10982  enableval=no
10983  enable_log_exec=no
10984
10985fi;
10986	echo "$as_me:10986: result: $enable_log_exec" >&5
10987echo "${ECHO_T}$enable_log_exec" >&6
10988	if test "$enable_log_exec" = yes ; then
10989		cat >>confdefs.h <<\EOF
10990#define ALLOWLOGFILEEXEC 1
10991EOF
10992
10993	fi
10994fi
10995
10996echo "$as_me:10996: checking if you want support for iconify/maximize translations" >&5
10997echo $ECHO_N "checking if you want support for iconify/maximize translations... $ECHO_C" >&6
10998
10999# Check whether --enable-maximize or --disable-maximize was given.
11000if test "${enable_maximize+set}" = set; then
11001  enableval="$enable_maximize"
11002  test "$enableval" != no && enableval=yes
11003  if test "$enableval" != "yes" ; then
11004    enable_maximize=no
11005  else
11006    enable_maximize=yes
11007  fi
11008else
11009  enableval=yes
11010  enable_maximize=yes
11011
11012fi;
11013echo "$as_me:11013: result: $enable_maximize" >&5
11014echo "${ECHO_T}$enable_maximize" >&6
11015test "$enable_maximize" = no && cat >>confdefs.h <<\EOF
11016#define OPT_MAXIMIZE 0
11017EOF
11018
11019echo "$as_me:11019: checking if you want NumLock to override keyboard tables" >&5
11020echo $ECHO_N "checking if you want NumLock to override keyboard tables... $ECHO_C" >&6
11021
11022# Check whether --enable-num-lock or --disable-num-lock was given.
11023if test "${enable_num_lock+set}" = set; then
11024  enableval="$enable_num_lock"
11025  test "$enableval" != no && enableval=yes
11026  if test "$enableval" != "yes" ; then
11027    enable_numlock=no
11028  else
11029    enable_numlock=yes
11030  fi
11031else
11032  enableval=yes
11033  enable_numlock=yes
11034
11035fi;
11036echo "$as_me:11036: result: $enable_numlock" >&5
11037echo "${ECHO_T}$enable_numlock" >&6
11038test "$enable_numlock" = no && cat >>confdefs.h <<\EOF
11039#define OPT_NUM_LOCK 0
11040EOF
11041
11042echo "$as_me:11042: checking if you want support for get/set of base64 selection data" >&5
11043echo $ECHO_N "checking if you want support for get/set of base64 selection data... $ECHO_C" >&6
11044
11045# Check whether --enable-paste64 or --disable-paste64 was given.
11046if test "${enable_paste64+set}" = set; then
11047  enableval="$enable_paste64"
11048  test "$enableval" != yes && enableval=no
11049  if test "$enableval" != "no" ; then
11050    enable_paste64=yes
11051  else
11052    enable_paste64=no
11053  fi
11054else
11055  enableval=no
11056  enable_paste64=no
11057
11058fi;
11059echo "$as_me:11059: result: $enable_paste64" >&5
11060echo "${ECHO_T}$enable_paste64" >&6
11061if test "$enable_paste64" = yes ; then
11062	cat >>confdefs.h <<\EOF
11063#define OPT_PASTE64 1
11064EOF
11065
11066else
11067	cat >>confdefs.h <<\EOF
11068#define OPT_PASTE64 0
11069EOF
11070
11071fi
11072
11073echo "$as_me:11073: checking if you want support for pty-handshaking" >&5
11074echo $ECHO_N "checking if you want support for pty-handshaking... $ECHO_C" >&6
11075
11076# Check whether --enable-pty-handshake or --disable-pty-handshake was given.
11077if test "${enable_pty_handshake+set}" = set; then
11078  enableval="$enable_pty_handshake"
11079  test "$enableval" != no && enableval=yes
11080  if test "$enableval" != "yes" ; then
11081    enable_pty_handshake=no
11082  else
11083    enable_pty_handshake=yes
11084  fi
11085else
11086  enableval=yes
11087  enable_pty_handshake=yes
11088
11089fi;
11090echo "$as_me:11090: result: $enable_pty_handshake" >&5
11091echo "${ECHO_T}$enable_pty_handshake" >&6
11092if test "$enable_pty_handshake" = yes ; then
11093	cat >>confdefs.h <<\EOF
11094#define OPT_PTY_HANDSHAKE 1
11095EOF
11096
11097else
11098	cat >>confdefs.h <<\EOF
11099#define OPT_PTY_HANDSHAKE 0
11100EOF
11101
11102fi
11103
11104echo "$as_me:11104: checking if you want support for mouse in readline applications" >&5
11105echo $ECHO_N "checking if you want support for mouse in readline applications... $ECHO_C" >&6
11106
11107# Check whether --enable-readline-mouse or --disable-readline-mouse was given.
11108if test "${enable_readline_mouse+set}" = set; then
11109  enableval="$enable_readline_mouse"
11110  test "$enableval" != yes && enableval=no
11111  if test "$enableval" != "no" ; then
11112    enable_readline_mouse=yes
11113  else
11114    enable_readline_mouse=no
11115  fi
11116else
11117  enableval=no
11118  enable_readline_mouse=no
11119
11120fi;
11121echo "$as_me:11121: result: $enable_readline_mouse" >&5
11122echo "${ECHO_T}$enable_readline_mouse" >&6
11123if test "$enable_readline_mouse" = yes ; then
11124	cat >>confdefs.h <<\EOF
11125#define OPT_READLINE 1
11126EOF
11127
11128fi
11129
11130echo "$as_me:11130: checking if you want support for regular-expression selections" >&5
11131echo $ECHO_N "checking if you want support for regular-expression selections... $ECHO_C" >&6
11132
11133# Check whether --enable-regex or --disable-regex was given.
11134if test "${enable_regex+set}" = set; then
11135  enableval="$enable_regex"
11136  test "$enableval" != no && enableval=yes
11137  if test "$enableval" != "yes" ; then
11138    enable_regex=no
11139  else
11140    enable_regex=yes
11141  fi
11142else
11143  enableval=yes
11144  enable_regex=yes
11145
11146fi;
11147echo "$as_me:11147: result: $enable_regex" >&5
11148echo "${ECHO_T}$enable_regex" >&6
11149if test "$enable_regex" = yes ; then
11150
11151echo "$as_me:11151: checking if you want to use PCRE for regular-expressions" >&5
11152echo $ECHO_N "checking if you want to use PCRE for regular-expressions... $ECHO_C" >&6
11153
11154# Check whether --with-pcre or --without-pcre was given.
11155if test "${with_pcre+set}" = set; then
11156  withval="$with_pcre"
11157
11158fi;
11159test -z "$with_pcre" && with_pcre=no
11160echo "$as_me:11160: result: $with_pcre" >&5
11161echo "${ECHO_T}$with_pcre" >&6
11162
11163if test "$with_pcre" != no ; then
11164	echo "$as_me:11164: checking for pcre_compile in -lpcre" >&5
11165echo $ECHO_N "checking for pcre_compile in -lpcre... $ECHO_C" >&6
11166if test "${ac_cv_lib_pcre_pcre_compile+set}" = set; then
11167  echo $ECHO_N "(cached) $ECHO_C" >&6
11168else
11169  ac_check_lib_save_LIBS=$LIBS
11170LIBS="-lpcre  $LIBS"
11171cat >conftest.$ac_ext <<_ACEOF
11172#line 11172 "configure"
11173#include "confdefs.h"
11174
11175/* Override any gcc2 internal prototype to avoid an error.  */
11176#ifdef __cplusplus
11177extern "C"
11178#endif
11179/* We use char because int might match the return type of a gcc2
11180   builtin and then its argument prototype would still apply.  */
11181char pcre_compile ();
11182int
11183main ()
11184{
11185pcre_compile ();
11186  ;
11187  return 0;
11188}
11189_ACEOF
11190rm -f conftest.$ac_objext conftest$ac_exeext
11191if { (eval echo "$as_me:11191: \"$ac_link\"") >&5
11192  (eval $ac_link) 2>&5
11193  ac_status=$?
11194  echo "$as_me:11194: \$? = $ac_status" >&5
11195  (exit $ac_status); } &&
11196         { ac_try='test -s conftest$ac_exeext'
11197  { (eval echo "$as_me:11197: \"$ac_try\"") >&5
11198  (eval $ac_try) 2>&5
11199  ac_status=$?
11200  echo "$as_me:11200: \$? = $ac_status" >&5
11201  (exit $ac_status); }; }; then
11202  ac_cv_lib_pcre_pcre_compile=yes
11203else
11204  echo "$as_me: failed program was:" >&5
11205cat conftest.$ac_ext >&5
11206ac_cv_lib_pcre_pcre_compile=no
11207fi
11208rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11209LIBS=$ac_check_lib_save_LIBS
11210fi
11211echo "$as_me:11211: result: $ac_cv_lib_pcre_pcre_compile" >&5
11212echo "${ECHO_T}$ac_cv_lib_pcre_pcre_compile" >&6
11213if test $ac_cv_lib_pcre_pcre_compile = yes; then
11214  echo "$as_me:11214: checking for pcreposix.h" >&5
11215echo $ECHO_N "checking for pcreposix.h... $ECHO_C" >&6
11216if test "${ac_cv_header_pcreposix_h+set}" = set; then
11217  echo $ECHO_N "(cached) $ECHO_C" >&6
11218else
11219  cat >conftest.$ac_ext <<_ACEOF
11220#line 11220 "configure"
11221#include "confdefs.h"
11222#include <pcreposix.h>
11223_ACEOF
11224if { (eval echo "$as_me:11224: \"$ac_cpp conftest.$ac_ext\"") >&5
11225  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11226  ac_status=$?
11227  egrep -v '^ *\+' conftest.er1 >conftest.err
11228  rm -f conftest.er1
11229  cat conftest.err >&5
11230  echo "$as_me:11230: \$? = $ac_status" >&5
11231  (exit $ac_status); } >/dev/null; then
11232  if test -s conftest.err; then
11233    ac_cpp_err=$ac_c_preproc_warn_flag
11234  else
11235    ac_cpp_err=
11236  fi
11237else
11238  ac_cpp_err=yes
11239fi
11240if test -z "$ac_cpp_err"; then
11241  ac_cv_header_pcreposix_h=yes
11242else
11243  echo "$as_me: failed program was:" >&5
11244  cat conftest.$ac_ext >&5
11245  ac_cv_header_pcreposix_h=no
11246fi
11247rm -f conftest.err conftest.$ac_ext
11248fi
11249echo "$as_me:11249: result: $ac_cv_header_pcreposix_h" >&5
11250echo "${ECHO_T}$ac_cv_header_pcreposix_h" >&6
11251if test $ac_cv_header_pcreposix_h = yes; then
11252  echo "$as_me:11252: checking for pcreposix_regcomp in -lpcreposix" >&5
11253echo $ECHO_N "checking for pcreposix_regcomp in -lpcreposix... $ECHO_C" >&6
11254if test "${ac_cv_lib_pcreposix_pcreposix_regcomp+set}" = set; then
11255  echo $ECHO_N "(cached) $ECHO_C" >&6
11256else
11257  ac_check_lib_save_LIBS=$LIBS
11258LIBS="-lpcreposix "-lpcre" $LIBS"
11259cat >conftest.$ac_ext <<_ACEOF
11260#line 11260 "configure"
11261#include "confdefs.h"
11262
11263/* Override any gcc2 internal prototype to avoid an error.  */
11264#ifdef __cplusplus
11265extern "C"
11266#endif
11267/* We use char because int might match the return type of a gcc2
11268   builtin and then its argument prototype would still apply.  */
11269char pcreposix_regcomp ();
11270int
11271main ()
11272{
11273pcreposix_regcomp ();
11274  ;
11275  return 0;
11276}
11277_ACEOF
11278rm -f conftest.$ac_objext conftest$ac_exeext
11279if { (eval echo "$as_me:11279: \"$ac_link\"") >&5
11280  (eval $ac_link) 2>&5
11281  ac_status=$?
11282  echo "$as_me:11282: \$? = $ac_status" >&5
11283  (exit $ac_status); } &&
11284         { ac_try='test -s conftest$ac_exeext'
11285  { (eval echo "$as_me:11285: \"$ac_try\"") >&5
11286  (eval $ac_try) 2>&5
11287  ac_status=$?
11288  echo "$as_me:11288: \$? = $ac_status" >&5
11289  (exit $ac_status); }; }; then
11290  ac_cv_lib_pcreposix_pcreposix_regcomp=yes
11291else
11292  echo "$as_me: failed program was:" >&5
11293cat conftest.$ac_ext >&5
11294ac_cv_lib_pcreposix_pcreposix_regcomp=no
11295fi
11296rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11297LIBS=$ac_check_lib_save_LIBS
11298fi
11299echo "$as_me:11299: result: $ac_cv_lib_pcreposix_pcreposix_regcomp" >&5
11300echo "${ECHO_T}$ac_cv_lib_pcreposix_pcreposix_regcomp" >&6
11301if test $ac_cv_lib_pcreposix_pcreposix_regcomp = yes; then
11302  cat >>confdefs.h <<\EOF
11303#define HAVE_LIB_PCRE 1
11304EOF
11305
11306				 cat >>confdefs.h <<\EOF
11307#define HAVE_PCREPOSIX_H 1
11308EOF
11309
11310				 LIBS="-lpcreposix -lpcre $LIBS"
11311else
11312  { { echo "$as_me:11312: error: Cannot find PCRE POSIX library" >&5
11313echo "$as_me: error: Cannot find PCRE POSIX library" >&2;}
11314   { (exit 1); exit 1; }; }
11315fi
11316
11317else
11318  { { echo "$as_me:11318: error: Cannot find PCRE POSIX header" >&5
11319echo "$as_me: error: Cannot find PCRE POSIX header" >&2;}
11320   { (exit 1); exit 1; }; }
11321fi
11322
11323else
11324  { { echo "$as_me:11324: error: Cannot find PCRE library" >&5
11325echo "$as_me: error: Cannot find PCRE library" >&2;}
11326   { (exit 1); exit 1; }; }
11327fi
11328
11329fi
11330
11331	if test "$with_pcre" = no ; then
11332
11333echo "$as_me:11333: checking for regular-expression headers" >&5
11334echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
11335if test "${cf_cv_regex+set}" = set; then
11336  echo $ECHO_N "(cached) $ECHO_C" >&6
11337else
11338
11339cat >conftest.$ac_ext <<_ACEOF
11340#line 11340 "configure"
11341#include "confdefs.h"
11342#include <sys/types.h>
11343#include <regex.h>
11344int
11345main ()
11346{
11347
11348	regex_t *p;
11349	int x = regcomp(p, "", 0);
11350	int y = regexec(p, "", 0, 0, 0);
11351	regfree(p);
11352
11353  ;
11354  return 0;
11355}
11356_ACEOF
11357rm -f conftest.$ac_objext conftest$ac_exeext
11358if { (eval echo "$as_me:11358: \"$ac_link\"") >&5
11359  (eval $ac_link) 2>&5
11360  ac_status=$?
11361  echo "$as_me:11361: \$? = $ac_status" >&5
11362  (exit $ac_status); } &&
11363         { ac_try='test -s conftest$ac_exeext'
11364  { (eval echo "$as_me:11364: \"$ac_try\"") >&5
11365  (eval $ac_try) 2>&5
11366  ac_status=$?
11367  echo "$as_me:11367: \$? = $ac_status" >&5
11368  (exit $ac_status); }; }; then
11369  cf_cv_regex="regex.h"
11370else
11371  echo "$as_me: failed program was:" >&5
11372cat conftest.$ac_ext >&5
11373
11374	cat >conftest.$ac_ext <<_ACEOF
11375#line 11375 "configure"
11376#include "confdefs.h"
11377#include <regexp.h>
11378int
11379main ()
11380{
11381
11382		char *p = compile("", "", "", 0);
11383		int x = step("", "");
11384
11385  ;
11386  return 0;
11387}
11388_ACEOF
11389rm -f conftest.$ac_objext conftest$ac_exeext
11390if { (eval echo "$as_me:11390: \"$ac_link\"") >&5
11391  (eval $ac_link) 2>&5
11392  ac_status=$?
11393  echo "$as_me:11393: \$? = $ac_status" >&5
11394  (exit $ac_status); } &&
11395         { ac_try='test -s conftest$ac_exeext'
11396  { (eval echo "$as_me:11396: \"$ac_try\"") >&5
11397  (eval $ac_try) 2>&5
11398  ac_status=$?
11399  echo "$as_me:11399: \$? = $ac_status" >&5
11400  (exit $ac_status); }; }; then
11401  cf_cv_regex="regexp.h"
11402else
11403  echo "$as_me: failed program was:" >&5
11404cat conftest.$ac_ext >&5
11405
11406		cf_save_LIBS="$LIBS"
11407		LIBS="-lgen $LIBS"
11408		cat >conftest.$ac_ext <<_ACEOF
11409#line 11409 "configure"
11410#include "confdefs.h"
11411#include <regexpr.h>
11412int
11413main ()
11414{
11415
11416			char *p = compile("", "", "");
11417			int x = step("", "");
11418
11419  ;
11420  return 0;
11421}
11422_ACEOF
11423rm -f conftest.$ac_objext conftest$ac_exeext
11424if { (eval echo "$as_me:11424: \"$ac_link\"") >&5
11425  (eval $ac_link) 2>&5
11426  ac_status=$?
11427  echo "$as_me:11427: \$? = $ac_status" >&5
11428  (exit $ac_status); } &&
11429         { ac_try='test -s conftest$ac_exeext'
11430  { (eval echo "$as_me:11430: \"$ac_try\"") >&5
11431  (eval $ac_try) 2>&5
11432  ac_status=$?
11433  echo "$as_me:11433: \$? = $ac_status" >&5
11434  (exit $ac_status); }; }; then
11435  cf_cv_regex="regexpr.h"
11436else
11437  echo "$as_me: failed program was:" >&5
11438cat conftest.$ac_ext >&5
11439LIBS="$cf_save_LIBS"
11440fi
11441rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11442fi
11443rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11444fi
11445rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11446
11447fi
11448
11449echo "$as_me:11449: result: $cf_cv_regex" >&5
11450echo "${ECHO_T}$cf_cv_regex" >&6
11451case $cf_cv_regex in
11452	regex.h)   cat >>confdefs.h <<\EOF
11453#define HAVE_REGEX_H_FUNCS 1
11454EOF
11455 ;;
11456	regexp.h)  cat >>confdefs.h <<\EOF
11457#define HAVE_REGEXP_H_FUNCS 1
11458EOF
11459 ;;
11460	regexpr.h) cat >>confdefs.h <<\EOF
11461#define HAVE_REGEXPR_H_FUNCS 1
11462EOF
11463 ;;
11464esac
11465
11466		if test "X$cf_cv_regex" != "Xregex.h" ; then
11467			{ { echo "$as_me:11467: error: Only POSIX or PCRE regular expressions are supported" >&5
11468echo "$as_me: error: Only POSIX or PCRE regular expressions are supported" >&2;}
11469   { (exit 1); exit 1; }; }
11470		fi
11471	fi
11472	cat >>confdefs.h <<\EOF
11473#define OPT_SELECT_REGEX 1
11474EOF
11475
11476fi
11477
11478echo "$as_me:11478: checking if you want support for right-scrollbar" >&5
11479echo $ECHO_N "checking if you want support for right-scrollbar... $ECHO_C" >&6
11480
11481# Check whether --enable-rightbar or --disable-rightbar was given.
11482if test "${enable_rightbar+set}" = set; then
11483  enableval="$enable_rightbar"
11484  test "$enableval" != no && enableval=yes
11485  if test "$enableval" != "yes" ; then
11486    enable_rightbar=no
11487  else
11488    enable_rightbar=yes
11489  fi
11490else
11491  enableval=yes
11492  enable_rightbar=yes
11493
11494fi;
11495echo "$as_me:11495: result: $enable_rightbar" >&5
11496echo "${ECHO_T}$enable_rightbar" >&6
11497if test "$enable_rightbar" = yes ; then
11498	cat >>confdefs.h <<\EOF
11499#define SCROLLBAR_RIGHT 1
11500EOF
11501
11502fi
11503
11504echo "$as_me:11504: checking if you want check for redundant name-change" >&5
11505echo $ECHO_N "checking if you want check for redundant name-change... $ECHO_C" >&6
11506
11507# Check whether --enable-samename or --disable-samename was given.
11508if test "${enable_samename+set}" = set; then
11509  enableval="$enable_samename"
11510  test "$enableval" != no && enableval=yes
11511  if test "$enableval" != "yes" ; then
11512    enable_samename=no
11513  else
11514    enable_samename=yes
11515  fi
11516else
11517  enableval=yes
11518  enable_samename=yes
11519
11520fi;
11521echo "$as_me:11521: result: $enable_samename" >&5
11522echo "${ECHO_T}$enable_samename" >&6
11523test "$enable_samename" = no && cat >>confdefs.h <<\EOF
11524#define OPT_SAME_NAME 0
11525EOF
11526
11527echo "$as_me:11527: checking if you want support for session management" >&5
11528echo $ECHO_N "checking if you want support for session management... $ECHO_C" >&6
11529
11530# Check whether --enable-session-mgt or --disable-session-mgt was given.
11531if test "${enable_session_mgt+set}" = set; then
11532  enableval="$enable_session_mgt"
11533  test "$enableval" != no && enableval=yes
11534  if test "$enableval" != "yes" ; then
11535    enable_session_mgt=no
11536  else
11537    enable_session_mgt=yes
11538  fi
11539else
11540  enableval=yes
11541  enable_session_mgt=yes
11542
11543fi;
11544echo "$as_me:11544: result: $enable_session_mgt" >&5
11545echo "${ECHO_T}$enable_session_mgt" >&6
11546test "$enable_session_mgt" = no && cat >>confdefs.h <<\EOF
11547#define OPT_SESSION_MGT 0
11548EOF
11549
11550echo "$as_me:11550: checking if you want to use termcap function-keys" >&5
11551echo $ECHO_N "checking if you want to use termcap function-keys... $ECHO_C" >&6
11552
11553# Check whether --enable-tcap-fkeys or --disable-tcap-fkeys was given.
11554if test "${enable_tcap_fkeys+set}" = set; then
11555  enableval="$enable_tcap_fkeys"
11556  test "$enableval" != no && enableval=yes
11557  if test "$enableval" != "yes" ; then
11558    enable_tcap_fkeys=no
11559  else
11560    enable_tcap_fkeys=yes
11561  fi
11562else
11563  enableval=yes
11564  enable_tcap_fkeys=yes
11565
11566fi;
11567echo "$as_me:11567: result: $enable_tcap_fkeys" >&5
11568echo "${ECHO_T}$enable_tcap_fkeys" >&6
11569test "$enable_tcap_fkeys" = yes && cat >>confdefs.h <<\EOF
11570#define OPT_TCAP_FKEYS 1
11571EOF
11572
11573echo "$as_me:11573: checking if you want to use termcap-query/report" >&5
11574echo $ECHO_N "checking if you want to use termcap-query/report... $ECHO_C" >&6
11575
11576# Check whether --enable-tcap-query or --disable-tcap-query was given.
11577if test "${enable_tcap_query+set}" = set; then
11578  enableval="$enable_tcap_query"
11579  test "$enableval" != yes && enableval=no
11580  if test "$enableval" != "no" ; then
11581    enable_tcap_query=yes
11582  else
11583    enable_tcap_query=no
11584  fi
11585else
11586  enableval=no
11587  enable_tcap_query=no
11588
11589fi;
11590echo "$as_me:11590: result: $enable_tcap_query" >&5
11591echo "${ECHO_T}$enable_tcap_query" >&6
11592test "$enable_tcap_query" = yes && cat >>confdefs.h <<\EOF
11593#define OPT_TCAP_QUERY 1
11594EOF
11595
11596echo "$as_me:11596: checking if you want support for tek4014" >&5
11597echo $ECHO_N "checking if you want support for tek4014... $ECHO_C" >&6
11598
11599# Check whether --enable-tek4014 or --disable-tek4014 was given.
11600if test "${enable_tek4014+set}" = set; then
11601  enableval="$enable_tek4014"
11602  test "$enableval" != no && enableval=yes
11603  if test "$enableval" != "yes" ; then
11604    enable_tek4014=no
11605  else
11606    enable_tek4014=yes
11607  fi
11608else
11609  enableval=yes
11610  enable_tek4014=yes
11611
11612fi;
11613echo "$as_me:11613: result: $enable_tek4014" >&5
11614echo "${ECHO_T}$enable_tek4014" >&6
11615if test "$enable_tek4014" = no ; then
11616	cat >>confdefs.h <<\EOF
11617#define OPT_TEK4014 0
11618EOF
11619
11620else
11621	EXTRAHDRS="$EXTRAHDRS Tekparse.h"
11622	EXTRASRCS="$EXTRASRCS TekPrsTbl.c Tekproc.c"
11623	EXTRAOBJS="$EXTRAOBJS TekPrsTbl.o Tekproc.o"
11624fi
11625
11626echo "$as_me:11626: checking if you want pulldown menus with a toolbar" >&5
11627echo $ECHO_N "checking if you want pulldown menus with a toolbar... $ECHO_C" >&6
11628
11629# Check whether --enable-toolbar or --disable-toolbar was given.
11630if test "${enable_toolbar+set}" = set; then
11631  enableval="$enable_toolbar"
11632  test "$enableval" != yes && enableval=no
11633  if test "$enableval" != "no" ; then
11634    enable_toolbar=yes
11635  else
11636    enable_toolbar=no
11637  fi
11638else
11639  enableval=no
11640  enable_toolbar=no
11641
11642fi;
11643echo "$as_me:11643: result: $enable_toolbar" >&5
11644echo "${ECHO_T}$enable_toolbar" >&6
11645if test "$enable_toolbar" = yes ; then
11646	cat >>confdefs.h <<\EOF
11647#define OPT_TOOLBAR 1
11648EOF
11649
11650fi
11651
11652echo "$as_me:11652: checking if you want VT52 emulation" >&5
11653echo $ECHO_N "checking if you want VT52 emulation... $ECHO_C" >&6
11654
11655# Check whether --enable-vt52 or --disable-vt52 was given.
11656if test "${enable_vt52+set}" = set; then
11657  enableval="$enable_vt52"
11658  test "$enableval" != no && enableval=yes
11659  if test "$enableval" != "yes" ; then
11660    enable_vt52=no
11661  else
11662    enable_vt52=yes
11663  fi
11664else
11665  enableval=yes
11666  enable_vt52=yes
11667
11668fi;
11669echo "$as_me:11669: result: $enable_vt52" >&5
11670echo "${ECHO_T}$enable_vt52" >&6
11671test "$enable_vt52" = no && cat >>confdefs.h <<\EOF
11672#define OPT_VT52_MODE 0
11673EOF
11674
11675echo "$as_me:11675: checking if you want to use mini-luit/Latin9 built-in support" >&5
11676echo $ECHO_N "checking if you want to use mini-luit/Latin9 built-in support... $ECHO_C" >&6
11677
11678# Check whether --enable-mini-luit or --disable-mini-luit was given.
11679if test "${enable_mini_luit+set}" = set; then
11680  enableval="$enable_mini_luit"
11681  test "$enableval" != yes && enableval=no
11682  if test "$enableval" != "no" ; then
11683    enable_mini_luit=yes
11684  else
11685    enable_mini_luit=no
11686  fi
11687else
11688  enableval=no
11689  enable_mini_luit=no
11690
11691fi;
11692echo "$as_me:11692: result: $enable_mini_luit" >&5
11693echo "${ECHO_T}$enable_mini_luit" >&6
11694if test "$enable_mini_luit" = yes ; then
11695	cat >>confdefs.h <<\EOF
11696#define OPT_MINI_LUIT 1
11697EOF
11698
11699fi
11700
11701echo "$as_me:11701: checking if you want to use luit" >&5
11702echo $ECHO_N "checking if you want to use luit... $ECHO_C" >&6
11703
11704# Check whether --enable-luit or --disable-luit was given.
11705if test "${enable_luit+set}" = set; then
11706  enableval="$enable_luit"
11707  test "$enableval" != yes && enableval=no
11708  if test "$enableval" != "no" ; then
11709    enable_luit=yes
11710  else
11711    enable_luit=$enable_mini_luit
11712  fi
11713else
11714  enableval=no
11715  enable_luit=$enable_mini_luit
11716
11717fi;
11718echo "$as_me:11718: result: $enable_luit" >&5
11719echo "${ECHO_T}$enable_luit" >&6
11720if test "$enable_luit" = yes ; then
11721	cat >>confdefs.h <<\EOF
11722#define OPT_LUIT_PROG 1
11723EOF
11724
11725test -z "$LUIT" && LUIT=luit
11726for ac_prog in $LUIT luit
11727do
11728  # Extract the first word of "$ac_prog", so it can be a program name with args.
11729set dummy $ac_prog; ac_word=$2
11730echo "$as_me:11730: checking for $ac_word" >&5
11731echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
11732if test "${ac_cv_path_LUIT+set}" = set; then
11733  echo $ECHO_N "(cached) $ECHO_C" >&6
11734else
11735  case $LUIT in
11736  [\\/]* | ?:[\\/]*)
11737  ac_cv_path_LUIT="$LUIT" # Let the user override the test with a path.
11738  ;;
11739  *)
11740  ac_save_IFS=$IFS; IFS=$ac_path_separator
11741ac_dummy="$PATH"
11742for ac_dir in $ac_dummy; do
11743  IFS=$ac_save_IFS
11744  test -z "$ac_dir" && ac_dir=.
11745  if $as_executable_p "$ac_dir/$ac_word"; then
11746   ac_cv_path_LUIT="$ac_dir/$ac_word"
11747   echo "$as_me:11747: found $ac_dir/$ac_word" >&5
11748   break
11749fi
11750done
11751
11752  ;;
11753esac
11754fi
11755LUIT=$ac_cv_path_LUIT
11756
11757if test -n "$LUIT"; then
11758  echo "$as_me:11758: result: $LUIT" >&5
11759echo "${ECHO_T}$LUIT" >&6
11760else
11761  echo "$as_me:11761: result: no" >&5
11762echo "${ECHO_T}no" >&6
11763fi
11764
11765  test -n "$LUIT" && break
11766done
11767test -n "$LUIT" || LUIT="$LUIT"
11768
11769cf_path_prog=""
11770cf_path_args=""
11771IFS="${IFS= 	}"; cf_save_ifs="$IFS"
11772case $host_os in #(vi
11773os2*) #(vi
11774	IFS="${IFS};"
11775	;;
11776*)
11777	IFS="${IFS}:"
11778	;;
11779esac
11780
11781for cf_temp in $ac_cv_path_LUIT
11782do
11783	if test -z "$cf_path_prog" ; then
11784		if test "$with_full_paths" = yes ; then
11785
11786if test "x$prefix" != xNONE; then
11787  cf_path_syntax="$prefix"
11788else
11789  cf_path_syntax="$ac_default_prefix"
11790fi
11791
11792case ".$cf_temp" in #(vi
11793.\$\(*\)*|.\'*\'*) #(vi
11794  ;;
11795..|./*|.\\*) #(vi
11796  ;;
11797.[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
11798  ;;
11799.\${*prefix}*) #(vi
11800  eval cf_temp="$cf_temp"
11801  case ".$cf_temp" in #(vi
11802  .NONE/*)
11803    cf_temp=`echo $cf_temp | sed -e s%NONE%$cf_path_syntax%`
11804    ;;
11805  esac
11806  ;; #(vi
11807.no|.NONE/*)
11808  cf_temp=`echo $cf_temp | sed -e s%NONE%$cf_path_syntax%`
11809  ;;
11810*)
11811  break
11812  ;;
11813esac
11814
11815			cf_path_prog="$cf_temp"
11816		else
11817			cf_path_prog="`basename $cf_temp`"
11818		fi
11819	elif test -z "$cf_path_args" ; then
11820		cf_path_args="$cf_temp"
11821	else
11822		cf_path_args="$cf_path_args $cf_temp"
11823	fi
11824done
11825IFS="$cf_save_ifs"
11826
11827if test -n "$cf_path_prog" ; then
11828
11829echo "${as_me-configure}:11829: testing defining path for ${cf_path_prog} ..." 1>&5
11830
11831	cat >>confdefs.h <<EOF
11832#define LUIT_PATH "$cf_path_prog"
11833EOF
11834
11835	test -n "$cf_path_args" && cat >>confdefs.h <<EOF
11836#define LUIT_ARGS "$cf_path_args"
11837EOF
11838
11839fi
11840
11841fi
11842
11843echo "$as_me:11843: checking if you want wide-character support" >&5
11844echo $ECHO_N "checking if you want wide-character support... $ECHO_C" >&6
11845
11846# Check whether --enable-wide-chars or --disable-wide-chars was given.
11847if test "${enable_wide_chars+set}" = set; then
11848  enableval="$enable_wide_chars"
11849  test "$enableval" != no && enableval=yes
11850  if test "$enableval" != "$enable_luit" ; then
11851    enable_wchar=yes
11852  else
11853    enable_wchar=$enable_luit
11854  fi
11855else
11856  enableval=$enable_luit
11857  enable_wchar=$enable_luit
11858
11859fi;
11860echo "$as_me:11860: result: $enable_wchar" >&5
11861echo "${ECHO_T}$enable_wchar" >&6
11862if test "$enable_wchar" = yes ; then
11863	cat >>confdefs.h <<\EOF
11864#define OPT_WIDE_CHARS 1
11865EOF
11866
11867	EXTRAHDRS="$EXTRAHDRS charclass.h precompose.h wcwidth.h"
11868	EXTRASRCS="$EXTRASRCS charclass.c precompose.c wcwidth.c"
11869	EXTRAOBJS="$EXTRAOBJS charclass.o precompose.o wcwidth.o"
11870fi
11871
11872echo "$as_me:11872: checking if you want dynamic-abbreviation support" >&5
11873echo $ECHO_N "checking if you want dynamic-abbreviation support... $ECHO_C" >&6
11874
11875# Check whether --enable-dabbrev or --disable-dabbrev was given.
11876if test "${enable_dabbrev+set}" = set; then
11877  enableval="$enable_dabbrev"
11878  test "$enableval" != yes && enableval=no
11879  if test "$enableval" != "no" ; then
11880    enable_dabbrev=yes
11881  else
11882    enable_dabbrev=no
11883  fi
11884else
11885  enableval=no
11886  enable_dabbrev=no
11887
11888fi;
11889echo "$as_me:11889: result: $enable_dabbrev" >&5
11890echo "${ECHO_T}$enable_dabbrev" >&6
11891if test "$enable_dabbrev" = yes ; then
11892	cat >>confdefs.h <<\EOF
11893#define OPT_DABBREV 1
11894EOF
11895
11896fi
11897
11898echo "$as_me:11898: checking if you want DECterm Locator support" >&5
11899echo $ECHO_N "checking if you want DECterm Locator support... $ECHO_C" >&6
11900
11901# Check whether --enable-dec-locator or --disable-dec-locator was given.
11902if test "${enable_dec_locator+set}" = set; then
11903  enableval="$enable_dec_locator"
11904  test "$enableval" != yes && enableval=no
11905  if test "$enableval" != "no" ; then
11906    enable_dec_locator=yes
11907  else
11908    enable_dec_locator=no
11909  fi
11910else
11911  enableval=no
11912  enable_dec_locator=no
11913
11914fi;
11915echo "$as_me:11915: result: $enable_dec_locator" >&5
11916echo "${ECHO_T}$enable_dec_locator" >&6
11917if test "$enable_dec_locator" = yes ; then
11918	cat >>confdefs.h <<\EOF
11919#define OPT_DEC_LOCATOR 1
11920EOF
11921
11922fi
11923
11924echo "$as_me:11924: checking if you want VT420 rectangle support" >&5
11925echo $ECHO_N "checking if you want VT420 rectangle support... $ECHO_C" >&6
11926
11927# Check whether --enable-rectangles or --disable-rectangles was given.
11928if test "${enable_rectangles+set}" = set; then
11929  enableval="$enable_rectangles"
11930  test "$enableval" != no && enableval=yes
11931  if test "$enableval" != "yes" ; then
11932    enable_rectangles=no
11933  else
11934    enable_rectangles=yes
11935  fi
11936else
11937  enableval=yes
11938  enable_rectangles=yes
11939
11940fi;
11941echo "$as_me:11941: result: $enable_rectangles" >&5
11942echo "${ECHO_T}$enable_rectangles" >&6
11943if test "$enable_rectangles" = yes ; then
11944	cat >>confdefs.h <<\EOF
11945#define OPT_DEC_RECTOPS 1
11946EOF
11947
11948fi
11949
11950echo "$as_me:11950: checking if you want -ziconbeep option" >&5
11951echo $ECHO_N "checking if you want -ziconbeep option... $ECHO_C" >&6
11952
11953# Check whether --enable-ziconbeep or --disable-ziconbeep was given.
11954if test "${enable_ziconbeep+set}" = set; then
11955  enableval="$enable_ziconbeep"
11956  test "$enableval" != no && enableval=yes
11957  if test "$enableval" != "yes" ; then
11958    enable_ziconbeep=no
11959  else
11960    enable_ziconbeep=yes
11961  fi
11962else
11963  enableval=yes
11964  enable_ziconbeep=yes
11965
11966fi;
11967echo "$as_me:11967: result: $enable_ziconbeep" >&5
11968echo "${ECHO_T}$enable_ziconbeep" >&6
11969test "$enable_ziconbeep" = no && cat >>confdefs.h <<\EOF
11970#define OPT_ZICONBEEP 0
11971EOF
11972
11973###############################################################################
11974
11975echo "$as_me:11975: checking if you want debugging traces" >&5
11976echo $ECHO_N "checking if you want debugging traces... $ECHO_C" >&6
11977
11978# Check whether --enable-trace or --disable-trace was given.
11979if test "${enable_trace+set}" = set; then
11980  enableval="$enable_trace"
11981  test "$enableval" != yes && enableval=no
11982  if test "$enableval" != "no" ; then
11983    enable_trace=yes
11984  else
11985    enable_trace=no
11986  fi
11987else
11988  enableval=no
11989  enable_trace=no
11990
11991fi;
11992echo "$as_me:11992: result: $enable_trace" >&5
11993echo "${ECHO_T}$enable_trace" >&6
11994if test "$enable_trace" = yes ; then
11995	cat >>confdefs.h <<\EOF
11996#define OPT_TRACE 1
11997EOF
11998
11999	EXTRASRCS="$EXTRASRCS trace.c"
12000	EXTRAOBJS="$EXTRAOBJS trace.o"
12001fi
12002
12003echo "$as_me:12003: checking if you want to test memory leaks" >&5
12004echo $ECHO_N "checking if you want to test memory leaks... $ECHO_C" >&6
12005
12006# Check whether --enable-leaks or --disable-leaks was given.
12007if test "${enable_leaks+set}" = set; then
12008  enableval="$enable_leaks"
12009  test "$enableval" != no && enableval=yes
12010  if test "$enableval" != "yes" ; then
12011    disable_leaks=yes
12012  else
12013    disable_leaks=no
12014  fi
12015else
12016  enableval=yes
12017  disable_leaks=no
12018
12019fi;
12020echo "$as_me:12020: result: $disable_leaks" >&5
12021echo "${ECHO_T}$disable_leaks" >&6
12022if test "$disable_leaks" = yes ; then
12023	cat >>confdefs.h <<\EOF
12024#define NO_LEAKS 1
12025EOF
12026
12027fi
12028
12029echo "$as_me:12029: checking if you want to see long compiling messages" >&5
12030echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
12031
12032# Check whether --enable-echo or --disable-echo was given.
12033if test "${enable_echo+set}" = set; then
12034  enableval="$enable_echo"
12035  test "$enableval" != no && enableval=yes
12036  if test "$enableval" != "yes" ; then
12037
12038    ECHO_LT='--silent'
12039    ECHO_LD='@echo linking $@;'
12040    RULE_CC='	@echo compiling $<'
12041    SHOW_CC='	@echo compiling $@'
12042    ECHO_CC='@'
12043
12044  else
12045
12046    ECHO_LT=''
12047    ECHO_LD=''
12048    RULE_CC='# compiling'
12049    SHOW_CC='# compiling'
12050    ECHO_CC=''
12051
12052  fi
12053else
12054  enableval=yes
12055
12056    ECHO_LT=''
12057    ECHO_LD=''
12058    RULE_CC='# compiling'
12059    SHOW_CC='# compiling'
12060    ECHO_CC=''
12061
12062fi;
12063echo "$as_me:12063: result: $enableval" >&5
12064echo "${ECHO_T}$enableval" >&6
12065
12066echo "$as_me:12066: checking if you want magic cookie emulation" >&5
12067echo $ECHO_N "checking if you want magic cookie emulation... $ECHO_C" >&6
12068
12069# Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
12070if test "${enable_xmc_glitch+set}" = set; then
12071  enableval="$enable_xmc_glitch"
12072  test "$enableval" != yes && enableval=no
12073  if test "$enableval" != "no" ; then
12074    enable_xmc=yes
12075  else
12076    enable_xmc=no
12077  fi
12078else
12079  enableval=no
12080  enable_xmc=no
12081
12082fi;
12083echo "$as_me:12083: result: $enable_xmc" >&5
12084echo "${ECHO_T}$enable_xmc" >&6
12085if test "$enable_xmc" = yes ; then
12086	cat >>confdefs.h <<\EOF
12087#define OPT_XMC_GLITCH 1
12088EOF
12089
12090	EXTRASRCS="$EXTRASRCS testxmc.c"
12091	EXTRAOBJS="$EXTRAOBJS testxmc.o"
12092fi
12093
12094for ac_func in tigetstr
12095do
12096as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12097echo "$as_me:12097: checking for $ac_func" >&5
12098echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12099if eval "test \"\${$as_ac_var+set}\" = set"; then
12100  echo $ECHO_N "(cached) $ECHO_C" >&6
12101else
12102  cat >conftest.$ac_ext <<_ACEOF
12103#line 12103 "configure"
12104#include "confdefs.h"
12105/* System header to define __stub macros and hopefully few prototypes,
12106    which can conflict with char $ac_func (); below.  */
12107#include <assert.h>
12108/* Override any gcc2 internal prototype to avoid an error.  */
12109#ifdef __cplusplus
12110extern "C"
12111#endif
12112/* We use char because int might match the return type of a gcc2
12113   builtin and then its argument prototype would still apply.  */
12114char $ac_func ();
12115char (*f) ();
12116
12117int
12118main ()
12119{
12120/* The GNU C library defines this for functions which it implements
12121    to always fail with ENOSYS.  Some functions are actually named
12122    something starting with __ and the normal name is an alias.  */
12123#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12124choke me
12125#else
12126f = $ac_func;
12127#endif
12128
12129  ;
12130  return 0;
12131}
12132_ACEOF
12133rm -f conftest.$ac_objext conftest$ac_exeext
12134if { (eval echo "$as_me:12134: \"$ac_link\"") >&5
12135  (eval $ac_link) 2>&5
12136  ac_status=$?
12137  echo "$as_me:12137: \$? = $ac_status" >&5
12138  (exit $ac_status); } &&
12139         { ac_try='test -s conftest$ac_exeext'
12140  { (eval echo "$as_me:12140: \"$ac_try\"") >&5
12141  (eval $ac_try) 2>&5
12142  ac_status=$?
12143  echo "$as_me:12143: \$? = $ac_status" >&5
12144  (exit $ac_status); }; }; then
12145  eval "$as_ac_var=yes"
12146else
12147  echo "$as_me: failed program was:" >&5
12148cat conftest.$ac_ext >&5
12149eval "$as_ac_var=no"
12150fi
12151rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12152fi
12153echo "$as_me:12153: result: `eval echo '${'$as_ac_var'}'`" >&5
12154echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12155if test `eval echo '${'$as_ac_var'}'` = yes; then
12156  cat >>confdefs.h <<EOF
12157#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12158EOF
12159
12160fi
12161done
12162
12163if test -n "$GCC" ; then
12164echo "$as_me:12164: checking if you want to turn on gcc warnings" >&5
12165echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6
12166
12167# Check whether --enable-warnings or --disable-warnings was given.
12168if test "${enable_warnings+set}" = set; then
12169  enableval="$enable_warnings"
12170  test "$enableval" != yes && enableval=no
12171  if test "$enableval" != "no" ; then
12172    with_warnings=yes
12173  else
12174    with_warnings=no
12175  fi
12176else
12177  enableval=no
12178  with_warnings=no
12179
12180fi;
12181echo "$as_me:12181: result: $with_warnings" >&5
12182echo "${ECHO_T}$with_warnings" >&6
12183if test "$with_warnings" = yes
12184then
12185
12186if test "$GCC" = yes
12187then
12188cat > conftest.i <<EOF
12189#ifndef GCC_PRINTF
12190#define GCC_PRINTF 0
12191#endif
12192#ifndef GCC_SCANF
12193#define GCC_SCANF 0
12194#endif
12195#ifndef GCC_NORETURN
12196#define GCC_NORETURN /* nothing */
12197#endif
12198#ifndef GCC_UNUSED
12199#define GCC_UNUSED /* nothing */
12200#endif
12201EOF
12202if test "$GCC" = yes
12203then
12204	{ echo "$as_me:12204: checking for $CC __attribute__ directives..." >&5
12205echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
12206cat > conftest.$ac_ext <<EOF
12207#line 12207 "${as_me-configure}"
12208#include "confdefs.h"
12209#include "conftest.h"
12210#include "conftest.i"
12211#if	GCC_PRINTF
12212#define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
12213#else
12214#define GCC_PRINTFLIKE(fmt,var) /*nothing*/
12215#endif
12216#if	GCC_SCANF
12217#define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
12218#else
12219#define GCC_SCANFLIKE(fmt,var)  /*nothing*/
12220#endif
12221extern void wow(char *,...) GCC_SCANFLIKE(1,2);
12222extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
12223extern void foo(void) GCC_NORETURN;
12224int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
12225EOF
12226	for cf_attribute in scanf printf unused noreturn
12227	do
12228
12229cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
12230
12231		cf_directive="__attribute__(($cf_attribute))"
12232		echo "checking for $CC $cf_directive" 1>&5
12233		case $cf_attribute in
12234		scanf|printf)
12235		cat >conftest.h <<EOF
12236#define GCC_$cf_ATTRIBUTE 1
12237EOF
12238			;;
12239		*)
12240		cat >conftest.h <<EOF
12241#define GCC_$cf_ATTRIBUTE $cf_directive
12242EOF
12243			;;
12244		esac
12245		if { (eval echo "$as_me:12245: \"$ac_compile\"") >&5
12246  (eval $ac_compile) 2>&5
12247  ac_status=$?
12248  echo "$as_me:12248: \$? = $ac_status" >&5
12249  (exit $ac_status); }; then
12250			test -n "$verbose" && echo "$as_me:12250: result: ... $cf_attribute" >&5
12251echo "${ECHO_T}... $cf_attribute" >&6
12252			cat conftest.h >>confdefs.h
12253		fi
12254	done
12255else
12256	fgrep define conftest.i >>confdefs.h
12257fi
12258rm -rf conftest*
12259fi
12260
12261GCC_VERSION=none
12262if test "$GCC" = yes ; then
12263	echo "$as_me:12263: checking version of $CC" >&5
12264echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
12265	GCC_VERSION="`${CC} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
12266	test -z "$GCC_VERSION" && GCC_VERSION=unknown
12267	echo "$as_me:12267: result: $GCC_VERSION" >&5
12268echo "${ECHO_T}$GCC_VERSION" >&6
12269fi
12270
12271INTEL_COMPILER=no
12272
12273if test "$GCC" = yes ; then
12274	case $host_os in
12275	linux*|gnu*)
12276		echo "$as_me:12276: checking if this is really Intel C compiler" >&5
12277echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
12278		cf_save_CFLAGS="$CFLAGS"
12279		CFLAGS="$CFLAGS -no-gcc"
12280		cat >conftest.$ac_ext <<_ACEOF
12281#line 12281 "configure"
12282#include "confdefs.h"
12283
12284int
12285main ()
12286{
12287
12288#ifdef __INTEL_COMPILER
12289#else
12290make an error
12291#endif
12292
12293  ;
12294  return 0;
12295}
12296_ACEOF
12297rm -f conftest.$ac_objext
12298if { (eval echo "$as_me:12298: \"$ac_compile\"") >&5
12299  (eval $ac_compile) 2>&5
12300  ac_status=$?
12301  echo "$as_me:12301: \$? = $ac_status" >&5
12302  (exit $ac_status); } &&
12303         { ac_try='test -s conftest.$ac_objext'
12304  { (eval echo "$as_me:12304: \"$ac_try\"") >&5
12305  (eval $ac_try) 2>&5
12306  ac_status=$?
12307  echo "$as_me:12307: \$? = $ac_status" >&5
12308  (exit $ac_status); }; }; then
12309  INTEL_COMPILER=yes
12310cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
12311
12312else
12313  echo "$as_me: failed program was:" >&5
12314cat conftest.$ac_ext >&5
12315fi
12316rm -f conftest.$ac_objext conftest.$ac_ext
12317		CFLAGS="$cf_save_CFLAGS"
12318		echo "$as_me:12318: result: $INTEL_COMPILER" >&5
12319echo "${ECHO_T}$INTEL_COMPILER" >&6
12320		;;
12321	esac
12322fi
12323
12324cat > conftest.$ac_ext <<EOF
12325#line 12325 "${as_me-configure}"
12326int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
12327EOF
12328
12329if test "$INTEL_COMPILER" = yes
12330then
12331# The "-wdXXX" options suppress warnings:
12332# remark #1419: external declaration in primary source file
12333# remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
12334# remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
12335# remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
12336# remark #193: zero used for undefined preprocessing identifier
12337# remark #593: variable "curs_sb_left_arrow" was set but never used
12338# remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
12339# remark #869: parameter "tw" was never referenced
12340# remark #981: operands are evaluated in unspecified order
12341# warning #269: invalid format string conversion
12342
12343	{ echo "$as_me:12343: checking for $CC warning options..." >&5
12344echo "$as_me: checking for $CC warning options..." >&6;}
12345	cf_save_CFLAGS="$CFLAGS"
12346	EXTRA_CFLAGS="-Wall"
12347	for cf_opt in \
12348		wd1419 \
12349		wd1682 \
12350		wd1683 \
12351		wd1684 \
12352		wd193 \
12353		wd279 \
12354		wd593 \
12355		wd810 \
12356		wd869 \
12357		wd981
12358	do
12359		CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
12360		if { (eval echo "$as_me:12360: \"$ac_compile\"") >&5
12361  (eval $ac_compile) 2>&5
12362  ac_status=$?
12363  echo "$as_me:12363: \$? = $ac_status" >&5
12364  (exit $ac_status); }; then
12365			test -n "$verbose" && echo "$as_me:12365: result: ... -$cf_opt" >&5
12366echo "${ECHO_T}... -$cf_opt" >&6
12367			EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
12368		fi
12369	done
12370	CFLAGS="$cf_save_CFLAGS"
12371
12372elif test "$GCC" = yes
12373then
12374	{ echo "$as_me:12374: checking for $CC warning options..." >&5
12375echo "$as_me: checking for $CC warning options..." >&6;}
12376	cf_save_CFLAGS="$CFLAGS"
12377	EXTRA_CFLAGS="-W -Wall"
12378	cf_warn_CONST=""
12379	test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
12380	for cf_opt in \
12381		Wbad-function-cast \
12382		Wcast-align \
12383		Wcast-qual \
12384		Winline \
12385		Wmissing-declarations \
12386		Wmissing-prototypes \
12387		Wnested-externs \
12388		Wpointer-arith \
12389		Wshadow \
12390		Wstrict-prototypes \
12391		Wundef $cf_warn_CONST Wdeclaration-after-statement Wextra Wno-unknown-pragmas Wswitch-enum
12392	do
12393		CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
12394		if { (eval echo "$as_me:12394: \"$ac_compile\"") >&5
12395  (eval $ac_compile) 2>&5
12396  ac_status=$?
12397  echo "$as_me:12397: \$? = $ac_status" >&5
12398  (exit $ac_status); }; then
12399			test -n "$verbose" && echo "$as_me:12399: result: ... -$cf_opt" >&5
12400echo "${ECHO_T}... -$cf_opt" >&6
12401			case $cf_opt in #(vi
12402			Wcast-qual) #(vi
12403				CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
12404				;;
12405			Winline) #(vi
12406				case $GCC_VERSION in
12407				3.3*)
12408					test -n "$verbose" && echo "	feature is broken in gcc $GCC_VERSION" 1>&6
12409
12410echo "${as_me-configure}:12410: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
12411
12412					continue;;
12413				esac
12414				;;
12415			esac
12416			EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
12417		fi
12418	done
12419	CFLAGS="$cf_save_CFLAGS"
12420fi
12421rm -f conftest*
12422
12423fi
12424fi
12425
12426test "$disable_setuid" = yes && cat >>confdefs.h <<\EOF
12427#define DISABLE_SETUID 1
12428EOF
12429
12430test "$disable_setgid" = yes && cat >>confdefs.h <<\EOF
12431#define DISABLE_SETGID 1
12432EOF
12433
12434if test $disable_setuid = yes ; then
12435	MAY_SETUID="#"
12436	NOT_SETUID=
12437elif test $disable_setgid = yes ; then
12438	MAY_SETUID="#"
12439	NOT_SETUID=
12440else
12441	MAY_SETUID=
12442	NOT_SETUID="#"
12443fi
12444
12445###	remove from CPPFLAGS the optional features we define in xtermcfg.h
12446###	or other conflicting symbols that may be defined via imake:
12447for cf_def in \
12448	__STDC__ \
12449	ALLOWLOGGING \
12450	ALLOWLOGFILEEXEC \
12451	OPT_LUIT_PROG \
12452	OPT_WIDE_CHARS \
12453	SCROLLBAR_RIGHT \
12454	USE_TTY_GROUP \
12455	USE_UTEMPTER \
12456	XRENDERFONT
12457do
12458	CPPFLAGS=`echo "$CPPFLAGS" | sed -e s/-D$cf_def//`
12459done
12460
12461###	output Makefile and xtermcfg.h
12462ac_config_files="$ac_config_files Makefile"
12463cat >confcache <<\_ACEOF
12464# This file is a shell script that caches the results of configure
12465# tests run on this system so they can be shared between configure
12466# scripts and configure runs, see configure's option --config-cache.
12467# It is not useful on other systems.  If it contains results you don't
12468# want to keep, you may remove or edit it.
12469#
12470# config.status only pays attention to the cache file if you give it
12471# the --recheck option to rerun configure.
12472#
12473# `ac_cv_env_foo' variables (set or unset) will be overriden when
12474# loading this file, other *unset* `ac_cv_foo' will be assigned the
12475# following values.
12476
12477_ACEOF
12478
12479# The following way of writing the cache mishandles newlines in values,
12480# but we know of no workaround that is simple, portable, and efficient.
12481# So, don't put newlines in cache variables' values.
12482# Ultrix sh set writes to stderr and can't be redirected directly,
12483# and sets the high bit in the cache file unless we assign to the vars.
12484{
12485  (set) 2>&1 |
12486    case `(ac_space=' '; set | grep ac_space) 2>&1` in
12487    *ac_space=\ *)
12488      # `set' does not quote correctly, so add quotes (double-quote
12489      # substitution turns \\\\ into \\, and sed turns \\ into \).
12490      sed -n \
12491        "s/'/'\\\\''/g;
12492    	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
12493      ;;
12494    *)
12495      # `set' quotes correctly as required by POSIX, so do not add quotes.
12496      sed -n \
12497        "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
12498      ;;
12499    esac;
12500} |
12501  sed '
12502     t clear
12503     : clear
12504     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
12505     t end
12506     /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
12507     : end' >>confcache
12508if cmp -s $cache_file confcache; then :; else
12509  if test -w $cache_file; then
12510    test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
12511    cat confcache >$cache_file
12512  else
12513    echo "not updating unwritable cache $cache_file"
12514  fi
12515fi
12516rm -f confcache
12517
12518test "x$prefix" = xNONE && prefix=$ac_default_prefix
12519# Let make expand exec_prefix.
12520test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
12521
12522# VPATH may cause trouble with some makes, so we remove $(srcdir),
12523# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
12524# trailing colons and then remove the whole line if VPATH becomes empty
12525# (actually we leave an empty line to preserve line numbers).
12526if test "x$srcdir" = x.; then
12527  ac_vpsub='/^[ 	]*VPATH[ 	]*=/{
12528s/:*\$(srcdir):*/:/;
12529s/:*\${srcdir}:*/:/;
12530s/:*@srcdir@:*/:/;
12531s/^\([^=]*=[ 	]*\):*/\1/;
12532s/:*$//;
12533s/^[^=]*=[ 	]*$//;
12534}'
12535fi
12536
12537DEFS=-DHAVE_CONFIG_H
12538
12539: ${CONFIG_STATUS=./config.status}
12540ac_clean_files_save=$ac_clean_files
12541ac_clean_files="$ac_clean_files $CONFIG_STATUS"
12542{ echo "$as_me:12542: creating $CONFIG_STATUS" >&5
12543echo "$as_me: creating $CONFIG_STATUS" >&6;}
12544cat >$CONFIG_STATUS <<_ACEOF
12545#! $SHELL
12546# Generated automatically by configure.
12547# Run this file to recreate the current configuration.
12548# Compiler output produced by configure, useful for debugging
12549# configure, is in config.log if it exists.
12550
12551debug=false
12552SHELL=\${CONFIG_SHELL-$SHELL}
12553ac_cs_invocation="\$0 \$@"
12554
12555_ACEOF
12556
12557cat >>$CONFIG_STATUS <<\_ACEOF
12558# Be Bourne compatible
12559if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
12560  emulate sh
12561  NULLCMD=:
12562elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
12563  set -o posix
12564fi
12565
12566# Name of the executable.
12567as_me=`echo "$0" |sed 's,.*[\\/],,'`
12568
12569if expr a : '\(a\)' >/dev/null 2>&1; then
12570  as_expr=expr
12571else
12572  as_expr=false
12573fi
12574
12575rm -f conf$$ conf$$.exe conf$$.file
12576echo >conf$$.file
12577if ln -s conf$$.file conf$$ 2>/dev/null; then
12578  # We could just check for DJGPP; but this test a) works b) is more generic
12579  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
12580  if test -f conf$$.exe; then
12581    # Don't use ln at all; we don't have any links
12582    as_ln_s='cp -p'
12583  else
12584    as_ln_s='ln -s'
12585  fi
12586elif ln conf$$.file conf$$ 2>/dev/null; then
12587  as_ln_s=ln
12588else
12589  as_ln_s='cp -p'
12590fi
12591rm -f conf$$ conf$$.exe conf$$.file
12592
12593as_executable_p="test -f"
12594
12595# Support unset when possible.
12596if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
12597  as_unset=unset
12598else
12599  as_unset=false
12600fi
12601
12602# NLS nuisances.
12603$as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
12604$as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
12605$as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
12606$as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
12607$as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
12608$as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
12609$as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
12610$as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
12611
12612# IFS
12613# We need space, tab and new line, in precisely that order.
12614as_nl='
12615'
12616IFS=" 	$as_nl"
12617
12618# CDPATH.
12619$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
12620
12621exec 6>&1
12622
12623_ACEOF
12624
12625# Files that config.status was made for.
12626if test -n "$ac_config_files"; then
12627  echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
12628fi
12629
12630if test -n "$ac_config_headers"; then
12631  echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
12632fi
12633
12634if test -n "$ac_config_links"; then
12635  echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
12636fi
12637
12638if test -n "$ac_config_commands"; then
12639  echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
12640fi
12641
12642cat >>$CONFIG_STATUS <<\EOF
12643
12644ac_cs_usage="\
12645\`$as_me' instantiates files from templates according to the
12646current configuration.
12647
12648Usage: $0 [OPTIONS] [FILE]...
12649
12650  -h, --help       print this help, then exit
12651  -V, --version    print version number, then exit
12652  -d, --debug      don't remove temporary files
12653      --recheck    update $as_me by reconfiguring in the same conditions
12654  --file=FILE[:TEMPLATE]
12655                   instantiate the configuration file FILE
12656  --header=FILE[:TEMPLATE]
12657                   instantiate the configuration header FILE
12658
12659Configuration files:
12660$config_files
12661
12662Configuration headers:
12663$config_headers
12664
12665Report bugs to <bug-autoconf@gnu.org>."
12666EOF
12667
12668cat >>$CONFIG_STATUS <<EOF
12669ac_cs_version="\\
12670config.status
12671configured by $0, generated by GNU Autoconf 2.52.20080325,
12672  with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
12673
12674Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
12675Free Software Foundation, Inc.
12676This config.status script is free software; the Free Software Foundation
12677gives unlimited permission to copy, distribute and modify it."
12678srcdir=$srcdir
12679INSTALL="$INSTALL"
12680EOF
12681
12682cat >>$CONFIG_STATUS <<\EOF
12683# If no file are specified by the user, then we need to provide default
12684# value.  By we need to know if files were specified by the user.
12685ac_need_defaults=:
12686while test $# != 0
12687do
12688  case $1 in
12689  --*=*)
12690    ac_option=`expr "x$1" : 'x\([^=]*\)='`
12691    ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
12692    shift
12693    set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
12694    shift
12695    ;;
12696  -*);;
12697  *) # This is not an option, so the user has probably given explicit
12698     # arguments.
12699     ac_need_defaults=false;;
12700  esac
12701
12702  case $1 in
12703  # Handling of the options.
12704EOF
12705cat >>$CONFIG_STATUS <<EOF
12706  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
12707    echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
12708    exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
12709EOF
12710cat >>$CONFIG_STATUS <<\EOF
12711  --version | --vers* | -V )
12712    echo "$ac_cs_version"; exit 0 ;;
12713  --he | --h)
12714    # Conflict between --help and --header
12715    { { echo "$as_me:12715: error: ambiguous option: $1
12716Try \`$0 --help' for more information." >&5
12717echo "$as_me: error: ambiguous option: $1
12718Try \`$0 --help' for more information." >&2;}
12719   { (exit 1); exit 1; }; };;
12720  --help | --hel | -h )
12721    echo "$ac_cs_usage"; exit 0 ;;
12722  --debug | --d* | -d )
12723    debug=: ;;
12724  --file | --fil | --fi | --f )
12725    shift
12726    CONFIG_FILES="$CONFIG_FILES $1"
12727    ac_need_defaults=false;;
12728  --header | --heade | --head | --hea )
12729    shift
12730    CONFIG_HEADERS="$CONFIG_HEADERS $1"
12731    ac_need_defaults=false;;
12732
12733  # This is an error.
12734  -*) { { echo "$as_me:12734: error: unrecognized option: $1
12735Try \`$0 --help' for more information." >&5
12736echo "$as_me: error: unrecognized option: $1
12737Try \`$0 --help' for more information." >&2;}
12738   { (exit 1); exit 1; }; } ;;
12739
12740  *) ac_config_targets="$ac_config_targets $1" ;;
12741
12742  esac
12743  shift
12744done
12745
12746exec 5>>config.log
12747cat >&5 << _ACEOF
12748
12749## ----------------------- ##
12750## Running config.status.  ##
12751## ----------------------- ##
12752
12753This file was extended by $as_me 2.52.20080325, executed with
12754  CONFIG_FILES    = $CONFIG_FILES
12755  CONFIG_HEADERS  = $CONFIG_HEADERS
12756  CONFIG_LINKS    = $CONFIG_LINKS
12757  CONFIG_COMMANDS = $CONFIG_COMMANDS
12758  > $ac_cs_invocation
12759on `(hostname || uname -n) 2>/dev/null | sed 1q`
12760
12761_ACEOF
12762EOF
12763
12764cat >>$CONFIG_STATUS <<\EOF
12765for ac_config_target in $ac_config_targets
12766do
12767  case "$ac_config_target" in
12768  # Handling of arguments.
12769  "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
12770  "xtermcfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS xtermcfg.h:xtermcfg.hin" ;;
12771  *) { { echo "$as_me:12771: error: invalid argument: $ac_config_target" >&5
12772echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
12773   { (exit 1); exit 1; }; };;
12774  esac
12775done
12776
12777# If the user did not use the arguments to specify the items to instantiate,
12778# then the envvar interface is used.  Set only those that are not.
12779# We use the long form for the default assignment because of an extremely
12780# bizarre bug on SunOS 4.1.3.
12781if $ac_need_defaults; then
12782  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
12783  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
12784fi
12785
12786# Create a temporary directory, and hook for its removal unless debugging.
12787$debug ||
12788{
12789  trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
12790  trap '{ (exit 1); exit 1; }' 1 2 13 15
12791}
12792
12793# Create a (secure) tmp directory for tmp files.
12794: ${TMPDIR=/tmp}
12795{
12796  tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
12797  test -n "$tmp" && test -d "$tmp"
12798}  ||
12799{
12800  tmp=$TMPDIR/cs$$-$RANDOM
12801  (umask 077 && mkdir $tmp)
12802} ||
12803{
12804   echo "$me: cannot create a temporary directory in $TMPDIR" >&2
12805   { (exit 1); exit 1; }
12806}
12807
12808EOF
12809
12810cat >>$CONFIG_STATUS <<EOF
12811
12812#
12813# CONFIG_FILES section.
12814#
12815
12816# No need to generate the scripts if there are no CONFIG_FILES.
12817# This happens for instance when ./config.status config.h
12818if test -n "\$CONFIG_FILES"; then
12819  # Protect against being on the right side of a sed subst in config.status.
12820  sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
12821   s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
12822s,@SHELL@,$SHELL,;t t
12823s,@exec_prefix@,$exec_prefix,;t t
12824s,@prefix@,$prefix,;t t
12825s,@program_transform_name@,$program_transform_name,;t t
12826s,@bindir@,$bindir,;t t
12827s,@sbindir@,$sbindir,;t t
12828s,@libexecdir@,$libexecdir,;t t
12829s,@datadir@,$datadir,;t t
12830s,@sysconfdir@,$sysconfdir,;t t
12831s,@sharedstatedir@,$sharedstatedir,;t t
12832s,@localstatedir@,$localstatedir,;t t
12833s,@libdir@,$libdir,;t t
12834s,@includedir@,$includedir,;t t
12835s,@oldincludedir@,$oldincludedir,;t t
12836s,@infodir@,$infodir,;t t
12837s,@mandir@,$mandir,;t t
12838s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
12839s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
12840s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
12841s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
12842s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
12843s,@build_alias@,$build_alias,;t t
12844s,@host_alias@,$host_alias,;t t
12845s,@target_alias@,$target_alias,;t t
12846s,@ECHO_C@,$ECHO_C,;t t
12847s,@ECHO_N@,$ECHO_N,;t t
12848s,@ECHO_T@,$ECHO_T,;t t
12849s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
12850s,@DEFS@,$DEFS,;t t
12851s,@LIBS@,$LIBS,;t t
12852s,@build@,$build,;t t
12853s,@build_cpu@,$build_cpu,;t t
12854s,@build_vendor@,$build_vendor,;t t
12855s,@build_os@,$build_os,;t t
12856s,@host@,$host,;t t
12857s,@host_cpu@,$host_cpu,;t t
12858s,@host_vendor@,$host_vendor,;t t
12859s,@host_os@,$host_os,;t t
12860s,@CC@,$CC,;t t
12861s,@CFLAGS@,$CFLAGS,;t t
12862s,@LDFLAGS@,$LDFLAGS,;t t
12863s,@CPPFLAGS@,$CPPFLAGS,;t t
12864s,@ac_ct_CC@,$ac_ct_CC,;t t
12865s,@EXEEXT@,$EXEEXT,;t t
12866s,@OBJEXT@,$OBJEXT,;t t
12867s,@CPP@,$CPP,;t t
12868s,@AWK@,$AWK,;t t
12869s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
12870s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
12871s,@INSTALL_DATA@,$INSTALL_DATA,;t t
12872s,@LN_S@,$LN_S,;t t
12873s,@LINT@,$LINT,;t t
12874s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
12875s,@PROG_EXT@,$PROG_EXT,;t t
12876s,@appsdir@,$appsdir,;t t
12877s,@no_appsdir@,$no_appsdir,;t t
12878s,@icondir@,$icondir,;t t
12879s,@no_icondir@,$no_icondir,;t t
12880s,@desktop_utils@,$desktop_utils,;t t
12881s,@DESKTOP_FLAGS@,$DESKTOP_FLAGS,;t t
12882s,@XTERM_PATH@,$XTERM_PATH,;t t
12883s,@XTERM_SYMLINK@,$XTERM_SYMLINK,;t t
12884s,@SINSTALL_OPTS@,$SINSTALL_OPTS,;t t
12885s,@X_CFLAGS@,$X_CFLAGS,;t t
12886s,@X_PRE_LIBS@,$X_PRE_LIBS,;t t
12887s,@X_LIBS@,$X_LIBS,;t t
12888s,@X_EXTRA_LIBS@,$X_EXTRA_LIBS,;t t
12889s,@IMAKE@,$IMAKE,;t t
12890s,@IMAKE_CFLAGS@,$IMAKE_CFLAGS,;t t
12891s,@IMAKE_LOADFLAGS@,$IMAKE_LOADFLAGS,;t t
12892s,@TERMINFO_DIR@,$TERMINFO_DIR,;t t
12893s,@SET_TERMINFO@,$SET_TERMINFO,;t t
12894s,@FREETYPE_PKG_CONFIG@,$FREETYPE_PKG_CONFIG,;t t
12895s,@FREETYPE_XFT_CONFIG@,$FREETYPE_XFT_CONFIG,;t t
12896s,@FREETYPE_OLD_CONFIG@,$FREETYPE_OLD_CONFIG,;t t
12897s,@XRENDERFONT@,$XRENDERFONT,;t t
12898s,@HAVE_TYPE_FCCHAR32@,$HAVE_TYPE_FCCHAR32,;t t
12899s,@HAVE_TYPE_XFTCHARSPEC@,$HAVE_TYPE_XFTCHARSPEC,;t t
12900s,@LUIT@,$LUIT,;t t
12901s,@ECHO_LT@,$ECHO_LT,;t t
12902s,@ECHO_LD@,$ECHO_LD,;t t
12903s,@RULE_CC@,$RULE_CC,;t t
12904s,@SHOW_CC@,$SHOW_CC,;t t
12905s,@ECHO_CC@,$ECHO_CC,;t t
12906s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
12907s,@CHARPROC_DEPS@,$CHARPROC_DEPS,;t t
12908s,@EXTRAHDRS@,$EXTRAHDRS,;t t
12909s,@EXTRASRCS@,$EXTRASRCS,;t t
12910s,@EXTRAOBJS@,$EXTRAOBJS,;t t
12911s,@MAY_SETUID@,$MAY_SETUID,;t t
12912s,@NOT_SETUID@,$NOT_SETUID,;t t
12913CEOF
12914
12915EOF
12916
12917  cat >>$CONFIG_STATUS <<\EOF
12918  # Split the substitutions into bite-sized pieces for seds with
12919  # small command number limits, like on Digital OSF/1 and HP-UX.
12920  ac_max_sed_lines=48
12921  ac_sed_frag=1 # Number of current file.
12922  ac_beg=1 # First line for current file.
12923  ac_end=$ac_max_sed_lines # Line after last line for current file.
12924  ac_more_lines=:
12925  ac_sed_cmds=
12926  while $ac_more_lines; do
12927    if test $ac_beg -gt 1; then
12928      sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
12929    else
12930      sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
12931    fi
12932    if test ! -s $tmp/subs.frag; then
12933      ac_more_lines=false
12934    else
12935      # The purpose of the label and of the branching condition is to
12936      # speed up the sed processing (if there are no `@' at all, there
12937      # is no need to browse any of the substitutions).
12938      # These are the two extra sed commands mentioned above.
12939      (echo ':t
12940  /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
12941      if test -z "$ac_sed_cmds"; then
12942  	ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
12943      else
12944  	ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
12945      fi
12946      ac_sed_frag=`expr $ac_sed_frag + 1`
12947      ac_beg=$ac_end
12948      ac_end=`expr $ac_end + $ac_max_sed_lines`
12949    fi
12950  done
12951  if test -z "$ac_sed_cmds"; then
12952    ac_sed_cmds=cat
12953  fi
12954fi # test -n "$CONFIG_FILES"
12955
12956EOF
12957cat >>$CONFIG_STATUS <<\EOF
12958for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
12959  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
12960  case $ac_file in
12961  - | *:- | *:-:* ) # input from stdin
12962        cat >$tmp/stdin
12963        ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
12964        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
12965  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
12966        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
12967  * )   ac_file_in=$ac_file.in ;;
12968  esac
12969
12970  # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
12971  ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
12972         X"$ac_file" : 'X\(//\)[^/]' \| \
12973         X"$ac_file" : 'X\(//\)$' \| \
12974         X"$ac_file" : 'X\(/\)' \| \
12975         .     : '\(.\)' 2>/dev/null ||
12976echo X"$ac_file" |
12977    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
12978  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
12979  	  /^X\(\/\/\)$/{ s//\1/; q; }
12980  	  /^X\(\/\).*/{ s//\1/; q; }
12981  	  s/.*/./; q'`
12982  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
12983    { case "$ac_dir" in
12984  [\\/]* | ?:[\\/]* ) as_incr_dir=;;
12985  *)                      as_incr_dir=.;;
12986esac
12987as_dummy="$ac_dir"
12988for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
12989  case $as_mkdir_dir in
12990    # Skip DOS drivespec
12991    ?:) as_incr_dir=$as_mkdir_dir ;;
12992    *)
12993      as_incr_dir=$as_incr_dir/$as_mkdir_dir
12994      test -d "$as_incr_dir" || mkdir "$as_incr_dir"
12995    ;;
12996  esac
12997done; }
12998
12999    ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
13000    # A "../" for each directory in $ac_dir_suffix.
13001    ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
13002  else
13003    ac_dir_suffix= ac_dots=
13004  fi
13005
13006  case $srcdir in
13007  .)  ac_srcdir=.
13008      if test -z "$ac_dots"; then
13009         ac_top_srcdir=.
13010      else
13011         ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
13012      fi ;;
13013  [\\/]* | ?:[\\/]* )
13014      ac_srcdir=$srcdir$ac_dir_suffix;
13015      ac_top_srcdir=$srcdir ;;
13016  *) # Relative path.
13017    ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
13018    ac_top_srcdir=$ac_dots$srcdir ;;
13019  esac
13020
13021  case $INSTALL in
13022  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
13023  *) ac_INSTALL=$ac_dots$INSTALL ;;
13024  esac
13025
13026  if test x"$ac_file" != x-; then
13027    { echo "$as_me:13027: creating $ac_file" >&5
13028echo "$as_me: creating $ac_file" >&6;}
13029    rm -f "$ac_file"
13030  fi
13031  # Let's still pretend it is `configure' which instantiates (i.e., don't
13032  # use $as_me), people would be surprised to read:
13033  #    /* config.h.  Generated automatically by config.status.  */
13034  configure_input="Generated automatically from `echo $ac_file_in |
13035                                                 sed 's,.*/,,'` by configure."
13036
13037  # First look for the input files in the build tree, otherwise in the
13038  # src tree.
13039  ac_file_inputs=`IFS=:
13040    for f in $ac_file_in; do
13041      case $f in
13042      -) echo $tmp/stdin ;;
13043      [\\/$]*)
13044         # Absolute (can't be DOS-style, as IFS=:)
13045         test -f "$f" || { { echo "$as_me:13045: error: cannot find input file: $f" >&5
13046echo "$as_me: error: cannot find input file: $f" >&2;}
13047   { (exit 1); exit 1; }; }
13048         echo $f;;
13049      *) # Relative
13050         if test -f "$f"; then
13051           # Build tree
13052           echo $f
13053         elif test -f "$srcdir/$f"; then
13054           # Source tree
13055           echo $srcdir/$f
13056         else
13057           # /dev/null tree
13058           { { echo "$as_me:13058: error: cannot find input file: $f" >&5
13059echo "$as_me: error: cannot find input file: $f" >&2;}
13060   { (exit 1); exit 1; }; }
13061         fi;;
13062      esac
13063    done` || { (exit 1); exit 1; }
13064EOF
13065cat >>$CONFIG_STATUS <<EOF
13066  sed "$ac_vpsub
13067$extrasub
13068EOF
13069cat >>$CONFIG_STATUS <<\EOF
13070:t
13071/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
13072s,@configure_input@,$configure_input,;t t
13073s,@srcdir@,$ac_srcdir,;t t
13074s,@top_srcdir@,$ac_top_srcdir,;t t
13075s,@INSTALL@,$ac_INSTALL,;t t
13076" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
13077  rm -f $tmp/stdin
13078  if test x"$ac_file" != x-; then
13079    mv $tmp/out $ac_file
13080  else
13081    cat $tmp/out
13082    rm -f $tmp/out
13083  fi
13084
13085done
13086EOF
13087cat >>$CONFIG_STATUS <<\EOF
13088
13089#
13090# CONFIG_HEADER section.
13091#
13092
13093# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
13094# NAME is the cpp macro being defined and VALUE is the value it is being given.
13095#
13096# ac_d sets the value in "#define NAME VALUE" lines.
13097ac_dA='s,^\([ 	]*\)#\([ 	]*define[ 	][ 	]*\)'
13098ac_dB='[ 	].*$,\1#\2'
13099ac_dC=' '
13100ac_dD=',;t'
13101# ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
13102ac_iA='s,^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
13103ac_iB='\([ 	]\),\1#\2define\3'
13104ac_iC=' '
13105ac_iD='\4,;t'
13106# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
13107ac_uA='s,^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
13108ac_uB='$,\1#\2define\3'
13109ac_uC=' '
13110ac_uD=',;t'
13111
13112for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
13113  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
13114  case $ac_file in
13115  - | *:- | *:-:* ) # input from stdin
13116        cat >$tmp/stdin
13117        ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
13118        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
13119  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
13120        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
13121  * )   ac_file_in=$ac_file.in ;;
13122  esac
13123
13124  test x"$ac_file" != x- && { echo "$as_me:13124: creating $ac_file" >&5
13125echo "$as_me: creating $ac_file" >&6;}
13126
13127  # First look for the input files in the build tree, otherwise in the
13128  # src tree.
13129  ac_file_inputs=`IFS=:
13130    for f in $ac_file_in; do
13131      case $f in
13132      -) echo $tmp/stdin ;;
13133      [\\/$]*)
13134         # Absolute (can't be DOS-style, as IFS=:)
13135         test -f "$f" || { { echo "$as_me:13135: error: cannot find input file: $f" >&5
13136echo "$as_me: error: cannot find input file: $f" >&2;}
13137   { (exit 1); exit 1; }; }
13138         echo $f;;
13139      *) # Relative
13140         if test -f "$f"; then
13141           # Build tree
13142           echo $f
13143         elif test -f "$srcdir/$f"; then
13144           # Source tree
13145           echo $srcdir/$f
13146         else
13147           # /dev/null tree
13148           { { echo "$as_me:13148: error: cannot find input file: $f" >&5
13149echo "$as_me: error: cannot find input file: $f" >&2;}
13150   { (exit 1); exit 1; }; }
13151         fi;;
13152      esac
13153    done` || { (exit 1); exit 1; }
13154  # Remove the trailing spaces.
13155  sed 's/[ 	]*$//' $ac_file_inputs >$tmp/in
13156
13157EOF
13158
13159# Transform confdefs.h into two sed scripts, `conftest.defines' and
13160# `conftest.undefs', that substitutes the proper values into
13161# config.h.in to produce config.h.  The first handles `#define'
13162# templates, and the second `#undef' templates.
13163# And first: Protect against being on the right side of a sed subst in
13164# config.status.  Protect against being in an unquoted here document
13165# in config.status.
13166rm -f conftest.defines conftest.undefs
13167# Using a here document instead of a string reduces the quoting nightmare.
13168# Putting comments in sed scripts is not portable.
13169#
13170# `end' is used to avoid that the second main sed command (meant for
13171# 0-ary CPP macros) applies to n-ary macro definitions.
13172# See the Autoconf documentation for `clear'.
13173cat >confdef2sed.sed <<\EOF
13174s/[\\&,]/\\&/g
13175s,[\\$`],\\&,g
13176t clear
13177: clear
13178s,^[ 	]*#[ 	]*define[ 	][ 	]*\(\([^ 	(][^ 	(]*\)([^)]*)\)[ 	]*\(.*\)$,${ac_dA}\2${ac_dB}\1${ac_dC}\3${ac_dD},gp
13179t end
13180s,^[ 	]*#[ 	]*define[ 	][ 	]*\([^ 	][^ 	]*\)[ 	]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
13181: end
13182EOF
13183# If some macros were called several times there might be several times
13184# the same #defines, which is useless.  Nevertheless, we may not want to
13185# sort them, since we want the *last* AC-DEFINE to be honored.
13186uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
13187sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
13188sed 's/ac_d/ac_i/g' conftest.defines >>conftest.undefs
13189rm -f confdef2sed.sed
13190
13191# This sed command replaces #undef with comments.  This is necessary, for
13192# example, in the case of _POSIX_SOURCE, which is predefined and required
13193# on some systems where configure will not decide to define it.
13194cat >>conftest.undefs <<\EOF
13195s,^[ 	]*#[ 	]*undef[ 	][ 	]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
13196EOF
13197
13198# Break up conftest.defines because some shells have a limit on the size
13199# of here documents, and old seds have small limits too (100 cmds).
13200echo '  # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
13201echo '  if egrep "^[ 	]*#[ 	]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
13202echo '  # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
13203echo '  :' >>$CONFIG_STATUS
13204rm -f conftest.tail
13205while grep . conftest.defines >/dev/null
13206do
13207  # Write a limited-size here document to $tmp/defines.sed.
13208  echo '  cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
13209  # Speed up: don't consider the non `#define' lines.
13210  echo '/^[ 	]*#[ 	]*define/!b' >>$CONFIG_STATUS
13211  # Work around the forget-to-reset-the-flag bug.
13212  echo 't clr' >>$CONFIG_STATUS
13213  echo ': clr' >>$CONFIG_STATUS
13214  sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
13215  echo 'CEOF
13216  sed -f $tmp/defines.sed $tmp/in >$tmp/out
13217  rm -f $tmp/in
13218  mv $tmp/out $tmp/in
13219' >>$CONFIG_STATUS
13220  sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
13221  rm -f conftest.defines
13222  mv conftest.tail conftest.defines
13223done
13224rm -f conftest.defines
13225echo '  fi # egrep' >>$CONFIG_STATUS
13226echo >>$CONFIG_STATUS
13227
13228# Break up conftest.undefs because some shells have a limit on the size
13229# of here documents, and old seds have small limits too (100 cmds).
13230echo '  # Handle all the #undef templates' >>$CONFIG_STATUS
13231rm -f conftest.tail
13232while grep . conftest.undefs >/dev/null
13233do
13234  # Write a limited-size here document to $tmp/undefs.sed.
13235  echo '  cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
13236  # Speed up: don't consider the non `#undef'
13237  echo '/^[ 	]*#[ 	]*undef/!b' >>$CONFIG_STATUS
13238  # Work around the forget-to-reset-the-flag bug.
13239  echo 't clr' >>$CONFIG_STATUS
13240  echo ': clr' >>$CONFIG_STATUS
13241  sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
13242  echo 'CEOF
13243  sed -f $tmp/undefs.sed $tmp/in >$tmp/out
13244  rm -f $tmp/in
13245  mv $tmp/out $tmp/in
13246' >>$CONFIG_STATUS
13247  sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
13248  rm -f conftest.undefs
13249  mv conftest.tail conftest.undefs
13250done
13251rm -f conftest.undefs
13252
13253cat >>$CONFIG_STATUS <<\EOF
13254  # Let's still pretend it is `configure' which instantiates (i.e., don't
13255  # use $as_me), people would be surprised to read:
13256  #    /* config.h.  Generated automatically by config.status.  */
13257  if test x"$ac_file" = x-; then
13258    echo "/* Generated automatically by configure.  */" >$tmp/config.h
13259  else
13260    echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
13261  fi
13262  cat $tmp/in >>$tmp/config.h
13263  rm -f $tmp/in
13264  if test x"$ac_file" != x-; then
13265    if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
13266      { echo "$as_me:13266: $ac_file is unchanged" >&5
13267echo "$as_me: $ac_file is unchanged" >&6;}
13268    else
13269      ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
13270         X"$ac_file" : 'X\(//\)[^/]' \| \
13271         X"$ac_file" : 'X\(//\)$' \| \
13272         X"$ac_file" : 'X\(/\)' \| \
13273         .     : '\(.\)' 2>/dev/null ||
13274echo X"$ac_file" |
13275    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
13276  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
13277  	  /^X\(\/\/\)$/{ s//\1/; q; }
13278  	  /^X\(\/\).*/{ s//\1/; q; }
13279  	  s/.*/./; q'`
13280      if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
13281        { case "$ac_dir" in
13282  [\\/]* | ?:[\\/]* ) as_incr_dir=;;
13283  *)                      as_incr_dir=.;;
13284esac
13285as_dummy="$ac_dir"
13286for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
13287  case $as_mkdir_dir in
13288    # Skip DOS drivespec
13289    ?:) as_incr_dir=$as_mkdir_dir ;;
13290    *)
13291      as_incr_dir=$as_incr_dir/$as_mkdir_dir
13292      test -d "$as_incr_dir" || mkdir "$as_incr_dir"
13293    ;;
13294  esac
13295done; }
13296
13297      fi
13298      rm -f $ac_file
13299      mv $tmp/config.h $ac_file
13300    fi
13301  else
13302    cat $tmp/config.h
13303    rm -f $tmp/config.h
13304  fi
13305done
13306EOF
13307
13308cat >>$CONFIG_STATUS <<\EOF
13309
13310{ (exit 0); exit 0; }
13311EOF
13312chmod +x $CONFIG_STATUS
13313ac_clean_files=$ac_clean_files_save
13314
13315# configure is writing to config.log, and then calls config.status.
13316# config.status does its own redirection, appending to config.log.
13317# Unfortunately, on DOS this fails, as config.log is still kept open
13318# by configure, so config.status won't be able to write to it; its
13319# output is simply discarded.  So we exec the FD to /dev/null,
13320# effectively closing config.log, so it can be properly (re)opened and
13321# appended to by config.status.  When coming back to configure, we
13322# need to make the FD available again.
13323if test "$no_create" != yes; then
13324  ac_cs_success=:
13325  exec 5>/dev/null
13326  $SHELL $CONFIG_STATUS || ac_cs_success=false
13327  exec 5>>config.log
13328  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
13329  # would make configure fail if this is the last instruction.
13330  $ac_cs_success || { (exit 1); exit 1; }
13331fi
13332
13333