configure revision 6879286f
1#! /bin/sh
2# Guess values for system-dependent variables and create Makefiles.
3# Generated by Autoconf 2.52.20101001.
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-pkg-config{=path} enable/disable use of pkg-config
699  --with-Xaw3d            link with Xaw 3d library
700  --with-neXtaw           link with neXT Athena library
701  --with-XawPlus          link with Athena-Plus library
702  --enable-narrowproto    enable narrow prototypes for X libraries
703  --disable-imake         disable use of imake for definitions
704Terminal Configuration:
705  --with-terminal-id=V    set default decTerminalID (default: vt100)
706  --with-terminal-type=T  set default $TERM (default: xterm)
707  --with-own-terminfo=P   set default $TERMINFO (default: from environment)
708Optional Features:
709  --disable-active-icon   disable X11R6.3 active-icon feature
710  --disable-ansi-color    disable ANSI color
711  --disable-16-color      disable 16-color support
712  --enable-256-color      enable 256-color support
713  --enable-88-color       enable 88-color support
714  --disable-blink-cursor  disable support for blinking cursor
715  --enable-broken-osc     allow broken Linux OSC-strings
716  --disable-broken-st     disallow broken string-terminators
717  --disable-c1-print      disallow -k8 option for printable 128-159
718  --disable-bold-color    disable PC-style mapping of bold colors
719  --disable-color-class   disable separate color class resources
720  --disable-color-mode    disable default colorMode resource
721  --disable-highlighting  disable support for color highlighting
722  --disable-doublechars   disable support for double-size chars
723  --disable-boxchars      disable fallback-support for box chars
724  --enable-exec-xterm     enable "spawn-new-terminal" action
725  --disable-freetype      disable freetype library-support
726  --with-freetype-cflags  -D/-I options for compiling with FreeType
727  --with-freetype-libs    -L/-l options to link FreeType
728  --enable-hp-fkeys       enable support for HP-style function keys
729  --enable-sco-fkeys      enable support for SCO-style function keys
730  --disable-sun-fkeys     disable support for Sun-style function keys
731  --disable-fifo-lines    disable FIFO-storage for saved-lines
732  --disable-i18n          disable internationalization
733  --disable-initial-erase disable setup for stty erase
734  --disable-input-method  disable input-method
735  --enable-load-vt-fonts  enable load-vt-fonts() action
736  --enable-logging        enable logging
737  --enable-logfile-exec   enable exec'd logfile filter
738  --disable-maximize      disable actions for iconify/deiconify/maximize/restore
739  --disable-num-lock      disable NumLock keypad support
740  --disable-paste64       disable get/set base64 selection data
741  --disable-pty-handshake disable pty-handshake support
742  --enable-readline-mouse enable support for mouse in readline applications
743  --disable-regex         disable regular-expression selections
744  --with-pcre             use PCRE for regular-expressions
745  --disable-rightbar      disable right-scrollbar support
746  --disable-samename      disable check for redundant name-change
747  --disable-session-mgt   disable support for session management
748  --disable-tcap-fkeys    disable termcap function-keys support
749  --disable-tcap-query    disable compiled-in termcap-query support
750  --disable-tek4014       disable tek4014 emulation
751  --enable-toolbar        compile-in toolbar for pulldown menus
752  --disable-vt52          disable VT52 emulation
753  --enable-mini-luit      enable mini-luit (built-in Latin9 support)
754  --enable-luit           enable luit filter (Unicode translation)
755  --enable-wide-chars     enable wide-character support
756  --enable-16bit-chars    enable 16-bit character support
757  --enable-dabbrev        enable dynamic-abbreviation support
758  --enable-dec-locator    enable DECterm Locator support
759  --disable-rectangles    disable VT420 rectangle support
760  --disable-ziconbeep     disable -ziconbeep option
761Testing/development Options:
762  --enable-trace          test: set to enable debugging traces
763  --disable-leaks         test: set to test memory leaks
764  --disable-echo          display "compiling" commands
765  --enable-xmc-glitch     test: enable xmc magic-cookie emulation
766  --enable-warnings       test: turn on GCC compiler warnings
767  --disable-rpath-hack    don't add rpath options for additional libraries
768
769Some influential environment variables:
770  CC          C compiler command
771  CFLAGS      C compiler flags
772  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
773              nonstandard directory <lib dir>
774  CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
775              headers in a nonstandard directory <include dir>
776  CPP         C preprocessor
777
778Use these variables to override the choices made by `configure' or to help
779it to find libraries and programs with nonstandard names/locations.
780
781EOF
782fi
783
784if test "$ac_init_help" = "recursive"; then
785  # If there are subdirs, report their specific --help.
786  ac_popdir=`pwd`
787  for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
788    cd $ac_subdir
789    # A "../" for each directory in /$ac_subdir.
790    ac_dots=`echo $ac_subdir |
791             sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
792
793    case $srcdir in
794    .) # No --srcdir option.  We are building in place.
795      ac_sub_srcdir=$srcdir ;;
796    [\\/]* | ?:[\\/]* ) # Absolute path.
797      ac_sub_srcdir=$srcdir/$ac_subdir ;;
798    *) # Relative path.
799      ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
800    esac
801
802    # Check for guested configure; otherwise get Cygnus style configure.
803    if test -f $ac_sub_srcdir/configure.gnu; then
804      echo
805      $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
806    elif test -f $ac_sub_srcdir/configure; then
807      echo
808      $SHELL $ac_sub_srcdir/configure  --help=recursive
809    elif test -f $ac_sub_srcdir/configure.ac ||
810           test -f $ac_sub_srcdir/configure.in; then
811      echo
812      $ac_configure --help
813    else
814      echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
815    fi
816    cd $ac_popdir
817  done
818fi
819
820test -n "$ac_init_help" && exit 0
821if $ac_init_version; then
822  cat <<\EOF
823
824Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
825Free Software Foundation, Inc.
826This configure script is free software; the Free Software Foundation
827gives unlimited permission to copy, distribute and modify it.
828EOF
829  exit 0
830fi
831exec 5>config.log
832cat >&5 <<EOF
833This file contains any messages produced by compilers while
834running configure, to aid debugging if configure makes a mistake.
835
836It was created by $as_me, which was
837generated by GNU Autoconf 2.52.20101001.  Invocation command line was
838
839  $ $0 $@
840
841EOF
842{
843cat <<_ASUNAME
844## ---------- ##
845## Platform.  ##
846## ---------- ##
847
848hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
849uname -m = `(uname -m) 2>/dev/null || echo unknown`
850uname -r = `(uname -r) 2>/dev/null || echo unknown`
851uname -s = `(uname -s) 2>/dev/null || echo unknown`
852uname -v = `(uname -v) 2>/dev/null || echo unknown`
853
854/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
855/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
856
857/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
858/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
859/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
860hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
861/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
862/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
863/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
864
865PATH = $PATH
866
867_ASUNAME
868} >&5
869
870cat >&5 <<EOF
871## ------------ ##
872## Core tests.  ##
873## ------------ ##
874
875EOF
876
877# Keep a trace of the command line.
878# Strip out --no-create and --no-recursion so they do not pile up.
879# Also quote any args containing shell meta-characters.
880ac_configure_args=
881ac_sep=
882for ac_arg
883do
884  case $ac_arg in
885  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
886  | --no-cr | --no-c) ;;
887  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
888  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
889  *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
890    ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
891    ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
892    ac_sep=" " ;;
893  *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
894     ac_sep=" " ;;
895  esac
896  # Get rid of the leading space.
897done
898
899# When interrupted or exit'd, cleanup temporary files, and complete
900# config.log.  We remove comments because anyway the quotes in there
901# would cause problems or look ugly.
902trap 'exit_status=$?
903  # Save into config.log some information that might help in debugging.
904  echo >&5
905  echo "## ----------------- ##" >&5
906  echo "## Cache variables.  ##" >&5
907  echo "## ----------------- ##" >&5
908  echo >&5
909  # The following way of writing the cache mishandles newlines in values,
910{
911  (set) 2>&1 |
912    case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
913    *ac_space=\ *)
914      sed -n \
915        "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
916    	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
917      ;;
918    *)
919      sed -n \
920        "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
921      ;;
922    esac;
923} >&5
924  sed "/^$/d" confdefs.h >conftest.log
925  if test -s conftest.log; then
926    echo >&5
927    echo "## ------------ ##" >&5
928    echo "## confdefs.h.  ##" >&5
929    echo "## ------------ ##" >&5
930    echo >&5
931    cat conftest.log >&5
932  fi
933  (echo; echo) >&5
934  test "$ac_signal" != 0 &&
935    echo "$as_me: caught signal $ac_signal" >&5
936  echo "$as_me: exit $exit_status" >&5
937  rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
938    exit $exit_status
939     ' 0
940for ac_signal in 1 2 13 15; do
941  trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
942done
943ac_signal=0
944
945# confdefs.h avoids OS command line length limits that DEFS can exceed.
946rm -rf conftest* confdefs.h
947# AIX cpp loses on an empty file, so make sure it contains at least a newline.
948echo >confdefs.h
949
950# Let the site file select an alternate cache file if it wants to.
951# Prefer explicitly selected file to automatically selected ones.
952if test -z "$CONFIG_SITE"; then
953  if test "x$prefix" != xNONE; then
954    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
955  else
956    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
957  fi
958fi
959for ac_site_file in $CONFIG_SITE; do
960  if test -r "$ac_site_file"; then
961    { echo "$as_me:961: loading site script $ac_site_file" >&5
962echo "$as_me: loading site script $ac_site_file" >&6;}
963    cat "$ac_site_file" >&5
964    . "$ac_site_file"
965  fi
966done
967
968if test -r "$cache_file"; then
969  # Some versions of bash will fail to source /dev/null (special
970  # files actually), so we avoid doing that.
971  if test -f "$cache_file"; then
972    { echo "$as_me:972: loading cache $cache_file" >&5
973echo "$as_me: loading cache $cache_file" >&6;}
974    case $cache_file in
975      [\\/]* | ?:[\\/]* ) . $cache_file;;
976      *)                      . ./$cache_file;;
977    esac
978  fi
979else
980  { echo "$as_me:980: creating cache $cache_file" >&5
981echo "$as_me: creating cache $cache_file" >&6;}
982  >$cache_file
983fi
984
985# Check that the precious variables saved in the cache have kept the same
986# value.
987ac_cache_corrupted=false
988for ac_var in `(set) 2>&1 |
989               sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
990  eval ac_old_set=\$ac_cv_env_${ac_var}_set
991  eval ac_new_set=\$ac_env_${ac_var}_set
992  eval ac_old_val="\$ac_cv_env_${ac_var}_value"
993  eval ac_new_val="\$ac_env_${ac_var}_value"
994  case $ac_old_set,$ac_new_set in
995    set,)
996      { echo "$as_me:996: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
997echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
998      ac_cache_corrupted=: ;;
999    ,set)
1000      { echo "$as_me:1000: error: \`$ac_var' was not set in the previous run" >&5
1001echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1002      ac_cache_corrupted=: ;;
1003    ,);;
1004    *)
1005      if test "x$ac_old_val" != "x$ac_new_val"; then
1006        { echo "$as_me:1006: error: \`$ac_var' has changed since the previous run:" >&5
1007echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1008        { echo "$as_me:1008:   former value:  $ac_old_val" >&5
1009echo "$as_me:   former value:  $ac_old_val" >&2;}
1010        { echo "$as_me:1010:   current value: $ac_new_val" >&5
1011echo "$as_me:   current value: $ac_new_val" >&2;}
1012        ac_cache_corrupted=:
1013      fi;;
1014  esac
1015  # Pass precious variables to config.status.  It doesn't matter if
1016  # we pass some twice (in addition to the command line arguments).
1017  if test "$ac_new_set" = set; then
1018    case $ac_new_val in
1019    *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1020      ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1021      ac_configure_args="$ac_configure_args '$ac_arg'"
1022      ;;
1023    *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1024       ;;
1025    esac
1026  fi
1027done
1028if $ac_cache_corrupted; then
1029  { echo "$as_me:1029: error: changes in the environment can compromise the build" >&5
1030echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1031  { { echo "$as_me:1031: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1032echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1033   { (exit 1); exit 1; }; }
1034fi
1035
1036ac_ext=c
1037ac_cpp='$CPP $CPPFLAGS'
1038ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1039ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1040ac_compiler_gnu=$ac_cv_c_compiler_gnu
1041ac_main_return=return
1042
1043case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
1044  *c*,-n*) ECHO_N= ECHO_C='
1045' ECHO_T='	' ;;
1046  *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
1047  *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
1048esac
1049echo "#! $SHELL" >conftest.sh
1050echo  "exit 0"   >>conftest.sh
1051chmod +x conftest.sh
1052if { (echo "$as_me:1052: PATH=\".;.\"; conftest.sh") >&5
1053  (PATH=".;."; conftest.sh) 2>&5
1054  ac_status=$?
1055  echo "$as_me:1055: \$? = $ac_status" >&5
1056  (exit $ac_status); }; then
1057  ac_path_separator=';'
1058else
1059  ac_path_separator=:
1060fi
1061PATH_SEPARATOR="$ac_path_separator"
1062rm -f conftest.sh
1063
1064ac_config_headers="$ac_config_headers xtermcfg.h:xtermcfg.hin"
1065
1066ac_aux_dir=
1067for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1068  if 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/install.sh; then
1073    ac_aux_dir=$ac_dir
1074    ac_install_sh="$ac_aux_dir/install.sh -c"
1075    break
1076  elif test -f $ac_dir/shtool; then
1077    ac_aux_dir=$ac_dir
1078    ac_install_sh="$ac_aux_dir/shtool install -c"
1079    break
1080  fi
1081done
1082if test -z "$ac_aux_dir"; then
1083  { { echo "$as_me:1083: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1084echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1085   { (exit 1); exit 1; }; }
1086fi
1087ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1088ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1089ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1090
1091# Make sure we can run config.sub.
1092$ac_config_sub sun4 >/dev/null 2>&1 ||
1093  { { echo "$as_me:1093: error: cannot run $ac_config_sub" >&5
1094echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1095   { (exit 1); exit 1; }; }
1096
1097echo "$as_me:1097: checking build system type" >&5
1098echo $ECHO_N "checking build system type... $ECHO_C" >&6
1099if test "${ac_cv_build+set}" = set; then
1100  echo $ECHO_N "(cached) $ECHO_C" >&6
1101else
1102  ac_cv_build_alias=$build_alias
1103test -z "$ac_cv_build_alias" &&
1104  ac_cv_build_alias=`$ac_config_guess`
1105test -z "$ac_cv_build_alias" &&
1106  { { echo "$as_me:1106: error: cannot guess build type; you must specify one" >&5
1107echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1108   { (exit 1); exit 1; }; }
1109ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1110  { { echo "$as_me:1110: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1111echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1112   { (exit 1); exit 1; }; }
1113
1114fi
1115echo "$as_me:1115: result: $ac_cv_build" >&5
1116echo "${ECHO_T}$ac_cv_build" >&6
1117build=$ac_cv_build
1118build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1119build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1120build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1121
1122if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1123	echo "$as_me:1123: checking host system type" >&5
1124echo $ECHO_N "checking host system type... $ECHO_C" >&6
1125if test "${ac_cv_host+set}" = set; then
1126  echo $ECHO_N "(cached) $ECHO_C" >&6
1127else
1128  ac_cv_host_alias=$host_alias
1129test -z "$ac_cv_host_alias" &&
1130  ac_cv_host_alias=$ac_cv_build_alias
1131ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1132  { { echo "$as_me:1132: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1133echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1134   { (exit 1); exit 1; }; }
1135
1136fi
1137echo "$as_me:1137: result: $ac_cv_host" >&5
1138echo "${ECHO_T}$ac_cv_host" >&6
1139host=$ac_cv_host
1140host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1141host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1142host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1143
1144	system_name="$host_os"
1145else
1146	system_name="`(uname -s -r) 2>/dev/null`"
1147	if test -z "$system_name" ; then
1148		system_name="`(hostname) 2>/dev/null`"
1149	fi
1150fi
1151test -n "$system_name" && cat >>confdefs.h <<EOF
1152#define SYSTEM_NAME "$system_name"
1153EOF
1154
1155if test "${cf_cv_system_name+set}" = set; then
1156  echo $ECHO_N "(cached) $ECHO_C" >&6
1157else
1158  cf_cv_system_name="$system_name"
1159fi
1160
1161test -z "$system_name" && system_name="$cf_cv_system_name"
1162test -n "$cf_cv_system_name" && echo "$as_me:1162: result: Configuring for $cf_cv_system_name" >&5
1163echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1164
1165if test ".$system_name" != ".$cf_cv_system_name" ; then
1166	echo "$as_me:1166: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1167echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1168	{ { echo "$as_me:1168: error: \"Please remove config.cache and try again.\"" >&5
1169echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1170   { (exit 1); exit 1; }; }
1171fi
1172
1173###	checks for alternative programs
1174
1175case "$host_os" in
1176openedition)	: ${CFLAGS="-O2 -Wc,dll -Wl,EDIT=NO"}
1177		: ${CPPFLAGS="-D_ALL_SOURCE"}
1178		: ${LIBS="/usr/lib/Xaw.x /usr/lib/SM.x /usr/lib/ICE.x /usr/lib/X11.x"}
1179		: ${CC=c89};;
1180darwin*)
1181		: ${LDFLAGS}="${LDFLAGS} -Wl,-bind_at_load";;
1182esac
1183
1184ac_ext=c
1185ac_cpp='$CPP $CPPFLAGS'
1186ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1187ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1188ac_compiler_gnu=$ac_cv_c_compiler_gnu
1189ac_main_return=return
1190if test -n "$ac_tool_prefix"; then
1191  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1192set dummy ${ac_tool_prefix}gcc; ac_word=$2
1193echo "$as_me:1193: checking for $ac_word" >&5
1194echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1195if test "${ac_cv_prog_CC+set}" = set; then
1196  echo $ECHO_N "(cached) $ECHO_C" >&6
1197else
1198  if test -n "$CC"; then
1199  ac_cv_prog_CC="$CC" # Let the user override the test.
1200else
1201  ac_save_IFS=$IFS; IFS=$ac_path_separator
1202ac_dummy="$PATH"
1203for ac_dir in $ac_dummy; do
1204  IFS=$ac_save_IFS
1205  test -z "$ac_dir" && ac_dir=.
1206  $as_executable_p "$ac_dir/$ac_word" || continue
1207ac_cv_prog_CC="${ac_tool_prefix}gcc"
1208echo "$as_me:1208: found $ac_dir/$ac_word" >&5
1209break
1210done
1211
1212fi
1213fi
1214CC=$ac_cv_prog_CC
1215if test -n "$CC"; then
1216  echo "$as_me:1216: result: $CC" >&5
1217echo "${ECHO_T}$CC" >&6
1218else
1219  echo "$as_me:1219: result: no" >&5
1220echo "${ECHO_T}no" >&6
1221fi
1222
1223fi
1224if test -z "$ac_cv_prog_CC"; then
1225  ac_ct_CC=$CC
1226  # Extract the first word of "gcc", so it can be a program name with args.
1227set dummy gcc; ac_word=$2
1228echo "$as_me:1228: checking for $ac_word" >&5
1229echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1230if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1231  echo $ECHO_N "(cached) $ECHO_C" >&6
1232else
1233  if test -n "$ac_ct_CC"; then
1234  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1235else
1236  ac_save_IFS=$IFS; IFS=$ac_path_separator
1237ac_dummy="$PATH"
1238for ac_dir in $ac_dummy; do
1239  IFS=$ac_save_IFS
1240  test -z "$ac_dir" && ac_dir=.
1241  $as_executable_p "$ac_dir/$ac_word" || continue
1242ac_cv_prog_ac_ct_CC="gcc"
1243echo "$as_me:1243: found $ac_dir/$ac_word" >&5
1244break
1245done
1246
1247fi
1248fi
1249ac_ct_CC=$ac_cv_prog_ac_ct_CC
1250if test -n "$ac_ct_CC"; then
1251  echo "$as_me:1251: result: $ac_ct_CC" >&5
1252echo "${ECHO_T}$ac_ct_CC" >&6
1253else
1254  echo "$as_me:1254: result: no" >&5
1255echo "${ECHO_T}no" >&6
1256fi
1257
1258  CC=$ac_ct_CC
1259else
1260  CC="$ac_cv_prog_CC"
1261fi
1262
1263if test -z "$CC"; then
1264  if test -n "$ac_tool_prefix"; then
1265  # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1266set dummy ${ac_tool_prefix}cc; ac_word=$2
1267echo "$as_me:1267: checking for $ac_word" >&5
1268echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1269if test "${ac_cv_prog_CC+set}" = set; then
1270  echo $ECHO_N "(cached) $ECHO_C" >&6
1271else
1272  if test -n "$CC"; then
1273  ac_cv_prog_CC="$CC" # Let the user override the test.
1274else
1275  ac_save_IFS=$IFS; IFS=$ac_path_separator
1276ac_dummy="$PATH"
1277for ac_dir in $ac_dummy; do
1278  IFS=$ac_save_IFS
1279  test -z "$ac_dir" && ac_dir=.
1280  $as_executable_p "$ac_dir/$ac_word" || continue
1281ac_cv_prog_CC="${ac_tool_prefix}cc"
1282echo "$as_me:1282: found $ac_dir/$ac_word" >&5
1283break
1284done
1285
1286fi
1287fi
1288CC=$ac_cv_prog_CC
1289if test -n "$CC"; then
1290  echo "$as_me:1290: result: $CC" >&5
1291echo "${ECHO_T}$CC" >&6
1292else
1293  echo "$as_me:1293: result: no" >&5
1294echo "${ECHO_T}no" >&6
1295fi
1296
1297fi
1298if test -z "$ac_cv_prog_CC"; then
1299  ac_ct_CC=$CC
1300  # Extract the first word of "cc", so it can be a program name with args.
1301set dummy cc; ac_word=$2
1302echo "$as_me:1302: checking for $ac_word" >&5
1303echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1304if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1305  echo $ECHO_N "(cached) $ECHO_C" >&6
1306else
1307  if test -n "$ac_ct_CC"; then
1308  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1309else
1310  ac_save_IFS=$IFS; IFS=$ac_path_separator
1311ac_dummy="$PATH"
1312for ac_dir in $ac_dummy; do
1313  IFS=$ac_save_IFS
1314  test -z "$ac_dir" && ac_dir=.
1315  $as_executable_p "$ac_dir/$ac_word" || continue
1316ac_cv_prog_ac_ct_CC="cc"
1317echo "$as_me:1317: found $ac_dir/$ac_word" >&5
1318break
1319done
1320
1321fi
1322fi
1323ac_ct_CC=$ac_cv_prog_ac_ct_CC
1324if test -n "$ac_ct_CC"; then
1325  echo "$as_me:1325: result: $ac_ct_CC" >&5
1326echo "${ECHO_T}$ac_ct_CC" >&6
1327else
1328  echo "$as_me:1328: result: no" >&5
1329echo "${ECHO_T}no" >&6
1330fi
1331
1332  CC=$ac_ct_CC
1333else
1334  CC="$ac_cv_prog_CC"
1335fi
1336
1337fi
1338if test -z "$CC"; then
1339  # Extract the first word of "cc", so it can be a program name with args.
1340set dummy cc; ac_word=$2
1341echo "$as_me:1341: checking for $ac_word" >&5
1342echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1343if test "${ac_cv_prog_CC+set}" = set; then
1344  echo $ECHO_N "(cached) $ECHO_C" >&6
1345else
1346  if test -n "$CC"; then
1347  ac_cv_prog_CC="$CC" # Let the user override the test.
1348else
1349  ac_prog_rejected=no
1350  ac_save_IFS=$IFS; IFS=$ac_path_separator
1351ac_dummy="$PATH"
1352for ac_dir in $ac_dummy; do
1353  IFS=$ac_save_IFS
1354  test -z "$ac_dir" && ac_dir=.
1355  $as_executable_p "$ac_dir/$ac_word" || continue
1356if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1357  ac_prog_rejected=yes
1358  continue
1359fi
1360ac_cv_prog_CC="cc"
1361echo "$as_me:1361: found $ac_dir/$ac_word" >&5
1362break
1363done
1364
1365if test $ac_prog_rejected = yes; then
1366  # We found a bogon in the path, so make sure we never use it.
1367  set dummy $ac_cv_prog_CC
1368  shift
1369  if test $# != 0; then
1370    # We chose a different compiler from the bogus one.
1371    # However, it has the same basename, so the bogon will be chosen
1372    # first if we set CC to just the basename; use the full file name.
1373    shift
1374    set dummy "$ac_dir/$ac_word" ${1+"$@"}
1375    shift
1376    ac_cv_prog_CC="$@"
1377  fi
1378fi
1379fi
1380fi
1381CC=$ac_cv_prog_CC
1382if test -n "$CC"; then
1383  echo "$as_me:1383: result: $CC" >&5
1384echo "${ECHO_T}$CC" >&6
1385else
1386  echo "$as_me:1386: result: no" >&5
1387echo "${ECHO_T}no" >&6
1388fi
1389
1390fi
1391if test -z "$CC"; then
1392  if test -n "$ac_tool_prefix"; then
1393  for ac_prog in cl
1394  do
1395    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1396set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1397echo "$as_me:1397: checking for $ac_word" >&5
1398echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1399if test "${ac_cv_prog_CC+set}" = set; then
1400  echo $ECHO_N "(cached) $ECHO_C" >&6
1401else
1402  if test -n "$CC"; then
1403  ac_cv_prog_CC="$CC" # Let the user override the test.
1404else
1405  ac_save_IFS=$IFS; IFS=$ac_path_separator
1406ac_dummy="$PATH"
1407for ac_dir in $ac_dummy; do
1408  IFS=$ac_save_IFS
1409  test -z "$ac_dir" && ac_dir=.
1410  $as_executable_p "$ac_dir/$ac_word" || continue
1411ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1412echo "$as_me:1412: found $ac_dir/$ac_word" >&5
1413break
1414done
1415
1416fi
1417fi
1418CC=$ac_cv_prog_CC
1419if test -n "$CC"; then
1420  echo "$as_me:1420: result: $CC" >&5
1421echo "${ECHO_T}$CC" >&6
1422else
1423  echo "$as_me:1423: result: no" >&5
1424echo "${ECHO_T}no" >&6
1425fi
1426
1427    test -n "$CC" && break
1428  done
1429fi
1430if test -z "$CC"; then
1431  ac_ct_CC=$CC
1432  for ac_prog in cl
1433do
1434  # Extract the first word of "$ac_prog", so it can be a program name with args.
1435set dummy $ac_prog; ac_word=$2
1436echo "$as_me:1436: checking for $ac_word" >&5
1437echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1438if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1439  echo $ECHO_N "(cached) $ECHO_C" >&6
1440else
1441  if test -n "$ac_ct_CC"; then
1442  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1443else
1444  ac_save_IFS=$IFS; IFS=$ac_path_separator
1445ac_dummy="$PATH"
1446for ac_dir in $ac_dummy; do
1447  IFS=$ac_save_IFS
1448  test -z "$ac_dir" && ac_dir=.
1449  $as_executable_p "$ac_dir/$ac_word" || continue
1450ac_cv_prog_ac_ct_CC="$ac_prog"
1451echo "$as_me:1451: found $ac_dir/$ac_word" >&5
1452break
1453done
1454
1455fi
1456fi
1457ac_ct_CC=$ac_cv_prog_ac_ct_CC
1458if test -n "$ac_ct_CC"; then
1459  echo "$as_me:1459: result: $ac_ct_CC" >&5
1460echo "${ECHO_T}$ac_ct_CC" >&6
1461else
1462  echo "$as_me:1462: result: no" >&5
1463echo "${ECHO_T}no" >&6
1464fi
1465
1466  test -n "$ac_ct_CC" && break
1467done
1468
1469  CC=$ac_ct_CC
1470fi
1471
1472fi
1473
1474test -z "$CC" && { { echo "$as_me:1474: error: no acceptable cc found in \$PATH" >&5
1475echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1476   { (exit 1); exit 1; }; }
1477
1478# Provide some information about the compiler.
1479echo "$as_me:1479:" \
1480     "checking for C compiler version" >&5
1481ac_compiler=`set X $ac_compile; echo $2`
1482{ (eval echo "$as_me:1482: \"$ac_compiler --version </dev/null >&5\"") >&5
1483  (eval $ac_compiler --version </dev/null >&5) 2>&5
1484  ac_status=$?
1485  echo "$as_me:1485: \$? = $ac_status" >&5
1486  (exit $ac_status); }
1487{ (eval echo "$as_me:1487: \"$ac_compiler -v </dev/null >&5\"") >&5
1488  (eval $ac_compiler -v </dev/null >&5) 2>&5
1489  ac_status=$?
1490  echo "$as_me:1490: \$? = $ac_status" >&5
1491  (exit $ac_status); }
1492{ (eval echo "$as_me:1492: \"$ac_compiler -V </dev/null >&5\"") >&5
1493  (eval $ac_compiler -V </dev/null >&5) 2>&5
1494  ac_status=$?
1495  echo "$as_me:1495: \$? = $ac_status" >&5
1496  (exit $ac_status); }
1497
1498cat >conftest.$ac_ext <<_ACEOF
1499#line 1499 "configure"
1500#include "confdefs.h"
1501
1502int
1503main ()
1504{
1505
1506  ;
1507  return 0;
1508}
1509_ACEOF
1510ac_clean_files_save=$ac_clean_files
1511ac_clean_files="$ac_clean_files a.out a.exe"
1512# Try to create an executable without -o first, disregard a.out.
1513# It will help us diagnose broken compilers, and finding out an intuition
1514# of exeext.
1515echo "$as_me:1515: checking for C compiler default output" >&5
1516echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1517ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1518if { (eval echo "$as_me:1518: \"$ac_link_default\"") >&5
1519  (eval $ac_link_default) 2>&5
1520  ac_status=$?
1521  echo "$as_me:1521: \$? = $ac_status" >&5
1522  (exit $ac_status); }; then
1523  # Find the output, starting from the most likely.  This scheme is
1524# not robust to junk in `.', hence go to wildcards (a.*) only as a last
1525# resort.
1526for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1527                ls a.out conftest 2>/dev/null;
1528                ls a.* conftest.* 2>/dev/null`; do
1529  case $ac_file in
1530    *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1531    a.out ) # We found the default executable, but exeext='' is most
1532            # certainly right.
1533            break;;
1534    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1535          # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1536          export ac_cv_exeext
1537          break;;
1538    * ) break;;
1539  esac
1540done
1541else
1542  echo "$as_me: failed program was:" >&5
1543cat conftest.$ac_ext >&5
1544{ { echo "$as_me:1544: error: C compiler cannot create executables" >&5
1545echo "$as_me: error: C compiler cannot create executables" >&2;}
1546   { (exit 77); exit 77; }; }
1547fi
1548
1549ac_exeext=$ac_cv_exeext
1550echo "$as_me:1550: result: $ac_file" >&5
1551echo "${ECHO_T}$ac_file" >&6
1552
1553# Check the compiler produces executables we can run.  If not, either
1554# the compiler is broken, or we cross compile.
1555echo "$as_me:1555: checking whether the C compiler works" >&5
1556echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1557# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1558# If not cross compiling, check that we can run a simple program.
1559if test "$cross_compiling" != yes; then
1560  if { ac_try='./$ac_file'
1561  { (eval echo "$as_me:1561: \"$ac_try\"") >&5
1562  (eval $ac_try) 2>&5
1563  ac_status=$?
1564  echo "$as_me:1564: \$? = $ac_status" >&5
1565  (exit $ac_status); }; }; then
1566    cross_compiling=no
1567  else
1568    if test "$cross_compiling" = maybe; then
1569	cross_compiling=yes
1570    else
1571	{ { echo "$as_me:1571: error: cannot run C compiled programs.
1572If you meant to cross compile, use \`--host'." >&5
1573echo "$as_me: error: cannot run C compiled programs.
1574If you meant to cross compile, use \`--host'." >&2;}
1575   { (exit 1); exit 1; }; }
1576    fi
1577  fi
1578fi
1579echo "$as_me:1579: result: yes" >&5
1580echo "${ECHO_T}yes" >&6
1581
1582rm -f a.out a.exe conftest$ac_cv_exeext
1583ac_clean_files=$ac_clean_files_save
1584# Check the compiler produces executables we can run.  If not, either
1585# the compiler is broken, or we cross compile.
1586echo "$as_me:1586: checking whether we are cross compiling" >&5
1587echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1588echo "$as_me:1588: result: $cross_compiling" >&5
1589echo "${ECHO_T}$cross_compiling" >&6
1590
1591echo "$as_me:1591: checking for executable suffix" >&5
1592echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1593if { (eval echo "$as_me:1593: \"$ac_link\"") >&5
1594  (eval $ac_link) 2>&5
1595  ac_status=$?
1596  echo "$as_me:1596: \$? = $ac_status" >&5
1597  (exit $ac_status); }; then
1598  # If both `conftest.exe' and `conftest' are `present' (well, observable)
1599# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1600# work properly (i.e., refer to `conftest.exe'), while it won't with
1601# `rm'.
1602for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1603  case $ac_file in
1604    *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1605    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1606          export ac_cv_exeext
1607          break;;
1608    * ) break;;
1609  esac
1610done
1611else
1612  { { echo "$as_me:1612: error: cannot compute EXEEXT: cannot compile and link" >&5
1613echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1614   { (exit 1); exit 1; }; }
1615fi
1616
1617rm -f conftest$ac_cv_exeext
1618echo "$as_me:1618: result: $ac_cv_exeext" >&5
1619echo "${ECHO_T}$ac_cv_exeext" >&6
1620
1621rm -f conftest.$ac_ext
1622EXEEXT=$ac_cv_exeext
1623ac_exeext=$EXEEXT
1624echo "$as_me:1624: checking for object suffix" >&5
1625echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1626if test "${ac_cv_objext+set}" = set; then
1627  echo $ECHO_N "(cached) $ECHO_C" >&6
1628else
1629  cat >conftest.$ac_ext <<_ACEOF
1630#line 1630 "configure"
1631#include "confdefs.h"
1632
1633int
1634main ()
1635{
1636
1637  ;
1638  return 0;
1639}
1640_ACEOF
1641rm -f conftest.o conftest.obj
1642if { (eval echo "$as_me:1642: \"$ac_compile\"") >&5
1643  (eval $ac_compile) 2>&5
1644  ac_status=$?
1645  echo "$as_me:1645: \$? = $ac_status" >&5
1646  (exit $ac_status); }; then
1647  for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1648  case $ac_file in
1649    *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1650    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1651       break;;
1652  esac
1653done
1654else
1655  echo "$as_me: failed program was:" >&5
1656cat conftest.$ac_ext >&5
1657{ { echo "$as_me:1657: error: cannot compute OBJEXT: cannot compile" >&5
1658echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1659   { (exit 1); exit 1; }; }
1660fi
1661
1662rm -f conftest.$ac_cv_objext conftest.$ac_ext
1663fi
1664echo "$as_me:1664: result: $ac_cv_objext" >&5
1665echo "${ECHO_T}$ac_cv_objext" >&6
1666OBJEXT=$ac_cv_objext
1667ac_objext=$OBJEXT
1668echo "$as_me:1668: checking whether we are using the GNU C compiler" >&5
1669echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1670if test "${ac_cv_c_compiler_gnu+set}" = set; then
1671  echo $ECHO_N "(cached) $ECHO_C" >&6
1672else
1673  cat >conftest.$ac_ext <<_ACEOF
1674#line 1674 "configure"
1675#include "confdefs.h"
1676
1677int
1678main ()
1679{
1680#ifndef __GNUC__
1681       choke me
1682#endif
1683
1684  ;
1685  return 0;
1686}
1687_ACEOF
1688rm -f conftest.$ac_objext
1689if { (eval echo "$as_me:1689: \"$ac_compile\"") >&5
1690  (eval $ac_compile) 2>&5
1691  ac_status=$?
1692  echo "$as_me:1692: \$? = $ac_status" >&5
1693  (exit $ac_status); } &&
1694         { ac_try='test -s conftest.$ac_objext'
1695  { (eval echo "$as_me:1695: \"$ac_try\"") >&5
1696  (eval $ac_try) 2>&5
1697  ac_status=$?
1698  echo "$as_me:1698: \$? = $ac_status" >&5
1699  (exit $ac_status); }; }; then
1700  ac_compiler_gnu=yes
1701else
1702  echo "$as_me: failed program was:" >&5
1703cat conftest.$ac_ext >&5
1704ac_compiler_gnu=no
1705fi
1706rm -f conftest.$ac_objext conftest.$ac_ext
1707ac_cv_c_compiler_gnu=$ac_compiler_gnu
1708
1709fi
1710echo "$as_me:1710: result: $ac_cv_c_compiler_gnu" >&5
1711echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1712GCC=`test $ac_compiler_gnu = yes && echo yes`
1713ac_test_CFLAGS=${CFLAGS+set}
1714ac_save_CFLAGS=$CFLAGS
1715CFLAGS="-g"
1716echo "$as_me:1716: checking whether $CC accepts -g" >&5
1717echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1718if test "${ac_cv_prog_cc_g+set}" = set; then
1719  echo $ECHO_N "(cached) $ECHO_C" >&6
1720else
1721  cat >conftest.$ac_ext <<_ACEOF
1722#line 1722 "configure"
1723#include "confdefs.h"
1724
1725int
1726main ()
1727{
1728
1729  ;
1730  return 0;
1731}
1732_ACEOF
1733rm -f conftest.$ac_objext
1734if { (eval echo "$as_me:1734: \"$ac_compile\"") >&5
1735  (eval $ac_compile) 2>&5
1736  ac_status=$?
1737  echo "$as_me:1737: \$? = $ac_status" >&5
1738  (exit $ac_status); } &&
1739         { ac_try='test -s conftest.$ac_objext'
1740  { (eval echo "$as_me:1740: \"$ac_try\"") >&5
1741  (eval $ac_try) 2>&5
1742  ac_status=$?
1743  echo "$as_me:1743: \$? = $ac_status" >&5
1744  (exit $ac_status); }; }; then
1745  ac_cv_prog_cc_g=yes
1746else
1747  echo "$as_me: failed program was:" >&5
1748cat conftest.$ac_ext >&5
1749ac_cv_prog_cc_g=no
1750fi
1751rm -f conftest.$ac_objext conftest.$ac_ext
1752fi
1753echo "$as_me:1753: result: $ac_cv_prog_cc_g" >&5
1754echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1755if test "$ac_test_CFLAGS" = set; then
1756  CFLAGS=$ac_save_CFLAGS
1757elif test $ac_cv_prog_cc_g = yes; then
1758  if test "$GCC" = yes; then
1759    CFLAGS="-g -O2"
1760  else
1761    CFLAGS="-g"
1762  fi
1763else
1764  if test "$GCC" = yes; then
1765    CFLAGS="-O2"
1766  else
1767    CFLAGS=
1768  fi
1769fi
1770# Some people use a C++ compiler to compile C.  Since we use `exit',
1771# in C++ we need to declare it.  In case someone uses the same compiler
1772# for both compiling C and C++ we need to have the C++ compiler decide
1773# the declaration of exit, since it's the most demanding environment.
1774cat >conftest.$ac_ext <<_ACEOF
1775#ifndef __cplusplus
1776  choke me
1777#endif
1778_ACEOF
1779rm -f conftest.$ac_objext
1780if { (eval echo "$as_me:1780: \"$ac_compile\"") >&5
1781  (eval $ac_compile) 2>&5
1782  ac_status=$?
1783  echo "$as_me:1783: \$? = $ac_status" >&5
1784  (exit $ac_status); } &&
1785         { ac_try='test -s conftest.$ac_objext'
1786  { (eval echo "$as_me:1786: \"$ac_try\"") >&5
1787  (eval $ac_try) 2>&5
1788  ac_status=$?
1789  echo "$as_me:1789: \$? = $ac_status" >&5
1790  (exit $ac_status); }; }; then
1791  for ac_declaration in \
1792   ''\
1793   '#include <stdlib.h>' \
1794   'extern "C" void std::exit (int) throw (); using std::exit;' \
1795   'extern "C" void std::exit (int); using std::exit;' \
1796   'extern "C" void exit (int) throw ();' \
1797   'extern "C" void exit (int);' \
1798   'void exit (int);'
1799do
1800  cat >conftest.$ac_ext <<_ACEOF
1801#line 1801 "configure"
1802#include "confdefs.h"
1803#include <stdlib.h>
1804$ac_declaration
1805int
1806main ()
1807{
1808exit (42);
1809  ;
1810  return 0;
1811}
1812_ACEOF
1813rm -f conftest.$ac_objext
1814if { (eval echo "$as_me:1814: \"$ac_compile\"") >&5
1815  (eval $ac_compile) 2>&5
1816  ac_status=$?
1817  echo "$as_me:1817: \$? = $ac_status" >&5
1818  (exit $ac_status); } &&
1819         { ac_try='test -s conftest.$ac_objext'
1820  { (eval echo "$as_me:1820: \"$ac_try\"") >&5
1821  (eval $ac_try) 2>&5
1822  ac_status=$?
1823  echo "$as_me:1823: \$? = $ac_status" >&5
1824  (exit $ac_status); }; }; then
1825  :
1826else
1827  echo "$as_me: failed program was:" >&5
1828cat conftest.$ac_ext >&5
1829continue
1830fi
1831rm -f conftest.$ac_objext conftest.$ac_ext
1832  cat >conftest.$ac_ext <<_ACEOF
1833#line 1833 "configure"
1834#include "confdefs.h"
1835$ac_declaration
1836int
1837main ()
1838{
1839exit (42);
1840  ;
1841  return 0;
1842}
1843_ACEOF
1844rm -f conftest.$ac_objext
1845if { (eval echo "$as_me:1845: \"$ac_compile\"") >&5
1846  (eval $ac_compile) 2>&5
1847  ac_status=$?
1848  echo "$as_me:1848: \$? = $ac_status" >&5
1849  (exit $ac_status); } &&
1850         { ac_try='test -s conftest.$ac_objext'
1851  { (eval echo "$as_me:1851: \"$ac_try\"") >&5
1852  (eval $ac_try) 2>&5
1853  ac_status=$?
1854  echo "$as_me:1854: \$? = $ac_status" >&5
1855  (exit $ac_status); }; }; then
1856  break
1857else
1858  echo "$as_me: failed program was:" >&5
1859cat conftest.$ac_ext >&5
1860fi
1861rm -f conftest.$ac_objext conftest.$ac_ext
1862done
1863rm -rf conftest*
1864if test -n "$ac_declaration"; then
1865  echo '#ifdef __cplusplus' >>confdefs.h
1866  echo $ac_declaration      >>confdefs.h
1867  echo '#endif'             >>confdefs.h
1868fi
1869
1870else
1871  echo "$as_me: failed program was:" >&5
1872cat conftest.$ac_ext >&5
1873fi
1874rm -f conftest.$ac_objext conftest.$ac_ext
1875ac_ext=c
1876ac_cpp='$CPP $CPPFLAGS'
1877ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1878ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1879ac_compiler_gnu=$ac_cv_c_compiler_gnu
1880ac_main_return=return
1881
1882ac_ext=c
1883ac_cpp='$CPP $CPPFLAGS'
1884ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1885ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1886ac_compiler_gnu=$ac_cv_c_compiler_gnu
1887ac_main_return=return
1888echo "$as_me:1888: checking how to run the C preprocessor" >&5
1889echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
1890# On Suns, sometimes $CPP names a directory.
1891if test -n "$CPP" && test -d "$CPP"; then
1892  CPP=
1893fi
1894if test -z "$CPP"; then
1895  if test "${ac_cv_prog_CPP+set}" = set; then
1896  echo $ECHO_N "(cached) $ECHO_C" >&6
1897else
1898      # Double quotes because CPP needs to be expanded
1899    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
1900    do
1901      ac_preproc_ok=false
1902for ac_c_preproc_warn_flag in '' yes
1903do
1904  # Use a header file that comes with gcc, so configuring glibc
1905  # with a fresh cross-compiler works.
1906  # On the NeXT, cc -E runs the code through the compiler's parser,
1907  # not just through cpp. "Syntax error" is here to catch this case.
1908  cat >conftest.$ac_ext <<_ACEOF
1909#line 1909 "configure"
1910#include "confdefs.h"
1911#include <assert.h>
1912                     Syntax error
1913_ACEOF
1914if { (eval echo "$as_me:1914: \"$ac_cpp conftest.$ac_ext\"") >&5
1915  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
1916  ac_status=$?
1917  egrep -v '^ *\+' conftest.er1 >conftest.err
1918  rm -f conftest.er1
1919  cat conftest.err >&5
1920  echo "$as_me:1920: \$? = $ac_status" >&5
1921  (exit $ac_status); } >/dev/null; then
1922  if test -s conftest.err; then
1923    ac_cpp_err=$ac_c_preproc_warn_flag
1924  else
1925    ac_cpp_err=
1926  fi
1927else
1928  ac_cpp_err=yes
1929fi
1930if test -z "$ac_cpp_err"; then
1931  :
1932else
1933  echo "$as_me: failed program was:" >&5
1934  cat conftest.$ac_ext >&5
1935  # Broken: fails on valid input.
1936continue
1937fi
1938rm -f conftest.err conftest.$ac_ext
1939
1940  # OK, works on sane cases.  Now check whether non-existent headers
1941  # can be detected and how.
1942  cat >conftest.$ac_ext <<_ACEOF
1943#line 1943 "configure"
1944#include "confdefs.h"
1945#include <ac_nonexistent.h>
1946_ACEOF
1947if { (eval echo "$as_me:1947: \"$ac_cpp conftest.$ac_ext\"") >&5
1948  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
1949  ac_status=$?
1950  egrep -v '^ *\+' conftest.er1 >conftest.err
1951  rm -f conftest.er1
1952  cat conftest.err >&5
1953  echo "$as_me:1953: \$? = $ac_status" >&5
1954  (exit $ac_status); } >/dev/null; then
1955  if test -s conftest.err; then
1956    ac_cpp_err=$ac_c_preproc_warn_flag
1957  else
1958    ac_cpp_err=
1959  fi
1960else
1961  ac_cpp_err=yes
1962fi
1963if test -z "$ac_cpp_err"; then
1964  # Broken: success on invalid input.
1965continue
1966else
1967  echo "$as_me: failed program was:" >&5
1968  cat conftest.$ac_ext >&5
1969  # Passes both tests.
1970ac_preproc_ok=:
1971break
1972fi
1973rm -f conftest.err conftest.$ac_ext
1974
1975done
1976# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
1977rm -f conftest.err conftest.$ac_ext
1978if $ac_preproc_ok; then
1979  break
1980fi
1981
1982    done
1983    ac_cv_prog_CPP=$CPP
1984
1985fi
1986  CPP=$ac_cv_prog_CPP
1987else
1988  ac_cv_prog_CPP=$CPP
1989fi
1990echo "$as_me:1990: result: $CPP" >&5
1991echo "${ECHO_T}$CPP" >&6
1992ac_preproc_ok=false
1993for ac_c_preproc_warn_flag in '' yes
1994do
1995  # Use a header file that comes with gcc, so configuring glibc
1996  # with a fresh cross-compiler works.
1997  # On the NeXT, cc -E runs the code through the compiler's parser,
1998  # not just through cpp. "Syntax error" is here to catch this case.
1999  cat >conftest.$ac_ext <<_ACEOF
2000#line 2000 "configure"
2001#include "confdefs.h"
2002#include <assert.h>
2003                     Syntax error
2004_ACEOF
2005if { (eval echo "$as_me:2005: \"$ac_cpp conftest.$ac_ext\"") >&5
2006  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2007  ac_status=$?
2008  egrep -v '^ *\+' conftest.er1 >conftest.err
2009  rm -f conftest.er1
2010  cat conftest.err >&5
2011  echo "$as_me:2011: \$? = $ac_status" >&5
2012  (exit $ac_status); } >/dev/null; then
2013  if test -s conftest.err; then
2014    ac_cpp_err=$ac_c_preproc_warn_flag
2015  else
2016    ac_cpp_err=
2017  fi
2018else
2019  ac_cpp_err=yes
2020fi
2021if test -z "$ac_cpp_err"; then
2022  :
2023else
2024  echo "$as_me: failed program was:" >&5
2025  cat conftest.$ac_ext >&5
2026  # Broken: fails on valid input.
2027continue
2028fi
2029rm -f conftest.err conftest.$ac_ext
2030
2031  # OK, works on sane cases.  Now check whether non-existent headers
2032  # can be detected and how.
2033  cat >conftest.$ac_ext <<_ACEOF
2034#line 2034 "configure"
2035#include "confdefs.h"
2036#include <ac_nonexistent.h>
2037_ACEOF
2038if { (eval echo "$as_me:2038: \"$ac_cpp conftest.$ac_ext\"") >&5
2039  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2040  ac_status=$?
2041  egrep -v '^ *\+' conftest.er1 >conftest.err
2042  rm -f conftest.er1
2043  cat conftest.err >&5
2044  echo "$as_me:2044: \$? = $ac_status" >&5
2045  (exit $ac_status); } >/dev/null; then
2046  if test -s conftest.err; then
2047    ac_cpp_err=$ac_c_preproc_warn_flag
2048  else
2049    ac_cpp_err=
2050  fi
2051else
2052  ac_cpp_err=yes
2053fi
2054if test -z "$ac_cpp_err"; then
2055  # Broken: success on invalid input.
2056continue
2057else
2058  echo "$as_me: failed program was:" >&5
2059  cat conftest.$ac_ext >&5
2060  # Passes both tests.
2061ac_preproc_ok=:
2062break
2063fi
2064rm -f conftest.err conftest.$ac_ext
2065
2066done
2067# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2068rm -f conftest.err conftest.$ac_ext
2069if $ac_preproc_ok; then
2070  :
2071else
2072  { { echo "$as_me:2072: error: C preprocessor \"$CPP\" fails sanity check" >&5
2073echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2074   { (exit 1); exit 1; }; }
2075fi
2076
2077ac_ext=c
2078ac_cpp='$CPP $CPPFLAGS'
2079ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2080ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2081ac_compiler_gnu=$ac_cv_c_compiler_gnu
2082ac_main_return=return
2083
2084if test $ac_cv_c_compiler_gnu = yes; then
2085    echo "$as_me:2085: checking whether $CC needs -traditional" >&5
2086echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2087if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2088  echo $ECHO_N "(cached) $ECHO_C" >&6
2089else
2090    ac_pattern="Autoconf.*'x'"
2091  cat >conftest.$ac_ext <<_ACEOF
2092#line 2092 "configure"
2093#include "confdefs.h"
2094#include <sgtty.h>
2095int Autoconf = TIOCGETP;
2096_ACEOF
2097if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2098  egrep "$ac_pattern" >/dev/null 2>&1; then
2099  ac_cv_prog_gcc_traditional=yes
2100else
2101  ac_cv_prog_gcc_traditional=no
2102fi
2103rm -rf conftest*
2104
2105  if test $ac_cv_prog_gcc_traditional = no; then
2106    cat >conftest.$ac_ext <<_ACEOF
2107#line 2107 "configure"
2108#include "confdefs.h"
2109#include <termio.h>
2110int Autoconf = TCGETA;
2111_ACEOF
2112if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2113  egrep "$ac_pattern" >/dev/null 2>&1; then
2114  ac_cv_prog_gcc_traditional=yes
2115fi
2116rm -rf conftest*
2117
2118  fi
2119fi
2120echo "$as_me:2120: result: $ac_cv_prog_gcc_traditional" >&5
2121echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2122  if test $ac_cv_prog_gcc_traditional = yes; then
2123    CC="$CC -traditional"
2124  fi
2125fi
2126
2127for ac_prog in mawk gawk nawk awk
2128do
2129  # Extract the first word of "$ac_prog", so it can be a program name with args.
2130set dummy $ac_prog; ac_word=$2
2131echo "$as_me:2131: checking for $ac_word" >&5
2132echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2133if test "${ac_cv_prog_AWK+set}" = set; then
2134  echo $ECHO_N "(cached) $ECHO_C" >&6
2135else
2136  if test -n "$AWK"; then
2137  ac_cv_prog_AWK="$AWK" # Let the user override the test.
2138else
2139  ac_save_IFS=$IFS; IFS=$ac_path_separator
2140ac_dummy="$PATH"
2141for ac_dir in $ac_dummy; do
2142  IFS=$ac_save_IFS
2143  test -z "$ac_dir" && ac_dir=.
2144  $as_executable_p "$ac_dir/$ac_word" || continue
2145ac_cv_prog_AWK="$ac_prog"
2146echo "$as_me:2146: found $ac_dir/$ac_word" >&5
2147break
2148done
2149
2150fi
2151fi
2152AWK=$ac_cv_prog_AWK
2153if test -n "$AWK"; then
2154  echo "$as_me:2154: result: $AWK" >&5
2155echo "${ECHO_T}$AWK" >&6
2156else
2157  echo "$as_me:2157: result: no" >&5
2158echo "${ECHO_T}no" >&6
2159fi
2160
2161  test -n "$AWK" && break
2162done
2163
2164# Find a good install program.  We prefer a C program (faster),
2165# so one script is as good as another.  But avoid the broken or
2166# incompatible versions:
2167# SysV /etc/install, /usr/sbin/install
2168# SunOS /usr/etc/install
2169# IRIX /sbin/install
2170# AIX /bin/install
2171# AmigaOS /C/install, which installs bootblocks on floppy discs
2172# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2173# AFS /usr/afsws/bin/install, which mishandles nonexistent args
2174# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2175# ./install, which can be erroneously created by make from ./install.sh.
2176echo "$as_me:2176: checking for a BSD compatible install" >&5
2177echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
2178if test -z "$INSTALL"; then
2179if test "${ac_cv_path_install+set}" = set; then
2180  echo $ECHO_N "(cached) $ECHO_C" >&6
2181else
2182    ac_save_IFS=$IFS; IFS=$ac_path_separator
2183  for ac_dir in $PATH; do
2184    IFS=$ac_save_IFS
2185    # Account for people who put trailing slashes in PATH elements.
2186    case $ac_dir/ in
2187    / | ./ | .// | /cC/* \
2188    | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
2189    | /usr/ucb/* ) ;;
2190    *)
2191      # OSF1 and SCO ODT 3.0 have their own names for install.
2192      # Don't use installbsd from OSF since it installs stuff as root
2193      # by default.
2194      for ac_prog in ginstall scoinst install; do
2195        if $as_executable_p "$ac_dir/$ac_prog"; then
2196	  if test $ac_prog = install &&
2197            grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2198	    # AIX install.  It has an incompatible calling convention.
2199	    :
2200	  elif test $ac_prog = install &&
2201	    grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2202	    # program-specific install script used by HP pwplus--don't use.
2203	    :
2204	  else
2205	    ac_cv_path_install="$ac_dir/$ac_prog -c"
2206	    break 2
2207	  fi
2208	fi
2209      done
2210      ;;
2211    esac
2212  done
2213
2214fi
2215  if test "${ac_cv_path_install+set}" = set; then
2216    INSTALL=$ac_cv_path_install
2217  else
2218    # As a last resort, use the slow shell script.  We don't cache a
2219    # path for INSTALL within a source directory, because that will
2220    # break other packages using the cache if that directory is
2221    # removed, or if the path is relative.
2222    INSTALL=$ac_install_sh
2223  fi
2224fi
2225echo "$as_me:2225: result: $INSTALL" >&5
2226echo "${ECHO_T}$INSTALL" >&6
2227
2228# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2229# It thinks the first close brace ends the variable substitution.
2230test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2231
2232test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2233
2234test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2235
2236echo "$as_me:2236: checking whether ln -s works" >&5
2237echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
2238LN_S=$as_ln_s
2239if test "$LN_S" = "ln -s"; then
2240  echo "$as_me:2240: result: yes" >&5
2241echo "${ECHO_T}yes" >&6
2242else
2243  echo "$as_me:2243: result: no, using $LN_S" >&5
2244echo "${ECHO_T}no, using $LN_S" >&6
2245fi
2246
2247test "$program_prefix" != NONE &&
2248  program_transform_name="s,^,$program_prefix,;$program_transform_name"
2249# Use a double $ so make ignores it.
2250test "$program_suffix" != NONE &&
2251  program_transform_name="s,\$,$program_suffix,;$program_transform_name"
2252# Double any \ or $.  echo might interpret backslashes.
2253# By default was `s,x,x', remove it if useless.
2254cat <<\_ACEOF >conftest.sed
2255s/[\\$]/&&/g;s/;s,x,x,$//
2256_ACEOF
2257program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
2258rm conftest.sed
2259
2260for ac_prog in tdlint lint alint
2261do
2262  # Extract the first word of "$ac_prog", so it can be a program name with args.
2263set dummy $ac_prog; ac_word=$2
2264echo "$as_me:2264: checking for $ac_word" >&5
2265echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2266if test "${ac_cv_prog_LINT+set}" = set; then
2267  echo $ECHO_N "(cached) $ECHO_C" >&6
2268else
2269  if test -n "$LINT"; then
2270  ac_cv_prog_LINT="$LINT" # Let the user override the test.
2271else
2272  ac_save_IFS=$IFS; IFS=$ac_path_separator
2273ac_dummy="$PATH"
2274for ac_dir in $ac_dummy; do
2275  IFS=$ac_save_IFS
2276  test -z "$ac_dir" && ac_dir=.
2277  $as_executable_p "$ac_dir/$ac_word" || continue
2278ac_cv_prog_LINT="$ac_prog"
2279echo "$as_me:2279: found $ac_dir/$ac_word" >&5
2280break
2281done
2282
2283fi
2284fi
2285LINT=$ac_cv_prog_LINT
2286if test -n "$LINT"; then
2287  echo "$as_me:2287: result: $LINT" >&5
2288echo "${ECHO_T}$LINT" >&6
2289else
2290  echo "$as_me:2290: result: no" >&5
2291echo "${ECHO_T}no" >&6
2292fi
2293
2294  test -n "$LINT" && break
2295done
2296
2297###	checks for UNIX variants that set C preprocessor variables
2298
2299echo "$as_me:2299: checking for AIX" >&5
2300echo $ECHO_N "checking for AIX... $ECHO_C" >&6
2301cat >conftest.$ac_ext <<_ACEOF
2302#line 2302 "configure"
2303#include "confdefs.h"
2304#ifdef _AIX
2305  yes
2306#endif
2307
2308_ACEOF
2309if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2310  egrep "yes" >/dev/null 2>&1; then
2311  echo "$as_me:2311: result: yes" >&5
2312echo "${ECHO_T}yes" >&6
2313cat >>confdefs.h <<\EOF
2314#define _ALL_SOURCE 1
2315EOF
2316
2317else
2318  echo "$as_me:2318: result: no" >&5
2319echo "${ECHO_T}no" >&6
2320fi
2321rm -rf conftest*
2322
2323echo "$as_me:2323: checking for POSIXized ISC" >&5
2324echo $ECHO_N "checking for POSIXized ISC... $ECHO_C" >&6
2325if test -d /etc/conf/kconfig.d &&
2326   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
2327then
2328  echo "$as_me:2328: result: yes" >&5
2329echo "${ECHO_T}yes" >&6
2330  ISC=yes # If later tests want to check for ISC.
2331
2332cat >>confdefs.h <<\EOF
2333#define _POSIX_SOURCE 1
2334EOF
2335
2336  if test "$GCC" = yes; then
2337    CC="$CC -posix"
2338  else
2339    CC="$CC -Xp"
2340  fi
2341else
2342  echo "$as_me:2342: result: no" >&5
2343echo "${ECHO_T}no" >&6
2344  ISC=
2345fi
2346
2347###	checks for compiler characteristics
2348
2349echo "$as_me:2349: checking for ${CC:-cc} option to accept ANSI C" >&5
2350echo $ECHO_N "checking for ${CC:-cc} option to accept ANSI C... $ECHO_C" >&6
2351if test "${cf_cv_ansi_cc+set}" = set; then
2352  echo $ECHO_N "(cached) $ECHO_C" >&6
2353else
2354
2355cf_cv_ansi_cc=no
2356cf_save_CFLAGS="$CFLAGS"
2357cf_save_CPPFLAGS="$CPPFLAGS"
2358# Don't try gcc -ansi; that turns off useful extensions and
2359# breaks some systems' header files.
2360# AIX			-qlanglvl=ansi
2361# Ultrix and OSF/1	-std1
2362# HP-UX			-Aa -D_HPUX_SOURCE
2363# SVR4			-Xc
2364# UnixWare 1.2		(cannot use -Xc, since ANSI/POSIX clashes)
2365for cf_arg in "-DCC_HAS_PROTOS" \
2366	"" \
2367	-qlanglvl=ansi \
2368	-std1 \
2369	-Ae \
2370	"-Aa -D_HPUX_SOURCE" \
2371	-Xc
2372do
2373
2374cf_fix_cppflags=no
2375cf_new_cflags=
2376cf_new_cppflags=
2377cf_new_extra_cppflags=
2378
2379for cf_add_cflags in $cf_arg
2380do
2381case $cf_fix_cppflags in
2382no)
2383	case $cf_add_cflags in #(vi
2384	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2385		case $cf_add_cflags in
2386		-D*)
2387			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2388
2389			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2390				&& test -z "${cf_tst_cflags}" \
2391				&& cf_fix_cppflags=yes
2392
2393			if test $cf_fix_cppflags = yes ; then
2394				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2395				continue
2396			elif test "${cf_tst_cflags}" = "\"'" ; then
2397				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2398				continue
2399			fi
2400			;;
2401		esac
2402		case "$CPPFLAGS" in
2403		*$cf_add_cflags) #(vi
2404			;;
2405		*) #(vi
2406			case $cf_add_cflags in #(vi
2407			-D*)
2408				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2409
2410CPPFLAGS=`echo "$CPPFLAGS" | \
2411	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
2412		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
2413
2414				;;
2415			esac
2416			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2417			;;
2418		esac
2419		;;
2420	*)
2421		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2422		;;
2423	esac
2424	;;
2425yes)
2426	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2427
2428	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2429
2430	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2431		&& test -z "${cf_tst_cflags}" \
2432		&& cf_fix_cppflags=no
2433	;;
2434esac
2435done
2436
2437if test -n "$cf_new_cflags" ; then
2438
2439	CFLAGS="$CFLAGS $cf_new_cflags"
2440fi
2441
2442if test -n "$cf_new_cppflags" ; then
2443
2444	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2445fi
2446
2447if test -n "$cf_new_extra_cppflags" ; then
2448
2449	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2450fi
2451
2452	cat >conftest.$ac_ext <<_ACEOF
2453#line 2453 "configure"
2454#include "confdefs.h"
2455
2456#ifndef CC_HAS_PROTOS
2457#if !defined(__STDC__) || (__STDC__ != 1)
2458choke me
2459#endif
2460#endif
2461
2462int
2463main ()
2464{
2465
2466	int test (int i, double x);
2467	struct s1 {int (*f) (int a);};
2468	struct s2 {int (*f) (double a);};
2469  ;
2470  return 0;
2471}
2472_ACEOF
2473rm -f conftest.$ac_objext
2474if { (eval echo "$as_me:2474: \"$ac_compile\"") >&5
2475  (eval $ac_compile) 2>&5
2476  ac_status=$?
2477  echo "$as_me:2477: \$? = $ac_status" >&5
2478  (exit $ac_status); } &&
2479         { ac_try='test -s conftest.$ac_objext'
2480  { (eval echo "$as_me:2480: \"$ac_try\"") >&5
2481  (eval $ac_try) 2>&5
2482  ac_status=$?
2483  echo "$as_me:2483: \$? = $ac_status" >&5
2484  (exit $ac_status); }; }; then
2485  cf_cv_ansi_cc="$cf_arg"; break
2486else
2487  echo "$as_me: failed program was:" >&5
2488cat conftest.$ac_ext >&5
2489fi
2490rm -f conftest.$ac_objext conftest.$ac_ext
2491done
2492CFLAGS="$cf_save_CFLAGS"
2493CPPFLAGS="$cf_save_CPPFLAGS"
2494
2495fi
2496echo "$as_me:2496: result: $cf_cv_ansi_cc" >&5
2497echo "${ECHO_T}$cf_cv_ansi_cc" >&6
2498
2499if test "$cf_cv_ansi_cc" != "no"; then
2500if test ".$cf_cv_ansi_cc" != ".-DCC_HAS_PROTOS"; then
2501
2502cf_fix_cppflags=no
2503cf_new_cflags=
2504cf_new_cppflags=
2505cf_new_extra_cppflags=
2506
2507for cf_add_cflags in $cf_cv_ansi_cc
2508do
2509case $cf_fix_cppflags in
2510no)
2511	case $cf_add_cflags in #(vi
2512	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2513		case $cf_add_cflags in
2514		-D*)
2515			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2516
2517			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2518				&& test -z "${cf_tst_cflags}" \
2519				&& cf_fix_cppflags=yes
2520
2521			if test $cf_fix_cppflags = yes ; then
2522				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2523				continue
2524			elif test "${cf_tst_cflags}" = "\"'" ; then
2525				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2526				continue
2527			fi
2528			;;
2529		esac
2530		case "$CPPFLAGS" in
2531		*$cf_add_cflags) #(vi
2532			;;
2533		*) #(vi
2534			case $cf_add_cflags in #(vi
2535			-D*)
2536				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2537
2538CPPFLAGS=`echo "$CPPFLAGS" | \
2539	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
2540		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
2541
2542				;;
2543			esac
2544			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2545			;;
2546		esac
2547		;;
2548	*)
2549		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2550		;;
2551	esac
2552	;;
2553yes)
2554	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2555
2556	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2557
2558	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2559		&& test -z "${cf_tst_cflags}" \
2560		&& cf_fix_cppflags=no
2561	;;
2562esac
2563done
2564
2565if test -n "$cf_new_cflags" ; then
2566
2567	CFLAGS="$CFLAGS $cf_new_cflags"
2568fi
2569
2570if test -n "$cf_new_cppflags" ; then
2571
2572	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2573fi
2574
2575if test -n "$cf_new_extra_cppflags" ; then
2576
2577	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2578fi
2579
2580else
2581	cat >>confdefs.h <<\EOF
2582#define CC_HAS_PROTOS 1
2583EOF
2584
2585fi
2586fi
2587
2588echo "$as_me:2588: checking for $CC option to accept ANSI C" >&5
2589echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2590if test "${ac_cv_prog_cc_stdc+set}" = set; then
2591  echo $ECHO_N "(cached) $ECHO_C" >&6
2592else
2593  ac_cv_prog_cc_stdc=no
2594ac_save_CC=$CC
2595cat >conftest.$ac_ext <<_ACEOF
2596#line 2596 "configure"
2597#include "confdefs.h"
2598#include <stdarg.h>
2599#include <stdio.h>
2600#include <sys/types.h>
2601#include <sys/stat.h>
2602/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2603struct buf { int x; };
2604FILE * (*rcsopen) (struct buf *, struct stat *, int);
2605static char *e (p, i)
2606     char **p;
2607     int i;
2608{
2609  return p[i];
2610}
2611static char *f (char * (*g) (char **, int), char **p, ...)
2612{
2613  char *s;
2614  va_list v;
2615  va_start (v,p);
2616  s = g (p, va_arg (v,int));
2617  va_end (v);
2618  return s;
2619}
2620int test (int i, double x);
2621struct s1 {int (*f) (int a);};
2622struct s2 {int (*f) (double a);};
2623int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2624int argc;
2625char **argv;
2626int
2627main ()
2628{
2629return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2630  ;
2631  return 0;
2632}
2633_ACEOF
2634# Don't try gcc -ansi; that turns off useful extensions and
2635# breaks some systems' header files.
2636# AIX			-qlanglvl=ansi
2637# Ultrix and OSF/1	-std1
2638# HP-UX 10.20 and later	-Ae
2639# HP-UX older versions	-Aa -D_HPUX_SOURCE
2640# SVR4			-Xc -D__EXTENSIONS__
2641for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2642do
2643  CC="$ac_save_CC $ac_arg"
2644  rm -f conftest.$ac_objext
2645if { (eval echo "$as_me:2645: \"$ac_compile\"") >&5
2646  (eval $ac_compile) 2>&5
2647  ac_status=$?
2648  echo "$as_me:2648: \$? = $ac_status" >&5
2649  (exit $ac_status); } &&
2650         { ac_try='test -s conftest.$ac_objext'
2651  { (eval echo "$as_me:2651: \"$ac_try\"") >&5
2652  (eval $ac_try) 2>&5
2653  ac_status=$?
2654  echo "$as_me:2654: \$? = $ac_status" >&5
2655  (exit $ac_status); }; }; then
2656  ac_cv_prog_cc_stdc=$ac_arg
2657break
2658else
2659  echo "$as_me: failed program was:" >&5
2660cat conftest.$ac_ext >&5
2661fi
2662rm -f conftest.$ac_objext
2663done
2664rm -f conftest.$ac_ext conftest.$ac_objext
2665CC=$ac_save_CC
2666
2667fi
2668
2669case "x$ac_cv_prog_cc_stdc" in
2670  x|xno)
2671    echo "$as_me:2671: result: none needed" >&5
2672echo "${ECHO_T}none needed" >&6 ;;
2673  *)
2674    echo "$as_me:2674: result: $ac_cv_prog_cc_stdc" >&5
2675echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2676    CC="$CC $ac_cv_prog_cc_stdc" ;;
2677esac
2678
2679echo "$as_me:2679: checking for an ANSI C-conforming const" >&5
2680echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
2681if test "${ac_cv_c_const+set}" = set; then
2682  echo $ECHO_N "(cached) $ECHO_C" >&6
2683else
2684  cat >conftest.$ac_ext <<_ACEOF
2685#line 2685 "configure"
2686#include "confdefs.h"
2687
2688int
2689main ()
2690{
2691/* FIXME: Include the comments suggested by Paul. */
2692#ifndef __cplusplus
2693  /* Ultrix mips cc rejects this.  */
2694  typedef int charset[2];
2695  const charset x;
2696  /* SunOS 4.1.1 cc rejects this.  */
2697  char const *const *ccp;
2698  char **p;
2699  /* NEC SVR4.0.2 mips cc rejects this.  */
2700  struct point {int x, y;};
2701  static struct point const zero = {0,0};
2702  /* AIX XL C 1.02.0.0 rejects this.
2703     It does not let you subtract one const X* pointer from another in
2704     an arm of an if-expression whose if-part is not a constant
2705     expression */
2706  const char *g = "string";
2707  ccp = &g + (g ? g-g : 0);
2708  /* HPUX 7.0 cc rejects these. */
2709  ++ccp;
2710  p = (char**) ccp;
2711  ccp = (char const *const *) p;
2712  { /* SCO 3.2v4 cc rejects this.  */
2713    char *t;
2714    char const *s = 0 ? (char *) 0 : (char const *) 0;
2715
2716    *t++ = 0;
2717  }
2718  { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
2719    int x[] = {25, 17};
2720    const int *foo = &x[0];
2721    ++foo;
2722  }
2723  { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
2724    typedef const int *iptr;
2725    iptr p = 0;
2726    ++p;
2727  }
2728  { /* AIX XL C 1.02.0.0 rejects this saying
2729       "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
2730    struct s { int j; const int *ap[3]; };
2731    struct s *b; b->j = 5;
2732  }
2733  { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
2734    const int foo = 10;
2735  }
2736#endif
2737
2738  ;
2739  return 0;
2740}
2741_ACEOF
2742rm -f conftest.$ac_objext
2743if { (eval echo "$as_me:2743: \"$ac_compile\"") >&5
2744  (eval $ac_compile) 2>&5
2745  ac_status=$?
2746  echo "$as_me:2746: \$? = $ac_status" >&5
2747  (exit $ac_status); } &&
2748         { ac_try='test -s conftest.$ac_objext'
2749  { (eval echo "$as_me:2749: \"$ac_try\"") >&5
2750  (eval $ac_try) 2>&5
2751  ac_status=$?
2752  echo "$as_me:2752: \$? = $ac_status" >&5
2753  (exit $ac_status); }; }; then
2754  ac_cv_c_const=yes
2755else
2756  echo "$as_me: failed program was:" >&5
2757cat conftest.$ac_ext >&5
2758ac_cv_c_const=no
2759fi
2760rm -f conftest.$ac_objext conftest.$ac_ext
2761fi
2762echo "$as_me:2762: result: $ac_cv_c_const" >&5
2763echo "${ECHO_T}$ac_cv_c_const" >&6
2764if test $ac_cv_c_const = no; then
2765
2766cat >>confdefs.h <<\EOF
2767#define const
2768EOF
2769
2770fi
2771
2772case $cf_cv_system_name in
2773os2*)
2774    CFLAGS="$CFLAGS -Zmt"
2775    CPPFLAGS="$CPPFLAGS -D__ST_MT_ERRNO__"
2776    CXXFLAGS="$CXXFLAGS -Zmt"
2777    # autoconf's macro sets -Zexe and suffix both, which conflict:w
2778    LDFLAGS="$LDFLAGS -Zmt -Zcrtdll"
2779    ac_cv_exeext=.exe
2780    ;;
2781esac
2782
2783PROG_EXT="$EXEEXT"
2784
2785test -n "$PROG_EXT" && cat >>confdefs.h <<EOF
2786#define PROG_EXT "$PROG_EXT"
2787EOF
2788
2789cf_XOPEN_SOURCE=500
2790cf_POSIX_C_SOURCE=199506L
2791cf_xopen_source=
2792
2793case $host_os in #(vi
2794aix[456]*) #(vi
2795	cf_xopen_source="-D_ALL_SOURCE"
2796	;;
2797darwin[0-8].*) #(vi
2798	cf_xopen_source="-D_APPLE_C_SOURCE"
2799	;;
2800darwin*) #(vi
2801	cf_xopen_source="-D_DARWIN_C_SOURCE"
2802	;;
2803freebsd*|dragonfly*) #(vi
2804	# 5.x headers associate
2805	#	_XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
2806	#	_XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
2807	cf_POSIX_C_SOURCE=200112L
2808	cf_XOPEN_SOURCE=600
2809	cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
2810	;;
2811hpux11*) #(vi
2812	cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
2813	;;
2814hpux*) #(vi
2815	cf_xopen_source="-D_HPUX_SOURCE"
2816	;;
2817irix[56].*) #(vi
2818	cf_xopen_source="-D_SGI_SOURCE"
2819	;;
2820linux*|gnu*|mint*|k*bsd*-gnu) #(vi
2821
2822echo "$as_me:2822: checking if we must define _GNU_SOURCE" >&5
2823echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
2824if test "${cf_cv_gnu_source+set}" = set; then
2825  echo $ECHO_N "(cached) $ECHO_C" >&6
2826else
2827
2828cat >conftest.$ac_ext <<_ACEOF
2829#line 2829 "configure"
2830#include "confdefs.h"
2831#include <sys/types.h>
2832int
2833main ()
2834{
2835
2836#ifndef _XOPEN_SOURCE
2837make an error
2838#endif
2839  ;
2840  return 0;
2841}
2842_ACEOF
2843rm -f conftest.$ac_objext
2844if { (eval echo "$as_me:2844: \"$ac_compile\"") >&5
2845  (eval $ac_compile) 2>&5
2846  ac_status=$?
2847  echo "$as_me:2847: \$? = $ac_status" >&5
2848  (exit $ac_status); } &&
2849         { ac_try='test -s conftest.$ac_objext'
2850  { (eval echo "$as_me:2850: \"$ac_try\"") >&5
2851  (eval $ac_try) 2>&5
2852  ac_status=$?
2853  echo "$as_me:2853: \$? = $ac_status" >&5
2854  (exit $ac_status); }; }; then
2855  cf_cv_gnu_source=no
2856else
2857  echo "$as_me: failed program was:" >&5
2858cat conftest.$ac_ext >&5
2859cf_save="$CPPFLAGS"
2860	 CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
2861	 cat >conftest.$ac_ext <<_ACEOF
2862#line 2862 "configure"
2863#include "confdefs.h"
2864#include <sys/types.h>
2865int
2866main ()
2867{
2868
2869#ifdef _XOPEN_SOURCE
2870make an error
2871#endif
2872  ;
2873  return 0;
2874}
2875_ACEOF
2876rm -f conftest.$ac_objext
2877if { (eval echo "$as_me:2877: \"$ac_compile\"") >&5
2878  (eval $ac_compile) 2>&5
2879  ac_status=$?
2880  echo "$as_me:2880: \$? = $ac_status" >&5
2881  (exit $ac_status); } &&
2882         { ac_try='test -s conftest.$ac_objext'
2883  { (eval echo "$as_me:2883: \"$ac_try\"") >&5
2884  (eval $ac_try) 2>&5
2885  ac_status=$?
2886  echo "$as_me:2886: \$? = $ac_status" >&5
2887  (exit $ac_status); }; }; then
2888  cf_cv_gnu_source=no
2889else
2890  echo "$as_me: failed program was:" >&5
2891cat conftest.$ac_ext >&5
2892cf_cv_gnu_source=yes
2893fi
2894rm -f conftest.$ac_objext conftest.$ac_ext
2895	CPPFLAGS="$cf_save"
2896
2897fi
2898rm -f conftest.$ac_objext conftest.$ac_ext
2899
2900fi
2901echo "$as_me:2901: result: $cf_cv_gnu_source" >&5
2902echo "${ECHO_T}$cf_cv_gnu_source" >&6
2903test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
2904
2905	;;
2906mirbsd*) #(vi
2907	# setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <arpa/inet.h>
2908	;;
2909netbsd*) #(vi
2910	# setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
2911	;;
2912openbsd*) #(vi
2913	# setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
2914	;;
2915osf[45]*) #(vi
2916	cf_xopen_source="-D_OSF_SOURCE"
2917	;;
2918nto-qnx*) #(vi
2919	cf_xopen_source="-D_QNX_SOURCE"
2920	;;
2921sco*) #(vi
2922	# setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
2923	;;
2924solaris2.1[0-9]) #(vi
2925	cf_xopen_source="-D__EXTENSIONS__ -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
2926	;;
2927solaris2.[1-9]) #(vi
2928	cf_xopen_source="-D__EXTENSIONS__"
2929	;;
2930*)
2931	echo "$as_me:2931: checking if we should define _XOPEN_SOURCE" >&5
2932echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
2933if test "${cf_cv_xopen_source+set}" = set; then
2934  echo $ECHO_N "(cached) $ECHO_C" >&6
2935else
2936
2937	cat >conftest.$ac_ext <<_ACEOF
2938#line 2938 "configure"
2939#include "confdefs.h"
2940#include <sys/types.h>
2941int
2942main ()
2943{
2944
2945#ifndef _XOPEN_SOURCE
2946make an error
2947#endif
2948  ;
2949  return 0;
2950}
2951_ACEOF
2952rm -f conftest.$ac_objext
2953if { (eval echo "$as_me:2953: \"$ac_compile\"") >&5
2954  (eval $ac_compile) 2>&5
2955  ac_status=$?
2956  echo "$as_me:2956: \$? = $ac_status" >&5
2957  (exit $ac_status); } &&
2958         { ac_try='test -s conftest.$ac_objext'
2959  { (eval echo "$as_me:2959: \"$ac_try\"") >&5
2960  (eval $ac_try) 2>&5
2961  ac_status=$?
2962  echo "$as_me:2962: \$? = $ac_status" >&5
2963  (exit $ac_status); }; }; then
2964  cf_cv_xopen_source=no
2965else
2966  echo "$as_me: failed program was:" >&5
2967cat conftest.$ac_ext >&5
2968cf_save="$CPPFLAGS"
2969	 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
2970	 cat >conftest.$ac_ext <<_ACEOF
2971#line 2971 "configure"
2972#include "confdefs.h"
2973#include <sys/types.h>
2974int
2975main ()
2976{
2977
2978#ifdef _XOPEN_SOURCE
2979make an error
2980#endif
2981  ;
2982  return 0;
2983}
2984_ACEOF
2985rm -f conftest.$ac_objext
2986if { (eval echo "$as_me:2986: \"$ac_compile\"") >&5
2987  (eval $ac_compile) 2>&5
2988  ac_status=$?
2989  echo "$as_me:2989: \$? = $ac_status" >&5
2990  (exit $ac_status); } &&
2991         { ac_try='test -s conftest.$ac_objext'
2992  { (eval echo "$as_me:2992: \"$ac_try\"") >&5
2993  (eval $ac_try) 2>&5
2994  ac_status=$?
2995  echo "$as_me:2995: \$? = $ac_status" >&5
2996  (exit $ac_status); }; }; then
2997  cf_cv_xopen_source=no
2998else
2999  echo "$as_me: failed program was:" >&5
3000cat conftest.$ac_ext >&5
3001cf_cv_xopen_source=$cf_XOPEN_SOURCE
3002fi
3003rm -f conftest.$ac_objext conftest.$ac_ext
3004	CPPFLAGS="$cf_save"
3005
3006fi
3007rm -f conftest.$ac_objext conftest.$ac_ext
3008
3009fi
3010echo "$as_me:3010: result: $cf_cv_xopen_source" >&5
3011echo "${ECHO_T}$cf_cv_xopen_source" >&6
3012	if test "$cf_cv_xopen_source" != no ; then
3013
3014CFLAGS=`echo "$CFLAGS" | \
3015	sed	-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
3016		-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?$//g'`
3017
3018CPPFLAGS=`echo "$CPPFLAGS" | \
3019	sed	-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
3020		-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?$//g'`
3021
3022		cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
3023
3024cf_fix_cppflags=no
3025cf_new_cflags=
3026cf_new_cppflags=
3027cf_new_extra_cppflags=
3028
3029for cf_add_cflags in $cf_temp_xopen_source
3030do
3031case $cf_fix_cppflags in
3032no)
3033	case $cf_add_cflags in #(vi
3034	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
3035		case $cf_add_cflags in
3036		-D*)
3037			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3038
3039			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
3040				&& test -z "${cf_tst_cflags}" \
3041				&& cf_fix_cppflags=yes
3042
3043			if test $cf_fix_cppflags = yes ; then
3044				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3045				continue
3046			elif test "${cf_tst_cflags}" = "\"'" ; then
3047				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3048				continue
3049			fi
3050			;;
3051		esac
3052		case "$CPPFLAGS" in
3053		*$cf_add_cflags) #(vi
3054			;;
3055		*) #(vi
3056			case $cf_add_cflags in #(vi
3057			-D*)
3058				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3059
3060CPPFLAGS=`echo "$CPPFLAGS" | \
3061	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
3062		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
3063
3064				;;
3065			esac
3066			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
3067			;;
3068		esac
3069		;;
3070	*)
3071		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
3072		;;
3073	esac
3074	;;
3075yes)
3076	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3077
3078	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3079
3080	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
3081		&& test -z "${cf_tst_cflags}" \
3082		&& cf_fix_cppflags=no
3083	;;
3084esac
3085done
3086
3087if test -n "$cf_new_cflags" ; then
3088
3089	CFLAGS="$CFLAGS $cf_new_cflags"
3090fi
3091
3092if test -n "$cf_new_cppflags" ; then
3093
3094	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
3095fi
3096
3097if test -n "$cf_new_extra_cppflags" ; then
3098
3099	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
3100fi
3101
3102	fi
3103
3104cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
3105
3106cf_save_CFLAGS="$CFLAGS"
3107cf_save_CPPFLAGS="$CPPFLAGS"
3108
3109cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
3110	sed	-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
3111		-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?$//g'`
3112
3113cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
3114	sed	-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
3115		-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?$//g'`
3116
3117echo "$as_me:3117: checking if we should define _POSIX_C_SOURCE" >&5
3118echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
3119if test "${cf_cv_posix_c_source+set}" = set; then
3120  echo $ECHO_N "(cached) $ECHO_C" >&6
3121else
3122
3123echo "${as_me:-configure}:3123: testing if the symbol is already defined go no further ..." 1>&5
3124
3125	cat >conftest.$ac_ext <<_ACEOF
3126#line 3126 "configure"
3127#include "confdefs.h"
3128#include <sys/types.h>
3129int
3130main ()
3131{
3132
3133#ifndef _POSIX_C_SOURCE
3134make an error
3135#endif
3136  ;
3137  return 0;
3138}
3139_ACEOF
3140rm -f conftest.$ac_objext
3141if { (eval echo "$as_me:3141: \"$ac_compile\"") >&5
3142  (eval $ac_compile) 2>&5
3143  ac_status=$?
3144  echo "$as_me:3144: \$? = $ac_status" >&5
3145  (exit $ac_status); } &&
3146         { ac_try='test -s conftest.$ac_objext'
3147  { (eval echo "$as_me:3147: \"$ac_try\"") >&5
3148  (eval $ac_try) 2>&5
3149  ac_status=$?
3150  echo "$as_me:3150: \$? = $ac_status" >&5
3151  (exit $ac_status); }; }; then
3152  cf_cv_posix_c_source=no
3153else
3154  echo "$as_me: failed program was:" >&5
3155cat conftest.$ac_ext >&5
3156cf_want_posix_source=no
3157	 case .$cf_POSIX_C_SOURCE in #(vi
3158	 .[12]??*) #(vi
3159		cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
3160		;;
3161	 .2) #(vi
3162		cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
3163		cf_want_posix_source=yes
3164		;;
3165	 .*)
3166		cf_want_posix_source=yes
3167		;;
3168	 esac
3169	 if test "$cf_want_posix_source" = yes ; then
3170		cat >conftest.$ac_ext <<_ACEOF
3171#line 3171 "configure"
3172#include "confdefs.h"
3173#include <sys/types.h>
3174int
3175main ()
3176{
3177
3178#ifdef _POSIX_SOURCE
3179make an error
3180#endif
3181  ;
3182  return 0;
3183}
3184_ACEOF
3185rm -f conftest.$ac_objext
3186if { (eval echo "$as_me:3186: \"$ac_compile\"") >&5
3187  (eval $ac_compile) 2>&5
3188  ac_status=$?
3189  echo "$as_me:3189: \$? = $ac_status" >&5
3190  (exit $ac_status); } &&
3191         { ac_try='test -s conftest.$ac_objext'
3192  { (eval echo "$as_me:3192: \"$ac_try\"") >&5
3193  (eval $ac_try) 2>&5
3194  ac_status=$?
3195  echo "$as_me:3195: \$? = $ac_status" >&5
3196  (exit $ac_status); }; }; then
3197  :
3198else
3199  echo "$as_me: failed program was:" >&5
3200cat conftest.$ac_ext >&5
3201cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
3202fi
3203rm -f conftest.$ac_objext conftest.$ac_ext
3204	 fi
3205
3206echo "${as_me:-configure}:3206: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
3207
3208	 CFLAGS="$cf_trim_CFLAGS"
3209	 CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
3210
3211echo "${as_me:-configure}:3211: testing if the second compile does not leave our definition intact error ..." 1>&5
3212
3213	 cat >conftest.$ac_ext <<_ACEOF
3214#line 3214 "configure"
3215#include "confdefs.h"
3216#include <sys/types.h>
3217int
3218main ()
3219{
3220
3221#ifndef _POSIX_C_SOURCE
3222make an error
3223#endif
3224  ;
3225  return 0;
3226}
3227_ACEOF
3228rm -f conftest.$ac_objext
3229if { (eval echo "$as_me:3229: \"$ac_compile\"") >&5
3230  (eval $ac_compile) 2>&5
3231  ac_status=$?
3232  echo "$as_me:3232: \$? = $ac_status" >&5
3233  (exit $ac_status); } &&
3234         { ac_try='test -s conftest.$ac_objext'
3235  { (eval echo "$as_me:3235: \"$ac_try\"") >&5
3236  (eval $ac_try) 2>&5
3237  ac_status=$?
3238  echo "$as_me:3238: \$? = $ac_status" >&5
3239  (exit $ac_status); }; }; then
3240  :
3241else
3242  echo "$as_me: failed program was:" >&5
3243cat conftest.$ac_ext >&5
3244cf_cv_posix_c_source=no
3245fi
3246rm -f conftest.$ac_objext conftest.$ac_ext
3247	 CFLAGS="$cf_save_CFLAGS"
3248	 CPPFLAGS="$cf_save_CPPFLAGS"
3249
3250fi
3251rm -f conftest.$ac_objext conftest.$ac_ext
3252
3253fi
3254echo "$as_me:3254: result: $cf_cv_posix_c_source" >&5
3255echo "${ECHO_T}$cf_cv_posix_c_source" >&6
3256
3257if test "$cf_cv_posix_c_source" != no ; then
3258	CFLAGS="$cf_trim_CFLAGS"
3259	CPPFLAGS="$cf_trim_CPPFLAGS"
3260
3261cf_fix_cppflags=no
3262cf_new_cflags=
3263cf_new_cppflags=
3264cf_new_extra_cppflags=
3265
3266for cf_add_cflags in $cf_cv_posix_c_source
3267do
3268case $cf_fix_cppflags in
3269no)
3270	case $cf_add_cflags in #(vi
3271	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
3272		case $cf_add_cflags in
3273		-D*)
3274			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3275
3276			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
3277				&& test -z "${cf_tst_cflags}" \
3278				&& cf_fix_cppflags=yes
3279
3280			if test $cf_fix_cppflags = yes ; then
3281				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3282				continue
3283			elif test "${cf_tst_cflags}" = "\"'" ; then
3284				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3285				continue
3286			fi
3287			;;
3288		esac
3289		case "$CPPFLAGS" in
3290		*$cf_add_cflags) #(vi
3291			;;
3292		*) #(vi
3293			case $cf_add_cflags in #(vi
3294			-D*)
3295				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3296
3297CPPFLAGS=`echo "$CPPFLAGS" | \
3298	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
3299		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
3300
3301				;;
3302			esac
3303			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
3304			;;
3305		esac
3306		;;
3307	*)
3308		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
3309		;;
3310	esac
3311	;;
3312yes)
3313	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3314
3315	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3316
3317	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
3318		&& test -z "${cf_tst_cflags}" \
3319		&& cf_fix_cppflags=no
3320	;;
3321esac
3322done
3323
3324if test -n "$cf_new_cflags" ; then
3325
3326	CFLAGS="$CFLAGS $cf_new_cflags"
3327fi
3328
3329if test -n "$cf_new_cppflags" ; then
3330
3331	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
3332fi
3333
3334if test -n "$cf_new_extra_cppflags" ; then
3335
3336	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
3337fi
3338
3339fi
3340
3341	;;
3342esac
3343
3344if test -n "$cf_xopen_source" ; then
3345
3346cf_fix_cppflags=no
3347cf_new_cflags=
3348cf_new_cppflags=
3349cf_new_extra_cppflags=
3350
3351for cf_add_cflags in $cf_xopen_source
3352do
3353case $cf_fix_cppflags in
3354no)
3355	case $cf_add_cflags in #(vi
3356	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
3357		case $cf_add_cflags in
3358		-D*)
3359			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3360
3361			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
3362				&& test -z "${cf_tst_cflags}" \
3363				&& cf_fix_cppflags=yes
3364
3365			if test $cf_fix_cppflags = yes ; then
3366				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3367				continue
3368			elif test "${cf_tst_cflags}" = "\"'" ; then
3369				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3370				continue
3371			fi
3372			;;
3373		esac
3374		case "$CPPFLAGS" in
3375		*$cf_add_cflags) #(vi
3376			;;
3377		*) #(vi
3378			case $cf_add_cflags in #(vi
3379			-D*)
3380				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3381
3382CPPFLAGS=`echo "$CPPFLAGS" | \
3383	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
3384		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
3385
3386				;;
3387			esac
3388			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
3389			;;
3390		esac
3391		;;
3392	*)
3393		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
3394		;;
3395	esac
3396	;;
3397yes)
3398	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3399
3400	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3401
3402	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
3403		&& test -z "${cf_tst_cflags}" \
3404		&& cf_fix_cppflags=no
3405	;;
3406esac
3407done
3408
3409if test -n "$cf_new_cflags" ; then
3410
3411	CFLAGS="$CFLAGS $cf_new_cflags"
3412fi
3413
3414if test -n "$cf_new_cppflags" ; then
3415
3416	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
3417fi
3418
3419if test -n "$cf_new_extra_cppflags" ; then
3420
3421	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
3422fi
3423
3424fi
3425
3426echo "$as_me:3426: checking if SIGWINCH is defined" >&5
3427echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
3428if test "${cf_cv_define_sigwinch+set}" = set; then
3429  echo $ECHO_N "(cached) $ECHO_C" >&6
3430else
3431
3432	cat >conftest.$ac_ext <<_ACEOF
3433#line 3433 "configure"
3434#include "confdefs.h"
3435
3436#include <sys/types.h>
3437#include <sys/signal.h>
3438
3439int
3440main ()
3441{
3442int x = SIGWINCH
3443  ;
3444  return 0;
3445}
3446_ACEOF
3447rm -f conftest.$ac_objext
3448if { (eval echo "$as_me:3448: \"$ac_compile\"") >&5
3449  (eval $ac_compile) 2>&5
3450  ac_status=$?
3451  echo "$as_me:3451: \$? = $ac_status" >&5
3452  (exit $ac_status); } &&
3453         { ac_try='test -s conftest.$ac_objext'
3454  { (eval echo "$as_me:3454: \"$ac_try\"") >&5
3455  (eval $ac_try) 2>&5
3456  ac_status=$?
3457  echo "$as_me:3457: \$? = $ac_status" >&5
3458  (exit $ac_status); }; }; then
3459  cf_cv_define_sigwinch=yes
3460else
3461  echo "$as_me: failed program was:" >&5
3462cat conftest.$ac_ext >&5
3463cat >conftest.$ac_ext <<_ACEOF
3464#line 3464 "configure"
3465#include "confdefs.h"
3466
3467#undef _XOPEN_SOURCE
3468#undef _POSIX_SOURCE
3469#undef _POSIX_C_SOURCE
3470#include <sys/types.h>
3471#include <sys/signal.h>
3472
3473int
3474main ()
3475{
3476int x = SIGWINCH
3477  ;
3478  return 0;
3479}
3480_ACEOF
3481rm -f conftest.$ac_objext
3482if { (eval echo "$as_me:3482: \"$ac_compile\"") >&5
3483  (eval $ac_compile) 2>&5
3484  ac_status=$?
3485  echo "$as_me:3485: \$? = $ac_status" >&5
3486  (exit $ac_status); } &&
3487         { ac_try='test -s conftest.$ac_objext'
3488  { (eval echo "$as_me:3488: \"$ac_try\"") >&5
3489  (eval $ac_try) 2>&5
3490  ac_status=$?
3491  echo "$as_me:3491: \$? = $ac_status" >&5
3492  (exit $ac_status); }; }; then
3493  cf_cv_define_sigwinch=maybe
3494else
3495  echo "$as_me: failed program was:" >&5
3496cat conftest.$ac_ext >&5
3497cf_cv_define_sigwinch=no
3498fi
3499rm -f conftest.$ac_objext conftest.$ac_ext
3500
3501fi
3502rm -f conftest.$ac_objext conftest.$ac_ext
3503
3504fi
3505echo "$as_me:3505: result: $cf_cv_define_sigwinch" >&5
3506echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
3507
3508if test "$cf_cv_define_sigwinch" = maybe ; then
3509echo "$as_me:3509: checking for actual SIGWINCH definition" >&5
3510echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
3511if test "${cf_cv_fixup_sigwinch+set}" = set; then
3512  echo $ECHO_N "(cached) $ECHO_C" >&6
3513else
3514
3515cf_cv_fixup_sigwinch=unknown
3516cf_sigwinch=32
3517while test $cf_sigwinch != 1
3518do
3519	cat >conftest.$ac_ext <<_ACEOF
3520#line 3520 "configure"
3521#include "confdefs.h"
3522
3523#undef _XOPEN_SOURCE
3524#undef _POSIX_SOURCE
3525#undef _POSIX_C_SOURCE
3526#include <sys/types.h>
3527#include <sys/signal.h>
3528
3529int
3530main ()
3531{
3532
3533#if SIGWINCH != $cf_sigwinch
3534make an error
3535#endif
3536int x = SIGWINCH
3537  ;
3538  return 0;
3539}
3540_ACEOF
3541rm -f conftest.$ac_objext
3542if { (eval echo "$as_me:3542: \"$ac_compile\"") >&5
3543  (eval $ac_compile) 2>&5
3544  ac_status=$?
3545  echo "$as_me:3545: \$? = $ac_status" >&5
3546  (exit $ac_status); } &&
3547         { ac_try='test -s conftest.$ac_objext'
3548  { (eval echo "$as_me:3548: \"$ac_try\"") >&5
3549  (eval $ac_try) 2>&5
3550  ac_status=$?
3551  echo "$as_me:3551: \$? = $ac_status" >&5
3552  (exit $ac_status); }; }; then
3553  cf_cv_fixup_sigwinch=$cf_sigwinch
3554	 break
3555else
3556  echo "$as_me: failed program was:" >&5
3557cat conftest.$ac_ext >&5
3558fi
3559rm -f conftest.$ac_objext conftest.$ac_ext
3560
3561cf_sigwinch=`expr $cf_sigwinch - 1`
3562done
3563
3564fi
3565echo "$as_me:3565: result: $cf_cv_fixup_sigwinch" >&5
3566echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
3567
3568	if test "$cf_cv_fixup_sigwinch" != unknown ; then
3569		CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
3570	fi
3571fi
3572
3573###	checks for header files
3574
3575for ac_header in \
3576ncurses/term.h \
3577stdlib.h \
3578sys/ttydefaults.h \
3579term.h \
3580termios.h \
3581unistd.h \
3582wchar.h \
3583
3584do
3585as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3586echo "$as_me:3586: checking for $ac_header" >&5
3587echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3588if eval "test \"\${$as_ac_Header+set}\" = set"; then
3589  echo $ECHO_N "(cached) $ECHO_C" >&6
3590else
3591  cat >conftest.$ac_ext <<_ACEOF
3592#line 3592 "configure"
3593#include "confdefs.h"
3594#include <$ac_header>
3595_ACEOF
3596if { (eval echo "$as_me:3596: \"$ac_cpp conftest.$ac_ext\"") >&5
3597  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3598  ac_status=$?
3599  egrep -v '^ *\+' conftest.er1 >conftest.err
3600  rm -f conftest.er1
3601  cat conftest.err >&5
3602  echo "$as_me:3602: \$? = $ac_status" >&5
3603  (exit $ac_status); } >/dev/null; then
3604  if test -s conftest.err; then
3605    ac_cpp_err=$ac_c_preproc_warn_flag
3606  else
3607    ac_cpp_err=
3608  fi
3609else
3610  ac_cpp_err=yes
3611fi
3612if test -z "$ac_cpp_err"; then
3613  eval "$as_ac_Header=yes"
3614else
3615  echo "$as_me: failed program was:" >&5
3616  cat conftest.$ac_ext >&5
3617  eval "$as_ac_Header=no"
3618fi
3619rm -f conftest.err conftest.$ac_ext
3620fi
3621echo "$as_me:3621: result: `eval echo '${'$as_ac_Header'}'`" >&5
3622echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3623if test `eval echo '${'$as_ac_Header'}'` = yes; then
3624  cat >>confdefs.h <<EOF
3625#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
3626EOF
3627
3628fi
3629done
3630
3631echo "$as_me:3631: checking whether time.h and sys/time.h may both be included" >&5
3632echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
3633if test "${ac_cv_header_time+set}" = set; then
3634  echo $ECHO_N "(cached) $ECHO_C" >&6
3635else
3636  cat >conftest.$ac_ext <<_ACEOF
3637#line 3637 "configure"
3638#include "confdefs.h"
3639#include <sys/types.h>
3640#include <sys/time.h>
3641#include <time.h>
3642
3643int
3644main ()
3645{
3646if ((struct tm *) 0)
3647return 0;
3648  ;
3649  return 0;
3650}
3651_ACEOF
3652rm -f conftest.$ac_objext
3653if { (eval echo "$as_me:3653: \"$ac_compile\"") >&5
3654  (eval $ac_compile) 2>&5
3655  ac_status=$?
3656  echo "$as_me:3656: \$? = $ac_status" >&5
3657  (exit $ac_status); } &&
3658         { ac_try='test -s conftest.$ac_objext'
3659  { (eval echo "$as_me:3659: \"$ac_try\"") >&5
3660  (eval $ac_try) 2>&5
3661  ac_status=$?
3662  echo "$as_me:3662: \$? = $ac_status" >&5
3663  (exit $ac_status); }; }; then
3664  ac_cv_header_time=yes
3665else
3666  echo "$as_me: failed program was:" >&5
3667cat conftest.$ac_ext >&5
3668ac_cv_header_time=no
3669fi
3670rm -f conftest.$ac_objext conftest.$ac_ext
3671fi
3672echo "$as_me:3672: result: $ac_cv_header_time" >&5
3673echo "${ECHO_T}$ac_cv_header_time" >&6
3674if test $ac_cv_header_time = yes; then
3675
3676cat >>confdefs.h <<\EOF
3677#define TIME_WITH_SYS_TIME 1
3678EOF
3679
3680fi
3681
3682  echo "$as_me:3682: checking for nl_langinfo and CODESET" >&5
3683echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
3684if test "${am_cv_langinfo_codeset+set}" = set; then
3685  echo $ECHO_N "(cached) $ECHO_C" >&6
3686else
3687  cat >conftest.$ac_ext <<_ACEOF
3688#line 3688 "configure"
3689#include "confdefs.h"
3690#include <langinfo.h>
3691int
3692main ()
3693{
3694char* cs = nl_langinfo(CODESET);
3695  ;
3696  return 0;
3697}
3698_ACEOF
3699rm -f conftest.$ac_objext conftest$ac_exeext
3700if { (eval echo "$as_me:3700: \"$ac_link\"") >&5
3701  (eval $ac_link) 2>&5
3702  ac_status=$?
3703  echo "$as_me:3703: \$? = $ac_status" >&5
3704  (exit $ac_status); } &&
3705         { ac_try='test -s conftest$ac_exeext'
3706  { (eval echo "$as_me:3706: \"$ac_try\"") >&5
3707  (eval $ac_try) 2>&5
3708  ac_status=$?
3709  echo "$as_me:3709: \$? = $ac_status" >&5
3710  (exit $ac_status); }; }; then
3711  am_cv_langinfo_codeset=yes
3712else
3713  echo "$as_me: failed program was:" >&5
3714cat conftest.$ac_ext >&5
3715am_cv_langinfo_codeset=no
3716fi
3717rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3718
3719fi
3720echo "$as_me:3720: result: $am_cv_langinfo_codeset" >&5
3721echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
3722  if test $am_cv_langinfo_codeset = yes; then
3723
3724cat >>confdefs.h <<\EOF
3725#define HAVE_LANGINFO_CODESET 1
3726EOF
3727
3728  fi
3729
3730###	checks for typedefs
3731
3732echo "$as_me:3732: checking for signal global datatype" >&5
3733echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
3734if test "${cf_cv_sig_atomic_t+set}" = set; then
3735  echo $ECHO_N "(cached) $ECHO_C" >&6
3736else
3737
3738	for cf_type in \
3739		"volatile sig_atomic_t" \
3740		"sig_atomic_t" \
3741		"int"
3742	do
3743	cat >conftest.$ac_ext <<_ACEOF
3744#line 3744 "configure"
3745#include "confdefs.h"
3746
3747#include <sys/types.h>
3748#include <signal.h>
3749#include <stdio.h>
3750
3751extern $cf_type x;
3752$cf_type x;
3753static void handler(int sig)
3754{
3755	x = 5;
3756}
3757int
3758main ()
3759{
3760signal(SIGINT, handler);
3761		 x = 1
3762  ;
3763  return 0;
3764}
3765_ACEOF
3766rm -f conftest.$ac_objext
3767if { (eval echo "$as_me:3767: \"$ac_compile\"") >&5
3768  (eval $ac_compile) 2>&5
3769  ac_status=$?
3770  echo "$as_me:3770: \$? = $ac_status" >&5
3771  (exit $ac_status); } &&
3772         { ac_try='test -s conftest.$ac_objext'
3773  { (eval echo "$as_me:3773: \"$ac_try\"") >&5
3774  (eval $ac_try) 2>&5
3775  ac_status=$?
3776  echo "$as_me:3776: \$? = $ac_status" >&5
3777  (exit $ac_status); }; }; then
3778  cf_cv_sig_atomic_t=$cf_type
3779else
3780  echo "$as_me: failed program was:" >&5
3781cat conftest.$ac_ext >&5
3782cf_cv_sig_atomic_t=no
3783fi
3784rm -f conftest.$ac_objext conftest.$ac_ext
3785		test "$cf_cv_sig_atomic_t" != no && break
3786	done
3787
3788fi
3789
3790echo "$as_me:3790: result: $cf_cv_sig_atomic_t" >&5
3791echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
3792test "$cf_cv_sig_atomic_t" != no && cat >>confdefs.h <<EOF
3793#define SIG_ATOMIC_T $cf_cv_sig_atomic_t
3794EOF
3795
3796echo "$as_me:3796: checking for size_t in <sys/types.h> or <stdio.h>" >&5
3797echo $ECHO_N "checking for size_t in <sys/types.h> or <stdio.h>... $ECHO_C" >&6
3798if test "${cf_cv_type_size_t+set}" = set; then
3799  echo $ECHO_N "(cached) $ECHO_C" >&6
3800else
3801
3802	cat >conftest.$ac_ext <<_ACEOF
3803#line 3803 "configure"
3804#include "confdefs.h"
3805
3806#include <sys/types.h>
3807#ifdef STDC_HEADERS
3808#include <stdlib.h>
3809#include <stddef.h>
3810#endif
3811#include <stdio.h>
3812int
3813main ()
3814{
3815size_t x
3816  ;
3817  return 0;
3818}
3819_ACEOF
3820rm -f conftest.$ac_objext
3821if { (eval echo "$as_me:3821: \"$ac_compile\"") >&5
3822  (eval $ac_compile) 2>&5
3823  ac_status=$?
3824  echo "$as_me:3824: \$? = $ac_status" >&5
3825  (exit $ac_status); } &&
3826         { ac_try='test -s conftest.$ac_objext'
3827  { (eval echo "$as_me:3827: \"$ac_try\"") >&5
3828  (eval $ac_try) 2>&5
3829  ac_status=$?
3830  echo "$as_me:3830: \$? = $ac_status" >&5
3831  (exit $ac_status); }; }; then
3832  cf_cv_type_size_t=yes
3833else
3834  echo "$as_me: failed program was:" >&5
3835cat conftest.$ac_ext >&5
3836cf_cv_type_size_t=no
3837fi
3838rm -f conftest.$ac_objext conftest.$ac_ext
3839
3840fi
3841
3842echo "$as_me:3842: result: $cf_cv_type_size_t" >&5
3843echo "${ECHO_T}$cf_cv_type_size_t" >&6
3844test $cf_cv_type_size_t = no && cat >>confdefs.h <<\EOF
3845#define size_t unsigned
3846EOF
3847
3848echo "$as_me:3848: checking for ANSI C header files" >&5
3849echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
3850if test "${ac_cv_header_stdc+set}" = set; then
3851  echo $ECHO_N "(cached) $ECHO_C" >&6
3852else
3853  cat >conftest.$ac_ext <<_ACEOF
3854#line 3854 "configure"
3855#include "confdefs.h"
3856#include <stdlib.h>
3857#include <stdarg.h>
3858#include <string.h>
3859#include <float.h>
3860
3861_ACEOF
3862if { (eval echo "$as_me:3862: \"$ac_cpp conftest.$ac_ext\"") >&5
3863  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3864  ac_status=$?
3865  egrep -v '^ *\+' conftest.er1 >conftest.err
3866  rm -f conftest.er1
3867  cat conftest.err >&5
3868  echo "$as_me:3868: \$? = $ac_status" >&5
3869  (exit $ac_status); } >/dev/null; then
3870  if test -s conftest.err; then
3871    ac_cpp_err=$ac_c_preproc_warn_flag
3872  else
3873    ac_cpp_err=
3874  fi
3875else
3876  ac_cpp_err=yes
3877fi
3878if test -z "$ac_cpp_err"; then
3879  ac_cv_header_stdc=yes
3880else
3881  echo "$as_me: failed program was:" >&5
3882  cat conftest.$ac_ext >&5
3883  ac_cv_header_stdc=no
3884fi
3885rm -f conftest.err conftest.$ac_ext
3886
3887if test $ac_cv_header_stdc = yes; then
3888  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3889  cat >conftest.$ac_ext <<_ACEOF
3890#line 3890 "configure"
3891#include "confdefs.h"
3892#include <string.h>
3893
3894_ACEOF
3895if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3896  egrep "memchr" >/dev/null 2>&1; then
3897  :
3898else
3899  ac_cv_header_stdc=no
3900fi
3901rm -rf conftest*
3902
3903fi
3904
3905if test $ac_cv_header_stdc = yes; then
3906  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3907  cat >conftest.$ac_ext <<_ACEOF
3908#line 3908 "configure"
3909#include "confdefs.h"
3910#include <stdlib.h>
3911
3912_ACEOF
3913if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3914  egrep "free" >/dev/null 2>&1; then
3915  :
3916else
3917  ac_cv_header_stdc=no
3918fi
3919rm -rf conftest*
3920
3921fi
3922
3923if test $ac_cv_header_stdc = yes; then
3924  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3925  if test "$cross_compiling" = yes; then
3926  :
3927else
3928  cat >conftest.$ac_ext <<_ACEOF
3929#line 3929 "configure"
3930#include "confdefs.h"
3931#include <ctype.h>
3932#if ((' ' & 0x0FF) == 0x020)
3933# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3934# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3935#else
3936# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
3937                     || ('j' <= (c) && (c) <= 'r') \
3938                     || ('s' <= (c) && (c) <= 'z'))
3939# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
3940#endif
3941
3942#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3943int
3944main ()
3945{
3946  int i;
3947  for (i = 0; i < 256; i++)
3948    if (XOR (islower (i), ISLOWER (i))
3949        || toupper (i) != TOUPPER (i))
3950      $ac_main_return(2);
3951  $ac_main_return (0);
3952}
3953_ACEOF
3954rm -f conftest$ac_exeext
3955if { (eval echo "$as_me:3955: \"$ac_link\"") >&5
3956  (eval $ac_link) 2>&5
3957  ac_status=$?
3958  echo "$as_me:3958: \$? = $ac_status" >&5
3959  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3960  { (eval echo "$as_me:3960: \"$ac_try\"") >&5
3961  (eval $ac_try) 2>&5
3962  ac_status=$?
3963  echo "$as_me:3963: \$? = $ac_status" >&5
3964  (exit $ac_status); }; }; then
3965  :
3966else
3967  echo "$as_me: program exited with status $ac_status" >&5
3968echo "$as_me: failed program was:" >&5
3969cat conftest.$ac_ext >&5
3970ac_cv_header_stdc=no
3971fi
3972rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
3973fi
3974fi
3975fi
3976echo "$as_me:3976: result: $ac_cv_header_stdc" >&5
3977echo "${ECHO_T}$ac_cv_header_stdc" >&6
3978if test $ac_cv_header_stdc = yes; then
3979
3980cat >>confdefs.h <<\EOF
3981#define STDC_HEADERS 1
3982EOF
3983
3984fi
3985
3986# On IRIX 5.3, sys/types and inttypes.h are conflicting.
3987
3988for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
3989                  inttypes.h stdint.h unistd.h
3990do
3991as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3992echo "$as_me:3992: checking for $ac_header" >&5
3993echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3994if eval "test \"\${$as_ac_Header+set}\" = set"; then
3995  echo $ECHO_N "(cached) $ECHO_C" >&6
3996else
3997  cat >conftest.$ac_ext <<_ACEOF
3998#line 3998 "configure"
3999#include "confdefs.h"
4000$ac_includes_default
4001#include <$ac_header>
4002_ACEOF
4003rm -f conftest.$ac_objext
4004if { (eval echo "$as_me:4004: \"$ac_compile\"") >&5
4005  (eval $ac_compile) 2>&5
4006  ac_status=$?
4007  echo "$as_me:4007: \$? = $ac_status" >&5
4008  (exit $ac_status); } &&
4009         { ac_try='test -s conftest.$ac_objext'
4010  { (eval echo "$as_me:4010: \"$ac_try\"") >&5
4011  (eval $ac_try) 2>&5
4012  ac_status=$?
4013  echo "$as_me:4013: \$? = $ac_status" >&5
4014  (exit $ac_status); }; }; then
4015  eval "$as_ac_Header=yes"
4016else
4017  echo "$as_me: failed program was:" >&5
4018cat conftest.$ac_ext >&5
4019eval "$as_ac_Header=no"
4020fi
4021rm -f conftest.$ac_objext conftest.$ac_ext
4022fi
4023echo "$as_me:4023: result: `eval echo '${'$as_ac_Header'}'`" >&5
4024echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4025if test `eval echo '${'$as_ac_Header'}'` = yes; then
4026  cat >>confdefs.h <<EOF
4027#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4028EOF
4029
4030fi
4031done
4032
4033echo "$as_me:4033: checking for time_t" >&5
4034echo $ECHO_N "checking for time_t... $ECHO_C" >&6
4035if test "${ac_cv_type_time_t+set}" = set; then
4036  echo $ECHO_N "(cached) $ECHO_C" >&6
4037else
4038  cat >conftest.$ac_ext <<_ACEOF
4039#line 4039 "configure"
4040#include "confdefs.h"
4041$ac_includes_default
4042int
4043main ()
4044{
4045if ((time_t *) 0)
4046  return 0;
4047if (sizeof (time_t))
4048  return 0;
4049  ;
4050  return 0;
4051}
4052_ACEOF
4053rm -f conftest.$ac_objext
4054if { (eval echo "$as_me:4054: \"$ac_compile\"") >&5
4055  (eval $ac_compile) 2>&5
4056  ac_status=$?
4057  echo "$as_me:4057: \$? = $ac_status" >&5
4058  (exit $ac_status); } &&
4059         { ac_try='test -s conftest.$ac_objext'
4060  { (eval echo "$as_me:4060: \"$ac_try\"") >&5
4061  (eval $ac_try) 2>&5
4062  ac_status=$?
4063  echo "$as_me:4063: \$? = $ac_status" >&5
4064  (exit $ac_status); }; }; then
4065  ac_cv_type_time_t=yes
4066else
4067  echo "$as_me: failed program was:" >&5
4068cat conftest.$ac_ext >&5
4069ac_cv_type_time_t=no
4070fi
4071rm -f conftest.$ac_objext conftest.$ac_ext
4072fi
4073echo "$as_me:4073: result: $ac_cv_type_time_t" >&5
4074echo "${ECHO_T}$ac_cv_type_time_t" >&6
4075if test $ac_cv_type_time_t = yes; then
4076  :
4077else
4078
4079cat >>confdefs.h <<EOF
4080#define time_t long
4081EOF
4082
4083fi
4084
4085echo "$as_me:4085: checking for mode_t" >&5
4086echo $ECHO_N "checking for mode_t... $ECHO_C" >&6
4087if test "${ac_cv_type_mode_t+set}" = set; then
4088  echo $ECHO_N "(cached) $ECHO_C" >&6
4089else
4090  cat >conftest.$ac_ext <<_ACEOF
4091#line 4091 "configure"
4092#include "confdefs.h"
4093$ac_includes_default
4094int
4095main ()
4096{
4097if ((mode_t *) 0)
4098  return 0;
4099if (sizeof (mode_t))
4100  return 0;
4101  ;
4102  return 0;
4103}
4104_ACEOF
4105rm -f conftest.$ac_objext
4106if { (eval echo "$as_me:4106: \"$ac_compile\"") >&5
4107  (eval $ac_compile) 2>&5
4108  ac_status=$?
4109  echo "$as_me:4109: \$? = $ac_status" >&5
4110  (exit $ac_status); } &&
4111         { ac_try='test -s conftest.$ac_objext'
4112  { (eval echo "$as_me:4112: \"$ac_try\"") >&5
4113  (eval $ac_try) 2>&5
4114  ac_status=$?
4115  echo "$as_me:4115: \$? = $ac_status" >&5
4116  (exit $ac_status); }; }; then
4117  ac_cv_type_mode_t=yes
4118else
4119  echo "$as_me: failed program was:" >&5
4120cat conftest.$ac_ext >&5
4121ac_cv_type_mode_t=no
4122fi
4123rm -f conftest.$ac_objext conftest.$ac_ext
4124fi
4125echo "$as_me:4125: result: $ac_cv_type_mode_t" >&5
4126echo "${ECHO_T}$ac_cv_type_mode_t" >&6
4127if test $ac_cv_type_mode_t = yes; then
4128  :
4129else
4130
4131cat >>confdefs.h <<EOF
4132#define mode_t int
4133EOF
4134
4135fi
4136
4137echo "$as_me:4137: checking for pid_t" >&5
4138echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
4139if test "${ac_cv_type_pid_t+set}" = set; then
4140  echo $ECHO_N "(cached) $ECHO_C" >&6
4141else
4142  cat >conftest.$ac_ext <<_ACEOF
4143#line 4143 "configure"
4144#include "confdefs.h"
4145$ac_includes_default
4146int
4147main ()
4148{
4149if ((pid_t *) 0)
4150  return 0;
4151if (sizeof (pid_t))
4152  return 0;
4153  ;
4154  return 0;
4155}
4156_ACEOF
4157rm -f conftest.$ac_objext
4158if { (eval echo "$as_me:4158: \"$ac_compile\"") >&5
4159  (eval $ac_compile) 2>&5
4160  ac_status=$?
4161  echo "$as_me:4161: \$? = $ac_status" >&5
4162  (exit $ac_status); } &&
4163         { ac_try='test -s conftest.$ac_objext'
4164  { (eval echo "$as_me:4164: \"$ac_try\"") >&5
4165  (eval $ac_try) 2>&5
4166  ac_status=$?
4167  echo "$as_me:4167: \$? = $ac_status" >&5
4168  (exit $ac_status); }; }; then
4169  ac_cv_type_pid_t=yes
4170else
4171  echo "$as_me: failed program was:" >&5
4172cat conftest.$ac_ext >&5
4173ac_cv_type_pid_t=no
4174fi
4175rm -f conftest.$ac_objext conftest.$ac_ext
4176fi
4177echo "$as_me:4177: result: $ac_cv_type_pid_t" >&5
4178echo "${ECHO_T}$ac_cv_type_pid_t" >&6
4179if test $ac_cv_type_pid_t = yes; then
4180  :
4181else
4182
4183cat >>confdefs.h <<EOF
4184#define pid_t int
4185EOF
4186
4187fi
4188
4189echo "$as_me:4189: checking for uid_t in sys/types.h" >&5
4190echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
4191if test "${ac_cv_type_uid_t+set}" = set; then
4192  echo $ECHO_N "(cached) $ECHO_C" >&6
4193else
4194  cat >conftest.$ac_ext <<_ACEOF
4195#line 4195 "configure"
4196#include "confdefs.h"
4197#include <sys/types.h>
4198
4199_ACEOF
4200if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4201  egrep "uid_t" >/dev/null 2>&1; then
4202  ac_cv_type_uid_t=yes
4203else
4204  ac_cv_type_uid_t=no
4205fi
4206rm -rf conftest*
4207
4208fi
4209echo "$as_me:4209: result: $ac_cv_type_uid_t" >&5
4210echo "${ECHO_T}$ac_cv_type_uid_t" >&6
4211if test $ac_cv_type_uid_t = no; then
4212
4213cat >>confdefs.h <<\EOF
4214#define uid_t int
4215EOF
4216
4217cat >>confdefs.h <<\EOF
4218#define gid_t int
4219EOF
4220
4221fi
4222
4223echo "$as_me:4223: checking for off_t" >&5
4224echo $ECHO_N "checking for off_t... $ECHO_C" >&6
4225if test "${ac_cv_type_off_t+set}" = set; then
4226  echo $ECHO_N "(cached) $ECHO_C" >&6
4227else
4228  cat >conftest.$ac_ext <<_ACEOF
4229#line 4229 "configure"
4230#include "confdefs.h"
4231$ac_includes_default
4232int
4233main ()
4234{
4235if ((off_t *) 0)
4236  return 0;
4237if (sizeof (off_t))
4238  return 0;
4239  ;
4240  return 0;
4241}
4242_ACEOF
4243rm -f conftest.$ac_objext
4244if { (eval echo "$as_me:4244: \"$ac_compile\"") >&5
4245  (eval $ac_compile) 2>&5
4246  ac_status=$?
4247  echo "$as_me:4247: \$? = $ac_status" >&5
4248  (exit $ac_status); } &&
4249         { ac_try='test -s conftest.$ac_objext'
4250  { (eval echo "$as_me:4250: \"$ac_try\"") >&5
4251  (eval $ac_try) 2>&5
4252  ac_status=$?
4253  echo "$as_me:4253: \$? = $ac_status" >&5
4254  (exit $ac_status); }; }; then
4255  ac_cv_type_off_t=yes
4256else
4257  echo "$as_me: failed program was:" >&5
4258cat conftest.$ac_ext >&5
4259ac_cv_type_off_t=no
4260fi
4261rm -f conftest.$ac_objext conftest.$ac_ext
4262fi
4263echo "$as_me:4263: result: $ac_cv_type_off_t" >&5
4264echo "${ECHO_T}$ac_cv_type_off_t" >&6
4265if test $ac_cv_type_off_t = yes; then
4266  :
4267else
4268
4269cat >>confdefs.h <<EOF
4270#define off_t long
4271EOF
4272
4273fi
4274
4275###	checks for library functions
4276
4277for ac_func in \
4278	bcopy \
4279	gethostname \
4280	getlogin \
4281	memmove \
4282	putenv \
4283	sched_yield \
4284	strerror \
4285	strftime \
4286	tcgetattr \
4287	waitpid \
4288	wcswidth \
4289	wcwidth
4290do
4291as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
4292echo "$as_me:4292: checking for $ac_func" >&5
4293echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
4294if eval "test \"\${$as_ac_var+set}\" = set"; then
4295  echo $ECHO_N "(cached) $ECHO_C" >&6
4296else
4297  cat >conftest.$ac_ext <<_ACEOF
4298#line 4298 "configure"
4299#include "confdefs.h"
4300/* System header to define __stub macros and hopefully few prototypes,
4301    which can conflict with char $ac_func (); below.  */
4302#include <assert.h>
4303/* Override any gcc2 internal prototype to avoid an error.  */
4304#ifdef __cplusplus
4305extern "C"
4306#endif
4307/* We use char because int might match the return type of a gcc2
4308   builtin and then its argument prototype would still apply.  */
4309char $ac_func ();
4310char (*f) ();
4311
4312int
4313main ()
4314{
4315/* The GNU C library defines this for functions which it implements
4316    to always fail with ENOSYS.  Some functions are actually named
4317    something starting with __ and the normal name is an alias.  */
4318#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4319choke me
4320#else
4321f = $ac_func;
4322#endif
4323
4324  ;
4325  return 0;
4326}
4327_ACEOF
4328rm -f conftest.$ac_objext conftest$ac_exeext
4329if { (eval echo "$as_me:4329: \"$ac_link\"") >&5
4330  (eval $ac_link) 2>&5
4331  ac_status=$?
4332  echo "$as_me:4332: \$? = $ac_status" >&5
4333  (exit $ac_status); } &&
4334         { ac_try='test -s conftest$ac_exeext'
4335  { (eval echo "$as_me:4335: \"$ac_try\"") >&5
4336  (eval $ac_try) 2>&5
4337  ac_status=$?
4338  echo "$as_me:4338: \$? = $ac_status" >&5
4339  (exit $ac_status); }; }; then
4340  eval "$as_ac_var=yes"
4341else
4342  echo "$as_me: failed program was:" >&5
4343cat conftest.$ac_ext >&5
4344eval "$as_ac_var=no"
4345fi
4346rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4347fi
4348echo "$as_me:4348: result: `eval echo '${'$as_ac_var'}'`" >&5
4349echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
4350if test `eval echo '${'$as_ac_var'}'` = yes; then
4351  cat >>confdefs.h <<EOF
4352#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
4353EOF
4354
4355fi
4356done
4357
4358echo "$as_me:4358: checking for memmove" >&5
4359echo $ECHO_N "checking for memmove... $ECHO_C" >&6
4360if test "${ac_cv_func_memmove+set}" = set; then
4361  echo $ECHO_N "(cached) $ECHO_C" >&6
4362else
4363  cat >conftest.$ac_ext <<_ACEOF
4364#line 4364 "configure"
4365#include "confdefs.h"
4366/* System header to define __stub macros and hopefully few prototypes,
4367    which can conflict with char memmove (); below.  */
4368#include <assert.h>
4369/* Override any gcc2 internal prototype to avoid an error.  */
4370#ifdef __cplusplus
4371extern "C"
4372#endif
4373/* We use char because int might match the return type of a gcc2
4374   builtin and then its argument prototype would still apply.  */
4375char memmove ();
4376char (*f) ();
4377
4378int
4379main ()
4380{
4381/* The GNU C library defines this for functions which it implements
4382    to always fail with ENOSYS.  Some functions are actually named
4383    something starting with __ and the normal name is an alias.  */
4384#if defined (__stub_memmove) || defined (__stub___memmove)
4385choke me
4386#else
4387f = memmove;
4388#endif
4389
4390  ;
4391  return 0;
4392}
4393_ACEOF
4394rm -f conftest.$ac_objext conftest$ac_exeext
4395if { (eval echo "$as_me:4395: \"$ac_link\"") >&5
4396  (eval $ac_link) 2>&5
4397  ac_status=$?
4398  echo "$as_me:4398: \$? = $ac_status" >&5
4399  (exit $ac_status); } &&
4400         { ac_try='test -s conftest$ac_exeext'
4401  { (eval echo "$as_me:4401: \"$ac_try\"") >&5
4402  (eval $ac_try) 2>&5
4403  ac_status=$?
4404  echo "$as_me:4404: \$? = $ac_status" >&5
4405  (exit $ac_status); }; }; then
4406  ac_cv_func_memmove=yes
4407else
4408  echo "$as_me: failed program was:" >&5
4409cat conftest.$ac_ext >&5
4410ac_cv_func_memmove=no
4411fi
4412rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4413fi
4414echo "$as_me:4414: result: $ac_cv_func_memmove" >&5
4415echo "${ECHO_T}$ac_cv_func_memmove" >&6
4416if test $ac_cv_func_memmove = yes; then
4417  :
4418else
4419
4420echo "$as_me:4420: checking for bcopy" >&5
4421echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
4422if test "${ac_cv_func_bcopy+set}" = set; then
4423  echo $ECHO_N "(cached) $ECHO_C" >&6
4424else
4425  cat >conftest.$ac_ext <<_ACEOF
4426#line 4426 "configure"
4427#include "confdefs.h"
4428/* System header to define __stub macros and hopefully few prototypes,
4429    which can conflict with char bcopy (); below.  */
4430#include <assert.h>
4431/* Override any gcc2 internal prototype to avoid an error.  */
4432#ifdef __cplusplus
4433extern "C"
4434#endif
4435/* We use char because int might match the return type of a gcc2
4436   builtin and then its argument prototype would still apply.  */
4437char bcopy ();
4438char (*f) ();
4439
4440int
4441main ()
4442{
4443/* The GNU C library defines this for functions which it implements
4444    to always fail with ENOSYS.  Some functions are actually named
4445    something starting with __ and the normal name is an alias.  */
4446#if defined (__stub_bcopy) || defined (__stub___bcopy)
4447choke me
4448#else
4449f = bcopy;
4450#endif
4451
4452  ;
4453  return 0;
4454}
4455_ACEOF
4456rm -f conftest.$ac_objext conftest$ac_exeext
4457if { (eval echo "$as_me:4457: \"$ac_link\"") >&5
4458  (eval $ac_link) 2>&5
4459  ac_status=$?
4460  echo "$as_me:4460: \$? = $ac_status" >&5
4461  (exit $ac_status); } &&
4462         { ac_try='test -s conftest$ac_exeext'
4463  { (eval echo "$as_me:4463: \"$ac_try\"") >&5
4464  (eval $ac_try) 2>&5
4465  ac_status=$?
4466  echo "$as_me:4466: \$? = $ac_status" >&5
4467  (exit $ac_status); }; }; then
4468  ac_cv_func_bcopy=yes
4469else
4470  echo "$as_me: failed program was:" >&5
4471cat conftest.$ac_ext >&5
4472ac_cv_func_bcopy=no
4473fi
4474rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4475fi
4476echo "$as_me:4476: result: $ac_cv_func_bcopy" >&5
4477echo "${ECHO_T}$ac_cv_func_bcopy" >&6
4478if test $ac_cv_func_bcopy = yes; then
4479
4480	echo "$as_me:4480: checking if bcopy does overlapping moves" >&5
4481echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
4482if test "${cf_cv_good_bcopy+set}" = set; then
4483  echo $ECHO_N "(cached) $ECHO_C" >&6
4484else
4485
4486		if test "$cross_compiling" = yes; then
4487  cf_cv_good_bcopy=unknown
4488else
4489  cat >conftest.$ac_ext <<_ACEOF
4490#line 4490 "configure"
4491#include "confdefs.h"
4492
4493int main() {
4494	static char data[] = "abcdefghijklmnopqrstuwwxyz";
4495	char temp[40];
4496	bcopy(data, temp, sizeof(data));
4497	bcopy(temp+10, temp, 15);
4498	bcopy(temp+5, temp+15, 10);
4499	${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
4500}
4501
4502_ACEOF
4503rm -f conftest$ac_exeext
4504if { (eval echo "$as_me:4504: \"$ac_link\"") >&5
4505  (eval $ac_link) 2>&5
4506  ac_status=$?
4507  echo "$as_me:4507: \$? = $ac_status" >&5
4508  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
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_good_bcopy=yes
4515else
4516  echo "$as_me: program exited with status $ac_status" >&5
4517echo "$as_me: failed program was:" >&5
4518cat conftest.$ac_ext >&5
4519cf_cv_good_bcopy=no
4520fi
4521rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4522fi
4523
4524fi
4525echo "$as_me:4525: result: $cf_cv_good_bcopy" >&5
4526echo "${ECHO_T}$cf_cv_good_bcopy" >&6
4527
4528else
4529  cf_cv_good_bcopy=no
4530fi
4531
4532	if test "$cf_cv_good_bcopy" = yes ; then
4533		cat >>confdefs.h <<\EOF
4534#define USE_OK_BCOPY 1
4535EOF
4536
4537	else
4538		cat >>confdefs.h <<\EOF
4539#define USE_MY_MEMMOVE 1
4540EOF
4541
4542	fi
4543
4544fi
4545
4546for ac_header in lastlog.h paths.h
4547do
4548as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4549echo "$as_me:4549: checking for $ac_header" >&5
4550echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4551if eval "test \"\${$as_ac_Header+set}\" = set"; then
4552  echo $ECHO_N "(cached) $ECHO_C" >&6
4553else
4554  cat >conftest.$ac_ext <<_ACEOF
4555#line 4555 "configure"
4556#include "confdefs.h"
4557#include <$ac_header>
4558_ACEOF
4559if { (eval echo "$as_me:4559: \"$ac_cpp conftest.$ac_ext\"") >&5
4560  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4561  ac_status=$?
4562  egrep -v '^ *\+' conftest.er1 >conftest.err
4563  rm -f conftest.er1
4564  cat conftest.err >&5
4565  echo "$as_me:4565: \$? = $ac_status" >&5
4566  (exit $ac_status); } >/dev/null; then
4567  if test -s conftest.err; then
4568    ac_cpp_err=$ac_c_preproc_warn_flag
4569  else
4570    ac_cpp_err=
4571  fi
4572else
4573  ac_cpp_err=yes
4574fi
4575if test -z "$ac_cpp_err"; then
4576  eval "$as_ac_Header=yes"
4577else
4578  echo "$as_me: failed program was:" >&5
4579  cat conftest.$ac_ext >&5
4580  eval "$as_ac_Header=no"
4581fi
4582rm -f conftest.err conftest.$ac_ext
4583fi
4584echo "$as_me:4584: result: `eval echo '${'$as_ac_Header'}'`" >&5
4585echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4586if test `eval echo '${'$as_ac_Header'}'` = yes; then
4587  cat >>confdefs.h <<EOF
4588#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4589EOF
4590
4591fi
4592done
4593
4594echo "$as_me:4594: checking for lastlog path" >&5
4595echo $ECHO_N "checking for lastlog path... $ECHO_C" >&6
4596if test "${cf_cv_path_lastlog+set}" = set; then
4597  echo $ECHO_N "(cached) $ECHO_C" >&6
4598else
4599
4600cat >conftest.$ac_ext <<_ACEOF
4601#line 4601 "configure"
4602#include "confdefs.h"
4603
4604#include <sys/types.h>
4605#ifdef HAVE_LASTLOG_H
4606#include <lastlog.h>
4607#else
4608#ifdef HAVE_PATHS_H
4609#include <paths.h>
4610#endif
4611#endif
4612int
4613main ()
4614{
4615char *path = _PATH_LASTLOG
4616  ;
4617  return 0;
4618}
4619_ACEOF
4620rm -f conftest.$ac_objext
4621if { (eval echo "$as_me:4621: \"$ac_compile\"") >&5
4622  (eval $ac_compile) 2>&5
4623  ac_status=$?
4624  echo "$as_me:4624: \$? = $ac_status" >&5
4625  (exit $ac_status); } &&
4626         { ac_try='test -s conftest.$ac_objext'
4627  { (eval echo "$as_me:4627: \"$ac_try\"") >&5
4628  (eval $ac_try) 2>&5
4629  ac_status=$?
4630  echo "$as_me:4630: \$? = $ac_status" >&5
4631  (exit $ac_status); }; }; then
4632  cf_cv_path_lastlog="_PATH_LASTLOG"
4633else
4634  echo "$as_me: failed program was:" >&5
4635cat conftest.$ac_ext >&5
4636if test -f /usr/adm/lastlog ; then
4637	 	cf_cv_path_lastlog=/usr/adm/lastlog
4638	else
4639		cf_cv_path_lastlog=no
4640	fi
4641fi
4642rm -f conftest.$ac_objext conftest.$ac_ext
4643
4644fi
4645echo "$as_me:4645: result: $cf_cv_path_lastlog" >&5
4646echo "${ECHO_T}$cf_cv_path_lastlog" >&6
4647test $cf_cv_path_lastlog != no && cat >>confdefs.h <<\EOF
4648#define USE_LASTLOG 1
4649EOF
4650
4651echo "$as_me:4651: checking for utmp implementation" >&5
4652echo $ECHO_N "checking for utmp implementation... $ECHO_C" >&6
4653if test "${cf_cv_have_utmp+set}" = set; then
4654  echo $ECHO_N "(cached) $ECHO_C" >&6
4655else
4656
4657	cf_cv_have_utmp=no
4658for cf_header in utmpx utmp ; do
4659cf_utmp_includes="
4660#include <sys/types.h>
4661#include <${cf_header}.h>
4662#define getutent getutxent
4663#ifdef USE_LASTLOG
4664#include <lastlog.h>	/* may conflict with utmpx.h on Linux */
4665#endif
4666"
4667	cat >conftest.$ac_ext <<_ACEOF
4668#line 4668 "configure"
4669#include "confdefs.h"
4670$cf_utmp_includes
4671int
4672main ()
4673{
4674struct $cf_header x;
4675	 char *name = x.ut_name; /* utmp.h and compatible definitions */
4676
4677  ;
4678  return 0;
4679}
4680_ACEOF
4681rm -f conftest.$ac_objext
4682if { (eval echo "$as_me:4682: \"$ac_compile\"") >&5
4683  (eval $ac_compile) 2>&5
4684  ac_status=$?
4685  echo "$as_me:4685: \$? = $ac_status" >&5
4686  (exit $ac_status); } &&
4687         { ac_try='test -s conftest.$ac_objext'
4688  { (eval echo "$as_me:4688: \"$ac_try\"") >&5
4689  (eval $ac_try) 2>&5
4690  ac_status=$?
4691  echo "$as_me:4691: \$? = $ac_status" >&5
4692  (exit $ac_status); }; }; then
4693  cf_cv_have_utmp=$cf_header
4694	 break
4695else
4696  echo "$as_me: failed program was:" >&5
4697cat conftest.$ac_ext >&5
4698
4699	cat >conftest.$ac_ext <<_ACEOF
4700#line 4700 "configure"
4701#include "confdefs.h"
4702$cf_utmp_includes
4703int
4704main ()
4705{
4706struct $cf_header x;
4707	 char *name = x.ut_user; /* utmpx.h must declare this */
4708
4709  ;
4710  return 0;
4711}
4712_ACEOF
4713rm -f conftest.$ac_objext
4714if { (eval echo "$as_me:4714: \"$ac_compile\"") >&5
4715  (eval $ac_compile) 2>&5
4716  ac_status=$?
4717  echo "$as_me:4717: \$? = $ac_status" >&5
4718  (exit $ac_status); } &&
4719         { ac_try='test -s conftest.$ac_objext'
4720  { (eval echo "$as_me:4720: \"$ac_try\"") >&5
4721  (eval $ac_try) 2>&5
4722  ac_status=$?
4723  echo "$as_me:4723: \$? = $ac_status" >&5
4724  (exit $ac_status); }; }; then
4725  cf_cv_have_utmp=$cf_header
4726	 break
4727
4728else
4729  echo "$as_me: failed program was:" >&5
4730cat conftest.$ac_ext >&5
4731fi
4732rm -f conftest.$ac_objext conftest.$ac_ext
4733fi
4734rm -f conftest.$ac_objext conftest.$ac_ext
4735done
4736
4737fi
4738echo "$as_me:4738: result: $cf_cv_have_utmp" >&5
4739echo "${ECHO_T}$cf_cv_have_utmp" >&6
4740
4741if test $cf_cv_have_utmp != no ; then
4742	cat >>confdefs.h <<\EOF
4743#define HAVE_UTMP 1
4744EOF
4745
4746	test $cf_cv_have_utmp = utmpx && cat >>confdefs.h <<\EOF
4747#define UTMPX_FOR_UTMP 1
4748EOF
4749
4750if test $cf_cv_have_utmp != no ; then
4751echo "$as_me:4751: checking if ${cf_cv_have_utmp}.ut_host is declared" >&5
4752echo $ECHO_N "checking if ${cf_cv_have_utmp}.ut_host is declared... $ECHO_C" >&6
4753if test "${cf_cv_have_utmp_ut_host+set}" = set; then
4754  echo $ECHO_N "(cached) $ECHO_C" >&6
4755else
4756
4757	cat >conftest.$ac_ext <<_ACEOF
4758#line 4758 "configure"
4759#include "confdefs.h"
4760
4761#include <sys/types.h>
4762#include <${cf_cv_have_utmp}.h>
4763int
4764main ()
4765{
4766struct $cf_cv_have_utmp x; char *y = &x.ut_host[0]
4767  ;
4768  return 0;
4769}
4770_ACEOF
4771rm -f conftest.$ac_objext
4772if { (eval echo "$as_me:4772: \"$ac_compile\"") >&5
4773  (eval $ac_compile) 2>&5
4774  ac_status=$?
4775  echo "$as_me:4775: \$? = $ac_status" >&5
4776  (exit $ac_status); } &&
4777         { ac_try='test -s conftest.$ac_objext'
4778  { (eval echo "$as_me:4778: \"$ac_try\"") >&5
4779  (eval $ac_try) 2>&5
4780  ac_status=$?
4781  echo "$as_me:4781: \$? = $ac_status" >&5
4782  (exit $ac_status); }; }; then
4783  cf_cv_have_utmp_ut_host=yes
4784else
4785  echo "$as_me: failed program was:" >&5
4786cat conftest.$ac_ext >&5
4787cf_cv_have_utmp_ut_host=no
4788fi
4789rm -f conftest.$ac_objext conftest.$ac_ext
4790
4791fi
4792
4793echo "$as_me:4793: result: $cf_cv_have_utmp_ut_host" >&5
4794echo "${ECHO_T}$cf_cv_have_utmp_ut_host" >&6
4795test $cf_cv_have_utmp_ut_host != no && cat >>confdefs.h <<\EOF
4796#define HAVE_UTMP_UT_HOST 1
4797EOF
4798
4799fi
4800
4801if test $cf_cv_have_utmp != no ; then
4802echo "$as_me:4802: checking if ${cf_cv_have_utmp}.ut_syslen is declared" >&5
4803echo $ECHO_N "checking if ${cf_cv_have_utmp}.ut_syslen is declared... $ECHO_C" >&6
4804if test "${cf_cv_have_utmp_ut_syslen+set}" = set; then
4805  echo $ECHO_N "(cached) $ECHO_C" >&6
4806else
4807
4808	cat >conftest.$ac_ext <<_ACEOF
4809#line 4809 "configure"
4810#include "confdefs.h"
4811
4812#include <sys/types.h>
4813#include <${cf_cv_have_utmp}.h>
4814int
4815main ()
4816{
4817struct $cf_cv_have_utmp x; int y = x.ut_syslen
4818  ;
4819  return 0;
4820}
4821_ACEOF
4822rm -f conftest.$ac_objext
4823if { (eval echo "$as_me:4823: \"$ac_compile\"") >&5
4824  (eval $ac_compile) 2>&5
4825  ac_status=$?
4826  echo "$as_me:4826: \$? = $ac_status" >&5
4827  (exit $ac_status); } &&
4828         { ac_try='test -s conftest.$ac_objext'
4829  { (eval echo "$as_me:4829: \"$ac_try\"") >&5
4830  (eval $ac_try) 2>&5
4831  ac_status=$?
4832  echo "$as_me:4832: \$? = $ac_status" >&5
4833  (exit $ac_status); }; }; then
4834  cf_cv_have_utmp_ut_syslen=yes
4835else
4836  echo "$as_me: failed program was:" >&5
4837cat conftest.$ac_ext >&5
4838cf_cv_have_utmp_ut_syslen=no
4839fi
4840rm -f conftest.$ac_objext conftest.$ac_ext
4841
4842fi
4843
4844echo "$as_me:4844: result: $cf_cv_have_utmp_ut_syslen" >&5
4845echo "${ECHO_T}$cf_cv_have_utmp_ut_syslen" >&6
4846test $cf_cv_have_utmp_ut_syslen != no && cat >>confdefs.h <<\EOF
4847#define HAVE_UTMP_UT_SYSLEN 1
4848EOF
4849
4850fi
4851
4852if test $cf_cv_have_utmp != no ; then
4853echo "$as_me:4853: checking if ${cf_cv_have_utmp}.ut_name is declared" >&5
4854echo $ECHO_N "checking if ${cf_cv_have_utmp}.ut_name is declared... $ECHO_C" >&6
4855if test "${cf_cv_have_utmp_ut_name+set}" = set; then
4856  echo $ECHO_N "(cached) $ECHO_C" >&6
4857else
4858
4859	cf_cv_have_utmp_ut_name=no
4860cf_utmp_includes="
4861#include <sys/types.h>
4862#include <${cf_cv_have_utmp}.h>
4863#define getutent getutxent
4864#ifdef USE_LASTLOG
4865#include <lastlog.h>		/* may conflict with utmpx.h on Linux */
4866#endif
4867"
4868for cf_header in ut_name ut_user ; do
4869	cat >conftest.$ac_ext <<_ACEOF
4870#line 4870 "configure"
4871#include "confdefs.h"
4872$cf_utmp_includes
4873int
4874main ()
4875{
4876struct $cf_cv_have_utmp x;
4877	 char *name = x.$cf_header;
4878
4879  ;
4880  return 0;
4881}
4882_ACEOF
4883rm -f conftest.$ac_objext
4884if { (eval echo "$as_me:4884: \"$ac_compile\"") >&5
4885  (eval $ac_compile) 2>&5
4886  ac_status=$?
4887  echo "$as_me:4887: \$? = $ac_status" >&5
4888  (exit $ac_status); } &&
4889         { ac_try='test -s conftest.$ac_objext'
4890  { (eval echo "$as_me:4890: \"$ac_try\"") >&5
4891  (eval $ac_try) 2>&5
4892  ac_status=$?
4893  echo "$as_me:4893: \$? = $ac_status" >&5
4894  (exit $ac_status); }; }; then
4895  cf_cv_have_utmp_ut_name=$cf_header
4896	 break
4897else
4898  echo "$as_me: failed program was:" >&5
4899cat conftest.$ac_ext >&5
4900fi
4901rm -f conftest.$ac_objext conftest.$ac_ext
4902done
4903
4904fi
4905echo "$as_me:4905: result: $cf_cv_have_utmp_ut_name" >&5
4906echo "${ECHO_T}$cf_cv_have_utmp_ut_name" >&6
4907
4908case $cf_cv_have_utmp_ut_name in #(vi
4909no) #(vi
4910	{ { echo "$as_me:4910: error: Cannot find declaration for ut.ut_name" >&5
4911echo "$as_me: error: Cannot find declaration for ut.ut_name" >&2;}
4912   { (exit 1); exit 1; }; }
4913	;;
4914ut_user)
4915	cat >>confdefs.h <<\EOF
4916#define ut_name ut_user
4917EOF
4918
4919	;;
4920esac
4921fi
4922
4923if test $cf_cv_have_utmp != no ; then
4924echo "$as_me:4924: checking for exit-status in $cf_cv_have_utmp" >&5
4925echo $ECHO_N "checking for exit-status in $cf_cv_have_utmp... $ECHO_C" >&6
4926if test "${cf_cv_have_utmp_ut_xstatus+set}" = set; then
4927  echo $ECHO_N "(cached) $ECHO_C" >&6
4928else
4929
4930for cf_result in \
4931	ut_exit.__e_exit \
4932	ut_exit.e_exit \
4933	ut_exit.ut_e_exit \
4934	ut_exit.ut_exit
4935do
4936cat >conftest.$ac_ext <<_ACEOF
4937#line 4937 "configure"
4938#include "confdefs.h"
4939
4940#include <sys/types.h>
4941#include <${cf_cv_have_utmp}.h>
4942int
4943main ()
4944{
4945struct $cf_cv_have_utmp x; long y = x.$cf_result = 0
4946  ;
4947  return 0;
4948}
4949_ACEOF
4950rm -f conftest.$ac_objext
4951if { (eval echo "$as_me:4951: \"$ac_compile\"") >&5
4952  (eval $ac_compile) 2>&5
4953  ac_status=$?
4954  echo "$as_me:4954: \$? = $ac_status" >&5
4955  (exit $ac_status); } &&
4956         { ac_try='test -s conftest.$ac_objext'
4957  { (eval echo "$as_me:4957: \"$ac_try\"") >&5
4958  (eval $ac_try) 2>&5
4959  ac_status=$?
4960  echo "$as_me:4960: \$? = $ac_status" >&5
4961  (exit $ac_status); }; }; then
4962  cf_cv_have_utmp_ut_xstatus=$cf_result
4963	 break
4964else
4965  echo "$as_me: failed program was:" >&5
4966cat conftest.$ac_ext >&5
4967cf_cv_have_utmp_ut_xstatus=no
4968fi
4969rm -f conftest.$ac_objext conftest.$ac_ext
4970done
4971
4972fi
4973echo "$as_me:4973: result: $cf_cv_have_utmp_ut_xstatus" >&5
4974echo "${ECHO_T}$cf_cv_have_utmp_ut_xstatus" >&6
4975if test $cf_cv_have_utmp_ut_xstatus != no ; then
4976	cat >>confdefs.h <<\EOF
4977#define HAVE_UTMP_UT_XSTATUS 1
4978EOF
4979
4980	cat >>confdefs.h <<EOF
4981#define ut_xstatus $cf_cv_have_utmp_ut_xstatus
4982EOF
4983
4984fi
4985fi
4986
4987if test $cf_cv_have_utmp != no ; then
4988echo "$as_me:4988: checking if ${cf_cv_have_utmp}.ut_xtime is declared" >&5
4989echo $ECHO_N "checking if ${cf_cv_have_utmp}.ut_xtime is declared... $ECHO_C" >&6
4990if test "${cf_cv_have_utmp_ut_xtime+set}" = set; then
4991  echo $ECHO_N "(cached) $ECHO_C" >&6
4992else
4993
4994	cat >conftest.$ac_ext <<_ACEOF
4995#line 4995 "configure"
4996#include "confdefs.h"
4997
4998#include <sys/types.h>
4999#include <${cf_cv_have_utmp}.h>
5000int
5001main ()
5002{
5003struct $cf_cv_have_utmp x; long y = x.ut_xtime = 0
5004  ;
5005  return 0;
5006}
5007_ACEOF
5008rm -f conftest.$ac_objext
5009if { (eval echo "$as_me:5009: \"$ac_compile\"") >&5
5010  (eval $ac_compile) 2>&5
5011  ac_status=$?
5012  echo "$as_me:5012: \$? = $ac_status" >&5
5013  (exit $ac_status); } &&
5014         { ac_try='test -s conftest.$ac_objext'
5015  { (eval echo "$as_me:5015: \"$ac_try\"") >&5
5016  (eval $ac_try) 2>&5
5017  ac_status=$?
5018  echo "$as_me:5018: \$? = $ac_status" >&5
5019  (exit $ac_status); }; }; then
5020  cf_cv_have_utmp_ut_xtime=yes
5021else
5022  echo "$as_me: failed program was:" >&5
5023cat conftest.$ac_ext >&5
5024cat >conftest.$ac_ext <<_ACEOF
5025#line 5025 "configure"
5026#include "confdefs.h"
5027
5028#include <sys/types.h>
5029#include <${cf_cv_have_utmp}.h>
5030int
5031main ()
5032{
5033struct $cf_cv_have_utmp x; long y = x.ut_tv.tv_sec
5034  ;
5035  return 0;
5036}
5037_ACEOF
5038rm -f conftest.$ac_objext
5039if { (eval echo "$as_me:5039: \"$ac_compile\"") >&5
5040  (eval $ac_compile) 2>&5
5041  ac_status=$?
5042  echo "$as_me:5042: \$? = $ac_status" >&5
5043  (exit $ac_status); } &&
5044         { ac_try='test -s conftest.$ac_objext'
5045  { (eval echo "$as_me:5045: \"$ac_try\"") >&5
5046  (eval $ac_try) 2>&5
5047  ac_status=$?
5048  echo "$as_me:5048: \$? = $ac_status" >&5
5049  (exit $ac_status); }; }; then
5050  cf_cv_have_utmp_ut_xtime=define
5051else
5052  echo "$as_me: failed program was:" >&5
5053cat conftest.$ac_ext >&5
5054cf_cv_have_utmp_ut_xtime=no
5055fi
5056rm -f conftest.$ac_objext conftest.$ac_ext
5057
5058fi
5059rm -f conftest.$ac_objext conftest.$ac_ext
5060
5061fi
5062echo "$as_me:5062: result: $cf_cv_have_utmp_ut_xtime" >&5
5063echo "${ECHO_T}$cf_cv_have_utmp_ut_xtime" >&6
5064if test $cf_cv_have_utmp_ut_xtime != no ; then
5065	cat >>confdefs.h <<\EOF
5066#define HAVE_UTMP_UT_XTIME 1
5067EOF
5068
5069	if test $cf_cv_have_utmp_ut_xtime = define ; then
5070		cat >>confdefs.h <<\EOF
5071#define ut_xtime ut_tv.tv_sec
5072EOF
5073
5074	fi
5075fi
5076fi
5077
5078if test $cf_cv_have_utmp != no ; then
5079echo "$as_me:5079: checking if ${cf_cv_have_utmp}.ut_session is declared" >&5
5080echo $ECHO_N "checking if ${cf_cv_have_utmp}.ut_session is declared... $ECHO_C" >&6
5081if test "${cf_cv_have_utmp_ut_session+set}" = set; then
5082  echo $ECHO_N "(cached) $ECHO_C" >&6
5083else
5084
5085	cat >conftest.$ac_ext <<_ACEOF
5086#line 5086 "configure"
5087#include "confdefs.h"
5088
5089#include <sys/types.h>
5090#include <${cf_cv_have_utmp}.h>
5091int
5092main ()
5093{
5094struct $cf_cv_have_utmp x; long y = x.ut_session
5095  ;
5096  return 0;
5097}
5098_ACEOF
5099rm -f conftest.$ac_objext
5100if { (eval echo "$as_me:5100: \"$ac_compile\"") >&5
5101  (eval $ac_compile) 2>&5
5102  ac_status=$?
5103  echo "$as_me:5103: \$? = $ac_status" >&5
5104  (exit $ac_status); } &&
5105         { ac_try='test -s conftest.$ac_objext'
5106  { (eval echo "$as_me:5106: \"$ac_try\"") >&5
5107  (eval $ac_try) 2>&5
5108  ac_status=$?
5109  echo "$as_me:5109: \$? = $ac_status" >&5
5110  (exit $ac_status); }; }; then
5111  cf_cv_have_utmp_ut_session=yes
5112else
5113  echo "$as_me: failed program was:" >&5
5114cat conftest.$ac_ext >&5
5115cf_cv_have_utmp_ut_session=no
5116fi
5117rm -f conftest.$ac_objext conftest.$ac_ext
5118
5119fi
5120echo "$as_me:5120: result: $cf_cv_have_utmp_ut_session" >&5
5121echo "${ECHO_T}$cf_cv_have_utmp_ut_session" >&6
5122if test $cf_cv_have_utmp_ut_session != no ; then
5123	cat >>confdefs.h <<\EOF
5124#define HAVE_UTMP_UT_SESSION 1
5125EOF
5126
5127fi
5128fi
5129
5130echo "$as_me:5130: checking if $cf_cv_have_utmp is SYSV flavor" >&5
5131echo $ECHO_N "checking if $cf_cv_have_utmp is SYSV flavor... $ECHO_C" >&6
5132if test "${cf_cv_sysv_utmp+set}" = set; then
5133  echo $ECHO_N "(cached) $ECHO_C" >&6
5134else
5135
5136test "$cf_cv_have_utmp" = "utmp" && cf_prefix="ut" || cf_prefix="utx"
5137cat >conftest.$ac_ext <<_ACEOF
5138#line 5138 "configure"
5139#include "confdefs.h"
5140
5141#include <sys/types.h>
5142#include <${cf_cv_have_utmp}.h>
5143int
5144main ()
5145{
5146
5147struct $cf_cv_have_utmp x;
5148	set${cf_prefix}ent ();
5149	get${cf_prefix}id(&x);
5150	put${cf_prefix}line(&x);
5151	end${cf_prefix}ent();
5152  ;
5153  return 0;
5154}
5155_ACEOF
5156rm -f conftest.$ac_objext conftest$ac_exeext
5157if { (eval echo "$as_me:5157: \"$ac_link\"") >&5
5158  (eval $ac_link) 2>&5
5159  ac_status=$?
5160  echo "$as_me:5160: \$? = $ac_status" >&5
5161  (exit $ac_status); } &&
5162         { ac_try='test -s conftest$ac_exeext'
5163  { (eval echo "$as_me:5163: \"$ac_try\"") >&5
5164  (eval $ac_try) 2>&5
5165  ac_status=$?
5166  echo "$as_me:5166: \$? = $ac_status" >&5
5167  (exit $ac_status); }; }; then
5168  cf_cv_sysv_utmp=yes
5169else
5170  echo "$as_me: failed program was:" >&5
5171cat conftest.$ac_ext >&5
5172cf_cv_sysv_utmp=no
5173fi
5174rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5175
5176fi
5177echo "$as_me:5177: result: $cf_cv_sysv_utmp" >&5
5178echo "${ECHO_T}$cf_cv_sysv_utmp" >&6
5179test $cf_cv_sysv_utmp = yes && cat >>confdefs.h <<\EOF
5180#define USE_SYSV_UTMP 1
5181EOF
5182
5183fi
5184
5185for ac_header in lastlog.h
5186do
5187as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5188echo "$as_me:5188: checking for $ac_header" >&5
5189echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5190if eval "test \"\${$as_ac_Header+set}\" = set"; then
5191  echo $ECHO_N "(cached) $ECHO_C" >&6
5192else
5193  cat >conftest.$ac_ext <<_ACEOF
5194#line 5194 "configure"
5195#include "confdefs.h"
5196#include <$ac_header>
5197_ACEOF
5198if { (eval echo "$as_me:5198: \"$ac_cpp conftest.$ac_ext\"") >&5
5199  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5200  ac_status=$?
5201  egrep -v '^ *\+' conftest.er1 >conftest.err
5202  rm -f conftest.er1
5203  cat conftest.err >&5
5204  echo "$as_me:5204: \$? = $ac_status" >&5
5205  (exit $ac_status); } >/dev/null; then
5206  if test -s conftest.err; then
5207    ac_cpp_err=$ac_c_preproc_warn_flag
5208  else
5209    ac_cpp_err=
5210  fi
5211else
5212  ac_cpp_err=yes
5213fi
5214if test -z "$ac_cpp_err"; then
5215  eval "$as_ac_Header=yes"
5216else
5217  echo "$as_me: failed program was:" >&5
5218  cat conftest.$ac_ext >&5
5219  eval "$as_ac_Header=no"
5220fi
5221rm -f conftest.err conftest.$ac_ext
5222fi
5223echo "$as_me:5223: result: `eval echo '${'$as_ac_Header'}'`" >&5
5224echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5225if test `eval echo '${'$as_ac_Header'}'` = yes; then
5226  cat >>confdefs.h <<EOF
5227#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5228EOF
5229
5230fi
5231done
5232
5233echo "$as_me:5233: checking for struct lastlog" >&5
5234echo $ECHO_N "checking for struct lastlog... $ECHO_C" >&6
5235if test "${cf_cv_struct_lastlog+set}" = set; then
5236  echo $ECHO_N "(cached) $ECHO_C" >&6
5237else
5238
5239if test "$cross_compiling" = yes; then
5240
5241cf_cv_struct_lastlog=unknown
5242else
5243  cat >conftest.$ac_ext <<_ACEOF
5244#line 5244 "configure"
5245#include "confdefs.h"
5246
5247#include <sys/types.h>
5248#include <time.h>
5249#include <lastlog.h>
5250
5251int main()
5252{
5253	struct lastlog data;
5254	return (sizeof(data.ll_time) != sizeof(time_t));
5255}
5256_ACEOF
5257rm -f conftest$ac_exeext
5258if { (eval echo "$as_me:5258: \"$ac_link\"") >&5
5259  (eval $ac_link) 2>&5
5260  ac_status=$?
5261  echo "$as_me:5261: \$? = $ac_status" >&5
5262  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5263  { (eval echo "$as_me:5263: \"$ac_try\"") >&5
5264  (eval $ac_try) 2>&5
5265  ac_status=$?
5266  echo "$as_me:5266: \$? = $ac_status" >&5
5267  (exit $ac_status); }; }; then
5268
5269cf_cv_struct_lastlog=yes
5270else
5271  echo "$as_me: program exited with status $ac_status" >&5
5272echo "$as_me: failed program was:" >&5
5273cat conftest.$ac_ext >&5
5274
5275cf_cv_struct_lastlog=no
5276fi
5277rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5278fi
5279fi
5280echo "$as_me:5280: result: $cf_cv_struct_lastlog" >&5
5281echo "${ECHO_T}$cf_cv_struct_lastlog" >&6
5282
5283test $cf_cv_struct_lastlog != no && cat >>confdefs.h <<\EOF
5284#define USE_STRUCT_LASTLOG 1
5285EOF
5286
5287for ac_header in \
5288sys/param.h \
5289
5290do
5291as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5292echo "$as_me:5292: checking for $ac_header" >&5
5293echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5294if eval "test \"\${$as_ac_Header+set}\" = set"; then
5295  echo $ECHO_N "(cached) $ECHO_C" >&6
5296else
5297  cat >conftest.$ac_ext <<_ACEOF
5298#line 5298 "configure"
5299#include "confdefs.h"
5300#include <$ac_header>
5301_ACEOF
5302if { (eval echo "$as_me:5302: \"$ac_cpp conftest.$ac_ext\"") >&5
5303  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5304  ac_status=$?
5305  egrep -v '^ *\+' conftest.er1 >conftest.err
5306  rm -f conftest.er1
5307  cat conftest.err >&5
5308  echo "$as_me:5308: \$? = $ac_status" >&5
5309  (exit $ac_status); } >/dev/null; then
5310  if test -s conftest.err; then
5311    ac_cpp_err=$ac_c_preproc_warn_flag
5312  else
5313    ac_cpp_err=
5314  fi
5315else
5316  ac_cpp_err=yes
5317fi
5318if test -z "$ac_cpp_err"; then
5319  eval "$as_ac_Header=yes"
5320else
5321  echo "$as_me: failed program was:" >&5
5322  cat conftest.$ac_ext >&5
5323  eval "$as_ac_Header=no"
5324fi
5325rm -f conftest.err conftest.$ac_ext
5326fi
5327echo "$as_me:5327: result: `eval echo '${'$as_ac_Header'}'`" >&5
5328echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5329if test `eval echo '${'$as_ac_Header'}'` = yes; then
5330  cat >>confdefs.h <<EOF
5331#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5332EOF
5333
5334fi
5335done
5336
5337echo "$as_me:5337: checking if POSIX saved-ids are supported" >&5
5338echo $ECHO_N "checking if POSIX saved-ids are supported... $ECHO_C" >&6
5339if test "${cf_cv_posix_saved_ids+set}" = set; then
5340  echo $ECHO_N "(cached) $ECHO_C" >&6
5341else
5342
5343cat >conftest.$ac_ext <<_ACEOF
5344#line 5344 "configure"
5345#include "confdefs.h"
5346
5347#include <unistd.h>
5348#ifdef HAVE_SYS_PARAM_H
5349#include <sys/param.h>		/* this may define "BSD" */
5350#endif
5351
5352int
5353main ()
5354{
5355
5356#if defined(_POSIX_SAVED_IDS) && (_POSIX_SAVED_IDS > 0)
5357	void *p = (void *) seteuid;
5358	int x = seteuid(geteuid());
5359#elif defined(BSD) && (BSD >= 199103)
5360/* The BSD's may implement the runtime check - and it fails.
5361 * However, saved-ids work almost like POSIX (close enough for most uses).
5362 */
5363#else
5364make an error
5365#endif
5366
5367  ;
5368  return 0;
5369}
5370_ACEOF
5371rm -f conftest.$ac_objext conftest$ac_exeext
5372if { (eval echo "$as_me:5372: \"$ac_link\"") >&5
5373  (eval $ac_link) 2>&5
5374  ac_status=$?
5375  echo "$as_me:5375: \$? = $ac_status" >&5
5376  (exit $ac_status); } &&
5377         { ac_try='test -s conftest$ac_exeext'
5378  { (eval echo "$as_me:5378: \"$ac_try\"") >&5
5379  (eval $ac_try) 2>&5
5380  ac_status=$?
5381  echo "$as_me:5381: \$? = $ac_status" >&5
5382  (exit $ac_status); }; }; then
5383  cf_cv_posix_saved_ids=yes
5384
5385else
5386  echo "$as_me: failed program was:" >&5
5387cat conftest.$ac_ext >&5
5388
5389if test "$cross_compiling" = yes; then
5390  cf_cv_posix_saved_ids=unknown
5391else
5392  cat >conftest.$ac_ext <<_ACEOF
5393#line 5393 "configure"
5394#include "confdefs.h"
5395
5396#ifdef HAVE_STDLIB_H
5397#include <stdlib.h>
5398#endif
5399#include <unistd.h>
5400int main()
5401{
5402	void *p = (void *) seteuid;
5403	long code = sysconf(_SC_SAVED_IDS);
5404	${cf_cv_main_return:-return}  ((code > 0) ? 0 : 1);
5405}
5406_ACEOF
5407rm -f conftest$ac_exeext
5408if { (eval echo "$as_me:5408: \"$ac_link\"") >&5
5409  (eval $ac_link) 2>&5
5410  ac_status=$?
5411  echo "$as_me:5411: \$? = $ac_status" >&5
5412  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5413  { (eval echo "$as_me:5413: \"$ac_try\"") >&5
5414  (eval $ac_try) 2>&5
5415  ac_status=$?
5416  echo "$as_me:5416: \$? = $ac_status" >&5
5417  (exit $ac_status); }; }; then
5418  cf_cv_posix_saved_ids=yes
5419else
5420  echo "$as_me: program exited with status $ac_status" >&5
5421echo "$as_me: failed program was:" >&5
5422cat conftest.$ac_ext >&5
5423cf_cv_posix_saved_ids=no
5424fi
5425rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5426fi
5427
5428fi
5429rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5430
5431fi
5432echo "$as_me:5432: result: $cf_cv_posix_saved_ids" >&5
5433echo "${ECHO_T}$cf_cv_posix_saved_ids" >&6
5434
5435test "$cf_cv_posix_saved_ids" = yes && cat >>confdefs.h <<\EOF
5436#define HAVE_POSIX_SAVED_IDS 1
5437EOF
5438
5439# compute a reasonable value for $TERM to give tgetent(), since we may be
5440# running in 'screen', which sets $TERMCAP to a specific entry that is not
5441# necessarily in /etc/termcap - unsetenv is not portable, so we cannot simply
5442# discard $TERMCAP.
5443cf_TERMVAR=vt100
5444test -n "$TERMCAP" && cf_TERMVAR="$TERM"
5445test -z "$cf_TERMVAR" && cf_TERMVAR=vt100
5446
5447echo "$as_me:5447: checking if we want full tgetent function" >&5
5448echo $ECHO_N "checking if we want full tgetent function... $ECHO_C" >&6
5449
5450# Check whether --enable-full-tgetent or --disable-full-tgetent was given.
5451if test "${enable_full_tgetent+set}" = set; then
5452  enableval="$enable_full_tgetent"
5453  test "$enableval" != no && enableval=yes
5454  if test "$enableval" != "yes" ; then
5455    cf_full_tgetent=no
5456  else
5457    cf_full_tgetent=yes
5458  fi
5459else
5460  enableval=yes
5461  cf_full_tgetent=yes
5462
5463fi;
5464echo "$as_me:5464: result: $cf_full_tgetent" >&5
5465echo "${ECHO_T}$cf_full_tgetent" >&6
5466
5467if test "$cf_full_tgetent" = yes ; then
5468	cf_test_message="full tgetent"
5469else
5470	cf_test_message="tgetent"
5471fi
5472
5473echo "$as_me:5473: checking for $cf_test_message function" >&5
5474echo $ECHO_N "checking for $cf_test_message function... $ECHO_C" >&6
5475if test "${cf_cv_lib_tgetent+set}" = set; then
5476  echo $ECHO_N "(cached) $ECHO_C" >&6
5477else
5478
5479cf_save_LIBS="$LIBS"
5480cf_cv_lib_tgetent=no
5481if test "$cf_full_tgetent" = yes ; then
5482	cf_TERMLIB="termcap termlib ncurses curses"
5483	cf_TERMTST="buffer[0] == 0"
5484else
5485	cf_TERMLIB="termlib ncurses curses"
5486	cf_TERMTST="0"
5487fi
5488for cf_termlib in '' $cf_TERMLIB ; do
5489	LIBS="$cf_save_LIBS"
5490	test -n "$cf_termlib" && LIBS="-l$cf_termlib $LIBS"
5491	if test "$cross_compiling" = yes; then
5492  echo "cross-compiling, cannot verify if a termcap/tgetent is present in $cf_termlib" 1>&5
5493else
5494  cat >conftest.$ac_ext <<_ACEOF
5495#line 5495 "configure"
5496#include "confdefs.h"
5497
5498/* terminfo implementations ignore the buffer argument, making it useless for
5499 * the xterm application, which uses this information to make a new TERMCAP
5500 * environment variable.
5501 */
5502int main()
5503{
5504	char buffer[1024];
5505	buffer[0] = 0;
5506	tgetent(buffer, "$cf_TERMVAR");
5507	${cf_cv_main_return:-return} ($cf_TERMTST); }
5508_ACEOF
5509rm -f conftest$ac_exeext
5510if { (eval echo "$as_me:5510: \"$ac_link\"") >&5
5511  (eval $ac_link) 2>&5
5512  ac_status=$?
5513  echo "$as_me:5513: \$? = $ac_status" >&5
5514  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5515  { (eval echo "$as_me:5515: \"$ac_try\"") >&5
5516  (eval $ac_try) 2>&5
5517  ac_status=$?
5518  echo "$as_me:5518: \$? = $ac_status" >&5
5519  (exit $ac_status); }; }; then
5520  echo "yes, there is a termcap/tgetent in $cf_termlib" 1>&5
5521	 if test -n "$cf_termlib" ; then
5522	 	cf_cv_lib_tgetent="-l$cf_termlib"
5523	 else
5524	 	cf_cv_lib_tgetent=yes
5525	 fi
5526	 break
5527else
5528  echo "$as_me: program exited with status $ac_status" >&5
5529echo "$as_me: failed program was:" >&5
5530cat conftest.$ac_ext >&5
5531echo "no, there is no termcap/tgetent in $cf_termlib" 1>&5
5532fi
5533rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5534fi
5535done
5536LIBS="$cf_save_LIBS"
5537
5538fi
5539echo "$as_me:5539: result: $cf_cv_lib_tgetent" >&5
5540echo "${ECHO_T}$cf_cv_lib_tgetent" >&6
5541
5542# If we found a working tgetent(), set LIBS and check for termcap.h.
5543# (LIBS cannot be set inside AC_CACHE_CHECK; the commands there should
5544# not have side effects other than setting the cache variable, because
5545# they are not executed when a cached value exists.)
5546if test "$cf_cv_lib_tgetent" != no ; then
5547	test "$cf_cv_lib_tgetent" != yes && LIBS="$cf_cv_lib_tgetent $LIBS"
5548	cat >>confdefs.h <<\EOF
5549#define USE_TERMCAP 1
5550EOF
5551
5552	if test "$cf_full_tgetent" = no ; then
5553		cat >conftest.$ac_ext <<_ACEOF
5554#line 5554 "configure"
5555#include "confdefs.h"
5556
5557#include <termcap.h>
5558int
5559main ()
5560{
5561
5562#ifdef NCURSES_VERSION
5563make an error
5564#endif
5565  ;
5566  return 0;
5567}
5568_ACEOF
5569rm -f conftest.$ac_objext
5570if { (eval echo "$as_me:5570: \"$ac_compile\"") >&5
5571  (eval $ac_compile) 2>&5
5572  ac_status=$?
5573  echo "$as_me:5573: \$? = $ac_status" >&5
5574  (exit $ac_status); } &&
5575         { ac_try='test -s conftest.$ac_objext'
5576  { (eval echo "$as_me:5576: \"$ac_try\"") >&5
5577  (eval $ac_try) 2>&5
5578  ac_status=$?
5579  echo "$as_me:5579: \$? = $ac_status" >&5
5580  (exit $ac_status); }; }; then
5581  cat >>confdefs.h <<\EOF
5582#define HAVE_TERMCAP_H 1
5583EOF
5584
5585else
5586  echo "$as_me: failed program was:" >&5
5587cat conftest.$ac_ext >&5
5588fi
5589rm -f conftest.$ac_objext conftest.$ac_ext
5590	else
5591
5592for ac_header in termcap.h
5593do
5594as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5595echo "$as_me:5595: checking for $ac_header" >&5
5596echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5597if eval "test \"\${$as_ac_Header+set}\" = set"; then
5598  echo $ECHO_N "(cached) $ECHO_C" >&6
5599else
5600  cat >conftest.$ac_ext <<_ACEOF
5601#line 5601 "configure"
5602#include "confdefs.h"
5603#include <$ac_header>
5604_ACEOF
5605if { (eval echo "$as_me:5605: \"$ac_cpp conftest.$ac_ext\"") >&5
5606  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5607  ac_status=$?
5608  egrep -v '^ *\+' conftest.er1 >conftest.err
5609  rm -f conftest.er1
5610  cat conftest.err >&5
5611  echo "$as_me:5611: \$? = $ac_status" >&5
5612  (exit $ac_status); } >/dev/null; then
5613  if test -s conftest.err; then
5614    ac_cpp_err=$ac_c_preproc_warn_flag
5615  else
5616    ac_cpp_err=
5617  fi
5618else
5619  ac_cpp_err=yes
5620fi
5621if test -z "$ac_cpp_err"; then
5622  eval "$as_ac_Header=yes"
5623else
5624  echo "$as_me: failed program was:" >&5
5625  cat conftest.$ac_ext >&5
5626  eval "$as_ac_Header=no"
5627fi
5628rm -f conftest.err conftest.$ac_ext
5629fi
5630echo "$as_me:5630: result: `eval echo '${'$as_ac_Header'}'`" >&5
5631echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5632if test `eval echo '${'$as_ac_Header'}'` = yes; then
5633  cat >>confdefs.h <<EOF
5634#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5635EOF
5636
5637fi
5638done
5639
5640	fi
5641else
5642        # If we didn't find a tgetent() that supports the buffer
5643        # argument, look again to see whether we can find even
5644        # a crippled one.  A crippled tgetent() is still useful to
5645        # validate values for the TERM environment variable given to
5646        # child processes.
5647	echo "$as_me:5647: checking for partial tgetent function" >&5
5648echo $ECHO_N "checking for partial tgetent function... $ECHO_C" >&6
5649if test "${cf_cv_lib_part_tgetent+set}" = set; then
5650  echo $ECHO_N "(cached) $ECHO_C" >&6
5651else
5652
5653	cf_cv_lib_part_tgetent=no
5654	for cf_termlib in $cf_TERMLIB ; do
5655		LIBS="$cf_save_LIBS -l$cf_termlib"
5656		cat >conftest.$ac_ext <<_ACEOF
5657#line 5657 "configure"
5658#include "confdefs.h"
5659
5660int
5661main ()
5662{
5663tgetent(0, "$cf_TERMVAR")
5664  ;
5665  return 0;
5666}
5667_ACEOF
5668rm -f conftest.$ac_objext conftest$ac_exeext
5669if { (eval echo "$as_me:5669: \"$ac_link\"") >&5
5670  (eval $ac_link) 2>&5
5671  ac_status=$?
5672  echo "$as_me:5672: \$? = $ac_status" >&5
5673  (exit $ac_status); } &&
5674         { ac_try='test -s conftest$ac_exeext'
5675  { (eval echo "$as_me:5675: \"$ac_try\"") >&5
5676  (eval $ac_try) 2>&5
5677  ac_status=$?
5678  echo "$as_me:5678: \$? = $ac_status" >&5
5679  (exit $ac_status); }; }; then
5680  echo "there is a terminfo/tgetent in $cf_termlib" 1>&5
5681			 cf_cv_lib_part_tgetent="-l$cf_termlib"
5682			 break
5683else
5684  echo "$as_me: failed program was:" >&5
5685cat conftest.$ac_ext >&5
5686fi
5687rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5688	done
5689	LIBS="$cf_save_LIBS"
5690
5691fi
5692echo "$as_me:5692: result: $cf_cv_lib_part_tgetent" >&5
5693echo "${ECHO_T}$cf_cv_lib_part_tgetent" >&6
5694
5695	if test "$cf_cv_lib_part_tgetent" != no ; then
5696		LIBS="$cf_cv_lib_part_tgetent $LIBS"
5697
5698for ac_header in termcap.h
5699do
5700as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5701echo "$as_me:5701: checking for $ac_header" >&5
5702echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5703if eval "test \"\${$as_ac_Header+set}\" = set"; then
5704  echo $ECHO_N "(cached) $ECHO_C" >&6
5705else
5706  cat >conftest.$ac_ext <<_ACEOF
5707#line 5707 "configure"
5708#include "confdefs.h"
5709#include <$ac_header>
5710_ACEOF
5711if { (eval echo "$as_me:5711: \"$ac_cpp conftest.$ac_ext\"") >&5
5712  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5713  ac_status=$?
5714  egrep -v '^ *\+' conftest.er1 >conftest.err
5715  rm -f conftest.er1
5716  cat conftest.err >&5
5717  echo "$as_me:5717: \$? = $ac_status" >&5
5718  (exit $ac_status); } >/dev/null; then
5719  if test -s conftest.err; then
5720    ac_cpp_err=$ac_c_preproc_warn_flag
5721  else
5722    ac_cpp_err=
5723  fi
5724else
5725  ac_cpp_err=yes
5726fi
5727if test -z "$ac_cpp_err"; then
5728  eval "$as_ac_Header=yes"
5729else
5730  echo "$as_me: failed program was:" >&5
5731  cat conftest.$ac_ext >&5
5732  eval "$as_ac_Header=no"
5733fi
5734rm -f conftest.err conftest.$ac_ext
5735fi
5736echo "$as_me:5736: result: `eval echo '${'$as_ac_Header'}'`" >&5
5737echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5738if test `eval echo '${'$as_ac_Header'}'` = yes; then
5739  cat >>confdefs.h <<EOF
5740#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5741EOF
5742
5743fi
5744done
5745
5746                # If this is linking against ncurses, we'll trigger the
5747                # ifdef in resize.c that turns the termcap stuff back off.
5748		cat >>confdefs.h <<\EOF
5749#define USE_TERMINFO 1
5750EOF
5751
5752	fi
5753fi
5754
5755echo "$as_me:5755: checking for directory to install resource files" >&5
5756echo $ECHO_N "checking for directory to install resource files... $ECHO_C" >&6
5757
5758# Check whether --with-app-defaults or --without-app-defaults was given.
5759if test "${with_app_defaults+set}" = set; then
5760  withval="$with_app_defaults"
5761
5762else
5763  withval="${appsdir:-'\$(exec_prefix)/lib/X11/app-defaults'}"
5764fi; if test -n "'\$(exec_prefix)/lib/X11/app-defaults'" ; then
5765
5766if test "x$prefix" != xNONE; then
5767  cf_path_syntax="$prefix"
5768else
5769  cf_path_syntax="$ac_default_prefix"
5770fi
5771
5772case ".$withval" in #(vi
5773.\$\(*\)*|.\'*\'*) #(vi
5774  ;;
5775..|./*|.\\*) #(vi
5776  ;;
5777.[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
5778  ;;
5779.\${*prefix}*) #(vi
5780  eval withval="$withval"
5781  case ".$withval" in #(vi
5782  .NONE/*)
5783    withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
5784    ;;
5785  esac
5786  ;; #(vi
5787.no|.NONE/*)
5788  withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
5789  ;;
5790*)
5791  { { echo "$as_me:5791: error: expected a pathname, not \"$withval\"" >&5
5792echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
5793   { (exit 1); exit 1; }; }
5794  ;;
5795esac
5796
5797fi
5798appsdir="$withval"
5799
5800echo "$as_me:5800: result: $appsdir" >&5
5801echo "${ECHO_T}$appsdir" >&6
5802
5803no_appsdir=
5804test "$appsdir" = no && no_appsdir="#"
5805
5806echo "$as_me:5806: checking for directory to install icons" >&5
5807echo $ECHO_N "checking for directory to install icons... $ECHO_C" >&6
5808
5809# Check whether --with-icondir or --without-icondir was given.
5810if test "${with_icondir+set}" = set; then
5811  withval="$with_icondir"
5812
5813else
5814  withval="${icondir:-'\$(exec_prefix)/share/pixmaps'}"
5815fi; if test -n "'\$(exec_prefix)/share/pixmaps'" ; then
5816
5817if test "x$prefix" != xNONE; then
5818  cf_path_syntax="$prefix"
5819else
5820  cf_path_syntax="$ac_default_prefix"
5821fi
5822
5823case ".$withval" in #(vi
5824.\$\(*\)*|.\'*\'*) #(vi
5825  ;;
5826..|./*|.\\*) #(vi
5827  ;;
5828.[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
5829  ;;
5830.\${*prefix}*) #(vi
5831  eval withval="$withval"
5832  case ".$withval" in #(vi
5833  .NONE/*)
5834    withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
5835    ;;
5836  esac
5837  ;; #(vi
5838.no|.NONE/*)
5839  withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
5840  ;;
5841*)
5842  { { echo "$as_me:5842: error: expected a pathname, not \"$withval\"" >&5
5843echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
5844   { (exit 1); exit 1; }; }
5845  ;;
5846esac
5847
5848fi
5849icondir="$withval"
5850
5851echo "$as_me:5851: result: $icondir" >&5
5852echo "${ECHO_T}$icondir" >&6
5853
5854no_icondir=
5855test "$icondir" = no && no_icondir="#"
5856
5857# Comment-out the install-desktop rule if the desktop-utils are not found.
5858echo "$as_me:5858: checking if you want to install desktop files" >&5
5859echo $ECHO_N "checking if you want to install desktop files... $ECHO_C" >&6
5860
5861# Check whether --enable-desktop or --disable-desktop was given.
5862if test "${enable_desktop+set}" = set; then
5863  enableval="$enable_desktop"
5864  test "$enableval" != no && enableval=yes
5865  if test "$enableval" != "yes" ; then
5866    enable_desktop=$enableval
5867  else
5868    enable_desktop=$enableval
5869  fi
5870else
5871  enableval=yes
5872  enable_desktop=$enableval
5873
5874fi;
5875echo "$as_me:5875: result: $enable_desktop" >&5
5876echo "${ECHO_T}$enable_desktop" >&6
5877
5878desktop_utils=
5879if test "$enable_desktop" = yes ; then
5880# Extract the first word of "desktop-file-install", so it can be a program name with args.
5881set dummy desktop-file-install; ac_word=$2
5882echo "$as_me:5882: checking for $ac_word" >&5
5883echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5884if test "${ac_cv_prog_desktop_utils+set}" = set; then
5885  echo $ECHO_N "(cached) $ECHO_C" >&6
5886else
5887  if test -n "$desktop_utils"; then
5888  ac_cv_prog_desktop_utils="$desktop_utils" # Let the user override the test.
5889else
5890  ac_save_IFS=$IFS; IFS=$ac_path_separator
5891ac_dummy="$PATH"
5892for ac_dir in $ac_dummy; do
5893  IFS=$ac_save_IFS
5894  test -z "$ac_dir" && ac_dir=.
5895  $as_executable_p "$ac_dir/$ac_word" || continue
5896ac_cv_prog_desktop_utils="yes"
5897echo "$as_me:5897: found $ac_dir/$ac_word" >&5
5898break
5899done
5900
5901  test -z "$ac_cv_prog_desktop_utils" && ac_cv_prog_desktop_utils="no"
5902fi
5903fi
5904desktop_utils=$ac_cv_prog_desktop_utils
5905if test -n "$desktop_utils"; then
5906  echo "$as_me:5906: result: $desktop_utils" >&5
5907echo "${ECHO_T}$desktop_utils" >&6
5908else
5909  echo "$as_me:5909: result: no" >&5
5910echo "${ECHO_T}no" >&6
5911fi
5912
5913fi
5914
5915test "$desktop_utils" = yes && desktop_utils= || desktop_utils="#"
5916
5917# inherit SINSTALL_OPTS from environment to allow packager to customize it.
5918
5919echo "$as_me:5919: checking for install-permissions reference" >&5
5920echo $ECHO_N "checking for install-permissions reference... $ECHO_C" >&6
5921
5922# Check whether --with-reference or --without-reference was given.
5923if test "${with_reference+set}" = set; then
5924  withval="$with_reference"
5925  with_reference=$withval
5926else
5927  with_reference=xterm
5928fi;
5929echo "$as_me:5929: result: $with_reference" >&5
5930echo "${ECHO_T}$with_reference" >&6
5931
5932with_full_paths=yes
5933
5934	case $cf_cv_system_name in
5935	os2*)	PATH_SEPARATOR=';'  ;;
5936	*)	PATH_SEPARATOR=':'  ;;
5937	esac
5938
5939test -z "$XTERM_PATH" && XTERM_PATH=$with_reference
5940for ac_prog in $XTERM_PATH $with_reference
5941do
5942  # Extract the first word of "$ac_prog", so it can be a program name with args.
5943set dummy $ac_prog; ac_word=$2
5944echo "$as_me:5944: checking for $ac_word" >&5
5945echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5946if test "${ac_cv_path_XTERM_PATH+set}" = set; then
5947  echo $ECHO_N "(cached) $ECHO_C" >&6
5948else
5949  case $XTERM_PATH in
5950  [\\/]* | ?:[\\/]*)
5951  ac_cv_path_XTERM_PATH="$XTERM_PATH" # Let the user override the test with a path.
5952  ;;
5953  *)
5954  ac_save_IFS=$IFS; IFS=$ac_path_separator
5955ac_dummy="$PATH"
5956for ac_dir in $ac_dummy; do
5957  IFS=$ac_save_IFS
5958  test -z "$ac_dir" && ac_dir=.
5959  if $as_executable_p "$ac_dir/$ac_word"; then
5960   ac_cv_path_XTERM_PATH="$ac_dir/$ac_word"
5961   echo "$as_me:5961: found $ac_dir/$ac_word" >&5
5962   break
5963fi
5964done
5965
5966  ;;
5967esac
5968fi
5969XTERM_PATH=$ac_cv_path_XTERM_PATH
5970
5971if test -n "$XTERM_PATH"; then
5972  echo "$as_me:5972: result: $XTERM_PATH" >&5
5973echo "${ECHO_T}$XTERM_PATH" >&6
5974else
5975  echo "$as_me:5975: result: no" >&5
5976echo "${ECHO_T}no" >&6
5977fi
5978
5979  test -n "$XTERM_PATH" && break
5980done
5981test -n "$XTERM_PATH" || XTERM_PATH="$XTERM_PATH"
5982
5983cf_path_prog=""
5984cf_path_args=""
5985IFS="${IFS:- 	}"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
5986for cf_temp in $ac_cv_path_XTERM_PATH
5987do
5988	if test -z "$cf_path_prog" ; then
5989		if test "$with_full_paths" = yes ; then
5990
5991if test "x$prefix" != xNONE; then
5992  cf_path_syntax="$prefix"
5993else
5994  cf_path_syntax="$ac_default_prefix"
5995fi
5996
5997case ".$cf_temp" in #(vi
5998.\$\(*\)*|.\'*\'*) #(vi
5999  ;;
6000..|./*|.\\*) #(vi
6001  ;;
6002.[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6003  ;;
6004.\${*prefix}*) #(vi
6005  eval cf_temp="$cf_temp"
6006  case ".$cf_temp" in #(vi
6007  .NONE/*)
6008    cf_temp=`echo $cf_temp | sed -e s%NONE%$cf_path_syntax%`
6009    ;;
6010  esac
6011  ;; #(vi
6012.no|.NONE/*)
6013  cf_temp=`echo $cf_temp | sed -e s%NONE%$cf_path_syntax%`
6014  ;;
6015*)
6016  break
6017  ;;
6018esac
6019
6020			cf_path_prog="$cf_temp"
6021		else
6022			cf_path_prog="`basename $cf_temp`"
6023		fi
6024	elif test -z "$cf_path_args" ; then
6025		cf_path_args="$cf_temp"
6026	else
6027		cf_path_args="$cf_path_args $cf_temp"
6028	fi
6029done
6030IFS="$cf_save_ifs"
6031
6032if test -n "$cf_path_prog" ; then
6033
6034echo "${as_me:-configure}:6034: testing defining path for ${cf_path_prog} ..." 1>&5
6035
6036	cat >>confdefs.h <<EOF
6037#define XTERM_PATH_PATH "$cf_path_prog"
6038EOF
6039
6040	test -n "$cf_path_args" && cat >>confdefs.h <<EOF
6041#define XTERM_PATH_ARGS "$cf_path_args"
6042EOF
6043
6044fi
6045
6046# If any of --program-prefix, --program-suffix or --program-transform-name is
6047# given, accept an option tell the makefile to create a symbolic link, e.g.,
6048# to "xterm" on install.
6049XTERM_SYMLINK=NONE
6050
6051if test "$program_transform_name" != "'s,,,'" ; then
6052cf_name=`echo "$program_transform_name" | sed -e 's,\\$\\$,$,g'`
6053cf_name=`echo xterm |sed -e "$cf_name"`
6054echo "$as_me:6054: checking for symbolic link to create to $cf_name" >&5
6055echo $ECHO_N "checking for symbolic link to create to $cf_name... $ECHO_C" >&6
6056
6057# Check whether --with-xterm-symlink or --without-xterm-symlink was given.
6058if test "${with_xterm_symlink+set}" = set; then
6059  withval="$with_xterm_symlink"
6060  with_symlink=$withval
6061else
6062  with_symlink=xterm
6063fi;
6064echo "$as_me:6064: result: $with_symlink" >&5
6065echo "${ECHO_T}$with_symlink" >&6
6066test "$with_symlink" = yes && with_symlink=xterm
6067test -n "$with_symlink" && \
6068	test "$with_symlink" != no && \
6069	test "$with_symlink" != $cf_name && \
6070	XTERM_SYMLINK="$with_symlink"
6071fi
6072
6073echo "$as_me:6073: checking if you want to disable setuid" >&5
6074echo $ECHO_N "checking if you want to disable setuid... $ECHO_C" >&6
6075
6076# Check whether --enable-setuid or --disable-setuid was given.
6077if test "${enable_setuid+set}" = set; then
6078  enableval="$enable_setuid"
6079  test "$enableval" != no && enableval=yes
6080  if test "$enableval" != "yes" ; then
6081    disable_setuid=yes
6082  else
6083    disable_setuid=no
6084  fi
6085else
6086  enableval=yes
6087  disable_setuid=no
6088
6089fi;
6090echo "$as_me:6090: result: $disable_setuid" >&5
6091echo "${ECHO_T}$disable_setuid" >&6
6092
6093echo "$as_me:6093: checking if you want to disable setgid" >&5
6094echo $ECHO_N "checking if you want to disable setgid... $ECHO_C" >&6
6095
6096# Check whether --enable-setgid or --disable-setgid was given.
6097if test "${enable_setgid+set}" = set; then
6098  enableval="$enable_setgid"
6099  test "$enableval" != no && enableval=yes
6100  if test "$enableval" != "yes" ; then
6101    disable_setgid=yes
6102  else
6103    disable_setgid=no
6104  fi
6105else
6106  enableval=yes
6107  disable_setgid=no
6108
6109fi;
6110echo "$as_me:6110: result: $disable_setgid" >&5
6111echo "${ECHO_T}$disable_setgid" >&6
6112
6113echo "$as_me:6113: checking if you want to run xterm setuid to a given user" >&5
6114echo $ECHO_N "checking if you want to run xterm setuid to a given user... $ECHO_C" >&6
6115
6116# Check whether --with-setuid or --without-setuid was given.
6117if test "${with_setuid+set}" = set; then
6118  withval="$with_setuid"
6119  use_given_setuid=$withval
6120else
6121  use_given_setuid=no
6122fi;
6123echo "$as_me:6123: result: $use_given_setuid" >&5
6124echo "${ECHO_T}$use_given_setuid" >&6
6125
6126if test "$use_given_setuid" != no ; then
6127	if test "$use_given_setuid" = yes ; then
6128		cf_cv_given_setuid=root
6129	else
6130		cf_cv_given_setuid=$use_given_setuid
6131	fi
6132	SINSTALL_OPTS="$SINSTALL_OPTS u+s -u $cf_cv_given_setuid"
6133fi
6134
6135echo "$as_me:6135: checking if you want to run xterm setgid to match utmp/utmpx file" >&5
6136echo $ECHO_N "checking if you want to run xterm setgid to match utmp/utmpx file... $ECHO_C" >&6
6137
6138# Check whether --with-utmp-setgid or --without-utmp-setgid was given.
6139if test "${with_utmp_setgid+set}" = set; then
6140  withval="$with_utmp_setgid"
6141  use_utmp_setgid=$withval
6142else
6143  use_utmp_setgid=no
6144fi;
6145echo "$as_me:6145: result: $use_utmp_setgid" >&5
6146echo "${ECHO_T}$use_utmp_setgid" >&6
6147
6148if test "$use_utmp_setgid" != no ; then
6149	if test "$use_utmp_setgid" = yes ; then
6150
6151if test $cf_cv_have_utmp != no ; then
6152echo "$as_me:6152: checking for utmp/utmpx group" >&5
6153echo $ECHO_N "checking for utmp/utmpx group... $ECHO_C" >&6
6154if test "${cf_cv_utmp_group+set}" = set; then
6155  echo $ECHO_N "(cached) $ECHO_C" >&6
6156else
6157
6158for cf_utmp_path in /var/adm /var/run
6159do
6160	for cf_utmp_file in utmpx utmp
6161	do
6162		if test -f $cf_utmp_path/$cf_utmp_file
6163		then
6164			cf_cv_utmp_group=root
6165
6166			cf_option="-l -L"
6167
6168			# Expect listing to have fields like this:
6169			#-r--r--r--   1 user      group       34293 Jul 18 16:29 pathname
6170			ls $cf_option $cf_utmp_path/$cf_utmp_file >conftest
6171			read cf_mode cf_links cf_usr cf_grp cf_size cf_date1 cf_date2 cf_date3 cf_rest <conftest
6172			if test -z "$cf_rest" ; then
6173				cf_option="$cf_option -g"
6174				ls $cf_option $cf_utmp_path/$cf_utmp_file >conftest
6175				read cf_mode cf_links cf_usr cf_grp cf_size cf_date1 cf_date2 cf_date3 cf_rest <conftest
6176			fi
6177			rm -f conftest
6178
6179			# If we have a pathname, and the date fields look right, assume we've
6180			# captured the group as well.
6181			if test -n "$cf_rest" ; then
6182				cf_test=`echo "${cf_date2}${cf_date3}" | sed -e 's/[0-9:]//g'`
6183				if test -z "$cf_test" ; then
6184					cf_cv_utmp_group=$cf_grp;
6185				fi
6186			fi
6187			break
6188		fi
6189	done
6190	test -n "$cf_cv_utmp_group" && break
6191done
6192
6193fi
6194echo "$as_me:6194: result: $cf_cv_utmp_group" >&5
6195echo "${ECHO_T}$cf_cv_utmp_group" >&6
6196else
6197	{ { echo "$as_me:6197: error: cannot find utmp group" >&5
6198echo "$as_me: error: cannot find utmp group" >&2;}
6199   { (exit 1); exit 1; }; }
6200fi
6201
6202	else
6203		cf_cv_utmp_group=$use_utmp_setgid
6204	fi
6205	if test "$cf_cv_posix_saved_ids" != yes ; then
6206		{ { echo "$as_me:6206: error: Your system does not support POSIX saved-ids" >&5
6207echo "$as_me: error: Your system does not support POSIX saved-ids" >&2;}
6208   { (exit 1); exit 1; }; }
6209	fi
6210	cat >>confdefs.h <<\EOF
6211#define USE_UTMP_SETGID 1
6212EOF
6213
6214	SINSTALL_OPTS="$SINSTALL_OPTS g+s -g $cf_cv_utmp_group"
6215fi
6216
6217echo "$as_me:6217: checking if you want to link with utempter" >&5
6218echo $ECHO_N "checking if you want to link with utempter... $ECHO_C" >&6
6219
6220# Check whether --with-utempter or --without-utempter was given.
6221if test "${with_utempter+set}" = set; then
6222  withval="$with_utempter"
6223  use_utempter=$withval
6224else
6225  use_utempter=no
6226fi;
6227echo "$as_me:6227: result: $use_utempter" >&5
6228echo "${ECHO_T}$use_utempter" >&6
6229
6230if test "$use_utempter" = yes ; then
6231
6232echo "$as_me:6232: checking if we can link with utempter library" >&5
6233echo $ECHO_N "checking if we can link with utempter library... $ECHO_C" >&6
6234if test "${cf_cv_have_utempter+set}" = set; then
6235  echo $ECHO_N "(cached) $ECHO_C" >&6
6236else
6237
6238cf_save_LIBS="$LIBS"
6239LIBS="-lutempter $LIBS"
6240cat >conftest.$ac_ext <<_ACEOF
6241#line 6241 "configure"
6242#include "confdefs.h"
6243
6244#include <utempter.h>
6245
6246int
6247main ()
6248{
6249
6250	addToUtmp("/dev/tty", 0, 1);
6251	removeFromUtmp();
6252
6253  ;
6254  return 0;
6255}
6256_ACEOF
6257rm -f conftest.$ac_objext conftest$ac_exeext
6258if { (eval echo "$as_me:6258: \"$ac_link\"") >&5
6259  (eval $ac_link) 2>&5
6260  ac_status=$?
6261  echo "$as_me:6261: \$? = $ac_status" >&5
6262  (exit $ac_status); } &&
6263         { ac_try='test -s conftest$ac_exeext'
6264  { (eval echo "$as_me:6264: \"$ac_try\"") >&5
6265  (eval $ac_try) 2>&5
6266  ac_status=$?
6267  echo "$as_me:6267: \$? = $ac_status" >&5
6268  (exit $ac_status); }; }; then
6269
6270	cf_cv_have_utempter=yes
6271else
6272  echo "$as_me: failed program was:" >&5
6273cat conftest.$ac_ext >&5
6274
6275	cf_cv_have_utempter=no
6276fi
6277rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6278LIBS="$cf_save_LIBS"
6279
6280fi
6281echo "$as_me:6281: result: $cf_cv_have_utempter" >&5
6282echo "${ECHO_T}$cf_cv_have_utempter" >&6
6283if test "$cf_cv_have_utempter" = yes ; then
6284	cat >>confdefs.h <<\EOF
6285#define USE_UTEMPTER 1
6286EOF
6287
6288	LIBS="-lutempter $LIBS"
6289fi
6290
6291	test "$cf_cv_have_utempter" != yes && use_utempter=no
6292else
6293	use_utempter=no
6294fi
6295
6296# Some configurations permit (or require) either setuid or setgid mode.
6297# Let the user decide.
6298if test "$use_utempter" = yes ; then
6299	if test "${enable_setuid+set}" != set ; then
6300		disable_setuid=yes
6301		test -n "$verbose" && echo "	No --disable-setuid option given, force to yes" 1>&6
6302
6303echo "${as_me:-configure}:6303: testing No --disable-setuid option given, force to yes ..." 1>&5
6304
6305	fi
6306fi
6307
6308###	checks for external data
6309
6310echo "$as_me:6310: checking if external errno is declared" >&5
6311echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
6312if test "${cf_cv_dcl_errno+set}" = set; then
6313  echo $ECHO_N "(cached) $ECHO_C" >&6
6314else
6315
6316    cat >conftest.$ac_ext <<_ACEOF
6317#line 6317 "configure"
6318#include "confdefs.h"
6319
6320#ifdef HAVE_STDLIB_H
6321#include <stdlib.h>
6322#endif
6323#include <stdio.h>
6324#include <sys/types.h>
6325#include <errno.h>
6326int
6327main ()
6328{
6329int x = (int) errno
6330  ;
6331  return 0;
6332}
6333_ACEOF
6334rm -f conftest.$ac_objext
6335if { (eval echo "$as_me:6335: \"$ac_compile\"") >&5
6336  (eval $ac_compile) 2>&5
6337  ac_status=$?
6338  echo "$as_me:6338: \$? = $ac_status" >&5
6339  (exit $ac_status); } &&
6340         { ac_try='test -s conftest.$ac_objext'
6341  { (eval echo "$as_me:6341: \"$ac_try\"") >&5
6342  (eval $ac_try) 2>&5
6343  ac_status=$?
6344  echo "$as_me:6344: \$? = $ac_status" >&5
6345  (exit $ac_status); }; }; then
6346  cf_cv_dcl_errno=yes
6347else
6348  echo "$as_me: failed program was:" >&5
6349cat conftest.$ac_ext >&5
6350cf_cv_dcl_errno=no
6351fi
6352rm -f conftest.$ac_objext conftest.$ac_ext
6353
6354fi
6355echo "$as_me:6355: result: $cf_cv_dcl_errno" >&5
6356echo "${ECHO_T}$cf_cv_dcl_errno" >&6
6357
6358if test "$cf_cv_dcl_errno" = no ; then
6359
6360cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
6361
6362    cat >>confdefs.h <<EOF
6363#define $cf_result 1
6364EOF
6365
6366fi
6367
6368# It's possible (for near-UNIX clones) that the data doesn't exist
6369
6370echo "$as_me:6370: checking if external errno exists" >&5
6371echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
6372if test "${cf_cv_have_errno+set}" = set; then
6373  echo $ECHO_N "(cached) $ECHO_C" >&6
6374else
6375
6376    cat >conftest.$ac_ext <<_ACEOF
6377#line 6377 "configure"
6378#include "confdefs.h"
6379
6380#undef errno
6381extern int errno;
6382
6383int
6384main ()
6385{
6386errno = 2
6387  ;
6388  return 0;
6389}
6390_ACEOF
6391rm -f conftest.$ac_objext conftest$ac_exeext
6392if { (eval echo "$as_me:6392: \"$ac_link\"") >&5
6393  (eval $ac_link) 2>&5
6394  ac_status=$?
6395  echo "$as_me:6395: \$? = $ac_status" >&5
6396  (exit $ac_status); } &&
6397         { ac_try='test -s conftest$ac_exeext'
6398  { (eval echo "$as_me:6398: \"$ac_try\"") >&5
6399  (eval $ac_try) 2>&5
6400  ac_status=$?
6401  echo "$as_me:6401: \$? = $ac_status" >&5
6402  (exit $ac_status); }; }; then
6403  cf_cv_have_errno=yes
6404else
6405  echo "$as_me: failed program was:" >&5
6406cat conftest.$ac_ext >&5
6407cf_cv_have_errno=no
6408fi
6409rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6410
6411fi
6412echo "$as_me:6412: result: $cf_cv_have_errno" >&5
6413echo "${ECHO_T}$cf_cv_have_errno" >&6
6414
6415if test "$cf_cv_have_errno" = yes ; then
6416
6417cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
6418
6419    cat >>confdefs.h <<EOF
6420#define $cf_result 1
6421EOF
6422
6423fi
6424
6425echo "$as_me:6425: checking for explicit tty group name" >&5
6426echo $ECHO_N "checking for explicit tty group name... $ECHO_C" >&6
6427
6428# Check whether --with-tty-group or --without-tty-group was given.
6429if test "${with_tty_group+set}" = set; then
6430  withval="$with_tty_group"
6431  cf_tty_group=$withval
6432else
6433  cf_tty_group=auto...
6434fi;
6435test -z "$cf_tty_group"    && cf_tty_group=auto...
6436test "$cf_tty_group" = yes && cf_tty_group=auto...
6437echo "$as_me:6437: result: $cf_tty_group" >&5
6438echo "${ECHO_T}$cf_tty_group" >&6
6439
6440if test "$cf_tty_group" = "auto..." ; then
6441echo "$as_me:6441: checking for tty group name" >&5
6442echo $ECHO_N "checking for tty group name... $ECHO_C" >&6
6443if test "${cf_cv_tty_group_name+set}" = set; then
6444  echo $ECHO_N "(cached) $ECHO_C" >&6
6445else
6446
6447# If we are configuring as root, it is hard to get a clue about the tty group.
6448# But we'll guess based on how our connection is set up - assuming it is done
6449# properly.
6450
6451cf_uid=`id | sed -e 's/^^=*=//' -e 's/(.*$//'`
6452# )vi
6453if test "$cf_uid" != 0 ; then
6454cf_cv_tty_group_name=
6455cf_tty_name=`tty`
6456test "$cf_tty_name" = "not a tty" && cf_tty_name=/dev/tty
6457test -z "$cf_tty_name" && cf_tty_name=/dev/tty
6458if test -c "$cf_tty_name"
6459then
6460	cf_option="-l -L"
6461
6462	# Expect listing to have fields like this:
6463	#-rwxrwxrwx   1 user      group       34293 Jul 18 16:29 pathname
6464	ls $cf_option $cf_tty_name >conftest.out
6465	read cf_mode cf_links cf_usr cf_grp cf_size cf_date1 cf_date2 cf_date3 cf_rest <conftest.out
6466	if test -z "$cf_rest" ; then
6467		cf_option="$cf_option -g"
6468		ls $cf_option $cf_tty_name >conftest.out
6469		read cf_mode cf_links cf_usr cf_grp cf_size cf_date1 cf_date2 cf_date3 cf_rest <conftest.out
6470	fi
6471	rm -f conftest.out
6472	cf_cv_tty_group_name=$cf_grp
6473fi
6474fi
6475
6476# If we cannot deduce the tty group, fall back on hardcoded cases
6477
6478if test -z "$cf_cv_tty_group_name"
6479then
6480case $host_os in #(vi
6481osf*) #(vi
6482	cf_cv_tty_group_name="terminal"
6483	;;
6484*)
6485	cf_cv_tty_group_name="unknown"
6486	if ( egrep '^tty:' /etc/group 2>/dev/null 1>/dev/null ) then
6487		cf_cv_tty_group_name="tty"
6488	fi
6489	;;
6490esac
6491fi
6492
6493fi
6494echo "$as_me:6494: result: $cf_cv_tty_group_name" >&5
6495echo "${ECHO_T}$cf_cv_tty_group_name" >&6
6496cf_tty_group="$cf_cv_tty_group_name"
6497else
6498	# if configure option, always do this
6499	cat >>confdefs.h <<\EOF
6500#define USE_TTY_GROUP 1
6501EOF
6502
6503fi
6504
6505cat >>confdefs.h <<EOF
6506#define TTY_GROUP_NAME "$cf_tty_group"
6507EOF
6508
6509# This is only a double-check that the group-name we obtained above really
6510# does apply to the device.  We cannot perform this test if we are in batch
6511# mode, or if we are cross-compiling.
6512
6513echo "$as_me:6513: checking if we may use the $cf_tty_group group" >&5
6514echo $ECHO_N "checking if we may use the $cf_tty_group group... $ECHO_C" >&6
6515if test "${cf_cv_tty_group+set}" = set; then
6516  echo $ECHO_N "(cached) $ECHO_C" >&6
6517else
6518
6519cf_tty_name=`tty`
6520if test "$cf_tty_name" != "not a tty"
6521then
6522if test "$cross_compiling" = yes; then
6523  cf_cv_tty_group=unknown
6524else
6525  cat >conftest.$ac_ext <<_ACEOF
6526#line 6526 "configure"
6527#include "confdefs.h"
6528
6529#include <unistd.h>
6530#include <sys/types.h>
6531#include <sys/stat.h>
6532#include <grp.h>
6533int main()
6534{
6535	struct stat sb;
6536	struct group *ttygrp = getgrnam(TTY_GROUP_NAME);
6537	char *name = ttyname(0);
6538
6539	endgrent();
6540	if (ttygrp != 0
6541	 && name != 0
6542	 && stat(name, &sb) == 0
6543	 && sb.st_gid != getgid()
6544	 && sb.st_gid == ttygrp->gr_gid) {
6545		${cf_cv_main_return:-return} (0);
6546	}
6547	${cf_cv_main_return:-return} (1);
6548}
6549
6550_ACEOF
6551rm -f conftest$ac_exeext
6552if { (eval echo "$as_me:6552: \"$ac_link\"") >&5
6553  (eval $ac_link) 2>&5
6554  ac_status=$?
6555  echo "$as_me:6555: \$? = $ac_status" >&5
6556  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6557  { (eval echo "$as_me:6557: \"$ac_try\"") >&5
6558  (eval $ac_try) 2>&5
6559  ac_status=$?
6560  echo "$as_me:6560: \$? = $ac_status" >&5
6561  (exit $ac_status); }; }; then
6562  cf_cv_tty_group=yes
6563else
6564  echo "$as_me: program exited with status $ac_status" >&5
6565echo "$as_me: failed program was:" >&5
6566cat conftest.$ac_ext >&5
6567cf_cv_tty_group=no
6568fi
6569rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6570fi
6571elif test "$cross_compiling" = yes; then
6572	cf_cv_tty_group=unknown
6573else
6574	cf_cv_tty_group=yes
6575fi
6576
6577fi
6578echo "$as_me:6578: result: $cf_cv_tty_group" >&5
6579echo "${ECHO_T}$cf_cv_tty_group" >&6
6580
6581if test $cf_cv_tty_group = no ; then
6582	{ echo "$as_me:6582: WARNING: Cannot use $cf_tty_group group" >&5
6583echo "$as_me: WARNING: Cannot use $cf_tty_group group" >&2;}
6584else
6585	cat >>confdefs.h <<\EOF
6586#define USE_TTY_GROUP 1
6587EOF
6588
6589fi
6590
6591###	checks for system services and user specified options
6592
6593echo "$as_me:6593: checking for sys/wait.h that is POSIX.1 compatible" >&5
6594echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6
6595if test "${ac_cv_header_sys_wait_h+set}" = set; then
6596  echo $ECHO_N "(cached) $ECHO_C" >&6
6597else
6598  cat >conftest.$ac_ext <<_ACEOF
6599#line 6599 "configure"
6600#include "confdefs.h"
6601#include <sys/types.h>
6602#include <sys/wait.h>
6603#ifndef WEXITSTATUS
6604# define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
6605#endif
6606#ifndef WIFEXITED
6607# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
6608#endif
6609
6610int
6611main ()
6612{
6613  int s;
6614  wait (&s);
6615  s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
6616  ;
6617  return 0;
6618}
6619_ACEOF
6620rm -f conftest.$ac_objext
6621if { (eval echo "$as_me:6621: \"$ac_compile\"") >&5
6622  (eval $ac_compile) 2>&5
6623  ac_status=$?
6624  echo "$as_me:6624: \$? = $ac_status" >&5
6625  (exit $ac_status); } &&
6626         { ac_try='test -s conftest.$ac_objext'
6627  { (eval echo "$as_me:6627: \"$ac_try\"") >&5
6628  (eval $ac_try) 2>&5
6629  ac_status=$?
6630  echo "$as_me:6630: \$? = $ac_status" >&5
6631  (exit $ac_status); }; }; then
6632  ac_cv_header_sys_wait_h=yes
6633else
6634  echo "$as_me: failed program was:" >&5
6635cat conftest.$ac_ext >&5
6636ac_cv_header_sys_wait_h=no
6637fi
6638rm -f conftest.$ac_objext conftest.$ac_ext
6639fi
6640echo "$as_me:6640: result: $ac_cv_header_sys_wait_h" >&5
6641echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6
6642if test $ac_cv_header_sys_wait_h = yes; then
6643
6644cat >>confdefs.h <<\EOF
6645#define HAVE_SYS_WAIT_H 1
6646EOF
6647
6648fi
6649
6650echo "$as_me:6650: checking for POSIX wait functions" >&5
6651echo $ECHO_N "checking for POSIX wait functions... $ECHO_C" >&6
6652if test "${cf_cv_posix_wait+set}" = set; then
6653  echo $ECHO_N "(cached) $ECHO_C" >&6
6654else
6655
6656cat >conftest.$ac_ext <<_ACEOF
6657#line 6657 "configure"
6658#include "confdefs.h"
6659
6660#include <stdlib.h>
6661#include <stdio.h>
6662#include <sys/types.h>
6663#ifdef HAVE_SYS_WAIT_H
6664#include <sys/wait.h>
6665#endif
6666
6667int
6668main ()
6669{
6670
6671	int stat_loc;
6672	pid_t pid = waitpid(-1, &stat_loc, WNOHANG|WUNTRACED);
6673	pid_t pid2 = wait(&stat_loc);
6674
6675  ;
6676  return 0;
6677}
6678_ACEOF
6679rm -f conftest.$ac_objext conftest$ac_exeext
6680if { (eval echo "$as_me:6680: \"$ac_link\"") >&5
6681  (eval $ac_link) 2>&5
6682  ac_status=$?
6683  echo "$as_me:6683: \$? = $ac_status" >&5
6684  (exit $ac_status); } &&
6685         { ac_try='test -s conftest$ac_exeext'
6686  { (eval echo "$as_me:6686: \"$ac_try\"") >&5
6687  (eval $ac_try) 2>&5
6688  ac_status=$?
6689  echo "$as_me:6689: \$? = $ac_status" >&5
6690  (exit $ac_status); }; }; then
6691  cf_cv_posix_wait=yes
6692else
6693  echo "$as_me: failed program was:" >&5
6694cat conftest.$ac_ext >&5
6695cf_cv_posix_wait=no
6696fi
6697rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6698
6699fi
6700echo "$as_me:6700: result: $cf_cv_posix_wait" >&5
6701echo "${ECHO_T}$cf_cv_posix_wait" >&6
6702test "$cf_cv_posix_wait" = yes && cat >>confdefs.h <<\EOF
6703#define USE_POSIX_WAIT 1
6704EOF
6705
6706echo "$as_me:6706: checking if external sys_nerr is declared" >&5
6707echo $ECHO_N "checking if external sys_nerr is declared... $ECHO_C" >&6
6708if test "${cf_cv_dcl_sys_nerr+set}" = set; then
6709  echo $ECHO_N "(cached) $ECHO_C" >&6
6710else
6711
6712    cat >conftest.$ac_ext <<_ACEOF
6713#line 6713 "configure"
6714#include "confdefs.h"
6715
6716#ifdef HAVE_STDLIB_H
6717#include <stdlib.h>
6718#endif
6719#include <stdio.h>
6720#include <sys/types.h>
6721#include <errno.h>
6722int
6723main ()
6724{
6725int x = (int) sys_nerr
6726  ;
6727  return 0;
6728}
6729_ACEOF
6730rm -f conftest.$ac_objext
6731if { (eval echo "$as_me:6731: \"$ac_compile\"") >&5
6732  (eval $ac_compile) 2>&5
6733  ac_status=$?
6734  echo "$as_me:6734: \$? = $ac_status" >&5
6735  (exit $ac_status); } &&
6736         { ac_try='test -s conftest.$ac_objext'
6737  { (eval echo "$as_me:6737: \"$ac_try\"") >&5
6738  (eval $ac_try) 2>&5
6739  ac_status=$?
6740  echo "$as_me:6740: \$? = $ac_status" >&5
6741  (exit $ac_status); }; }; then
6742  cf_cv_dcl_sys_nerr=yes
6743else
6744  echo "$as_me: failed program was:" >&5
6745cat conftest.$ac_ext >&5
6746cf_cv_dcl_sys_nerr=no
6747fi
6748rm -f conftest.$ac_objext conftest.$ac_ext
6749
6750fi
6751echo "$as_me:6751: result: $cf_cv_dcl_sys_nerr" >&5
6752echo "${ECHO_T}$cf_cv_dcl_sys_nerr" >&6
6753
6754if test "$cf_cv_dcl_sys_nerr" = no ; then
6755
6756cf_result=`echo "decl_sys_nerr" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
6757
6758    cat >>confdefs.h <<EOF
6759#define $cf_result 1
6760EOF
6761
6762fi
6763
6764# It's possible (for near-UNIX clones) that the data doesn't exist
6765
6766echo "$as_me:6766: checking if external sys_nerr exists" >&5
6767echo $ECHO_N "checking if external sys_nerr exists... $ECHO_C" >&6
6768if test "${cf_cv_have_sys_nerr+set}" = set; then
6769  echo $ECHO_N "(cached) $ECHO_C" >&6
6770else
6771
6772    cat >conftest.$ac_ext <<_ACEOF
6773#line 6773 "configure"
6774#include "confdefs.h"
6775
6776#undef sys_nerr
6777extern int sys_nerr;
6778
6779int
6780main ()
6781{
6782sys_nerr = 2
6783  ;
6784  return 0;
6785}
6786_ACEOF
6787rm -f conftest.$ac_objext conftest$ac_exeext
6788if { (eval echo "$as_me:6788: \"$ac_link\"") >&5
6789  (eval $ac_link) 2>&5
6790  ac_status=$?
6791  echo "$as_me:6791: \$? = $ac_status" >&5
6792  (exit $ac_status); } &&
6793         { ac_try='test -s conftest$ac_exeext'
6794  { (eval echo "$as_me:6794: \"$ac_try\"") >&5
6795  (eval $ac_try) 2>&5
6796  ac_status=$?
6797  echo "$as_me:6797: \$? = $ac_status" >&5
6798  (exit $ac_status); }; }; then
6799  cf_cv_have_sys_nerr=yes
6800else
6801  echo "$as_me: failed program was:" >&5
6802cat conftest.$ac_ext >&5
6803cf_cv_have_sys_nerr=no
6804fi
6805rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6806
6807fi
6808echo "$as_me:6808: result: $cf_cv_have_sys_nerr" >&5
6809echo "${ECHO_T}$cf_cv_have_sys_nerr" >&6
6810
6811if test "$cf_cv_have_sys_nerr" = yes ; then
6812
6813cf_result=`echo "have_sys_nerr" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
6814
6815    cat >>confdefs.h <<EOF
6816#define $cf_result 1
6817EOF
6818
6819fi
6820
6821echo "$as_me:6821: checking if external sys_errlist is declared" >&5
6822echo $ECHO_N "checking if external sys_errlist is declared... $ECHO_C" >&6
6823if test "${cf_cv_dcl_sys_errlist+set}" = set; then
6824  echo $ECHO_N "(cached) $ECHO_C" >&6
6825else
6826
6827    cat >conftest.$ac_ext <<_ACEOF
6828#line 6828 "configure"
6829#include "confdefs.h"
6830
6831#ifdef HAVE_STDLIB_H
6832#include <stdlib.h>
6833#endif
6834#include <stdio.h>
6835#include <sys/types.h>
6836#include <errno.h>
6837int
6838main ()
6839{
6840int x = (int) sys_errlist
6841  ;
6842  return 0;
6843}
6844_ACEOF
6845rm -f conftest.$ac_objext
6846if { (eval echo "$as_me:6846: \"$ac_compile\"") >&5
6847  (eval $ac_compile) 2>&5
6848  ac_status=$?
6849  echo "$as_me:6849: \$? = $ac_status" >&5
6850  (exit $ac_status); } &&
6851         { ac_try='test -s conftest.$ac_objext'
6852  { (eval echo "$as_me:6852: \"$ac_try\"") >&5
6853  (eval $ac_try) 2>&5
6854  ac_status=$?
6855  echo "$as_me:6855: \$? = $ac_status" >&5
6856  (exit $ac_status); }; }; then
6857  cf_cv_dcl_sys_errlist=yes
6858else
6859  echo "$as_me: failed program was:" >&5
6860cat conftest.$ac_ext >&5
6861cf_cv_dcl_sys_errlist=no
6862fi
6863rm -f conftest.$ac_objext conftest.$ac_ext
6864
6865fi
6866echo "$as_me:6866: result: $cf_cv_dcl_sys_errlist" >&5
6867echo "${ECHO_T}$cf_cv_dcl_sys_errlist" >&6
6868
6869if test "$cf_cv_dcl_sys_errlist" = no ; then
6870
6871cf_result=`echo "decl_sys_errlist" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
6872
6873    cat >>confdefs.h <<EOF
6874#define $cf_result 1
6875EOF
6876
6877fi
6878
6879# It's possible (for near-UNIX clones) that the data doesn't exist
6880
6881echo "$as_me:6881: checking if external sys_errlist exists" >&5
6882echo $ECHO_N "checking if external sys_errlist exists... $ECHO_C" >&6
6883if test "${cf_cv_have_sys_errlist+set}" = set; then
6884  echo $ECHO_N "(cached) $ECHO_C" >&6
6885else
6886
6887    cat >conftest.$ac_ext <<_ACEOF
6888#line 6888 "configure"
6889#include "confdefs.h"
6890
6891#undef sys_errlist
6892extern int sys_errlist;
6893
6894int
6895main ()
6896{
6897sys_errlist = 2
6898  ;
6899  return 0;
6900}
6901_ACEOF
6902rm -f conftest.$ac_objext conftest$ac_exeext
6903if { (eval echo "$as_me:6903: \"$ac_link\"") >&5
6904  (eval $ac_link) 2>&5
6905  ac_status=$?
6906  echo "$as_me:6906: \$? = $ac_status" >&5
6907  (exit $ac_status); } &&
6908         { ac_try='test -s conftest$ac_exeext'
6909  { (eval echo "$as_me:6909: \"$ac_try\"") >&5
6910  (eval $ac_try) 2>&5
6911  ac_status=$?
6912  echo "$as_me:6912: \$? = $ac_status" >&5
6913  (exit $ac_status); }; }; then
6914  cf_cv_have_sys_errlist=yes
6915else
6916  echo "$as_me: failed program was:" >&5
6917cat conftest.$ac_ext >&5
6918cf_cv_have_sys_errlist=no
6919fi
6920rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6921
6922fi
6923echo "$as_me:6923: result: $cf_cv_have_sys_errlist" >&5
6924echo "${ECHO_T}$cf_cv_have_sys_errlist" >&6
6925
6926if test "$cf_cv_have_sys_errlist" = yes ; then
6927
6928cf_result=`echo "have_sys_errlist" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
6929
6930    cat >>confdefs.h <<EOF
6931#define $cf_result 1
6932EOF
6933
6934fi
6935
6936for ac_header in \
6937termios.h \
6938stdlib.h \
6939X11/Intrinsic.h \
6940
6941do
6942as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6943echo "$as_me:6943: checking for $ac_header" >&5
6944echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6945if eval "test \"\${$as_ac_Header+set}\" = set"; then
6946  echo $ECHO_N "(cached) $ECHO_C" >&6
6947else
6948  cat >conftest.$ac_ext <<_ACEOF
6949#line 6949 "configure"
6950#include "confdefs.h"
6951#include <$ac_header>
6952_ACEOF
6953if { (eval echo "$as_me:6953: \"$ac_cpp conftest.$ac_ext\"") >&5
6954  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6955  ac_status=$?
6956  egrep -v '^ *\+' conftest.er1 >conftest.err
6957  rm -f conftest.er1
6958  cat conftest.err >&5
6959  echo "$as_me:6959: \$? = $ac_status" >&5
6960  (exit $ac_status); } >/dev/null; then
6961  if test -s conftest.err; then
6962    ac_cpp_err=$ac_c_preproc_warn_flag
6963  else
6964    ac_cpp_err=
6965  fi
6966else
6967  ac_cpp_err=yes
6968fi
6969if test -z "$ac_cpp_err"; then
6970  eval "$as_ac_Header=yes"
6971else
6972  echo "$as_me: failed program was:" >&5
6973  cat conftest.$ac_ext >&5
6974  eval "$as_ac_Header=no"
6975fi
6976rm -f conftest.err conftest.$ac_ext
6977fi
6978echo "$as_me:6978: result: `eval echo '${'$as_ac_Header'}'`" >&5
6979echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
6980if test `eval echo '${'$as_ac_Header'}'` = yes; then
6981  cat >>confdefs.h <<EOF
6982#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6983EOF
6984
6985fi
6986done
6987
6988echo "$as_me:6988: checking if we should define SYSV" >&5
6989echo $ECHO_N "checking if we should define SYSV... $ECHO_C" >&6
6990if test "${cf_cv_sysv+set}" = set; then
6991  echo $ECHO_N "(cached) $ECHO_C" >&6
6992else
6993
6994cat >conftest.$ac_ext <<_ACEOF
6995#line 6995 "configure"
6996#include "confdefs.h"
6997
6998#undef  SYSV
6999#define SYSV 1			/* get Xos.h to declare sys_errlist[] */
7000#ifdef HAVE_STDLIB_H
7001#include <stdlib.h>		/* look for wchar_t */
7002#endif
7003#ifdef HAVE_X11_INTRINSIC_H
7004#include <X11/Intrinsic.h>	/* Intrinsic.h has other traps... */
7005#endif
7006#ifdef HAVE_TERMIOS_H		/* needed for HPUX 10.20 */
7007#include <termios.h>
7008#define STRUCT_TERMIOS struct termios
7009#else
7010#define STRUCT_TERMIOS struct termio
7011#endif
7012#include <curses.h>
7013#include <term.h>		/* eliminate most BSD hacks */
7014#include <errno.h>		/* declare sys_errlist on older systems */
7015#include <sys/termio.h>		/* eliminate most of the remaining ones */
7016
7017int
7018main ()
7019{
7020
7021static STRUCT_TERMIOS d_tio;
7022	d_tio.c_cc[VINTR] = 0;
7023	d_tio.c_cc[VQUIT] = 0;
7024	d_tio.c_cc[VERASE] = 0;
7025	d_tio.c_cc[VKILL] = 0;
7026	d_tio.c_cc[VEOF] = 0;
7027	d_tio.c_cc[VEOL] = 0;
7028	d_tio.c_cc[VMIN] = 0;
7029	d_tio.c_cc[VTIME] = 0;
7030#if defined(HAVE_SYS_ERRLIST) && !defined(DECL_SYS_ERRLIST)
7031sys_errlist[0] = "";		/* Cygwin mis-declares this */
7032#endif
7033
7034  ;
7035  return 0;
7036}
7037_ACEOF
7038rm -f conftest.$ac_objext
7039if { (eval echo "$as_me:7039: \"$ac_compile\"") >&5
7040  (eval $ac_compile) 2>&5
7041  ac_status=$?
7042  echo "$as_me:7042: \$? = $ac_status" >&5
7043  (exit $ac_status); } &&
7044         { ac_try='test -s conftest.$ac_objext'
7045  { (eval echo "$as_me:7045: \"$ac_try\"") >&5
7046  (eval $ac_try) 2>&5
7047  ac_status=$?
7048  echo "$as_me:7048: \$? = $ac_status" >&5
7049  (exit $ac_status); }; }; then
7050  cf_cv_sysv=yes
7051else
7052  echo "$as_me: failed program was:" >&5
7053cat conftest.$ac_ext >&5
7054cf_cv_sysv=no
7055fi
7056rm -f conftest.$ac_objext conftest.$ac_ext
7057
7058fi
7059echo "$as_me:7059: result: $cf_cv_sysv" >&5
7060echo "${ECHO_T}$cf_cv_sysv" >&6
7061test "$cf_cv_sysv" = yes && cat >>confdefs.h <<\EOF
7062#define SYSV 1
7063EOF
7064
7065echo "$as_me:7065: checking for elf_begin in -lelf" >&5
7066echo $ECHO_N "checking for elf_begin in -lelf... $ECHO_C" >&6
7067if test "${ac_cv_lib_elf_elf_begin+set}" = set; then
7068  echo $ECHO_N "(cached) $ECHO_C" >&6
7069else
7070  ac_check_lib_save_LIBS=$LIBS
7071LIBS="-lelf  $LIBS"
7072cat >conftest.$ac_ext <<_ACEOF
7073#line 7073 "configure"
7074#include "confdefs.h"
7075
7076/* Override any gcc2 internal prototype to avoid an error.  */
7077#ifdef __cplusplus
7078extern "C"
7079#endif
7080/* We use char because int might match the return type of a gcc2
7081   builtin and then its argument prototype would still apply.  */
7082char elf_begin ();
7083int
7084main ()
7085{
7086elf_begin ();
7087  ;
7088  return 0;
7089}
7090_ACEOF
7091rm -f conftest.$ac_objext conftest$ac_exeext
7092if { (eval echo "$as_me:7092: \"$ac_link\"") >&5
7093  (eval $ac_link) 2>&5
7094  ac_status=$?
7095  echo "$as_me:7095: \$? = $ac_status" >&5
7096  (exit $ac_status); } &&
7097         { ac_try='test -s conftest$ac_exeext'
7098  { (eval echo "$as_me:7098: \"$ac_try\"") >&5
7099  (eval $ac_try) 2>&5
7100  ac_status=$?
7101  echo "$as_me:7101: \$? = $ac_status" >&5
7102  (exit $ac_status); }; }; then
7103  ac_cv_lib_elf_elf_begin=yes
7104else
7105  echo "$as_me: failed program was:" >&5
7106cat conftest.$ac_ext >&5
7107ac_cv_lib_elf_elf_begin=no
7108fi
7109rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7110LIBS=$ac_check_lib_save_LIBS
7111fi
7112echo "$as_me:7112: result: $ac_cv_lib_elf_elf_begin" >&5
7113echo "${ECHO_T}$ac_cv_lib_elf_elf_begin" >&6
7114if test $ac_cv_lib_elf_elf_begin = yes; then
7115
7116echo "$as_me:7116: checking if this is an SVR4 system" >&5
7117echo $ECHO_N "checking if this is an SVR4 system... $ECHO_C" >&6
7118if test "${cf_cv_svr4+set}" = set; then
7119  echo $ECHO_N "(cached) $ECHO_C" >&6
7120else
7121
7122cat >conftest.$ac_ext <<_ACEOF
7123#line 7123 "configure"
7124#include "confdefs.h"
7125
7126#include <elf.h>
7127#include <sys/termio.h>
7128
7129int
7130main ()
7131{
7132
7133static struct termio d_tio;
7134	d_tio.c_cc[VINTR] = 0;
7135	d_tio.c_cc[VQUIT] = 0;
7136	d_tio.c_cc[VERASE] = 0;
7137	d_tio.c_cc[VKILL] = 0;
7138	d_tio.c_cc[VEOF] = 0;
7139	d_tio.c_cc[VEOL] = 0;
7140	d_tio.c_cc[VMIN] = 0;
7141	d_tio.c_cc[VTIME] = 0;
7142	d_tio.c_cc[VLNEXT] = 0;
7143
7144  ;
7145  return 0;
7146}
7147_ACEOF
7148rm -f conftest.$ac_objext
7149if { (eval echo "$as_me:7149: \"$ac_compile\"") >&5
7150  (eval $ac_compile) 2>&5
7151  ac_status=$?
7152  echo "$as_me:7152: \$? = $ac_status" >&5
7153  (exit $ac_status); } &&
7154         { ac_try='test -s conftest.$ac_objext'
7155  { (eval echo "$as_me:7155: \"$ac_try\"") >&5
7156  (eval $ac_try) 2>&5
7157  ac_status=$?
7158  echo "$as_me:7158: \$? = $ac_status" >&5
7159  (exit $ac_status); }; }; then
7160  cf_cv_svr4=yes
7161else
7162  echo "$as_me: failed program was:" >&5
7163cat conftest.$ac_ext >&5
7164cf_cv_svr4=no
7165fi
7166rm -f conftest.$ac_objext conftest.$ac_ext
7167
7168fi
7169echo "$as_me:7169: result: $cf_cv_svr4" >&5
7170echo "${ECHO_T}$cf_cv_svr4" >&6
7171
7172fi
7173
7174test "$cf_cv_svr4" = yes && cat >>confdefs.h <<\EOF
7175#define SVR4 1
7176EOF
7177
7178echo "$as_me:7178: checking for X" >&5
7179echo $ECHO_N "checking for X... $ECHO_C" >&6
7180
7181# Check whether --with-x or --without-x was given.
7182if test "${with_x+set}" = set; then
7183  withval="$with_x"
7184
7185fi;
7186# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
7187if test "x$with_x" = xno; then
7188  # The user explicitly disabled X.
7189  have_x=disabled
7190else
7191  if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
7192    # Both variables are already set.
7193    have_x=yes
7194  else
7195    if test "${ac_cv_have_x+set}" = set; then
7196  echo $ECHO_N "(cached) $ECHO_C" >&6
7197else
7198  # One or both of the vars are not set, and there is no cached value.
7199ac_x_includes=no ac_x_libraries=no
7200rm -fr conftest.dir
7201if mkdir conftest.dir; then
7202  cd conftest.dir
7203  # Make sure to not put "make" in the Imakefile rules, since we grep it out.
7204  cat >Imakefile <<'EOF'
7205acfindx:
7206	@echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
7207EOF
7208  if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
7209    # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
7210    eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
7211    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
7212    for ac_extension in a so sl dylib dll; do
7213      if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
7214         test -f $ac_im_libdir/libX11.$ac_extension; then
7215        ac_im_usrlibdir=$ac_im_libdir; break
7216      fi
7217    done
7218    # Screen out bogus values from the imake configuration.  They are
7219    # bogus both because they are the default anyway, and because
7220    # using them would break gcc on systems where it needs fixed includes.
7221    case $ac_im_incroot in
7222	/usr/include) ;;
7223	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
7224    esac
7225    case $ac_im_usrlibdir in
7226	/usr/lib | /lib) ;;
7227	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
7228    esac
7229  fi
7230  cd ..
7231  rm -fr conftest.dir
7232fi
7233
7234# Standard set of common directories for X headers.
7235# Check X11 before X11Rn because it is often a symlink to the current release.
7236ac_x_header_dirs='
7237/usr/X11/include
7238/usr/X11R6/include
7239/usr/X11R5/include
7240/usr/X11R4/include
7241
7242/usr/include/X11
7243/usr/include/X11R6
7244/usr/include/X11R5
7245/usr/include/X11R4
7246
7247/usr/local/X11/include
7248/usr/local/X11R6/include
7249/usr/local/X11R5/include
7250/usr/local/X11R4/include
7251
7252/usr/local/include/X11
7253/usr/local/include/X11R6
7254/usr/local/include/X11R5
7255/usr/local/include/X11R4
7256
7257/usr/X386/include
7258/usr/x386/include
7259/usr/XFree86/include/X11
7260
7261/usr/include
7262/usr/local/include
7263/usr/unsupported/include
7264/usr/athena/include
7265/usr/local/x11r5/include
7266/usr/lpp/Xamples/include
7267
7268/usr/openwin/include
7269/usr/openwin/share/include'
7270
7271if test "$ac_x_includes" = no; then
7272  # Guess where to find include files, by looking for Intrinsic.h.
7273  # First, try using that file with no special directory specified.
7274  cat >conftest.$ac_ext <<_ACEOF
7275#line 7275 "configure"
7276#include "confdefs.h"
7277#include <X11/Intrinsic.h>
7278_ACEOF
7279if { (eval echo "$as_me:7279: \"$ac_cpp conftest.$ac_ext\"") >&5
7280  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7281  ac_status=$?
7282  egrep -v '^ *\+' conftest.er1 >conftest.err
7283  rm -f conftest.er1
7284  cat conftest.err >&5
7285  echo "$as_me:7285: \$? = $ac_status" >&5
7286  (exit $ac_status); } >/dev/null; then
7287  if test -s conftest.err; then
7288    ac_cpp_err=$ac_c_preproc_warn_flag
7289  else
7290    ac_cpp_err=
7291  fi
7292else
7293  ac_cpp_err=yes
7294fi
7295if test -z "$ac_cpp_err"; then
7296  # We can compile using X headers with no special include directory.
7297ac_x_includes=
7298else
7299  echo "$as_me: failed program was:" >&5
7300  cat conftest.$ac_ext >&5
7301  for ac_dir in $ac_x_header_dirs; do
7302  if test -r "$ac_dir/X11/Intrinsic.h"; then
7303    ac_x_includes=$ac_dir
7304    break
7305  fi
7306done
7307fi
7308rm -f conftest.err conftest.$ac_ext
7309fi # $ac_x_includes = no
7310
7311if test "$ac_x_libraries" = no; then
7312  # Check for the libraries.
7313  # See if we find them without any special options.
7314  # Don't add to $LIBS permanently.
7315  ac_save_LIBS=$LIBS
7316  LIBS="-lXt $LIBS"
7317  cat >conftest.$ac_ext <<_ACEOF
7318#line 7318 "configure"
7319#include "confdefs.h"
7320#include <X11/Intrinsic.h>
7321int
7322main ()
7323{
7324XtMalloc (0)
7325  ;
7326  return 0;
7327}
7328_ACEOF
7329rm -f conftest.$ac_objext conftest$ac_exeext
7330if { (eval echo "$as_me:7330: \"$ac_link\"") >&5
7331  (eval $ac_link) 2>&5
7332  ac_status=$?
7333  echo "$as_me:7333: \$? = $ac_status" >&5
7334  (exit $ac_status); } &&
7335         { ac_try='test -s conftest$ac_exeext'
7336  { (eval echo "$as_me:7336: \"$ac_try\"") >&5
7337  (eval $ac_try) 2>&5
7338  ac_status=$?
7339  echo "$as_me:7339: \$? = $ac_status" >&5
7340  (exit $ac_status); }; }; then
7341  LIBS=$ac_save_LIBS
7342# We can link X programs with no special library path.
7343ac_x_libraries=
7344else
7345  echo "$as_me: failed program was:" >&5
7346cat conftest.$ac_ext >&5
7347LIBS=$ac_save_LIBS
7348for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
7349do
7350  # Don't even attempt the hair of trying to link an X program!
7351  for ac_extension in a so sl dylib dll; do
7352    if test -r $ac_dir/libXt.$ac_extension; then
7353      ac_x_libraries=$ac_dir
7354      break 2
7355    fi
7356  done
7357done
7358fi
7359rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7360fi # $ac_x_libraries = no
7361
7362if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
7363  # Didn't find X anywhere.  Cache the known absence of X.
7364  ac_cv_have_x="have_x=no"
7365else
7366  # Record where we found X for the cache.
7367  ac_cv_have_x="have_x=yes \
7368	        ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
7369fi
7370fi
7371
7372  fi
7373  eval "$ac_cv_have_x"
7374fi # $with_x != no
7375
7376if test "$have_x" != yes; then
7377  echo "$as_me:7377: result: $have_x" >&5
7378echo "${ECHO_T}$have_x" >&6
7379  no_x=yes
7380else
7381  # If each of the values was on the command line, it overrides each guess.
7382  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
7383  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
7384  # Update the cache value to reflect the command line values.
7385  ac_cv_have_x="have_x=yes \
7386		ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
7387  echo "$as_me:7387: result: libraries $x_libraries, headers $x_includes" >&5
7388echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6
7389fi
7390
7391if test "$no_x" = yes; then
7392  # Not all programs may use this symbol, but it does not hurt to define it.
7393
7394cat >>confdefs.h <<\EOF
7395#define X_DISPLAY_MISSING 1
7396EOF
7397
7398  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
7399else
7400  if test -n "$x_includes"; then
7401    X_CFLAGS="$X_CFLAGS -I$x_includes"
7402  fi
7403
7404  # It would also be nice to do this for all -L options, not just this one.
7405  if test -n "$x_libraries"; then
7406    X_LIBS="$X_LIBS -L$x_libraries"
7407    # For Solaris; some versions of Sun CC require a space after -R and
7408    # others require no space.  Words are not sufficient . . . .
7409    case `(uname -sr) 2>/dev/null` in
7410    "SunOS 5"*)
7411      echo "$as_me:7411: checking whether -R must be followed by a space" >&5
7412echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6
7413      ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
7414      cat >conftest.$ac_ext <<_ACEOF
7415#line 7415 "configure"
7416#include "confdefs.h"
7417
7418int
7419main ()
7420{
7421
7422  ;
7423  return 0;
7424}
7425_ACEOF
7426rm -f conftest.$ac_objext conftest$ac_exeext
7427if { (eval echo "$as_me:7427: \"$ac_link\"") >&5
7428  (eval $ac_link) 2>&5
7429  ac_status=$?
7430  echo "$as_me:7430: \$? = $ac_status" >&5
7431  (exit $ac_status); } &&
7432         { ac_try='test -s conftest$ac_exeext'
7433  { (eval echo "$as_me:7433: \"$ac_try\"") >&5
7434  (eval $ac_try) 2>&5
7435  ac_status=$?
7436  echo "$as_me:7436: \$? = $ac_status" >&5
7437  (exit $ac_status); }; }; then
7438  ac_R_nospace=yes
7439else
7440  echo "$as_me: failed program was:" >&5
7441cat conftest.$ac_ext >&5
7442ac_R_nospace=no
7443fi
7444rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7445      if test $ac_R_nospace = yes; then
7446	echo "$as_me:7446: result: no" >&5
7447echo "${ECHO_T}no" >&6
7448	X_LIBS="$X_LIBS -R$x_libraries"
7449      else
7450	LIBS="$ac_xsave_LIBS -R $x_libraries"
7451	cat >conftest.$ac_ext <<_ACEOF
7452#line 7452 "configure"
7453#include "confdefs.h"
7454
7455int
7456main ()
7457{
7458
7459  ;
7460  return 0;
7461}
7462_ACEOF
7463rm -f conftest.$ac_objext conftest$ac_exeext
7464if { (eval echo "$as_me:7464: \"$ac_link\"") >&5
7465  (eval $ac_link) 2>&5
7466  ac_status=$?
7467  echo "$as_me:7467: \$? = $ac_status" >&5
7468  (exit $ac_status); } &&
7469         { ac_try='test -s conftest$ac_exeext'
7470  { (eval echo "$as_me:7470: \"$ac_try\"") >&5
7471  (eval $ac_try) 2>&5
7472  ac_status=$?
7473  echo "$as_me:7473: \$? = $ac_status" >&5
7474  (exit $ac_status); }; }; then
7475  ac_R_space=yes
7476else
7477  echo "$as_me: failed program was:" >&5
7478cat conftest.$ac_ext >&5
7479ac_R_space=no
7480fi
7481rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7482	if test $ac_R_space = yes; then
7483	  echo "$as_me:7483: result: yes" >&5
7484echo "${ECHO_T}yes" >&6
7485	  X_LIBS="$X_LIBS -R $x_libraries"
7486	else
7487	  echo "$as_me:7487: result: neither works" >&5
7488echo "${ECHO_T}neither works" >&6
7489	fi
7490      fi
7491      LIBS=$ac_xsave_LIBS
7492    esac
7493  fi
7494
7495  # Check for system-dependent libraries X programs must link with.
7496  # Do this before checking for the system-independent R6 libraries
7497  # (-lICE), since we may need -lsocket or whatever for X linking.
7498
7499  if test "$ISC" = yes; then
7500    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
7501  else
7502    # Martyn Johnson says this is needed for Ultrix, if the X
7503    # libraries were built with DECnet support.  And Karl Berry says
7504    # the Alpha needs dnet_stub (dnet does not exist).
7505    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
7506    cat >conftest.$ac_ext <<_ACEOF
7507#line 7507 "configure"
7508#include "confdefs.h"
7509
7510/* Override any gcc2 internal prototype to avoid an error.  */
7511#ifdef __cplusplus
7512extern "C"
7513#endif
7514/* We use char because int might match the return type of a gcc2
7515   builtin and then its argument prototype would still apply.  */
7516char XOpenDisplay ();
7517int
7518main ()
7519{
7520XOpenDisplay ();
7521  ;
7522  return 0;
7523}
7524_ACEOF
7525rm -f conftest.$ac_objext conftest$ac_exeext
7526if { (eval echo "$as_me:7526: \"$ac_link\"") >&5
7527  (eval $ac_link) 2>&5
7528  ac_status=$?
7529  echo "$as_me:7529: \$? = $ac_status" >&5
7530  (exit $ac_status); } &&
7531         { ac_try='test -s conftest$ac_exeext'
7532  { (eval echo "$as_me:7532: \"$ac_try\"") >&5
7533  (eval $ac_try) 2>&5
7534  ac_status=$?
7535  echo "$as_me:7535: \$? = $ac_status" >&5
7536  (exit $ac_status); }; }; then
7537  :
7538else
7539  echo "$as_me: failed program was:" >&5
7540cat conftest.$ac_ext >&5
7541echo "$as_me:7541: checking for dnet_ntoa in -ldnet" >&5
7542echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6
7543if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
7544  echo $ECHO_N "(cached) $ECHO_C" >&6
7545else
7546  ac_check_lib_save_LIBS=$LIBS
7547LIBS="-ldnet  $LIBS"
7548cat >conftest.$ac_ext <<_ACEOF
7549#line 7549 "configure"
7550#include "confdefs.h"
7551
7552/* Override any gcc2 internal prototype to avoid an error.  */
7553#ifdef __cplusplus
7554extern "C"
7555#endif
7556/* We use char because int might match the return type of a gcc2
7557   builtin and then its argument prototype would still apply.  */
7558char dnet_ntoa ();
7559int
7560main ()
7561{
7562dnet_ntoa ();
7563  ;
7564  return 0;
7565}
7566_ACEOF
7567rm -f conftest.$ac_objext conftest$ac_exeext
7568if { (eval echo "$as_me:7568: \"$ac_link\"") >&5
7569  (eval $ac_link) 2>&5
7570  ac_status=$?
7571  echo "$as_me:7571: \$? = $ac_status" >&5
7572  (exit $ac_status); } &&
7573         { ac_try='test -s conftest$ac_exeext'
7574  { (eval echo "$as_me:7574: \"$ac_try\"") >&5
7575  (eval $ac_try) 2>&5
7576  ac_status=$?
7577  echo "$as_me:7577: \$? = $ac_status" >&5
7578  (exit $ac_status); }; }; then
7579  ac_cv_lib_dnet_dnet_ntoa=yes
7580else
7581  echo "$as_me: failed program was:" >&5
7582cat conftest.$ac_ext >&5
7583ac_cv_lib_dnet_dnet_ntoa=no
7584fi
7585rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7586LIBS=$ac_check_lib_save_LIBS
7587fi
7588echo "$as_me:7588: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
7589echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6
7590if test $ac_cv_lib_dnet_dnet_ntoa = yes; then
7591  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
7592fi
7593
7594    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
7595      echo "$as_me:7595: checking for dnet_ntoa in -ldnet_stub" >&5
7596echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6
7597if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then
7598  echo $ECHO_N "(cached) $ECHO_C" >&6
7599else
7600  ac_check_lib_save_LIBS=$LIBS
7601LIBS="-ldnet_stub  $LIBS"
7602cat >conftest.$ac_ext <<_ACEOF
7603#line 7603 "configure"
7604#include "confdefs.h"
7605
7606/* Override any gcc2 internal prototype to avoid an error.  */
7607#ifdef __cplusplus
7608extern "C"
7609#endif
7610/* We use char because int might match the return type of a gcc2
7611   builtin and then its argument prototype would still apply.  */
7612char dnet_ntoa ();
7613int
7614main ()
7615{
7616dnet_ntoa ();
7617  ;
7618  return 0;
7619}
7620_ACEOF
7621rm -f conftest.$ac_objext conftest$ac_exeext
7622if { (eval echo "$as_me:7622: \"$ac_link\"") >&5
7623  (eval $ac_link) 2>&5
7624  ac_status=$?
7625  echo "$as_me:7625: \$? = $ac_status" >&5
7626  (exit $ac_status); } &&
7627         { ac_try='test -s conftest$ac_exeext'
7628  { (eval echo "$as_me:7628: \"$ac_try\"") >&5
7629  (eval $ac_try) 2>&5
7630  ac_status=$?
7631  echo "$as_me:7631: \$? = $ac_status" >&5
7632  (exit $ac_status); }; }; then
7633  ac_cv_lib_dnet_stub_dnet_ntoa=yes
7634else
7635  echo "$as_me: failed program was:" >&5
7636cat conftest.$ac_ext >&5
7637ac_cv_lib_dnet_stub_dnet_ntoa=no
7638fi
7639rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7640LIBS=$ac_check_lib_save_LIBS
7641fi
7642echo "$as_me:7642: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
7643echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6
7644if test $ac_cv_lib_dnet_stub_dnet_ntoa = yes; then
7645  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
7646fi
7647
7648    fi
7649fi
7650rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7651    LIBS="$ac_xsave_LIBS"
7652
7653    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
7654    # to get the SysV transport functions.
7655    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
7656    # needs -lnsl.
7657    # The nsl library prevents programs from opening the X display
7658    # on Irix 5.2, according to T.E. Dickey.
7659    # The functions gethostbyname, getservbyname, and inet_addr are
7660    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
7661    echo "$as_me:7661: checking for gethostbyname" >&5
7662echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6
7663if test "${ac_cv_func_gethostbyname+set}" = set; then
7664  echo $ECHO_N "(cached) $ECHO_C" >&6
7665else
7666  cat >conftest.$ac_ext <<_ACEOF
7667#line 7667 "configure"
7668#include "confdefs.h"
7669/* System header to define __stub macros and hopefully few prototypes,
7670    which can conflict with char gethostbyname (); below.  */
7671#include <assert.h>
7672/* Override any gcc2 internal prototype to avoid an error.  */
7673#ifdef __cplusplus
7674extern "C"
7675#endif
7676/* We use char because int might match the return type of a gcc2
7677   builtin and then its argument prototype would still apply.  */
7678char gethostbyname ();
7679char (*f) ();
7680
7681int
7682main ()
7683{
7684/* The GNU C library defines this for functions which it implements
7685    to always fail with ENOSYS.  Some functions are actually named
7686    something starting with __ and the normal name is an alias.  */
7687#if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
7688choke me
7689#else
7690f = gethostbyname;
7691#endif
7692
7693  ;
7694  return 0;
7695}
7696_ACEOF
7697rm -f conftest.$ac_objext conftest$ac_exeext
7698if { (eval echo "$as_me:7698: \"$ac_link\"") >&5
7699  (eval $ac_link) 2>&5
7700  ac_status=$?
7701  echo "$as_me:7701: \$? = $ac_status" >&5
7702  (exit $ac_status); } &&
7703         { ac_try='test -s conftest$ac_exeext'
7704  { (eval echo "$as_me:7704: \"$ac_try\"") >&5
7705  (eval $ac_try) 2>&5
7706  ac_status=$?
7707  echo "$as_me:7707: \$? = $ac_status" >&5
7708  (exit $ac_status); }; }; then
7709  ac_cv_func_gethostbyname=yes
7710else
7711  echo "$as_me: failed program was:" >&5
7712cat conftest.$ac_ext >&5
7713ac_cv_func_gethostbyname=no
7714fi
7715rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7716fi
7717echo "$as_me:7717: result: $ac_cv_func_gethostbyname" >&5
7718echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6
7719
7720    if test $ac_cv_func_gethostbyname = no; then
7721      echo "$as_me:7721: checking for gethostbyname in -lnsl" >&5
7722echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6
7723if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
7724  echo $ECHO_N "(cached) $ECHO_C" >&6
7725else
7726  ac_check_lib_save_LIBS=$LIBS
7727LIBS="-lnsl  $LIBS"
7728cat >conftest.$ac_ext <<_ACEOF
7729#line 7729 "configure"
7730#include "confdefs.h"
7731
7732/* Override any gcc2 internal prototype to avoid an error.  */
7733#ifdef __cplusplus
7734extern "C"
7735#endif
7736/* We use char because int might match the return type of a gcc2
7737   builtin and then its argument prototype would still apply.  */
7738char gethostbyname ();
7739int
7740main ()
7741{
7742gethostbyname ();
7743  ;
7744  return 0;
7745}
7746_ACEOF
7747rm -f conftest.$ac_objext conftest$ac_exeext
7748if { (eval echo "$as_me:7748: \"$ac_link\"") >&5
7749  (eval $ac_link) 2>&5
7750  ac_status=$?
7751  echo "$as_me:7751: \$? = $ac_status" >&5
7752  (exit $ac_status); } &&
7753         { ac_try='test -s conftest$ac_exeext'
7754  { (eval echo "$as_me:7754: \"$ac_try\"") >&5
7755  (eval $ac_try) 2>&5
7756  ac_status=$?
7757  echo "$as_me:7757: \$? = $ac_status" >&5
7758  (exit $ac_status); }; }; then
7759  ac_cv_lib_nsl_gethostbyname=yes
7760else
7761  echo "$as_me: failed program was:" >&5
7762cat conftest.$ac_ext >&5
7763ac_cv_lib_nsl_gethostbyname=no
7764fi
7765rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7766LIBS=$ac_check_lib_save_LIBS
7767fi
7768echo "$as_me:7768: result: $ac_cv_lib_nsl_gethostbyname" >&5
7769echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6
7770if test $ac_cv_lib_nsl_gethostbyname = yes; then
7771  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
7772fi
7773
7774      if test $ac_cv_lib_nsl_gethostbyname = no; then
7775        echo "$as_me:7775: checking for gethostbyname in -lbsd" >&5
7776echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6
7777if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then
7778  echo $ECHO_N "(cached) $ECHO_C" >&6
7779else
7780  ac_check_lib_save_LIBS=$LIBS
7781LIBS="-lbsd  $LIBS"
7782cat >conftest.$ac_ext <<_ACEOF
7783#line 7783 "configure"
7784#include "confdefs.h"
7785
7786/* Override any gcc2 internal prototype to avoid an error.  */
7787#ifdef __cplusplus
7788extern "C"
7789#endif
7790/* We use char because int might match the return type of a gcc2
7791   builtin and then its argument prototype would still apply.  */
7792char gethostbyname ();
7793int
7794main ()
7795{
7796gethostbyname ();
7797  ;
7798  return 0;
7799}
7800_ACEOF
7801rm -f conftest.$ac_objext conftest$ac_exeext
7802if { (eval echo "$as_me:7802: \"$ac_link\"") >&5
7803  (eval $ac_link) 2>&5
7804  ac_status=$?
7805  echo "$as_me:7805: \$? = $ac_status" >&5
7806  (exit $ac_status); } &&
7807         { ac_try='test -s conftest$ac_exeext'
7808  { (eval echo "$as_me:7808: \"$ac_try\"") >&5
7809  (eval $ac_try) 2>&5
7810  ac_status=$?
7811  echo "$as_me:7811: \$? = $ac_status" >&5
7812  (exit $ac_status); }; }; then
7813  ac_cv_lib_bsd_gethostbyname=yes
7814else
7815  echo "$as_me: failed program was:" >&5
7816cat conftest.$ac_ext >&5
7817ac_cv_lib_bsd_gethostbyname=no
7818fi
7819rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7820LIBS=$ac_check_lib_save_LIBS
7821fi
7822echo "$as_me:7822: result: $ac_cv_lib_bsd_gethostbyname" >&5
7823echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6
7824if test $ac_cv_lib_bsd_gethostbyname = yes; then
7825  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
7826fi
7827
7828      fi
7829    fi
7830
7831    # lieder@skyler.mavd.honeywell.com says without -lsocket,
7832    # socket/setsockopt and other routines are undefined under SCO ODT
7833    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
7834    # on later versions), says Simon Leinen: it contains gethostby*
7835    # variants that don't use the nameserver (or something).  -lsocket
7836    # must be given before -lnsl if both are needed.  We assume that
7837    # if connect needs -lnsl, so does gethostbyname.
7838    echo "$as_me:7838: checking for connect" >&5
7839echo $ECHO_N "checking for connect... $ECHO_C" >&6
7840if test "${ac_cv_func_connect+set}" = set; then
7841  echo $ECHO_N "(cached) $ECHO_C" >&6
7842else
7843  cat >conftest.$ac_ext <<_ACEOF
7844#line 7844 "configure"
7845#include "confdefs.h"
7846/* System header to define __stub macros and hopefully few prototypes,
7847    which can conflict with char connect (); below.  */
7848#include <assert.h>
7849/* Override any gcc2 internal prototype to avoid an error.  */
7850#ifdef __cplusplus
7851extern "C"
7852#endif
7853/* We use char because int might match the return type of a gcc2
7854   builtin and then its argument prototype would still apply.  */
7855char connect ();
7856char (*f) ();
7857
7858int
7859main ()
7860{
7861/* The GNU C library defines this for functions which it implements
7862    to always fail with ENOSYS.  Some functions are actually named
7863    something starting with __ and the normal name is an alias.  */
7864#if defined (__stub_connect) || defined (__stub___connect)
7865choke me
7866#else
7867f = connect;
7868#endif
7869
7870  ;
7871  return 0;
7872}
7873_ACEOF
7874rm -f conftest.$ac_objext conftest$ac_exeext
7875if { (eval echo "$as_me:7875: \"$ac_link\"") >&5
7876  (eval $ac_link) 2>&5
7877  ac_status=$?
7878  echo "$as_me:7878: \$? = $ac_status" >&5
7879  (exit $ac_status); } &&
7880         { ac_try='test -s conftest$ac_exeext'
7881  { (eval echo "$as_me:7881: \"$ac_try\"") >&5
7882  (eval $ac_try) 2>&5
7883  ac_status=$?
7884  echo "$as_me:7884: \$? = $ac_status" >&5
7885  (exit $ac_status); }; }; then
7886  ac_cv_func_connect=yes
7887else
7888  echo "$as_me: failed program was:" >&5
7889cat conftest.$ac_ext >&5
7890ac_cv_func_connect=no
7891fi
7892rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7893fi
7894echo "$as_me:7894: result: $ac_cv_func_connect" >&5
7895echo "${ECHO_T}$ac_cv_func_connect" >&6
7896
7897    if test $ac_cv_func_connect = no; then
7898      echo "$as_me:7898: checking for connect in -lsocket" >&5
7899echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6
7900if test "${ac_cv_lib_socket_connect+set}" = set; then
7901  echo $ECHO_N "(cached) $ECHO_C" >&6
7902else
7903  ac_check_lib_save_LIBS=$LIBS
7904LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
7905cat >conftest.$ac_ext <<_ACEOF
7906#line 7906 "configure"
7907#include "confdefs.h"
7908
7909/* Override any gcc2 internal prototype to avoid an error.  */
7910#ifdef __cplusplus
7911extern "C"
7912#endif
7913/* We use char because int might match the return type of a gcc2
7914   builtin and then its argument prototype would still apply.  */
7915char connect ();
7916int
7917main ()
7918{
7919connect ();
7920  ;
7921  return 0;
7922}
7923_ACEOF
7924rm -f conftest.$ac_objext conftest$ac_exeext
7925if { (eval echo "$as_me:7925: \"$ac_link\"") >&5
7926  (eval $ac_link) 2>&5
7927  ac_status=$?
7928  echo "$as_me:7928: \$? = $ac_status" >&5
7929  (exit $ac_status); } &&
7930         { ac_try='test -s conftest$ac_exeext'
7931  { (eval echo "$as_me:7931: \"$ac_try\"") >&5
7932  (eval $ac_try) 2>&5
7933  ac_status=$?
7934  echo "$as_me:7934: \$? = $ac_status" >&5
7935  (exit $ac_status); }; }; then
7936  ac_cv_lib_socket_connect=yes
7937else
7938  echo "$as_me: failed program was:" >&5
7939cat conftest.$ac_ext >&5
7940ac_cv_lib_socket_connect=no
7941fi
7942rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7943LIBS=$ac_check_lib_save_LIBS
7944fi
7945echo "$as_me:7945: result: $ac_cv_lib_socket_connect" >&5
7946echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6
7947if test $ac_cv_lib_socket_connect = yes; then
7948  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
7949fi
7950
7951    fi
7952
7953    # Guillermo Gomez says -lposix is necessary on A/UX.
7954    echo "$as_me:7954: checking for remove" >&5
7955echo $ECHO_N "checking for remove... $ECHO_C" >&6
7956if test "${ac_cv_func_remove+set}" = set; then
7957  echo $ECHO_N "(cached) $ECHO_C" >&6
7958else
7959  cat >conftest.$ac_ext <<_ACEOF
7960#line 7960 "configure"
7961#include "confdefs.h"
7962/* System header to define __stub macros and hopefully few prototypes,
7963    which can conflict with char remove (); below.  */
7964#include <assert.h>
7965/* Override any gcc2 internal prototype to avoid an error.  */
7966#ifdef __cplusplus
7967extern "C"
7968#endif
7969/* We use char because int might match the return type of a gcc2
7970   builtin and then its argument prototype would still apply.  */
7971char remove ();
7972char (*f) ();
7973
7974int
7975main ()
7976{
7977/* The GNU C library defines this for functions which it implements
7978    to always fail with ENOSYS.  Some functions are actually named
7979    something starting with __ and the normal name is an alias.  */
7980#if defined (__stub_remove) || defined (__stub___remove)
7981choke me
7982#else
7983f = remove;
7984#endif
7985
7986  ;
7987  return 0;
7988}
7989_ACEOF
7990rm -f conftest.$ac_objext conftest$ac_exeext
7991if { (eval echo "$as_me:7991: \"$ac_link\"") >&5
7992  (eval $ac_link) 2>&5
7993  ac_status=$?
7994  echo "$as_me:7994: \$? = $ac_status" >&5
7995  (exit $ac_status); } &&
7996         { ac_try='test -s conftest$ac_exeext'
7997  { (eval echo "$as_me:7997: \"$ac_try\"") >&5
7998  (eval $ac_try) 2>&5
7999  ac_status=$?
8000  echo "$as_me:8000: \$? = $ac_status" >&5
8001  (exit $ac_status); }; }; then
8002  ac_cv_func_remove=yes
8003else
8004  echo "$as_me: failed program was:" >&5
8005cat conftest.$ac_ext >&5
8006ac_cv_func_remove=no
8007fi
8008rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8009fi
8010echo "$as_me:8010: result: $ac_cv_func_remove" >&5
8011echo "${ECHO_T}$ac_cv_func_remove" >&6
8012
8013    if test $ac_cv_func_remove = no; then
8014      echo "$as_me:8014: checking for remove in -lposix" >&5
8015echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6
8016if test "${ac_cv_lib_posix_remove+set}" = set; then
8017  echo $ECHO_N "(cached) $ECHO_C" >&6
8018else
8019  ac_check_lib_save_LIBS=$LIBS
8020LIBS="-lposix  $LIBS"
8021cat >conftest.$ac_ext <<_ACEOF
8022#line 8022 "configure"
8023#include "confdefs.h"
8024
8025/* Override any gcc2 internal prototype to avoid an error.  */
8026#ifdef __cplusplus
8027extern "C"
8028#endif
8029/* We use char because int might match the return type of a gcc2
8030   builtin and then its argument prototype would still apply.  */
8031char remove ();
8032int
8033main ()
8034{
8035remove ();
8036  ;
8037  return 0;
8038}
8039_ACEOF
8040rm -f conftest.$ac_objext conftest$ac_exeext
8041if { (eval echo "$as_me:8041: \"$ac_link\"") >&5
8042  (eval $ac_link) 2>&5
8043  ac_status=$?
8044  echo "$as_me:8044: \$? = $ac_status" >&5
8045  (exit $ac_status); } &&
8046         { ac_try='test -s conftest$ac_exeext'
8047  { (eval echo "$as_me:8047: \"$ac_try\"") >&5
8048  (eval $ac_try) 2>&5
8049  ac_status=$?
8050  echo "$as_me:8050: \$? = $ac_status" >&5
8051  (exit $ac_status); }; }; then
8052  ac_cv_lib_posix_remove=yes
8053else
8054  echo "$as_me: failed program was:" >&5
8055cat conftest.$ac_ext >&5
8056ac_cv_lib_posix_remove=no
8057fi
8058rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8059LIBS=$ac_check_lib_save_LIBS
8060fi
8061echo "$as_me:8061: result: $ac_cv_lib_posix_remove" >&5
8062echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6
8063if test $ac_cv_lib_posix_remove = yes; then
8064  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
8065fi
8066
8067    fi
8068
8069    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
8070    echo "$as_me:8070: checking for shmat" >&5
8071echo $ECHO_N "checking for shmat... $ECHO_C" >&6
8072if test "${ac_cv_func_shmat+set}" = set; then
8073  echo $ECHO_N "(cached) $ECHO_C" >&6
8074else
8075  cat >conftest.$ac_ext <<_ACEOF
8076#line 8076 "configure"
8077#include "confdefs.h"
8078/* System header to define __stub macros and hopefully few prototypes,
8079    which can conflict with char shmat (); below.  */
8080#include <assert.h>
8081/* Override any gcc2 internal prototype to avoid an error.  */
8082#ifdef __cplusplus
8083extern "C"
8084#endif
8085/* We use char because int might match the return type of a gcc2
8086   builtin and then its argument prototype would still apply.  */
8087char shmat ();
8088char (*f) ();
8089
8090int
8091main ()
8092{
8093/* The GNU C library defines this for functions which it implements
8094    to always fail with ENOSYS.  Some functions are actually named
8095    something starting with __ and the normal name is an alias.  */
8096#if defined (__stub_shmat) || defined (__stub___shmat)
8097choke me
8098#else
8099f = shmat;
8100#endif
8101
8102  ;
8103  return 0;
8104}
8105_ACEOF
8106rm -f conftest.$ac_objext conftest$ac_exeext
8107if { (eval echo "$as_me:8107: \"$ac_link\"") >&5
8108  (eval $ac_link) 2>&5
8109  ac_status=$?
8110  echo "$as_me:8110: \$? = $ac_status" >&5
8111  (exit $ac_status); } &&
8112         { ac_try='test -s conftest$ac_exeext'
8113  { (eval echo "$as_me:8113: \"$ac_try\"") >&5
8114  (eval $ac_try) 2>&5
8115  ac_status=$?
8116  echo "$as_me:8116: \$? = $ac_status" >&5
8117  (exit $ac_status); }; }; then
8118  ac_cv_func_shmat=yes
8119else
8120  echo "$as_me: failed program was:" >&5
8121cat conftest.$ac_ext >&5
8122ac_cv_func_shmat=no
8123fi
8124rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8125fi
8126echo "$as_me:8126: result: $ac_cv_func_shmat" >&5
8127echo "${ECHO_T}$ac_cv_func_shmat" >&6
8128
8129    if test $ac_cv_func_shmat = no; then
8130      echo "$as_me:8130: checking for shmat in -lipc" >&5
8131echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6
8132if test "${ac_cv_lib_ipc_shmat+set}" = set; then
8133  echo $ECHO_N "(cached) $ECHO_C" >&6
8134else
8135  ac_check_lib_save_LIBS=$LIBS
8136LIBS="-lipc  $LIBS"
8137cat >conftest.$ac_ext <<_ACEOF
8138#line 8138 "configure"
8139#include "confdefs.h"
8140
8141/* Override any gcc2 internal prototype to avoid an error.  */
8142#ifdef __cplusplus
8143extern "C"
8144#endif
8145/* We use char because int might match the return type of a gcc2
8146   builtin and then its argument prototype would still apply.  */
8147char shmat ();
8148int
8149main ()
8150{
8151shmat ();
8152  ;
8153  return 0;
8154}
8155_ACEOF
8156rm -f conftest.$ac_objext conftest$ac_exeext
8157if { (eval echo "$as_me:8157: \"$ac_link\"") >&5
8158  (eval $ac_link) 2>&5
8159  ac_status=$?
8160  echo "$as_me:8160: \$? = $ac_status" >&5
8161  (exit $ac_status); } &&
8162         { ac_try='test -s conftest$ac_exeext'
8163  { (eval echo "$as_me:8163: \"$ac_try\"") >&5
8164  (eval $ac_try) 2>&5
8165  ac_status=$?
8166  echo "$as_me:8166: \$? = $ac_status" >&5
8167  (exit $ac_status); }; }; then
8168  ac_cv_lib_ipc_shmat=yes
8169else
8170  echo "$as_me: failed program was:" >&5
8171cat conftest.$ac_ext >&5
8172ac_cv_lib_ipc_shmat=no
8173fi
8174rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8175LIBS=$ac_check_lib_save_LIBS
8176fi
8177echo "$as_me:8177: result: $ac_cv_lib_ipc_shmat" >&5
8178echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6
8179if test $ac_cv_lib_ipc_shmat = yes; then
8180  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
8181fi
8182
8183    fi
8184  fi
8185
8186  # Check for libraries that X11R6 Xt/Xaw programs need.
8187  ac_save_LDFLAGS=$LDFLAGS
8188  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
8189  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
8190  # check for ICE first), but we must link in the order -lSM -lICE or
8191  # we get undefined symbols.  So assume we have SM if we have ICE.
8192  # These have to be linked with before -lX11, unlike the other
8193  # libraries we check for below, so use a different variable.
8194  # John Interrante, Karl Berry
8195  echo "$as_me:8195: checking for IceConnectionNumber in -lICE" >&5
8196echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6
8197if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then
8198  echo $ECHO_N "(cached) $ECHO_C" >&6
8199else
8200  ac_check_lib_save_LIBS=$LIBS
8201LIBS="-lICE $X_EXTRA_LIBS $LIBS"
8202cat >conftest.$ac_ext <<_ACEOF
8203#line 8203 "configure"
8204#include "confdefs.h"
8205
8206/* Override any gcc2 internal prototype to avoid an error.  */
8207#ifdef __cplusplus
8208extern "C"
8209#endif
8210/* We use char because int might match the return type of a gcc2
8211   builtin and then its argument prototype would still apply.  */
8212char IceConnectionNumber ();
8213int
8214main ()
8215{
8216IceConnectionNumber ();
8217  ;
8218  return 0;
8219}
8220_ACEOF
8221rm -f conftest.$ac_objext conftest$ac_exeext
8222if { (eval echo "$as_me:8222: \"$ac_link\"") >&5
8223  (eval $ac_link) 2>&5
8224  ac_status=$?
8225  echo "$as_me:8225: \$? = $ac_status" >&5
8226  (exit $ac_status); } &&
8227         { ac_try='test -s conftest$ac_exeext'
8228  { (eval echo "$as_me:8228: \"$ac_try\"") >&5
8229  (eval $ac_try) 2>&5
8230  ac_status=$?
8231  echo "$as_me:8231: \$? = $ac_status" >&5
8232  (exit $ac_status); }; }; then
8233  ac_cv_lib_ICE_IceConnectionNumber=yes
8234else
8235  echo "$as_me: failed program was:" >&5
8236cat conftest.$ac_ext >&5
8237ac_cv_lib_ICE_IceConnectionNumber=no
8238fi
8239rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8240LIBS=$ac_check_lib_save_LIBS
8241fi
8242echo "$as_me:8242: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
8243echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6
8244if test $ac_cv_lib_ICE_IceConnectionNumber = yes; then
8245  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
8246fi
8247
8248  LDFLAGS=$ac_save_LDFLAGS
8249
8250fi
8251
8252echo "$as_me:8252: checking if you want to use pkg-config" >&5
8253echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
8254
8255# Check whether --with-pkg-config or --without-pkg-config was given.
8256if test "${with_pkg_config+set}" = set; then
8257  withval="$with_pkg_config"
8258  cf_pkg_config=$withval
8259else
8260  cf_pkg_config=yes
8261fi;
8262echo "$as_me:8262: result: $cf_pkg_config" >&5
8263echo "${ECHO_T}$cf_pkg_config" >&6
8264
8265case $cf_pkg_config in #(vi
8266no) #(vi
8267	PKG_CONFIG=none
8268	;;
8269yes) #(vi
8270	# Extract the first word of "pkg-config", so it can be a program name with args.
8271set dummy pkg-config; ac_word=$2
8272echo "$as_me:8272: checking for $ac_word" >&5
8273echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8274if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
8275  echo $ECHO_N "(cached) $ECHO_C" >&6
8276else
8277  case $PKG_CONFIG in
8278  [\\/]* | ?:[\\/]*)
8279  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8280  ;;
8281  *)
8282  ac_save_IFS=$IFS; IFS=$ac_path_separator
8283ac_dummy="$PATH"
8284for ac_dir in $ac_dummy; do
8285  IFS=$ac_save_IFS
8286  test -z "$ac_dir" && ac_dir=.
8287  if $as_executable_p "$ac_dir/$ac_word"; then
8288   ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
8289   echo "$as_me:8289: found $ac_dir/$ac_word" >&5
8290   break
8291fi
8292done
8293
8294  test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="none"
8295  ;;
8296esac
8297fi
8298PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8299
8300if test -n "$PKG_CONFIG"; then
8301  echo "$as_me:8301: result: $PKG_CONFIG" >&5
8302echo "${ECHO_T}$PKG_CONFIG" >&6
8303else
8304  echo "$as_me:8304: result: no" >&5
8305echo "${ECHO_T}no" >&6
8306fi
8307
8308	;;
8309*)
8310	PKG_CONFIG=$withval
8311	;;
8312esac
8313
8314test -z "$PKG_CONFIG" && PKG_CONFIG=none
8315if test "$PKG_CONFIG" != none ; then
8316
8317if test "x$prefix" != xNONE; then
8318  cf_path_syntax="$prefix"
8319else
8320  cf_path_syntax="$ac_default_prefix"
8321fi
8322
8323case ".$PKG_CONFIG" in #(vi
8324.\$\(*\)*|.\'*\'*) #(vi
8325  ;;
8326..|./*|.\\*) #(vi
8327  ;;
8328.[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
8329  ;;
8330.\${*prefix}*) #(vi
8331  eval PKG_CONFIG="$PKG_CONFIG"
8332  case ".$PKG_CONFIG" in #(vi
8333  .NONE/*)
8334    PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
8335    ;;
8336  esac
8337  ;; #(vi
8338.no|.NONE/*)
8339  PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
8340  ;;
8341*)
8342  { { echo "$as_me:8342: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
8343echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
8344   { (exit 1); exit 1; }; }
8345  ;;
8346esac
8347
8348fi
8349
8350cf_have_X_LIBS=no
8351
8352if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xt; then
8353	test -n "$verbose" && echo "	found package xt" 1>&6
8354
8355echo "${as_me:-configure}:8355: testing found package xt ..." 1>&5
8356
8357	cf_pkgconfig_incs="`$PKG_CONFIG --cflags xt 2>/dev/null`"
8358	cf_pkgconfig_libs="`$PKG_CONFIG --libs   xt 2>/dev/null`"
8359	test -n "$verbose" && echo "	package xt CFLAGS: $cf_pkgconfig_incs" 1>&6
8360
8361echo "${as_me:-configure}:8361: testing package xt CFLAGS: $cf_pkgconfig_incs ..." 1>&5
8362
8363	test -n "$verbose" && echo "	package xt LIBS: $cf_pkgconfig_libs" 1>&6
8364
8365echo "${as_me:-configure}:8365: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5
8366
8367cf_fix_cppflags=no
8368cf_new_cflags=
8369cf_new_cppflags=
8370cf_new_extra_cppflags=
8371
8372for cf_add_cflags in $cf_pkgconfig_incs
8373do
8374case $cf_fix_cppflags in
8375no)
8376	case $cf_add_cflags in #(vi
8377	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8378		case $cf_add_cflags in
8379		-D*)
8380			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8381
8382			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8383				&& test -z "${cf_tst_cflags}" \
8384				&& cf_fix_cppflags=yes
8385
8386			if test $cf_fix_cppflags = yes ; then
8387				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8388				continue
8389			elif test "${cf_tst_cflags}" = "\"'" ; then
8390				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8391				continue
8392			fi
8393			;;
8394		esac
8395		case "$CPPFLAGS" in
8396		*$cf_add_cflags) #(vi
8397			;;
8398		*) #(vi
8399			case $cf_add_cflags in #(vi
8400			-D*)
8401				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8402
8403CPPFLAGS=`echo "$CPPFLAGS" | \
8404	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
8405		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
8406
8407				;;
8408			esac
8409			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8410			;;
8411		esac
8412		;;
8413	*)
8414		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8415		;;
8416	esac
8417	;;
8418yes)
8419	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8420
8421	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8422
8423	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8424		&& test -z "${cf_tst_cflags}" \
8425		&& cf_fix_cppflags=no
8426	;;
8427esac
8428done
8429
8430if test -n "$cf_new_cflags" ; then
8431
8432	CFLAGS="$CFLAGS $cf_new_cflags"
8433fi
8434
8435if test -n "$cf_new_cppflags" ; then
8436
8437	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8438fi
8439
8440if test -n "$cf_new_extra_cppflags" ; then
8441
8442	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8443fi
8444
8445	LIBS="$cf_pkgconfig_libs $LIBS"
8446
8447	case "x$LIBS" in #(vi
8448	*-lX11*) #(vi
8449		;;
8450	*)
8451# we have an "xt" package, but it may omit Xt's dependency on X11
8452echo "$as_me:8452: checking for usable X dependency" >&5
8453echo $ECHO_N "checking for usable X dependency... $ECHO_C" >&6
8454if test "${cf_cv_xt_x11_compat+set}" = set; then
8455  echo $ECHO_N "(cached) $ECHO_C" >&6
8456else
8457
8458cat >conftest.$ac_ext <<_ACEOF
8459#line 8459 "configure"
8460#include "confdefs.h"
8461
8462#include <X11/Xlib.h>
8463
8464int
8465main ()
8466{
8467
8468	int rc1 = XDrawLine((Display*) 0, (Drawable) 0, (GC) 0, 0, 0, 0, 0);
8469	int rc2 = XClearWindow((Display*) 0, (Window) 0);
8470	int rc3 = XMoveWindow((Display*) 0, (Window) 0, 0, 0);
8471	int rc4 = XMoveResizeWindow((Display*)0, (Window)0, 0, 0, 0, 0);
8472
8473  ;
8474  return 0;
8475}
8476_ACEOF
8477rm -f conftest.$ac_objext conftest$ac_exeext
8478if { (eval echo "$as_me:8478: \"$ac_link\"") >&5
8479  (eval $ac_link) 2>&5
8480  ac_status=$?
8481  echo "$as_me:8481: \$? = $ac_status" >&5
8482  (exit $ac_status); } &&
8483         { ac_try='test -s conftest$ac_exeext'
8484  { (eval echo "$as_me:8484: \"$ac_try\"") >&5
8485  (eval $ac_try) 2>&5
8486  ac_status=$?
8487  echo "$as_me:8487: \$? = $ac_status" >&5
8488  (exit $ac_status); }; }; then
8489  cf_cv_xt_x11_compat=yes
8490else
8491  echo "$as_me: failed program was:" >&5
8492cat conftest.$ac_ext >&5
8493cf_cv_xt_x11_compat=no
8494fi
8495rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8496fi
8497echo "$as_me:8497: result: $cf_cv_xt_x11_compat" >&5
8498echo "${ECHO_T}$cf_cv_xt_x11_compat" >&6
8499		if test "$cf_cv_xt_x11_compat" = no
8500		then
8501			test -n "$verbose" && echo "	work around broken X11 dependency" 1>&6
8502
8503echo "${as_me:-configure}:8503: testing work around broken X11 dependency ..." 1>&5
8504
8505			# 2010/11/19 - good enough until a working Xt on Xcb is delivered.
8506
8507if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists x11; then
8508	test -n "$verbose" && echo "	found package x11" 1>&6
8509
8510echo "${as_me:-configure}:8510: testing found package x11 ..." 1>&5
8511
8512	cf_pkgconfig_incs="`$PKG_CONFIG --cflags x11 2>/dev/null`"
8513	cf_pkgconfig_libs="`$PKG_CONFIG --libs   x11 2>/dev/null`"
8514	test -n "$verbose" && echo "	package x11 CFLAGS: $cf_pkgconfig_incs" 1>&6
8515
8516echo "${as_me:-configure}:8516: testing package x11 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
8517
8518	test -n "$verbose" && echo "	package x11 LIBS: $cf_pkgconfig_libs" 1>&6
8519
8520echo "${as_me:-configure}:8520: testing package x11 LIBS: $cf_pkgconfig_libs ..." 1>&5
8521
8522cf_fix_cppflags=no
8523cf_new_cflags=
8524cf_new_cppflags=
8525cf_new_extra_cppflags=
8526
8527for cf_add_cflags in $cf_pkgconfig_incs
8528do
8529case $cf_fix_cppflags in
8530no)
8531	case $cf_add_cflags in #(vi
8532	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8533		case $cf_add_cflags in
8534		-D*)
8535			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8536
8537			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8538				&& test -z "${cf_tst_cflags}" \
8539				&& cf_fix_cppflags=yes
8540
8541			if test $cf_fix_cppflags = yes ; then
8542				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8543				continue
8544			elif test "${cf_tst_cflags}" = "\"'" ; then
8545				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8546				continue
8547			fi
8548			;;
8549		esac
8550		case "$CPPFLAGS" in
8551		*$cf_add_cflags) #(vi
8552			;;
8553		*) #(vi
8554			case $cf_add_cflags in #(vi
8555			-D*)
8556				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8557
8558CPPFLAGS=`echo "$CPPFLAGS" | \
8559	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
8560		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
8561
8562				;;
8563			esac
8564			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8565			;;
8566		esac
8567		;;
8568	*)
8569		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8570		;;
8571	esac
8572	;;
8573yes)
8574	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8575
8576	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8577
8578	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8579		&& test -z "${cf_tst_cflags}" \
8580		&& cf_fix_cppflags=no
8581	;;
8582esac
8583done
8584
8585if test -n "$cf_new_cflags" ; then
8586
8587	CFLAGS="$CFLAGS $cf_new_cflags"
8588fi
8589
8590if test -n "$cf_new_cppflags" ; then
8591
8592	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8593fi
8594
8595if test -n "$cf_new_extra_cppflags" ; then
8596
8597	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8598fi
8599
8600	LIBS="$cf_pkgconfig_libs $LIBS"
8601	:
8602else
8603
8604test -n "$verbose" && echo "	...before $LIBS" 1>&6
8605
8606echo "${as_me:-configure}:8606: testing ...before $LIBS ..." 1>&5
8607
8608LIBS=`echo "$LIBS" | sed -e "s/[ 	][ 	]*/ /g" -e "s,-lXt ,-lXt -lX11 ," -e 's/  / /g'`
8609test -n "$verbose" && echo "	...after  $LIBS" 1>&6
8610
8611echo "${as_me:-configure}:8611: testing ...after  $LIBS ..." 1>&5
8612
8613fi
8614
8615		fi
8616		;;
8617	esac
8618
8619echo "$as_me:8619: checking for usable X Toolkit package" >&5
8620echo $ECHO_N "checking for usable X Toolkit package... $ECHO_C" >&6
8621if test "${cf_cv_xt_ice_compat+set}" = set; then
8622  echo $ECHO_N "(cached) $ECHO_C" >&6
8623else
8624
8625cat >conftest.$ac_ext <<_ACEOF
8626#line 8626 "configure"
8627#include "confdefs.h"
8628
8629#include <X11/Shell.h>
8630
8631int
8632main ()
8633{
8634int num = IceConnectionNumber(0)
8635
8636  ;
8637  return 0;
8638}
8639_ACEOF
8640rm -f conftest.$ac_objext conftest$ac_exeext
8641if { (eval echo "$as_me:8641: \"$ac_link\"") >&5
8642  (eval $ac_link) 2>&5
8643  ac_status=$?
8644  echo "$as_me:8644: \$? = $ac_status" >&5
8645  (exit $ac_status); } &&
8646         { ac_try='test -s conftest$ac_exeext'
8647  { (eval echo "$as_me:8647: \"$ac_try\"") >&5
8648  (eval $ac_try) 2>&5
8649  ac_status=$?
8650  echo "$as_me:8650: \$? = $ac_status" >&5
8651  (exit $ac_status); }; }; then
8652  cf_cv_xt_ice_compat=yes
8653else
8654  echo "$as_me: failed program was:" >&5
8655cat conftest.$ac_ext >&5
8656cf_cv_xt_ice_compat=no
8657fi
8658rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8659fi
8660echo "$as_me:8660: result: $cf_cv_xt_ice_compat" >&5
8661echo "${ECHO_T}$cf_cv_xt_ice_compat" >&6
8662
8663	if test "$cf_cv_xt_ice_compat" = no
8664	then
8665		# workaround for broken ".pc" files used for X Toolkit.
8666		case "x$X_PRE_LIBS" in #(vi
8667		*-lICE*)
8668			case "x$LIBS" in #(vi
8669			*-lICE*) #(vi
8670				;;
8671			*)
8672				test -n "$verbose" && echo "	work around broken ICE dependency" 1>&6
8673
8674echo "${as_me:-configure}:8674: testing work around broken ICE dependency ..." 1>&5
8675
8676if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists ice; then
8677	test -n "$verbose" && echo "	found package ice" 1>&6
8678
8679echo "${as_me:-configure}:8679: testing found package ice ..." 1>&5
8680
8681	cf_pkgconfig_incs="`$PKG_CONFIG --cflags ice 2>/dev/null`"
8682	cf_pkgconfig_libs="`$PKG_CONFIG --libs   ice 2>/dev/null`"
8683	test -n "$verbose" && echo "	package ice CFLAGS: $cf_pkgconfig_incs" 1>&6
8684
8685echo "${as_me:-configure}:8685: testing package ice CFLAGS: $cf_pkgconfig_incs ..." 1>&5
8686
8687	test -n "$verbose" && echo "	package ice LIBS: $cf_pkgconfig_libs" 1>&6
8688
8689echo "${as_me:-configure}:8689: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5
8690
8691cf_fix_cppflags=no
8692cf_new_cflags=
8693cf_new_cppflags=
8694cf_new_extra_cppflags=
8695
8696for cf_add_cflags in $cf_pkgconfig_incs
8697do
8698case $cf_fix_cppflags in
8699no)
8700	case $cf_add_cflags in #(vi
8701	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8702		case $cf_add_cflags in
8703		-D*)
8704			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8705
8706			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8707				&& test -z "${cf_tst_cflags}" \
8708				&& cf_fix_cppflags=yes
8709
8710			if test $cf_fix_cppflags = yes ; then
8711				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8712				continue
8713			elif test "${cf_tst_cflags}" = "\"'" ; then
8714				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8715				continue
8716			fi
8717			;;
8718		esac
8719		case "$CPPFLAGS" in
8720		*$cf_add_cflags) #(vi
8721			;;
8722		*) #(vi
8723			case $cf_add_cflags in #(vi
8724			-D*)
8725				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8726
8727CPPFLAGS=`echo "$CPPFLAGS" | \
8728	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
8729		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
8730
8731				;;
8732			esac
8733			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8734			;;
8735		esac
8736		;;
8737	*)
8738		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8739		;;
8740	esac
8741	;;
8742yes)
8743	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8744
8745	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8746
8747	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8748		&& test -z "${cf_tst_cflags}" \
8749		&& cf_fix_cppflags=no
8750	;;
8751esac
8752done
8753
8754if test -n "$cf_new_cflags" ; then
8755
8756	CFLAGS="$CFLAGS $cf_new_cflags"
8757fi
8758
8759if test -n "$cf_new_cppflags" ; then
8760
8761	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8762fi
8763
8764if test -n "$cf_new_extra_cppflags" ; then
8765
8766	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8767fi
8768
8769	LIBS="$cf_pkgconfig_libs $LIBS"
8770
8771if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists sm; then
8772	test -n "$verbose" && echo "	found package sm" 1>&6
8773
8774echo "${as_me:-configure}:8774: testing found package sm ..." 1>&5
8775
8776	cf_pkgconfig_incs="`$PKG_CONFIG --cflags sm 2>/dev/null`"
8777	cf_pkgconfig_libs="`$PKG_CONFIG --libs   sm 2>/dev/null`"
8778	test -n "$verbose" && echo "	package sm CFLAGS: $cf_pkgconfig_incs" 1>&6
8779
8780echo "${as_me:-configure}:8780: testing package sm CFLAGS: $cf_pkgconfig_incs ..." 1>&5
8781
8782	test -n "$verbose" && echo "	package sm LIBS: $cf_pkgconfig_libs" 1>&6
8783
8784echo "${as_me:-configure}:8784: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5
8785
8786cf_fix_cppflags=no
8787cf_new_cflags=
8788cf_new_cppflags=
8789cf_new_extra_cppflags=
8790
8791for cf_add_cflags in $cf_pkgconfig_incs
8792do
8793case $cf_fix_cppflags in
8794no)
8795	case $cf_add_cflags in #(vi
8796	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8797		case $cf_add_cflags in
8798		-D*)
8799			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8800
8801			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8802				&& test -z "${cf_tst_cflags}" \
8803				&& cf_fix_cppflags=yes
8804
8805			if test $cf_fix_cppflags = yes ; then
8806				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8807				continue
8808			elif test "${cf_tst_cflags}" = "\"'" ; then
8809				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8810				continue
8811			fi
8812			;;
8813		esac
8814		case "$CPPFLAGS" in
8815		*$cf_add_cflags) #(vi
8816			;;
8817		*) #(vi
8818			case $cf_add_cflags in #(vi
8819			-D*)
8820				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8821
8822CPPFLAGS=`echo "$CPPFLAGS" | \
8823	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
8824		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
8825
8826				;;
8827			esac
8828			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8829			;;
8830		esac
8831		;;
8832	*)
8833		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8834		;;
8835	esac
8836	;;
8837yes)
8838	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8839
8840	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8841
8842	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8843		&& test -z "${cf_tst_cflags}" \
8844		&& cf_fix_cppflags=no
8845	;;
8846esac
8847done
8848
8849if test -n "$cf_new_cflags" ; then
8850
8851	CFLAGS="$CFLAGS $cf_new_cflags"
8852fi
8853
8854if test -n "$cf_new_cppflags" ; then
8855
8856	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8857fi
8858
8859if test -n "$cf_new_extra_cppflags" ; then
8860
8861	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8862fi
8863
8864	LIBS="$cf_pkgconfig_libs $LIBS"
8865	:
8866else
8867	:
8868fi
8869
8870else
8871
8872test -n "$verbose" && echo "	...before $LIBS" 1>&6
8873
8874echo "${as_me:-configure}:8874: testing ...before $LIBS ..." 1>&5
8875
8876LIBS=`echo "$LIBS" | sed -e "s/[ 	][ 	]*/ /g" -e "s,-lXt ,-lXt $X_PRE_LIBS ," -e 's/  / /g'`
8877test -n "$verbose" && echo "	...after  $LIBS" 1>&6
8878
8879echo "${as_me:-configure}:8879: testing ...after  $LIBS ..." 1>&5
8880
8881fi
8882
8883				;;
8884			esac
8885			;;
8886		esac
8887	fi
8888
8889	cf_have_X_LIBS=yes
8890
8891else
8892
8893	LDFLAGS="$X_LIBS $LDFLAGS"
8894
8895test -n "$verbose" && echo "	checking additions to CFLAGS" 1>&6
8896
8897echo "${as_me:-configure}:8897: testing checking additions to CFLAGS ..." 1>&5
8898
8899cf_check_cflags="$CFLAGS"
8900cf_check_cppflags="$CPPFLAGS"
8901
8902cf_fix_cppflags=no
8903cf_new_cflags=
8904cf_new_cppflags=
8905cf_new_extra_cppflags=
8906
8907for cf_add_cflags in $X_CFLAGS
8908do
8909case $cf_fix_cppflags in
8910no)
8911	case $cf_add_cflags in #(vi
8912	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8913		case $cf_add_cflags in
8914		-D*)
8915			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8916
8917			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8918				&& test -z "${cf_tst_cflags}" \
8919				&& cf_fix_cppflags=yes
8920
8921			if test $cf_fix_cppflags = yes ; then
8922				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8923				continue
8924			elif test "${cf_tst_cflags}" = "\"'" ; then
8925				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8926				continue
8927			fi
8928			;;
8929		esac
8930		case "$CPPFLAGS" in
8931		*$cf_add_cflags) #(vi
8932			;;
8933		*) #(vi
8934			case $cf_add_cflags in #(vi
8935			-D*)
8936				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8937
8938CPPFLAGS=`echo "$CPPFLAGS" | \
8939	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
8940		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
8941
8942				;;
8943			esac
8944			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8945			;;
8946		esac
8947		;;
8948	*)
8949		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8950		;;
8951	esac
8952	;;
8953yes)
8954	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8955
8956	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8957
8958	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8959		&& test -z "${cf_tst_cflags}" \
8960		&& cf_fix_cppflags=no
8961	;;
8962esac
8963done
8964
8965if test -n "$cf_new_cflags" ; then
8966	test -n "$verbose" && echo "	add to \$CFLAGS $cf_new_cflags" 1>&6
8967
8968echo "${as_me:-configure}:8968: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
8969
8970	CFLAGS="$CFLAGS $cf_new_cflags"
8971fi
8972
8973if test -n "$cf_new_cppflags" ; then
8974	test -n "$verbose" && echo "	add to \$CPPFLAGS $cf_new_cppflags" 1>&6
8975
8976echo "${as_me:-configure}:8976: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
8977
8978	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8979fi
8980
8981if test -n "$cf_new_extra_cppflags" ; then
8982	test -n "$verbose" && echo "	add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
8983
8984echo "${as_me:-configure}:8984: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
8985
8986	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8987fi
8988
8989if test "$cf_check_cflags" != "$CFLAGS" ; then
8990cat >conftest.$ac_ext <<_ACEOF
8991#line 8991 "configure"
8992#include "confdefs.h"
8993#include <stdio.h>
8994int
8995main ()
8996{
8997printf("Hello world");
8998  ;
8999  return 0;
9000}
9001_ACEOF
9002rm -f conftest.$ac_objext conftest$ac_exeext
9003if { (eval echo "$as_me:9003: \"$ac_link\"") >&5
9004  (eval $ac_link) 2>&5
9005  ac_status=$?
9006  echo "$as_me:9006: \$? = $ac_status" >&5
9007  (exit $ac_status); } &&
9008         { ac_try='test -s conftest$ac_exeext'
9009  { (eval echo "$as_me:9009: \"$ac_try\"") >&5
9010  (eval $ac_try) 2>&5
9011  ac_status=$?
9012  echo "$as_me:9012: \$? = $ac_status" >&5
9013  (exit $ac_status); }; }; then
9014  :
9015else
9016  echo "$as_me: failed program was:" >&5
9017cat conftest.$ac_ext >&5
9018test -n "$verbose" && echo "	test-compile failed.  Undoing change to \$CFLAGS" 1>&6
9019
9020echo "${as_me:-configure}:9020: testing test-compile failed.  Undoing change to \$CFLAGS ..." 1>&5
9021
9022	 if test "$cf_check_cppflags" != "$CPPFLAGS" ; then
9023		 test -n "$verbose" && echo "	but keeping change to \$CPPFLAGS" 1>&6
9024
9025echo "${as_me:-configure}:9025: testing but keeping change to \$CPPFLAGS ..." 1>&5
9026
9027	 fi
9028	 CFLAGS="$cf_check_flags"
9029fi
9030rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9031fi
9032
9033	echo "$as_me:9033: checking for XOpenDisplay" >&5
9034echo $ECHO_N "checking for XOpenDisplay... $ECHO_C" >&6
9035if test "${ac_cv_func_XOpenDisplay+set}" = set; then
9036  echo $ECHO_N "(cached) $ECHO_C" >&6
9037else
9038  cat >conftest.$ac_ext <<_ACEOF
9039#line 9039 "configure"
9040#include "confdefs.h"
9041/* System header to define __stub macros and hopefully few prototypes,
9042    which can conflict with char XOpenDisplay (); below.  */
9043#include <assert.h>
9044/* Override any gcc2 internal prototype to avoid an error.  */
9045#ifdef __cplusplus
9046extern "C"
9047#endif
9048/* We use char because int might match the return type of a gcc2
9049   builtin and then its argument prototype would still apply.  */
9050char XOpenDisplay ();
9051char (*f) ();
9052
9053int
9054main ()
9055{
9056/* The GNU C library defines this for functions which it implements
9057    to always fail with ENOSYS.  Some functions are actually named
9058    something starting with __ and the normal name is an alias.  */
9059#if defined (__stub_XOpenDisplay) || defined (__stub___XOpenDisplay)
9060choke me
9061#else
9062f = XOpenDisplay;
9063#endif
9064
9065  ;
9066  return 0;
9067}
9068_ACEOF
9069rm -f conftest.$ac_objext conftest$ac_exeext
9070if { (eval echo "$as_me:9070: \"$ac_link\"") >&5
9071  (eval $ac_link) 2>&5
9072  ac_status=$?
9073  echo "$as_me:9073: \$? = $ac_status" >&5
9074  (exit $ac_status); } &&
9075         { ac_try='test -s conftest$ac_exeext'
9076  { (eval echo "$as_me:9076: \"$ac_try\"") >&5
9077  (eval $ac_try) 2>&5
9078  ac_status=$?
9079  echo "$as_me:9079: \$? = $ac_status" >&5
9080  (exit $ac_status); }; }; then
9081  ac_cv_func_XOpenDisplay=yes
9082else
9083  echo "$as_me: failed program was:" >&5
9084cat conftest.$ac_ext >&5
9085ac_cv_func_XOpenDisplay=no
9086fi
9087rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9088fi
9089echo "$as_me:9089: result: $ac_cv_func_XOpenDisplay" >&5
9090echo "${ECHO_T}$ac_cv_func_XOpenDisplay" >&6
9091if test $ac_cv_func_XOpenDisplay = yes; then
9092  :
9093else
9094
9095	echo "$as_me:9095: checking for XOpenDisplay in -lX11" >&5
9096echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6
9097if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then
9098  echo $ECHO_N "(cached) $ECHO_C" >&6
9099else
9100  ac_check_lib_save_LIBS=$LIBS
9101LIBS="-lX11 $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
9102cat >conftest.$ac_ext <<_ACEOF
9103#line 9103 "configure"
9104#include "confdefs.h"
9105
9106/* Override any gcc2 internal prototype to avoid an error.  */
9107#ifdef __cplusplus
9108extern "C"
9109#endif
9110/* We use char because int might match the return type of a gcc2
9111   builtin and then its argument prototype would still apply.  */
9112char XOpenDisplay ();
9113int
9114main ()
9115{
9116XOpenDisplay ();
9117  ;
9118  return 0;
9119}
9120_ACEOF
9121rm -f conftest.$ac_objext conftest$ac_exeext
9122if { (eval echo "$as_me:9122: \"$ac_link\"") >&5
9123  (eval $ac_link) 2>&5
9124  ac_status=$?
9125  echo "$as_me:9125: \$? = $ac_status" >&5
9126  (exit $ac_status); } &&
9127         { ac_try='test -s conftest$ac_exeext'
9128  { (eval echo "$as_me:9128: \"$ac_try\"") >&5
9129  (eval $ac_try) 2>&5
9130  ac_status=$?
9131  echo "$as_me:9131: \$? = $ac_status" >&5
9132  (exit $ac_status); }; }; then
9133  ac_cv_lib_X11_XOpenDisplay=yes
9134else
9135  echo "$as_me: failed program was:" >&5
9136cat conftest.$ac_ext >&5
9137ac_cv_lib_X11_XOpenDisplay=no
9138fi
9139rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9140LIBS=$ac_check_lib_save_LIBS
9141fi
9142echo "$as_me:9142: result: $ac_cv_lib_X11_XOpenDisplay" >&5
9143echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6
9144if test $ac_cv_lib_X11_XOpenDisplay = yes; then
9145  LIBS="-lX11 $LIBS"
9146fi
9147
9148fi
9149
9150	echo "$as_me:9150: checking for XtAppInitialize" >&5
9151echo $ECHO_N "checking for XtAppInitialize... $ECHO_C" >&6
9152if test "${ac_cv_func_XtAppInitialize+set}" = set; then
9153  echo $ECHO_N "(cached) $ECHO_C" >&6
9154else
9155  cat >conftest.$ac_ext <<_ACEOF
9156#line 9156 "configure"
9157#include "confdefs.h"
9158/* System header to define __stub macros and hopefully few prototypes,
9159    which can conflict with char XtAppInitialize (); below.  */
9160#include <assert.h>
9161/* Override any gcc2 internal prototype to avoid an error.  */
9162#ifdef __cplusplus
9163extern "C"
9164#endif
9165/* We use char because int might match the return type of a gcc2
9166   builtin and then its argument prototype would still apply.  */
9167char XtAppInitialize ();
9168char (*f) ();
9169
9170int
9171main ()
9172{
9173/* The GNU C library defines this for functions which it implements
9174    to always fail with ENOSYS.  Some functions are actually named
9175    something starting with __ and the normal name is an alias.  */
9176#if defined (__stub_XtAppInitialize) || defined (__stub___XtAppInitialize)
9177choke me
9178#else
9179f = XtAppInitialize;
9180#endif
9181
9182  ;
9183  return 0;
9184}
9185_ACEOF
9186rm -f conftest.$ac_objext conftest$ac_exeext
9187if { (eval echo "$as_me:9187: \"$ac_link\"") >&5
9188  (eval $ac_link) 2>&5
9189  ac_status=$?
9190  echo "$as_me:9190: \$? = $ac_status" >&5
9191  (exit $ac_status); } &&
9192         { ac_try='test -s conftest$ac_exeext'
9193  { (eval echo "$as_me:9193: \"$ac_try\"") >&5
9194  (eval $ac_try) 2>&5
9195  ac_status=$?
9196  echo "$as_me:9196: \$? = $ac_status" >&5
9197  (exit $ac_status); }; }; then
9198  ac_cv_func_XtAppInitialize=yes
9199else
9200  echo "$as_me: failed program was:" >&5
9201cat conftest.$ac_ext >&5
9202ac_cv_func_XtAppInitialize=no
9203fi
9204rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9205fi
9206echo "$as_me:9206: result: $ac_cv_func_XtAppInitialize" >&5
9207echo "${ECHO_T}$ac_cv_func_XtAppInitialize" >&6
9208if test $ac_cv_func_XtAppInitialize = yes; then
9209  :
9210else
9211
9212	echo "$as_me:9212: checking for XtAppInitialize in -lXt" >&5
9213echo $ECHO_N "checking for XtAppInitialize in -lXt... $ECHO_C" >&6
9214if test "${ac_cv_lib_Xt_XtAppInitialize+set}" = set; then
9215  echo $ECHO_N "(cached) $ECHO_C" >&6
9216else
9217  ac_check_lib_save_LIBS=$LIBS
9218LIBS="-lXt $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
9219cat >conftest.$ac_ext <<_ACEOF
9220#line 9220 "configure"
9221#include "confdefs.h"
9222
9223/* Override any gcc2 internal prototype to avoid an error.  */
9224#ifdef __cplusplus
9225extern "C"
9226#endif
9227/* We use char because int might match the return type of a gcc2
9228   builtin and then its argument prototype would still apply.  */
9229char XtAppInitialize ();
9230int
9231main ()
9232{
9233XtAppInitialize ();
9234  ;
9235  return 0;
9236}
9237_ACEOF
9238rm -f conftest.$ac_objext conftest$ac_exeext
9239if { (eval echo "$as_me:9239: \"$ac_link\"") >&5
9240  (eval $ac_link) 2>&5
9241  ac_status=$?
9242  echo "$as_me:9242: \$? = $ac_status" >&5
9243  (exit $ac_status); } &&
9244         { ac_try='test -s conftest$ac_exeext'
9245  { (eval echo "$as_me:9245: \"$ac_try\"") >&5
9246  (eval $ac_try) 2>&5
9247  ac_status=$?
9248  echo "$as_me:9248: \$? = $ac_status" >&5
9249  (exit $ac_status); }; }; then
9250  ac_cv_lib_Xt_XtAppInitialize=yes
9251else
9252  echo "$as_me: failed program was:" >&5
9253cat conftest.$ac_ext >&5
9254ac_cv_lib_Xt_XtAppInitialize=no
9255fi
9256rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9257LIBS=$ac_check_lib_save_LIBS
9258fi
9259echo "$as_me:9259: result: $ac_cv_lib_Xt_XtAppInitialize" >&5
9260echo "${ECHO_T}$ac_cv_lib_Xt_XtAppInitialize" >&6
9261if test $ac_cv_lib_Xt_XtAppInitialize = yes; then
9262  cat >>confdefs.h <<\EOF
9263#define HAVE_LIBXT 1
9264EOF
9265
9266		 cf_have_X_LIBS=Xt
9267		 LIBS="-lXt $X_PRE_LIBS $LIBS $X_EXTRA_LIBS"
9268fi
9269
9270fi
9271
9272fi
9273
9274if test $cf_have_X_LIBS = no ; then
9275	{ echo "$as_me:9275: WARNING: Unable to successfully link X Toolkit library (-lXt) with
9276test program.  You will have to check and add the proper libraries by hand
9277to makefile." >&5
9278echo "$as_me: WARNING: Unable to successfully link X Toolkit library (-lXt) with
9279test program.  You will have to check and add the proper libraries by hand
9280to makefile." >&2;}
9281fi
9282
9283for ac_header in \
9284	X11/DECkeysym.h \
9285	X11/Sunkeysym.h \
9286	X11/XF86keysym.h \
9287	X11/XKBlib.h \
9288	X11/Xpoll.h \
9289	X11/extensions/XKB.h \
9290
9291do
9292as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9293echo "$as_me:9293: checking for $ac_header" >&5
9294echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9295if eval "test \"\${$as_ac_Header+set}\" = set"; then
9296  echo $ECHO_N "(cached) $ECHO_C" >&6
9297else
9298  cat >conftest.$ac_ext <<_ACEOF
9299#line 9299 "configure"
9300#include "confdefs.h"
9301#include <$ac_header>
9302_ACEOF
9303if { (eval echo "$as_me:9303: \"$ac_cpp conftest.$ac_ext\"") >&5
9304  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9305  ac_status=$?
9306  egrep -v '^ *\+' conftest.er1 >conftest.err
9307  rm -f conftest.er1
9308  cat conftest.err >&5
9309  echo "$as_me:9309: \$? = $ac_status" >&5
9310  (exit $ac_status); } >/dev/null; then
9311  if test -s conftest.err; then
9312    ac_cpp_err=$ac_c_preproc_warn_flag
9313  else
9314    ac_cpp_err=
9315  fi
9316else
9317  ac_cpp_err=yes
9318fi
9319if test -z "$ac_cpp_err"; then
9320  eval "$as_ac_Header=yes"
9321else
9322  echo "$as_me: failed program was:" >&5
9323  cat conftest.$ac_ext >&5
9324  eval "$as_ac_Header=no"
9325fi
9326rm -f conftest.err conftest.$ac_ext
9327fi
9328echo "$as_me:9328: result: `eval echo '${'$as_ac_Header'}'`" >&5
9329echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9330if test `eval echo '${'$as_ac_Header'}'` = yes; then
9331  cat >>confdefs.h <<EOF
9332#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9333EOF
9334
9335fi
9336done
9337
9338cf_x_athena=${cf_x_athena:-Xaw}
9339
9340echo "$as_me:9340: checking if you want to link with Xaw 3d library" >&5
9341echo $ECHO_N "checking if you want to link with Xaw 3d library... $ECHO_C" >&6
9342withval=
9343
9344# Check whether --with-Xaw3d or --without-Xaw3d was given.
9345if test "${with_Xaw3d+set}" = set; then
9346  withval="$with_Xaw3d"
9347
9348fi;
9349if test "$withval" = yes ; then
9350	cf_x_athena=Xaw3d
9351	echo "$as_me:9351: result: yes" >&5
9352echo "${ECHO_T}yes" >&6
9353else
9354	echo "$as_me:9354: result: no" >&5
9355echo "${ECHO_T}no" >&6
9356fi
9357
9358echo "$as_me:9358: checking if you want to link with neXT Athena library" >&5
9359echo $ECHO_N "checking if you want to link with neXT Athena library... $ECHO_C" >&6
9360withval=
9361
9362# Check whether --with-neXtaw or --without-neXtaw was given.
9363if test "${with_neXtaw+set}" = set; then
9364  withval="$with_neXtaw"
9365
9366fi;
9367if test "$withval" = yes ; then
9368	cf_x_athena=neXtaw
9369	echo "$as_me:9369: result: yes" >&5
9370echo "${ECHO_T}yes" >&6
9371else
9372	echo "$as_me:9372: result: no" >&5
9373echo "${ECHO_T}no" >&6
9374fi
9375
9376echo "$as_me:9376: checking if you want to link with Athena-Plus library" >&5
9377echo $ECHO_N "checking if you want to link with Athena-Plus library... $ECHO_C" >&6
9378withval=
9379
9380# Check whether --with-XawPlus or --without-XawPlus was given.
9381if test "${with_XawPlus+set}" = set; then
9382  withval="$with_XawPlus"
9383
9384fi;
9385if test "$withval" = yes ; then
9386	cf_x_athena=XawPlus
9387	echo "$as_me:9387: result: yes" >&5
9388echo "${ECHO_T}yes" >&6
9389else
9390	echo "$as_me:9390: result: no" >&5
9391echo "${ECHO_T}no" >&6
9392fi
9393
9394cf_x_athena_lib=""
9395
9396if test "$PKG_CONFIG" != none ; then
9397	cf_athena_list=
9398	test "$cf_x_athena" = Xaw && cf_athena_list="xaw8 xaw7 xaw6"
9399	for cf_athena_pkg in \
9400		$cf_athena_list \
9401		${cf_x_athena} \
9402		${cf_x_athena}-devel \
9403		lib${cf_x_athena} \
9404		lib${cf_x_athena}-devel
9405	do
9406
9407if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists $cf_athena_pkg; then
9408	test -n "$verbose" && echo "	found package $cf_athena_pkg" 1>&6
9409
9410echo "${as_me:-configure}:9410: testing found package $cf_athena_pkg ..." 1>&5
9411
9412	cf_pkgconfig_incs="`$PKG_CONFIG --cflags $cf_athena_pkg 2>/dev/null`"
9413	cf_pkgconfig_libs="`$PKG_CONFIG --libs   $cf_athena_pkg 2>/dev/null`"
9414	test -n "$verbose" && echo "	package $cf_athena_pkg CFLAGS: $cf_pkgconfig_incs" 1>&6
9415
9416echo "${as_me:-configure}:9416: testing package $cf_athena_pkg CFLAGS: $cf_pkgconfig_incs ..." 1>&5
9417
9418	test -n "$verbose" && echo "	package $cf_athena_pkg LIBS: $cf_pkgconfig_libs" 1>&6
9419
9420echo "${as_me:-configure}:9420: testing package $cf_athena_pkg LIBS: $cf_pkgconfig_libs ..." 1>&5
9421
9422cf_fix_cppflags=no
9423cf_new_cflags=
9424cf_new_cppflags=
9425cf_new_extra_cppflags=
9426
9427for cf_add_cflags in $cf_pkgconfig_incs
9428do
9429case $cf_fix_cppflags in
9430no)
9431	case $cf_add_cflags in #(vi
9432	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
9433		case $cf_add_cflags in
9434		-D*)
9435			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9436
9437			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
9438				&& test -z "${cf_tst_cflags}" \
9439				&& cf_fix_cppflags=yes
9440
9441			if test $cf_fix_cppflags = yes ; then
9442				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9443				continue
9444			elif test "${cf_tst_cflags}" = "\"'" ; then
9445				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9446				continue
9447			fi
9448			;;
9449		esac
9450		case "$CPPFLAGS" in
9451		*$cf_add_cflags) #(vi
9452			;;
9453		*) #(vi
9454			case $cf_add_cflags in #(vi
9455			-D*)
9456				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9457
9458CPPFLAGS=`echo "$CPPFLAGS" | \
9459	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
9460		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
9461
9462				;;
9463			esac
9464			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
9465			;;
9466		esac
9467		;;
9468	*)
9469		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
9470		;;
9471	esac
9472	;;
9473yes)
9474	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9475
9476	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9477
9478	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
9479		&& test -z "${cf_tst_cflags}" \
9480		&& cf_fix_cppflags=no
9481	;;
9482esac
9483done
9484
9485if test -n "$cf_new_cflags" ; then
9486
9487	CFLAGS="$CFLAGS $cf_new_cflags"
9488fi
9489
9490if test -n "$cf_new_cppflags" ; then
9491
9492	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
9493fi
9494
9495if test -n "$cf_new_extra_cppflags" ; then
9496
9497	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
9498fi
9499
9500	LIBS="$cf_pkgconfig_libs $LIBS"
9501
9502			cf_x_athena_lib="$cf_pkgconfig_libs"
9503
9504cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9505
9506			cat >>confdefs.h <<EOF
9507#define $cf_x_athena_LIBS 1
9508EOF
9509
9510echo "$as_me:9510: checking for usable $cf_x_athena/Xmu package" >&5
9511echo $ECHO_N "checking for usable $cf_x_athena/Xmu package... $ECHO_C" >&6
9512if test "${cf_cv_xaw_compat+set}" = set; then
9513  echo $ECHO_N "(cached) $ECHO_C" >&6
9514else
9515
9516cat >conftest.$ac_ext <<_ACEOF
9517#line 9517 "configure"
9518#include "confdefs.h"
9519
9520#include <X11/Xmu/CharSet.h>
9521
9522int
9523main ()
9524{
9525
9526int check = XmuCompareISOLatin1("big", "small")
9527
9528  ;
9529  return 0;
9530}
9531_ACEOF
9532rm -f conftest.$ac_objext conftest$ac_exeext
9533if { (eval echo "$as_me:9533: \"$ac_link\"") >&5
9534  (eval $ac_link) 2>&5
9535  ac_status=$?
9536  echo "$as_me:9536: \$? = $ac_status" >&5
9537  (exit $ac_status); } &&
9538         { ac_try='test -s conftest$ac_exeext'
9539  { (eval echo "$as_me:9539: \"$ac_try\"") >&5
9540  (eval $ac_try) 2>&5
9541  ac_status=$?
9542  echo "$as_me:9542: \$? = $ac_status" >&5
9543  (exit $ac_status); }; }; then
9544  cf_cv_xaw_compat=yes
9545else
9546  echo "$as_me: failed program was:" >&5
9547cat conftest.$ac_ext >&5
9548cf_cv_xaw_compat=no
9549fi
9550rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9551fi
9552echo "$as_me:9552: result: $cf_cv_xaw_compat" >&5
9553echo "${ECHO_T}$cf_cv_xaw_compat" >&6
9554
9555			if test "$cf_cv_xaw_compat" = no
9556			then
9557				# workaround for broken ".pc" files...
9558				case "$cf_x_athena_lib" in #(vi
9559				*-lXmu*) #(vi
9560					;;
9561				*)
9562					test -n "$verbose" && echo "	work around broken package" 1>&6
9563
9564echo "${as_me:-configure}:9564: testing work around broken package ..." 1>&5
9565
9566if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xmu; then
9567	test -n "$verbose" && echo "	found package xmu" 1>&6
9568
9569echo "${as_me:-configure}:9569: testing found package xmu ..." 1>&5
9570
9571	cf_pkgconfig_incs="`$PKG_CONFIG --cflags xmu 2>/dev/null`"
9572	cf_pkgconfig_libs="`$PKG_CONFIG --libs   xmu 2>/dev/null`"
9573	test -n "$verbose" && echo "	package xmu CFLAGS: $cf_pkgconfig_incs" 1>&6
9574
9575echo "${as_me:-configure}:9575: testing package xmu CFLAGS: $cf_pkgconfig_incs ..." 1>&5
9576
9577	test -n "$verbose" && echo "	package xmu LIBS: $cf_pkgconfig_libs" 1>&6
9578
9579echo "${as_me:-configure}:9579: testing package xmu LIBS: $cf_pkgconfig_libs ..." 1>&5
9580
9581cf_fix_cppflags=no
9582cf_new_cflags=
9583cf_new_cppflags=
9584cf_new_extra_cppflags=
9585
9586for cf_add_cflags in $cf_pkgconfig_incs
9587do
9588case $cf_fix_cppflags in
9589no)
9590	case $cf_add_cflags in #(vi
9591	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
9592		case $cf_add_cflags in
9593		-D*)
9594			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9595
9596			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
9597				&& test -z "${cf_tst_cflags}" \
9598				&& cf_fix_cppflags=yes
9599
9600			if test $cf_fix_cppflags = yes ; then
9601				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9602				continue
9603			elif test "${cf_tst_cflags}" = "\"'" ; then
9604				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9605				continue
9606			fi
9607			;;
9608		esac
9609		case "$CPPFLAGS" in
9610		*$cf_add_cflags) #(vi
9611			;;
9612		*) #(vi
9613			case $cf_add_cflags in #(vi
9614			-D*)
9615				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9616
9617CPPFLAGS=`echo "$CPPFLAGS" | \
9618	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
9619		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
9620
9621				;;
9622			esac
9623			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
9624			;;
9625		esac
9626		;;
9627	*)
9628		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
9629		;;
9630	esac
9631	;;
9632yes)
9633	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9634
9635	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9636
9637	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
9638		&& test -z "${cf_tst_cflags}" \
9639		&& cf_fix_cppflags=no
9640	;;
9641esac
9642done
9643
9644if test -n "$cf_new_cflags" ; then
9645
9646	CFLAGS="$CFLAGS $cf_new_cflags"
9647fi
9648
9649if test -n "$cf_new_cppflags" ; then
9650
9651	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
9652fi
9653
9654if test -n "$cf_new_extra_cppflags" ; then
9655
9656	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
9657fi
9658
9659	LIBS="$cf_pkgconfig_libs $LIBS"
9660	:
9661else
9662
9663test -n "$verbose" && echo "	...before $LIBS" 1>&6
9664
9665echo "${as_me:-configure}:9665: testing ...before $LIBS ..." 1>&5
9666
9667LIBS=`echo "$LIBS" | sed -e "s/[ 	][ 	]*/ /g" -e "s,-lXt ,-lXt -lXmu ," -e 's/  / /g'`
9668test -n "$verbose" && echo "	...after  $LIBS" 1>&6
9669
9670echo "${as_me:-configure}:9670: testing ...after  $LIBS ..." 1>&5
9671
9672fi
9673
9674					;;
9675				esac
9676			fi
9677
9678			break
9679else
9680	:
9681fi
9682
9683	done
9684fi
9685
9686if test -z "$cf_x_athena_lib" ; then
9687
9688if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists Xext; then
9689	test -n "$verbose" && echo "	found package Xext" 1>&6
9690
9691echo "${as_me:-configure}:9691: testing found package Xext ..." 1>&5
9692
9693	cf_pkgconfig_incs="`$PKG_CONFIG --cflags Xext 2>/dev/null`"
9694	cf_pkgconfig_libs="`$PKG_CONFIG --libs   Xext 2>/dev/null`"
9695	test -n "$verbose" && echo "	package Xext CFLAGS: $cf_pkgconfig_incs" 1>&6
9696
9697echo "${as_me:-configure}:9697: testing package Xext CFLAGS: $cf_pkgconfig_incs ..." 1>&5
9698
9699	test -n "$verbose" && echo "	package Xext LIBS: $cf_pkgconfig_libs" 1>&6
9700
9701echo "${as_me:-configure}:9701: testing package Xext LIBS: $cf_pkgconfig_libs ..." 1>&5
9702
9703cf_fix_cppflags=no
9704cf_new_cflags=
9705cf_new_cppflags=
9706cf_new_extra_cppflags=
9707
9708for cf_add_cflags in $cf_pkgconfig_incs
9709do
9710case $cf_fix_cppflags in
9711no)
9712	case $cf_add_cflags in #(vi
9713	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
9714		case $cf_add_cflags in
9715		-D*)
9716			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9717
9718			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
9719				&& test -z "${cf_tst_cflags}" \
9720				&& cf_fix_cppflags=yes
9721
9722			if test $cf_fix_cppflags = yes ; then
9723				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9724				continue
9725			elif test "${cf_tst_cflags}" = "\"'" ; then
9726				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9727				continue
9728			fi
9729			;;
9730		esac
9731		case "$CPPFLAGS" in
9732		*$cf_add_cflags) #(vi
9733			;;
9734		*) #(vi
9735			case $cf_add_cflags in #(vi
9736			-D*)
9737				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9738
9739CPPFLAGS=`echo "$CPPFLAGS" | \
9740	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
9741		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
9742
9743				;;
9744			esac
9745			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
9746			;;
9747		esac
9748		;;
9749	*)
9750		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
9751		;;
9752	esac
9753	;;
9754yes)
9755	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9756
9757	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9758
9759	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
9760		&& test -z "${cf_tst_cflags}" \
9761		&& cf_fix_cppflags=no
9762	;;
9763esac
9764done
9765
9766if test -n "$cf_new_cflags" ; then
9767
9768	CFLAGS="$CFLAGS $cf_new_cflags"
9769fi
9770
9771if test -n "$cf_new_cppflags" ; then
9772
9773	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
9774fi
9775
9776if test -n "$cf_new_extra_cppflags" ; then
9777
9778	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
9779fi
9780
9781	LIBS="$cf_pkgconfig_libs $LIBS"
9782	:
9783else
9784
9785	echo "$as_me:9785: checking for XextCreateExtension in -lXext" >&5
9786echo $ECHO_N "checking for XextCreateExtension in -lXext... $ECHO_C" >&6
9787if test "${ac_cv_lib_Xext_XextCreateExtension+set}" = set; then
9788  echo $ECHO_N "(cached) $ECHO_C" >&6
9789else
9790  ac_check_lib_save_LIBS=$LIBS
9791LIBS="-lXext  $LIBS"
9792cat >conftest.$ac_ext <<_ACEOF
9793#line 9793 "configure"
9794#include "confdefs.h"
9795
9796/* Override any gcc2 internal prototype to avoid an error.  */
9797#ifdef __cplusplus
9798extern "C"
9799#endif
9800/* We use char because int might match the return type of a gcc2
9801   builtin and then its argument prototype would still apply.  */
9802char XextCreateExtension ();
9803int
9804main ()
9805{
9806XextCreateExtension ();
9807  ;
9808  return 0;
9809}
9810_ACEOF
9811rm -f conftest.$ac_objext conftest$ac_exeext
9812if { (eval echo "$as_me:9812: \"$ac_link\"") >&5
9813  (eval $ac_link) 2>&5
9814  ac_status=$?
9815  echo "$as_me:9815: \$? = $ac_status" >&5
9816  (exit $ac_status); } &&
9817         { ac_try='test -s conftest$ac_exeext'
9818  { (eval echo "$as_me:9818: \"$ac_try\"") >&5
9819  (eval $ac_try) 2>&5
9820  ac_status=$?
9821  echo "$as_me:9821: \$? = $ac_status" >&5
9822  (exit $ac_status); }; }; then
9823  ac_cv_lib_Xext_XextCreateExtension=yes
9824else
9825  echo "$as_me: failed program was:" >&5
9826cat conftest.$ac_ext >&5
9827ac_cv_lib_Xext_XextCreateExtension=no
9828fi
9829rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9830LIBS=$ac_check_lib_save_LIBS
9831fi
9832echo "$as_me:9832: result: $ac_cv_lib_Xext_XextCreateExtension" >&5
9833echo "${ECHO_T}$ac_cv_lib_Xext_XextCreateExtension" >&6
9834if test $ac_cv_lib_Xext_XextCreateExtension = yes; then
9835  LIBS="-lXext $LIBS"
9836fi
9837
9838fi
9839
9840cf_have_X_LIBS=no
9841
9842if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xt; then
9843	test -n "$verbose" && echo "	found package xt" 1>&6
9844
9845echo "${as_me:-configure}:9845: testing found package xt ..." 1>&5
9846
9847	cf_pkgconfig_incs="`$PKG_CONFIG --cflags xt 2>/dev/null`"
9848	cf_pkgconfig_libs="`$PKG_CONFIG --libs   xt 2>/dev/null`"
9849	test -n "$verbose" && echo "	package xt CFLAGS: $cf_pkgconfig_incs" 1>&6
9850
9851echo "${as_me:-configure}:9851: testing package xt CFLAGS: $cf_pkgconfig_incs ..." 1>&5
9852
9853	test -n "$verbose" && echo "	package xt LIBS: $cf_pkgconfig_libs" 1>&6
9854
9855echo "${as_me:-configure}:9855: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5
9856
9857cf_fix_cppflags=no
9858cf_new_cflags=
9859cf_new_cppflags=
9860cf_new_extra_cppflags=
9861
9862for cf_add_cflags in $cf_pkgconfig_incs
9863do
9864case $cf_fix_cppflags in
9865no)
9866	case $cf_add_cflags in #(vi
9867	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
9868		case $cf_add_cflags in
9869		-D*)
9870			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9871
9872			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
9873				&& test -z "${cf_tst_cflags}" \
9874				&& cf_fix_cppflags=yes
9875
9876			if test $cf_fix_cppflags = yes ; then
9877				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9878				continue
9879			elif test "${cf_tst_cflags}" = "\"'" ; then
9880				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9881				continue
9882			fi
9883			;;
9884		esac
9885		case "$CPPFLAGS" in
9886		*$cf_add_cflags) #(vi
9887			;;
9888		*) #(vi
9889			case $cf_add_cflags in #(vi
9890			-D*)
9891				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9892
9893CPPFLAGS=`echo "$CPPFLAGS" | \
9894	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
9895		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
9896
9897				;;
9898			esac
9899			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
9900			;;
9901		esac
9902		;;
9903	*)
9904		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
9905		;;
9906	esac
9907	;;
9908yes)
9909	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9910
9911	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9912
9913	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
9914		&& test -z "${cf_tst_cflags}" \
9915		&& cf_fix_cppflags=no
9916	;;
9917esac
9918done
9919
9920if test -n "$cf_new_cflags" ; then
9921
9922	CFLAGS="$CFLAGS $cf_new_cflags"
9923fi
9924
9925if test -n "$cf_new_cppflags" ; then
9926
9927	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
9928fi
9929
9930if test -n "$cf_new_extra_cppflags" ; then
9931
9932	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
9933fi
9934
9935	LIBS="$cf_pkgconfig_libs $LIBS"
9936
9937	case "x$LIBS" in #(vi
9938	*-lX11*) #(vi
9939		;;
9940	*)
9941# we have an "xt" package, but it may omit Xt's dependency on X11
9942echo "$as_me:9942: checking for usable X dependency" >&5
9943echo $ECHO_N "checking for usable X dependency... $ECHO_C" >&6
9944if test "${cf_cv_xt_x11_compat+set}" = set; then
9945  echo $ECHO_N "(cached) $ECHO_C" >&6
9946else
9947
9948cat >conftest.$ac_ext <<_ACEOF
9949#line 9949 "configure"
9950#include "confdefs.h"
9951
9952#include <X11/Xlib.h>
9953
9954int
9955main ()
9956{
9957
9958	int rc1 = XDrawLine((Display*) 0, (Drawable) 0, (GC) 0, 0, 0, 0, 0);
9959	int rc2 = XClearWindow((Display*) 0, (Window) 0);
9960	int rc3 = XMoveWindow((Display*) 0, (Window) 0, 0, 0);
9961	int rc4 = XMoveResizeWindow((Display*)0, (Window)0, 0, 0, 0, 0);
9962
9963  ;
9964  return 0;
9965}
9966_ACEOF
9967rm -f conftest.$ac_objext conftest$ac_exeext
9968if { (eval echo "$as_me:9968: \"$ac_link\"") >&5
9969  (eval $ac_link) 2>&5
9970  ac_status=$?
9971  echo "$as_me:9971: \$? = $ac_status" >&5
9972  (exit $ac_status); } &&
9973         { ac_try='test -s conftest$ac_exeext'
9974  { (eval echo "$as_me:9974: \"$ac_try\"") >&5
9975  (eval $ac_try) 2>&5
9976  ac_status=$?
9977  echo "$as_me:9977: \$? = $ac_status" >&5
9978  (exit $ac_status); }; }; then
9979  cf_cv_xt_x11_compat=yes
9980else
9981  echo "$as_me: failed program was:" >&5
9982cat conftest.$ac_ext >&5
9983cf_cv_xt_x11_compat=no
9984fi
9985rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9986fi
9987echo "$as_me:9987: result: $cf_cv_xt_x11_compat" >&5
9988echo "${ECHO_T}$cf_cv_xt_x11_compat" >&6
9989		if test "$cf_cv_xt_x11_compat" = no
9990		then
9991			test -n "$verbose" && echo "	work around broken X11 dependency" 1>&6
9992
9993echo "${as_me:-configure}:9993: testing work around broken X11 dependency ..." 1>&5
9994
9995			# 2010/11/19 - good enough until a working Xt on Xcb is delivered.
9996
9997if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists x11; then
9998	test -n "$verbose" && echo "	found package x11" 1>&6
9999
10000echo "${as_me:-configure}:10000: testing found package x11 ..." 1>&5
10001
10002	cf_pkgconfig_incs="`$PKG_CONFIG --cflags x11 2>/dev/null`"
10003	cf_pkgconfig_libs="`$PKG_CONFIG --libs   x11 2>/dev/null`"
10004	test -n "$verbose" && echo "	package x11 CFLAGS: $cf_pkgconfig_incs" 1>&6
10005
10006echo "${as_me:-configure}:10006: testing package x11 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
10007
10008	test -n "$verbose" && echo "	package x11 LIBS: $cf_pkgconfig_libs" 1>&6
10009
10010echo "${as_me:-configure}:10010: testing package x11 LIBS: $cf_pkgconfig_libs ..." 1>&5
10011
10012cf_fix_cppflags=no
10013cf_new_cflags=
10014cf_new_cppflags=
10015cf_new_extra_cppflags=
10016
10017for cf_add_cflags in $cf_pkgconfig_incs
10018do
10019case $cf_fix_cppflags in
10020no)
10021	case $cf_add_cflags in #(vi
10022	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
10023		case $cf_add_cflags in
10024		-D*)
10025			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10026
10027			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10028				&& test -z "${cf_tst_cflags}" \
10029				&& cf_fix_cppflags=yes
10030
10031			if test $cf_fix_cppflags = yes ; then
10032				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10033				continue
10034			elif test "${cf_tst_cflags}" = "\"'" ; then
10035				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10036				continue
10037			fi
10038			;;
10039		esac
10040		case "$CPPFLAGS" in
10041		*$cf_add_cflags) #(vi
10042			;;
10043		*) #(vi
10044			case $cf_add_cflags in #(vi
10045			-D*)
10046				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10047
10048CPPFLAGS=`echo "$CPPFLAGS" | \
10049	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
10050		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
10051
10052				;;
10053			esac
10054			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10055			;;
10056		esac
10057		;;
10058	*)
10059		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10060		;;
10061	esac
10062	;;
10063yes)
10064	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10065
10066	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10067
10068	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10069		&& test -z "${cf_tst_cflags}" \
10070		&& cf_fix_cppflags=no
10071	;;
10072esac
10073done
10074
10075if test -n "$cf_new_cflags" ; then
10076
10077	CFLAGS="$CFLAGS $cf_new_cflags"
10078fi
10079
10080if test -n "$cf_new_cppflags" ; then
10081
10082	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
10083fi
10084
10085if test -n "$cf_new_extra_cppflags" ; then
10086
10087	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10088fi
10089
10090	LIBS="$cf_pkgconfig_libs $LIBS"
10091	:
10092else
10093
10094test -n "$verbose" && echo "	...before $LIBS" 1>&6
10095
10096echo "${as_me:-configure}:10096: testing ...before $LIBS ..." 1>&5
10097
10098LIBS=`echo "$LIBS" | sed -e "s/[ 	][ 	]*/ /g" -e "s,-lXt ,-lXt -lX11 ," -e 's/  / /g'`
10099test -n "$verbose" && echo "	...after  $LIBS" 1>&6
10100
10101echo "${as_me:-configure}:10101: testing ...after  $LIBS ..." 1>&5
10102
10103fi
10104
10105		fi
10106		;;
10107	esac
10108
10109echo "$as_me:10109: checking for usable X Toolkit package" >&5
10110echo $ECHO_N "checking for usable X Toolkit package... $ECHO_C" >&6
10111if test "${cf_cv_xt_ice_compat+set}" = set; then
10112  echo $ECHO_N "(cached) $ECHO_C" >&6
10113else
10114
10115cat >conftest.$ac_ext <<_ACEOF
10116#line 10116 "configure"
10117#include "confdefs.h"
10118
10119#include <X11/Shell.h>
10120
10121int
10122main ()
10123{
10124int num = IceConnectionNumber(0)
10125
10126  ;
10127  return 0;
10128}
10129_ACEOF
10130rm -f conftest.$ac_objext conftest$ac_exeext
10131if { (eval echo "$as_me:10131: \"$ac_link\"") >&5
10132  (eval $ac_link) 2>&5
10133  ac_status=$?
10134  echo "$as_me:10134: \$? = $ac_status" >&5
10135  (exit $ac_status); } &&
10136         { ac_try='test -s conftest$ac_exeext'
10137  { (eval echo "$as_me:10137: \"$ac_try\"") >&5
10138  (eval $ac_try) 2>&5
10139  ac_status=$?
10140  echo "$as_me:10140: \$? = $ac_status" >&5
10141  (exit $ac_status); }; }; then
10142  cf_cv_xt_ice_compat=yes
10143else
10144  echo "$as_me: failed program was:" >&5
10145cat conftest.$ac_ext >&5
10146cf_cv_xt_ice_compat=no
10147fi
10148rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10149fi
10150echo "$as_me:10150: result: $cf_cv_xt_ice_compat" >&5
10151echo "${ECHO_T}$cf_cv_xt_ice_compat" >&6
10152
10153	if test "$cf_cv_xt_ice_compat" = no
10154	then
10155		# workaround for broken ".pc" files used for X Toolkit.
10156		case "x$X_PRE_LIBS" in #(vi
10157		*-lICE*)
10158			case "x$LIBS" in #(vi
10159			*-lICE*) #(vi
10160				;;
10161			*)
10162				test -n "$verbose" && echo "	work around broken ICE dependency" 1>&6
10163
10164echo "${as_me:-configure}:10164: testing work around broken ICE dependency ..." 1>&5
10165
10166if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists ice; then
10167	test -n "$verbose" && echo "	found package ice" 1>&6
10168
10169echo "${as_me:-configure}:10169: testing found package ice ..." 1>&5
10170
10171	cf_pkgconfig_incs="`$PKG_CONFIG --cflags ice 2>/dev/null`"
10172	cf_pkgconfig_libs="`$PKG_CONFIG --libs   ice 2>/dev/null`"
10173	test -n "$verbose" && echo "	package ice CFLAGS: $cf_pkgconfig_incs" 1>&6
10174
10175echo "${as_me:-configure}:10175: testing package ice CFLAGS: $cf_pkgconfig_incs ..." 1>&5
10176
10177	test -n "$verbose" && echo "	package ice LIBS: $cf_pkgconfig_libs" 1>&6
10178
10179echo "${as_me:-configure}:10179: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5
10180
10181cf_fix_cppflags=no
10182cf_new_cflags=
10183cf_new_cppflags=
10184cf_new_extra_cppflags=
10185
10186for cf_add_cflags in $cf_pkgconfig_incs
10187do
10188case $cf_fix_cppflags in
10189no)
10190	case $cf_add_cflags in #(vi
10191	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
10192		case $cf_add_cflags in
10193		-D*)
10194			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10195
10196			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10197				&& test -z "${cf_tst_cflags}" \
10198				&& cf_fix_cppflags=yes
10199
10200			if test $cf_fix_cppflags = yes ; then
10201				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10202				continue
10203			elif test "${cf_tst_cflags}" = "\"'" ; then
10204				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10205				continue
10206			fi
10207			;;
10208		esac
10209		case "$CPPFLAGS" in
10210		*$cf_add_cflags) #(vi
10211			;;
10212		*) #(vi
10213			case $cf_add_cflags in #(vi
10214			-D*)
10215				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10216
10217CPPFLAGS=`echo "$CPPFLAGS" | \
10218	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
10219		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
10220
10221				;;
10222			esac
10223			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10224			;;
10225		esac
10226		;;
10227	*)
10228		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10229		;;
10230	esac
10231	;;
10232yes)
10233	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10234
10235	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10236
10237	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10238		&& test -z "${cf_tst_cflags}" \
10239		&& cf_fix_cppflags=no
10240	;;
10241esac
10242done
10243
10244if test -n "$cf_new_cflags" ; then
10245
10246	CFLAGS="$CFLAGS $cf_new_cflags"
10247fi
10248
10249if test -n "$cf_new_cppflags" ; then
10250
10251	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
10252fi
10253
10254if test -n "$cf_new_extra_cppflags" ; then
10255
10256	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10257fi
10258
10259	LIBS="$cf_pkgconfig_libs $LIBS"
10260
10261if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists sm; then
10262	test -n "$verbose" && echo "	found package sm" 1>&6
10263
10264echo "${as_me:-configure}:10264: testing found package sm ..." 1>&5
10265
10266	cf_pkgconfig_incs="`$PKG_CONFIG --cflags sm 2>/dev/null`"
10267	cf_pkgconfig_libs="`$PKG_CONFIG --libs   sm 2>/dev/null`"
10268	test -n "$verbose" && echo "	package sm CFLAGS: $cf_pkgconfig_incs" 1>&6
10269
10270echo "${as_me:-configure}:10270: testing package sm CFLAGS: $cf_pkgconfig_incs ..." 1>&5
10271
10272	test -n "$verbose" && echo "	package sm LIBS: $cf_pkgconfig_libs" 1>&6
10273
10274echo "${as_me:-configure}:10274: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5
10275
10276cf_fix_cppflags=no
10277cf_new_cflags=
10278cf_new_cppflags=
10279cf_new_extra_cppflags=
10280
10281for cf_add_cflags in $cf_pkgconfig_incs
10282do
10283case $cf_fix_cppflags in
10284no)
10285	case $cf_add_cflags in #(vi
10286	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
10287		case $cf_add_cflags in
10288		-D*)
10289			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10290
10291			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10292				&& test -z "${cf_tst_cflags}" \
10293				&& cf_fix_cppflags=yes
10294
10295			if test $cf_fix_cppflags = yes ; then
10296				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10297				continue
10298			elif test "${cf_tst_cflags}" = "\"'" ; then
10299				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10300				continue
10301			fi
10302			;;
10303		esac
10304		case "$CPPFLAGS" in
10305		*$cf_add_cflags) #(vi
10306			;;
10307		*) #(vi
10308			case $cf_add_cflags in #(vi
10309			-D*)
10310				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10311
10312CPPFLAGS=`echo "$CPPFLAGS" | \
10313	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
10314		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
10315
10316				;;
10317			esac
10318			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10319			;;
10320		esac
10321		;;
10322	*)
10323		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10324		;;
10325	esac
10326	;;
10327yes)
10328	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10329
10330	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10331
10332	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10333		&& test -z "${cf_tst_cflags}" \
10334		&& cf_fix_cppflags=no
10335	;;
10336esac
10337done
10338
10339if test -n "$cf_new_cflags" ; then
10340
10341	CFLAGS="$CFLAGS $cf_new_cflags"
10342fi
10343
10344if test -n "$cf_new_cppflags" ; then
10345
10346	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
10347fi
10348
10349if test -n "$cf_new_extra_cppflags" ; then
10350
10351	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10352fi
10353
10354	LIBS="$cf_pkgconfig_libs $LIBS"
10355	:
10356else
10357	:
10358fi
10359
10360else
10361
10362test -n "$verbose" && echo "	...before $LIBS" 1>&6
10363
10364echo "${as_me:-configure}:10364: testing ...before $LIBS ..." 1>&5
10365
10366LIBS=`echo "$LIBS" | sed -e "s/[ 	][ 	]*/ /g" -e "s,-lXt ,-lXt $X_PRE_LIBS ," -e 's/  / /g'`
10367test -n "$verbose" && echo "	...after  $LIBS" 1>&6
10368
10369echo "${as_me:-configure}:10369: testing ...after  $LIBS ..." 1>&5
10370
10371fi
10372
10373				;;
10374			esac
10375			;;
10376		esac
10377	fi
10378
10379	cf_have_X_LIBS=yes
10380
10381else
10382
10383	LDFLAGS="$X_LIBS $LDFLAGS"
10384
10385test -n "$verbose" && echo "	checking additions to CFLAGS" 1>&6
10386
10387echo "${as_me:-configure}:10387: testing checking additions to CFLAGS ..." 1>&5
10388
10389cf_check_cflags="$CFLAGS"
10390cf_check_cppflags="$CPPFLAGS"
10391
10392cf_fix_cppflags=no
10393cf_new_cflags=
10394cf_new_cppflags=
10395cf_new_extra_cppflags=
10396
10397for cf_add_cflags in $X_CFLAGS
10398do
10399case $cf_fix_cppflags in
10400no)
10401	case $cf_add_cflags in #(vi
10402	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
10403		case $cf_add_cflags in
10404		-D*)
10405			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10406
10407			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10408				&& test -z "${cf_tst_cflags}" \
10409				&& cf_fix_cppflags=yes
10410
10411			if test $cf_fix_cppflags = yes ; then
10412				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10413				continue
10414			elif test "${cf_tst_cflags}" = "\"'" ; then
10415				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10416				continue
10417			fi
10418			;;
10419		esac
10420		case "$CPPFLAGS" in
10421		*$cf_add_cflags) #(vi
10422			;;
10423		*) #(vi
10424			case $cf_add_cflags in #(vi
10425			-D*)
10426				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10427
10428CPPFLAGS=`echo "$CPPFLAGS" | \
10429	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
10430		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
10431
10432				;;
10433			esac
10434			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10435			;;
10436		esac
10437		;;
10438	*)
10439		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10440		;;
10441	esac
10442	;;
10443yes)
10444	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10445
10446	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10447
10448	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10449		&& test -z "${cf_tst_cflags}" \
10450		&& cf_fix_cppflags=no
10451	;;
10452esac
10453done
10454
10455if test -n "$cf_new_cflags" ; then
10456	test -n "$verbose" && echo "	add to \$CFLAGS $cf_new_cflags" 1>&6
10457
10458echo "${as_me:-configure}:10458: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
10459
10460	CFLAGS="$CFLAGS $cf_new_cflags"
10461fi
10462
10463if test -n "$cf_new_cppflags" ; then
10464	test -n "$verbose" && echo "	add to \$CPPFLAGS $cf_new_cppflags" 1>&6
10465
10466echo "${as_me:-configure}:10466: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
10467
10468	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
10469fi
10470
10471if test -n "$cf_new_extra_cppflags" ; then
10472	test -n "$verbose" && echo "	add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
10473
10474echo "${as_me:-configure}:10474: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
10475
10476	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10477fi
10478
10479if test "$cf_check_cflags" != "$CFLAGS" ; then
10480cat >conftest.$ac_ext <<_ACEOF
10481#line 10481 "configure"
10482#include "confdefs.h"
10483#include <stdio.h>
10484int
10485main ()
10486{
10487printf("Hello world");
10488  ;
10489  return 0;
10490}
10491_ACEOF
10492rm -f conftest.$ac_objext conftest$ac_exeext
10493if { (eval echo "$as_me:10493: \"$ac_link\"") >&5
10494  (eval $ac_link) 2>&5
10495  ac_status=$?
10496  echo "$as_me:10496: \$? = $ac_status" >&5
10497  (exit $ac_status); } &&
10498         { ac_try='test -s conftest$ac_exeext'
10499  { (eval echo "$as_me:10499: \"$ac_try\"") >&5
10500  (eval $ac_try) 2>&5
10501  ac_status=$?
10502  echo "$as_me:10502: \$? = $ac_status" >&5
10503  (exit $ac_status); }; }; then
10504  :
10505else
10506  echo "$as_me: failed program was:" >&5
10507cat conftest.$ac_ext >&5
10508test -n "$verbose" && echo "	test-compile failed.  Undoing change to \$CFLAGS" 1>&6
10509
10510echo "${as_me:-configure}:10510: testing test-compile failed.  Undoing change to \$CFLAGS ..." 1>&5
10511
10512	 if test "$cf_check_cppflags" != "$CPPFLAGS" ; then
10513		 test -n "$verbose" && echo "	but keeping change to \$CPPFLAGS" 1>&6
10514
10515echo "${as_me:-configure}:10515: testing but keeping change to \$CPPFLAGS ..." 1>&5
10516
10517	 fi
10518	 CFLAGS="$cf_check_flags"
10519fi
10520rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10521fi
10522
10523	echo "$as_me:10523: checking for XOpenDisplay" >&5
10524echo $ECHO_N "checking for XOpenDisplay... $ECHO_C" >&6
10525if test "${ac_cv_func_XOpenDisplay+set}" = set; then
10526  echo $ECHO_N "(cached) $ECHO_C" >&6
10527else
10528  cat >conftest.$ac_ext <<_ACEOF
10529#line 10529 "configure"
10530#include "confdefs.h"
10531/* System header to define __stub macros and hopefully few prototypes,
10532    which can conflict with char XOpenDisplay (); below.  */
10533#include <assert.h>
10534/* Override any gcc2 internal prototype to avoid an error.  */
10535#ifdef __cplusplus
10536extern "C"
10537#endif
10538/* We use char because int might match the return type of a gcc2
10539   builtin and then its argument prototype would still apply.  */
10540char XOpenDisplay ();
10541char (*f) ();
10542
10543int
10544main ()
10545{
10546/* The GNU C library defines this for functions which it implements
10547    to always fail with ENOSYS.  Some functions are actually named
10548    something starting with __ and the normal name is an alias.  */
10549#if defined (__stub_XOpenDisplay) || defined (__stub___XOpenDisplay)
10550choke me
10551#else
10552f = XOpenDisplay;
10553#endif
10554
10555  ;
10556  return 0;
10557}
10558_ACEOF
10559rm -f conftest.$ac_objext conftest$ac_exeext
10560if { (eval echo "$as_me:10560: \"$ac_link\"") >&5
10561  (eval $ac_link) 2>&5
10562  ac_status=$?
10563  echo "$as_me:10563: \$? = $ac_status" >&5
10564  (exit $ac_status); } &&
10565         { ac_try='test -s conftest$ac_exeext'
10566  { (eval echo "$as_me:10566: \"$ac_try\"") >&5
10567  (eval $ac_try) 2>&5
10568  ac_status=$?
10569  echo "$as_me:10569: \$? = $ac_status" >&5
10570  (exit $ac_status); }; }; then
10571  ac_cv_func_XOpenDisplay=yes
10572else
10573  echo "$as_me: failed program was:" >&5
10574cat conftest.$ac_ext >&5
10575ac_cv_func_XOpenDisplay=no
10576fi
10577rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10578fi
10579echo "$as_me:10579: result: $ac_cv_func_XOpenDisplay" >&5
10580echo "${ECHO_T}$ac_cv_func_XOpenDisplay" >&6
10581if test $ac_cv_func_XOpenDisplay = yes; then
10582  :
10583else
10584
10585	echo "$as_me:10585: checking for XOpenDisplay in -lX11" >&5
10586echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6
10587if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then
10588  echo $ECHO_N "(cached) $ECHO_C" >&6
10589else
10590  ac_check_lib_save_LIBS=$LIBS
10591LIBS="-lX11 $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
10592cat >conftest.$ac_ext <<_ACEOF
10593#line 10593 "configure"
10594#include "confdefs.h"
10595
10596/* Override any gcc2 internal prototype to avoid an error.  */
10597#ifdef __cplusplus
10598extern "C"
10599#endif
10600/* We use char because int might match the return type of a gcc2
10601   builtin and then its argument prototype would still apply.  */
10602char XOpenDisplay ();
10603int
10604main ()
10605{
10606XOpenDisplay ();
10607  ;
10608  return 0;
10609}
10610_ACEOF
10611rm -f conftest.$ac_objext conftest$ac_exeext
10612if { (eval echo "$as_me:10612: \"$ac_link\"") >&5
10613  (eval $ac_link) 2>&5
10614  ac_status=$?
10615  echo "$as_me:10615: \$? = $ac_status" >&5
10616  (exit $ac_status); } &&
10617         { ac_try='test -s conftest$ac_exeext'
10618  { (eval echo "$as_me:10618: \"$ac_try\"") >&5
10619  (eval $ac_try) 2>&5
10620  ac_status=$?
10621  echo "$as_me:10621: \$? = $ac_status" >&5
10622  (exit $ac_status); }; }; then
10623  ac_cv_lib_X11_XOpenDisplay=yes
10624else
10625  echo "$as_me: failed program was:" >&5
10626cat conftest.$ac_ext >&5
10627ac_cv_lib_X11_XOpenDisplay=no
10628fi
10629rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10630LIBS=$ac_check_lib_save_LIBS
10631fi
10632echo "$as_me:10632: result: $ac_cv_lib_X11_XOpenDisplay" >&5
10633echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6
10634if test $ac_cv_lib_X11_XOpenDisplay = yes; then
10635  LIBS="-lX11 $LIBS"
10636fi
10637
10638fi
10639
10640	echo "$as_me:10640: checking for XtAppInitialize" >&5
10641echo $ECHO_N "checking for XtAppInitialize... $ECHO_C" >&6
10642if test "${ac_cv_func_XtAppInitialize+set}" = set; then
10643  echo $ECHO_N "(cached) $ECHO_C" >&6
10644else
10645  cat >conftest.$ac_ext <<_ACEOF
10646#line 10646 "configure"
10647#include "confdefs.h"
10648/* System header to define __stub macros and hopefully few prototypes,
10649    which can conflict with char XtAppInitialize (); below.  */
10650#include <assert.h>
10651/* Override any gcc2 internal prototype to avoid an error.  */
10652#ifdef __cplusplus
10653extern "C"
10654#endif
10655/* We use char because int might match the return type of a gcc2
10656   builtin and then its argument prototype would still apply.  */
10657char XtAppInitialize ();
10658char (*f) ();
10659
10660int
10661main ()
10662{
10663/* The GNU C library defines this for functions which it implements
10664    to always fail with ENOSYS.  Some functions are actually named
10665    something starting with __ and the normal name is an alias.  */
10666#if defined (__stub_XtAppInitialize) || defined (__stub___XtAppInitialize)
10667choke me
10668#else
10669f = XtAppInitialize;
10670#endif
10671
10672  ;
10673  return 0;
10674}
10675_ACEOF
10676rm -f conftest.$ac_objext conftest$ac_exeext
10677if { (eval echo "$as_me:10677: \"$ac_link\"") >&5
10678  (eval $ac_link) 2>&5
10679  ac_status=$?
10680  echo "$as_me:10680: \$? = $ac_status" >&5
10681  (exit $ac_status); } &&
10682         { ac_try='test -s conftest$ac_exeext'
10683  { (eval echo "$as_me:10683: \"$ac_try\"") >&5
10684  (eval $ac_try) 2>&5
10685  ac_status=$?
10686  echo "$as_me:10686: \$? = $ac_status" >&5
10687  (exit $ac_status); }; }; then
10688  ac_cv_func_XtAppInitialize=yes
10689else
10690  echo "$as_me: failed program was:" >&5
10691cat conftest.$ac_ext >&5
10692ac_cv_func_XtAppInitialize=no
10693fi
10694rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10695fi
10696echo "$as_me:10696: result: $ac_cv_func_XtAppInitialize" >&5
10697echo "${ECHO_T}$ac_cv_func_XtAppInitialize" >&6
10698if test $ac_cv_func_XtAppInitialize = yes; then
10699  :
10700else
10701
10702	echo "$as_me:10702: checking for XtAppInitialize in -lXt" >&5
10703echo $ECHO_N "checking for XtAppInitialize in -lXt... $ECHO_C" >&6
10704if test "${ac_cv_lib_Xt_XtAppInitialize+set}" = set; then
10705  echo $ECHO_N "(cached) $ECHO_C" >&6
10706else
10707  ac_check_lib_save_LIBS=$LIBS
10708LIBS="-lXt $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
10709cat >conftest.$ac_ext <<_ACEOF
10710#line 10710 "configure"
10711#include "confdefs.h"
10712
10713/* Override any gcc2 internal prototype to avoid an error.  */
10714#ifdef __cplusplus
10715extern "C"
10716#endif
10717/* We use char because int might match the return type of a gcc2
10718   builtin and then its argument prototype would still apply.  */
10719char XtAppInitialize ();
10720int
10721main ()
10722{
10723XtAppInitialize ();
10724  ;
10725  return 0;
10726}
10727_ACEOF
10728rm -f conftest.$ac_objext conftest$ac_exeext
10729if { (eval echo "$as_me:10729: \"$ac_link\"") >&5
10730  (eval $ac_link) 2>&5
10731  ac_status=$?
10732  echo "$as_me:10732: \$? = $ac_status" >&5
10733  (exit $ac_status); } &&
10734         { ac_try='test -s conftest$ac_exeext'
10735  { (eval echo "$as_me:10735: \"$ac_try\"") >&5
10736  (eval $ac_try) 2>&5
10737  ac_status=$?
10738  echo "$as_me:10738: \$? = $ac_status" >&5
10739  (exit $ac_status); }; }; then
10740  ac_cv_lib_Xt_XtAppInitialize=yes
10741else
10742  echo "$as_me: failed program was:" >&5
10743cat conftest.$ac_ext >&5
10744ac_cv_lib_Xt_XtAppInitialize=no
10745fi
10746rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10747LIBS=$ac_check_lib_save_LIBS
10748fi
10749echo "$as_me:10749: result: $ac_cv_lib_Xt_XtAppInitialize" >&5
10750echo "${ECHO_T}$ac_cv_lib_Xt_XtAppInitialize" >&6
10751if test $ac_cv_lib_Xt_XtAppInitialize = yes; then
10752  cat >>confdefs.h <<\EOF
10753#define HAVE_LIBXT 1
10754EOF
10755
10756		 cf_have_X_LIBS=Xt
10757		 LIBS="-lXt $X_PRE_LIBS $LIBS $X_EXTRA_LIBS"
10758fi
10759
10760fi
10761
10762fi
10763
10764if test $cf_have_X_LIBS = no ; then
10765	{ echo "$as_me:10765: WARNING: Unable to successfully link X Toolkit library (-lXt) with
10766test program.  You will have to check and add the proper libraries by hand
10767to makefile." >&5
10768echo "$as_me: WARNING: Unable to successfully link X Toolkit library (-lXt) with
10769test program.  You will have to check and add the proper libraries by hand
10770to makefile." >&2;}
10771fi
10772
10773cf_x_athena_root=$cf_x_athena
10774cf_x_athena_inc=""
10775
10776for cf_path in default \
10777	/usr/contrib/X11R6 \
10778	/usr/contrib/X11R5 \
10779	/usr/lib/X11R5 \
10780	/usr/local
10781do
10782	if test -z "$cf_x_athena_inc" ; then
10783		cf_save="$CPPFLAGS"
10784		cf_test=X11/$cf_x_athena_root/SimpleMenu.h
10785		if test $cf_path != default ; then
10786			CPPFLAGS="$cf_save -I$cf_path/include"
10787			echo "$as_me:10787: checking for $cf_test in $cf_path" >&5
10788echo $ECHO_N "checking for $cf_test in $cf_path... $ECHO_C" >&6
10789		else
10790			echo "$as_me:10790: checking for $cf_test" >&5
10791echo $ECHO_N "checking for $cf_test... $ECHO_C" >&6
10792		fi
10793		cat >conftest.$ac_ext <<_ACEOF
10794#line 10794 "configure"
10795#include "confdefs.h"
10796
10797#include <X11/Intrinsic.h>
10798#include <$cf_test>
10799int
10800main ()
10801{
10802
10803  ;
10804  return 0;
10805}
10806_ACEOF
10807rm -f conftest.$ac_objext
10808if { (eval echo "$as_me:10808: \"$ac_compile\"") >&5
10809  (eval $ac_compile) 2>&5
10810  ac_status=$?
10811  echo "$as_me:10811: \$? = $ac_status" >&5
10812  (exit $ac_status); } &&
10813         { ac_try='test -s conftest.$ac_objext'
10814  { (eval echo "$as_me:10814: \"$ac_try\"") >&5
10815  (eval $ac_try) 2>&5
10816  ac_status=$?
10817  echo "$as_me:10817: \$? = $ac_status" >&5
10818  (exit $ac_status); }; }; then
10819  cf_result=yes
10820else
10821  echo "$as_me: failed program was:" >&5
10822cat conftest.$ac_ext >&5
10823cf_result=no
10824fi
10825rm -f conftest.$ac_objext conftest.$ac_ext
10826		echo "$as_me:10826: result: $cf_result" >&5
10827echo "${ECHO_T}$cf_result" >&6
10828		if test "$cf_result" = yes ; then
10829			cf_x_athena_inc=$cf_path
10830			break
10831		else
10832			CPPFLAGS="$cf_save"
10833		fi
10834	fi
10835done
10836
10837if test -z "$cf_x_athena_inc" ; then
10838	{ echo "$as_me:10838: WARNING: Unable to successfully find Athena header files with test program" >&5
10839echo "$as_me: WARNING: Unable to successfully find Athena header files with test program" >&2;}
10840elif test "$cf_x_athena_inc" != default ; then
10841	CPPFLAGS="$CPPFLAGS -I$cf_x_athena_inc"
10842fi
10843
10844cf_x_athena_root=$cf_x_athena
10845cf_x_athena_lib=""
10846
10847for cf_path in default \
10848	/usr/contrib/X11R6 \
10849	/usr/contrib/X11R5 \
10850	/usr/lib/X11R5 \
10851	/usr/local
10852do
10853	for cf_lib in \
10854		"-l$cf_x_athena_root -lXmu" \
10855		"-l$cf_x_athena_root -lXpm -lXmu" \
10856		"-l${cf_x_athena_root}_s -lXmu_s"
10857	do
10858		if test -z "$cf_x_athena_lib" ; then
10859			cf_save="$LIBS"
10860			cf_test=XawSimpleMenuAddGlobalActions
10861			if test $cf_path != default ; then
10862				LIBS="-L$cf_path/lib $cf_lib $LIBS"
10863				echo "$as_me:10863: checking for $cf_lib in $cf_path" >&5
10864echo $ECHO_N "checking for $cf_lib in $cf_path... $ECHO_C" >&6
10865			else
10866				LIBS="$cf_lib $LIBS"
10867				echo "$as_me:10867: checking for $cf_test in $cf_lib" >&5
10868echo $ECHO_N "checking for $cf_test in $cf_lib... $ECHO_C" >&6
10869			fi
10870			cat >conftest.$ac_ext <<_ACEOF
10871#line 10871 "configure"
10872#include "confdefs.h"
10873
10874int
10875main ()
10876{
10877$cf_test()
10878  ;
10879  return 0;
10880}
10881_ACEOF
10882rm -f conftest.$ac_objext conftest$ac_exeext
10883if { (eval echo "$as_me:10883: \"$ac_link\"") >&5
10884  (eval $ac_link) 2>&5
10885  ac_status=$?
10886  echo "$as_me:10886: \$? = $ac_status" >&5
10887  (exit $ac_status); } &&
10888         { ac_try='test -s conftest$ac_exeext'
10889  { (eval echo "$as_me:10889: \"$ac_try\"") >&5
10890  (eval $ac_try) 2>&5
10891  ac_status=$?
10892  echo "$as_me:10892: \$? = $ac_status" >&5
10893  (exit $ac_status); }; }; then
10894  cf_result=yes
10895else
10896  echo "$as_me: failed program was:" >&5
10897cat conftest.$ac_ext >&5
10898cf_result=no
10899fi
10900rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10901			echo "$as_me:10901: result: $cf_result" >&5
10902echo "${ECHO_T}$cf_result" >&6
10903			if test "$cf_result" = yes ; then
10904				cf_x_athena_lib="$cf_lib"
10905				break
10906			fi
10907			LIBS="$cf_save"
10908		fi
10909	done
10910done
10911
10912if test -z "$cf_x_athena_lib" ; then
10913	{ { echo "$as_me:10913: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&5
10914echo "$as_me: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&2;}
10915   { (exit 1); exit 1; }; }
10916fi
10917
10918cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
10919
10920cat >>confdefs.h <<EOF
10921#define $cf_x_athena_LIBS 1
10922EOF
10923
10924fi
10925
10926for ac_header in X11/Xpoll.h
10927do
10928as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10929echo "$as_me:10929: checking for $ac_header" >&5
10930echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10931if eval "test \"\${$as_ac_Header+set}\" = set"; then
10932  echo $ECHO_N "(cached) $ECHO_C" >&6
10933else
10934  cat >conftest.$ac_ext <<_ACEOF
10935#line 10935 "configure"
10936#include "confdefs.h"
10937#include <$ac_header>
10938_ACEOF
10939if { (eval echo "$as_me:10939: \"$ac_cpp conftest.$ac_ext\"") >&5
10940  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10941  ac_status=$?
10942  egrep -v '^ *\+' conftest.er1 >conftest.err
10943  rm -f conftest.er1
10944  cat conftest.err >&5
10945  echo "$as_me:10945: \$? = $ac_status" >&5
10946  (exit $ac_status); } >/dev/null; then
10947  if test -s conftest.err; then
10948    ac_cpp_err=$ac_c_preproc_warn_flag
10949  else
10950    ac_cpp_err=
10951  fi
10952else
10953  ac_cpp_err=yes
10954fi
10955if test -z "$ac_cpp_err"; then
10956  eval "$as_ac_Header=yes"
10957else
10958  echo "$as_me: failed program was:" >&5
10959  cat conftest.$ac_ext >&5
10960  eval "$as_ac_Header=no"
10961fi
10962rm -f conftest.err conftest.$ac_ext
10963fi
10964echo "$as_me:10964: result: `eval echo '${'$as_ac_Header'}'`" >&5
10965echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10966if test `eval echo '${'$as_ac_Header'}'` = yes; then
10967  cat >>confdefs.h <<EOF
10968#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10969EOF
10970
10971fi
10972done
10973
10974echo "$as_me:10974: checking for declaration of fd_set" >&5
10975echo $ECHO_N "checking for declaration of fd_set... $ECHO_C" >&6
10976if test "${cf_cv_type_fd_set+set}" = set; then
10977  echo $ECHO_N "(cached) $ECHO_C" >&6
10978else
10979
10980echo "${as_me:-configure}:10980: testing sys/types alone ..." 1>&5
10981
10982cat >conftest.$ac_ext <<_ACEOF
10983#line 10983 "configure"
10984#include "confdefs.h"
10985
10986#include <sys/types.h>
10987int
10988main ()
10989{
10990fd_set x
10991  ;
10992  return 0;
10993}
10994_ACEOF
10995rm -f conftest.$ac_objext
10996if { (eval echo "$as_me:10996: \"$ac_compile\"") >&5
10997  (eval $ac_compile) 2>&5
10998  ac_status=$?
10999  echo "$as_me:10999: \$? = $ac_status" >&5
11000  (exit $ac_status); } &&
11001         { ac_try='test -s conftest.$ac_objext'
11002  { (eval echo "$as_me:11002: \"$ac_try\"") >&5
11003  (eval $ac_try) 2>&5
11004  ac_status=$?
11005  echo "$as_me:11005: \$? = $ac_status" >&5
11006  (exit $ac_status); }; }; then
11007  cf_cv_type_fd_set=sys/types.h
11008else
11009  echo "$as_me: failed program was:" >&5
11010cat conftest.$ac_ext >&5
11011
11012echo "${as_me:-configure}:11012: testing X11/Xpoll.h ..." 1>&5
11013
11014cat >conftest.$ac_ext <<_ACEOF
11015#line 11015 "configure"
11016#include "confdefs.h"
11017
11018#ifdef HAVE_X11_XPOLL_H
11019#include <X11/Xpoll.h>
11020#endif
11021int
11022main ()
11023{
11024fd_set x
11025  ;
11026  return 0;
11027}
11028_ACEOF
11029rm -f conftest.$ac_objext
11030if { (eval echo "$as_me:11030: \"$ac_compile\"") >&5
11031  (eval $ac_compile) 2>&5
11032  ac_status=$?
11033  echo "$as_me:11033: \$? = $ac_status" >&5
11034  (exit $ac_status); } &&
11035         { ac_try='test -s conftest.$ac_objext'
11036  { (eval echo "$as_me:11036: \"$ac_try\"") >&5
11037  (eval $ac_try) 2>&5
11038  ac_status=$?
11039  echo "$as_me:11039: \$? = $ac_status" >&5
11040  (exit $ac_status); }; }; then
11041  cf_cv_type_fd_set=X11/Xpoll.h
11042else
11043  echo "$as_me: failed program was:" >&5
11044cat conftest.$ac_ext >&5
11045
11046echo "${as_me:-configure}:11046: testing sys/select.h ..." 1>&5
11047
11048cat >conftest.$ac_ext <<_ACEOF
11049#line 11049 "configure"
11050#include "confdefs.h"
11051
11052#include <sys/types.h>
11053#include <sys/select.h>
11054int
11055main ()
11056{
11057fd_set x
11058  ;
11059  return 0;
11060}
11061_ACEOF
11062rm -f conftest.$ac_objext
11063if { (eval echo "$as_me:11063: \"$ac_compile\"") >&5
11064  (eval $ac_compile) 2>&5
11065  ac_status=$?
11066  echo "$as_me:11066: \$? = $ac_status" >&5
11067  (exit $ac_status); } &&
11068         { ac_try='test -s conftest.$ac_objext'
11069  { (eval echo "$as_me:11069: \"$ac_try\"") >&5
11070  (eval $ac_try) 2>&5
11071  ac_status=$?
11072  echo "$as_me:11072: \$? = $ac_status" >&5
11073  (exit $ac_status); }; }; then
11074  cf_cv_type_fd_set=sys/select.h
11075else
11076  echo "$as_me: failed program was:" >&5
11077cat conftest.$ac_ext >&5
11078cf_cv_type_fd_set=unknown
11079fi
11080rm -f conftest.$ac_objext conftest.$ac_ext
11081fi
11082rm -f conftest.$ac_objext conftest.$ac_ext
11083fi
11084rm -f conftest.$ac_objext conftest.$ac_ext
11085fi
11086echo "$as_me:11086: result: $cf_cv_type_fd_set" >&5
11087echo "${ECHO_T}$cf_cv_type_fd_set" >&6
11088if test $cf_cv_type_fd_set = sys/select.h ; then
11089	cat >>confdefs.h <<\EOF
11090#define USE_SYS_SELECT_H 1
11091EOF
11092
11093fi
11094
11095echo "$as_me:11095: checking for declaration of fd_mask" >&5
11096echo $ECHO_N "checking for declaration of fd_mask... $ECHO_C" >&6
11097if test "${cf_cv_type_fd_mask+set}" = set; then
11098  echo $ECHO_N "(cached) $ECHO_C" >&6
11099else
11100
11101    if test x$cf_cv_type_fd_set = xX11/Xpoll.h ; then
11102        cat >conftest.$ac_ext <<_ACEOF
11103#line 11103 "configure"
11104#include "confdefs.h"
11105
11106#include <X11/Xpoll.h>
11107int
11108main ()
11109{
11110fd_mask x
11111  ;
11112  return 0;
11113}
11114_ACEOF
11115rm -f conftest.$ac_objext
11116if { (eval echo "$as_me:11116: \"$ac_compile\"") >&5
11117  (eval $ac_compile) 2>&5
11118  ac_status=$?
11119  echo "$as_me:11119: \$? = $ac_status" >&5
11120  (exit $ac_status); } &&
11121         { ac_try='test -s conftest.$ac_objext'
11122  { (eval echo "$as_me:11122: \"$ac_try\"") >&5
11123  (eval $ac_try) 2>&5
11124  ac_status=$?
11125  echo "$as_me:11125: \$? = $ac_status" >&5
11126  (exit $ac_status); }; }; then
11127  :
11128else
11129  echo "$as_me: failed program was:" >&5
11130cat conftest.$ac_ext >&5
11131
11132echo "${as_me:-configure}:11132: testing if we must define CSRG_BASED ..." 1>&5
11133
11134# Xosdefs.h on Mac OS X may not define this (but it should).
11135            cat >conftest.$ac_ext <<_ACEOF
11136#line 11136 "configure"
11137#include "confdefs.h"
11138
11139#define CSRG_BASED
11140#include <X11/Xpoll.h>
11141int
11142main ()
11143{
11144fd_mask x
11145  ;
11146  return 0;
11147}
11148_ACEOF
11149rm -f conftest.$ac_objext
11150if { (eval echo "$as_me:11150: \"$ac_compile\"") >&5
11151  (eval $ac_compile) 2>&5
11152  ac_status=$?
11153  echo "$as_me:11153: \$? = $ac_status" >&5
11154  (exit $ac_status); } &&
11155         { ac_try='test -s conftest.$ac_objext'
11156  { (eval echo "$as_me:11156: \"$ac_try\"") >&5
11157  (eval $ac_try) 2>&5
11158  ac_status=$?
11159  echo "$as_me:11159: \$? = $ac_status" >&5
11160  (exit $ac_status); }; }; then
11161  cf_cv_type_fd_mask=CSRG_BASED
11162else
11163  echo "$as_me: failed program was:" >&5
11164cat conftest.$ac_ext >&5
11165fi
11166rm -f conftest.$ac_objext conftest.$ac_ext
11167fi
11168rm -f conftest.$ac_objext conftest.$ac_ext
11169    else
11170        cf_cv_type_fd_mask=$cf_cv_type_fd_set
11171    fi
11172
11173fi
11174echo "$as_me:11174: result: $cf_cv_type_fd_mask" >&5
11175echo "${ECHO_T}$cf_cv_type_fd_mask" >&6
11176if test x$cf_cv_type_fd_mask = xCSRG_BASED ; then
11177    cat >>confdefs.h <<\EOF
11178#define CSRG_BASED 1
11179EOF
11180
11181fi
11182
11183echo "$as_me:11183: checking for IRIX 6.5 baud-rate redefinitions" >&5
11184echo $ECHO_N "checking for IRIX 6.5 baud-rate redefinitions... $ECHO_C" >&6
11185if test "${cf_cv_termio_c_ispeed+set}" = set; then
11186  echo $ECHO_N "(cached) $ECHO_C" >&6
11187else
11188
11189cat >conftest.$ac_ext <<_ACEOF
11190#line 11190 "configure"
11191#include "confdefs.h"
11192
11193#include <sys/types.h>
11194#include <sys/termio.h>
11195int
11196main ()
11197{
11198
11199struct termio foo;
11200foo.c_ispeed = B38400;
11201foo.c_ospeed = B9600;
11202
11203  ;
11204  return 0;
11205}
11206_ACEOF
11207rm -f conftest.$ac_objext
11208if { (eval echo "$as_me:11208: \"$ac_compile\"") >&5
11209  (eval $ac_compile) 2>&5
11210  ac_status=$?
11211  echo "$as_me:11211: \$? = $ac_status" >&5
11212  (exit $ac_status); } &&
11213         { ac_try='test -s conftest.$ac_objext'
11214  { (eval echo "$as_me:11214: \"$ac_try\"") >&5
11215  (eval $ac_try) 2>&5
11216  ac_status=$?
11217  echo "$as_me:11217: \$? = $ac_status" >&5
11218  (exit $ac_status); }; }; then
11219  cf_cv_termio_c_ispeed=yes
11220
11221else
11222  echo "$as_me: failed program was:" >&5
11223cat conftest.$ac_ext >&5
11224cf_cv_termio_c_ispeed=no
11225fi
11226rm -f conftest.$ac_objext conftest.$ac_ext
11227
11228fi
11229echo "$as_me:11229: result: $cf_cv_termio_c_ispeed" >&5
11230echo "${ECHO_T}$cf_cv_termio_c_ispeed" >&6
11231test "$cf_cv_termio_c_ispeed" = yes && cat >>confdefs.h <<\EOF
11232#define HAVE_TERMIO_C_ISPEED 1
11233EOF
11234
11235LIBS="$LIBS $X_EXTRA_LIBS"
11236
11237# Check for openpty() in -lutil if the UNIX98-style pty functions are not
11238# available. E.g. for GNU libc 2.0.
11239case $host_os in #(vi
11240freebsd*|netbsd*|dragonfly*) # 2004/8/15 - revisit this if/when grantpt is known to work.
11241
11242echo "$as_me:11242: checking for openpty in -lutil" >&5
11243echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
11244if test "${ac_cv_lib_util_openpty+set}" = set; then
11245  echo $ECHO_N "(cached) $ECHO_C" >&6
11246else
11247  ac_check_lib_save_LIBS=$LIBS
11248LIBS="-lutil  $LIBS"
11249cat >conftest.$ac_ext <<_ACEOF
11250#line 11250 "configure"
11251#include "confdefs.h"
11252
11253/* Override any gcc2 internal prototype to avoid an error.  */
11254#ifdef __cplusplus
11255extern "C"
11256#endif
11257/* We use char because int might match the return type of a gcc2
11258   builtin and then its argument prototype would still apply.  */
11259char openpty ();
11260int
11261main ()
11262{
11263openpty ();
11264  ;
11265  return 0;
11266}
11267_ACEOF
11268rm -f conftest.$ac_objext conftest$ac_exeext
11269if { (eval echo "$as_me:11269: \"$ac_link\"") >&5
11270  (eval $ac_link) 2>&5
11271  ac_status=$?
11272  echo "$as_me:11272: \$? = $ac_status" >&5
11273  (exit $ac_status); } &&
11274         { ac_try='test -s conftest$ac_exeext'
11275  { (eval echo "$as_me:11275: \"$ac_try\"") >&5
11276  (eval $ac_try) 2>&5
11277  ac_status=$?
11278  echo "$as_me:11278: \$? = $ac_status" >&5
11279  (exit $ac_status); }; }; then
11280  ac_cv_lib_util_openpty=yes
11281else
11282  echo "$as_me: failed program was:" >&5
11283cat conftest.$ac_ext >&5
11284ac_cv_lib_util_openpty=no
11285fi
11286rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11287LIBS=$ac_check_lib_save_LIBS
11288fi
11289echo "$as_me:11289: result: $ac_cv_lib_util_openpty" >&5
11290echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
11291if test $ac_cv_lib_util_openpty = yes; then
11292  cat >>confdefs.h <<EOF
11293#define HAVE_LIBUTIL 1
11294EOF
11295
11296  LIBS="-lutil $LIBS"
11297
11298fi
11299
11300	;;
11301*)
11302
11303for ac_func in grantpt
11304do
11305as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11306echo "$as_me:11306: checking for $ac_func" >&5
11307echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11308if eval "test \"\${$as_ac_var+set}\" = set"; then
11309  echo $ECHO_N "(cached) $ECHO_C" >&6
11310else
11311  cat >conftest.$ac_ext <<_ACEOF
11312#line 11312 "configure"
11313#include "confdefs.h"
11314/* System header to define __stub macros and hopefully few prototypes,
11315    which can conflict with char $ac_func (); below.  */
11316#include <assert.h>
11317/* Override any gcc2 internal prototype to avoid an error.  */
11318#ifdef __cplusplus
11319extern "C"
11320#endif
11321/* We use char because int might match the return type of a gcc2
11322   builtin and then its argument prototype would still apply.  */
11323char $ac_func ();
11324char (*f) ();
11325
11326int
11327main ()
11328{
11329/* The GNU C library defines this for functions which it implements
11330    to always fail with ENOSYS.  Some functions are actually named
11331    something starting with __ and the normal name is an alias.  */
11332#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11333choke me
11334#else
11335f = $ac_func;
11336#endif
11337
11338  ;
11339  return 0;
11340}
11341_ACEOF
11342rm -f conftest.$ac_objext conftest$ac_exeext
11343if { (eval echo "$as_me:11343: \"$ac_link\"") >&5
11344  (eval $ac_link) 2>&5
11345  ac_status=$?
11346  echo "$as_me:11346: \$? = $ac_status" >&5
11347  (exit $ac_status); } &&
11348         { ac_try='test -s conftest$ac_exeext'
11349  { (eval echo "$as_me:11349: \"$ac_try\"") >&5
11350  (eval $ac_try) 2>&5
11351  ac_status=$?
11352  echo "$as_me:11352: \$? = $ac_status" >&5
11353  (exit $ac_status); }; }; then
11354  eval "$as_ac_var=yes"
11355else
11356  echo "$as_me: failed program was:" >&5
11357cat conftest.$ac_ext >&5
11358eval "$as_ac_var=no"
11359fi
11360rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11361fi
11362echo "$as_me:11362: result: `eval echo '${'$as_ac_var'}'`" >&5
11363echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11364if test `eval echo '${'$as_ac_var'}'` = yes; then
11365  cat >>confdefs.h <<EOF
11366#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11367EOF
11368
11369else
11370
11371echo "$as_me:11371: checking for openpty in -lutil" >&5
11372echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
11373if test "${ac_cv_lib_util_openpty+set}" = set; then
11374  echo $ECHO_N "(cached) $ECHO_C" >&6
11375else
11376  ac_check_lib_save_LIBS=$LIBS
11377LIBS="-lutil  $LIBS"
11378cat >conftest.$ac_ext <<_ACEOF
11379#line 11379 "configure"
11380#include "confdefs.h"
11381
11382/* Override any gcc2 internal prototype to avoid an error.  */
11383#ifdef __cplusplus
11384extern "C"
11385#endif
11386/* We use char because int might match the return type of a gcc2
11387   builtin and then its argument prototype would still apply.  */
11388char openpty ();
11389int
11390main ()
11391{
11392openpty ();
11393  ;
11394  return 0;
11395}
11396_ACEOF
11397rm -f conftest.$ac_objext conftest$ac_exeext
11398if { (eval echo "$as_me:11398: \"$ac_link\"") >&5
11399  (eval $ac_link) 2>&5
11400  ac_status=$?
11401  echo "$as_me:11401: \$? = $ac_status" >&5
11402  (exit $ac_status); } &&
11403         { ac_try='test -s conftest$ac_exeext'
11404  { (eval echo "$as_me:11404: \"$ac_try\"") >&5
11405  (eval $ac_try) 2>&5
11406  ac_status=$?
11407  echo "$as_me:11407: \$? = $ac_status" >&5
11408  (exit $ac_status); }; }; then
11409  ac_cv_lib_util_openpty=yes
11410else
11411  echo "$as_me: failed program was:" >&5
11412cat conftest.$ac_ext >&5
11413ac_cv_lib_util_openpty=no
11414fi
11415rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11416LIBS=$ac_check_lib_save_LIBS
11417fi
11418echo "$as_me:11418: result: $ac_cv_lib_util_openpty" >&5
11419echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
11420if test $ac_cv_lib_util_openpty = yes; then
11421  cat >>confdefs.h <<EOF
11422#define HAVE_LIBUTIL 1
11423EOF
11424
11425  LIBS="-lutil $LIBS"
11426
11427fi
11428
11429fi
11430done
11431
11432	;;
11433esac
11434
11435for ac_func in XkbQueryExtension
11436do
11437as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11438echo "$as_me:11438: checking for $ac_func" >&5
11439echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11440if eval "test \"\${$as_ac_var+set}\" = set"; then
11441  echo $ECHO_N "(cached) $ECHO_C" >&6
11442else
11443  cat >conftest.$ac_ext <<_ACEOF
11444#line 11444 "configure"
11445#include "confdefs.h"
11446/* System header to define __stub macros and hopefully few prototypes,
11447    which can conflict with char $ac_func (); below.  */
11448#include <assert.h>
11449/* Override any gcc2 internal prototype to avoid an error.  */
11450#ifdef __cplusplus
11451extern "C"
11452#endif
11453/* We use char because int might match the return type of a gcc2
11454   builtin and then its argument prototype would still apply.  */
11455char $ac_func ();
11456char (*f) ();
11457
11458int
11459main ()
11460{
11461/* The GNU C library defines this for functions which it implements
11462    to always fail with ENOSYS.  Some functions are actually named
11463    something starting with __ and the normal name is an alias.  */
11464#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11465choke me
11466#else
11467f = $ac_func;
11468#endif
11469
11470  ;
11471  return 0;
11472}
11473_ACEOF
11474rm -f conftest.$ac_objext conftest$ac_exeext
11475if { (eval echo "$as_me:11475: \"$ac_link\"") >&5
11476  (eval $ac_link) 2>&5
11477  ac_status=$?
11478  echo "$as_me:11478: \$? = $ac_status" >&5
11479  (exit $ac_status); } &&
11480         { ac_try='test -s conftest$ac_exeext'
11481  { (eval echo "$as_me:11481: \"$ac_try\"") >&5
11482  (eval $ac_try) 2>&5
11483  ac_status=$?
11484  echo "$as_me:11484: \$? = $ac_status" >&5
11485  (exit $ac_status); }; }; then
11486  eval "$as_ac_var=yes"
11487else
11488  echo "$as_me: failed program was:" >&5
11489cat conftest.$ac_ext >&5
11490eval "$as_ac_var=no"
11491fi
11492rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11493fi
11494echo "$as_me:11494: result: `eval echo '${'$as_ac_var'}'`" >&5
11495echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11496if test `eval echo '${'$as_ac_var'}'` = yes; then
11497  cat >>confdefs.h <<EOF
11498#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11499EOF
11500
11501fi
11502done
11503
11504echo "$as_me:11504: checking for XKB Bell extension" >&5
11505echo $ECHO_N "checking for XKB Bell extension... $ECHO_C" >&6
11506if test "${cf_cv_xkb_bell_ext+set}" = set; then
11507  echo $ECHO_N "(cached) $ECHO_C" >&6
11508else
11509
11510cat >conftest.$ac_ext <<_ACEOF
11511#line 11511 "configure"
11512#include "confdefs.h"
11513
11514#include <X11/Intrinsic.h>
11515#include <X11/XKBlib.h>		/* has the prototype */
11516#include <X11/extensions/XKBbells.h>	/* has the XkbBI_xxx definitions */
11517
11518int
11519main ()
11520{
11521
11522	int x = (XkbBI_Info |XkbBI_MinorError |XkbBI_MajorError |XkbBI_TerminalBell |XkbBI_MarginBell);
11523	Atom y;
11524	XkbBell((Display *)0, (Widget)0, 0, y);
11525
11526  ;
11527  return 0;
11528}
11529_ACEOF
11530rm -f conftest.$ac_objext conftest$ac_exeext
11531if { (eval echo "$as_me:11531: \"$ac_link\"") >&5
11532  (eval $ac_link) 2>&5
11533  ac_status=$?
11534  echo "$as_me:11534: \$? = $ac_status" >&5
11535  (exit $ac_status); } &&
11536         { ac_try='test -s conftest$ac_exeext'
11537  { (eval echo "$as_me:11537: \"$ac_try\"") >&5
11538  (eval $ac_try) 2>&5
11539  ac_status=$?
11540  echo "$as_me:11540: \$? = $ac_status" >&5
11541  (exit $ac_status); }; }; then
11542  cf_cv_xkb_bell_ext=yes
11543else
11544  echo "$as_me: failed program was:" >&5
11545cat conftest.$ac_ext >&5
11546cf_cv_xkb_bell_ext=no
11547fi
11548rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11549
11550fi
11551echo "$as_me:11551: result: $cf_cv_xkb_bell_ext" >&5
11552echo "${ECHO_T}$cf_cv_xkb_bell_ext" >&6
11553test "$cf_cv_xkb_bell_ext" = yes && cat >>confdefs.h <<\EOF
11554#define HAVE_XKB_BELL_EXT 1
11555EOF
11556
11557for ac_func in Xutf8LookupString
11558do
11559as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11560echo "$as_me:11560: checking for $ac_func" >&5
11561echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11562if eval "test \"\${$as_ac_var+set}\" = set"; then
11563  echo $ECHO_N "(cached) $ECHO_C" >&6
11564else
11565  cat >conftest.$ac_ext <<_ACEOF
11566#line 11566 "configure"
11567#include "confdefs.h"
11568/* System header to define __stub macros and hopefully few prototypes,
11569    which can conflict with char $ac_func (); below.  */
11570#include <assert.h>
11571/* Override any gcc2 internal prototype to avoid an error.  */
11572#ifdef __cplusplus
11573extern "C"
11574#endif
11575/* We use char because int might match the return type of a gcc2
11576   builtin and then its argument prototype would still apply.  */
11577char $ac_func ();
11578char (*f) ();
11579
11580int
11581main ()
11582{
11583/* The GNU C library defines this for functions which it implements
11584    to always fail with ENOSYS.  Some functions are actually named
11585    something starting with __ and the normal name is an alias.  */
11586#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11587choke me
11588#else
11589f = $ac_func;
11590#endif
11591
11592  ;
11593  return 0;
11594}
11595_ACEOF
11596rm -f conftest.$ac_objext conftest$ac_exeext
11597if { (eval echo "$as_me:11597: \"$ac_link\"") >&5
11598  (eval $ac_link) 2>&5
11599  ac_status=$?
11600  echo "$as_me:11600: \$? = $ac_status" >&5
11601  (exit $ac_status); } &&
11602         { ac_try='test -s conftest$ac_exeext'
11603  { (eval echo "$as_me:11603: \"$ac_try\"") >&5
11604  (eval $ac_try) 2>&5
11605  ac_status=$?
11606  echo "$as_me:11606: \$? = $ac_status" >&5
11607  (exit $ac_status); }; }; then
11608  eval "$as_ac_var=yes"
11609else
11610  echo "$as_me: failed program was:" >&5
11611cat conftest.$ac_ext >&5
11612eval "$as_ac_var=no"
11613fi
11614rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11615fi
11616echo "$as_me:11616: result: `eval echo '${'$as_ac_var'}'`" >&5
11617echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11618if test `eval echo '${'$as_ac_var'}'` = yes; then
11619  cat >>confdefs.h <<EOF
11620#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11621EOF
11622
11623else
11624
11625	EXTRAHDRS="$EXTRAHDRS xutf8.h"
11626	EXTRASRCS="$EXTRASRCS xutf8.c"
11627	EXTRAOBJS="$EXTRAOBJS xutf8.o"
11628
11629fi
11630done
11631
11632echo "$as_me:11632: checking if you want narrow prototypes for X libraries" >&5
11633echo $ECHO_N "checking if you want narrow prototypes for X libraries... $ECHO_C" >&6
11634
11635case `$ac_config_guess` in #(vi
11636*cygwin*|*freebsd*|*gnu*|*irix5*|*irix6*|*linux-gnu*|*netbsd*|*openbsd*|*qnx*|*sco*|*sgi*) #(vi
11637	cf_default_narrowproto=yes
11638	;;
11639*)
11640	cf_default_narrowproto=no
11641	;;
11642esac
11643
11644# Check whether --enable-narrowproto or --disable-narrowproto was given.
11645if test "${enable_narrowproto+set}" = set; then
11646  enableval="$enable_narrowproto"
11647  test "$enableval" != no && enableval=yes
11648  if test "$enableval" != "$cf_default_narrowproto" ; then
11649    enable_narrowproto=$enableval
11650  else
11651    enable_narrowproto=$cf_default_narrowproto
11652  fi
11653else
11654  enableval=$cf_default_narrowproto
11655  enable_narrowproto=$cf_default_narrowproto
11656
11657fi;
11658echo "$as_me:11658: result: $enable_narrowproto" >&5
11659echo "${ECHO_T}$enable_narrowproto" >&6
11660
11661echo "$as_me:11661: checking if we should use imake to help" >&5
11662echo $ECHO_N "checking if we should use imake to help... $ECHO_C" >&6
11663
11664# Check whether --enable-imake or --disable-imake was given.
11665if test "${enable_imake+set}" = set; then
11666  enableval="$enable_imake"
11667  test "$enableval" != no && enableval=yes
11668  if test "$enableval" != "yes" ; then
11669    enable_imake=no
11670  else
11671    enable_imake=yes
11672  fi
11673else
11674  enableval=yes
11675  enable_imake=yes
11676
11677fi;
11678echo "$as_me:11678: result: $enable_imake" >&5
11679echo "${ECHO_T}$enable_imake" >&6
11680
11681if test "$enable_imake" = yes ; then
11682
11683for ac_prog in xmkmf imake
11684do
11685  # Extract the first word of "$ac_prog", so it can be a program name with args.
11686set dummy $ac_prog; ac_word=$2
11687echo "$as_me:11687: checking for $ac_word" >&5
11688echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
11689if test "${ac_cv_path_IMAKE+set}" = set; then
11690  echo $ECHO_N "(cached) $ECHO_C" >&6
11691else
11692  case $IMAKE in
11693  [\\/]* | ?:[\\/]*)
11694  ac_cv_path_IMAKE="$IMAKE" # Let the user override the test with a path.
11695  ;;
11696  *)
11697  ac_save_IFS=$IFS; IFS=$ac_path_separator
11698ac_dummy="$PATH"
11699for ac_dir in $ac_dummy; do
11700  IFS=$ac_save_IFS
11701  test -z "$ac_dir" && ac_dir=.
11702  if $as_executable_p "$ac_dir/$ac_word"; then
11703   ac_cv_path_IMAKE="$ac_dir/$ac_word"
11704   echo "$as_me:11704: found $ac_dir/$ac_word" >&5
11705   break
11706fi
11707done
11708
11709  ;;
11710esac
11711fi
11712IMAKE=$ac_cv_path_IMAKE
11713
11714if test -n "$IMAKE"; then
11715  echo "$as_me:11715: result: $IMAKE" >&5
11716echo "${ECHO_T}$IMAKE" >&6
11717else
11718  echo "$as_me:11718: result: no" >&5
11719echo "${ECHO_T}no" >&6
11720fi
11721
11722  test -n "$IMAKE" && break
11723done
11724
11725if test -n "$IMAKE" ; then
11726
11727case $IMAKE in # (vi
11728*/imake)
11729	cf_imake_opts="-DUseInstalled=YES" # (vi
11730	;;
11731*/util/xmkmf)
11732	# A single parameter tells xmkmf where the config-files are:
11733	cf_imake_opts="`echo $IMAKE|sed -e s,/config/util/xmkmf,,`" # (vi
11734	;;
11735*)
11736	cf_imake_opts=
11737	;;
11738esac
11739
11740# If it's installed properly, imake (or its wrapper, xmkmf) will point to the
11741# config directory.
11742if mkdir conftestdir; then
11743	CDPATH=; export CDPATH
11744	cf_makefile=`cd $srcdir;pwd`/Imakefile
11745	cd conftestdir
11746
11747	cat >fix_cflags.sed <<'CF_EOF'
11748s/\\//g
11749s/[ 	][ 	]*/ /g
11750s/"//g
11751:pack
11752s/\(=[^ ][^ ]*\) \([^-]\)/\1	\2/g
11753t pack
11754s/\(-D[a-zA-Z0-9_][a-zA-Z0-9_]*\)=\([^\'0-9 ][^ ]*\)/\1='\\"\2\\"'/g
11755s/^IMAKE[ ]/IMAKE_CFLAGS="/
11756s/	/ /g
11757s/$/"/
11758CF_EOF
11759
11760	cat >fix_lflags.sed <<'CF_EOF'
11761s/^IMAKE[ 	]*/IMAKE_LOADFLAGS="/
11762s/$/"/
11763CF_EOF
11764
11765	echo >./Imakefile
11766	test -f $cf_makefile && cat $cf_makefile >>./Imakefile
11767
11768	cat >> ./Imakefile <<'CF_EOF'
11769findstddefs:
11770	@echo IMAKE ${ALLDEFINES} $(MAIN_DEFINES) $(VENDORMANDEFS)       | sed -f fix_cflags.sed
11771	@echo IMAKE ${EXTRA_LOAD_FLAGS} | sed -f fix_lflags.sed
11772CF_EOF
11773
11774	if ( $IMAKE $cf_imake_opts 1>/dev/null 2>&5 && test -f Makefile)
11775	then
11776		test -n "$verbose" && echo "	Using $IMAKE $cf_imake_opts" 1>&6
11777
11778echo "${as_me:-configure}:11778: testing Using $IMAKE $cf_imake_opts ..." 1>&5
11779
11780	else
11781		# sometimes imake doesn't have the config path compiled in.  Find it.
11782		cf_config=
11783		for cf_libpath in $X_LIBS $LIBS ; do
11784			case $cf_libpath in # (vi
11785			-L*)
11786				cf_libpath=`echo .$cf_libpath | sed -e 's/^...//'`
11787				cf_libpath=$cf_libpath/X11/config
11788				if test -d $cf_libpath ; then
11789					cf_config=$cf_libpath
11790					break
11791				fi
11792				;;
11793			esac
11794		done
11795		if test -z "$cf_config" ; then
11796			{ echo "$as_me:11796: WARNING: Could not find imake config-directory" >&5
11797echo "$as_me: WARNING: Could not find imake config-directory" >&2;}
11798		else
11799			cf_imake_opts="$cf_imake_opts -I$cf_config"
11800			if ( $IMAKE -v $cf_imake_opts 2>&5)
11801			then
11802				test -n "$verbose" && echo "	Using $IMAKE $cf_config" 1>&6
11803
11804echo "${as_me:-configure}:11804: testing Using $IMAKE $cf_config ..." 1>&5
11805
11806			else
11807				{ echo "$as_me:11807: WARNING: Cannot run $IMAKE" >&5
11808echo "$as_me: WARNING: Cannot run $IMAKE" >&2;}
11809			fi
11810		fi
11811	fi
11812
11813	# GNU make sometimes prints "make[1]: Entering...", which
11814	# would confuse us.
11815	eval `make findstddefs 2>/dev/null | grep -v make`
11816
11817	cd ..
11818	rm -rf conftestdir
11819
11820	# We use ${ALLDEFINES} rather than ${STD_DEFINES} because the former
11821	# declares XTFUNCPROTO there.  However, some vendors (e.g., SGI) have
11822	# modified it to support site.cf, adding a kludge for the /usr/include
11823	# directory.  Try to filter that out, otherwise gcc won't find its
11824	# headers.
11825	if test -n "$GCC" ; then
11826	    if test -n "$IMAKE_CFLAGS" ; then
11827		cf_nostdinc=""
11828		cf_std_incl=""
11829		cf_cpp_opts=""
11830		for cf_opt in $IMAKE_CFLAGS
11831		do
11832		    case "$cf_opt" in
11833		    -nostdinc) #(vi
11834			cf_nostdinc="$cf_opt"
11835			;;
11836		    -I/usr/include) #(vi
11837			cf_std_incl="$cf_opt"
11838			;;
11839		    *) #(vi
11840			cf_cpp_opts="$cf_cpp_opts $cf_opt"
11841			;;
11842		    esac
11843		done
11844		if test -z "$cf_nostdinc" ; then
11845		    IMAKE_CFLAGS="$cf_cpp_opts $cf_std_incl"
11846		elif test -z "$cf_std_incl" ; then
11847		    IMAKE_CFLAGS="$cf_cpp_opts $cf_nostdinc"
11848		else
11849		    test -n "$verbose" && echo "	suppressed \"$cf_nostdinc\" and \"$cf_std_incl\"" 1>&6
11850
11851echo "${as_me:-configure}:11851: testing suppressed \"$cf_nostdinc\" and \"$cf_std_incl\" ..." 1>&5
11852
11853		    IMAKE_CFLAGS="$cf_cpp_opts"
11854		fi
11855	    fi
11856	fi
11857fi
11858
11859# Some imake configurations define PROJECTROOT with an empty value.  Remove
11860# the empty definition.
11861case $IMAKE_CFLAGS in
11862*-DPROJECTROOT=/*)
11863	;;
11864*)
11865	IMAKE_CFLAGS=`echo "$IMAKE_CFLAGS" |sed -e "s,-DPROJECTROOT=[ 	], ,"`
11866	;;
11867esac
11868
11869fi
11870
11871test -n "$verbose" && echo "	IMAKE_CFLAGS $IMAKE_CFLAGS" 1>&6
11872
11873echo "${as_me:-configure}:11873: testing IMAKE_CFLAGS $IMAKE_CFLAGS ..." 1>&5
11874
11875test -n "$verbose" && echo "	IMAKE_LOADFLAGS $IMAKE_LOADFLAGS" 1>&6
11876
11877echo "${as_me:-configure}:11877: testing IMAKE_LOADFLAGS $IMAKE_LOADFLAGS ..." 1>&5
11878
11879fi
11880
11881if test -n "$IMAKE" && test -n "$IMAKE_CFLAGS" ; then
11882
11883cf_fix_cppflags=no
11884cf_new_cflags=
11885cf_new_cppflags=
11886cf_new_extra_cppflags=
11887
11888for cf_add_cflags in $IMAKE_CFLAGS
11889do
11890case $cf_fix_cppflags in
11891no)
11892	case $cf_add_cflags in #(vi
11893	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11894		case $cf_add_cflags in
11895		-D*)
11896			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11897
11898			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11899				&& test -z "${cf_tst_cflags}" \
11900				&& cf_fix_cppflags=yes
11901
11902			if test $cf_fix_cppflags = yes ; then
11903				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11904				continue
11905			elif test "${cf_tst_cflags}" = "\"'" ; then
11906				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11907				continue
11908			fi
11909			;;
11910		esac
11911		case "$CPPFLAGS" in
11912		*$cf_add_cflags) #(vi
11913			;;
11914		*) #(vi
11915			case $cf_add_cflags in #(vi
11916			-D*)
11917				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11918
11919CPPFLAGS=`echo "$CPPFLAGS" | \
11920	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
11921		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
11922
11923				;;
11924			esac
11925			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11926			;;
11927		esac
11928		;;
11929	*)
11930		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11931		;;
11932	esac
11933	;;
11934yes)
11935	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11936
11937	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11938
11939	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11940		&& test -z "${cf_tst_cflags}" \
11941		&& cf_fix_cppflags=no
11942	;;
11943esac
11944done
11945
11946if test -n "$cf_new_cflags" ; then
11947
11948	CFLAGS="$CFLAGS $cf_new_cflags"
11949fi
11950
11951if test -n "$cf_new_cppflags" ; then
11952
11953	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11954fi
11955
11956if test -n "$cf_new_extra_cppflags" ; then
11957
11958	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11959fi
11960
11961else
11962	IMAKE_CFLAGS=
11963	IMAKE_LOADFLAGS=
11964	test -n "$verbose" && echo "	make fallback definitions" 1>&6
11965
11966echo "${as_me:-configure}:11966: testing make fallback definitions ..." 1>&5
11967
11968	# We prefer config.guess' values when we can get them, to avoid
11969	# inconsistent results with uname (AIX for instance).  However,
11970	# config.guess is not always consistent either.
11971	case $host_os in
11972	*[0-9].[0-9]*)
11973		UNAME_RELEASE="$host_os"
11974		;;
11975	*)
11976		UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
11977		;;
11978	esac
11979
11980	case .$UNAME_RELEASE in
11981	*[0-9].[0-9]*)
11982		OSMAJORVERSION=`echo "$UNAME_RELEASE" |sed -e 's/^[^0-9]*//' -e 's/\..*//'`
11983		OSMINORVERSION=`echo "$UNAME_RELEASE" |sed -e 's/^[^0-9]*//' -e 's/^[^.]*\.//' -e 's/\..*//' -e 's/[^0-9].*//' `
11984		test -z "$OSMAJORVERSION" && OSMAJORVERSION=1
11985		test -z "$OSMINORVERSION" && OSMINORVERSION=0
11986		IMAKE_CFLAGS="-DOSMAJORVERSION=$OSMAJORVERSION -DOSMINORVERSION=$OSMINORVERSION $IMAKE_CFLAGS"
11987		;;
11988	esac
11989
11990	# FUNCPROTO is standard with X11R6, but XFree86 drops it, leaving some
11991	# fallback/fragments for NeedPrototypes, etc.
11992	IMAKE_CFLAGS="-DFUNCPROTO=15 $IMAKE_CFLAGS"
11993
11994	# If this is not set properly, Xaw's scrollbars will not work
11995	if test "$enable_narrowproto" = yes ; then
11996		IMAKE_CFLAGS="-DNARROWPROTO=1 $IMAKE_CFLAGS"
11997	fi
11998
11999	# Other special definitions:
12000	case $host_os in
12001	aix*)
12002		# imake on AIX 5.1 defines AIXV3.  really.
12003		IMAKE_CFLAGS="-DAIXV3 -DAIXV4 $IMAKE_CFLAGS"
12004		;;
12005	irix[56].*) #(vi
12006		# these are needed to make SIGWINCH work in xterm
12007		IMAKE_CFLAGS="-DSYSV -DSVR4 $IMAKE_CFLAGS"
12008		;;
12009	esac
12010
12011cf_fix_cppflags=no
12012cf_new_cflags=
12013cf_new_cppflags=
12014cf_new_extra_cppflags=
12015
12016for cf_add_cflags in $IMAKE_CFLAGS
12017do
12018case $cf_fix_cppflags in
12019no)
12020	case $cf_add_cflags in #(vi
12021	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
12022		case $cf_add_cflags in
12023		-D*)
12024			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12025
12026			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12027				&& test -z "${cf_tst_cflags}" \
12028				&& cf_fix_cppflags=yes
12029
12030			if test $cf_fix_cppflags = yes ; then
12031				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12032				continue
12033			elif test "${cf_tst_cflags}" = "\"'" ; then
12034				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12035				continue
12036			fi
12037			;;
12038		esac
12039		case "$CPPFLAGS" in
12040		*$cf_add_cflags) #(vi
12041			;;
12042		*) #(vi
12043			case $cf_add_cflags in #(vi
12044			-D*)
12045				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12046
12047CPPFLAGS=`echo "$CPPFLAGS" | \
12048	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
12049		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
12050
12051				;;
12052			esac
12053			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12054			;;
12055		esac
12056		;;
12057	*)
12058		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12059		;;
12060	esac
12061	;;
12062yes)
12063	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12064
12065	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12066
12067	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12068		&& test -z "${cf_tst_cflags}" \
12069		&& cf_fix_cppflags=no
12070	;;
12071esac
12072done
12073
12074if test -n "$cf_new_cflags" ; then
12075
12076	CFLAGS="$CFLAGS $cf_new_cflags"
12077fi
12078
12079if test -n "$cf_new_cppflags" ; then
12080
12081	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
12082fi
12083
12084if test -n "$cf_new_extra_cppflags" ; then
12085
12086	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12087fi
12088
12089fi
12090
12091echo "$as_me:12091: checking for default terminal-id" >&5
12092echo $ECHO_N "checking for default terminal-id... $ECHO_C" >&6
12093
12094# Check whether --with-terminal-id or --without-terminal-id was given.
12095if test "${with_terminal_id+set}" = set; then
12096  withval="$with_terminal_id"
12097  default_termid=$withval
12098else
12099  default_termid=vt100
12100fi;
12101echo "$as_me:12101: result: $default_termid" >&5
12102echo "${ECHO_T}$default_termid" >&6
12103case $default_termid in
12104vt*)	default_termid=`echo $default_termid | sed -e 's/^..//'`
12105	;;
12106esac
12107cat >>confdefs.h <<EOF
12108#define DFT_DECID "$default_termid"
12109EOF
12110
12111echo "$as_me:12111: checking for default terminal-type" >&5
12112echo $ECHO_N "checking for default terminal-type... $ECHO_C" >&6
12113
12114# Check whether --with-terminal-type or --without-terminal-type was given.
12115if test "${with_terminal_type+set}" = set; then
12116  withval="$with_terminal_type"
12117  default_TERM=$withval
12118else
12119  default_TERM=xterm
12120fi;
12121echo "$as_me:12121: result: $default_TERM" >&5
12122echo "${ECHO_T}$default_TERM" >&6
12123cat >>confdefs.h <<EOF
12124#define DFT_TERMTYPE "$default_TERM"
12125EOF
12126
12127# Extract the first word of "tic", so it can be a program name with args.
12128set dummy tic; ac_word=$2
12129echo "$as_me:12129: checking for $ac_word" >&5
12130echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
12131if test "${ac_cv_prog_cf_tic_prog+set}" = set; then
12132  echo $ECHO_N "(cached) $ECHO_C" >&6
12133else
12134  if test -n "$cf_tic_prog"; then
12135  ac_cv_prog_cf_tic_prog="$cf_tic_prog" # Let the user override the test.
12136else
12137  ac_save_IFS=$IFS; IFS=$ac_path_separator
12138ac_dummy="$PATH"
12139for ac_dir in $ac_dummy; do
12140  IFS=$ac_save_IFS
12141  test -z "$ac_dir" && ac_dir=.
12142  $as_executable_p "$ac_dir/$ac_word" || continue
12143ac_cv_prog_cf_tic_prog="yes"
12144echo "$as_me:12144: found $ac_dir/$ac_word" >&5
12145break
12146done
12147
12148  test -z "$ac_cv_prog_cf_tic_prog" && ac_cv_prog_cf_tic_prog="no"
12149fi
12150fi
12151cf_tic_prog=$ac_cv_prog_cf_tic_prog
12152if test -n "$cf_tic_prog"; then
12153  echo "$as_me:12153: result: $cf_tic_prog" >&5
12154echo "${ECHO_T}$cf_tic_prog" >&6
12155else
12156  echo "$as_me:12156: result: no" >&5
12157echo "${ECHO_T}no" >&6
12158fi
12159
12160if test "$cf_tic_prog" = yes ; then
12161	echo "$as_me:12161: checking for private terminfo-directory" >&5
12162echo $ECHO_N "checking for private terminfo-directory... $ECHO_C" >&6
12163
12164# Check whether --with-own-terminfo or --without-own-terminfo was given.
12165if test "${with_own_terminfo+set}" = set; then
12166  withval="$with_own_terminfo"
12167  TERMINFO_DIR=$withval
12168else
12169  TERMINFO_DIR=${TERMINFO-none}
12170fi;
12171	echo "$as_me:12171: result: $TERMINFO_DIR" >&5
12172echo "${ECHO_T}$TERMINFO_DIR" >&6
12173	if test "$TERMINFO_DIR" = yes ; then
12174		{ echo "$as_me:12174: WARNING: no value given" >&5
12175echo "$as_me: WARNING: no value given" >&2;}
12176	elif test "$TERMINFO_DIR" != none ; then
12177		if test -d $TERMINFO_DIR ; then
12178			cat >>confdefs.h <<EOF
12179#define OWN_TERMINFO_DIR "$TERMINFO_DIR"
12180EOF
12181
12182		else
12183			{ echo "$as_me:12183: WARNING: not a directory" >&5
12184echo "$as_me: WARNING: not a directory" >&2;}
12185		fi
12186	elif test "$prefix" != NONE ; then
12187		TERMINFO_DIR='${prefix}/lib/terminfo'
12188	elif test -d /usr/lib/terminfo ; then
12189		TERMINFO_DIR=/usr/lib/terminfo
12190	else
12191		TERMINFO_DIR=
12192	fi
12193	SET_TERMINFO=
12194	if test -n "$TERMINFO_DIR" ; then
12195		TERMINFO_DIR='$(DESTDIR)'$TERMINFO_DIR
12196		SET_TERMINFO='TERMINFO=$(TERMINFO_DIR)'
12197	fi
12198	no_ticprog=
12199else
12200	no_ticprog="#"
12201	TERMINFO_DIR=
12202	SET_TERMINFO=
12203fi
12204
12205###############################################################################
12206
12207echo "$as_me:12207: checking if you want active-icons" >&5
12208echo $ECHO_N "checking if you want active-icons... $ECHO_C" >&6
12209
12210# Check whether --enable-active-icon or --disable-active-icon was given.
12211if test "${enable_active_icon+set}" = set; then
12212  enableval="$enable_active_icon"
12213  test "$enableval" != no && enableval=yes
12214  if test "$enableval" != "yes" ; then
12215    enable_active_icon=no
12216  else
12217    enable_active_icon=yes
12218  fi
12219else
12220  enableval=yes
12221  enable_active_icon=yes
12222
12223fi;
12224echo "$as_me:12224: result: $enable_active_icon" >&5
12225echo "${ECHO_T}$enable_active_icon" >&6
12226if test "$enable_active_icon" = no ; then
12227	cat >>confdefs.h <<\EOF
12228#define NO_ACTIVE_ICON 1
12229EOF
12230
12231fi
12232
12233echo "$as_me:12233: checking if you want ANSI color" >&5
12234echo $ECHO_N "checking if you want ANSI color... $ECHO_C" >&6
12235
12236# Check whether --enable-ansi-color or --disable-ansi-color was given.
12237if test "${enable_ansi_color+set}" = set; then
12238  enableval="$enable_ansi_color"
12239  test "$enableval" != no && enableval=yes
12240  if test "$enableval" != "yes" ; then
12241    enable_ansi_color=no
12242  else
12243    enable_ansi_color=yes
12244  fi
12245else
12246  enableval=yes
12247  enable_ansi_color=yes
12248
12249fi;
12250echo "$as_me:12250: result: $enable_ansi_color" >&5
12251echo "${ECHO_T}$enable_ansi_color" >&6
12252test "$enable_ansi_color" = no && cat >>confdefs.h <<\EOF
12253#define OPT_ISO_COLORS 0
12254EOF
12255
12256if test "$enable_ansi_color" = yes ; then
12257
12258	echo "$as_me:12258: checking if you want 16 colors like aixterm" >&5
12259echo $ECHO_N "checking if you want 16 colors like aixterm... $ECHO_C" >&6
12260
12261# Check whether --enable-16-color or --disable-16-color was given.
12262if test "${enable_16_color+set}" = set; then
12263  enableval="$enable_16_color"
12264  test "$enableval" != no && enableval=yes
12265  if test "$enableval" != "yes" ; then
12266    enable_16_color=no
12267  else
12268    enable_16_color=yes
12269  fi
12270else
12271  enableval=yes
12272  enable_16_color=yes
12273
12274fi;
12275	echo "$as_me:12275: result: $enable_16_color" >&5
12276echo "${ECHO_T}$enable_16_color" >&6
12277	test "$enable_16_color" = no && cat >>confdefs.h <<\EOF
12278#define OPT_AIX_COLORS 0
12279EOF
12280
12281	echo "$as_me:12281: checking if you want 256 colors" >&5
12282echo $ECHO_N "checking if you want 256 colors... $ECHO_C" >&6
12283
12284# Check whether --enable-256-color or --disable-256-color was given.
12285if test "${enable_256_color+set}" = set; then
12286  enableval="$enable_256_color"
12287  test "$enableval" != yes && enableval=no
12288  if test "$enableval" != "no" ; then
12289    enable_256_color=yes
12290  else
12291    enable_256_color=no
12292  fi
12293else
12294  enableval=no
12295  enable_256_color=no
12296
12297fi;
12298	echo "$as_me:12298: result: $enable_256_color" >&5
12299echo "${ECHO_T}$enable_256_color" >&6
12300	if test "$enable_256_color" = yes ; then
12301		CHARPROC_DEPS="$CHARPROC_DEPS 256colres.h"
12302		EXTRAHDRS="$EXTRAHDRS 256colres.h"
12303		cat >>confdefs.h <<\EOF
12304#define OPT_256_COLORS 1
12305EOF
12306
12307	else
12308	echo "$as_me:12308: checking if you want 88 colors" >&5
12309echo $ECHO_N "checking if you want 88 colors... $ECHO_C" >&6
12310
12311# Check whether --enable-88-color or --disable-88-color was given.
12312if test "${enable_88_color+set}" = set; then
12313  enableval="$enable_88_color"
12314  test "$enableval" != yes && enableval=no
12315  if test "$enableval" != "no" ; then
12316    enable_88_color=yes
12317  else
12318    enable_88_color=no
12319  fi
12320else
12321  enableval=no
12322  enable_88_color=no
12323
12324fi;
12325	echo "$as_me:12325: result: $enable_88_color" >&5
12326echo "${ECHO_T}$enable_88_color" >&6
12327	if test "$enable_88_color" = yes ; then
12328		CHARPROC_DEPS="$CHARPROC_DEPS 88colres.h"
12329		EXTRAHDRS="$EXTRAHDRS 88colres.h"
12330		cat >>confdefs.h <<\EOF
12331#define OPT_88_COLORS 1
12332EOF
12333
12334	fi
12335	fi
12336
12337fi
12338
12339echo "$as_me:12339: checking if you want blinking cursor" >&5
12340echo $ECHO_N "checking if you want blinking cursor... $ECHO_C" >&6
12341
12342# Check whether --enable-blink-cursor or --disable-blink-cursor was given.
12343if test "${enable_blink_cursor+set}" = set; then
12344  enableval="$enable_blink_cursor"
12345  test "$enableval" != no && enableval=yes
12346  if test "$enableval" != "yes" ; then
12347    enable_blink_curs=no
12348  else
12349    enable_blink_curs=yes
12350  fi
12351else
12352  enableval=yes
12353  enable_blink_curs=yes
12354
12355fi;
12356echo "$as_me:12356: result: $enable_blink_curs" >&5
12357echo "${ECHO_T}$enable_blink_curs" >&6
12358test "$enable_blink_curs" = no && cat >>confdefs.h <<\EOF
12359#define OPT_BLINK_CURS 0
12360EOF
12361
12362echo "$as_me:12362: checking if you want to ignore Linux's broken palette-strings" >&5
12363echo $ECHO_N "checking if you want to ignore Linux's broken palette-strings... $ECHO_C" >&6
12364
12365case $host_os in #(vi
12366linux*)
12367	assume_broken_osc=yes ;; #(vi
12368*)
12369	assume_broken_osc=no ;;
12370esac
12371
12372# Check whether --enable-broken-osc or --disable-broken-osc was given.
12373if test "${enable_broken_osc+set}" = set; then
12374  enableval="$enable_broken_osc"
12375  test "$enableval" != no && enableval=yes
12376  if test "$enableval" != "$assume_broken_osc" ; then
12377    enable_broken_osc=$enableval
12378  else
12379    enable_broken_osc=$enableval
12380  fi
12381else
12382  enableval=$assume_broken_osc
12383  enable_broken_osc=$enableval
12384
12385fi;
12386echo "$as_me:12386: result: $enable_broken_osc" >&5
12387echo "${ECHO_T}$enable_broken_osc" >&6
12388if test "$enable_broken_osc" = yes ; then
12389	cat >>confdefs.h <<\EOF
12390#define OPT_BROKEN_OSC 1
12391EOF
12392
12393else
12394	cat >>confdefs.h <<\EOF
12395#define OPT_BROKEN_OSC 0
12396EOF
12397
12398fi
12399
12400echo "$as_me:12400: checking if you want to allow broken string-terminators" >&5
12401echo $ECHO_N "checking if you want to allow broken string-terminators... $ECHO_C" >&6
12402
12403# Check whether --enable-broken-st or --disable-broken-st was given.
12404if test "${enable_broken_st+set}" = set; then
12405  enableval="$enable_broken_st"
12406  test "$enableval" != yes && enableval=no
12407  if test "$enableval" != "no" ; then
12408    enable_broken_st=no
12409  else
12410    enable_broken_st=yes
12411  fi
12412else
12413  enableval=no
12414  enable_broken_st=yes
12415
12416fi;
12417echo "$as_me:12417: result: $enable_broken_st" >&5
12418echo "${ECHO_T}$enable_broken_st" >&6
12419test "$enable_broken_st" = no && cat >>confdefs.h <<\EOF
12420#define OPT_BROKEN_ST 0
12421EOF
12422
12423echo "$as_me:12423: checking if you want printable 128-159" >&5
12424echo $ECHO_N "checking if you want printable 128-159... $ECHO_C" >&6
12425
12426# Check whether --enable-c1-print or --disable-c1-print was given.
12427if test "${enable_c1_print+set}" = set; then
12428  enableval="$enable_c1_print"
12429  test "$enableval" != no && enableval=yes
12430  if test "$enableval" != "yes" ; then
12431    enable_c1_print=no
12432  else
12433    enable_c1_print=yes
12434  fi
12435else
12436  enableval=yes
12437  enable_c1_print=yes
12438
12439fi;
12440echo "$as_me:12440: result: $enable_c1_print" >&5
12441echo "${ECHO_T}$enable_c1_print" >&6
12442test "$enable_c1_print" = no && cat >>confdefs.h <<\EOF
12443#define OPT_C1_PRINT 0
12444EOF
12445
12446if test "$enable_ansi_color" = yes ; then
12447
12448	echo "$as_me:12448: checking if you want bold colors mapped like IBM PC" >&5
12449echo $ECHO_N "checking if you want bold colors mapped like IBM PC... $ECHO_C" >&6
12450
12451# Check whether --enable-bold-color or --disable-bold-color was given.
12452if test "${enable_bold_color+set}" = set; then
12453  enableval="$enable_bold_color"
12454  test "$enableval" != no && enableval=yes
12455  if test "$enableval" != "yes" ; then
12456    enable_pc_color=no
12457  else
12458    enable_pc_color=yes
12459  fi
12460else
12461  enableval=yes
12462  enable_pc_color=yes
12463
12464fi;
12465	echo "$as_me:12465: result: $enable_pc_color" >&5
12466echo "${ECHO_T}$enable_pc_color" >&6
12467	test "$enable_pc_color" = no && cat >>confdefs.h <<\EOF
12468#define OPT_PC_COLORS 0
12469EOF
12470
12471	echo "$as_me:12471: checking if you want separate color-classes" >&5
12472echo $ECHO_N "checking if you want separate color-classes... $ECHO_C" >&6
12473
12474# Check whether --enable-color-class or --disable-color-class was given.
12475if test "${enable_color_class+set}" = set; then
12476  enableval="$enable_color_class"
12477  test "$enableval" != no && enableval=yes
12478  if test "$enableval" != "yes" ; then
12479    enable_color_class=no
12480  else
12481    enable_color_class=yes
12482  fi
12483else
12484  enableval=yes
12485  enable_color_class=yes
12486
12487fi;
12488	echo "$as_me:12488: result: $enable_color_class" >&5
12489echo "${ECHO_T}$enable_color_class" >&6
12490	test "$enable_color_class" = no && cat >>confdefs.h <<\EOF
12491#define OPT_COLOR_CLASS FALSE
12492EOF
12493
12494	echo "$as_me:12494: checking if you want color-mode enabled by default" >&5
12495echo $ECHO_N "checking if you want color-mode enabled by default... $ECHO_C" >&6
12496
12497# Check whether --enable-color-mode or --disable-color-mode was given.
12498if test "${enable_color_mode+set}" = set; then
12499  enableval="$enable_color_mode"
12500  test "$enableval" != no && enableval=yes
12501  if test "$enableval" != "yes" ; then
12502    default_colormode=no
12503  else
12504    default_colormode=yes
12505  fi
12506else
12507  enableval=yes
12508  default_colormode=yes
12509
12510fi;
12511	echo "$as_me:12511: result: $default_colormode" >&5
12512echo "${ECHO_T}$default_colormode" >&6
12513	test "$default_colormode" = no && cat >>confdefs.h <<\EOF
12514#define DFT_COLORMODE FALSE
12515EOF
12516
12517fi
12518
12519echo "$as_me:12519: checking if you want support for color highlighting" >&5
12520echo $ECHO_N "checking if you want support for color highlighting... $ECHO_C" >&6
12521
12522# Check whether --enable-highlighting or --disable-highlighting was given.
12523if test "${enable_highlighting+set}" = set; then
12524  enableval="$enable_highlighting"
12525  test "$enableval" != no && enableval=yes
12526  if test "$enableval" != "yes" ; then
12527    default_highlight=no
12528  else
12529    default_highlight=yes
12530  fi
12531else
12532  enableval=yes
12533  default_highlight=yes
12534
12535fi;
12536echo "$as_me:12536: result: $default_highlight" >&5
12537echo "${ECHO_T}$default_highlight" >&6
12538test "$default_highlight" = no && cat >>confdefs.h <<\EOF
12539#define OPT_HIGHLIGHT_COLOR 0
12540EOF
12541
12542echo "$as_me:12542: checking if you want support for doublesize characters" >&5
12543echo $ECHO_N "checking if you want support for doublesize characters... $ECHO_C" >&6
12544
12545# Check whether --enable-doublechars or --disable-doublechars was given.
12546if test "${enable_doublechars+set}" = set; then
12547  enableval="$enable_doublechars"
12548  test "$enableval" != no && enableval=yes
12549  if test "$enableval" != "yes" ; then
12550    enable_doublechars=no
12551  else
12552    enable_doublechars=yes
12553  fi
12554else
12555  enableval=yes
12556  enable_doublechars=yes
12557
12558fi;
12559echo "$as_me:12559: result: $enable_doublechars" >&5
12560echo "${ECHO_T}$enable_doublechars" >&6
12561test "$enable_doublechars" = no && cat >>confdefs.h <<\EOF
12562#define OPT_DEC_CHRSET 0
12563EOF
12564
12565echo "$as_me:12565: checking if you want fallback-support for box characters" >&5
12566echo $ECHO_N "checking if you want fallback-support for box characters... $ECHO_C" >&6
12567
12568# Check whether --enable-boxchars or --disable-boxchars was given.
12569if test "${enable_boxchars+set}" = set; then
12570  enableval="$enable_boxchars"
12571  test "$enableval" != no && enableval=yes
12572  if test "$enableval" != "yes" ; then
12573    enable_boxchars=no
12574  else
12575    enable_boxchars=yes
12576  fi
12577else
12578  enableval=yes
12579  enable_boxchars=yes
12580
12581fi;
12582echo "$as_me:12582: result: $enable_boxchars" >&5
12583echo "${ECHO_T}$enable_boxchars" >&6
12584test "$enable_boxchars" = no && cat >>confdefs.h <<\EOF
12585#define OPT_BOX_CHARS 0
12586EOF
12587
12588echo "$as_me:12588: checking if you want to allow spawning new xterms" >&5
12589echo $ECHO_N "checking if you want to allow spawning new xterms... $ECHO_C" >&6
12590
12591# Check whether --enable-exec-xterm or --disable-exec-xterm was given.
12592if test "${enable_exec_xterm+set}" = set; then
12593  enableval="$enable_exec_xterm"
12594  test "$enableval" != yes && enableval=no
12595  if test "$enableval" != "no" ; then
12596    enable_exec_xterm=yes
12597  else
12598    enable_exec_xterm=no
12599  fi
12600else
12601  enableval=no
12602  enable_exec_xterm=no
12603
12604fi;
12605echo "$as_me:12605: result: $enable_exec_xterm" >&5
12606echo "${ECHO_T}$enable_exec_xterm" >&6
12607if test "$enable_exec_xterm" = yes ; then
12608
12609echo "$as_me:12609: checking for proc tree with cwd-support" >&5
12610echo $ECHO_N "checking for proc tree with cwd-support... $ECHO_C" >&6
12611if test "${cf_cv_procfs_cwd+set}" = set; then
12612  echo $ECHO_N "(cached) $ECHO_C" >&6
12613else
12614
12615cf_cv_procfs_cwd=no
12616for cf_path in /proc /compat/linux/proc /usr/compat/linux/proc
12617do
12618	if test -d $cf_path && \
12619	   test -d $cf_path/$$ && \
12620	   ( test -d $cf_path/$$/cwd || \
12621	     test -L $cf_path/$$/cwd ); then
12622		cf_cv_procfs_cwd=$cf_path
12623		break
12624	fi
12625done
12626
12627fi
12628echo "$as_me:12628: result: $cf_cv_procfs_cwd" >&5
12629echo "${ECHO_T}$cf_cv_procfs_cwd" >&6
12630
12631	if test "$cf_cv_procfs_cwd" = no ; then
12632		{ echo "$as_me:12632: WARNING: no suitable proc filesystem found" >&5
12633echo "$as_me: WARNING: no suitable proc filesystem found" >&2;}
12634	else
12635		cat >>confdefs.h <<EOF
12636#define PROCFS_ROOT "$cf_cv_procfs_cwd"
12637EOF
12638
12639		cat >>confdefs.h <<\EOF
12640#define OPT_EXEC_XTERM 1
12641EOF
12642
12643	fi
12644fi
12645
12646echo "$as_me:12646: checking if you want to use FreeType library" >&5
12647echo $ECHO_N "checking if you want to use FreeType library... $ECHO_C" >&6
12648
12649# Check whether --enable-freetype or --disable-freetype was given.
12650if test "${enable_freetype+set}" = set; then
12651  enableval="$enable_freetype"
12652  test "$enableval" != no && enableval=yes
12653  if test "$enableval" != "yes" ; then
12654    enable_freetype=no
12655  else
12656    enable_freetype=yes
12657  fi
12658else
12659  enableval=yes
12660  enable_freetype=yes
12661
12662fi;
12663echo "$as_me:12663: result: $enable_freetype" >&5
12664echo "${ECHO_T}$enable_freetype" >&6
12665if test "$enable_freetype" = yes ; then
12666
12667cf_extra_freetype_libs=
12668FREETYPE_CONFIG=none
12669FREETYPE_PARAMS=
12670
12671echo "$as_me:12671: checking if you specified -D/-I options for FreeType" >&5
12672echo $ECHO_N "checking if you specified -D/-I options for FreeType... $ECHO_C" >&6
12673
12674# Check whether --with-freetype-cflags or --without-freetype-cflags was given.
12675if test "${with_freetype_cflags+set}" = set; then
12676  withval="$with_freetype_cflags"
12677  cf_cv_x_freetype_incs="$with_freetype_cflags"
12678else
12679  cf_cv_x_freetype_incs=no
12680fi;
12681echo "$as_me:12681: result: $cf_cv_x_freetype_incs" >&5
12682echo "${ECHO_T}$cf_cv_x_freetype_incs" >&6
12683
12684echo "$as_me:12684: checking if you specified -L/-l options for FreeType" >&5
12685echo $ECHO_N "checking if you specified -L/-l options for FreeType... $ECHO_C" >&6
12686
12687# Check whether --with-freetype-libs or --without-freetype-libs was given.
12688if test "${with_freetype_libs+set}" = set; then
12689  withval="$with_freetype_libs"
12690  cf_cv_x_freetype_libs="$with_freetype_libs"
12691else
12692  cf_cv_x_freetype_libs=no
12693fi;
12694echo "$as_me:12694: result: $cf_cv_x_freetype_libs" >&5
12695echo "${ECHO_T}$cf_cv_x_freetype_libs" >&6
12696
12697if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xft; then
12698	FREETYPE_CONFIG=$PKG_CONFIG
12699	FREETYPE_PARAMS=xft
12700else
12701	# Extract the first word of "xft-config", so it can be a program name with args.
12702set dummy xft-config; ac_word=$2
12703echo "$as_me:12703: checking for $ac_word" >&5
12704echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
12705if test "${ac_cv_path_FREETYPE_XFT_CONFIG+set}" = set; then
12706  echo $ECHO_N "(cached) $ECHO_C" >&6
12707else
12708  case $FREETYPE_XFT_CONFIG in
12709  [\\/]* | ?:[\\/]*)
12710  ac_cv_path_FREETYPE_XFT_CONFIG="$FREETYPE_XFT_CONFIG" # Let the user override the test with a path.
12711  ;;
12712  *)
12713  ac_save_IFS=$IFS; IFS=$ac_path_separator
12714ac_dummy="$PATH"
12715for ac_dir in $ac_dummy; do
12716  IFS=$ac_save_IFS
12717  test -z "$ac_dir" && ac_dir=.
12718  if $as_executable_p "$ac_dir/$ac_word"; then
12719   ac_cv_path_FREETYPE_XFT_CONFIG="$ac_dir/$ac_word"
12720   echo "$as_me:12720: found $ac_dir/$ac_word" >&5
12721   break
12722fi
12723done
12724
12725  test -z "$ac_cv_path_FREETYPE_XFT_CONFIG" && ac_cv_path_FREETYPE_XFT_CONFIG="none"
12726  ;;
12727esac
12728fi
12729FREETYPE_XFT_CONFIG=$ac_cv_path_FREETYPE_XFT_CONFIG
12730
12731if test -n "$FREETYPE_XFT_CONFIG"; then
12732  echo "$as_me:12732: result: $FREETYPE_XFT_CONFIG" >&5
12733echo "${ECHO_T}$FREETYPE_XFT_CONFIG" >&6
12734else
12735  echo "$as_me:12735: result: no" >&5
12736echo "${ECHO_T}no" >&6
12737fi
12738
12739	if test "$FREETYPE_XFT_CONFIG" != none; then
12740		FREETYPE_CONFIG=$FREETYPE_XFT_CONFIG
12741	else
12742		cf_extra_freetype_libs="-lXft"
12743		# Extract the first word of "freetype-config", so it can be a program name with args.
12744set dummy freetype-config; ac_word=$2
12745echo "$as_me:12745: checking for $ac_word" >&5
12746echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
12747if test "${ac_cv_path_FREETYPE_OLD_CONFIG+set}" = set; then
12748  echo $ECHO_N "(cached) $ECHO_C" >&6
12749else
12750  case $FREETYPE_OLD_CONFIG in
12751  [\\/]* | ?:[\\/]*)
12752  ac_cv_path_FREETYPE_OLD_CONFIG="$FREETYPE_OLD_CONFIG" # Let the user override the test with a path.
12753  ;;
12754  *)
12755  ac_save_IFS=$IFS; IFS=$ac_path_separator
12756ac_dummy="$PATH"
12757for ac_dir in $ac_dummy; do
12758  IFS=$ac_save_IFS
12759  test -z "$ac_dir" && ac_dir=.
12760  if $as_executable_p "$ac_dir/$ac_word"; then
12761   ac_cv_path_FREETYPE_OLD_CONFIG="$ac_dir/$ac_word"
12762   echo "$as_me:12762: found $ac_dir/$ac_word" >&5
12763   break
12764fi
12765done
12766
12767  test -z "$ac_cv_path_FREETYPE_OLD_CONFIG" && ac_cv_path_FREETYPE_OLD_CONFIG="none"
12768  ;;
12769esac
12770fi
12771FREETYPE_OLD_CONFIG=$ac_cv_path_FREETYPE_OLD_CONFIG
12772
12773if test -n "$FREETYPE_OLD_CONFIG"; then
12774  echo "$as_me:12774: result: $FREETYPE_OLD_CONFIG" >&5
12775echo "${ECHO_T}$FREETYPE_OLD_CONFIG" >&6
12776else
12777  echo "$as_me:12777: result: no" >&5
12778echo "${ECHO_T}no" >&6
12779fi
12780
12781		if test "$FREETYPE_OLD_CONFIG" != none; then
12782			FREETYPE_CONFIG=$FREETYPE_OLD_CONFIG
12783		fi
12784	fi
12785fi
12786echo "$as_me:12786: checking for FreeType config" >&5
12787echo $ECHO_N "checking for FreeType config... $ECHO_C" >&6
12788echo "$as_me:12788: result: $FREETYPE_CONFIG $FREETYPE_PARAMS" >&5
12789echo "${ECHO_T}$FREETYPE_CONFIG $FREETYPE_PARAMS" >&6
12790
12791if test "$FREETYPE_CONFIG" != none ; then
12792
12793	if test "$cf_cv_x_freetype_incs" = no ; then
12794		echo "$as_me:12794: checking for $FREETYPE_CONFIG cflags" >&5
12795echo $ECHO_N "checking for $FREETYPE_CONFIG cflags... $ECHO_C" >&6
12796		cf_cv_x_freetype_incs="`$FREETYPE_CONFIG $FREETYPE_PARAMS --cflags 2>/dev/null`"
12797		echo "$as_me:12797: result: $cf_cv_x_freetype_incs" >&5
12798echo "${ECHO_T}$cf_cv_x_freetype_incs" >&6
12799	fi
12800
12801	if test "$cf_cv_x_freetype_libs" = no ; then
12802		echo "$as_me:12802: checking for $FREETYPE_CONFIG libs" >&5
12803echo $ECHO_N "checking for $FREETYPE_CONFIG libs... $ECHO_C" >&6
12804		cf_cv_x_freetype_libs="$cf_extra_freetype_libs `$FREETYPE_CONFIG $FREETYPE_PARAMS --libs 2>/dev/null`"
12805		echo "$as_me:12805: result: $cf_cv_x_freetype_libs" >&5
12806echo "${ECHO_T}$cf_cv_x_freetype_libs" >&6
12807	fi
12808
12809fi
12810
12811if test "$cf_cv_x_freetype_incs" = no ; then
12812	cf_cv_x_freetype_incs=
12813fi
12814
12815if test "$cf_cv_x_freetype_libs" = no ; then
12816	cf_cv_x_freetype_libs=-lXft
12817fi
12818
12819echo "$as_me:12819: checking if we can link with FreeType libraries" >&5
12820echo $ECHO_N "checking if we can link with FreeType libraries... $ECHO_C" >&6
12821
12822cf_save_LIBS="$LIBS"
12823cf_save_INCS="$CPPFLAGS"
12824
12825LIBS="$cf_cv_x_freetype_libs $LIBS"
12826CPPFLAGS="$CPPFLAGS $cf_cv_x_freetype_incs"
12827
12828cat >conftest.$ac_ext <<_ACEOF
12829#line 12829 "configure"
12830#include "confdefs.h"
12831
12832#include <X11/Xlib.h>
12833#include <X11/extensions/Xrender.h>
12834#include <X11/Xft/Xft.h>
12835int
12836main ()
12837{
12838
12839	XftPattern  *pat = XftNameParse ("name");
12840  ;
12841  return 0;
12842}
12843_ACEOF
12844rm -f conftest.$ac_objext conftest$ac_exeext
12845if { (eval echo "$as_me:12845: \"$ac_link\"") >&5
12846  (eval $ac_link) 2>&5
12847  ac_status=$?
12848  echo "$as_me:12848: \$? = $ac_status" >&5
12849  (exit $ac_status); } &&
12850         { ac_try='test -s conftest$ac_exeext'
12851  { (eval echo "$as_me:12851: \"$ac_try\"") >&5
12852  (eval $ac_try) 2>&5
12853  ac_status=$?
12854  echo "$as_me:12854: \$? = $ac_status" >&5
12855  (exit $ac_status); }; }; then
12856  cf_cv_found_freetype=yes
12857else
12858  echo "$as_me: failed program was:" >&5
12859cat conftest.$ac_ext >&5
12860cf_cv_found_freetype=no
12861fi
12862rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12863echo "$as_me:12863: result: $cf_cv_found_freetype" >&5
12864echo "${ECHO_T}$cf_cv_found_freetype" >&6
12865
12866LIBS="$cf_save_LIBS"
12867CPPFLAGS="$cf_save_INCS"
12868
12869if test "$cf_cv_found_freetype" = yes ; then
12870	LIBS="$cf_cv_x_freetype_libs $LIBS"
12871
12872cf_fix_cppflags=no
12873cf_new_cflags=
12874cf_new_cppflags=
12875cf_new_extra_cppflags=
12876
12877for cf_add_cflags in $cf_cv_x_freetype_incs
12878do
12879case $cf_fix_cppflags in
12880no)
12881	case $cf_add_cflags in #(vi
12882	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
12883		case $cf_add_cflags in
12884		-D*)
12885			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12886
12887			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12888				&& test -z "${cf_tst_cflags}" \
12889				&& cf_fix_cppflags=yes
12890
12891			if test $cf_fix_cppflags = yes ; then
12892				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12893				continue
12894			elif test "${cf_tst_cflags}" = "\"'" ; then
12895				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12896				continue
12897			fi
12898			;;
12899		esac
12900		case "$CPPFLAGS" in
12901		*$cf_add_cflags) #(vi
12902			;;
12903		*) #(vi
12904			case $cf_add_cflags in #(vi
12905			-D*)
12906				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12907
12908CPPFLAGS=`echo "$CPPFLAGS" | \
12909	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
12910		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
12911
12912				;;
12913			esac
12914			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12915			;;
12916		esac
12917		;;
12918	*)
12919		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12920		;;
12921	esac
12922	;;
12923yes)
12924	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12925
12926	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12927
12928	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12929		&& test -z "${cf_tst_cflags}" \
12930		&& cf_fix_cppflags=no
12931	;;
12932esac
12933done
12934
12935if test -n "$cf_new_cflags" ; then
12936
12937	CFLAGS="$CFLAGS $cf_new_cflags"
12938fi
12939
12940if test -n "$cf_new_cppflags" ; then
12941
12942	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
12943fi
12944
12945if test -n "$cf_new_extra_cppflags" ; then
12946
12947	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12948fi
12949
12950	cat >>confdefs.h <<\EOF
12951#define XRENDERFONT 1
12952EOF
12953
12954for ac_func in \
12955	XftDrawCharSpec \
12956	XftDrawSetClip \
12957	XftDrawSetClipRectangles \
12958
12959do
12960as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12961echo "$as_me:12961: checking for $ac_func" >&5
12962echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12963if eval "test \"\${$as_ac_var+set}\" = set"; then
12964  echo $ECHO_N "(cached) $ECHO_C" >&6
12965else
12966  cat >conftest.$ac_ext <<_ACEOF
12967#line 12967 "configure"
12968#include "confdefs.h"
12969/* System header to define __stub macros and hopefully few prototypes,
12970    which can conflict with char $ac_func (); below.  */
12971#include <assert.h>
12972/* Override any gcc2 internal prototype to avoid an error.  */
12973#ifdef __cplusplus
12974extern "C"
12975#endif
12976/* We use char because int might match the return type of a gcc2
12977   builtin and then its argument prototype would still apply.  */
12978char $ac_func ();
12979char (*f) ();
12980
12981int
12982main ()
12983{
12984/* The GNU C library defines this for functions which it implements
12985    to always fail with ENOSYS.  Some functions are actually named
12986    something starting with __ and the normal name is an alias.  */
12987#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12988choke me
12989#else
12990f = $ac_func;
12991#endif
12992
12993  ;
12994  return 0;
12995}
12996_ACEOF
12997rm -f conftest.$ac_objext conftest$ac_exeext
12998if { (eval echo "$as_me:12998: \"$ac_link\"") >&5
12999  (eval $ac_link) 2>&5
13000  ac_status=$?
13001  echo "$as_me:13001: \$? = $ac_status" >&5
13002  (exit $ac_status); } &&
13003         { ac_try='test -s conftest$ac_exeext'
13004  { (eval echo "$as_me:13004: \"$ac_try\"") >&5
13005  (eval $ac_try) 2>&5
13006  ac_status=$?
13007  echo "$as_me:13007: \$? = $ac_status" >&5
13008  (exit $ac_status); }; }; then
13009  eval "$as_ac_var=yes"
13010else
13011  echo "$as_me: failed program was:" >&5
13012cat conftest.$ac_ext >&5
13013eval "$as_ac_var=no"
13014fi
13015rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13016fi
13017echo "$as_me:13017: result: `eval echo '${'$as_ac_var'}'`" >&5
13018echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13019if test `eval echo '${'$as_ac_var'}'` = yes; then
13020  cat >>confdefs.h <<EOF
13021#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13022EOF
13023
13024fi
13025done
13026
13027else
13028	{ echo "$as_me:13028: WARNING: No libraries found for FreeType" >&5
13029echo "$as_me: WARNING: No libraries found for FreeType" >&2;}
13030	CPPFLAGS=`echo "$CPPFLAGS" | sed -e s/-DXRENDERFONT//`
13031fi
13032
13033# FIXME: revisit this if needed
13034
13035echo "$as_me:13035: checking for usable Xft/fontconfig package" >&5
13036echo $ECHO_N "checking for usable Xft/fontconfig package... $ECHO_C" >&6
13037if test "${cf_cv_xft_compat+set}" = set; then
13038  echo $ECHO_N "(cached) $ECHO_C" >&6
13039else
13040
13041cat >conftest.$ac_ext <<_ACEOF
13042#line 13042 "configure"
13043#include "confdefs.h"
13044
13045#include <X11/Xft/Xft.h>
13046
13047int
13048main ()
13049{
13050
13051	XftPattern *pat;
13052	XftPatternBuild(pat,
13053					XFT_FAMILY, XftTypeString, "mono",
13054					(void *) 0);
13055
13056  ;
13057  return 0;
13058}
13059_ACEOF
13060rm -f conftest.$ac_objext conftest$ac_exeext
13061if { (eval echo "$as_me:13061: \"$ac_link\"") >&5
13062  (eval $ac_link) 2>&5
13063  ac_status=$?
13064  echo "$as_me:13064: \$? = $ac_status" >&5
13065  (exit $ac_status); } &&
13066         { ac_try='test -s conftest$ac_exeext'
13067  { (eval echo "$as_me:13067: \"$ac_try\"") >&5
13068  (eval $ac_try) 2>&5
13069  ac_status=$?
13070  echo "$as_me:13070: \$? = $ac_status" >&5
13071  (exit $ac_status); }; }; then
13072  cf_cv_xft_compat=yes
13073else
13074  echo "$as_me: failed program was:" >&5
13075cat conftest.$ac_ext >&5
13076cf_cv_xft_compat=no
13077fi
13078rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13079
13080fi
13081echo "$as_me:13081: result: $cf_cv_xft_compat" >&5
13082echo "${ECHO_T}$cf_cv_xft_compat" >&6
13083
13084if test "$cf_cv_xft_compat" = no
13085then
13086	# workaround for broken ".pc" files used for Xft.
13087	case "$cf_cv_x_freetype_libs" in #(vi
13088	*-lfontconfig*) #(vi
13089		;;
13090	*)
13091		test -n "$verbose" && echo "	work around broken package" 1>&6
13092
13093echo "${as_me:-configure}:13093: testing work around broken package ..." 1>&5
13094
13095if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists fontconfig; then
13096	test -n "$verbose" && echo "	found package fontconfig" 1>&6
13097
13098echo "${as_me:-configure}:13098: testing found package fontconfig ..." 1>&5
13099
13100	cf_pkgconfig_incs="`$PKG_CONFIG --cflags fontconfig 2>/dev/null`"
13101	cf_pkgconfig_libs="`$PKG_CONFIG --libs   fontconfig 2>/dev/null`"
13102	test -n "$verbose" && echo "	package fontconfig CFLAGS: $cf_pkgconfig_incs" 1>&6
13103
13104echo "${as_me:-configure}:13104: testing package fontconfig CFLAGS: $cf_pkgconfig_incs ..." 1>&5
13105
13106	test -n "$verbose" && echo "	package fontconfig LIBS: $cf_pkgconfig_libs" 1>&6
13107
13108echo "${as_me:-configure}:13108: testing package fontconfig LIBS: $cf_pkgconfig_libs ..." 1>&5
13109
13110cf_fix_cppflags=no
13111cf_new_cflags=
13112cf_new_cppflags=
13113cf_new_extra_cppflags=
13114
13115for cf_add_cflags in $cf_pkgconfig_incs
13116do
13117case $cf_fix_cppflags in
13118no)
13119	case $cf_add_cflags in #(vi
13120	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
13121		case $cf_add_cflags in
13122		-D*)
13123			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13124
13125			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13126				&& test -z "${cf_tst_cflags}" \
13127				&& cf_fix_cppflags=yes
13128
13129			if test $cf_fix_cppflags = yes ; then
13130				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13131				continue
13132			elif test "${cf_tst_cflags}" = "\"'" ; then
13133				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13134				continue
13135			fi
13136			;;
13137		esac
13138		case "$CPPFLAGS" in
13139		*$cf_add_cflags) #(vi
13140			;;
13141		*) #(vi
13142			case $cf_add_cflags in #(vi
13143			-D*)
13144				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13145
13146CPPFLAGS=`echo "$CPPFLAGS" | \
13147	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
13148		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
13149
13150				;;
13151			esac
13152			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13153			;;
13154		esac
13155		;;
13156	*)
13157		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13158		;;
13159	esac
13160	;;
13161yes)
13162	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13163
13164	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13165
13166	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13167		&& test -z "${cf_tst_cflags}" \
13168		&& cf_fix_cppflags=no
13169	;;
13170esac
13171done
13172
13173if test -n "$cf_new_cflags" ; then
13174
13175	CFLAGS="$CFLAGS $cf_new_cflags"
13176fi
13177
13178if test -n "$cf_new_cppflags" ; then
13179
13180	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13181fi
13182
13183if test -n "$cf_new_extra_cppflags" ; then
13184
13185	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13186fi
13187
13188	LIBS="$cf_pkgconfig_libs $LIBS"
13189	:
13190else
13191
13192test -n "$verbose" && echo "	...before $LIBS" 1>&6
13193
13194echo "${as_me:-configure}:13194: testing ...before $LIBS ..." 1>&5
13195
13196LIBS=`echo "$LIBS" | sed -e "s/[ 	][ 	]*/ /g" -e "s,-lXft ,-lXft -lfontconfig ," -e 's/  / /g'`
13197test -n "$verbose" && echo "	...after  $LIBS" 1>&6
13198
13199echo "${as_me:-configure}:13199: testing ...after  $LIBS ..." 1>&5
13200
13201fi
13202
13203		;;
13204	esac
13205fi
13206
13207else
13208	CPPFLAGS=`echo "$CPPFLAGS" | sed -e s/-DXRENDERFONT//`
13209fi
13210
13211echo "$as_me:13211: checking if you want support for HP-style function keys" >&5
13212echo $ECHO_N "checking if you want support for HP-style function keys... $ECHO_C" >&6
13213
13214# Check whether --enable-hp-fkeys or --disable-hp-fkeys was given.
13215if test "${enable_hp_fkeys+set}" = set; then
13216  enableval="$enable_hp_fkeys"
13217  test "$enableval" != yes && enableval=no
13218  if test "$enableval" != "no" ; then
13219    enable_hp_fkeys=yes
13220  else
13221    enable_hp_fkeys=no
13222  fi
13223else
13224  enableval=no
13225  enable_hp_fkeys=no
13226
13227fi;
13228echo "$as_me:13228: result: $enable_hp_fkeys" >&5
13229echo "${ECHO_T}$enable_hp_fkeys" >&6
13230if test "$enable_hp_fkeys" = yes ; then
13231	cat >>confdefs.h <<\EOF
13232#define OPT_HP_FUNC_KEYS 1
13233EOF
13234
13235fi
13236
13237echo "$as_me:13237: checking if you want support for SCO-style function keys" >&5
13238echo $ECHO_N "checking if you want support for SCO-style function keys... $ECHO_C" >&6
13239
13240# Check whether --enable-sco-fkeys or --disable-sco-fkeys was given.
13241if test "${enable_sco_fkeys+set}" = set; then
13242  enableval="$enable_sco_fkeys"
13243  test "$enableval" != yes && enableval=no
13244  if test "$enableval" != "no" ; then
13245    enable_sco_fkeys=yes
13246  else
13247    enable_sco_fkeys=no
13248  fi
13249else
13250  enableval=no
13251  enable_sco_fkeys=no
13252
13253fi;
13254echo "$as_me:13254: result: $enable_sco_fkeys" >&5
13255echo "${ECHO_T}$enable_sco_fkeys" >&6
13256if test "$enable_sco_fkeys" = yes ; then
13257	cat >>confdefs.h <<\EOF
13258#define OPT_SCO_FUNC_KEYS 1
13259EOF
13260
13261fi
13262
13263echo "$as_me:13263: checking if you want support for Sun-style function keys" >&5
13264echo $ECHO_N "checking if you want support for Sun-style function keys... $ECHO_C" >&6
13265
13266# Check whether --enable-sun-fkeys or --disable-sun-fkeys was given.
13267if test "${enable_sun_fkeys+set}" = set; then
13268  enableval="$enable_sun_fkeys"
13269  test "$enableval" != no && enableval=yes
13270  if test "$enableval" != "yes" ; then
13271    enable_sun_fkeys=no
13272  else
13273    enable_sun_fkeys=yes
13274  fi
13275else
13276  enableval=yes
13277  enable_sun_fkeys=yes
13278
13279fi;
13280echo "$as_me:13280: result: $enable_sun_fkeys" >&5
13281echo "${ECHO_T}$enable_sun_fkeys" >&6
13282if test "$enable_sun_fkeys" = no ; then
13283	cat >>confdefs.h <<\EOF
13284#define OPT_SUN_FUNC_KEYS 0
13285EOF
13286
13287fi
13288
13289echo "$as_me:13289: checking if you want saved-lines stored as a FIFO" >&5
13290echo $ECHO_N "checking if you want saved-lines stored as a FIFO... $ECHO_C" >&6
13291
13292# Check whether --enable-fifo-lines or --disable-fifo-lines was given.
13293if test "${enable_fifo_lines+set}" = set; then
13294  enableval="$enable_fifo_lines"
13295  test "$enableval" != no && enableval=yes
13296  if test "$enableval" != "yes" ; then
13297    enable_fifo_lines=no
13298  else
13299    enable_fifo_lines=yes
13300  fi
13301else
13302  enableval=yes
13303  enable_fifo_lines=yes
13304
13305fi;
13306echo "$as_me:13306: result: $enable_fifo_lines" >&5
13307echo "${ECHO_T}$enable_fifo_lines" >&6
13308if test "$enable_fifo_lines" = yes ; then
13309	cat >>confdefs.h <<\EOF
13310#define OPT_FIFO_LINES 1
13311EOF
13312
13313fi
13314
13315echo "$as_me:13315: checking if you want support for internationalization" >&5
13316echo $ECHO_N "checking if you want support for internationalization... $ECHO_C" >&6
13317
13318# Check whether --enable-i18n or --disable-i18n was given.
13319if test "${enable_i18n+set}" = set; then
13320  enableval="$enable_i18n"
13321  test "$enableval" != no && enableval=yes
13322  if test "$enableval" != "yes" ; then
13323    enable_i18n=no
13324  else
13325    enable_i18n=yes
13326  fi
13327else
13328  enableval=yes
13329  enable_i18n=yes
13330
13331fi;
13332echo "$as_me:13332: result: $enable_i18n" >&5
13333echo "${ECHO_T}$enable_i18n" >&6
13334if test "$enable_i18n" = no ; then
13335	cat >>confdefs.h <<\EOF
13336#define OPT_I18N_SUPPORT 0
13337EOF
13338
13339fi
13340
13341echo "$as_me:13341: checking if you want support for initial-erase setup" >&5
13342echo $ECHO_N "checking if you want support for initial-erase setup... $ECHO_C" >&6
13343
13344# Check whether --enable-initial-erase or --disable-initial-erase was given.
13345if test "${enable_initial_erase+set}" = set; then
13346  enableval="$enable_initial_erase"
13347  test "$enableval" != no && enableval=yes
13348  if test "$enableval" != "yes" ; then
13349    enable_ie=no
13350  else
13351    enable_ie=yes
13352  fi
13353else
13354  enableval=yes
13355  enable_ie=yes
13356
13357fi;
13358echo "$as_me:13358: result: $enable_ie" >&5
13359echo "${ECHO_T}$enable_ie" >&6
13360if test "$enable_ie" = no ; then
13361	cat >>confdefs.h <<\EOF
13362#define OPT_INITIAL_ERASE 0
13363EOF
13364
13365fi
13366
13367echo "$as_me:13367: checking if you want support for input-method" >&5
13368echo $ECHO_N "checking if you want support for input-method... $ECHO_C" >&6
13369
13370# Check whether --enable-input-method or --disable-input-method was given.
13371if test "${enable_input_method+set}" = set; then
13372  enableval="$enable_input_method"
13373  test "$enableval" != no && enableval=yes
13374  if test "$enableval" != "yes" ; then
13375    enable_ximp=no
13376  else
13377    enable_ximp=yes
13378  fi
13379else
13380  enableval=yes
13381  enable_ximp=yes
13382
13383fi;
13384echo "$as_me:13384: result: $enable_ximp" >&5
13385echo "${ECHO_T}$enable_ximp" >&6
13386
13387echo "$as_me:13387: checking if X libraries support input-method" >&5
13388echo $ECHO_N "checking if X libraries support input-method... $ECHO_C" >&6
13389if test "${cf_cv_input_method+set}" = set; then
13390  echo $ECHO_N "(cached) $ECHO_C" >&6
13391else
13392
13393cat >conftest.$ac_ext <<_ACEOF
13394#line 13394 "configure"
13395#include "confdefs.h"
13396
13397#include <X11/IntrinsicP.h>
13398#include <X11/Xatom.h>
13399#include <X11/Xutil.h>
13400#include <X11/Xmu/Atoms.h>
13401#include <X11/Xmu/Converters.h>
13402#include <X11/Xaw/XawImP.h>
13403
13404int
13405main ()
13406{
13407
13408{
13409	XIM xim;
13410	XIMStyles *xim_styles = 0;
13411	XIMStyle input_style;
13412	Widget w = 0;
13413
13414	XSetLocaleModifiers("@im=none");
13415	xim = XOpenIM(XtDisplay(w), NULL, NULL, NULL);
13416	XGetIMValues(xim, XNQueryInputStyle, &xim_styles, NULL);
13417	XCloseIM(xim);
13418	input_style = (XIMPreeditNothing | XIMStatusNothing);
13419}
13420
13421  ;
13422  return 0;
13423}
13424_ACEOF
13425rm -f conftest.$ac_objext conftest$ac_exeext
13426if { (eval echo "$as_me:13426: \"$ac_link\"") >&5
13427  (eval $ac_link) 2>&5
13428  ac_status=$?
13429  echo "$as_me:13429: \$? = $ac_status" >&5
13430  (exit $ac_status); } &&
13431         { ac_try='test -s conftest$ac_exeext'
13432  { (eval echo "$as_me:13432: \"$ac_try\"") >&5
13433  (eval $ac_try) 2>&5
13434  ac_status=$?
13435  echo "$as_me:13435: \$? = $ac_status" >&5
13436  (exit $ac_status); }; }; then
13437  cf_cv_input_method=yes
13438else
13439  echo "$as_me: failed program was:" >&5
13440cat conftest.$ac_ext >&5
13441cf_cv_input_method=no
13442fi
13443rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13444fi
13445echo "$as_me:13445: result: $cf_cv_input_method" >&5
13446echo "${ECHO_T}$cf_cv_input_method" >&6
13447
13448test "$cf_cv_input_method" = no && enable_ximp=no
13449if test "$enable_ximp" = no ; then
13450	cat >>confdefs.h <<\EOF
13451#define OPT_INPUT_METHOD 0
13452EOF
13453
13454fi
13455
13456echo "$as_me:13456: checking if you want support for load-vt-fonts" >&5
13457echo $ECHO_N "checking if you want support for load-vt-fonts... $ECHO_C" >&6
13458
13459# Check whether --enable-load-vt-fonts or --disable-load-vt-fonts was given.
13460if test "${enable_load_vt_fonts+set}" = set; then
13461  enableval="$enable_load_vt_fonts"
13462  test "$enableval" != yes && enableval=no
13463  if test "$enableval" != "no" ; then
13464    enable_load_vt_fonts=yes
13465  else
13466    enable_load_vt_fonts=no
13467  fi
13468else
13469  enableval=no
13470  enable_load_vt_fonts=no
13471
13472fi;
13473echo "$as_me:13473: result: $enable_load_vt_fonts" >&5
13474echo "${ECHO_T}$enable_load_vt_fonts" >&6
13475if test "$enable_load_vt_fonts" = yes ; then
13476	cat >>confdefs.h <<\EOF
13477#define OPT_LOAD_VTFONTS 1
13478EOF
13479
13480fi
13481
13482echo "$as_me:13482: checking if you want support for logging" >&5
13483echo $ECHO_N "checking if you want support for logging... $ECHO_C" >&6
13484
13485# Check whether --enable-logging or --disable-logging was given.
13486if test "${enable_logging+set}" = set; then
13487  enableval="$enable_logging"
13488  test "$enableval" != yes && enableval=no
13489  if test "$enableval" != "no" ; then
13490    enable_logging=yes
13491  else
13492    enable_logging=no
13493  fi
13494else
13495  enableval=no
13496  enable_logging=no
13497
13498fi;
13499echo "$as_me:13499: result: $enable_logging" >&5
13500echo "${ECHO_T}$enable_logging" >&6
13501if test "$enable_logging" = yes ; then
13502	cat >>confdefs.h <<\EOF
13503#define ALLOWLOGGING 1
13504EOF
13505
13506	echo "$as_me:13506: checking if you want to allow logging via a pipe" >&5
13507echo $ECHO_N "checking if you want to allow logging via a pipe... $ECHO_C" >&6
13508
13509# Check whether --enable-logfile-exec or --disable-logfile-exec was given.
13510if test "${enable_logfile_exec+set}" = set; then
13511  enableval="$enable_logfile_exec"
13512  test "$enableval" != yes && enableval=no
13513  if test "$enableval" != "no" ; then
13514    enable_log_exec=yes
13515  else
13516    enable_log_exec=no
13517  fi
13518else
13519  enableval=no
13520  enable_log_exec=no
13521
13522fi;
13523	echo "$as_me:13523: result: $enable_log_exec" >&5
13524echo "${ECHO_T}$enable_log_exec" >&6
13525	if test "$enable_log_exec" = yes ; then
13526		cat >>confdefs.h <<\EOF
13527#define ALLOWLOGFILEEXEC 1
13528EOF
13529
13530	fi
13531fi
13532
13533echo "$as_me:13533: checking if you want support for iconify/maximize translations" >&5
13534echo $ECHO_N "checking if you want support for iconify/maximize translations... $ECHO_C" >&6
13535
13536# Check whether --enable-maximize or --disable-maximize was given.
13537if test "${enable_maximize+set}" = set; then
13538  enableval="$enable_maximize"
13539  test "$enableval" != no && enableval=yes
13540  if test "$enableval" != "yes" ; then
13541    enable_maximize=no
13542  else
13543    enable_maximize=yes
13544  fi
13545else
13546  enableval=yes
13547  enable_maximize=yes
13548
13549fi;
13550echo "$as_me:13550: result: $enable_maximize" >&5
13551echo "${ECHO_T}$enable_maximize" >&6
13552test "$enable_maximize" = no && cat >>confdefs.h <<\EOF
13553#define OPT_MAXIMIZE 0
13554EOF
13555
13556echo "$as_me:13556: checking if you want NumLock to override keyboard tables" >&5
13557echo $ECHO_N "checking if you want NumLock to override keyboard tables... $ECHO_C" >&6
13558
13559# Check whether --enable-num-lock or --disable-num-lock was given.
13560if test "${enable_num_lock+set}" = set; then
13561  enableval="$enable_num_lock"
13562  test "$enableval" != no && enableval=yes
13563  if test "$enableval" != "yes" ; then
13564    enable_numlock=no
13565  else
13566    enable_numlock=yes
13567  fi
13568else
13569  enableval=yes
13570  enable_numlock=yes
13571
13572fi;
13573echo "$as_me:13573: result: $enable_numlock" >&5
13574echo "${ECHO_T}$enable_numlock" >&6
13575test "$enable_numlock" = no && cat >>confdefs.h <<\EOF
13576#define OPT_NUM_LOCK 0
13577EOF
13578
13579echo "$as_me:13579: checking if you want support for get/set of base64 selection data" >&5
13580echo $ECHO_N "checking if you want support for get/set of base64 selection data... $ECHO_C" >&6
13581
13582# Check whether --enable-paste64 or --disable-paste64 was given.
13583if test "${enable_paste64+set}" = set; then
13584  enableval="$enable_paste64"
13585  test "$enableval" != no && enableval=yes
13586  if test "$enableval" != "yes" ; then
13587    enable_paste64=no
13588  else
13589    enable_paste64=yes
13590  fi
13591else
13592  enableval=yes
13593  enable_paste64=yes
13594
13595fi;
13596echo "$as_me:13596: result: $enable_paste64" >&5
13597echo "${ECHO_T}$enable_paste64" >&6
13598if test "$enable_paste64" = yes ; then
13599	cat >>confdefs.h <<\EOF
13600#define OPT_PASTE64 1
13601EOF
13602
13603else
13604	cat >>confdefs.h <<\EOF
13605#define OPT_PASTE64 0
13606EOF
13607
13608fi
13609
13610echo "$as_me:13610: checking if you want support for pty-handshaking" >&5
13611echo $ECHO_N "checking if you want support for pty-handshaking... $ECHO_C" >&6
13612
13613# Check whether --enable-pty-handshake or --disable-pty-handshake was given.
13614if test "${enable_pty_handshake+set}" = set; then
13615  enableval="$enable_pty_handshake"
13616  test "$enableval" != no && enableval=yes
13617  if test "$enableval" != "yes" ; then
13618    enable_pty_handshake=no
13619  else
13620    enable_pty_handshake=yes
13621  fi
13622else
13623  enableval=yes
13624  enable_pty_handshake=yes
13625
13626fi;
13627echo "$as_me:13627: result: $enable_pty_handshake" >&5
13628echo "${ECHO_T}$enable_pty_handshake" >&6
13629if test "$enable_pty_handshake" = yes ; then
13630	cat >>confdefs.h <<\EOF
13631#define OPT_PTY_HANDSHAKE 1
13632EOF
13633
13634else
13635	cat >>confdefs.h <<\EOF
13636#define OPT_PTY_HANDSHAKE 0
13637EOF
13638
13639fi
13640
13641echo "$as_me:13641: checking if you want support for mouse in readline applications" >&5
13642echo $ECHO_N "checking if you want support for mouse in readline applications... $ECHO_C" >&6
13643
13644# Check whether --enable-readline-mouse or --disable-readline-mouse was given.
13645if test "${enable_readline_mouse+set}" = set; then
13646  enableval="$enable_readline_mouse"
13647  test "$enableval" != yes && enableval=no
13648  if test "$enableval" != "no" ; then
13649    enable_readline_mouse=yes
13650  else
13651    enable_readline_mouse=no
13652  fi
13653else
13654  enableval=no
13655  enable_readline_mouse=no
13656
13657fi;
13658echo "$as_me:13658: result: $enable_readline_mouse" >&5
13659echo "${ECHO_T}$enable_readline_mouse" >&6
13660if test "$enable_readline_mouse" = yes ; then
13661	cat >>confdefs.h <<\EOF
13662#define OPT_READLINE 1
13663EOF
13664
13665fi
13666
13667echo "$as_me:13667: checking if you want support for regular-expression selections" >&5
13668echo $ECHO_N "checking if you want support for regular-expression selections... $ECHO_C" >&6
13669
13670# Check whether --enable-regex or --disable-regex was given.
13671if test "${enable_regex+set}" = set; then
13672  enableval="$enable_regex"
13673  test "$enableval" != no && enableval=yes
13674  if test "$enableval" != "yes" ; then
13675    enable_regex=no
13676  else
13677    enable_regex=yes
13678  fi
13679else
13680  enableval=yes
13681  enable_regex=yes
13682
13683fi;
13684echo "$as_me:13684: result: $enable_regex" >&5
13685echo "${ECHO_T}$enable_regex" >&6
13686if test "$enable_regex" = yes ; then
13687
13688echo "$as_me:13688: checking if you want to use PCRE for regular-expressions" >&5
13689echo $ECHO_N "checking if you want to use PCRE for regular-expressions... $ECHO_C" >&6
13690
13691# Check whether --with-pcre or --without-pcre was given.
13692if test "${with_pcre+set}" = set; then
13693  withval="$with_pcre"
13694
13695fi;
13696test -z "$with_pcre" && with_pcre=no
13697echo "$as_me:13697: result: $with_pcre" >&5
13698echo "${ECHO_T}$with_pcre" >&6
13699
13700if test "$with_pcre" != no ; then
13701
13702if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists libpcre; then
13703	test -n "$verbose" && echo "	found package libpcre" 1>&6
13704
13705echo "${as_me:-configure}:13705: testing found package libpcre ..." 1>&5
13706
13707	cf_pkgconfig_incs="`$PKG_CONFIG --cflags libpcre 2>/dev/null`"
13708	cf_pkgconfig_libs="`$PKG_CONFIG --libs   libpcre 2>/dev/null`"
13709	test -n "$verbose" && echo "	package libpcre CFLAGS: $cf_pkgconfig_incs" 1>&6
13710
13711echo "${as_me:-configure}:13711: testing package libpcre CFLAGS: $cf_pkgconfig_incs ..." 1>&5
13712
13713	test -n "$verbose" && echo "	package libpcre LIBS: $cf_pkgconfig_libs" 1>&6
13714
13715echo "${as_me:-configure}:13715: testing package libpcre LIBS: $cf_pkgconfig_libs ..." 1>&5
13716
13717cf_fix_cppflags=no
13718cf_new_cflags=
13719cf_new_cppflags=
13720cf_new_extra_cppflags=
13721
13722for cf_add_cflags in $cf_pkgconfig_incs
13723do
13724case $cf_fix_cppflags in
13725no)
13726	case $cf_add_cflags in #(vi
13727	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
13728		case $cf_add_cflags in
13729		-D*)
13730			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13731
13732			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13733				&& test -z "${cf_tst_cflags}" \
13734				&& cf_fix_cppflags=yes
13735
13736			if test $cf_fix_cppflags = yes ; then
13737				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13738				continue
13739			elif test "${cf_tst_cflags}" = "\"'" ; then
13740				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13741				continue
13742			fi
13743			;;
13744		esac
13745		case "$CPPFLAGS" in
13746		*$cf_add_cflags) #(vi
13747			;;
13748		*) #(vi
13749			case $cf_add_cflags in #(vi
13750			-D*)
13751				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13752
13753CPPFLAGS=`echo "$CPPFLAGS" | \
13754	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
13755		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
13756
13757				;;
13758			esac
13759			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13760			;;
13761		esac
13762		;;
13763	*)
13764		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13765		;;
13766	esac
13767	;;
13768yes)
13769	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13770
13771	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13772
13773	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13774		&& test -z "${cf_tst_cflags}" \
13775		&& cf_fix_cppflags=no
13776	;;
13777esac
13778done
13779
13780if test -n "$cf_new_cflags" ; then
13781
13782	CFLAGS="$CFLAGS $cf_new_cflags"
13783fi
13784
13785if test -n "$cf_new_cppflags" ; then
13786
13787	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13788fi
13789
13790if test -n "$cf_new_extra_cppflags" ; then
13791
13792	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13793fi
13794
13795	LIBS="$cf_pkgconfig_libs $LIBS"
13796	:
13797else
13798
13799echo "$as_me:13799: checking for pcre_compile in -lpcre" >&5
13800echo $ECHO_N "checking for pcre_compile in -lpcre... $ECHO_C" >&6
13801if test "${ac_cv_lib_pcre_pcre_compile+set}" = set; then
13802  echo $ECHO_N "(cached) $ECHO_C" >&6
13803else
13804  ac_check_lib_save_LIBS=$LIBS
13805LIBS="-lpcre  $LIBS"
13806cat >conftest.$ac_ext <<_ACEOF
13807#line 13807 "configure"
13808#include "confdefs.h"
13809
13810/* Override any gcc2 internal prototype to avoid an error.  */
13811#ifdef __cplusplus
13812extern "C"
13813#endif
13814/* We use char because int might match the return type of a gcc2
13815   builtin and then its argument prototype would still apply.  */
13816char pcre_compile ();
13817int
13818main ()
13819{
13820pcre_compile ();
13821  ;
13822  return 0;
13823}
13824_ACEOF
13825rm -f conftest.$ac_objext conftest$ac_exeext
13826if { (eval echo "$as_me:13826: \"$ac_link\"") >&5
13827  (eval $ac_link) 2>&5
13828  ac_status=$?
13829  echo "$as_me:13829: \$? = $ac_status" >&5
13830  (exit $ac_status); } &&
13831         { ac_try='test -s conftest$ac_exeext'
13832  { (eval echo "$as_me:13832: \"$ac_try\"") >&5
13833  (eval $ac_try) 2>&5
13834  ac_status=$?
13835  echo "$as_me:13835: \$? = $ac_status" >&5
13836  (exit $ac_status); }; }; then
13837  ac_cv_lib_pcre_pcre_compile=yes
13838else
13839  echo "$as_me: failed program was:" >&5
13840cat conftest.$ac_ext >&5
13841ac_cv_lib_pcre_pcre_compile=no
13842fi
13843rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13844LIBS=$ac_check_lib_save_LIBS
13845fi
13846echo "$as_me:13846: result: $ac_cv_lib_pcre_pcre_compile" >&5
13847echo "${ECHO_T}$ac_cv_lib_pcre_pcre_compile" >&6
13848if test $ac_cv_lib_pcre_pcre_compile = yes; then
13849  cat >>confdefs.h <<EOF
13850#define HAVE_LIBPCRE 1
13851EOF
13852
13853  LIBS="-lpcre $LIBS"
13854
13855else
13856  { { echo "$as_me:13856: error: Cannot find PCRE library" >&5
13857echo "$as_me: error: Cannot find PCRE library" >&2;}
13858   { (exit 1); exit 1; }; }
13859fi
13860
13861fi
13862
13863		cat >>confdefs.h <<\EOF
13864#define HAVE_LIB_PCRE 1
13865EOF
13866
13867		case $LIBS in #(vi
13868		*pcreposix*) #(vi
13869			;;
13870		*)
13871			echo "$as_me:13871: checking for pcreposix_regcomp in -lpcreposix" >&5
13872echo $ECHO_N "checking for pcreposix_regcomp in -lpcreposix... $ECHO_C" >&6
13873if test "${ac_cv_lib_pcreposix_pcreposix_regcomp+set}" = set; then
13874  echo $ECHO_N "(cached) $ECHO_C" >&6
13875else
13876  ac_check_lib_save_LIBS=$LIBS
13877LIBS="-lpcreposix  $LIBS"
13878cat >conftest.$ac_ext <<_ACEOF
13879#line 13879 "configure"
13880#include "confdefs.h"
13881
13882/* Override any gcc2 internal prototype to avoid an error.  */
13883#ifdef __cplusplus
13884extern "C"
13885#endif
13886/* We use char because int might match the return type of a gcc2
13887   builtin and then its argument prototype would still apply.  */
13888char pcreposix_regcomp ();
13889int
13890main ()
13891{
13892pcreposix_regcomp ();
13893  ;
13894  return 0;
13895}
13896_ACEOF
13897rm -f conftest.$ac_objext conftest$ac_exeext
13898if { (eval echo "$as_me:13898: \"$ac_link\"") >&5
13899  (eval $ac_link) 2>&5
13900  ac_status=$?
13901  echo "$as_me:13901: \$? = $ac_status" >&5
13902  (exit $ac_status); } &&
13903         { ac_try='test -s conftest$ac_exeext'
13904  { (eval echo "$as_me:13904: \"$ac_try\"") >&5
13905  (eval $ac_try) 2>&5
13906  ac_status=$?
13907  echo "$as_me:13907: \$? = $ac_status" >&5
13908  (exit $ac_status); }; }; then
13909  ac_cv_lib_pcreposix_pcreposix_regcomp=yes
13910else
13911  echo "$as_me: failed program was:" >&5
13912cat conftest.$ac_ext >&5
13913ac_cv_lib_pcreposix_pcreposix_regcomp=no
13914fi
13915rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13916LIBS=$ac_check_lib_save_LIBS
13917fi
13918echo "$as_me:13918: result: $ac_cv_lib_pcreposix_pcreposix_regcomp" >&5
13919echo "${ECHO_T}$ac_cv_lib_pcreposix_pcreposix_regcomp" >&6
13920if test $ac_cv_lib_pcreposix_pcreposix_regcomp = yes; then
13921  cat >>confdefs.h <<\EOF
13922#define HAVE_PCREPOSIX_H 1
13923EOF
13924
13925				 LIBS="-lpcreposix $LIBS"
13926else
13927  echo "$as_me:13927: checking for regcomp in -lpcreposix" >&5
13928echo $ECHO_N "checking for regcomp in -lpcreposix... $ECHO_C" >&6
13929if test "${ac_cv_lib_pcreposix_regcomp+set}" = set; then
13930  echo $ECHO_N "(cached) $ECHO_C" >&6
13931else
13932  ac_check_lib_save_LIBS=$LIBS
13933LIBS="-lpcreposix  $LIBS"
13934cat >conftest.$ac_ext <<_ACEOF
13935#line 13935 "configure"
13936#include "confdefs.h"
13937
13938/* Override any gcc2 internal prototype to avoid an error.  */
13939#ifdef __cplusplus
13940extern "C"
13941#endif
13942/* We use char because int might match the return type of a gcc2
13943   builtin and then its argument prototype would still apply.  */
13944char regcomp ();
13945int
13946main ()
13947{
13948regcomp ();
13949  ;
13950  return 0;
13951}
13952_ACEOF
13953rm -f conftest.$ac_objext conftest$ac_exeext
13954if { (eval echo "$as_me:13954: \"$ac_link\"") >&5
13955  (eval $ac_link) 2>&5
13956  ac_status=$?
13957  echo "$as_me:13957: \$? = $ac_status" >&5
13958  (exit $ac_status); } &&
13959         { ac_try='test -s conftest$ac_exeext'
13960  { (eval echo "$as_me:13960: \"$ac_try\"") >&5
13961  (eval $ac_try) 2>&5
13962  ac_status=$?
13963  echo "$as_me:13963: \$? = $ac_status" >&5
13964  (exit $ac_status); }; }; then
13965  ac_cv_lib_pcreposix_regcomp=yes
13966else
13967  echo "$as_me: failed program was:" >&5
13968cat conftest.$ac_ext >&5
13969ac_cv_lib_pcreposix_regcomp=no
13970fi
13971rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13972LIBS=$ac_check_lib_save_LIBS
13973fi
13974echo "$as_me:13974: result: $ac_cv_lib_pcreposix_regcomp" >&5
13975echo "${ECHO_T}$ac_cv_lib_pcreposix_regcomp" >&6
13976if test $ac_cv_lib_pcreposix_regcomp = yes; then
13977
13978					cat >>confdefs.h <<\EOF
13979#define HAVE_PCREPOSIX_H 1
13980EOF
13981
13982					LIBS="-lpcreposix $LIBS"
13983else
13984  { { echo "$as_me:13984: error: Cannot find PCRE POSIX library" >&5
13985echo "$as_me: error: Cannot find PCRE POSIX library" >&2;}
13986   { (exit 1); exit 1; }; }
13987fi
13988
13989fi
13990
13991			;;
13992		esac
13993fi
13994
13995	if test "$with_pcre" = no ; then
13996
13997cf_regex_func=no
13998
13999cf_regex_libs="regex re"
14000case $host_os in #(vi
14001mingw*)
14002	cf_regex_libs="regex.dll $cf_regex_libs"
14003	;;
14004esac
14005
14006echo "$as_me:14006: checking for regcomp" >&5
14007echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
14008if test "${ac_cv_func_regcomp+set}" = set; then
14009  echo $ECHO_N "(cached) $ECHO_C" >&6
14010else
14011  cat >conftest.$ac_ext <<_ACEOF
14012#line 14012 "configure"
14013#include "confdefs.h"
14014/* System header to define __stub macros and hopefully few prototypes,
14015    which can conflict with char regcomp (); below.  */
14016#include <assert.h>
14017/* Override any gcc2 internal prototype to avoid an error.  */
14018#ifdef __cplusplus
14019extern "C"
14020#endif
14021/* We use char because int might match the return type of a gcc2
14022   builtin and then its argument prototype would still apply.  */
14023char regcomp ();
14024char (*f) ();
14025
14026int
14027main ()
14028{
14029/* The GNU C library defines this for functions which it implements
14030    to always fail with ENOSYS.  Some functions are actually named
14031    something starting with __ and the normal name is an alias.  */
14032#if defined (__stub_regcomp) || defined (__stub___regcomp)
14033choke me
14034#else
14035f = regcomp;
14036#endif
14037
14038  ;
14039  return 0;
14040}
14041_ACEOF
14042rm -f conftest.$ac_objext conftest$ac_exeext
14043if { (eval echo "$as_me:14043: \"$ac_link\"") >&5
14044  (eval $ac_link) 2>&5
14045  ac_status=$?
14046  echo "$as_me:14046: \$? = $ac_status" >&5
14047  (exit $ac_status); } &&
14048         { ac_try='test -s conftest$ac_exeext'
14049  { (eval echo "$as_me:14049: \"$ac_try\"") >&5
14050  (eval $ac_try) 2>&5
14051  ac_status=$?
14052  echo "$as_me:14052: \$? = $ac_status" >&5
14053  (exit $ac_status); }; }; then
14054  ac_cv_func_regcomp=yes
14055else
14056  echo "$as_me: failed program was:" >&5
14057cat conftest.$ac_ext >&5
14058ac_cv_func_regcomp=no
14059fi
14060rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14061fi
14062echo "$as_me:14062: result: $ac_cv_func_regcomp" >&5
14063echo "${ECHO_T}$ac_cv_func_regcomp" >&6
14064if test $ac_cv_func_regcomp = yes; then
14065  cf_regex_func=regcomp
14066else
14067
14068	for cf_regex_lib in $cf_regex_libs
14069	do
14070		as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
14071echo "$as_me:14071: checking for regcomp in -l$cf_regex_lib" >&5
14072echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
14073if eval "test \"\${$as_ac_Lib+set}\" = set"; then
14074  echo $ECHO_N "(cached) $ECHO_C" >&6
14075else
14076  ac_check_lib_save_LIBS=$LIBS
14077LIBS="-l$cf_regex_lib  $LIBS"
14078cat >conftest.$ac_ext <<_ACEOF
14079#line 14079 "configure"
14080#include "confdefs.h"
14081
14082/* Override any gcc2 internal prototype to avoid an error.  */
14083#ifdef __cplusplus
14084extern "C"
14085#endif
14086/* We use char because int might match the return type of a gcc2
14087   builtin and then its argument prototype would still apply.  */
14088char regcomp ();
14089int
14090main ()
14091{
14092regcomp ();
14093  ;
14094  return 0;
14095}
14096_ACEOF
14097rm -f conftest.$ac_objext conftest$ac_exeext
14098if { (eval echo "$as_me:14098: \"$ac_link\"") >&5
14099  (eval $ac_link) 2>&5
14100  ac_status=$?
14101  echo "$as_me:14101: \$? = $ac_status" >&5
14102  (exit $ac_status); } &&
14103         { ac_try='test -s conftest$ac_exeext'
14104  { (eval echo "$as_me:14104: \"$ac_try\"") >&5
14105  (eval $ac_try) 2>&5
14106  ac_status=$?
14107  echo "$as_me:14107: \$? = $ac_status" >&5
14108  (exit $ac_status); }; }; then
14109  eval "$as_ac_Lib=yes"
14110else
14111  echo "$as_me: failed program was:" >&5
14112cat conftest.$ac_ext >&5
14113eval "$as_ac_Lib=no"
14114fi
14115rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14116LIBS=$ac_check_lib_save_LIBS
14117fi
14118echo "$as_me:14118: result: `eval echo '${'$as_ac_Lib'}'`" >&5
14119echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
14120if test `eval echo '${'$as_ac_Lib'}'` = yes; then
14121
14122				LIBS="-l$cf_regex_lib $LIBS"
14123				cf_regex_func=regcomp
14124				break
14125fi
14126
14127	done
14128
14129fi
14130
14131if test "$cf_regex_func" = no ; then
14132	echo "$as_me:14132: checking for compile" >&5
14133echo $ECHO_N "checking for compile... $ECHO_C" >&6
14134if test "${ac_cv_func_compile+set}" = set; then
14135  echo $ECHO_N "(cached) $ECHO_C" >&6
14136else
14137  cat >conftest.$ac_ext <<_ACEOF
14138#line 14138 "configure"
14139#include "confdefs.h"
14140/* System header to define __stub macros and hopefully few prototypes,
14141    which can conflict with char compile (); below.  */
14142#include <assert.h>
14143/* Override any gcc2 internal prototype to avoid an error.  */
14144#ifdef __cplusplus
14145extern "C"
14146#endif
14147/* We use char because int might match the return type of a gcc2
14148   builtin and then its argument prototype would still apply.  */
14149char compile ();
14150char (*f) ();
14151
14152int
14153main ()
14154{
14155/* The GNU C library defines this for functions which it implements
14156    to always fail with ENOSYS.  Some functions are actually named
14157    something starting with __ and the normal name is an alias.  */
14158#if defined (__stub_compile) || defined (__stub___compile)
14159choke me
14160#else
14161f = compile;
14162#endif
14163
14164  ;
14165  return 0;
14166}
14167_ACEOF
14168rm -f conftest.$ac_objext conftest$ac_exeext
14169if { (eval echo "$as_me:14169: \"$ac_link\"") >&5
14170  (eval $ac_link) 2>&5
14171  ac_status=$?
14172  echo "$as_me:14172: \$? = $ac_status" >&5
14173  (exit $ac_status); } &&
14174         { ac_try='test -s conftest$ac_exeext'
14175  { (eval echo "$as_me:14175: \"$ac_try\"") >&5
14176  (eval $ac_try) 2>&5
14177  ac_status=$?
14178  echo "$as_me:14178: \$? = $ac_status" >&5
14179  (exit $ac_status); }; }; then
14180  ac_cv_func_compile=yes
14181else
14182  echo "$as_me: failed program was:" >&5
14183cat conftest.$ac_ext >&5
14184ac_cv_func_compile=no
14185fi
14186rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14187fi
14188echo "$as_me:14188: result: $ac_cv_func_compile" >&5
14189echo "${ECHO_T}$ac_cv_func_compile" >&6
14190if test $ac_cv_func_compile = yes; then
14191  cf_regex_func=compile
14192else
14193
14194		echo "$as_me:14194: checking for compile in -lgen" >&5
14195echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
14196if test "${ac_cv_lib_gen_compile+set}" = set; then
14197  echo $ECHO_N "(cached) $ECHO_C" >&6
14198else
14199  ac_check_lib_save_LIBS=$LIBS
14200LIBS="-lgen  $LIBS"
14201cat >conftest.$ac_ext <<_ACEOF
14202#line 14202 "configure"
14203#include "confdefs.h"
14204
14205/* Override any gcc2 internal prototype to avoid an error.  */
14206#ifdef __cplusplus
14207extern "C"
14208#endif
14209/* We use char because int might match the return type of a gcc2
14210   builtin and then its argument prototype would still apply.  */
14211char compile ();
14212int
14213main ()
14214{
14215compile ();
14216  ;
14217  return 0;
14218}
14219_ACEOF
14220rm -f conftest.$ac_objext conftest$ac_exeext
14221if { (eval echo "$as_me:14221: \"$ac_link\"") >&5
14222  (eval $ac_link) 2>&5
14223  ac_status=$?
14224  echo "$as_me:14224: \$? = $ac_status" >&5
14225  (exit $ac_status); } &&
14226         { ac_try='test -s conftest$ac_exeext'
14227  { (eval echo "$as_me:14227: \"$ac_try\"") >&5
14228  (eval $ac_try) 2>&5
14229  ac_status=$?
14230  echo "$as_me:14230: \$? = $ac_status" >&5
14231  (exit $ac_status); }; }; then
14232  ac_cv_lib_gen_compile=yes
14233else
14234  echo "$as_me: failed program was:" >&5
14235cat conftest.$ac_ext >&5
14236ac_cv_lib_gen_compile=no
14237fi
14238rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14239LIBS=$ac_check_lib_save_LIBS
14240fi
14241echo "$as_me:14241: result: $ac_cv_lib_gen_compile" >&5
14242echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
14243if test $ac_cv_lib_gen_compile = yes; then
14244
14245				LIBS="-lgen $LIBS"
14246				cf_regex_func=compile
14247fi
14248
14249fi
14250
14251fi
14252
14253if test "$cf_regex_func" = no ; then
14254	{ echo "$as_me:14254: WARNING: cannot find regular expression library" >&5
14255echo "$as_me: WARNING: cannot find regular expression library" >&2;}
14256fi
14257
14258echo "$as_me:14258: checking for regular-expression headers" >&5
14259echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
14260if test "${cf_cv_regex_hdrs+set}" = set; then
14261  echo $ECHO_N "(cached) $ECHO_C" >&6
14262else
14263
14264cf_cv_regex_hdrs=no
14265case $cf_regex_func in #(vi
14266compile) #(vi
14267	for cf_regex_hdr in regexp.h regexpr.h
14268	do
14269		cat >conftest.$ac_ext <<_ACEOF
14270#line 14270 "configure"
14271#include "confdefs.h"
14272#include <$cf_regex_hdr>
14273int
14274main ()
14275{
14276
14277			char *p = compile("", "", "", 0);
14278			int x = step("", "");
14279
14280  ;
14281  return 0;
14282}
14283_ACEOF
14284rm -f conftest.$ac_objext conftest$ac_exeext
14285if { (eval echo "$as_me:14285: \"$ac_link\"") >&5
14286  (eval $ac_link) 2>&5
14287  ac_status=$?
14288  echo "$as_me:14288: \$? = $ac_status" >&5
14289  (exit $ac_status); } &&
14290         { ac_try='test -s conftest$ac_exeext'
14291  { (eval echo "$as_me:14291: \"$ac_try\"") >&5
14292  (eval $ac_try) 2>&5
14293  ac_status=$?
14294  echo "$as_me:14294: \$? = $ac_status" >&5
14295  (exit $ac_status); }; }; then
14296
14297			cf_cv_regex_hdrs=$cf_regex_hdr
14298			break
14299
14300else
14301  echo "$as_me: failed program was:" >&5
14302cat conftest.$ac_ext >&5
14303fi
14304rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14305	done
14306	;;
14307*)
14308	for cf_regex_hdr in regex.h
14309	do
14310		cat >conftest.$ac_ext <<_ACEOF
14311#line 14311 "configure"
14312#include "confdefs.h"
14313#include <sys/types.h>
14314#include <$cf_regex_hdr>
14315int
14316main ()
14317{
14318
14319			regex_t *p;
14320			int x = regcomp(p, "", 0);
14321			int y = regexec(p, "", 0, 0, 0);
14322			regfree(p);
14323
14324  ;
14325  return 0;
14326}
14327_ACEOF
14328rm -f conftest.$ac_objext conftest$ac_exeext
14329if { (eval echo "$as_me:14329: \"$ac_link\"") >&5
14330  (eval $ac_link) 2>&5
14331  ac_status=$?
14332  echo "$as_me:14332: \$? = $ac_status" >&5
14333  (exit $ac_status); } &&
14334         { ac_try='test -s conftest$ac_exeext'
14335  { (eval echo "$as_me:14335: \"$ac_try\"") >&5
14336  (eval $ac_try) 2>&5
14337  ac_status=$?
14338  echo "$as_me:14338: \$? = $ac_status" >&5
14339  (exit $ac_status); }; }; then
14340
14341			cf_cv_regex_hdrs=$cf_regex_hdr
14342			break
14343
14344else
14345  echo "$as_me: failed program was:" >&5
14346cat conftest.$ac_ext >&5
14347fi
14348rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14349	done
14350	;;
14351esac
14352
14353fi
14354echo "$as_me:14354: result: $cf_cv_regex_hdrs" >&5
14355echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
14356
14357case $cf_cv_regex_hdrs in #(vi
14358    no)	       { echo "$as_me:14358: WARNING: no regular expression header found" >&5
14359echo "$as_me: WARNING: no regular expression header found" >&2;} ;; #(vi
14360    regex.h)   cat >>confdefs.h <<\EOF
14361#define HAVE_REGEX_H_FUNCS 1
14362EOF
14363 ;; #(vi
14364    regexp.h)  cat >>confdefs.h <<\EOF
14365#define HAVE_REGEXP_H_FUNCS 1
14366EOF
14367 ;; #(vi
14368    regexpr.h) cat >>confdefs.h <<\EOF
14369#define HAVE_REGEXPR_H_FUNCS 1
14370EOF
14371 ;;
14372esac
14373
14374		if test "X$cf_cv_regex_hdrs" != "Xregex.h" ; then
14375			{ { echo "$as_me:14375: error: Only POSIX or PCRE regular expressions are supported" >&5
14376echo "$as_me: error: Only POSIX or PCRE regular expressions are supported" >&2;}
14377   { (exit 1); exit 1; }; }
14378		fi
14379	fi
14380	cat >>confdefs.h <<\EOF
14381#define OPT_SELECT_REGEX 1
14382EOF
14383
14384fi
14385
14386echo "$as_me:14386: checking if you want support for right-scrollbar" >&5
14387echo $ECHO_N "checking if you want support for right-scrollbar... $ECHO_C" >&6
14388
14389# Check whether --enable-rightbar or --disable-rightbar was given.
14390if test "${enable_rightbar+set}" = set; then
14391  enableval="$enable_rightbar"
14392  test "$enableval" != no && enableval=yes
14393  if test "$enableval" != "yes" ; then
14394    enable_rightbar=no
14395  else
14396    enable_rightbar=yes
14397  fi
14398else
14399  enableval=yes
14400  enable_rightbar=yes
14401
14402fi;
14403echo "$as_me:14403: result: $enable_rightbar" >&5
14404echo "${ECHO_T}$enable_rightbar" >&6
14405if test "$enable_rightbar" = yes ; then
14406	cat >>confdefs.h <<\EOF
14407#define SCROLLBAR_RIGHT 1
14408EOF
14409
14410fi
14411
14412echo "$as_me:14412: checking if you want check for redundant name-change" >&5
14413echo $ECHO_N "checking if you want check for redundant name-change... $ECHO_C" >&6
14414
14415# Check whether --enable-samename or --disable-samename was given.
14416if test "${enable_samename+set}" = set; then
14417  enableval="$enable_samename"
14418  test "$enableval" != no && enableval=yes
14419  if test "$enableval" != "yes" ; then
14420    enable_samename=no
14421  else
14422    enable_samename=yes
14423  fi
14424else
14425  enableval=yes
14426  enable_samename=yes
14427
14428fi;
14429echo "$as_me:14429: result: $enable_samename" >&5
14430echo "${ECHO_T}$enable_samename" >&6
14431test "$enable_samename" = no && cat >>confdefs.h <<\EOF
14432#define OPT_SAME_NAME 0
14433EOF
14434
14435echo "$as_me:14435: checking if you want support for session management" >&5
14436echo $ECHO_N "checking if you want support for session management... $ECHO_C" >&6
14437
14438# Check whether --enable-session-mgt or --disable-session-mgt was given.
14439if test "${enable_session_mgt+set}" = set; then
14440  enableval="$enable_session_mgt"
14441  test "$enableval" != no && enableval=yes
14442  if test "$enableval" != "yes" ; then
14443    enable_session_mgt=no
14444  else
14445    enable_session_mgt=yes
14446  fi
14447else
14448  enableval=yes
14449  enable_session_mgt=yes
14450
14451fi;
14452echo "$as_me:14452: result: $enable_session_mgt" >&5
14453echo "${ECHO_T}$enable_session_mgt" >&6
14454test "$enable_session_mgt" = no && cat >>confdefs.h <<\EOF
14455#define OPT_SESSION_MGT 0
14456EOF
14457
14458echo "$as_me:14458: checking if you want to use termcap function-keys" >&5
14459echo $ECHO_N "checking if you want to use termcap function-keys... $ECHO_C" >&6
14460
14461# Check whether --enable-tcap-fkeys or --disable-tcap-fkeys was given.
14462if test "${enable_tcap_fkeys+set}" = set; then
14463  enableval="$enable_tcap_fkeys"
14464  test "$enableval" != no && enableval=yes
14465  if test "$enableval" != "yes" ; then
14466    enable_tcap_fkeys=no
14467  else
14468    enable_tcap_fkeys=yes
14469  fi
14470else
14471  enableval=yes
14472  enable_tcap_fkeys=yes
14473
14474fi;
14475echo "$as_me:14475: result: $enable_tcap_fkeys" >&5
14476echo "${ECHO_T}$enable_tcap_fkeys" >&6
14477test "$enable_tcap_fkeys" = yes && cat >>confdefs.h <<\EOF
14478#define OPT_TCAP_FKEYS 1
14479EOF
14480
14481echo "$as_me:14481: checking if you want to use termcap-query/report" >&5
14482echo $ECHO_N "checking if you want to use termcap-query/report... $ECHO_C" >&6
14483
14484# Check whether --enable-tcap-query or --disable-tcap-query was given.
14485if test "${enable_tcap_query+set}" = set; then
14486  enableval="$enable_tcap_query"
14487  test "$enableval" != no && enableval=yes
14488  if test "$enableval" != "yes" ; then
14489    enable_tcap_query=no
14490  else
14491    enable_tcap_query=yes
14492  fi
14493else
14494  enableval=yes
14495  enable_tcap_query=yes
14496
14497fi;
14498echo "$as_me:14498: result: $enable_tcap_query" >&5
14499echo "${ECHO_T}$enable_tcap_query" >&6
14500test "$enable_tcap_query" = yes && cat >>confdefs.h <<\EOF
14501#define OPT_TCAP_QUERY 1
14502EOF
14503
14504echo "$as_me:14504: checking if you want support for tek4014" >&5
14505echo $ECHO_N "checking if you want support for tek4014... $ECHO_C" >&6
14506
14507# Check whether --enable-tek4014 or --disable-tek4014 was given.
14508if test "${enable_tek4014+set}" = set; then
14509  enableval="$enable_tek4014"
14510  test "$enableval" != no && enableval=yes
14511  if test "$enableval" != "yes" ; then
14512    enable_tek4014=no
14513  else
14514    enable_tek4014=yes
14515  fi
14516else
14517  enableval=yes
14518  enable_tek4014=yes
14519
14520fi;
14521echo "$as_me:14521: result: $enable_tek4014" >&5
14522echo "${ECHO_T}$enable_tek4014" >&6
14523if test "$enable_tek4014" = no ; then
14524	cat >>confdefs.h <<\EOF
14525#define OPT_TEK4014 0
14526EOF
14527
14528else
14529	EXTRAHDRS="$EXTRAHDRS Tekparse.h"
14530	EXTRASRCS="$EXTRASRCS TekPrsTbl.c Tekproc.c"
14531	EXTRAOBJS="$EXTRAOBJS TekPrsTbl.o Tekproc.o"
14532fi
14533
14534echo "$as_me:14534: checking if you want pulldown menus with a toolbar" >&5
14535echo $ECHO_N "checking if you want pulldown menus with a toolbar... $ECHO_C" >&6
14536
14537# Check whether --enable-toolbar or --disable-toolbar was given.
14538if test "${enable_toolbar+set}" = set; then
14539  enableval="$enable_toolbar"
14540  test "$enableval" != yes && enableval=no
14541  if test "$enableval" != "no" ; then
14542    enable_toolbar=yes
14543  else
14544    enable_toolbar=no
14545  fi
14546else
14547  enableval=no
14548  enable_toolbar=no
14549
14550fi;
14551echo "$as_me:14551: result: $enable_toolbar" >&5
14552echo "${ECHO_T}$enable_toolbar" >&6
14553if test "$enable_toolbar" = yes ; then
14554	cat >>confdefs.h <<\EOF
14555#define OPT_TOOLBAR 1
14556EOF
14557
14558fi
14559
14560echo "$as_me:14560: checking if you want VT52 emulation" >&5
14561echo $ECHO_N "checking if you want VT52 emulation... $ECHO_C" >&6
14562
14563# Check whether --enable-vt52 or --disable-vt52 was given.
14564if test "${enable_vt52+set}" = set; then
14565  enableval="$enable_vt52"
14566  test "$enableval" != no && enableval=yes
14567  if test "$enableval" != "yes" ; then
14568    enable_vt52=no
14569  else
14570    enable_vt52=yes
14571  fi
14572else
14573  enableval=yes
14574  enable_vt52=yes
14575
14576fi;
14577echo "$as_me:14577: result: $enable_vt52" >&5
14578echo "${ECHO_T}$enable_vt52" >&6
14579test "$enable_vt52" = no && cat >>confdefs.h <<\EOF
14580#define OPT_VT52_MODE 0
14581EOF
14582
14583echo "$as_me:14583: checking if you want to use mini-luit/Latin9 built-in support" >&5
14584echo $ECHO_N "checking if you want to use mini-luit/Latin9 built-in support... $ECHO_C" >&6
14585
14586# Check whether --enable-mini-luit or --disable-mini-luit was given.
14587if test "${enable_mini_luit+set}" = set; then
14588  enableval="$enable_mini_luit"
14589  test "$enableval" != yes && enableval=no
14590  if test "$enableval" != "no" ; then
14591    enable_mini_luit=yes
14592  else
14593    enable_mini_luit=no
14594  fi
14595else
14596  enableval=no
14597  enable_mini_luit=no
14598
14599fi;
14600echo "$as_me:14600: result: $enable_mini_luit" >&5
14601echo "${ECHO_T}$enable_mini_luit" >&6
14602if test "$enable_mini_luit" = yes ; then
14603	cat >>confdefs.h <<\EOF
14604#define OPT_MINI_LUIT 1
14605EOF
14606
14607fi
14608
14609echo "$as_me:14609: checking if you want to use luit" >&5
14610echo $ECHO_N "checking if you want to use luit... $ECHO_C" >&6
14611
14612# Check whether --enable-luit or --disable-luit was given.
14613if test "${enable_luit+set}" = set; then
14614  enableval="$enable_luit"
14615  test "$enableval" != yes && enableval=no
14616  if test "$enableval" != "no" ; then
14617    enable_luit=yes
14618  else
14619    enable_luit=$enable_mini_luit
14620  fi
14621else
14622  enableval=no
14623  enable_luit=$enable_mini_luit
14624
14625fi;
14626echo "$as_me:14626: result: $enable_luit" >&5
14627echo "${ECHO_T}$enable_luit" >&6
14628if test "$enable_luit" = yes ; then
14629	cat >>confdefs.h <<\EOF
14630#define OPT_LUIT_PROG 1
14631EOF
14632
14633test -z "$LUIT" && LUIT=xterm-filter
14634for ac_prog in $LUIT xterm-filter bluit luit
14635do
14636  # Extract the first word of "$ac_prog", so it can be a program name with args.
14637set dummy $ac_prog; ac_word=$2
14638echo "$as_me:14638: checking for $ac_word" >&5
14639echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
14640if test "${ac_cv_path_LUIT+set}" = set; then
14641  echo $ECHO_N "(cached) $ECHO_C" >&6
14642else
14643  case $LUIT in
14644  [\\/]* | ?:[\\/]*)
14645  ac_cv_path_LUIT="$LUIT" # Let the user override the test with a path.
14646  ;;
14647  *)
14648  ac_save_IFS=$IFS; IFS=$ac_path_separator
14649ac_dummy="$PATH"
14650for ac_dir in $ac_dummy; do
14651  IFS=$ac_save_IFS
14652  test -z "$ac_dir" && ac_dir=.
14653  if $as_executable_p "$ac_dir/$ac_word"; then
14654   ac_cv_path_LUIT="$ac_dir/$ac_word"
14655   echo "$as_me:14655: found $ac_dir/$ac_word" >&5
14656   break
14657fi
14658done
14659
14660  ;;
14661esac
14662fi
14663LUIT=$ac_cv_path_LUIT
14664
14665if test -n "$LUIT"; then
14666  echo "$as_me:14666: result: $LUIT" >&5
14667echo "${ECHO_T}$LUIT" >&6
14668else
14669  echo "$as_me:14669: result: no" >&5
14670echo "${ECHO_T}no" >&6
14671fi
14672
14673  test -n "$LUIT" && break
14674done
14675test -n "$LUIT" || LUIT="$LUIT"
14676
14677cf_path_prog=""
14678cf_path_args=""
14679IFS="${IFS:- 	}"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
14680for cf_temp in $ac_cv_path_LUIT
14681do
14682	if test -z "$cf_path_prog" ; then
14683		if test "$with_full_paths" = yes ; then
14684
14685if test "x$prefix" != xNONE; then
14686  cf_path_syntax="$prefix"
14687else
14688  cf_path_syntax="$ac_default_prefix"
14689fi
14690
14691case ".$cf_temp" in #(vi
14692.\$\(*\)*|.\'*\'*) #(vi
14693  ;;
14694..|./*|.\\*) #(vi
14695  ;;
14696.[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
14697  ;;
14698.\${*prefix}*) #(vi
14699  eval cf_temp="$cf_temp"
14700  case ".$cf_temp" in #(vi
14701  .NONE/*)
14702    cf_temp=`echo $cf_temp | sed -e s%NONE%$cf_path_syntax%`
14703    ;;
14704  esac
14705  ;; #(vi
14706.no|.NONE/*)
14707  cf_temp=`echo $cf_temp | sed -e s%NONE%$cf_path_syntax%`
14708  ;;
14709*)
14710  break
14711  ;;
14712esac
14713
14714			cf_path_prog="$cf_temp"
14715		else
14716			cf_path_prog="`basename $cf_temp`"
14717		fi
14718	elif test -z "$cf_path_args" ; then
14719		cf_path_args="$cf_temp"
14720	else
14721		cf_path_args="$cf_path_args $cf_temp"
14722	fi
14723done
14724IFS="$cf_save_ifs"
14725
14726if test -n "$cf_path_prog" ; then
14727
14728echo "${as_me:-configure}:14728: testing defining path for ${cf_path_prog} ..." 1>&5
14729
14730	cat >>confdefs.h <<EOF
14731#define LUIT_PATH "$cf_path_prog"
14732EOF
14733
14734	test -n "$cf_path_args" && cat >>confdefs.h <<EOF
14735#define LUIT_ARGS "$cf_path_args"
14736EOF
14737
14738fi
14739
14740fi
14741
14742echo "$as_me:14742: checking if you want wide-character support" >&5
14743echo $ECHO_N "checking if you want wide-character support... $ECHO_C" >&6
14744
14745# Check whether --enable-wide-chars or --disable-wide-chars was given.
14746if test "${enable_wide_chars+set}" = set; then
14747  enableval="$enable_wide_chars"
14748  test "$enableval" != no && enableval=yes
14749  if test "$enableval" != "$enable_luit" ; then
14750    enable_wchar=yes
14751  else
14752    enable_wchar=$enable_luit
14753  fi
14754else
14755  enableval=$enable_luit
14756  enable_wchar=$enable_luit
14757
14758fi;
14759echo "$as_me:14759: result: $enable_wchar" >&5
14760echo "${ECHO_T}$enable_wchar" >&6
14761
14762echo "$as_me:14762: checking if you want only 16-bit character support" >&5
14763echo $ECHO_N "checking if you want only 16-bit character support... $ECHO_C" >&6
14764
14765# Check whether --enable-16bit-chars or --disable-16bit-chars was given.
14766if test "${enable_16bit_chars+set}" = set; then
14767  enableval="$enable_16bit_chars"
14768  test "$enableval" != yes && enableval=no
14769  if test "$enableval" != "no" ; then
14770    enable_16bit_chars=yes
14771  else
14772    enable_16bit_chars=no
14773  fi
14774else
14775  enableval=no
14776  enable_16bit_chars=no
14777
14778fi;
14779echo "$as_me:14779: result: $enable_16bit_chars" >&5
14780echo "${ECHO_T}$enable_16bit_chars" >&6
14781
14782if test "$enable_16bit_chars" = yes ; then
14783	cat >>confdefs.h <<\EOF
14784#define OPT_WIDER_ICHAR 0
14785EOF
14786
14787	enable_wchar=yes
14788fi
14789
14790if test "$enable_wchar" = yes ; then
14791	cat >>confdefs.h <<\EOF
14792#define OPT_WIDE_CHARS 1
14793EOF
14794
14795	EXTRAHDRS="$EXTRAHDRS charclass.h precompose.h wcwidth.h"
14796	EXTRASRCS="$EXTRASRCS charclass.c precompose.c wcwidth.c"
14797	EXTRAOBJS="$EXTRAOBJS charclass.o precompose.o wcwidth.o"
14798fi
14799
14800echo "$as_me:14800: checking if you want dynamic-abbreviation support" >&5
14801echo $ECHO_N "checking if you want dynamic-abbreviation support... $ECHO_C" >&6
14802
14803# Check whether --enable-dabbrev or --disable-dabbrev was given.
14804if test "${enable_dabbrev+set}" = set; then
14805  enableval="$enable_dabbrev"
14806  test "$enableval" != yes && enableval=no
14807  if test "$enableval" != "no" ; then
14808    enable_dabbrev=yes
14809  else
14810    enable_dabbrev=no
14811  fi
14812else
14813  enableval=no
14814  enable_dabbrev=no
14815
14816fi;
14817echo "$as_me:14817: result: $enable_dabbrev" >&5
14818echo "${ECHO_T}$enable_dabbrev" >&6
14819if test "$enable_dabbrev" = yes ; then
14820	cat >>confdefs.h <<\EOF
14821#define OPT_DABBREV 1
14822EOF
14823
14824fi
14825
14826echo "$as_me:14826: checking if you want DECterm Locator support" >&5
14827echo $ECHO_N "checking if you want DECterm Locator support... $ECHO_C" >&6
14828
14829# Check whether --enable-dec-locator or --disable-dec-locator was given.
14830if test "${enable_dec_locator+set}" = set; then
14831  enableval="$enable_dec_locator"
14832  test "$enableval" != yes && enableval=no
14833  if test "$enableval" != "no" ; then
14834    enable_dec_locator=yes
14835  else
14836    enable_dec_locator=no
14837  fi
14838else
14839  enableval=no
14840  enable_dec_locator=no
14841
14842fi;
14843echo "$as_me:14843: result: $enable_dec_locator" >&5
14844echo "${ECHO_T}$enable_dec_locator" >&6
14845if test "$enable_dec_locator" = yes ; then
14846	cat >>confdefs.h <<\EOF
14847#define OPT_DEC_LOCATOR 1
14848EOF
14849
14850fi
14851
14852echo "$as_me:14852: checking if you want VT420 rectangle support" >&5
14853echo $ECHO_N "checking if you want VT420 rectangle support... $ECHO_C" >&6
14854
14855# Check whether --enable-rectangles or --disable-rectangles was given.
14856if test "${enable_rectangles+set}" = set; then
14857  enableval="$enable_rectangles"
14858  test "$enableval" != no && enableval=yes
14859  if test "$enableval" != "yes" ; then
14860    enable_rectangles=no
14861  else
14862    enable_rectangles=yes
14863  fi
14864else
14865  enableval=yes
14866  enable_rectangles=yes
14867
14868fi;
14869echo "$as_me:14869: result: $enable_rectangles" >&5
14870echo "${ECHO_T}$enable_rectangles" >&6
14871if test "$enable_rectangles" = yes ; then
14872	cat >>confdefs.h <<\EOF
14873#define OPT_DEC_RECTOPS 1
14874EOF
14875
14876fi
14877
14878echo "$as_me:14878: checking if you want -ziconbeep option" >&5
14879echo $ECHO_N "checking if you want -ziconbeep option... $ECHO_C" >&6
14880
14881# Check whether --enable-ziconbeep or --disable-ziconbeep was given.
14882if test "${enable_ziconbeep+set}" = set; then
14883  enableval="$enable_ziconbeep"
14884  test "$enableval" != no && enableval=yes
14885  if test "$enableval" != "yes" ; then
14886    enable_ziconbeep=no
14887  else
14888    enable_ziconbeep=yes
14889  fi
14890else
14891  enableval=yes
14892  enable_ziconbeep=yes
14893
14894fi;
14895echo "$as_me:14895: result: $enable_ziconbeep" >&5
14896echo "${ECHO_T}$enable_ziconbeep" >&6
14897test "$enable_ziconbeep" = no && cat >>confdefs.h <<\EOF
14898#define OPT_ZICONBEEP 0
14899EOF
14900
14901###############################################################################
14902
14903echo "$as_me:14903: checking if you want debugging traces" >&5
14904echo $ECHO_N "checking if you want debugging traces... $ECHO_C" >&6
14905
14906# Check whether --enable-trace or --disable-trace was given.
14907if test "${enable_trace+set}" = set; then
14908  enableval="$enable_trace"
14909  test "$enableval" != yes && enableval=no
14910  if test "$enableval" != "no" ; then
14911    enable_trace=yes
14912  else
14913    enable_trace=no
14914  fi
14915else
14916  enableval=no
14917  enable_trace=no
14918
14919fi;
14920echo "$as_me:14920: result: $enable_trace" >&5
14921echo "${ECHO_T}$enable_trace" >&6
14922if test "$enable_trace" = yes ; then
14923	cat >>confdefs.h <<\EOF
14924#define OPT_TRACE 1
14925EOF
14926
14927	EXTRASRCS="$EXTRASRCS trace.c"
14928	EXTRAOBJS="$EXTRAOBJS trace.o"
14929fi
14930
14931echo "$as_me:14931: checking if you want to test memory leaks" >&5
14932echo $ECHO_N "checking if you want to test memory leaks... $ECHO_C" >&6
14933
14934# Check whether --enable-leaks or --disable-leaks was given.
14935if test "${enable_leaks+set}" = set; then
14936  enableval="$enable_leaks"
14937  test "$enableval" != no && enableval=yes
14938  if test "$enableval" != "yes" ; then
14939    disable_leaks=yes
14940  else
14941    disable_leaks=no
14942  fi
14943else
14944  enableval=yes
14945  disable_leaks=no
14946
14947fi;
14948echo "$as_me:14948: result: $disable_leaks" >&5
14949echo "${ECHO_T}$disable_leaks" >&6
14950if test "$disable_leaks" = yes ; then
14951	cat >>confdefs.h <<\EOF
14952#define NO_LEAKS 1
14953EOF
14954
14955fi
14956
14957echo "$as_me:14957: checking if you want to see long compiling messages" >&5
14958echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
14959
14960# Check whether --enable-echo or --disable-echo was given.
14961if test "${enable_echo+set}" = set; then
14962  enableval="$enable_echo"
14963  test "$enableval" != no && enableval=yes
14964  if test "$enableval" != "yes" ; then
14965
14966    ECHO_LT='--silent'
14967    ECHO_LD='@echo linking $@;'
14968    RULE_CC='@echo compiling $<'
14969    SHOW_CC='@echo compiling $@'
14970    ECHO_CC='@'
14971
14972  else
14973
14974    ECHO_LT=''
14975    ECHO_LD=''
14976    RULE_CC=''
14977    SHOW_CC=''
14978    ECHO_CC=''
14979
14980  fi
14981else
14982  enableval=yes
14983
14984    ECHO_LT=''
14985    ECHO_LD=''
14986    RULE_CC=''
14987    SHOW_CC=''
14988    ECHO_CC=''
14989
14990fi;
14991echo "$as_me:14991: result: $enableval" >&5
14992echo "${ECHO_T}$enableval" >&6
14993
14994echo "$as_me:14994: checking if you want magic cookie emulation" >&5
14995echo $ECHO_N "checking if you want magic cookie emulation... $ECHO_C" >&6
14996
14997# Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
14998if test "${enable_xmc_glitch+set}" = set; then
14999  enableval="$enable_xmc_glitch"
15000  test "$enableval" != yes && enableval=no
15001  if test "$enableval" != "no" ; then
15002    enable_xmc=yes
15003  else
15004    enable_xmc=no
15005  fi
15006else
15007  enableval=no
15008  enable_xmc=no
15009
15010fi;
15011echo "$as_me:15011: result: $enable_xmc" >&5
15012echo "${ECHO_T}$enable_xmc" >&6
15013if test "$enable_xmc" = yes ; then
15014	cat >>confdefs.h <<\EOF
15015#define OPT_XMC_GLITCH 1
15016EOF
15017
15018	EXTRASRCS="$EXTRASRCS testxmc.c"
15019	EXTRAOBJS="$EXTRAOBJS testxmc.o"
15020fi
15021
15022for ac_func in tigetstr
15023do
15024as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15025echo "$as_me:15025: checking for $ac_func" >&5
15026echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15027if eval "test \"\${$as_ac_var+set}\" = set"; then
15028  echo $ECHO_N "(cached) $ECHO_C" >&6
15029else
15030  cat >conftest.$ac_ext <<_ACEOF
15031#line 15031 "configure"
15032#include "confdefs.h"
15033/* System header to define __stub macros and hopefully few prototypes,
15034    which can conflict with char $ac_func (); below.  */
15035#include <assert.h>
15036/* Override any gcc2 internal prototype to avoid an error.  */
15037#ifdef __cplusplus
15038extern "C"
15039#endif
15040/* We use char because int might match the return type of a gcc2
15041   builtin and then its argument prototype would still apply.  */
15042char $ac_func ();
15043char (*f) ();
15044
15045int
15046main ()
15047{
15048/* The GNU C library defines this for functions which it implements
15049    to always fail with ENOSYS.  Some functions are actually named
15050    something starting with __ and the normal name is an alias.  */
15051#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15052choke me
15053#else
15054f = $ac_func;
15055#endif
15056
15057  ;
15058  return 0;
15059}
15060_ACEOF
15061rm -f conftest.$ac_objext conftest$ac_exeext
15062if { (eval echo "$as_me:15062: \"$ac_link\"") >&5
15063  (eval $ac_link) 2>&5
15064  ac_status=$?
15065  echo "$as_me:15065: \$? = $ac_status" >&5
15066  (exit $ac_status); } &&
15067         { ac_try='test -s conftest$ac_exeext'
15068  { (eval echo "$as_me:15068: \"$ac_try\"") >&5
15069  (eval $ac_try) 2>&5
15070  ac_status=$?
15071  echo "$as_me:15071: \$? = $ac_status" >&5
15072  (exit $ac_status); }; }; then
15073  eval "$as_ac_var=yes"
15074else
15075  echo "$as_me: failed program was:" >&5
15076cat conftest.$ac_ext >&5
15077eval "$as_ac_var=no"
15078fi
15079rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15080fi
15081echo "$as_me:15081: result: `eval echo '${'$as_ac_var'}'`" >&5
15082echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15083if test `eval echo '${'$as_ac_var'}'` = yes; then
15084  cat >>confdefs.h <<EOF
15085#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15086EOF
15087
15088fi
15089done
15090
15091if test -n "$cf_cv_lib_part_tgetent"; then
15092
15093for ac_func in use_extended_names
15094do
15095as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15096echo "$as_me:15096: checking for $ac_func" >&5
15097echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15098if eval "test \"\${$as_ac_var+set}\" = set"; then
15099  echo $ECHO_N "(cached) $ECHO_C" >&6
15100else
15101  cat >conftest.$ac_ext <<_ACEOF
15102#line 15102 "configure"
15103#include "confdefs.h"
15104/* System header to define __stub macros and hopefully few prototypes,
15105    which can conflict with char $ac_func (); below.  */
15106#include <assert.h>
15107/* Override any gcc2 internal prototype to avoid an error.  */
15108#ifdef __cplusplus
15109extern "C"
15110#endif
15111/* We use char because int might match the return type of a gcc2
15112   builtin and then its argument prototype would still apply.  */
15113char $ac_func ();
15114char (*f) ();
15115
15116int
15117main ()
15118{
15119/* The GNU C library defines this for functions which it implements
15120    to always fail with ENOSYS.  Some functions are actually named
15121    something starting with __ and the normal name is an alias.  */
15122#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15123choke me
15124#else
15125f = $ac_func;
15126#endif
15127
15128  ;
15129  return 0;
15130}
15131_ACEOF
15132rm -f conftest.$ac_objext conftest$ac_exeext
15133if { (eval echo "$as_me:15133: \"$ac_link\"") >&5
15134  (eval $ac_link) 2>&5
15135  ac_status=$?
15136  echo "$as_me:15136: \$? = $ac_status" >&5
15137  (exit $ac_status); } &&
15138         { ac_try='test -s conftest$ac_exeext'
15139  { (eval echo "$as_me:15139: \"$ac_try\"") >&5
15140  (eval $ac_try) 2>&5
15141  ac_status=$?
15142  echo "$as_me:15142: \$? = $ac_status" >&5
15143  (exit $ac_status); }; }; then
15144  eval "$as_ac_var=yes"
15145else
15146  echo "$as_me: failed program was:" >&5
15147cat conftest.$ac_ext >&5
15148eval "$as_ac_var=no"
15149fi
15150rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15151fi
15152echo "$as_me:15152: result: `eval echo '${'$as_ac_var'}'`" >&5
15153echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15154if test `eval echo '${'$as_ac_var'}'` = yes; then
15155  cat >>confdefs.h <<EOF
15156#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15157EOF
15158
15159fi
15160done
15161
15162fi
15163
15164if test -n "$GCC" ; then
15165echo "$as_me:15165: checking if you want to turn on gcc warnings" >&5
15166echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6
15167
15168# Check whether --enable-warnings or --disable-warnings was given.
15169if test "${enable_warnings+set}" = set; then
15170  enableval="$enable_warnings"
15171  test "$enableval" != yes && enableval=no
15172  if test "$enableval" != "no" ; then
15173    with_warnings=yes
15174  else
15175    with_warnings=no
15176  fi
15177else
15178  enableval=no
15179  with_warnings=no
15180
15181fi;
15182echo "$as_me:15182: result: $with_warnings" >&5
15183echo "${ECHO_T}$with_warnings" >&6
15184if test "$with_warnings" = yes
15185then
15186
15187if test "$GCC" = yes
15188then
15189cat > conftest.i <<EOF
15190#ifndef GCC_PRINTF
15191#define GCC_PRINTF 0
15192#endif
15193#ifndef GCC_SCANF
15194#define GCC_SCANF 0
15195#endif
15196#ifndef GCC_NORETURN
15197#define GCC_NORETURN /* nothing */
15198#endif
15199#ifndef GCC_UNUSED
15200#define GCC_UNUSED /* nothing */
15201#endif
15202EOF
15203if test "$GCC" = yes
15204then
15205	{ echo "$as_me:15205: checking for $CC __attribute__ directives..." >&5
15206echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
15207cat > conftest.$ac_ext <<EOF
15208#line 15208 "${as_me:-configure}"
15209#include "confdefs.h"
15210#include "conftest.h"
15211#include "conftest.i"
15212#if	GCC_PRINTF
15213#define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
15214#else
15215#define GCC_PRINTFLIKE(fmt,var) /*nothing*/
15216#endif
15217#if	GCC_SCANF
15218#define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
15219#else
15220#define GCC_SCANFLIKE(fmt,var)  /*nothing*/
15221#endif
15222extern void wow(char *,...) GCC_SCANFLIKE(1,2);
15223extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
15224extern void foo(void) GCC_NORETURN;
15225int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
15226EOF
15227	cf_printf_attribute=no
15228	cf_scanf_attribute=no
15229	for cf_attribute in scanf printf unused noreturn
15230	do
15231
15232cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15233
15234		cf_directive="__attribute__(($cf_attribute))"
15235		echo "checking for $CC $cf_directive" 1>&5
15236
15237		case $cf_attribute in #(vi
15238		printf) #(vi
15239			cf_printf_attribute=yes
15240			cat >conftest.h <<EOF
15241#define GCC_$cf_ATTRIBUTE 1
15242EOF
15243			;;
15244		scanf) #(vi
15245			cf_scanf_attribute=yes
15246			cat >conftest.h <<EOF
15247#define GCC_$cf_ATTRIBUTE 1
15248EOF
15249			;;
15250		*) #(vi
15251			cat >conftest.h <<EOF
15252#define GCC_$cf_ATTRIBUTE $cf_directive
15253EOF
15254			;;
15255		esac
15256
15257		if { (eval echo "$as_me:15257: \"$ac_compile\"") >&5
15258  (eval $ac_compile) 2>&5
15259  ac_status=$?
15260  echo "$as_me:15260: \$? = $ac_status" >&5
15261  (exit $ac_status); }; then
15262			test -n "$verbose" && echo "$as_me:15262: result: ... $cf_attribute" >&5
15263echo "${ECHO_T}... $cf_attribute" >&6
15264			cat conftest.h >>confdefs.h
15265			case $cf_attribute in #(vi
15266			printf) #(vi
15267				if test "$cf_printf_attribute" = no ; then
15268					cat >>confdefs.h <<EOF
15269#define GCC_PRINTFLIKE(fmt,var) /* nothing */
15270EOF
15271				else
15272					cat >>confdefs.h <<EOF
15273#define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
15274EOF
15275				fi
15276				;;
15277			scanf) #(vi
15278				if test "$cf_scanf_attribute" = no ; then
15279					cat >>confdefs.h <<EOF
15280#define GCC_SCANFLIKE(fmt,var) /* nothing */
15281EOF
15282				else
15283					cat >>confdefs.h <<EOF
15284#define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
15285EOF
15286				fi
15287				;;
15288			esac
15289		fi
15290	done
15291else
15292	fgrep define conftest.i >>confdefs.h
15293fi
15294rm -rf conftest*
15295fi
15296
15297GCC_VERSION=none
15298if test "$GCC" = yes ; then
15299	echo "$as_me:15299: checking version of $CC" >&5
15300echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
15301	GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
15302	test -z "$GCC_VERSION" && GCC_VERSION=unknown
15303	echo "$as_me:15303: result: $GCC_VERSION" >&5
15304echo "${ECHO_T}$GCC_VERSION" >&6
15305fi
15306
15307INTEL_COMPILER=no
15308
15309if test "$GCC" = yes ; then
15310	case $host_os in
15311	linux*|gnu*)
15312		echo "$as_me:15312: checking if this is really Intel C compiler" >&5
15313echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
15314		cf_save_CFLAGS="$CFLAGS"
15315		CFLAGS="$CFLAGS -no-gcc"
15316		cat >conftest.$ac_ext <<_ACEOF
15317#line 15317 "configure"
15318#include "confdefs.h"
15319
15320int
15321main ()
15322{
15323
15324#ifdef __INTEL_COMPILER
15325#else
15326make an error
15327#endif
15328
15329  ;
15330  return 0;
15331}
15332_ACEOF
15333rm -f conftest.$ac_objext
15334if { (eval echo "$as_me:15334: \"$ac_compile\"") >&5
15335  (eval $ac_compile) 2>&5
15336  ac_status=$?
15337  echo "$as_me:15337: \$? = $ac_status" >&5
15338  (exit $ac_status); } &&
15339         { ac_try='test -s conftest.$ac_objext'
15340  { (eval echo "$as_me:15340: \"$ac_try\"") >&5
15341  (eval $ac_try) 2>&5
15342  ac_status=$?
15343  echo "$as_me:15343: \$? = $ac_status" >&5
15344  (exit $ac_status); }; }; then
15345  INTEL_COMPILER=yes
15346cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
15347
15348else
15349  echo "$as_me: failed program was:" >&5
15350cat conftest.$ac_ext >&5
15351fi
15352rm -f conftest.$ac_objext conftest.$ac_ext
15353		CFLAGS="$cf_save_CFLAGS"
15354		echo "$as_me:15354: result: $INTEL_COMPILER" >&5
15355echo "${ECHO_T}$INTEL_COMPILER" >&6
15356		;;
15357	esac
15358fi
15359
15360cat > conftest.$ac_ext <<EOF
15361#line 15361 "${as_me:-configure}"
15362int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
15363EOF
15364
15365if test "$INTEL_COMPILER" = yes
15366then
15367# The "-wdXXX" options suppress warnings:
15368# remark #1419: external declaration in primary source file
15369# remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
15370# remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
15371# remark #193: zero used for undefined preprocessing identifier
15372# remark #593: variable "curs_sb_left_arrow" was set but never used
15373# remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
15374# remark #869: parameter "tw" was never referenced
15375# remark #981: operands are evaluated in unspecified order
15376# warning #279: controlling expression is constant
15377
15378	{ echo "$as_me:15378: checking for $CC warning options..." >&5
15379echo "$as_me: checking for $CC warning options..." >&6;}
15380	cf_save_CFLAGS="$CFLAGS"
15381	EXTRA_CFLAGS="-Wall"
15382	for cf_opt in \
15383		wd1419 \
15384		wd1683 \
15385		wd1684 \
15386		wd193 \
15387		wd593 \
15388		wd279 \
15389		wd810 \
15390		wd869 \
15391		wd981
15392	do
15393		CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
15394		if { (eval echo "$as_me:15394: \"$ac_compile\"") >&5
15395  (eval $ac_compile) 2>&5
15396  ac_status=$?
15397  echo "$as_me:15397: \$? = $ac_status" >&5
15398  (exit $ac_status); }; then
15399			test -n "$verbose" && echo "$as_me:15399: result: ... -$cf_opt" >&5
15400echo "${ECHO_T}... -$cf_opt" >&6
15401			EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
15402		fi
15403	done
15404	CFLAGS="$cf_save_CFLAGS"
15405
15406elif test "$GCC" = yes
15407then
15408	{ echo "$as_me:15408: checking for $CC warning options..." >&5
15409echo "$as_me: checking for $CC warning options..." >&6;}
15410	cf_save_CFLAGS="$CFLAGS"
15411	EXTRA_CFLAGS=
15412	cf_warn_CONST=""
15413	test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
15414	for cf_opt in W Wall \
15415		Wbad-function-cast \
15416		Wcast-align \
15417		Wcast-qual \
15418		Winline \
15419		Wmissing-declarations \
15420		Wmissing-prototypes \
15421		Wnested-externs \
15422		Wpointer-arith \
15423		Wshadow \
15424		Wstrict-prototypes \
15425		Wundef $cf_warn_CONST Wdeclaration-after-statement Wextra Wno-unknown-pragmas Wswitch-enum
15426	do
15427		CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
15428		if { (eval echo "$as_me:15428: \"$ac_compile\"") >&5
15429  (eval $ac_compile) 2>&5
15430  ac_status=$?
15431  echo "$as_me:15431: \$? = $ac_status" >&5
15432  (exit $ac_status); }; then
15433			test -n "$verbose" && echo "$as_me:15433: result: ... -$cf_opt" >&5
15434echo "${ECHO_T}... -$cf_opt" >&6
15435			case $cf_opt in #(vi
15436			Wcast-qual) #(vi
15437				CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
15438				;;
15439			Winline) #(vi
15440				case $GCC_VERSION in
15441				[34].*)
15442					test -n "$verbose" && echo "	feature is broken in gcc $GCC_VERSION" 1>&6
15443
15444echo "${as_me:-configure}:15444: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
15445
15446					continue;;
15447				esac
15448				;;
15449			esac
15450			EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
15451		fi
15452	done
15453	CFLAGS="$cf_save_CFLAGS"
15454fi
15455rm -rf conftest*
15456
15457fi
15458fi
15459
15460test "$disable_setuid" = yes && cat >>confdefs.h <<\EOF
15461#define DISABLE_SETUID 1
15462EOF
15463
15464test "$disable_setgid" = yes && cat >>confdefs.h <<\EOF
15465#define DISABLE_SETGID 1
15466EOF
15467
15468if test $disable_setuid = yes ; then
15469	MAY_SETUID="#"
15470	NOT_SETUID=
15471elif test $disable_setgid = yes ; then
15472	MAY_SETUID="#"
15473	NOT_SETUID=
15474else
15475	MAY_SETUID=
15476	NOT_SETUID="#"
15477fi
15478
15479###	remove from CPPFLAGS the optional features we define in xtermcfg.h
15480###	or other conflicting symbols that may be defined via imake:
15481for cf_def in \
15482	__STDC__ \
15483	ALLOWLOGGING \
15484	ALLOWLOGFILEEXEC \
15485	OPT_LUIT_PROG \
15486	OPT_WIDE_CHARS \
15487	SCROLLBAR_RIGHT \
15488	USE_TTY_GROUP \
15489	USE_UTEMPTER \
15490	XRENDERFONT
15491do
15492	CPPFLAGS=`echo "$CPPFLAGS" | sed -e s/-D$cf_def//`
15493done
15494
15495echo "$as_me:15495: checking if filesystem supports mixed-case filenames" >&5
15496echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
15497if test "${cf_cv_mixedcase+set}" = set; then
15498  echo $ECHO_N "(cached) $ECHO_C" >&6
15499else
15500
15501if test "$cross_compiling" = yes ; then
15502	case $target_alias in #(vi
15503	*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-mingw32*|*-uwin*) #(vi
15504		cf_cv_mixedcase=no
15505		;;
15506	*)
15507		cf_cv_mixedcase=yes
15508		;;
15509	esac
15510else
15511	rm -f conftest CONFTEST
15512	echo test >conftest
15513	if test -f CONFTEST ; then
15514		cf_cv_mixedcase=no
15515	else
15516		cf_cv_mixedcase=yes
15517	fi
15518	rm -f conftest CONFTEST
15519fi
15520
15521fi
15522echo "$as_me:15522: result: $cf_cv_mixedcase" >&5
15523echo "${ECHO_T}$cf_cv_mixedcase" >&6
15524test "$cf_cv_mixedcase" = yes && cat >>confdefs.h <<\EOF
15525#define MIXEDCASE_FILENAMES 1
15526EOF
15527
15528for ac_prog in exctags ctags
15529do
15530  # Extract the first word of "$ac_prog", so it can be a program name with args.
15531set dummy $ac_prog; ac_word=$2
15532echo "$as_me:15532: checking for $ac_word" >&5
15533echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
15534if test "${ac_cv_prog_CTAGS+set}" = set; then
15535  echo $ECHO_N "(cached) $ECHO_C" >&6
15536else
15537  if test -n "$CTAGS"; then
15538  ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
15539else
15540  ac_save_IFS=$IFS; IFS=$ac_path_separator
15541ac_dummy="$PATH"
15542for ac_dir in $ac_dummy; do
15543  IFS=$ac_save_IFS
15544  test -z "$ac_dir" && ac_dir=.
15545  $as_executable_p "$ac_dir/$ac_word" || continue
15546ac_cv_prog_CTAGS="$ac_prog"
15547echo "$as_me:15547: found $ac_dir/$ac_word" >&5
15548break
15549done
15550
15551fi
15552fi
15553CTAGS=$ac_cv_prog_CTAGS
15554if test -n "$CTAGS"; then
15555  echo "$as_me:15555: result: $CTAGS" >&5
15556echo "${ECHO_T}$CTAGS" >&6
15557else
15558  echo "$as_me:15558: result: no" >&5
15559echo "${ECHO_T}no" >&6
15560fi
15561
15562  test -n "$CTAGS" && break
15563done
15564
15565for ac_prog in exetags etags
15566do
15567  # Extract the first word of "$ac_prog", so it can be a program name with args.
15568set dummy $ac_prog; ac_word=$2
15569echo "$as_me:15569: checking for $ac_word" >&5
15570echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
15571if test "${ac_cv_prog_ETAGS+set}" = set; then
15572  echo $ECHO_N "(cached) $ECHO_C" >&6
15573else
15574  if test -n "$ETAGS"; then
15575  ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
15576else
15577  ac_save_IFS=$IFS; IFS=$ac_path_separator
15578ac_dummy="$PATH"
15579for ac_dir in $ac_dummy; do
15580  IFS=$ac_save_IFS
15581  test -z "$ac_dir" && ac_dir=.
15582  $as_executable_p "$ac_dir/$ac_word" || continue
15583ac_cv_prog_ETAGS="$ac_prog"
15584echo "$as_me:15584: found $ac_dir/$ac_word" >&5
15585break
15586done
15587
15588fi
15589fi
15590ETAGS=$ac_cv_prog_ETAGS
15591if test -n "$ETAGS"; then
15592  echo "$as_me:15592: result: $ETAGS" >&5
15593echo "${ECHO_T}$ETAGS" >&6
15594else
15595  echo "$as_me:15595: result: no" >&5
15596echo "${ECHO_T}no" >&6
15597fi
15598
15599  test -n "$ETAGS" && break
15600done
15601
15602# Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
15603set dummy ${CTAGS:-ctags}; ac_word=$2
15604echo "$as_me:15604: checking for $ac_word" >&5
15605echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
15606if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
15607  echo $ECHO_N "(cached) $ECHO_C" >&6
15608else
15609  if test -n "$MAKE_LOWER_TAGS"; then
15610  ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
15611else
15612  ac_save_IFS=$IFS; IFS=$ac_path_separator
15613ac_dummy="$PATH"
15614for ac_dir in $ac_dummy; do
15615  IFS=$ac_save_IFS
15616  test -z "$ac_dir" && ac_dir=.
15617  $as_executable_p "$ac_dir/$ac_word" || continue
15618ac_cv_prog_MAKE_LOWER_TAGS="yes"
15619echo "$as_me:15619: found $ac_dir/$ac_word" >&5
15620break
15621done
15622
15623  test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
15624fi
15625fi
15626MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
15627if test -n "$MAKE_LOWER_TAGS"; then
15628  echo "$as_me:15628: result: $MAKE_LOWER_TAGS" >&5
15629echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
15630else
15631  echo "$as_me:15631: result: no" >&5
15632echo "${ECHO_T}no" >&6
15633fi
15634
15635if test "$cf_cv_mixedcase" = yes ; then
15636	# Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
15637set dummy ${ETAGS:-etags}; ac_word=$2
15638echo "$as_me:15638: checking for $ac_word" >&5
15639echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
15640if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
15641  echo $ECHO_N "(cached) $ECHO_C" >&6
15642else
15643  if test -n "$MAKE_UPPER_TAGS"; then
15644  ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
15645else
15646  ac_save_IFS=$IFS; IFS=$ac_path_separator
15647ac_dummy="$PATH"
15648for ac_dir in $ac_dummy; do
15649  IFS=$ac_save_IFS
15650  test -z "$ac_dir" && ac_dir=.
15651  $as_executable_p "$ac_dir/$ac_word" || continue
15652ac_cv_prog_MAKE_UPPER_TAGS="yes"
15653echo "$as_me:15653: found $ac_dir/$ac_word" >&5
15654break
15655done
15656
15657  test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
15658fi
15659fi
15660MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
15661if test -n "$MAKE_UPPER_TAGS"; then
15662  echo "$as_me:15662: result: $MAKE_UPPER_TAGS" >&5
15663echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
15664else
15665  echo "$as_me:15665: result: no" >&5
15666echo "${ECHO_T}no" >&6
15667fi
15668
15669else
15670	MAKE_UPPER_TAGS=no
15671fi
15672
15673if test "$MAKE_UPPER_TAGS" = yes ; then
15674	MAKE_UPPER_TAGS=
15675else
15676	MAKE_UPPER_TAGS="#"
15677fi
15678
15679if test "$MAKE_LOWER_TAGS" = yes ; then
15680	MAKE_LOWER_TAGS=
15681else
15682	MAKE_LOWER_TAGS="#"
15683fi
15684
15685LD_RPATH_OPT=
15686echo "$as_me:15686: checking for an rpath option" >&5
15687echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
15688case $cf_cv_system_name in #(vi
15689irix*) #(vi
15690	if test "$GCC" = yes; then
15691		LD_RPATH_OPT="-Wl,-rpath,"
15692	else
15693		LD_RPATH_OPT="-rpath "
15694	fi
15695	;;
15696linux*|gnu*|k*bsd*-gnu) #(vi
15697	LD_RPATH_OPT="-Wl,-rpath,"
15698	;;
15699openbsd[2-9].*) #(vi
15700	LD_RPATH_OPT="-Wl,-rpath,"
15701	;;
15702freebsd*) #(vi
15703	LD_RPATH_OPT="-rpath "
15704	;;
15705netbsd*) #(vi
15706	LD_RPATH_OPT="-Wl,-rpath,"
15707	;;
15708osf*|mls+*) #(vi
15709	LD_RPATH_OPT="-rpath "
15710	;;
15711solaris2*) #(vi
15712	LD_RPATH_OPT="-R"
15713	;;
15714*)
15715	;;
15716esac
15717echo "$as_me:15717: result: $LD_RPATH_OPT" >&5
15718echo "${ECHO_T}$LD_RPATH_OPT" >&6
15719
15720case "x$LD_RPATH_OPT" in #(vi
15721x-R*)
15722	echo "$as_me:15722: checking if we need a space after rpath option" >&5
15723echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
15724	cf_save_LIBS="$LIBS"
15725	LIBS="${LD_RPATH_OPT}$libdir $LIBS"
15726	cat >conftest.$ac_ext <<_ACEOF
15727#line 15727 "configure"
15728#include "confdefs.h"
15729
15730int
15731main ()
15732{
15733
15734  ;
15735  return 0;
15736}
15737_ACEOF
15738rm -f conftest.$ac_objext conftest$ac_exeext
15739if { (eval echo "$as_me:15739: \"$ac_link\"") >&5
15740  (eval $ac_link) 2>&5
15741  ac_status=$?
15742  echo "$as_me:15742: \$? = $ac_status" >&5
15743  (exit $ac_status); } &&
15744         { ac_try='test -s conftest$ac_exeext'
15745  { (eval echo "$as_me:15745: \"$ac_try\"") >&5
15746  (eval $ac_try) 2>&5
15747  ac_status=$?
15748  echo "$as_me:15748: \$? = $ac_status" >&5
15749  (exit $ac_status); }; }; then
15750  cf_rpath_space=no
15751else
15752  echo "$as_me: failed program was:" >&5
15753cat conftest.$ac_ext >&5
15754cf_rpath_space=yes
15755fi
15756rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15757	LIBS="$cf_save_LIBS"
15758	echo "$as_me:15758: result: $cf_rpath_space" >&5
15759echo "${ECHO_T}$cf_rpath_space" >&6
15760	test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
15761	;;
15762esac
15763
15764echo "$as_me:15764: checking if rpath should be not be set" >&5
15765echo $ECHO_N "checking if rpath should be not be set... $ECHO_C" >&6
15766
15767# Check whether --enable-rpath-hack or --disable-rpath-hack was given.
15768if test "${enable_rpath_hack+set}" = set; then
15769  enableval="$enable_rpath_hack"
15770  test "$enableval" != no && enableval=yes
15771  if test "$enableval" != "yes" ; then
15772    cf_disable_rpath_hack=yes
15773  else
15774    cf_disable_rpath_hack=no
15775  fi
15776else
15777  enableval=yes
15778  cf_disable_rpath_hack=no
15779
15780fi;
15781echo "$as_me:15781: result: $cf_disable_rpath_hack" >&5
15782echo "${ECHO_T}$cf_disable_rpath_hack" >&6
15783if test "$cf_disable_rpath_hack" = no ; then
15784
15785echo "$as_me:15785: checking for updated LDFLAGS" >&5
15786echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
15787if test -n "$LD_RPATH_OPT" ; then
15788	echo "$as_me:15788: result: maybe" >&5
15789echo "${ECHO_T}maybe" >&6
15790
15791	for ac_prog in ldd
15792do
15793  # Extract the first word of "$ac_prog", so it can be a program name with args.
15794set dummy $ac_prog; ac_word=$2
15795echo "$as_me:15795: checking for $ac_word" >&5
15796echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
15797if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
15798  echo $ECHO_N "(cached) $ECHO_C" >&6
15799else
15800  if test -n "$cf_ldd_prog"; then
15801  ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
15802else
15803  ac_save_IFS=$IFS; IFS=$ac_path_separator
15804ac_dummy="$PATH"
15805for ac_dir in $ac_dummy; do
15806  IFS=$ac_save_IFS
15807  test -z "$ac_dir" && ac_dir=.
15808  $as_executable_p "$ac_dir/$ac_word" || continue
15809ac_cv_prog_cf_ldd_prog="$ac_prog"
15810echo "$as_me:15810: found $ac_dir/$ac_word" >&5
15811break
15812done
15813
15814fi
15815fi
15816cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
15817if test -n "$cf_ldd_prog"; then
15818  echo "$as_me:15818: result: $cf_ldd_prog" >&5
15819echo "${ECHO_T}$cf_ldd_prog" >&6
15820else
15821  echo "$as_me:15821: result: no" >&5
15822echo "${ECHO_T}no" >&6
15823fi
15824
15825  test -n "$cf_ldd_prog" && break
15826done
15827test -n "$cf_ldd_prog" || cf_ldd_prog="no"
15828
15829	cf_rpath_list="/usr/lib /lib"
15830	if test "$cf_ldd_prog" != no
15831	then
15832cat >conftest.$ac_ext <<_ACEOF
15833#line 15833 "configure"
15834#include "confdefs.h"
15835#include <stdio.h>
15836int
15837main ()
15838{
15839printf("Hello");
15840  ;
15841  return 0;
15842}
15843_ACEOF
15844rm -f conftest.$ac_objext conftest$ac_exeext
15845if { (eval echo "$as_me:15845: \"$ac_link\"") >&5
15846  (eval $ac_link) 2>&5
15847  ac_status=$?
15848  echo "$as_me:15848: \$? = $ac_status" >&5
15849  (exit $ac_status); } &&
15850         { ac_try='test -s conftest$ac_exeext'
15851  { (eval echo "$as_me:15851: \"$ac_try\"") >&5
15852  (eval $ac_try) 2>&5
15853  ac_status=$?
15854  echo "$as_me:15854: \$? = $ac_status" >&5
15855  (exit $ac_status); }; }; then
15856  cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[ 	]/%/%' -e 's%/[^/][^/]*$%%' |sort -u`
15857else
15858  echo "$as_me: failed program was:" >&5
15859cat conftest.$ac_ext >&5
15860fi
15861rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15862	fi
15863
15864	test -n "$verbose" && echo "	...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
15865
15866echo "${as_me:-configure}:15866: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
15867
15868test -n "$verbose" && echo "	...checking LDFLAGS $LDFLAGS" 1>&6
15869
15870echo "${as_me:-configure}:15870: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
15871
15872cf_rpath_dst=
15873for cf_rpath_src in $LDFLAGS
15874do
15875	case $cf_rpath_src in #(vi
15876	-L*) #(vi
15877
15878		# check if this refers to a directory which we will ignore
15879		cf_rpath_skip=no
15880		if test -n "$cf_rpath_list"
15881		then
15882			for cf_rpath_item in $cf_rpath_list
15883			do
15884				if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
15885				then
15886					cf_rpath_skip=yes
15887					break
15888				fi
15889			done
15890		fi
15891
15892		if test "$cf_rpath_skip" = no
15893		then
15894			# transform the option
15895			if test "$LD_RPATH_OPT" = "-R " ; then
15896				cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
15897			else
15898				cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
15899			fi
15900
15901			# if we have not already added this, add it now
15902			cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
15903			if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
15904			then
15905				test -n "$verbose" && echo "	...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
15906
15907echo "${as_me:-configure}:15907: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
15908
15909				EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
15910			fi
15911		fi
15912		;;
15913	esac
15914	cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
15915done
15916LDFLAGS=$cf_rpath_dst
15917
15918test -n "$verbose" && echo "	...checked LDFLAGS $LDFLAGS" 1>&6
15919
15920echo "${as_me:-configure}:15920: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
15921
15922test -n "$verbose" && echo "	...checking LIBS $LIBS" 1>&6
15923
15924echo "${as_me:-configure}:15924: testing ...checking LIBS $LIBS ..." 1>&5
15925
15926cf_rpath_dst=
15927for cf_rpath_src in $LIBS
15928do
15929	case $cf_rpath_src in #(vi
15930	-L*) #(vi
15931
15932		# check if this refers to a directory which we will ignore
15933		cf_rpath_skip=no
15934		if test -n "$cf_rpath_list"
15935		then
15936			for cf_rpath_item in $cf_rpath_list
15937			do
15938				if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
15939				then
15940					cf_rpath_skip=yes
15941					break
15942				fi
15943			done
15944		fi
15945
15946		if test "$cf_rpath_skip" = no
15947		then
15948			# transform the option
15949			if test "$LD_RPATH_OPT" = "-R " ; then
15950				cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
15951			else
15952				cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
15953			fi
15954
15955			# if we have not already added this, add it now
15956			cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
15957			if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
15958			then
15959				test -n "$verbose" && echo "	...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
15960
15961echo "${as_me:-configure}:15961: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
15962
15963				EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
15964			fi
15965		fi
15966		;;
15967	esac
15968	cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
15969done
15970LIBS=$cf_rpath_dst
15971
15972test -n "$verbose" && echo "	...checked LIBS $LIBS" 1>&6
15973
15974echo "${as_me:-configure}:15974: testing ...checked LIBS $LIBS ..." 1>&5
15975
15976	test -n "$verbose" && echo "	...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
15977
15978echo "${as_me:-configure}:15978: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
15979
15980fi
15981
15982fi
15983
15984# Force plink.sh to not trim pcre's libraries, which have the same symbol
15985# names as the system regexp.
15986if test "$with_pcre" != no
15987then
15988	LIBS=`echo "$LIBS" | sed -e 's/-lpcre/-kpcre/g'`
15989fi
15990
15991###	output Makefile and xtermcfg.h
15992ac_config_files="$ac_config_files Makefile"
15993cat >confcache <<\_ACEOF
15994# This file is a shell script that caches the results of configure
15995# tests run on this system so they can be shared between configure
15996# scripts and configure runs, see configure's option --config-cache.
15997# It is not useful on other systems.  If it contains results you don't
15998# want to keep, you may remove or edit it.
15999#
16000# config.status only pays attention to the cache file if you give it
16001# the --recheck option to rerun configure.
16002#
16003# `ac_cv_env_foo' variables (set or unset) will be overriden when
16004# loading this file, other *unset* `ac_cv_foo' will be assigned the
16005# following values.
16006
16007_ACEOF
16008
16009# The following way of writing the cache mishandles newlines in values,
16010# but we know of no workaround that is simple, portable, and efficient.
16011# So, don't put newlines in cache variables' values.
16012# Ultrix sh set writes to stderr and can't be redirected directly,
16013# and sets the high bit in the cache file unless we assign to the vars.
16014{
16015  (set) 2>&1 |
16016    case `(ac_space=' '; set | grep ac_space) 2>&1` in
16017    *ac_space=\ *)
16018      # `set' does not quote correctly, so add quotes (double-quote
16019      # substitution turns \\\\ into \\, and sed turns \\ into \).
16020      sed -n \
16021        "s/'/'\\\\''/g;
16022    	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
16023      ;;
16024    *)
16025      # `set' quotes correctly as required by POSIX, so do not add quotes.
16026      sed -n \
16027        "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
16028      ;;
16029    esac;
16030} |
16031  sed '
16032     t clear
16033     : clear
16034     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16035     t end
16036     /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16037     : end' >>confcache
16038if cmp -s $cache_file confcache; then :; else
16039  if test -w $cache_file; then
16040    test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
16041    cat confcache >$cache_file
16042  else
16043    echo "not updating unwritable cache $cache_file"
16044  fi
16045fi
16046rm -f confcache
16047
16048test "x$prefix" = xNONE && prefix=$ac_default_prefix
16049# Let make expand exec_prefix.
16050test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16051
16052# VPATH may cause trouble with some makes, so we remove $(srcdir),
16053# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
16054# trailing colons and then remove the whole line if VPATH becomes empty
16055# (actually we leave an empty line to preserve line numbers).
16056if test "x$srcdir" = x.; then
16057  ac_vpsub='/^[ 	]*VPATH[ 	]*=/{
16058s/:*\$(srcdir):*/:/;
16059s/:*\${srcdir}:*/:/;
16060s/:*@srcdir@:*/:/;
16061s/^\([^=]*=[ 	]*\):*/\1/;
16062s/:*$//;
16063s/^[^=]*=[ 	]*$//;
16064}'
16065fi
16066
16067DEFS=-DHAVE_CONFIG_H
16068
16069: ${CONFIG_STATUS=./config.status}
16070ac_clean_files_save=$ac_clean_files
16071ac_clean_files="$ac_clean_files $CONFIG_STATUS"
16072{ echo "$as_me:16072: creating $CONFIG_STATUS" >&5
16073echo "$as_me: creating $CONFIG_STATUS" >&6;}
16074cat >$CONFIG_STATUS <<_ACEOF
16075#! $SHELL
16076# Generated automatically by configure.
16077# Run this file to recreate the current configuration.
16078# Compiler output produced by configure, useful for debugging
16079# configure, is in config.log if it exists.
16080
16081debug=false
16082SHELL=\${CONFIG_SHELL-$SHELL}
16083ac_cs_invocation="\$0 \$@"
16084
16085_ACEOF
16086
16087cat >>$CONFIG_STATUS <<\_ACEOF
16088# Be Bourne compatible
16089if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
16090  emulate sh
16091  NULLCMD=:
16092elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
16093  set -o posix
16094fi
16095
16096# Name of the executable.
16097as_me=`echo "$0" |sed 's,.*[\\/],,'`
16098
16099if expr a : '\(a\)' >/dev/null 2>&1; then
16100  as_expr=expr
16101else
16102  as_expr=false
16103fi
16104
16105rm -f conf$$ conf$$.exe conf$$.file
16106echo >conf$$.file
16107if ln -s conf$$.file conf$$ 2>/dev/null; then
16108  # We could just check for DJGPP; but this test a) works b) is more generic
16109  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
16110  if test -f conf$$.exe; then
16111    # Don't use ln at all; we don't have any links
16112    as_ln_s='cp -p'
16113  else
16114    as_ln_s='ln -s'
16115  fi
16116elif ln conf$$.file conf$$ 2>/dev/null; then
16117  as_ln_s=ln
16118else
16119  as_ln_s='cp -p'
16120fi
16121rm -f conf$$ conf$$.exe conf$$.file
16122
16123as_executable_p="test -f"
16124
16125# Support unset when possible.
16126if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
16127  as_unset=unset
16128else
16129  as_unset=false
16130fi
16131
16132# NLS nuisances.
16133$as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
16134$as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
16135$as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
16136$as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
16137$as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
16138$as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
16139$as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
16140$as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
16141
16142# IFS
16143# We need space, tab and new line, in precisely that order.
16144as_nl='
16145'
16146IFS=" 	$as_nl"
16147
16148# CDPATH.
16149$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
16150
16151exec 6>&1
16152
16153_ACEOF
16154
16155# Files that config.status was made for.
16156if test -n "$ac_config_files"; then
16157  echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
16158fi
16159
16160if test -n "$ac_config_headers"; then
16161  echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
16162fi
16163
16164if test -n "$ac_config_links"; then
16165  echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
16166fi
16167
16168if test -n "$ac_config_commands"; then
16169  echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
16170fi
16171
16172cat >>$CONFIG_STATUS <<\EOF
16173
16174ac_cs_usage="\
16175\`$as_me' instantiates files from templates according to the
16176current configuration.
16177
16178Usage: $0 [OPTIONS] [FILE]...
16179
16180  -h, --help       print this help, then exit
16181  -V, --version    print version number, then exit
16182  -d, --debug      don't remove temporary files
16183      --recheck    update $as_me by reconfiguring in the same conditions
16184  --file=FILE[:TEMPLATE]
16185                   instantiate the configuration file FILE
16186  --header=FILE[:TEMPLATE]
16187                   instantiate the configuration header FILE
16188
16189Configuration files:
16190$config_files
16191
16192Configuration headers:
16193$config_headers
16194
16195Report bugs to <dickey@invisible-island.net>."
16196EOF
16197
16198cat >>$CONFIG_STATUS <<EOF
16199ac_cs_version="\\
16200config.status
16201configured by $0, generated by GNU Autoconf 2.52.20101001,
16202  with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
16203
16204Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
16205Free Software Foundation, Inc.
16206This config.status script is free software; the Free Software Foundation
16207gives unlimited permission to copy, distribute and modify it."
16208srcdir=$srcdir
16209INSTALL="$INSTALL"
16210EOF
16211
16212cat >>$CONFIG_STATUS <<\EOF
16213# If no file are specified by the user, then we need to provide default
16214# value.  By we need to know if files were specified by the user.
16215ac_need_defaults=:
16216while test $# != 0
16217do
16218  case $1 in
16219  --*=*)
16220    ac_option=`expr "x$1" : 'x\([^=]*\)='`
16221    ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
16222    shift
16223    set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
16224    shift
16225    ;;
16226  -*);;
16227  *) # This is not an option, so the user has probably given explicit
16228     # arguments.
16229     ac_need_defaults=false;;
16230  esac
16231
16232  case $1 in
16233  # Handling of the options.
16234EOF
16235cat >>$CONFIG_STATUS <<EOF
16236  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16237    echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
16238    exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
16239EOF
16240cat >>$CONFIG_STATUS <<\EOF
16241  --version | --vers* | -V )
16242    echo "$ac_cs_version"; exit 0 ;;
16243  --he | --h)
16244    # Conflict between --help and --header
16245    { { echo "$as_me:16245: error: ambiguous option: $1
16246Try \`$0 --help' for more information." >&5
16247echo "$as_me: error: ambiguous option: $1
16248Try \`$0 --help' for more information." >&2;}
16249   { (exit 1); exit 1; }; };;
16250  --help | --hel | -h )
16251    echo "$ac_cs_usage"; exit 0 ;;
16252  --debug | --d* | -d )
16253    debug=: ;;
16254  --file | --fil | --fi | --f )
16255    shift
16256    CONFIG_FILES="$CONFIG_FILES $1"
16257    ac_need_defaults=false;;
16258  --header | --heade | --head | --hea )
16259    shift
16260    CONFIG_HEADERS="$CONFIG_HEADERS $1"
16261    ac_need_defaults=false;;
16262
16263  # This is an error.
16264  -*) { { echo "$as_me:16264: error: unrecognized option: $1
16265Try \`$0 --help' for more information." >&5
16266echo "$as_me: error: unrecognized option: $1
16267Try \`$0 --help' for more information." >&2;}
16268   { (exit 1); exit 1; }; } ;;
16269
16270  *) ac_config_targets="$ac_config_targets $1" ;;
16271
16272  esac
16273  shift
16274done
16275
16276exec 5>>config.log
16277cat >&5 << _ACEOF
16278
16279## ----------------------- ##
16280## Running config.status.  ##
16281## ----------------------- ##
16282
16283This file was extended by $as_me 2.52.20101001, executed with
16284  CONFIG_FILES    = $CONFIG_FILES
16285  CONFIG_HEADERS  = $CONFIG_HEADERS
16286  CONFIG_LINKS    = $CONFIG_LINKS
16287  CONFIG_COMMANDS = $CONFIG_COMMANDS
16288  > $ac_cs_invocation
16289on `(hostname || uname -n) 2>/dev/null | sed 1q`
16290
16291_ACEOF
16292EOF
16293
16294cat >>$CONFIG_STATUS <<\EOF
16295for ac_config_target in $ac_config_targets
16296do
16297  case "$ac_config_target" in
16298  # Handling of arguments.
16299  "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
16300  "xtermcfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS xtermcfg.h:xtermcfg.hin" ;;
16301  *) { { echo "$as_me:16301: error: invalid argument: $ac_config_target" >&5
16302echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
16303   { (exit 1); exit 1; }; };;
16304  esac
16305done
16306
16307# If the user did not use the arguments to specify the items to instantiate,
16308# then the envvar interface is used.  Set only those that are not.
16309# We use the long form for the default assignment because of an extremely
16310# bizarre bug on SunOS 4.1.3.
16311if $ac_need_defaults; then
16312  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
16313  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
16314fi
16315
16316# Create a temporary directory, and hook for its removal unless debugging.
16317$debug ||
16318{
16319  trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
16320  trap '{ (exit 1); exit 1; }' 1 2 13 15
16321}
16322
16323# Create a (secure) tmp directory for tmp files.
16324: ${TMPDIR=/tmp}
16325{
16326  tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
16327  test -n "$tmp" && test -d "$tmp"
16328}  ||
16329{
16330  tmp=$TMPDIR/cs$$-$RANDOM
16331  (umask 077 && mkdir $tmp)
16332} ||
16333{
16334   echo "$me: cannot create a temporary directory in $TMPDIR" >&2
16335   { (exit 1); exit 1; }
16336}
16337
16338EOF
16339
16340cat >>$CONFIG_STATUS <<EOF
16341
16342#
16343# CONFIG_FILES section.
16344#
16345
16346# No need to generate the scripts if there are no CONFIG_FILES.
16347# This happens for instance when ./config.status config.h
16348if test -n "\$CONFIG_FILES"; then
16349  # Protect against being on the right side of a sed subst in config.status.
16350  sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
16351   s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
16352s,@SHELL@,$SHELL,;t t
16353s,@exec_prefix@,$exec_prefix,;t t
16354s,@prefix@,$prefix,;t t
16355s,@program_transform_name@,$program_transform_name,;t t
16356s,@bindir@,$bindir,;t t
16357s,@sbindir@,$sbindir,;t t
16358s,@libexecdir@,$libexecdir,;t t
16359s,@datadir@,$datadir,;t t
16360s,@sysconfdir@,$sysconfdir,;t t
16361s,@sharedstatedir@,$sharedstatedir,;t t
16362s,@localstatedir@,$localstatedir,;t t
16363s,@libdir@,$libdir,;t t
16364s,@includedir@,$includedir,;t t
16365s,@oldincludedir@,$oldincludedir,;t t
16366s,@infodir@,$infodir,;t t
16367s,@mandir@,$mandir,;t t
16368s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
16369s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
16370s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
16371s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
16372s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
16373s,@build_alias@,$build_alias,;t t
16374s,@host_alias@,$host_alias,;t t
16375s,@target_alias@,$target_alias,;t t
16376s,@ECHO_C@,$ECHO_C,;t t
16377s,@ECHO_N@,$ECHO_N,;t t
16378s,@ECHO_T@,$ECHO_T,;t t
16379s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
16380s,@DEFS@,$DEFS,;t t
16381s,@LIBS@,$LIBS,;t t
16382s,@build@,$build,;t t
16383s,@build_cpu@,$build_cpu,;t t
16384s,@build_vendor@,$build_vendor,;t t
16385s,@build_os@,$build_os,;t t
16386s,@host@,$host,;t t
16387s,@host_cpu@,$host_cpu,;t t
16388s,@host_vendor@,$host_vendor,;t t
16389s,@host_os@,$host_os,;t t
16390s,@CC@,$CC,;t t
16391s,@CFLAGS@,$CFLAGS,;t t
16392s,@LDFLAGS@,$LDFLAGS,;t t
16393s,@CPPFLAGS@,$CPPFLAGS,;t t
16394s,@ac_ct_CC@,$ac_ct_CC,;t t
16395s,@EXEEXT@,$EXEEXT,;t t
16396s,@OBJEXT@,$OBJEXT,;t t
16397s,@CPP@,$CPP,;t t
16398s,@AWK@,$AWK,;t t
16399s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
16400s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
16401s,@INSTALL_DATA@,$INSTALL_DATA,;t t
16402s,@LN_S@,$LN_S,;t t
16403s,@LINT@,$LINT,;t t
16404s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
16405s,@PROG_EXT@,$PROG_EXT,;t t
16406s,@appsdir@,$appsdir,;t t
16407s,@no_appsdir@,$no_appsdir,;t t
16408s,@icondir@,$icondir,;t t
16409s,@no_icondir@,$no_icondir,;t t
16410s,@desktop_utils@,$desktop_utils,;t t
16411s,@DESKTOP_FLAGS@,$DESKTOP_FLAGS,;t t
16412s,@XTERM_PATH@,$XTERM_PATH,;t t
16413s,@XTERM_SYMLINK@,$XTERM_SYMLINK,;t t
16414s,@SINSTALL_OPTS@,$SINSTALL_OPTS,;t t
16415s,@X_CFLAGS@,$X_CFLAGS,;t t
16416s,@X_PRE_LIBS@,$X_PRE_LIBS,;t t
16417s,@X_LIBS@,$X_LIBS,;t t
16418s,@X_EXTRA_LIBS@,$X_EXTRA_LIBS,;t t
16419s,@PKG_CONFIG@,$PKG_CONFIG,;t t
16420s,@IMAKE@,$IMAKE,;t t
16421s,@IMAKE_CFLAGS@,$IMAKE_CFLAGS,;t t
16422s,@IMAKE_LOADFLAGS@,$IMAKE_LOADFLAGS,;t t
16423s,@cf_tic_prog@,$cf_tic_prog,;t t
16424s,@no_ticprog@,$no_ticprog,;t t
16425s,@TERMINFO_DIR@,$TERMINFO_DIR,;t t
16426s,@SET_TERMINFO@,$SET_TERMINFO,;t t
16427s,@FREETYPE_XFT_CONFIG@,$FREETYPE_XFT_CONFIG,;t t
16428s,@FREETYPE_OLD_CONFIG@,$FREETYPE_OLD_CONFIG,;t t
16429s,@HAVE_TYPE_FCCHAR32@,$HAVE_TYPE_FCCHAR32,;t t
16430s,@HAVE_TYPE_XFTCHARSPEC@,$HAVE_TYPE_XFTCHARSPEC,;t t
16431s,@LUIT@,$LUIT,;t t
16432s,@ECHO_LT@,$ECHO_LT,;t t
16433s,@ECHO_LD@,$ECHO_LD,;t t
16434s,@RULE_CC@,$RULE_CC,;t t
16435s,@SHOW_CC@,$SHOW_CC,;t t
16436s,@ECHO_CC@,$ECHO_CC,;t t
16437s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
16438s,@CHARPROC_DEPS@,$CHARPROC_DEPS,;t t
16439s,@EXTRAHDRS@,$EXTRAHDRS,;t t
16440s,@EXTRASRCS@,$EXTRASRCS,;t t
16441s,@EXTRAOBJS@,$EXTRAOBJS,;t t
16442s,@MAY_SETUID@,$MAY_SETUID,;t t
16443s,@NOT_SETUID@,$NOT_SETUID,;t t
16444s,@CTAGS@,$CTAGS,;t t
16445s,@ETAGS@,$ETAGS,;t t
16446s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
16447s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
16448s,@cf_ldd_prog@,$cf_ldd_prog,;t t
16449s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
16450CEOF
16451
16452EOF
16453
16454  cat >>$CONFIG_STATUS <<\EOF
16455  # Split the substitutions into bite-sized pieces for seds with
16456  # small command number limits, like on Digital OSF/1 and HP-UX.
16457  ac_max_sed_lines=48
16458  ac_sed_frag=1 # Number of current file.
16459  ac_beg=1 # First line for current file.
16460  ac_end=$ac_max_sed_lines # Line after last line for current file.
16461  ac_more_lines=:
16462  ac_sed_cmds=
16463  while $ac_more_lines; do
16464    if test $ac_beg -gt 1; then
16465      sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
16466    else
16467      sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
16468    fi
16469    if test ! -s $tmp/subs.frag; then
16470      ac_more_lines=false
16471    else
16472      # The purpose of the label and of the branching condition is to
16473      # speed up the sed processing (if there are no `@' at all, there
16474      # is no need to browse any of the substitutions).
16475      # These are the two extra sed commands mentioned above.
16476      (echo ':t
16477  /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
16478      if test -z "$ac_sed_cmds"; then
16479  	ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
16480      else
16481  	ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
16482      fi
16483      ac_sed_frag=`expr $ac_sed_frag + 1`
16484      ac_beg=$ac_end
16485      ac_end=`expr $ac_end + $ac_max_sed_lines`
16486    fi
16487  done
16488  if test -z "$ac_sed_cmds"; then
16489    ac_sed_cmds=cat
16490  fi
16491fi # test -n "$CONFIG_FILES"
16492
16493EOF
16494cat >>$CONFIG_STATUS <<\EOF
16495for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
16496  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16497  case $ac_file in
16498  - | *:- | *:-:* ) # input from stdin
16499        cat >$tmp/stdin
16500        ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16501        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16502  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16503        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16504  * )   ac_file_in=$ac_file.in ;;
16505  esac
16506
16507  # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
16508  ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16509         X"$ac_file" : 'X\(//\)[^/]' \| \
16510         X"$ac_file" : 'X\(//\)$' \| \
16511         X"$ac_file" : 'X\(/\)' \| \
16512         .     : '\(.\)' 2>/dev/null ||
16513echo X"$ac_file" |
16514    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
16515  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
16516  	  /^X\(\/\/\)$/{ s//\1/; q; }
16517  	  /^X\(\/\).*/{ s//\1/; q; }
16518  	  s/.*/./; q'`
16519  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16520    { case "$ac_dir" in
16521  [\\/]* | ?:[\\/]* ) as_incr_dir=;;
16522  *)                      as_incr_dir=.;;
16523esac
16524as_dummy="$ac_dir"
16525for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
16526  case $as_mkdir_dir in
16527    # Skip DOS drivespec
16528    ?:) as_incr_dir=$as_mkdir_dir ;;
16529    *)
16530      as_incr_dir=$as_incr_dir/$as_mkdir_dir
16531      test -d "$as_incr_dir" || mkdir "$as_incr_dir"
16532    ;;
16533  esac
16534done; }
16535
16536    ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
16537    # A "../" for each directory in $ac_dir_suffix.
16538    ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
16539  else
16540    ac_dir_suffix= ac_dots=
16541  fi
16542
16543  case $srcdir in
16544  .)  ac_srcdir=.
16545      if test -z "$ac_dots"; then
16546         ac_top_srcdir=.
16547      else
16548         ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
16549      fi ;;
16550  [\\/]* | ?:[\\/]* )
16551      ac_srcdir=$srcdir$ac_dir_suffix;
16552      ac_top_srcdir=$srcdir ;;
16553  *) # Relative path.
16554    ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
16555    ac_top_srcdir=$ac_dots$srcdir ;;
16556  esac
16557
16558  case $INSTALL in
16559  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
16560  *) ac_INSTALL=$ac_dots$INSTALL ;;
16561  esac
16562
16563  if test x"$ac_file" != x-; then
16564    { echo "$as_me:16564: creating $ac_file" >&5
16565echo "$as_me: creating $ac_file" >&6;}
16566    rm -f "$ac_file"
16567  fi
16568  # Let's still pretend it is `configure' which instantiates (i.e., don't
16569  # use $as_me), people would be surprised to read:
16570  #    /* config.h.  Generated automatically by config.status.  */
16571  configure_input="Generated automatically from `echo $ac_file_in |
16572                                                 sed 's,.*/,,'` by configure."
16573
16574  # First look for the input files in the build tree, otherwise in the
16575  # src tree.
16576  ac_file_inputs=`IFS=:
16577    for f in $ac_file_in; do
16578      case $f in
16579      -) echo $tmp/stdin ;;
16580      [\\/$]*)
16581         # Absolute (can't be DOS-style, as IFS=:)
16582         test -f "$f" || { { echo "$as_me:16582: error: cannot find input file: $f" >&5
16583echo "$as_me: error: cannot find input file: $f" >&2;}
16584   { (exit 1); exit 1; }; }
16585         echo $f;;
16586      *) # Relative
16587         if test -f "$f"; then
16588           # Build tree
16589           echo $f
16590         elif test -f "$srcdir/$f"; then
16591           # Source tree
16592           echo $srcdir/$f
16593         else
16594           # /dev/null tree
16595           { { echo "$as_me:16595: error: cannot find input file: $f" >&5
16596echo "$as_me: error: cannot find input file: $f" >&2;}
16597   { (exit 1); exit 1; }; }
16598         fi;;
16599      esac
16600    done` || { (exit 1); exit 1; }
16601EOF
16602cat >>$CONFIG_STATUS <<EOF
16603  sed "$ac_vpsub
16604$extrasub
16605EOF
16606cat >>$CONFIG_STATUS <<\EOF
16607:t
16608/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
16609s,@configure_input@,$configure_input,;t t
16610s,@srcdir@,$ac_srcdir,;t t
16611s,@top_srcdir@,$ac_top_srcdir,;t t
16612s,@INSTALL@,$ac_INSTALL,;t t
16613" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
16614  rm -f $tmp/stdin
16615  if test x"$ac_file" != x-; then
16616    mv $tmp/out $ac_file
16617  else
16618    cat $tmp/out
16619    rm -f $tmp/out
16620  fi
16621
16622done
16623EOF
16624cat >>$CONFIG_STATUS <<\EOF
16625
16626#
16627# CONFIG_HEADER section.
16628#
16629
16630# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
16631# NAME is the cpp macro being defined and VALUE is the value it is being given.
16632#
16633# ac_d sets the value in "#define NAME VALUE" lines.
16634ac_dA='s,^\([ 	]*\)#\([ 	]*define[ 	][ 	]*\)'
16635ac_dB='[ 	].*$,\1#\2'
16636ac_dC=' '
16637ac_dD=',;t'
16638# ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
16639ac_iA='s,^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
16640ac_iB='\([ 	]\),\1#\2define\3'
16641ac_iC=' '
16642ac_iD='\4,;t'
16643# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
16644ac_uA='s,^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
16645ac_uB='$,\1#\2define\3'
16646ac_uC=' '
16647ac_uD=',;t'
16648
16649for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
16650  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16651  case $ac_file in
16652  - | *:- | *:-:* ) # input from stdin
16653        cat >$tmp/stdin
16654        ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16655        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16656  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16657        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16658  * )   ac_file_in=$ac_file.in ;;
16659  esac
16660
16661  test x"$ac_file" != x- && { echo "$as_me:16661: creating $ac_file" >&5
16662echo "$as_me: creating $ac_file" >&6;}
16663
16664  # First look for the input files in the build tree, otherwise in the
16665  # src tree.
16666  ac_file_inputs=`IFS=:
16667    for f in $ac_file_in; do
16668      case $f in
16669      -) echo $tmp/stdin ;;
16670      [\\/$]*)
16671         # Absolute (can't be DOS-style, as IFS=:)
16672         test -f "$f" || { { echo "$as_me:16672: error: cannot find input file: $f" >&5
16673echo "$as_me: error: cannot find input file: $f" >&2;}
16674   { (exit 1); exit 1; }; }
16675         echo $f;;
16676      *) # Relative
16677         if test -f "$f"; then
16678           # Build tree
16679           echo $f
16680         elif test -f "$srcdir/$f"; then
16681           # Source tree
16682           echo $srcdir/$f
16683         else
16684           # /dev/null tree
16685           { { echo "$as_me:16685: error: cannot find input file: $f" >&5
16686echo "$as_me: error: cannot find input file: $f" >&2;}
16687   { (exit 1); exit 1; }; }
16688         fi;;
16689      esac
16690    done` || { (exit 1); exit 1; }
16691  # Remove the trailing spaces.
16692  sed 's/[ 	]*$//' $ac_file_inputs >$tmp/in
16693
16694EOF
16695
16696# Transform confdefs.h into two sed scripts, `conftest.defines' and
16697# `conftest.undefs', that substitutes the proper values into
16698# config.h.in to produce config.h.  The first handles `#define'
16699# templates, and the second `#undef' templates.
16700# And first: Protect against being on the right side of a sed subst in
16701# config.status.  Protect against being in an unquoted here document
16702# in config.status.
16703rm -f conftest.defines conftest.undefs
16704# Using a here document instead of a string reduces the quoting nightmare.
16705# Putting comments in sed scripts is not portable.
16706#
16707# `end' is used to avoid that the second main sed command (meant for
16708# 0-ary CPP macros) applies to n-ary macro definitions.
16709# See the Autoconf documentation for `clear'.
16710cat >confdef2sed.sed <<\EOF
16711s/[\\&,]/\\&/g
16712s,[\\$`],\\&,g
16713t clear
16714: clear
16715s,^[ 	]*#[ 	]*define[ 	][ 	]*\(\([^ 	(][^ 	(]*\)([^)]*)\)[ 	]*\(.*\)$,${ac_dA}\2${ac_dB}\1${ac_dC}\3${ac_dD},gp
16716t end
16717s,^[ 	]*#[ 	]*define[ 	][ 	]*\([^ 	][^ 	]*\)[ 	]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
16718: end
16719EOF
16720# If some macros were called several times there might be several times
16721# the same #defines, which is useless.  Nevertheless, we may not want to
16722# sort them, since we want the *last* AC-DEFINE to be honored.
16723uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
16724sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
16725sed 's/ac_d/ac_i/g' conftest.defines >>conftest.undefs
16726rm -f confdef2sed.sed
16727
16728# This sed command replaces #undef with comments.  This is necessary, for
16729# example, in the case of _POSIX_SOURCE, which is predefined and required
16730# on some systems where configure will not decide to define it.
16731cat >>conftest.undefs <<\EOF
16732s,^[ 	]*#[ 	]*undef[ 	][ 	]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
16733EOF
16734
16735# Break up conftest.defines because some shells have a limit on the size
16736# of here documents, and old seds have small limits too (100 cmds).
16737echo '  # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
16738echo '  if egrep "^[ 	]*#[ 	]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
16739echo '  # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
16740echo '  :' >>$CONFIG_STATUS
16741rm -f conftest.tail
16742while grep . conftest.defines >/dev/null
16743do
16744  # Write a limited-size here document to $tmp/defines.sed.
16745  echo '  cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
16746  # Speed up: don't consider the non `#define' lines.
16747  echo '/^[ 	]*#[ 	]*define/!b' >>$CONFIG_STATUS
16748  # Work around the forget-to-reset-the-flag bug.
16749  echo 't clr' >>$CONFIG_STATUS
16750  echo ': clr' >>$CONFIG_STATUS
16751  sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
16752  echo 'CEOF
16753  sed -f $tmp/defines.sed $tmp/in >$tmp/out
16754  rm -f $tmp/in
16755  mv $tmp/out $tmp/in
16756' >>$CONFIG_STATUS
16757  sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
16758  rm -f conftest.defines
16759  mv conftest.tail conftest.defines
16760done
16761rm -f conftest.defines
16762echo '  fi # egrep' >>$CONFIG_STATUS
16763echo >>$CONFIG_STATUS
16764
16765# Break up conftest.undefs because some shells have a limit on the size
16766# of here documents, and old seds have small limits too (100 cmds).
16767echo '  # Handle all the #undef templates' >>$CONFIG_STATUS
16768rm -f conftest.tail
16769while grep . conftest.undefs >/dev/null
16770do
16771  # Write a limited-size here document to $tmp/undefs.sed.
16772  echo '  cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
16773  # Speed up: don't consider the non `#undef'
16774  echo '/^[ 	]*#[ 	]*undef/!b' >>$CONFIG_STATUS
16775  # Work around the forget-to-reset-the-flag bug.
16776  echo 't clr' >>$CONFIG_STATUS
16777  echo ': clr' >>$CONFIG_STATUS
16778  sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
16779  echo 'CEOF
16780  sed -f $tmp/undefs.sed $tmp/in >$tmp/out
16781  rm -f $tmp/in
16782  mv $tmp/out $tmp/in
16783' >>$CONFIG_STATUS
16784  sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
16785  rm -f conftest.undefs
16786  mv conftest.tail conftest.undefs
16787done
16788rm -f conftest.undefs
16789
16790cat >>$CONFIG_STATUS <<\EOF
16791  # Let's still pretend it is `configure' which instantiates (i.e., don't
16792  # use $as_me), people would be surprised to read:
16793  #    /* config.h.  Generated automatically by config.status.  */
16794  if test x"$ac_file" = x-; then
16795    echo "/* Generated automatically by configure.  */" >$tmp/config.h
16796  else
16797    echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
16798  fi
16799  cat $tmp/in >>$tmp/config.h
16800  rm -f $tmp/in
16801  if test x"$ac_file" != x-; then
16802    if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
16803      { echo "$as_me:16803: $ac_file is unchanged" >&5
16804echo "$as_me: $ac_file is unchanged" >&6;}
16805    else
16806      ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16807         X"$ac_file" : 'X\(//\)[^/]' \| \
16808         X"$ac_file" : 'X\(//\)$' \| \
16809         X"$ac_file" : 'X\(/\)' \| \
16810         .     : '\(.\)' 2>/dev/null ||
16811echo X"$ac_file" |
16812    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
16813  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
16814  	  /^X\(\/\/\)$/{ s//\1/; q; }
16815  	  /^X\(\/\).*/{ s//\1/; q; }
16816  	  s/.*/./; q'`
16817      if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16818        { case "$ac_dir" in
16819  [\\/]* | ?:[\\/]* ) as_incr_dir=;;
16820  *)                      as_incr_dir=.;;
16821esac
16822as_dummy="$ac_dir"
16823for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
16824  case $as_mkdir_dir in
16825    # Skip DOS drivespec
16826    ?:) as_incr_dir=$as_mkdir_dir ;;
16827    *)
16828      as_incr_dir=$as_incr_dir/$as_mkdir_dir
16829      test -d "$as_incr_dir" || mkdir "$as_incr_dir"
16830    ;;
16831  esac
16832done; }
16833
16834      fi
16835      rm -f $ac_file
16836      mv $tmp/config.h $ac_file
16837    fi
16838  else
16839    cat $tmp/config.h
16840    rm -f $tmp/config.h
16841  fi
16842done
16843EOF
16844
16845cat >>$CONFIG_STATUS <<\EOF
16846
16847{ (exit 0); exit 0; }
16848EOF
16849chmod +x $CONFIG_STATUS
16850ac_clean_files=$ac_clean_files_save
16851
16852# configure is writing to config.log, and then calls config.status.
16853# config.status does its own redirection, appending to config.log.
16854# Unfortunately, on DOS this fails, as config.log is still kept open
16855# by configure, so config.status won't be able to write to it; its
16856# output is simply discarded.  So we exec the FD to /dev/null,
16857# effectively closing config.log, so it can be properly (re)opened and
16858# appended to by config.status.  When coming back to configure, we
16859# need to make the FD available again.
16860if test "$no_create" != yes; then
16861  ac_cs_success=:
16862  exec 5>/dev/null
16863  $SHELL $CONFIG_STATUS || ac_cs_success=false
16864  exec 5>>config.log
16865  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
16866  # would make configure fail if this is the last instruction.
16867  $ac_cs_success || { (exit 1); exit 1; }
16868fi
16869
16870