configure revision e39b573c
1#! /bin/sh
2# Guess values for system-dependent variables and create Makefiles.
3# Generated by Autoconf 2.52.20101002.
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-class=XXX    override X applications class (default XTerm)
687  --with-app-defaults=DIR directory in which to install resource files (default: EPREFIX/lib/X11/app-defaults)
688  --with-icondir=DIR      directory in which to install icons (default: EPREFIX/share/pixmaps)
689  --disable-desktop       disable install of xterm desktop files
690  --with-desktop-category=XXX  one or more desktop catgories or auto
691  --with-reference=XXX    program to use as permissions-reference
692  --with-xterm-symlink=XXX make symbolic link to installed xterm
693  --disable-setuid        disable setuid in xterm, do not install setuid/setgid
694  --disable-setgid        disable setgid in xterm, do not install setuid/setgid
695  --with-setuid=XXX       use the given setuid user
696  --with-utmp-setgid=XXX  use setgid to match utmp/utmpx file
697  --with-utempter         use utempter library for access to utmp
698  --with-tty-group=XXX    use XXX for the tty-group
699  --with-x                use the X Window System
700  --with-pkg-config{=path} enable/disable use of pkg-config
701  --with-Xaw3d            link with Xaw 3d library
702  --with-neXtaw           link with neXT Athena library
703  --with-XawPlus          link with Athena-Plus library
704  --enable-narrowproto    enable narrow prototypes for X libraries
705  --disable-imake         disable use of imake for definitions
706Terminal Configuration:
707  --with-terminal-id=V    set default decTerminalID (default: vt100)
708  --with-terminal-type=T  set default $TERM (default: xterm)
709  --with-own-terminfo=P   set default $TERMINFO (default: from environment)
710Optional Features:
711  --disable-active-icon   disable X11R6.3 active-icon feature
712  --disable-ansi-color    disable ANSI color
713  --disable-16-color      disable 16-color support
714  --enable-256-color      enable 256-color support
715  --enable-88-color       enable 88-color support
716  --disable-blink-cursor  disable support for blinking cursor
717  --enable-broken-osc     allow broken Linux OSC-strings
718  --disable-broken-st     disallow broken string-terminators
719  --disable-c1-print      disallow -k8 option for printable 128-159
720  --disable-bold-color    disable PC-style mapping of bold colors
721  --disable-color-class   disable separate color class resources
722  --disable-color-mode    disable default colorMode resource
723  --disable-highlighting  disable support for color highlighting
724  --disable-doublechars   disable support for double-size chars
725  --disable-boxchars      disable fallback-support for box chars
726  --enable-exec-xterm     enable "spawn-new-terminal" action
727  --disable-freetype      disable freetype library-support
728  --with-freetype-cflags  -D/-I options for compiling with FreeType
729  --with-freetype-libs    -L/-l options to link FreeType
730  --enable-hp-fkeys       enable support for HP-style function keys
731  --enable-sco-fkeys      enable support for SCO-style function keys
732  --disable-sun-fkeys     disable support for Sun-style function keys
733  --disable-fifo-lines    disable FIFO-storage for saved-lines
734  --disable-i18n          disable internationalization
735  --disable-initial-erase disable setup for stty erase
736  --disable-input-method  disable input-method
737  --enable-load-vt-fonts  enable load-vt-fonts() action
738  --enable-logging        enable logging
739  --enable-logfile-exec   enable exec'd logfile filter
740  --disable-maximize      disable actions for iconify/deiconify/maximize/restore
741  --disable-num-lock      disable NumLock keypad support
742  --disable-paste64       disable get/set base64 selection data
743  --disable-pty-handshake disable pty-handshake support
744  --enable-readline-mouse enable support for mouse in readline applications
745  --disable-regex         disable regular-expression selections
746  --with-pcre             use PCRE for regular-expressions
747  --disable-rightbar      disable right-scrollbar support
748  --disable-samename      disable check for redundant name-change
749  --disable-session-mgt   disable support for session management
750  --disable-tcap-fkeys    disable termcap function-keys support
751  --disable-tcap-query    disable compiled-in termcap-query support
752  --disable-tek4014       disable tek4014 emulation
753  --enable-toolbar        compile-in toolbar for pulldown menus
754  --disable-vt52          disable VT52 emulation
755  --enable-mini-luit      enable mini-luit (built-in Latin9 support)
756  --enable-luit           enable luit filter (Unicode translation)
757  --enable-wide-chars     enable wide-character support
758  --enable-16bit-chars    enable 16-bit character support
759  --enable-dabbrev        enable dynamic-abbreviation support
760  --enable-dec-locator    enable DECterm Locator support
761  --disable-rectangles    disable VT420 rectangle support
762  --disable-ziconbeep     disable -ziconbeep option
763Testing/development Options:
764  --enable-trace          test: set to enable debugging traces
765  --disable-leaks         test: set to test memory leaks
766  --disable-echo          display "compiling" commands
767  --enable-xmc-glitch     test: enable xmc magic-cookie emulation
768  --enable-warnings       test: turn on GCC compiler warnings
769  --disable-rpath-hack    don't add rpath options for additional libraries
770
771Some influential environment variables:
772  CC          C compiler command
773  CFLAGS      C compiler flags
774  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
775              nonstandard directory <lib dir>
776  CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
777              headers in a nonstandard directory <include dir>
778  CPP         C preprocessor
779
780Use these variables to override the choices made by `configure' or to help
781it to find libraries and programs with nonstandard names/locations.
782
783EOF
784fi
785
786if test "$ac_init_help" = "recursive"; then
787  # If there are subdirs, report their specific --help.
788  ac_popdir=`pwd`
789  for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
790    cd $ac_subdir
791    # A "../" for each directory in /$ac_subdir.
792    ac_dots=`echo $ac_subdir |
793             sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
794
795    case $srcdir in
796    .) # No --srcdir option.  We are building in place.
797      ac_sub_srcdir=$srcdir ;;
798    [\\/]* | ?:[\\/]* ) # Absolute path.
799      ac_sub_srcdir=$srcdir/$ac_subdir ;;
800    *) # Relative path.
801      ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
802    esac
803
804    # Check for guested configure; otherwise get Cygnus style configure.
805    if test -f $ac_sub_srcdir/configure.gnu; then
806      echo
807      $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
808    elif test -f $ac_sub_srcdir/configure; then
809      echo
810      $SHELL $ac_sub_srcdir/configure  --help=recursive
811    elif test -f $ac_sub_srcdir/configure.ac ||
812           test -f $ac_sub_srcdir/configure.in; then
813      echo
814      $ac_configure --help
815    else
816      echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
817    fi
818    cd $ac_popdir
819  done
820fi
821
822test -n "$ac_init_help" && exit 0
823if $ac_init_version; then
824  cat <<\EOF
825
826Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
827Free Software Foundation, Inc.
828This configure script is free software; the Free Software Foundation
829gives unlimited permission to copy, distribute and modify it.
830EOF
831  exit 0
832fi
833exec 5>config.log
834cat >&5 <<EOF
835This file contains any messages produced by compilers while
836running configure, to aid debugging if configure makes a mistake.
837
838It was created by $as_me, which was
839generated by GNU Autoconf 2.52.20101002.  Invocation command line was
840
841  $ $0 $@
842
843EOF
844{
845cat <<_ASUNAME
846## ---------- ##
847## Platform.  ##
848## ---------- ##
849
850hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
851uname -m = `(uname -m) 2>/dev/null || echo unknown`
852uname -r = `(uname -r) 2>/dev/null || echo unknown`
853uname -s = `(uname -s) 2>/dev/null || echo unknown`
854uname -v = `(uname -v) 2>/dev/null || echo unknown`
855
856/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
857/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
858
859/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
860/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
861/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
862hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
863/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
864/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
865/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
866
867PATH = $PATH
868
869_ASUNAME
870} >&5
871
872cat >&5 <<EOF
873## ------------ ##
874## Core tests.  ##
875## ------------ ##
876
877EOF
878
879# Keep a trace of the command line.
880# Strip out --no-create and --no-recursion so they do not pile up.
881# Also quote any args containing shell meta-characters.
882ac_configure_args=
883ac_sep=
884for ac_arg
885do
886  case $ac_arg in
887  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
888  | --no-cr | --no-c) ;;
889  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
890  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
891  *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
892    ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
893    ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
894    ac_sep=" " ;;
895  *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
896     ac_sep=" " ;;
897  esac
898  # Get rid of the leading space.
899done
900
901# When interrupted or exit'd, cleanup temporary files, and complete
902# config.log.  We remove comments because anyway the quotes in there
903# would cause problems or look ugly.
904trap 'exit_status=$?
905  # Save into config.log some information that might help in debugging.
906  echo >&5
907  echo "## ----------------- ##" >&5
908  echo "## Cache variables.  ##" >&5
909  echo "## ----------------- ##" >&5
910  echo >&5
911  # The following way of writing the cache mishandles newlines in values,
912{
913  (set) 2>&1 |
914    case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
915    *ac_space=\ *)
916      sed -n \
917        "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
918    	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
919      ;;
920    *)
921      sed -n \
922        "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
923      ;;
924    esac;
925} >&5
926  sed "/^$/d" confdefs.h >conftest.log
927  if test -s conftest.log; then
928    echo >&5
929    echo "## ------------ ##" >&5
930    echo "## confdefs.h.  ##" >&5
931    echo "## ------------ ##" >&5
932    echo >&5
933    cat conftest.log >&5
934  fi
935  (echo; echo) >&5
936  test "$ac_signal" != 0 &&
937    echo "$as_me: caught signal $ac_signal" >&5
938  echo "$as_me: exit $exit_status" >&5
939  rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
940    exit $exit_status
941     ' 0
942for ac_signal in 1 2 13 15; do
943  trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
944done
945ac_signal=0
946
947# confdefs.h avoids OS command line length limits that DEFS can exceed.
948rm -rf conftest* confdefs.h
949# AIX cpp loses on an empty file, so make sure it contains at least a newline.
950echo >confdefs.h
951
952# Let the site file select an alternate cache file if it wants to.
953# Prefer explicitly selected file to automatically selected ones.
954if test -z "$CONFIG_SITE"; then
955  if test "x$prefix" != xNONE; then
956    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
957  else
958    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
959  fi
960fi
961for ac_site_file in $CONFIG_SITE; do
962  if test -r "$ac_site_file"; then
963    { echo "$as_me:963: loading site script $ac_site_file" >&5
964echo "$as_me: loading site script $ac_site_file" >&6;}
965    cat "$ac_site_file" >&5
966    . "$ac_site_file"
967  fi
968done
969
970if test -r "$cache_file"; then
971  # Some versions of bash will fail to source /dev/null (special
972  # files actually), so we avoid doing that.
973  if test -f "$cache_file"; then
974    { echo "$as_me:974: loading cache $cache_file" >&5
975echo "$as_me: loading cache $cache_file" >&6;}
976    case $cache_file in
977      [\\/]* | ?:[\\/]* ) . $cache_file;;
978      *)                      . ./$cache_file;;
979    esac
980  fi
981else
982  { echo "$as_me:982: creating cache $cache_file" >&5
983echo "$as_me: creating cache $cache_file" >&6;}
984  >$cache_file
985fi
986
987# Check that the precious variables saved in the cache have kept the same
988# value.
989ac_cache_corrupted=false
990for ac_var in `(set) 2>&1 |
991               sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
992  eval ac_old_set=\$ac_cv_env_${ac_var}_set
993  eval ac_new_set=\$ac_env_${ac_var}_set
994  eval ac_old_val="\$ac_cv_env_${ac_var}_value"
995  eval ac_new_val="\$ac_env_${ac_var}_value"
996  case $ac_old_set,$ac_new_set in
997    set,)
998      { echo "$as_me:998: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
999echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1000      ac_cache_corrupted=: ;;
1001    ,set)
1002      { echo "$as_me:1002: error: \`$ac_var' was not set in the previous run" >&5
1003echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1004      ac_cache_corrupted=: ;;
1005    ,);;
1006    *)
1007      if test "x$ac_old_val" != "x$ac_new_val"; then
1008        { echo "$as_me:1008: error: \`$ac_var' has changed since the previous run:" >&5
1009echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1010        { echo "$as_me:1010:   former value:  $ac_old_val" >&5
1011echo "$as_me:   former value:  $ac_old_val" >&2;}
1012        { echo "$as_me:1012:   current value: $ac_new_val" >&5
1013echo "$as_me:   current value: $ac_new_val" >&2;}
1014        ac_cache_corrupted=:
1015      fi;;
1016  esac
1017  # Pass precious variables to config.status.  It doesn't matter if
1018  # we pass some twice (in addition to the command line arguments).
1019  if test "$ac_new_set" = set; then
1020    case $ac_new_val in
1021    *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1022      ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1023      ac_configure_args="$ac_configure_args '$ac_arg'"
1024      ;;
1025    *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1026       ;;
1027    esac
1028  fi
1029done
1030if $ac_cache_corrupted; then
1031  { echo "$as_me:1031: error: changes in the environment can compromise the build" >&5
1032echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1033  { { echo "$as_me:1033: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1034echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1035   { (exit 1); exit 1; }; }
1036fi
1037
1038ac_ext=c
1039ac_cpp='$CPP $CPPFLAGS'
1040ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1041ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1042ac_compiler_gnu=$ac_cv_c_compiler_gnu
1043ac_main_return=return
1044
1045case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
1046  *c*,-n*) ECHO_N= ECHO_C='
1047' ECHO_T='	' ;;
1048  *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
1049  *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
1050esac
1051echo "#! $SHELL" >conftest.sh
1052echo  "exit 0"   >>conftest.sh
1053chmod +x conftest.sh
1054if { (echo "$as_me:1054: PATH=\".;.\"; conftest.sh") >&5
1055  (PATH=".;."; conftest.sh) 2>&5
1056  ac_status=$?
1057  echo "$as_me:1057: \$? = $ac_status" >&5
1058  (exit $ac_status); }; then
1059  ac_path_separator=';'
1060else
1061  ac_path_separator=:
1062fi
1063PATH_SEPARATOR="$ac_path_separator"
1064rm -f conftest.sh
1065
1066ac_config_headers="$ac_config_headers xtermcfg.h:xtermcfg.hin"
1067
1068ac_aux_dir=
1069for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1070  if test -f $ac_dir/install-sh; then
1071    ac_aux_dir=$ac_dir
1072    ac_install_sh="$ac_aux_dir/install-sh -c"
1073    break
1074  elif test -f $ac_dir/install.sh; then
1075    ac_aux_dir=$ac_dir
1076    ac_install_sh="$ac_aux_dir/install.sh -c"
1077    break
1078  elif test -f $ac_dir/shtool; then
1079    ac_aux_dir=$ac_dir
1080    ac_install_sh="$ac_aux_dir/shtool install -c"
1081    break
1082  fi
1083done
1084if test -z "$ac_aux_dir"; then
1085  { { echo "$as_me:1085: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1086echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1087   { (exit 1); exit 1; }; }
1088fi
1089ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1090ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1091ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1092
1093# Make sure we can run config.sub.
1094$ac_config_sub sun4 >/dev/null 2>&1 ||
1095  { { echo "$as_me:1095: error: cannot run $ac_config_sub" >&5
1096echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1097   { (exit 1); exit 1; }; }
1098
1099echo "$as_me:1099: checking build system type" >&5
1100echo $ECHO_N "checking build system type... $ECHO_C" >&6
1101if test "${ac_cv_build+set}" = set; then
1102  echo $ECHO_N "(cached) $ECHO_C" >&6
1103else
1104  ac_cv_build_alias=$build_alias
1105test -z "$ac_cv_build_alias" &&
1106  ac_cv_build_alias=`$ac_config_guess`
1107test -z "$ac_cv_build_alias" &&
1108  { { echo "$as_me:1108: error: cannot guess build type; you must specify one" >&5
1109echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1110   { (exit 1); exit 1; }; }
1111ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1112  { { echo "$as_me:1112: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1113echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1114   { (exit 1); exit 1; }; }
1115
1116fi
1117echo "$as_me:1117: result: $ac_cv_build" >&5
1118echo "${ECHO_T}$ac_cv_build" >&6
1119build=$ac_cv_build
1120build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1121build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1122build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1123
1124if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1125	echo "$as_me:1125: checking host system type" >&5
1126echo $ECHO_N "checking host system type... $ECHO_C" >&6
1127if test "${ac_cv_host+set}" = set; then
1128  echo $ECHO_N "(cached) $ECHO_C" >&6
1129else
1130  ac_cv_host_alias=$host_alias
1131test -z "$ac_cv_host_alias" &&
1132  ac_cv_host_alias=$ac_cv_build_alias
1133ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1134  { { echo "$as_me:1134: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1135echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1136   { (exit 1); exit 1; }; }
1137
1138fi
1139echo "$as_me:1139: result: $ac_cv_host" >&5
1140echo "${ECHO_T}$ac_cv_host" >&6
1141host=$ac_cv_host
1142host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1143host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1144host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1145
1146	system_name="$host_os"
1147else
1148	system_name="`(uname -s -r) 2>/dev/null`"
1149	if test -z "$system_name" ; then
1150		system_name="`(hostname) 2>/dev/null`"
1151	fi
1152fi
1153test -n "$system_name" && cat >>confdefs.h <<EOF
1154#define SYSTEM_NAME "$system_name"
1155EOF
1156
1157if test "${cf_cv_system_name+set}" = set; then
1158  echo $ECHO_N "(cached) $ECHO_C" >&6
1159else
1160  cf_cv_system_name="$system_name"
1161fi
1162
1163test -z "$system_name" && system_name="$cf_cv_system_name"
1164test -n "$cf_cv_system_name" && echo "$as_me:1164: result: Configuring for $cf_cv_system_name" >&5
1165echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1166
1167if test ".$system_name" != ".$cf_cv_system_name" ; then
1168	echo "$as_me:1168: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1169echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1170	{ { echo "$as_me:1170: error: \"Please remove config.cache and try again.\"" >&5
1171echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1172   { (exit 1); exit 1; }; }
1173fi
1174
1175###	checks for alternative programs
1176
1177case "$host_os" in
1178openedition)	: ${CFLAGS="-O2 -Wc,dll -Wl,EDIT=NO"}
1179		: ${CPPFLAGS="-D_ALL_SOURCE"}
1180		: ${LIBS="/usr/lib/Xaw.x /usr/lib/SM.x /usr/lib/ICE.x /usr/lib/X11.x"}
1181		: ${CC=c89};;
1182darwin*)
1183		: ${LDFLAGS}="${LDFLAGS} -Wl,-bind_at_load";;
1184esac
1185
1186ac_ext=c
1187ac_cpp='$CPP $CPPFLAGS'
1188ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1189ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1190ac_compiler_gnu=$ac_cv_c_compiler_gnu
1191ac_main_return=return
1192if test -n "$ac_tool_prefix"; then
1193  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1194set dummy ${ac_tool_prefix}gcc; ac_word=$2
1195echo "$as_me:1195: checking for $ac_word" >&5
1196echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1197if test "${ac_cv_prog_CC+set}" = set; then
1198  echo $ECHO_N "(cached) $ECHO_C" >&6
1199else
1200  if test -n "$CC"; then
1201  ac_cv_prog_CC="$CC" # Let the user override the test.
1202else
1203  ac_save_IFS=$IFS; IFS=$ac_path_separator
1204ac_dummy="$PATH"
1205for ac_dir in $ac_dummy; do
1206  IFS=$ac_save_IFS
1207  test -z "$ac_dir" && ac_dir=.
1208  $as_executable_p "$ac_dir/$ac_word" || continue
1209ac_cv_prog_CC="${ac_tool_prefix}gcc"
1210echo "$as_me:1210: found $ac_dir/$ac_word" >&5
1211break
1212done
1213
1214fi
1215fi
1216CC=$ac_cv_prog_CC
1217if test -n "$CC"; then
1218  echo "$as_me:1218: result: $CC" >&5
1219echo "${ECHO_T}$CC" >&6
1220else
1221  echo "$as_me:1221: result: no" >&5
1222echo "${ECHO_T}no" >&6
1223fi
1224
1225fi
1226if test -z "$ac_cv_prog_CC"; then
1227  ac_ct_CC=$CC
1228  # Extract the first word of "gcc", so it can be a program name with args.
1229set dummy gcc; ac_word=$2
1230echo "$as_me:1230: checking for $ac_word" >&5
1231echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1232if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1233  echo $ECHO_N "(cached) $ECHO_C" >&6
1234else
1235  if test -n "$ac_ct_CC"; then
1236  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1237else
1238  ac_save_IFS=$IFS; IFS=$ac_path_separator
1239ac_dummy="$PATH"
1240for ac_dir in $ac_dummy; do
1241  IFS=$ac_save_IFS
1242  test -z "$ac_dir" && ac_dir=.
1243  $as_executable_p "$ac_dir/$ac_word" || continue
1244ac_cv_prog_ac_ct_CC="gcc"
1245echo "$as_me:1245: found $ac_dir/$ac_word" >&5
1246break
1247done
1248
1249fi
1250fi
1251ac_ct_CC=$ac_cv_prog_ac_ct_CC
1252if test -n "$ac_ct_CC"; then
1253  echo "$as_me:1253: result: $ac_ct_CC" >&5
1254echo "${ECHO_T}$ac_ct_CC" >&6
1255else
1256  echo "$as_me:1256: result: no" >&5
1257echo "${ECHO_T}no" >&6
1258fi
1259
1260  CC=$ac_ct_CC
1261else
1262  CC="$ac_cv_prog_CC"
1263fi
1264
1265if test -z "$CC"; then
1266  if test -n "$ac_tool_prefix"; then
1267  # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1268set dummy ${ac_tool_prefix}cc; ac_word=$2
1269echo "$as_me:1269: checking for $ac_word" >&5
1270echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1271if test "${ac_cv_prog_CC+set}" = set; then
1272  echo $ECHO_N "(cached) $ECHO_C" >&6
1273else
1274  if test -n "$CC"; then
1275  ac_cv_prog_CC="$CC" # Let the user override the test.
1276else
1277  ac_save_IFS=$IFS; IFS=$ac_path_separator
1278ac_dummy="$PATH"
1279for ac_dir in $ac_dummy; do
1280  IFS=$ac_save_IFS
1281  test -z "$ac_dir" && ac_dir=.
1282  $as_executable_p "$ac_dir/$ac_word" || continue
1283ac_cv_prog_CC="${ac_tool_prefix}cc"
1284echo "$as_me:1284: found $ac_dir/$ac_word" >&5
1285break
1286done
1287
1288fi
1289fi
1290CC=$ac_cv_prog_CC
1291if test -n "$CC"; then
1292  echo "$as_me:1292: result: $CC" >&5
1293echo "${ECHO_T}$CC" >&6
1294else
1295  echo "$as_me:1295: result: no" >&5
1296echo "${ECHO_T}no" >&6
1297fi
1298
1299fi
1300if test -z "$ac_cv_prog_CC"; then
1301  ac_ct_CC=$CC
1302  # Extract the first word of "cc", so it can be a program name with args.
1303set dummy cc; ac_word=$2
1304echo "$as_me:1304: checking for $ac_word" >&5
1305echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1306if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1307  echo $ECHO_N "(cached) $ECHO_C" >&6
1308else
1309  if test -n "$ac_ct_CC"; then
1310  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1311else
1312  ac_save_IFS=$IFS; IFS=$ac_path_separator
1313ac_dummy="$PATH"
1314for ac_dir in $ac_dummy; do
1315  IFS=$ac_save_IFS
1316  test -z "$ac_dir" && ac_dir=.
1317  $as_executable_p "$ac_dir/$ac_word" || continue
1318ac_cv_prog_ac_ct_CC="cc"
1319echo "$as_me:1319: found $ac_dir/$ac_word" >&5
1320break
1321done
1322
1323fi
1324fi
1325ac_ct_CC=$ac_cv_prog_ac_ct_CC
1326if test -n "$ac_ct_CC"; then
1327  echo "$as_me:1327: result: $ac_ct_CC" >&5
1328echo "${ECHO_T}$ac_ct_CC" >&6
1329else
1330  echo "$as_me:1330: result: no" >&5
1331echo "${ECHO_T}no" >&6
1332fi
1333
1334  CC=$ac_ct_CC
1335else
1336  CC="$ac_cv_prog_CC"
1337fi
1338
1339fi
1340if test -z "$CC"; then
1341  # Extract the first word of "cc", so it can be a program name with args.
1342set dummy cc; ac_word=$2
1343echo "$as_me:1343: checking for $ac_word" >&5
1344echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1345if test "${ac_cv_prog_CC+set}" = set; then
1346  echo $ECHO_N "(cached) $ECHO_C" >&6
1347else
1348  if test -n "$CC"; then
1349  ac_cv_prog_CC="$CC" # Let the user override the test.
1350else
1351  ac_prog_rejected=no
1352  ac_save_IFS=$IFS; IFS=$ac_path_separator
1353ac_dummy="$PATH"
1354for ac_dir in $ac_dummy; do
1355  IFS=$ac_save_IFS
1356  test -z "$ac_dir" && ac_dir=.
1357  $as_executable_p "$ac_dir/$ac_word" || continue
1358if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1359  ac_prog_rejected=yes
1360  continue
1361fi
1362ac_cv_prog_CC="cc"
1363echo "$as_me:1363: found $ac_dir/$ac_word" >&5
1364break
1365done
1366
1367if test $ac_prog_rejected = yes; then
1368  # We found a bogon in the path, so make sure we never use it.
1369  set dummy $ac_cv_prog_CC
1370  shift
1371  if test $# != 0; then
1372    # We chose a different compiler from the bogus one.
1373    # However, it has the same basename, so the bogon will be chosen
1374    # first if we set CC to just the basename; use the full file name.
1375    shift
1376    set dummy "$ac_dir/$ac_word" ${1+"$@"}
1377    shift
1378    ac_cv_prog_CC="$@"
1379  fi
1380fi
1381fi
1382fi
1383CC=$ac_cv_prog_CC
1384if test -n "$CC"; then
1385  echo "$as_me:1385: result: $CC" >&5
1386echo "${ECHO_T}$CC" >&6
1387else
1388  echo "$as_me:1388: result: no" >&5
1389echo "${ECHO_T}no" >&6
1390fi
1391
1392fi
1393if test -z "$CC"; then
1394  if test -n "$ac_tool_prefix"; then
1395  for ac_prog in cl
1396  do
1397    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1398set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1399echo "$as_me:1399: checking for $ac_word" >&5
1400echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1401if test "${ac_cv_prog_CC+set}" = set; then
1402  echo $ECHO_N "(cached) $ECHO_C" >&6
1403else
1404  if test -n "$CC"; then
1405  ac_cv_prog_CC="$CC" # Let the user override the test.
1406else
1407  ac_save_IFS=$IFS; IFS=$ac_path_separator
1408ac_dummy="$PATH"
1409for ac_dir in $ac_dummy; do
1410  IFS=$ac_save_IFS
1411  test -z "$ac_dir" && ac_dir=.
1412  $as_executable_p "$ac_dir/$ac_word" || continue
1413ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1414echo "$as_me:1414: found $ac_dir/$ac_word" >&5
1415break
1416done
1417
1418fi
1419fi
1420CC=$ac_cv_prog_CC
1421if test -n "$CC"; then
1422  echo "$as_me:1422: result: $CC" >&5
1423echo "${ECHO_T}$CC" >&6
1424else
1425  echo "$as_me:1425: result: no" >&5
1426echo "${ECHO_T}no" >&6
1427fi
1428
1429    test -n "$CC" && break
1430  done
1431fi
1432if test -z "$CC"; then
1433  ac_ct_CC=$CC
1434  for ac_prog in cl
1435do
1436  # Extract the first word of "$ac_prog", so it can be a program name with args.
1437set dummy $ac_prog; ac_word=$2
1438echo "$as_me:1438: checking for $ac_word" >&5
1439echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1440if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1441  echo $ECHO_N "(cached) $ECHO_C" >&6
1442else
1443  if test -n "$ac_ct_CC"; then
1444  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1445else
1446  ac_save_IFS=$IFS; IFS=$ac_path_separator
1447ac_dummy="$PATH"
1448for ac_dir in $ac_dummy; do
1449  IFS=$ac_save_IFS
1450  test -z "$ac_dir" && ac_dir=.
1451  $as_executable_p "$ac_dir/$ac_word" || continue
1452ac_cv_prog_ac_ct_CC="$ac_prog"
1453echo "$as_me:1453: found $ac_dir/$ac_word" >&5
1454break
1455done
1456
1457fi
1458fi
1459ac_ct_CC=$ac_cv_prog_ac_ct_CC
1460if test -n "$ac_ct_CC"; then
1461  echo "$as_me:1461: result: $ac_ct_CC" >&5
1462echo "${ECHO_T}$ac_ct_CC" >&6
1463else
1464  echo "$as_me:1464: result: no" >&5
1465echo "${ECHO_T}no" >&6
1466fi
1467
1468  test -n "$ac_ct_CC" && break
1469done
1470
1471  CC=$ac_ct_CC
1472fi
1473
1474fi
1475
1476test -z "$CC" && { { echo "$as_me:1476: error: no acceptable cc found in \$PATH" >&5
1477echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1478   { (exit 1); exit 1; }; }
1479
1480# Provide some information about the compiler.
1481echo "$as_me:1481:" \
1482     "checking for C compiler version" >&5
1483ac_compiler=`set X $ac_compile; echo $2`
1484{ (eval echo "$as_me:1484: \"$ac_compiler --version </dev/null >&5\"") >&5
1485  (eval $ac_compiler --version </dev/null >&5) 2>&5
1486  ac_status=$?
1487  echo "$as_me:1487: \$? = $ac_status" >&5
1488  (exit $ac_status); }
1489{ (eval echo "$as_me:1489: \"$ac_compiler -v </dev/null >&5\"") >&5
1490  (eval $ac_compiler -v </dev/null >&5) 2>&5
1491  ac_status=$?
1492  echo "$as_me:1492: \$? = $ac_status" >&5
1493  (exit $ac_status); }
1494{ (eval echo "$as_me:1494: \"$ac_compiler -V </dev/null >&5\"") >&5
1495  (eval $ac_compiler -V </dev/null >&5) 2>&5
1496  ac_status=$?
1497  echo "$as_me:1497: \$? = $ac_status" >&5
1498  (exit $ac_status); }
1499
1500cat >conftest.$ac_ext <<_ACEOF
1501#line 1501 "configure"
1502#include "confdefs.h"
1503
1504int
1505main ()
1506{
1507
1508  ;
1509  return 0;
1510}
1511_ACEOF
1512ac_clean_files_save=$ac_clean_files
1513ac_clean_files="$ac_clean_files a.out a.exe"
1514# Try to create an executable without -o first, disregard a.out.
1515# It will help us diagnose broken compilers, and finding out an intuition
1516# of exeext.
1517echo "$as_me:1517: checking for C compiler default output" >&5
1518echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1519ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1520if { (eval echo "$as_me:1520: \"$ac_link_default\"") >&5
1521  (eval $ac_link_default) 2>&5
1522  ac_status=$?
1523  echo "$as_me:1523: \$? = $ac_status" >&5
1524  (exit $ac_status); }; then
1525  # Find the output, starting from the most likely.  This scheme is
1526# not robust to junk in `.', hence go to wildcards (a.*) only as a last
1527# resort.
1528for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1529                ls a.out conftest 2>/dev/null;
1530                ls a.* conftest.* 2>/dev/null`; do
1531  case $ac_file in
1532    *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1533    a.out ) # We found the default executable, but exeext='' is most
1534            # certainly right.
1535            break;;
1536    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1537          # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1538          export ac_cv_exeext
1539          break;;
1540    * ) break;;
1541  esac
1542done
1543else
1544  echo "$as_me: failed program was:" >&5
1545cat conftest.$ac_ext >&5
1546{ { echo "$as_me:1546: error: C compiler cannot create executables" >&5
1547echo "$as_me: error: C compiler cannot create executables" >&2;}
1548   { (exit 77); exit 77; }; }
1549fi
1550
1551ac_exeext=$ac_cv_exeext
1552echo "$as_me:1552: result: $ac_file" >&5
1553echo "${ECHO_T}$ac_file" >&6
1554
1555# Check the compiler produces executables we can run.  If not, either
1556# the compiler is broken, or we cross compile.
1557echo "$as_me:1557: checking whether the C compiler works" >&5
1558echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1559# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1560# If not cross compiling, check that we can run a simple program.
1561if test "$cross_compiling" != yes; then
1562  if { ac_try='./$ac_file'
1563  { (eval echo "$as_me:1563: \"$ac_try\"") >&5
1564  (eval $ac_try) 2>&5
1565  ac_status=$?
1566  echo "$as_me:1566: \$? = $ac_status" >&5
1567  (exit $ac_status); }; }; then
1568    cross_compiling=no
1569  else
1570    if test "$cross_compiling" = maybe; then
1571	cross_compiling=yes
1572    else
1573	{ { echo "$as_me:1573: error: cannot run C compiled programs.
1574If you meant to cross compile, use \`--host'." >&5
1575echo "$as_me: error: cannot run C compiled programs.
1576If you meant to cross compile, use \`--host'." >&2;}
1577   { (exit 1); exit 1; }; }
1578    fi
1579  fi
1580fi
1581echo "$as_me:1581: result: yes" >&5
1582echo "${ECHO_T}yes" >&6
1583
1584rm -f a.out a.exe conftest$ac_cv_exeext
1585ac_clean_files=$ac_clean_files_save
1586# Check the compiler produces executables we can run.  If not, either
1587# the compiler is broken, or we cross compile.
1588echo "$as_me:1588: checking whether we are cross compiling" >&5
1589echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1590echo "$as_me:1590: result: $cross_compiling" >&5
1591echo "${ECHO_T}$cross_compiling" >&6
1592
1593echo "$as_me:1593: checking for executable suffix" >&5
1594echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1595if { (eval echo "$as_me:1595: \"$ac_link\"") >&5
1596  (eval $ac_link) 2>&5
1597  ac_status=$?
1598  echo "$as_me:1598: \$? = $ac_status" >&5
1599  (exit $ac_status); }; then
1600  # If both `conftest.exe' and `conftest' are `present' (well, observable)
1601# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1602# work properly (i.e., refer to `conftest.exe'), while it won't with
1603# `rm'.
1604for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1605  case $ac_file in
1606    *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1607    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1608          export ac_cv_exeext
1609          break;;
1610    * ) break;;
1611  esac
1612done
1613else
1614  { { echo "$as_me:1614: error: cannot compute EXEEXT: cannot compile and link" >&5
1615echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1616   { (exit 1); exit 1; }; }
1617fi
1618
1619rm -f conftest$ac_cv_exeext
1620echo "$as_me:1620: result: $ac_cv_exeext" >&5
1621echo "${ECHO_T}$ac_cv_exeext" >&6
1622
1623rm -f conftest.$ac_ext
1624EXEEXT=$ac_cv_exeext
1625ac_exeext=$EXEEXT
1626echo "$as_me:1626: checking for object suffix" >&5
1627echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1628if test "${ac_cv_objext+set}" = set; then
1629  echo $ECHO_N "(cached) $ECHO_C" >&6
1630else
1631  cat >conftest.$ac_ext <<_ACEOF
1632#line 1632 "configure"
1633#include "confdefs.h"
1634
1635int
1636main ()
1637{
1638
1639  ;
1640  return 0;
1641}
1642_ACEOF
1643rm -f conftest.o conftest.obj
1644if { (eval echo "$as_me:1644: \"$ac_compile\"") >&5
1645  (eval $ac_compile) 2>&5
1646  ac_status=$?
1647  echo "$as_me:1647: \$? = $ac_status" >&5
1648  (exit $ac_status); }; then
1649  for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1650  case $ac_file in
1651    *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1652    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1653       break;;
1654  esac
1655done
1656else
1657  echo "$as_me: failed program was:" >&5
1658cat conftest.$ac_ext >&5
1659{ { echo "$as_me:1659: error: cannot compute OBJEXT: cannot compile" >&5
1660echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1661   { (exit 1); exit 1; }; }
1662fi
1663
1664rm -f conftest.$ac_cv_objext conftest.$ac_ext
1665fi
1666echo "$as_me:1666: result: $ac_cv_objext" >&5
1667echo "${ECHO_T}$ac_cv_objext" >&6
1668OBJEXT=$ac_cv_objext
1669ac_objext=$OBJEXT
1670echo "$as_me:1670: checking whether we are using the GNU C compiler" >&5
1671echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1672if test "${ac_cv_c_compiler_gnu+set}" = set; then
1673  echo $ECHO_N "(cached) $ECHO_C" >&6
1674else
1675  cat >conftest.$ac_ext <<_ACEOF
1676#line 1676 "configure"
1677#include "confdefs.h"
1678
1679int
1680main ()
1681{
1682#ifndef __GNUC__
1683       choke me
1684#endif
1685
1686  ;
1687  return 0;
1688}
1689_ACEOF
1690rm -f conftest.$ac_objext
1691if { (eval echo "$as_me:1691: \"$ac_compile\"") >&5
1692  (eval $ac_compile) 2>&5
1693  ac_status=$?
1694  echo "$as_me:1694: \$? = $ac_status" >&5
1695  (exit $ac_status); } &&
1696         { ac_try='test -s conftest.$ac_objext'
1697  { (eval echo "$as_me:1697: \"$ac_try\"") >&5
1698  (eval $ac_try) 2>&5
1699  ac_status=$?
1700  echo "$as_me:1700: \$? = $ac_status" >&5
1701  (exit $ac_status); }; }; then
1702  ac_compiler_gnu=yes
1703else
1704  echo "$as_me: failed program was:" >&5
1705cat conftest.$ac_ext >&5
1706ac_compiler_gnu=no
1707fi
1708rm -f conftest.$ac_objext conftest.$ac_ext
1709ac_cv_c_compiler_gnu=$ac_compiler_gnu
1710
1711fi
1712echo "$as_me:1712: result: $ac_cv_c_compiler_gnu" >&5
1713echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1714GCC=`test $ac_compiler_gnu = yes && echo yes`
1715ac_test_CFLAGS=${CFLAGS+set}
1716ac_save_CFLAGS=$CFLAGS
1717CFLAGS="-g"
1718echo "$as_me:1718: checking whether $CC accepts -g" >&5
1719echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1720if test "${ac_cv_prog_cc_g+set}" = set; then
1721  echo $ECHO_N "(cached) $ECHO_C" >&6
1722else
1723  cat >conftest.$ac_ext <<_ACEOF
1724#line 1724 "configure"
1725#include "confdefs.h"
1726
1727int
1728main ()
1729{
1730
1731  ;
1732  return 0;
1733}
1734_ACEOF
1735rm -f conftest.$ac_objext
1736if { (eval echo "$as_me:1736: \"$ac_compile\"") >&5
1737  (eval $ac_compile) 2>&5
1738  ac_status=$?
1739  echo "$as_me:1739: \$? = $ac_status" >&5
1740  (exit $ac_status); } &&
1741         { ac_try='test -s conftest.$ac_objext'
1742  { (eval echo "$as_me:1742: \"$ac_try\"") >&5
1743  (eval $ac_try) 2>&5
1744  ac_status=$?
1745  echo "$as_me:1745: \$? = $ac_status" >&5
1746  (exit $ac_status); }; }; then
1747  ac_cv_prog_cc_g=yes
1748else
1749  echo "$as_me: failed program was:" >&5
1750cat conftest.$ac_ext >&5
1751ac_cv_prog_cc_g=no
1752fi
1753rm -f conftest.$ac_objext conftest.$ac_ext
1754fi
1755echo "$as_me:1755: result: $ac_cv_prog_cc_g" >&5
1756echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1757if test "$ac_test_CFLAGS" = set; then
1758  CFLAGS=$ac_save_CFLAGS
1759elif test $ac_cv_prog_cc_g = yes; then
1760  if test "$GCC" = yes; then
1761    CFLAGS="-g -O2"
1762  else
1763    CFLAGS="-g"
1764  fi
1765else
1766  if test "$GCC" = yes; then
1767    CFLAGS="-O2"
1768  else
1769    CFLAGS=
1770  fi
1771fi
1772# Some people use a C++ compiler to compile C.  Since we use `exit',
1773# in C++ we need to declare it.  In case someone uses the same compiler
1774# for both compiling C and C++ we need to have the C++ compiler decide
1775# the declaration of exit, since it's the most demanding environment.
1776cat >conftest.$ac_ext <<_ACEOF
1777#ifndef __cplusplus
1778  choke me
1779#endif
1780_ACEOF
1781rm -f conftest.$ac_objext
1782if { (eval echo "$as_me:1782: \"$ac_compile\"") >&5
1783  (eval $ac_compile) 2>&5
1784  ac_status=$?
1785  echo "$as_me:1785: \$? = $ac_status" >&5
1786  (exit $ac_status); } &&
1787         { ac_try='test -s conftest.$ac_objext'
1788  { (eval echo "$as_me:1788: \"$ac_try\"") >&5
1789  (eval $ac_try) 2>&5
1790  ac_status=$?
1791  echo "$as_me:1791: \$? = $ac_status" >&5
1792  (exit $ac_status); }; }; then
1793  for ac_declaration in \
1794   ''\
1795   '#include <stdlib.h>' \
1796   'extern "C" void std::exit (int) throw (); using std::exit;' \
1797   'extern "C" void std::exit (int); using std::exit;' \
1798   'extern "C" void exit (int) throw ();' \
1799   'extern "C" void exit (int);' \
1800   'void exit (int);'
1801do
1802  cat >conftest.$ac_ext <<_ACEOF
1803#line 1803 "configure"
1804#include "confdefs.h"
1805#include <stdlib.h>
1806$ac_declaration
1807int
1808main ()
1809{
1810exit (42);
1811  ;
1812  return 0;
1813}
1814_ACEOF
1815rm -f conftest.$ac_objext
1816if { (eval echo "$as_me:1816: \"$ac_compile\"") >&5
1817  (eval $ac_compile) 2>&5
1818  ac_status=$?
1819  echo "$as_me:1819: \$? = $ac_status" >&5
1820  (exit $ac_status); } &&
1821         { ac_try='test -s conftest.$ac_objext'
1822  { (eval echo "$as_me:1822: \"$ac_try\"") >&5
1823  (eval $ac_try) 2>&5
1824  ac_status=$?
1825  echo "$as_me:1825: \$? = $ac_status" >&5
1826  (exit $ac_status); }; }; then
1827  :
1828else
1829  echo "$as_me: failed program was:" >&5
1830cat conftest.$ac_ext >&5
1831continue
1832fi
1833rm -f conftest.$ac_objext conftest.$ac_ext
1834  cat >conftest.$ac_ext <<_ACEOF
1835#line 1835 "configure"
1836#include "confdefs.h"
1837$ac_declaration
1838int
1839main ()
1840{
1841exit (42);
1842  ;
1843  return 0;
1844}
1845_ACEOF
1846rm -f conftest.$ac_objext
1847if { (eval echo "$as_me:1847: \"$ac_compile\"") >&5
1848  (eval $ac_compile) 2>&5
1849  ac_status=$?
1850  echo "$as_me:1850: \$? = $ac_status" >&5
1851  (exit $ac_status); } &&
1852         { ac_try='test -s conftest.$ac_objext'
1853  { (eval echo "$as_me:1853: \"$ac_try\"") >&5
1854  (eval $ac_try) 2>&5
1855  ac_status=$?
1856  echo "$as_me:1856: \$? = $ac_status" >&5
1857  (exit $ac_status); }; }; then
1858  break
1859else
1860  echo "$as_me: failed program was:" >&5
1861cat conftest.$ac_ext >&5
1862fi
1863rm -f conftest.$ac_objext conftest.$ac_ext
1864done
1865rm -rf conftest*
1866if test -n "$ac_declaration"; then
1867  echo '#ifdef __cplusplus' >>confdefs.h
1868  echo $ac_declaration      >>confdefs.h
1869  echo '#endif'             >>confdefs.h
1870fi
1871
1872else
1873  echo "$as_me: failed program was:" >&5
1874cat conftest.$ac_ext >&5
1875fi
1876rm -f conftest.$ac_objext conftest.$ac_ext
1877ac_ext=c
1878ac_cpp='$CPP $CPPFLAGS'
1879ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1880ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1881ac_compiler_gnu=$ac_cv_c_compiler_gnu
1882ac_main_return=return
1883
1884ac_ext=c
1885ac_cpp='$CPP $CPPFLAGS'
1886ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1887ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1888ac_compiler_gnu=$ac_cv_c_compiler_gnu
1889ac_main_return=return
1890echo "$as_me:1890: checking how to run the C preprocessor" >&5
1891echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
1892# On Suns, sometimes $CPP names a directory.
1893if test -n "$CPP" && test -d "$CPP"; then
1894  CPP=
1895fi
1896if test -z "$CPP"; then
1897  if test "${ac_cv_prog_CPP+set}" = set; then
1898  echo $ECHO_N "(cached) $ECHO_C" >&6
1899else
1900      # Double quotes because CPP needs to be expanded
1901    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
1902    do
1903      ac_preproc_ok=false
1904for ac_c_preproc_warn_flag in '' yes
1905do
1906  # Use a header file that comes with gcc, so configuring glibc
1907  # with a fresh cross-compiler works.
1908  # On the NeXT, cc -E runs the code through the compiler's parser,
1909  # not just through cpp. "Syntax error" is here to catch this case.
1910  cat >conftest.$ac_ext <<_ACEOF
1911#line 1911 "configure"
1912#include "confdefs.h"
1913#include <assert.h>
1914                     Syntax error
1915_ACEOF
1916if { (eval echo "$as_me:1916: \"$ac_cpp conftest.$ac_ext\"") >&5
1917  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
1918  ac_status=$?
1919  egrep -v '^ *\+' conftest.er1 >conftest.err
1920  rm -f conftest.er1
1921  cat conftest.err >&5
1922  echo "$as_me:1922: \$? = $ac_status" >&5
1923  (exit $ac_status); } >/dev/null; then
1924  if test -s conftest.err; then
1925    ac_cpp_err=$ac_c_preproc_warn_flag
1926  else
1927    ac_cpp_err=
1928  fi
1929else
1930  ac_cpp_err=yes
1931fi
1932if test -z "$ac_cpp_err"; then
1933  :
1934else
1935  echo "$as_me: failed program was:" >&5
1936  cat conftest.$ac_ext >&5
1937  # Broken: fails on valid input.
1938continue
1939fi
1940rm -f conftest.err conftest.$ac_ext
1941
1942  # OK, works on sane cases.  Now check whether non-existent headers
1943  # can be detected and how.
1944  cat >conftest.$ac_ext <<_ACEOF
1945#line 1945 "configure"
1946#include "confdefs.h"
1947#include <ac_nonexistent.h>
1948_ACEOF
1949if { (eval echo "$as_me:1949: \"$ac_cpp conftest.$ac_ext\"") >&5
1950  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
1951  ac_status=$?
1952  egrep -v '^ *\+' conftest.er1 >conftest.err
1953  rm -f conftest.er1
1954  cat conftest.err >&5
1955  echo "$as_me:1955: \$? = $ac_status" >&5
1956  (exit $ac_status); } >/dev/null; then
1957  if test -s conftest.err; then
1958    ac_cpp_err=$ac_c_preproc_warn_flag
1959  else
1960    ac_cpp_err=
1961  fi
1962else
1963  ac_cpp_err=yes
1964fi
1965if test -z "$ac_cpp_err"; then
1966  # Broken: success on invalid input.
1967continue
1968else
1969  echo "$as_me: failed program was:" >&5
1970  cat conftest.$ac_ext >&5
1971  # Passes both tests.
1972ac_preproc_ok=:
1973break
1974fi
1975rm -f conftest.err conftest.$ac_ext
1976
1977done
1978# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
1979rm -f conftest.err conftest.$ac_ext
1980if $ac_preproc_ok; then
1981  break
1982fi
1983
1984    done
1985    ac_cv_prog_CPP=$CPP
1986
1987fi
1988  CPP=$ac_cv_prog_CPP
1989else
1990  ac_cv_prog_CPP=$CPP
1991fi
1992echo "$as_me:1992: result: $CPP" >&5
1993echo "${ECHO_T}$CPP" >&6
1994ac_preproc_ok=false
1995for ac_c_preproc_warn_flag in '' yes
1996do
1997  # Use a header file that comes with gcc, so configuring glibc
1998  # with a fresh cross-compiler works.
1999  # On the NeXT, cc -E runs the code through the compiler's parser,
2000  # not just through cpp. "Syntax error" is here to catch this case.
2001  cat >conftest.$ac_ext <<_ACEOF
2002#line 2002 "configure"
2003#include "confdefs.h"
2004#include <assert.h>
2005                     Syntax error
2006_ACEOF
2007if { (eval echo "$as_me:2007: \"$ac_cpp conftest.$ac_ext\"") >&5
2008  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2009  ac_status=$?
2010  egrep -v '^ *\+' conftest.er1 >conftest.err
2011  rm -f conftest.er1
2012  cat conftest.err >&5
2013  echo "$as_me:2013: \$? = $ac_status" >&5
2014  (exit $ac_status); } >/dev/null; then
2015  if test -s conftest.err; then
2016    ac_cpp_err=$ac_c_preproc_warn_flag
2017  else
2018    ac_cpp_err=
2019  fi
2020else
2021  ac_cpp_err=yes
2022fi
2023if test -z "$ac_cpp_err"; then
2024  :
2025else
2026  echo "$as_me: failed program was:" >&5
2027  cat conftest.$ac_ext >&5
2028  # Broken: fails on valid input.
2029continue
2030fi
2031rm -f conftest.err conftest.$ac_ext
2032
2033  # OK, works on sane cases.  Now check whether non-existent headers
2034  # can be detected and how.
2035  cat >conftest.$ac_ext <<_ACEOF
2036#line 2036 "configure"
2037#include "confdefs.h"
2038#include <ac_nonexistent.h>
2039_ACEOF
2040if { (eval echo "$as_me:2040: \"$ac_cpp conftest.$ac_ext\"") >&5
2041  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2042  ac_status=$?
2043  egrep -v '^ *\+' conftest.er1 >conftest.err
2044  rm -f conftest.er1
2045  cat conftest.err >&5
2046  echo "$as_me:2046: \$? = $ac_status" >&5
2047  (exit $ac_status); } >/dev/null; then
2048  if test -s conftest.err; then
2049    ac_cpp_err=$ac_c_preproc_warn_flag
2050  else
2051    ac_cpp_err=
2052  fi
2053else
2054  ac_cpp_err=yes
2055fi
2056if test -z "$ac_cpp_err"; then
2057  # Broken: success on invalid input.
2058continue
2059else
2060  echo "$as_me: failed program was:" >&5
2061  cat conftest.$ac_ext >&5
2062  # Passes both tests.
2063ac_preproc_ok=:
2064break
2065fi
2066rm -f conftest.err conftest.$ac_ext
2067
2068done
2069# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2070rm -f conftest.err conftest.$ac_ext
2071if $ac_preproc_ok; then
2072  :
2073else
2074  { { echo "$as_me:2074: error: C preprocessor \"$CPP\" fails sanity check" >&5
2075echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2076   { (exit 1); exit 1; }; }
2077fi
2078
2079ac_ext=c
2080ac_cpp='$CPP $CPPFLAGS'
2081ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2082ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2083ac_compiler_gnu=$ac_cv_c_compiler_gnu
2084ac_main_return=return
2085
2086if test $ac_cv_c_compiler_gnu = yes; then
2087    echo "$as_me:2087: checking whether $CC needs -traditional" >&5
2088echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2089if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2090  echo $ECHO_N "(cached) $ECHO_C" >&6
2091else
2092    ac_pattern="Autoconf.*'x'"
2093  cat >conftest.$ac_ext <<_ACEOF
2094#line 2094 "configure"
2095#include "confdefs.h"
2096#include <sgtty.h>
2097int Autoconf = TIOCGETP;
2098_ACEOF
2099if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2100  egrep "$ac_pattern" >/dev/null 2>&1; then
2101  ac_cv_prog_gcc_traditional=yes
2102else
2103  ac_cv_prog_gcc_traditional=no
2104fi
2105rm -rf conftest*
2106
2107  if test $ac_cv_prog_gcc_traditional = no; then
2108    cat >conftest.$ac_ext <<_ACEOF
2109#line 2109 "configure"
2110#include "confdefs.h"
2111#include <termio.h>
2112int Autoconf = TCGETA;
2113_ACEOF
2114if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2115  egrep "$ac_pattern" >/dev/null 2>&1; then
2116  ac_cv_prog_gcc_traditional=yes
2117fi
2118rm -rf conftest*
2119
2120  fi
2121fi
2122echo "$as_me:2122: result: $ac_cv_prog_gcc_traditional" >&5
2123echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2124  if test $ac_cv_prog_gcc_traditional = yes; then
2125    CC="$CC -traditional"
2126  fi
2127fi
2128
2129for ac_prog in mawk gawk nawk awk
2130do
2131  # Extract the first word of "$ac_prog", so it can be a program name with args.
2132set dummy $ac_prog; ac_word=$2
2133echo "$as_me:2133: checking for $ac_word" >&5
2134echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2135if test "${ac_cv_prog_AWK+set}" = set; then
2136  echo $ECHO_N "(cached) $ECHO_C" >&6
2137else
2138  if test -n "$AWK"; then
2139  ac_cv_prog_AWK="$AWK" # Let the user override the test.
2140else
2141  ac_save_IFS=$IFS; IFS=$ac_path_separator
2142ac_dummy="$PATH"
2143for ac_dir in $ac_dummy; do
2144  IFS=$ac_save_IFS
2145  test -z "$ac_dir" && ac_dir=.
2146  $as_executable_p "$ac_dir/$ac_word" || continue
2147ac_cv_prog_AWK="$ac_prog"
2148echo "$as_me:2148: found $ac_dir/$ac_word" >&5
2149break
2150done
2151
2152fi
2153fi
2154AWK=$ac_cv_prog_AWK
2155if test -n "$AWK"; then
2156  echo "$as_me:2156: result: $AWK" >&5
2157echo "${ECHO_T}$AWK" >&6
2158else
2159  echo "$as_me:2159: result: no" >&5
2160echo "${ECHO_T}no" >&6
2161fi
2162
2163  test -n "$AWK" && break
2164done
2165
2166# Find a good install program.  We prefer a C program (faster),
2167# so one script is as good as another.  But avoid the broken or
2168# incompatible versions:
2169# SysV /etc/install, /usr/sbin/install
2170# SunOS /usr/etc/install
2171# IRIX /sbin/install
2172# AIX /bin/install
2173# AmigaOS /C/install, which installs bootblocks on floppy discs
2174# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2175# AFS /usr/afsws/bin/install, which mishandles nonexistent args
2176# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2177# ./install, which can be erroneously created by make from ./install.sh.
2178echo "$as_me:2178: checking for a BSD compatible install" >&5
2179echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
2180if test -z "$INSTALL"; then
2181if test "${ac_cv_path_install+set}" = set; then
2182  echo $ECHO_N "(cached) $ECHO_C" >&6
2183else
2184    ac_save_IFS=$IFS; IFS=$ac_path_separator
2185  for ac_dir in $PATH; do
2186    IFS=$ac_save_IFS
2187    # Account for people who put trailing slashes in PATH elements.
2188    case $ac_dir/ in
2189    / | ./ | .// | /cC/* \
2190    | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
2191    | /usr/ucb/* ) ;;
2192    *)
2193      # OSF1 and SCO ODT 3.0 have their own names for install.
2194      # Don't use installbsd from OSF since it installs stuff as root
2195      # by default.
2196      for ac_prog in ginstall scoinst install; do
2197        if $as_executable_p "$ac_dir/$ac_prog"; then
2198	  if test $ac_prog = install &&
2199            grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2200	    # AIX install.  It has an incompatible calling convention.
2201	    :
2202	  elif test $ac_prog = install &&
2203	    grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2204	    # program-specific install script used by HP pwplus--don't use.
2205	    :
2206	  else
2207	    ac_cv_path_install="$ac_dir/$ac_prog -c"
2208	    break 2
2209	  fi
2210	fi
2211      done
2212      ;;
2213    esac
2214  done
2215
2216fi
2217  if test "${ac_cv_path_install+set}" = set; then
2218    INSTALL=$ac_cv_path_install
2219  else
2220    # As a last resort, use the slow shell script.  We don't cache a
2221    # path for INSTALL within a source directory, because that will
2222    # break other packages using the cache if that directory is
2223    # removed, or if the path is relative.
2224    INSTALL=$ac_install_sh
2225  fi
2226fi
2227echo "$as_me:2227: result: $INSTALL" >&5
2228echo "${ECHO_T}$INSTALL" >&6
2229
2230# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2231# It thinks the first close brace ends the variable substitution.
2232test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2233
2234test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2235
2236test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2237
2238echo "$as_me:2238: checking whether ln -s works" >&5
2239echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
2240LN_S=$as_ln_s
2241if test "$LN_S" = "ln -s"; then
2242  echo "$as_me:2242: result: yes" >&5
2243echo "${ECHO_T}yes" >&6
2244else
2245  echo "$as_me:2245: result: no, using $LN_S" >&5
2246echo "${ECHO_T}no, using $LN_S" >&6
2247fi
2248
2249test "$program_prefix" != NONE &&
2250  program_transform_name="s,^,$program_prefix,;$program_transform_name"
2251# Use a double $ so make ignores it.
2252test "$program_suffix" != NONE &&
2253  program_transform_name="s,\$,$program_suffix,;$program_transform_name"
2254# Double any \ or $.  echo might interpret backslashes.
2255# By default was `s,x,x', remove it if useless.
2256cat <<\_ACEOF >conftest.sed
2257s/[\\$]/&&/g;s/;s,x,x,$//
2258_ACEOF
2259program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
2260rm conftest.sed
2261
2262for ac_prog in tdlint lint alint
2263do
2264  # Extract the first word of "$ac_prog", so it can be a program name with args.
2265set dummy $ac_prog; ac_word=$2
2266echo "$as_me:2266: checking for $ac_word" >&5
2267echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2268if test "${ac_cv_prog_LINT+set}" = set; then
2269  echo $ECHO_N "(cached) $ECHO_C" >&6
2270else
2271  if test -n "$LINT"; then
2272  ac_cv_prog_LINT="$LINT" # Let the user override the test.
2273else
2274  ac_save_IFS=$IFS; IFS=$ac_path_separator
2275ac_dummy="$PATH"
2276for ac_dir in $ac_dummy; do
2277  IFS=$ac_save_IFS
2278  test -z "$ac_dir" && ac_dir=.
2279  $as_executable_p "$ac_dir/$ac_word" || continue
2280ac_cv_prog_LINT="$ac_prog"
2281echo "$as_me:2281: found $ac_dir/$ac_word" >&5
2282break
2283done
2284
2285fi
2286fi
2287LINT=$ac_cv_prog_LINT
2288if test -n "$LINT"; then
2289  echo "$as_me:2289: result: $LINT" >&5
2290echo "${ECHO_T}$LINT" >&6
2291else
2292  echo "$as_me:2292: result: no" >&5
2293echo "${ECHO_T}no" >&6
2294fi
2295
2296  test -n "$LINT" && break
2297done
2298
2299###	checks for UNIX variants that set C preprocessor variables
2300
2301echo "$as_me:2301: checking for AIX" >&5
2302echo $ECHO_N "checking for AIX... $ECHO_C" >&6
2303cat >conftest.$ac_ext <<_ACEOF
2304#line 2304 "configure"
2305#include "confdefs.h"
2306#ifdef _AIX
2307  yes
2308#endif
2309
2310_ACEOF
2311if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2312  egrep "yes" >/dev/null 2>&1; then
2313  echo "$as_me:2313: result: yes" >&5
2314echo "${ECHO_T}yes" >&6
2315cat >>confdefs.h <<\EOF
2316#define _ALL_SOURCE 1
2317EOF
2318
2319else
2320  echo "$as_me:2320: result: no" >&5
2321echo "${ECHO_T}no" >&6
2322fi
2323rm -rf conftest*
2324
2325echo "$as_me:2325: checking for POSIXized ISC" >&5
2326echo $ECHO_N "checking for POSIXized ISC... $ECHO_C" >&6
2327if test -d /etc/conf/kconfig.d &&
2328   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
2329then
2330  echo "$as_me:2330: result: yes" >&5
2331echo "${ECHO_T}yes" >&6
2332  ISC=yes # If later tests want to check for ISC.
2333
2334cat >>confdefs.h <<\EOF
2335#define _POSIX_SOURCE 1
2336EOF
2337
2338  if test "$GCC" = yes; then
2339    CC="$CC -posix"
2340  else
2341    CC="$CC -Xp"
2342  fi
2343else
2344  echo "$as_me:2344: result: no" >&5
2345echo "${ECHO_T}no" >&6
2346  ISC=
2347fi
2348
2349###	checks for compiler characteristics
2350
2351# This should have been defined by AC_PROG_CC
2352: ${CC:=cc}
2353
2354# Check for user's environment-breakage by stuffing CFLAGS/CPPFLAGS content
2355# into CC.  This will not help with broken scripts that wrap the compiler with
2356# options, but eliminates a more common category of user confusion.
2357echo "$as_me:2357: checking \$CC variable" >&5
2358echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2359case "$CC" in #(vi
2360*[\ \	]-[IUD]*)
2361	echo "$as_me:2361: result: broken" >&5
2362echo "${ECHO_T}broken" >&6
2363	{ echo "$as_me:2363: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2364echo "$as_me: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2365	# humor him...
2366	cf_flags=`echo "$CC" | sed -e 's/^[^ 	]*[ 	]//'`
2367	CC=`echo "$CC" | sed -e 's/[ 	].*//'`
2368
2369cf_fix_cppflags=no
2370cf_new_cflags=
2371cf_new_cppflags=
2372cf_new_extra_cppflags=
2373
2374for cf_add_cflags in $cf_flags
2375do
2376case $cf_fix_cppflags in
2377no)
2378	case $cf_add_cflags in #(vi
2379	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2380		case $cf_add_cflags in
2381		-D*)
2382			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2383
2384			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2385				&& test -z "${cf_tst_cflags}" \
2386				&& cf_fix_cppflags=yes
2387
2388			if test $cf_fix_cppflags = yes ; then
2389				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2390				continue
2391			elif test "${cf_tst_cflags}" = "\"'" ; then
2392				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2393				continue
2394			fi
2395			;;
2396		esac
2397		case "$CPPFLAGS" in
2398		*$cf_add_cflags) #(vi
2399			;;
2400		*) #(vi
2401			case $cf_add_cflags in #(vi
2402			-D*)
2403				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2404
2405CPPFLAGS=`echo "$CPPFLAGS" | \
2406	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
2407		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
2408
2409				;;
2410			esac
2411			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2412			;;
2413		esac
2414		;;
2415	*)
2416		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2417		;;
2418	esac
2419	;;
2420yes)
2421	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2422
2423	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2424
2425	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2426		&& test -z "${cf_tst_cflags}" \
2427		&& cf_fix_cppflags=no
2428	;;
2429esac
2430done
2431
2432if test -n "$cf_new_cflags" ; then
2433
2434	CFLAGS="$CFLAGS $cf_new_cflags"
2435fi
2436
2437if test -n "$cf_new_cppflags" ; then
2438
2439	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2440fi
2441
2442if test -n "$cf_new_extra_cppflags" ; then
2443
2444	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2445fi
2446
2447	;;
2448*)
2449	echo "$as_me:2449: result: ok" >&5
2450echo "${ECHO_T}ok" >&6
2451	;;
2452esac
2453
2454echo "$as_me:2454: checking for ${CC:-cc} option to accept ANSI C" >&5
2455echo $ECHO_N "checking for ${CC:-cc} option to accept ANSI C... $ECHO_C" >&6
2456if test "${cf_cv_ansi_cc+set}" = set; then
2457  echo $ECHO_N "(cached) $ECHO_C" >&6
2458else
2459
2460cf_cv_ansi_cc=no
2461cf_save_CFLAGS="$CFLAGS"
2462cf_save_CPPFLAGS="$CPPFLAGS"
2463# Don't try gcc -ansi; that turns off useful extensions and
2464# breaks some systems' header files.
2465# AIX			-qlanglvl=ansi
2466# Ultrix and OSF/1	-std1
2467# HP-UX			-Aa -D_HPUX_SOURCE
2468# SVR4			-Xc
2469# UnixWare 1.2		(cannot use -Xc, since ANSI/POSIX clashes)
2470for cf_arg in "-DCC_HAS_PROTOS" \
2471	"" \
2472	-qlanglvl=ansi \
2473	-std1 \
2474	-Ae \
2475	"-Aa -D_HPUX_SOURCE" \
2476	-Xc
2477do
2478
2479cf_fix_cppflags=no
2480cf_new_cflags=
2481cf_new_cppflags=
2482cf_new_extra_cppflags=
2483
2484for cf_add_cflags in $cf_arg
2485do
2486case $cf_fix_cppflags in
2487no)
2488	case $cf_add_cflags in #(vi
2489	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2490		case $cf_add_cflags in
2491		-D*)
2492			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2493
2494			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2495				&& test -z "${cf_tst_cflags}" \
2496				&& cf_fix_cppflags=yes
2497
2498			if test $cf_fix_cppflags = yes ; then
2499				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2500				continue
2501			elif test "${cf_tst_cflags}" = "\"'" ; then
2502				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2503				continue
2504			fi
2505			;;
2506		esac
2507		case "$CPPFLAGS" in
2508		*$cf_add_cflags) #(vi
2509			;;
2510		*) #(vi
2511			case $cf_add_cflags in #(vi
2512			-D*)
2513				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2514
2515CPPFLAGS=`echo "$CPPFLAGS" | \
2516	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
2517		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
2518
2519				;;
2520			esac
2521			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2522			;;
2523		esac
2524		;;
2525	*)
2526		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2527		;;
2528	esac
2529	;;
2530yes)
2531	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2532
2533	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2534
2535	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2536		&& test -z "${cf_tst_cflags}" \
2537		&& cf_fix_cppflags=no
2538	;;
2539esac
2540done
2541
2542if test -n "$cf_new_cflags" ; then
2543
2544	CFLAGS="$CFLAGS $cf_new_cflags"
2545fi
2546
2547if test -n "$cf_new_cppflags" ; then
2548
2549	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2550fi
2551
2552if test -n "$cf_new_extra_cppflags" ; then
2553
2554	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2555fi
2556
2557	cat >conftest.$ac_ext <<_ACEOF
2558#line 2558 "configure"
2559#include "confdefs.h"
2560
2561#ifndef CC_HAS_PROTOS
2562#if !defined(__STDC__) || (__STDC__ != 1)
2563choke me
2564#endif
2565#endif
2566
2567int
2568main ()
2569{
2570
2571	int test (int i, double x);
2572	struct s1 {int (*f) (int a);};
2573	struct s2 {int (*f) (double a);};
2574  ;
2575  return 0;
2576}
2577_ACEOF
2578rm -f conftest.$ac_objext
2579if { (eval echo "$as_me:2579: \"$ac_compile\"") >&5
2580  (eval $ac_compile) 2>&5
2581  ac_status=$?
2582  echo "$as_me:2582: \$? = $ac_status" >&5
2583  (exit $ac_status); } &&
2584         { ac_try='test -s conftest.$ac_objext'
2585  { (eval echo "$as_me:2585: \"$ac_try\"") >&5
2586  (eval $ac_try) 2>&5
2587  ac_status=$?
2588  echo "$as_me:2588: \$? = $ac_status" >&5
2589  (exit $ac_status); }; }; then
2590  cf_cv_ansi_cc="$cf_arg"; break
2591else
2592  echo "$as_me: failed program was:" >&5
2593cat conftest.$ac_ext >&5
2594fi
2595rm -f conftest.$ac_objext conftest.$ac_ext
2596done
2597CFLAGS="$cf_save_CFLAGS"
2598CPPFLAGS="$cf_save_CPPFLAGS"
2599
2600fi
2601echo "$as_me:2601: result: $cf_cv_ansi_cc" >&5
2602echo "${ECHO_T}$cf_cv_ansi_cc" >&6
2603
2604if test "$cf_cv_ansi_cc" != "no"; then
2605if test ".$cf_cv_ansi_cc" != ".-DCC_HAS_PROTOS"; then
2606
2607cf_fix_cppflags=no
2608cf_new_cflags=
2609cf_new_cppflags=
2610cf_new_extra_cppflags=
2611
2612for cf_add_cflags in $cf_cv_ansi_cc
2613do
2614case $cf_fix_cppflags in
2615no)
2616	case $cf_add_cflags in #(vi
2617	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2618		case $cf_add_cflags in
2619		-D*)
2620			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2621
2622			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2623				&& test -z "${cf_tst_cflags}" \
2624				&& cf_fix_cppflags=yes
2625
2626			if test $cf_fix_cppflags = yes ; then
2627				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2628				continue
2629			elif test "${cf_tst_cflags}" = "\"'" ; then
2630				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2631				continue
2632			fi
2633			;;
2634		esac
2635		case "$CPPFLAGS" in
2636		*$cf_add_cflags) #(vi
2637			;;
2638		*) #(vi
2639			case $cf_add_cflags in #(vi
2640			-D*)
2641				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2642
2643CPPFLAGS=`echo "$CPPFLAGS" | \
2644	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
2645		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
2646
2647				;;
2648			esac
2649			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2650			;;
2651		esac
2652		;;
2653	*)
2654		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2655		;;
2656	esac
2657	;;
2658yes)
2659	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2660
2661	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2662
2663	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2664		&& test -z "${cf_tst_cflags}" \
2665		&& cf_fix_cppflags=no
2666	;;
2667esac
2668done
2669
2670if test -n "$cf_new_cflags" ; then
2671
2672	CFLAGS="$CFLAGS $cf_new_cflags"
2673fi
2674
2675if test -n "$cf_new_cppflags" ; then
2676
2677	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2678fi
2679
2680if test -n "$cf_new_extra_cppflags" ; then
2681
2682	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2683fi
2684
2685else
2686	cat >>confdefs.h <<\EOF
2687#define CC_HAS_PROTOS 1
2688EOF
2689
2690fi
2691fi
2692
2693echo "$as_me:2693: checking for $CC option to accept ANSI C" >&5
2694echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2695if test "${ac_cv_prog_cc_stdc+set}" = set; then
2696  echo $ECHO_N "(cached) $ECHO_C" >&6
2697else
2698  ac_cv_prog_cc_stdc=no
2699ac_save_CC=$CC
2700cat >conftest.$ac_ext <<_ACEOF
2701#line 2701 "configure"
2702#include "confdefs.h"
2703#include <stdarg.h>
2704#include <stdio.h>
2705#include <sys/types.h>
2706#include <sys/stat.h>
2707/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2708struct buf { int x; };
2709FILE * (*rcsopen) (struct buf *, struct stat *, int);
2710static char *e (p, i)
2711     char **p;
2712     int i;
2713{
2714  return p[i];
2715}
2716static char *f (char * (*g) (char **, int), char **p, ...)
2717{
2718  char *s;
2719  va_list v;
2720  va_start (v,p);
2721  s = g (p, va_arg (v,int));
2722  va_end (v);
2723  return s;
2724}
2725int test (int i, double x);
2726struct s1 {int (*f) (int a);};
2727struct s2 {int (*f) (double a);};
2728int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2729int argc;
2730char **argv;
2731int
2732main ()
2733{
2734return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2735  ;
2736  return 0;
2737}
2738_ACEOF
2739# Don't try gcc -ansi; that turns off useful extensions and
2740# breaks some systems' header files.
2741# AIX			-qlanglvl=ansi
2742# Ultrix and OSF/1	-std1
2743# HP-UX 10.20 and later	-Ae
2744# HP-UX older versions	-Aa -D_HPUX_SOURCE
2745# SVR4			-Xc -D__EXTENSIONS__
2746for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2747do
2748  CC="$ac_save_CC $ac_arg"
2749  rm -f conftest.$ac_objext
2750if { (eval echo "$as_me:2750: \"$ac_compile\"") >&5
2751  (eval $ac_compile) 2>&5
2752  ac_status=$?
2753  echo "$as_me:2753: \$? = $ac_status" >&5
2754  (exit $ac_status); } &&
2755         { ac_try='test -s conftest.$ac_objext'
2756  { (eval echo "$as_me:2756: \"$ac_try\"") >&5
2757  (eval $ac_try) 2>&5
2758  ac_status=$?
2759  echo "$as_me:2759: \$? = $ac_status" >&5
2760  (exit $ac_status); }; }; then
2761  ac_cv_prog_cc_stdc=$ac_arg
2762break
2763else
2764  echo "$as_me: failed program was:" >&5
2765cat conftest.$ac_ext >&5
2766fi
2767rm -f conftest.$ac_objext
2768done
2769rm -f conftest.$ac_ext conftest.$ac_objext
2770CC=$ac_save_CC
2771
2772fi
2773
2774case "x$ac_cv_prog_cc_stdc" in
2775  x|xno)
2776    echo "$as_me:2776: result: none needed" >&5
2777echo "${ECHO_T}none needed" >&6 ;;
2778  *)
2779    echo "$as_me:2779: result: $ac_cv_prog_cc_stdc" >&5
2780echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2781    CC="$CC $ac_cv_prog_cc_stdc" ;;
2782esac
2783
2784echo "$as_me:2784: checking for an ANSI C-conforming const" >&5
2785echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
2786if test "${ac_cv_c_const+set}" = set; then
2787  echo $ECHO_N "(cached) $ECHO_C" >&6
2788else
2789  cat >conftest.$ac_ext <<_ACEOF
2790#line 2790 "configure"
2791#include "confdefs.h"
2792
2793int
2794main ()
2795{
2796/* FIXME: Include the comments suggested by Paul. */
2797#ifndef __cplusplus
2798  /* Ultrix mips cc rejects this.  */
2799  typedef int charset[2];
2800  const charset x;
2801  /* SunOS 4.1.1 cc rejects this.  */
2802  char const *const *ccp;
2803  char **p;
2804  /* NEC SVR4.0.2 mips cc rejects this.  */
2805  struct point {int x, y;};
2806  static struct point const zero = {0,0};
2807  /* AIX XL C 1.02.0.0 rejects this.
2808     It does not let you subtract one const X* pointer from another in
2809     an arm of an if-expression whose if-part is not a constant
2810     expression */
2811  const char *g = "string";
2812  ccp = &g + (g ? g-g : 0);
2813  /* HPUX 7.0 cc rejects these. */
2814  ++ccp;
2815  p = (char**) ccp;
2816  ccp = (char const *const *) p;
2817  { /* SCO 3.2v4 cc rejects this.  */
2818    char *t;
2819    char const *s = 0 ? (char *) 0 : (char const *) 0;
2820
2821    *t++ = 0;
2822  }
2823  { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
2824    int x[] = {25, 17};
2825    const int *foo = &x[0];
2826    ++foo;
2827  }
2828  { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
2829    typedef const int *iptr;
2830    iptr p = 0;
2831    ++p;
2832  }
2833  { /* AIX XL C 1.02.0.0 rejects this saying
2834       "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
2835    struct s { int j; const int *ap[3]; };
2836    struct s *b; b->j = 5;
2837  }
2838  { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
2839    const int foo = 10;
2840  }
2841#endif
2842
2843  ;
2844  return 0;
2845}
2846_ACEOF
2847rm -f conftest.$ac_objext
2848if { (eval echo "$as_me:2848: \"$ac_compile\"") >&5
2849  (eval $ac_compile) 2>&5
2850  ac_status=$?
2851  echo "$as_me:2851: \$? = $ac_status" >&5
2852  (exit $ac_status); } &&
2853         { ac_try='test -s conftest.$ac_objext'
2854  { (eval echo "$as_me:2854: \"$ac_try\"") >&5
2855  (eval $ac_try) 2>&5
2856  ac_status=$?
2857  echo "$as_me:2857: \$? = $ac_status" >&5
2858  (exit $ac_status); }; }; then
2859  ac_cv_c_const=yes
2860else
2861  echo "$as_me: failed program was:" >&5
2862cat conftest.$ac_ext >&5
2863ac_cv_c_const=no
2864fi
2865rm -f conftest.$ac_objext conftest.$ac_ext
2866fi
2867echo "$as_me:2867: result: $ac_cv_c_const" >&5
2868echo "${ECHO_T}$ac_cv_c_const" >&6
2869if test $ac_cv_c_const = no; then
2870
2871cat >>confdefs.h <<\EOF
2872#define const
2873EOF
2874
2875fi
2876
2877case $cf_cv_system_name in
2878os2*)
2879    CFLAGS="$CFLAGS -Zmt"
2880    CPPFLAGS="$CPPFLAGS -D__ST_MT_ERRNO__"
2881    CXXFLAGS="$CXXFLAGS -Zmt"
2882    # autoconf's macro sets -Zexe and suffix both, which conflict:w
2883    LDFLAGS="$LDFLAGS -Zmt -Zcrtdll"
2884    ac_cv_exeext=.exe
2885    ;;
2886esac
2887
2888PROG_EXT="$EXEEXT"
2889
2890test -n "$PROG_EXT" && cat >>confdefs.h <<EOF
2891#define PROG_EXT "$PROG_EXT"
2892EOF
2893
2894cf_XOPEN_SOURCE=500
2895cf_POSIX_C_SOURCE=199506L
2896cf_xopen_source=
2897
2898case $host_os in #(vi
2899aix[4-7]*) #(vi
2900	cf_xopen_source="-D_ALL_SOURCE"
2901	;;
2902cygwin) #(vi
2903	cf_XOPEN_SOURCE=600
2904	;;
2905darwin[0-8].*) #(vi
2906	cf_xopen_source="-D_APPLE_C_SOURCE"
2907	;;
2908darwin*) #(vi
2909	cf_xopen_source="-D_DARWIN_C_SOURCE"
2910	;;
2911freebsd*|dragonfly*) #(vi
2912	# 5.x headers associate
2913	#	_XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
2914	#	_XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
2915	cf_POSIX_C_SOURCE=200112L
2916	cf_XOPEN_SOURCE=600
2917	cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
2918	;;
2919hpux11*) #(vi
2920	cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
2921	;;
2922hpux*) #(vi
2923	cf_xopen_source="-D_HPUX_SOURCE"
2924	;;
2925irix[56].*) #(vi
2926	cf_xopen_source="-D_SGI_SOURCE"
2927	;;
2928linux*|gnu*|mint*|k*bsd*-gnu) #(vi
2929
2930echo "$as_me:2930: checking if we must define _GNU_SOURCE" >&5
2931echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
2932if test "${cf_cv_gnu_source+set}" = set; then
2933  echo $ECHO_N "(cached) $ECHO_C" >&6
2934else
2935
2936cat >conftest.$ac_ext <<_ACEOF
2937#line 2937 "configure"
2938#include "confdefs.h"
2939#include <sys/types.h>
2940int
2941main ()
2942{
2943
2944#ifndef _XOPEN_SOURCE
2945make an error
2946#endif
2947  ;
2948  return 0;
2949}
2950_ACEOF
2951rm -f conftest.$ac_objext
2952if { (eval echo "$as_me:2952: \"$ac_compile\"") >&5
2953  (eval $ac_compile) 2>&5
2954  ac_status=$?
2955  echo "$as_me:2955: \$? = $ac_status" >&5
2956  (exit $ac_status); } &&
2957         { ac_try='test -s conftest.$ac_objext'
2958  { (eval echo "$as_me:2958: \"$ac_try\"") >&5
2959  (eval $ac_try) 2>&5
2960  ac_status=$?
2961  echo "$as_me:2961: \$? = $ac_status" >&5
2962  (exit $ac_status); }; }; then
2963  cf_cv_gnu_source=no
2964else
2965  echo "$as_me: failed program was:" >&5
2966cat conftest.$ac_ext >&5
2967cf_save="$CPPFLAGS"
2968	 CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
2969	 cat >conftest.$ac_ext <<_ACEOF
2970#line 2970 "configure"
2971#include "confdefs.h"
2972#include <sys/types.h>
2973int
2974main ()
2975{
2976
2977#ifdef _XOPEN_SOURCE
2978make an error
2979#endif
2980  ;
2981  return 0;
2982}
2983_ACEOF
2984rm -f conftest.$ac_objext
2985if { (eval echo "$as_me:2985: \"$ac_compile\"") >&5
2986  (eval $ac_compile) 2>&5
2987  ac_status=$?
2988  echo "$as_me:2988: \$? = $ac_status" >&5
2989  (exit $ac_status); } &&
2990         { ac_try='test -s conftest.$ac_objext'
2991  { (eval echo "$as_me:2991: \"$ac_try\"") >&5
2992  (eval $ac_try) 2>&5
2993  ac_status=$?
2994  echo "$as_me:2994: \$? = $ac_status" >&5
2995  (exit $ac_status); }; }; then
2996  cf_cv_gnu_source=no
2997else
2998  echo "$as_me: failed program was:" >&5
2999cat conftest.$ac_ext >&5
3000cf_cv_gnu_source=yes
3001fi
3002rm -f conftest.$ac_objext conftest.$ac_ext
3003	CPPFLAGS="$cf_save"
3004
3005fi
3006rm -f conftest.$ac_objext conftest.$ac_ext
3007
3008fi
3009echo "$as_me:3009: result: $cf_cv_gnu_source" >&5
3010echo "${ECHO_T}$cf_cv_gnu_source" >&6
3011test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
3012
3013	;;
3014mirbsd*) #(vi
3015	# setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <arpa/inet.h>
3016	;;
3017netbsd*) #(vi
3018	# setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
3019	;;
3020openbsd*) #(vi
3021	# setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
3022	;;
3023osf[45]*) #(vi
3024	cf_xopen_source="-D_OSF_SOURCE"
3025	;;
3026nto-qnx*) #(vi
3027	cf_xopen_source="-D_QNX_SOURCE"
3028	;;
3029sco*) #(vi
3030	# setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
3031	;;
3032solaris2.1[0-9]) #(vi
3033	cf_xopen_source="-D__EXTENSIONS__ -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
3034	;;
3035solaris2.[1-9]) #(vi
3036	cf_xopen_source="-D__EXTENSIONS__"
3037	;;
3038*)
3039	echo "$as_me:3039: checking if we should define _XOPEN_SOURCE" >&5
3040echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
3041if test "${cf_cv_xopen_source+set}" = set; then
3042  echo $ECHO_N "(cached) $ECHO_C" >&6
3043else
3044
3045	cat >conftest.$ac_ext <<_ACEOF
3046#line 3046 "configure"
3047#include "confdefs.h"
3048#include <sys/types.h>
3049int
3050main ()
3051{
3052
3053#ifndef _XOPEN_SOURCE
3054make an error
3055#endif
3056  ;
3057  return 0;
3058}
3059_ACEOF
3060rm -f conftest.$ac_objext
3061if { (eval echo "$as_me:3061: \"$ac_compile\"") >&5
3062  (eval $ac_compile) 2>&5
3063  ac_status=$?
3064  echo "$as_me:3064: \$? = $ac_status" >&5
3065  (exit $ac_status); } &&
3066         { ac_try='test -s conftest.$ac_objext'
3067  { (eval echo "$as_me:3067: \"$ac_try\"") >&5
3068  (eval $ac_try) 2>&5
3069  ac_status=$?
3070  echo "$as_me:3070: \$? = $ac_status" >&5
3071  (exit $ac_status); }; }; then
3072  cf_cv_xopen_source=no
3073else
3074  echo "$as_me: failed program was:" >&5
3075cat conftest.$ac_ext >&5
3076cf_save="$CPPFLAGS"
3077	 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
3078	 cat >conftest.$ac_ext <<_ACEOF
3079#line 3079 "configure"
3080#include "confdefs.h"
3081#include <sys/types.h>
3082int
3083main ()
3084{
3085
3086#ifdef _XOPEN_SOURCE
3087make an error
3088#endif
3089  ;
3090  return 0;
3091}
3092_ACEOF
3093rm -f conftest.$ac_objext
3094if { (eval echo "$as_me:3094: \"$ac_compile\"") >&5
3095  (eval $ac_compile) 2>&5
3096  ac_status=$?
3097  echo "$as_me:3097: \$? = $ac_status" >&5
3098  (exit $ac_status); } &&
3099         { ac_try='test -s conftest.$ac_objext'
3100  { (eval echo "$as_me:3100: \"$ac_try\"") >&5
3101  (eval $ac_try) 2>&5
3102  ac_status=$?
3103  echo "$as_me:3103: \$? = $ac_status" >&5
3104  (exit $ac_status); }; }; then
3105  cf_cv_xopen_source=no
3106else
3107  echo "$as_me: failed program was:" >&5
3108cat conftest.$ac_ext >&5
3109cf_cv_xopen_source=$cf_XOPEN_SOURCE
3110fi
3111rm -f conftest.$ac_objext conftest.$ac_ext
3112	CPPFLAGS="$cf_save"
3113
3114fi
3115rm -f conftest.$ac_objext conftest.$ac_ext
3116
3117fi
3118echo "$as_me:3118: result: $cf_cv_xopen_source" >&5
3119echo "${ECHO_T}$cf_cv_xopen_source" >&6
3120	if test "$cf_cv_xopen_source" != no ; then
3121
3122CFLAGS=`echo "$CFLAGS" | \
3123	sed	-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
3124		-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?$//g'`
3125
3126CPPFLAGS=`echo "$CPPFLAGS" | \
3127	sed	-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
3128		-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?$//g'`
3129
3130		cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
3131
3132cf_fix_cppflags=no
3133cf_new_cflags=
3134cf_new_cppflags=
3135cf_new_extra_cppflags=
3136
3137for cf_add_cflags in $cf_temp_xopen_source
3138do
3139case $cf_fix_cppflags in
3140no)
3141	case $cf_add_cflags in #(vi
3142	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
3143		case $cf_add_cflags in
3144		-D*)
3145			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3146
3147			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
3148				&& test -z "${cf_tst_cflags}" \
3149				&& cf_fix_cppflags=yes
3150
3151			if test $cf_fix_cppflags = yes ; then
3152				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3153				continue
3154			elif test "${cf_tst_cflags}" = "\"'" ; then
3155				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3156				continue
3157			fi
3158			;;
3159		esac
3160		case "$CPPFLAGS" in
3161		*$cf_add_cflags) #(vi
3162			;;
3163		*) #(vi
3164			case $cf_add_cflags in #(vi
3165			-D*)
3166				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3167
3168CPPFLAGS=`echo "$CPPFLAGS" | \
3169	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
3170		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
3171
3172				;;
3173			esac
3174			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
3175			;;
3176		esac
3177		;;
3178	*)
3179		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
3180		;;
3181	esac
3182	;;
3183yes)
3184	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3185
3186	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3187
3188	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
3189		&& test -z "${cf_tst_cflags}" \
3190		&& cf_fix_cppflags=no
3191	;;
3192esac
3193done
3194
3195if test -n "$cf_new_cflags" ; then
3196
3197	CFLAGS="$CFLAGS $cf_new_cflags"
3198fi
3199
3200if test -n "$cf_new_cppflags" ; then
3201
3202	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
3203fi
3204
3205if test -n "$cf_new_extra_cppflags" ; then
3206
3207	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
3208fi
3209
3210	fi
3211
3212cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
3213
3214cf_save_CFLAGS="$CFLAGS"
3215cf_save_CPPFLAGS="$CPPFLAGS"
3216
3217cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
3218	sed	-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
3219		-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?$//g'`
3220
3221cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
3222	sed	-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
3223		-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?$//g'`
3224
3225echo "$as_me:3225: checking if we should define _POSIX_C_SOURCE" >&5
3226echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
3227if test "${cf_cv_posix_c_source+set}" = set; then
3228  echo $ECHO_N "(cached) $ECHO_C" >&6
3229else
3230
3231echo "${as_me:-configure}:3231: testing if the symbol is already defined go no further ..." 1>&5
3232
3233	cat >conftest.$ac_ext <<_ACEOF
3234#line 3234 "configure"
3235#include "confdefs.h"
3236#include <sys/types.h>
3237int
3238main ()
3239{
3240
3241#ifndef _POSIX_C_SOURCE
3242make an error
3243#endif
3244  ;
3245  return 0;
3246}
3247_ACEOF
3248rm -f conftest.$ac_objext
3249if { (eval echo "$as_me:3249: \"$ac_compile\"") >&5
3250  (eval $ac_compile) 2>&5
3251  ac_status=$?
3252  echo "$as_me:3252: \$? = $ac_status" >&5
3253  (exit $ac_status); } &&
3254         { ac_try='test -s conftest.$ac_objext'
3255  { (eval echo "$as_me:3255: \"$ac_try\"") >&5
3256  (eval $ac_try) 2>&5
3257  ac_status=$?
3258  echo "$as_me:3258: \$? = $ac_status" >&5
3259  (exit $ac_status); }; }; then
3260  cf_cv_posix_c_source=no
3261else
3262  echo "$as_me: failed program was:" >&5
3263cat conftest.$ac_ext >&5
3264cf_want_posix_source=no
3265	 case .$cf_POSIX_C_SOURCE in #(vi
3266	 .[12]??*) #(vi
3267		cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
3268		;;
3269	 .2) #(vi
3270		cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
3271		cf_want_posix_source=yes
3272		;;
3273	 .*)
3274		cf_want_posix_source=yes
3275		;;
3276	 esac
3277	 if test "$cf_want_posix_source" = yes ; then
3278		cat >conftest.$ac_ext <<_ACEOF
3279#line 3279 "configure"
3280#include "confdefs.h"
3281#include <sys/types.h>
3282int
3283main ()
3284{
3285
3286#ifdef _POSIX_SOURCE
3287make an error
3288#endif
3289  ;
3290  return 0;
3291}
3292_ACEOF
3293rm -f conftest.$ac_objext
3294if { (eval echo "$as_me:3294: \"$ac_compile\"") >&5
3295  (eval $ac_compile) 2>&5
3296  ac_status=$?
3297  echo "$as_me:3297: \$? = $ac_status" >&5
3298  (exit $ac_status); } &&
3299         { ac_try='test -s conftest.$ac_objext'
3300  { (eval echo "$as_me:3300: \"$ac_try\"") >&5
3301  (eval $ac_try) 2>&5
3302  ac_status=$?
3303  echo "$as_me:3303: \$? = $ac_status" >&5
3304  (exit $ac_status); }; }; then
3305  :
3306else
3307  echo "$as_me: failed program was:" >&5
3308cat conftest.$ac_ext >&5
3309cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
3310fi
3311rm -f conftest.$ac_objext conftest.$ac_ext
3312	 fi
3313
3314echo "${as_me:-configure}:3314: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
3315
3316	 CFLAGS="$cf_trim_CFLAGS"
3317	 CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
3318
3319echo "${as_me:-configure}:3319: testing if the second compile does not leave our definition intact error ..." 1>&5
3320
3321	 cat >conftest.$ac_ext <<_ACEOF
3322#line 3322 "configure"
3323#include "confdefs.h"
3324#include <sys/types.h>
3325int
3326main ()
3327{
3328
3329#ifndef _POSIX_C_SOURCE
3330make an error
3331#endif
3332  ;
3333  return 0;
3334}
3335_ACEOF
3336rm -f conftest.$ac_objext
3337if { (eval echo "$as_me:3337: \"$ac_compile\"") >&5
3338  (eval $ac_compile) 2>&5
3339  ac_status=$?
3340  echo "$as_me:3340: \$? = $ac_status" >&5
3341  (exit $ac_status); } &&
3342         { ac_try='test -s conftest.$ac_objext'
3343  { (eval echo "$as_me:3343: \"$ac_try\"") >&5
3344  (eval $ac_try) 2>&5
3345  ac_status=$?
3346  echo "$as_me:3346: \$? = $ac_status" >&5
3347  (exit $ac_status); }; }; then
3348  :
3349else
3350  echo "$as_me: failed program was:" >&5
3351cat conftest.$ac_ext >&5
3352cf_cv_posix_c_source=no
3353fi
3354rm -f conftest.$ac_objext conftest.$ac_ext
3355	 CFLAGS="$cf_save_CFLAGS"
3356	 CPPFLAGS="$cf_save_CPPFLAGS"
3357
3358fi
3359rm -f conftest.$ac_objext conftest.$ac_ext
3360
3361fi
3362echo "$as_me:3362: result: $cf_cv_posix_c_source" >&5
3363echo "${ECHO_T}$cf_cv_posix_c_source" >&6
3364
3365if test "$cf_cv_posix_c_source" != no ; then
3366	CFLAGS="$cf_trim_CFLAGS"
3367	CPPFLAGS="$cf_trim_CPPFLAGS"
3368
3369cf_fix_cppflags=no
3370cf_new_cflags=
3371cf_new_cppflags=
3372cf_new_extra_cppflags=
3373
3374for cf_add_cflags in $cf_cv_posix_c_source
3375do
3376case $cf_fix_cppflags in
3377no)
3378	case $cf_add_cflags in #(vi
3379	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
3380		case $cf_add_cflags in
3381		-D*)
3382			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3383
3384			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
3385				&& test -z "${cf_tst_cflags}" \
3386				&& cf_fix_cppflags=yes
3387
3388			if test $cf_fix_cppflags = yes ; then
3389				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3390				continue
3391			elif test "${cf_tst_cflags}" = "\"'" ; then
3392				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3393				continue
3394			fi
3395			;;
3396		esac
3397		case "$CPPFLAGS" in
3398		*$cf_add_cflags) #(vi
3399			;;
3400		*) #(vi
3401			case $cf_add_cflags in #(vi
3402			-D*)
3403				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3404
3405CPPFLAGS=`echo "$CPPFLAGS" | \
3406	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
3407		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
3408
3409				;;
3410			esac
3411			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
3412			;;
3413		esac
3414		;;
3415	*)
3416		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
3417		;;
3418	esac
3419	;;
3420yes)
3421	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3422
3423	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3424
3425	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
3426		&& test -z "${cf_tst_cflags}" \
3427		&& cf_fix_cppflags=no
3428	;;
3429esac
3430done
3431
3432if test -n "$cf_new_cflags" ; then
3433
3434	CFLAGS="$CFLAGS $cf_new_cflags"
3435fi
3436
3437if test -n "$cf_new_cppflags" ; then
3438
3439	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
3440fi
3441
3442if test -n "$cf_new_extra_cppflags" ; then
3443
3444	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
3445fi
3446
3447fi
3448
3449	;;
3450esac
3451
3452if test -n "$cf_xopen_source" ; then
3453
3454cf_fix_cppflags=no
3455cf_new_cflags=
3456cf_new_cppflags=
3457cf_new_extra_cppflags=
3458
3459for cf_add_cflags in $cf_xopen_source
3460do
3461case $cf_fix_cppflags in
3462no)
3463	case $cf_add_cflags in #(vi
3464	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
3465		case $cf_add_cflags in
3466		-D*)
3467			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3468
3469			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
3470				&& test -z "${cf_tst_cflags}" \
3471				&& cf_fix_cppflags=yes
3472
3473			if test $cf_fix_cppflags = yes ; then
3474				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3475				continue
3476			elif test "${cf_tst_cflags}" = "\"'" ; then
3477				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3478				continue
3479			fi
3480			;;
3481		esac
3482		case "$CPPFLAGS" in
3483		*$cf_add_cflags) #(vi
3484			;;
3485		*) #(vi
3486			case $cf_add_cflags in #(vi
3487			-D*)
3488				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3489
3490CPPFLAGS=`echo "$CPPFLAGS" | \
3491	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
3492		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
3493
3494				;;
3495			esac
3496			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
3497			;;
3498		esac
3499		;;
3500	*)
3501		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
3502		;;
3503	esac
3504	;;
3505yes)
3506	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3507
3508	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3509
3510	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
3511		&& test -z "${cf_tst_cflags}" \
3512		&& cf_fix_cppflags=no
3513	;;
3514esac
3515done
3516
3517if test -n "$cf_new_cflags" ; then
3518
3519	CFLAGS="$CFLAGS $cf_new_cflags"
3520fi
3521
3522if test -n "$cf_new_cppflags" ; then
3523
3524	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
3525fi
3526
3527if test -n "$cf_new_extra_cppflags" ; then
3528
3529	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
3530fi
3531
3532fi
3533
3534echo "$as_me:3534: checking if SIGWINCH is defined" >&5
3535echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
3536if test "${cf_cv_define_sigwinch+set}" = set; then
3537  echo $ECHO_N "(cached) $ECHO_C" >&6
3538else
3539
3540	cat >conftest.$ac_ext <<_ACEOF
3541#line 3541 "configure"
3542#include "confdefs.h"
3543
3544#include <sys/types.h>
3545#include <sys/signal.h>
3546
3547int
3548main ()
3549{
3550int x = SIGWINCH
3551  ;
3552  return 0;
3553}
3554_ACEOF
3555rm -f conftest.$ac_objext
3556if { (eval echo "$as_me:3556: \"$ac_compile\"") >&5
3557  (eval $ac_compile) 2>&5
3558  ac_status=$?
3559  echo "$as_me:3559: \$? = $ac_status" >&5
3560  (exit $ac_status); } &&
3561         { ac_try='test -s conftest.$ac_objext'
3562  { (eval echo "$as_me:3562: \"$ac_try\"") >&5
3563  (eval $ac_try) 2>&5
3564  ac_status=$?
3565  echo "$as_me:3565: \$? = $ac_status" >&5
3566  (exit $ac_status); }; }; then
3567  cf_cv_define_sigwinch=yes
3568else
3569  echo "$as_me: failed program was:" >&5
3570cat conftest.$ac_ext >&5
3571cat >conftest.$ac_ext <<_ACEOF
3572#line 3572 "configure"
3573#include "confdefs.h"
3574
3575#undef _XOPEN_SOURCE
3576#undef _POSIX_SOURCE
3577#undef _POSIX_C_SOURCE
3578#include <sys/types.h>
3579#include <sys/signal.h>
3580
3581int
3582main ()
3583{
3584int x = SIGWINCH
3585  ;
3586  return 0;
3587}
3588_ACEOF
3589rm -f conftest.$ac_objext
3590if { (eval echo "$as_me:3590: \"$ac_compile\"") >&5
3591  (eval $ac_compile) 2>&5
3592  ac_status=$?
3593  echo "$as_me:3593: \$? = $ac_status" >&5
3594  (exit $ac_status); } &&
3595         { ac_try='test -s conftest.$ac_objext'
3596  { (eval echo "$as_me:3596: \"$ac_try\"") >&5
3597  (eval $ac_try) 2>&5
3598  ac_status=$?
3599  echo "$as_me:3599: \$? = $ac_status" >&5
3600  (exit $ac_status); }; }; then
3601  cf_cv_define_sigwinch=maybe
3602else
3603  echo "$as_me: failed program was:" >&5
3604cat conftest.$ac_ext >&5
3605cf_cv_define_sigwinch=no
3606fi
3607rm -f conftest.$ac_objext conftest.$ac_ext
3608
3609fi
3610rm -f conftest.$ac_objext conftest.$ac_ext
3611
3612fi
3613echo "$as_me:3613: result: $cf_cv_define_sigwinch" >&5
3614echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
3615
3616if test "$cf_cv_define_sigwinch" = maybe ; then
3617echo "$as_me:3617: checking for actual SIGWINCH definition" >&5
3618echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
3619if test "${cf_cv_fixup_sigwinch+set}" = set; then
3620  echo $ECHO_N "(cached) $ECHO_C" >&6
3621else
3622
3623cf_cv_fixup_sigwinch=unknown
3624cf_sigwinch=32
3625while test $cf_sigwinch != 1
3626do
3627	cat >conftest.$ac_ext <<_ACEOF
3628#line 3628 "configure"
3629#include "confdefs.h"
3630
3631#undef _XOPEN_SOURCE
3632#undef _POSIX_SOURCE
3633#undef _POSIX_C_SOURCE
3634#include <sys/types.h>
3635#include <sys/signal.h>
3636
3637int
3638main ()
3639{
3640
3641#if SIGWINCH != $cf_sigwinch
3642make an error
3643#endif
3644int x = SIGWINCH
3645  ;
3646  return 0;
3647}
3648_ACEOF
3649rm -f conftest.$ac_objext
3650if { (eval echo "$as_me:3650: \"$ac_compile\"") >&5
3651  (eval $ac_compile) 2>&5
3652  ac_status=$?
3653  echo "$as_me:3653: \$? = $ac_status" >&5
3654  (exit $ac_status); } &&
3655         { ac_try='test -s conftest.$ac_objext'
3656  { (eval echo "$as_me:3656: \"$ac_try\"") >&5
3657  (eval $ac_try) 2>&5
3658  ac_status=$?
3659  echo "$as_me:3659: \$? = $ac_status" >&5
3660  (exit $ac_status); }; }; then
3661  cf_cv_fixup_sigwinch=$cf_sigwinch
3662	 break
3663else
3664  echo "$as_me: failed program was:" >&5
3665cat conftest.$ac_ext >&5
3666fi
3667rm -f conftest.$ac_objext conftest.$ac_ext
3668
3669cf_sigwinch=`expr $cf_sigwinch - 1`
3670done
3671
3672fi
3673echo "$as_me:3673: result: $cf_cv_fixup_sigwinch" >&5
3674echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
3675
3676	if test "$cf_cv_fixup_sigwinch" != unknown ; then
3677		CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
3678	fi
3679fi
3680
3681###	checks for header files
3682
3683for ac_header in \
3684ncurses/term.h \
3685stdlib.h \
3686sys/ttydefaults.h \
3687term.h \
3688termios.h \
3689unistd.h \
3690wchar.h \
3691
3692do
3693as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3694echo "$as_me:3694: checking for $ac_header" >&5
3695echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3696if eval "test \"\${$as_ac_Header+set}\" = set"; then
3697  echo $ECHO_N "(cached) $ECHO_C" >&6
3698else
3699  cat >conftest.$ac_ext <<_ACEOF
3700#line 3700 "configure"
3701#include "confdefs.h"
3702#include <$ac_header>
3703_ACEOF
3704if { (eval echo "$as_me:3704: \"$ac_cpp conftest.$ac_ext\"") >&5
3705  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3706  ac_status=$?
3707  egrep -v '^ *\+' conftest.er1 >conftest.err
3708  rm -f conftest.er1
3709  cat conftest.err >&5
3710  echo "$as_me:3710: \$? = $ac_status" >&5
3711  (exit $ac_status); } >/dev/null; then
3712  if test -s conftest.err; then
3713    ac_cpp_err=$ac_c_preproc_warn_flag
3714  else
3715    ac_cpp_err=
3716  fi
3717else
3718  ac_cpp_err=yes
3719fi
3720if test -z "$ac_cpp_err"; then
3721  eval "$as_ac_Header=yes"
3722else
3723  echo "$as_me: failed program was:" >&5
3724  cat conftest.$ac_ext >&5
3725  eval "$as_ac_Header=no"
3726fi
3727rm -f conftest.err conftest.$ac_ext
3728fi
3729echo "$as_me:3729: result: `eval echo '${'$as_ac_Header'}'`" >&5
3730echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3731if test `eval echo '${'$as_ac_Header'}'` = yes; then
3732  cat >>confdefs.h <<EOF
3733#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
3734EOF
3735
3736fi
3737done
3738
3739echo "$as_me:3739: checking whether time.h and sys/time.h may both be included" >&5
3740echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
3741if test "${ac_cv_header_time+set}" = set; then
3742  echo $ECHO_N "(cached) $ECHO_C" >&6
3743else
3744  cat >conftest.$ac_ext <<_ACEOF
3745#line 3745 "configure"
3746#include "confdefs.h"
3747#include <sys/types.h>
3748#include <sys/time.h>
3749#include <time.h>
3750
3751int
3752main ()
3753{
3754if ((struct tm *) 0)
3755return 0;
3756  ;
3757  return 0;
3758}
3759_ACEOF
3760rm -f conftest.$ac_objext
3761if { (eval echo "$as_me:3761: \"$ac_compile\"") >&5
3762  (eval $ac_compile) 2>&5
3763  ac_status=$?
3764  echo "$as_me:3764: \$? = $ac_status" >&5
3765  (exit $ac_status); } &&
3766         { ac_try='test -s conftest.$ac_objext'
3767  { (eval echo "$as_me:3767: \"$ac_try\"") >&5
3768  (eval $ac_try) 2>&5
3769  ac_status=$?
3770  echo "$as_me:3770: \$? = $ac_status" >&5
3771  (exit $ac_status); }; }; then
3772  ac_cv_header_time=yes
3773else
3774  echo "$as_me: failed program was:" >&5
3775cat conftest.$ac_ext >&5
3776ac_cv_header_time=no
3777fi
3778rm -f conftest.$ac_objext conftest.$ac_ext
3779fi
3780echo "$as_me:3780: result: $ac_cv_header_time" >&5
3781echo "${ECHO_T}$ac_cv_header_time" >&6
3782if test $ac_cv_header_time = yes; then
3783
3784cat >>confdefs.h <<\EOF
3785#define TIME_WITH_SYS_TIME 1
3786EOF
3787
3788fi
3789
3790  echo "$as_me:3790: checking for nl_langinfo and CODESET" >&5
3791echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
3792if test "${am_cv_langinfo_codeset+set}" = set; then
3793  echo $ECHO_N "(cached) $ECHO_C" >&6
3794else
3795  cat >conftest.$ac_ext <<_ACEOF
3796#line 3796 "configure"
3797#include "confdefs.h"
3798#include <langinfo.h>
3799int
3800main ()
3801{
3802char* cs = nl_langinfo(CODESET);
3803  ;
3804  return 0;
3805}
3806_ACEOF
3807rm -f conftest.$ac_objext conftest$ac_exeext
3808if { (eval echo "$as_me:3808: \"$ac_link\"") >&5
3809  (eval $ac_link) 2>&5
3810  ac_status=$?
3811  echo "$as_me:3811: \$? = $ac_status" >&5
3812  (exit $ac_status); } &&
3813         { ac_try='test -s conftest$ac_exeext'
3814  { (eval echo "$as_me:3814: \"$ac_try\"") >&5
3815  (eval $ac_try) 2>&5
3816  ac_status=$?
3817  echo "$as_me:3817: \$? = $ac_status" >&5
3818  (exit $ac_status); }; }; then
3819  am_cv_langinfo_codeset=yes
3820else
3821  echo "$as_me: failed program was:" >&5
3822cat conftest.$ac_ext >&5
3823am_cv_langinfo_codeset=no
3824fi
3825rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3826
3827fi
3828echo "$as_me:3828: result: $am_cv_langinfo_codeset" >&5
3829echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
3830  if test $am_cv_langinfo_codeset = yes; then
3831
3832cat >>confdefs.h <<\EOF
3833#define HAVE_LANGINFO_CODESET 1
3834EOF
3835
3836  fi
3837
3838###	checks for typedefs
3839
3840echo "$as_me:3840: checking for signal global datatype" >&5
3841echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
3842if test "${cf_cv_sig_atomic_t+set}" = set; then
3843  echo $ECHO_N "(cached) $ECHO_C" >&6
3844else
3845
3846	for cf_type in \
3847		"volatile sig_atomic_t" \
3848		"sig_atomic_t" \
3849		"int"
3850	do
3851	cat >conftest.$ac_ext <<_ACEOF
3852#line 3852 "configure"
3853#include "confdefs.h"
3854
3855#include <sys/types.h>
3856#include <signal.h>
3857#include <stdio.h>
3858
3859extern $cf_type x;
3860$cf_type x;
3861static void handler(int sig)
3862{
3863	x = 5;
3864}
3865int
3866main ()
3867{
3868signal(SIGINT, handler);
3869		 x = 1
3870  ;
3871  return 0;
3872}
3873_ACEOF
3874rm -f conftest.$ac_objext
3875if { (eval echo "$as_me:3875: \"$ac_compile\"") >&5
3876  (eval $ac_compile) 2>&5
3877  ac_status=$?
3878  echo "$as_me:3878: \$? = $ac_status" >&5
3879  (exit $ac_status); } &&
3880         { ac_try='test -s conftest.$ac_objext'
3881  { (eval echo "$as_me:3881: \"$ac_try\"") >&5
3882  (eval $ac_try) 2>&5
3883  ac_status=$?
3884  echo "$as_me:3884: \$? = $ac_status" >&5
3885  (exit $ac_status); }; }; then
3886  cf_cv_sig_atomic_t=$cf_type
3887else
3888  echo "$as_me: failed program was:" >&5
3889cat conftest.$ac_ext >&5
3890cf_cv_sig_atomic_t=no
3891fi
3892rm -f conftest.$ac_objext conftest.$ac_ext
3893		test "$cf_cv_sig_atomic_t" != no && break
3894	done
3895
3896fi
3897
3898echo "$as_me:3898: result: $cf_cv_sig_atomic_t" >&5
3899echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
3900test "$cf_cv_sig_atomic_t" != no && cat >>confdefs.h <<EOF
3901#define SIG_ATOMIC_T $cf_cv_sig_atomic_t
3902EOF
3903
3904echo "$as_me:3904: checking for size_t in <sys/types.h> or <stdio.h>" >&5
3905echo $ECHO_N "checking for size_t in <sys/types.h> or <stdio.h>... $ECHO_C" >&6
3906if test "${cf_cv_type_size_t+set}" = set; then
3907  echo $ECHO_N "(cached) $ECHO_C" >&6
3908else
3909
3910	cat >conftest.$ac_ext <<_ACEOF
3911#line 3911 "configure"
3912#include "confdefs.h"
3913
3914#include <sys/types.h>
3915#ifdef STDC_HEADERS
3916#include <stdlib.h>
3917#include <stddef.h>
3918#endif
3919#include <stdio.h>
3920int
3921main ()
3922{
3923size_t x
3924  ;
3925  return 0;
3926}
3927_ACEOF
3928rm -f conftest.$ac_objext
3929if { (eval echo "$as_me:3929: \"$ac_compile\"") >&5
3930  (eval $ac_compile) 2>&5
3931  ac_status=$?
3932  echo "$as_me:3932: \$? = $ac_status" >&5
3933  (exit $ac_status); } &&
3934         { ac_try='test -s conftest.$ac_objext'
3935  { (eval echo "$as_me:3935: \"$ac_try\"") >&5
3936  (eval $ac_try) 2>&5
3937  ac_status=$?
3938  echo "$as_me:3938: \$? = $ac_status" >&5
3939  (exit $ac_status); }; }; then
3940  cf_cv_type_size_t=yes
3941else
3942  echo "$as_me: failed program was:" >&5
3943cat conftest.$ac_ext >&5
3944cf_cv_type_size_t=no
3945fi
3946rm -f conftest.$ac_objext conftest.$ac_ext
3947
3948fi
3949
3950echo "$as_me:3950: result: $cf_cv_type_size_t" >&5
3951echo "${ECHO_T}$cf_cv_type_size_t" >&6
3952test $cf_cv_type_size_t = no && cat >>confdefs.h <<\EOF
3953#define size_t unsigned
3954EOF
3955
3956echo "$as_me:3956: checking for ANSI C header files" >&5
3957echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
3958if test "${ac_cv_header_stdc+set}" = set; then
3959  echo $ECHO_N "(cached) $ECHO_C" >&6
3960else
3961  cat >conftest.$ac_ext <<_ACEOF
3962#line 3962 "configure"
3963#include "confdefs.h"
3964#include <stdlib.h>
3965#include <stdarg.h>
3966#include <string.h>
3967#include <float.h>
3968
3969_ACEOF
3970if { (eval echo "$as_me:3970: \"$ac_cpp conftest.$ac_ext\"") >&5
3971  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3972  ac_status=$?
3973  egrep -v '^ *\+' conftest.er1 >conftest.err
3974  rm -f conftest.er1
3975  cat conftest.err >&5
3976  echo "$as_me:3976: \$? = $ac_status" >&5
3977  (exit $ac_status); } >/dev/null; then
3978  if test -s conftest.err; then
3979    ac_cpp_err=$ac_c_preproc_warn_flag
3980  else
3981    ac_cpp_err=
3982  fi
3983else
3984  ac_cpp_err=yes
3985fi
3986if test -z "$ac_cpp_err"; then
3987  ac_cv_header_stdc=yes
3988else
3989  echo "$as_me: failed program was:" >&5
3990  cat conftest.$ac_ext >&5
3991  ac_cv_header_stdc=no
3992fi
3993rm -f conftest.err conftest.$ac_ext
3994
3995if test $ac_cv_header_stdc = yes; then
3996  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3997  cat >conftest.$ac_ext <<_ACEOF
3998#line 3998 "configure"
3999#include "confdefs.h"
4000#include <string.h>
4001
4002_ACEOF
4003if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4004  egrep "memchr" >/dev/null 2>&1; then
4005  :
4006else
4007  ac_cv_header_stdc=no
4008fi
4009rm -rf conftest*
4010
4011fi
4012
4013if test $ac_cv_header_stdc = yes; then
4014  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4015  cat >conftest.$ac_ext <<_ACEOF
4016#line 4016 "configure"
4017#include "confdefs.h"
4018#include <stdlib.h>
4019
4020_ACEOF
4021if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4022  egrep "free" >/dev/null 2>&1; then
4023  :
4024else
4025  ac_cv_header_stdc=no
4026fi
4027rm -rf conftest*
4028
4029fi
4030
4031if test $ac_cv_header_stdc = yes; then
4032  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4033  if test "$cross_compiling" = yes; then
4034  :
4035else
4036  cat >conftest.$ac_ext <<_ACEOF
4037#line 4037 "configure"
4038#include "confdefs.h"
4039#include <ctype.h>
4040#if ((' ' & 0x0FF) == 0x020)
4041# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4042# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4043#else
4044# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
4045                     || ('j' <= (c) && (c) <= 'r') \
4046                     || ('s' <= (c) && (c) <= 'z'))
4047# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4048#endif
4049
4050#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4051int
4052main ()
4053{
4054  int i;
4055  for (i = 0; i < 256; i++)
4056    if (XOR (islower (i), ISLOWER (i))
4057        || toupper (i) != TOUPPER (i))
4058      $ac_main_return(2);
4059  $ac_main_return (0);
4060}
4061_ACEOF
4062rm -f conftest$ac_exeext
4063if { (eval echo "$as_me:4063: \"$ac_link\"") >&5
4064  (eval $ac_link) 2>&5
4065  ac_status=$?
4066  echo "$as_me:4066: \$? = $ac_status" >&5
4067  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4068  { (eval echo "$as_me:4068: \"$ac_try\"") >&5
4069  (eval $ac_try) 2>&5
4070  ac_status=$?
4071  echo "$as_me:4071: \$? = $ac_status" >&5
4072  (exit $ac_status); }; }; then
4073  :
4074else
4075  echo "$as_me: program exited with status $ac_status" >&5
4076echo "$as_me: failed program was:" >&5
4077cat conftest.$ac_ext >&5
4078ac_cv_header_stdc=no
4079fi
4080rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4081fi
4082fi
4083fi
4084echo "$as_me:4084: result: $ac_cv_header_stdc" >&5
4085echo "${ECHO_T}$ac_cv_header_stdc" >&6
4086if test $ac_cv_header_stdc = yes; then
4087
4088cat >>confdefs.h <<\EOF
4089#define STDC_HEADERS 1
4090EOF
4091
4092fi
4093
4094# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4095
4096for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4097                  inttypes.h stdint.h unistd.h
4098do
4099as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4100echo "$as_me:4100: checking for $ac_header" >&5
4101echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4102if eval "test \"\${$as_ac_Header+set}\" = set"; then
4103  echo $ECHO_N "(cached) $ECHO_C" >&6
4104else
4105  cat >conftest.$ac_ext <<_ACEOF
4106#line 4106 "configure"
4107#include "confdefs.h"
4108$ac_includes_default
4109#include <$ac_header>
4110_ACEOF
4111rm -f conftest.$ac_objext
4112if { (eval echo "$as_me:4112: \"$ac_compile\"") >&5
4113  (eval $ac_compile) 2>&5
4114  ac_status=$?
4115  echo "$as_me:4115: \$? = $ac_status" >&5
4116  (exit $ac_status); } &&
4117         { ac_try='test -s conftest.$ac_objext'
4118  { (eval echo "$as_me:4118: \"$ac_try\"") >&5
4119  (eval $ac_try) 2>&5
4120  ac_status=$?
4121  echo "$as_me:4121: \$? = $ac_status" >&5
4122  (exit $ac_status); }; }; then
4123  eval "$as_ac_Header=yes"
4124else
4125  echo "$as_me: failed program was:" >&5
4126cat conftest.$ac_ext >&5
4127eval "$as_ac_Header=no"
4128fi
4129rm -f conftest.$ac_objext conftest.$ac_ext
4130fi
4131echo "$as_me:4131: result: `eval echo '${'$as_ac_Header'}'`" >&5
4132echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4133if test `eval echo '${'$as_ac_Header'}'` = yes; then
4134  cat >>confdefs.h <<EOF
4135#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4136EOF
4137
4138fi
4139done
4140
4141echo "$as_me:4141: checking for time_t" >&5
4142echo $ECHO_N "checking for time_t... $ECHO_C" >&6
4143if test "${ac_cv_type_time_t+set}" = set; then
4144  echo $ECHO_N "(cached) $ECHO_C" >&6
4145else
4146  cat >conftest.$ac_ext <<_ACEOF
4147#line 4147 "configure"
4148#include "confdefs.h"
4149$ac_includes_default
4150int
4151main ()
4152{
4153if ((time_t *) 0)
4154  return 0;
4155if (sizeof (time_t))
4156  return 0;
4157  ;
4158  return 0;
4159}
4160_ACEOF
4161rm -f conftest.$ac_objext
4162if { (eval echo "$as_me:4162: \"$ac_compile\"") >&5
4163  (eval $ac_compile) 2>&5
4164  ac_status=$?
4165  echo "$as_me:4165: \$? = $ac_status" >&5
4166  (exit $ac_status); } &&
4167         { ac_try='test -s conftest.$ac_objext'
4168  { (eval echo "$as_me:4168: \"$ac_try\"") >&5
4169  (eval $ac_try) 2>&5
4170  ac_status=$?
4171  echo "$as_me:4171: \$? = $ac_status" >&5
4172  (exit $ac_status); }; }; then
4173  ac_cv_type_time_t=yes
4174else
4175  echo "$as_me: failed program was:" >&5
4176cat conftest.$ac_ext >&5
4177ac_cv_type_time_t=no
4178fi
4179rm -f conftest.$ac_objext conftest.$ac_ext
4180fi
4181echo "$as_me:4181: result: $ac_cv_type_time_t" >&5
4182echo "${ECHO_T}$ac_cv_type_time_t" >&6
4183if test $ac_cv_type_time_t = yes; then
4184  :
4185else
4186
4187cat >>confdefs.h <<EOF
4188#define time_t long
4189EOF
4190
4191fi
4192
4193echo "$as_me:4193: checking for mode_t" >&5
4194echo $ECHO_N "checking for mode_t... $ECHO_C" >&6
4195if test "${ac_cv_type_mode_t+set}" = set; then
4196  echo $ECHO_N "(cached) $ECHO_C" >&6
4197else
4198  cat >conftest.$ac_ext <<_ACEOF
4199#line 4199 "configure"
4200#include "confdefs.h"
4201$ac_includes_default
4202int
4203main ()
4204{
4205if ((mode_t *) 0)
4206  return 0;
4207if (sizeof (mode_t))
4208  return 0;
4209  ;
4210  return 0;
4211}
4212_ACEOF
4213rm -f conftest.$ac_objext
4214if { (eval echo "$as_me:4214: \"$ac_compile\"") >&5
4215  (eval $ac_compile) 2>&5
4216  ac_status=$?
4217  echo "$as_me:4217: \$? = $ac_status" >&5
4218  (exit $ac_status); } &&
4219         { ac_try='test -s conftest.$ac_objext'
4220  { (eval echo "$as_me:4220: \"$ac_try\"") >&5
4221  (eval $ac_try) 2>&5
4222  ac_status=$?
4223  echo "$as_me:4223: \$? = $ac_status" >&5
4224  (exit $ac_status); }; }; then
4225  ac_cv_type_mode_t=yes
4226else
4227  echo "$as_me: failed program was:" >&5
4228cat conftest.$ac_ext >&5
4229ac_cv_type_mode_t=no
4230fi
4231rm -f conftest.$ac_objext conftest.$ac_ext
4232fi
4233echo "$as_me:4233: result: $ac_cv_type_mode_t" >&5
4234echo "${ECHO_T}$ac_cv_type_mode_t" >&6
4235if test $ac_cv_type_mode_t = yes; then
4236  :
4237else
4238
4239cat >>confdefs.h <<EOF
4240#define mode_t int
4241EOF
4242
4243fi
4244
4245echo "$as_me:4245: checking for pid_t" >&5
4246echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
4247if test "${ac_cv_type_pid_t+set}" = set; then
4248  echo $ECHO_N "(cached) $ECHO_C" >&6
4249else
4250  cat >conftest.$ac_ext <<_ACEOF
4251#line 4251 "configure"
4252#include "confdefs.h"
4253$ac_includes_default
4254int
4255main ()
4256{
4257if ((pid_t *) 0)
4258  return 0;
4259if (sizeof (pid_t))
4260  return 0;
4261  ;
4262  return 0;
4263}
4264_ACEOF
4265rm -f conftest.$ac_objext
4266if { (eval echo "$as_me:4266: \"$ac_compile\"") >&5
4267  (eval $ac_compile) 2>&5
4268  ac_status=$?
4269  echo "$as_me:4269: \$? = $ac_status" >&5
4270  (exit $ac_status); } &&
4271         { ac_try='test -s conftest.$ac_objext'
4272  { (eval echo "$as_me:4272: \"$ac_try\"") >&5
4273  (eval $ac_try) 2>&5
4274  ac_status=$?
4275  echo "$as_me:4275: \$? = $ac_status" >&5
4276  (exit $ac_status); }; }; then
4277  ac_cv_type_pid_t=yes
4278else
4279  echo "$as_me: failed program was:" >&5
4280cat conftest.$ac_ext >&5
4281ac_cv_type_pid_t=no
4282fi
4283rm -f conftest.$ac_objext conftest.$ac_ext
4284fi
4285echo "$as_me:4285: result: $ac_cv_type_pid_t" >&5
4286echo "${ECHO_T}$ac_cv_type_pid_t" >&6
4287if test $ac_cv_type_pid_t = yes; then
4288  :
4289else
4290
4291cat >>confdefs.h <<EOF
4292#define pid_t int
4293EOF
4294
4295fi
4296
4297echo "$as_me:4297: checking for uid_t in sys/types.h" >&5
4298echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
4299if test "${ac_cv_type_uid_t+set}" = set; then
4300  echo $ECHO_N "(cached) $ECHO_C" >&6
4301else
4302  cat >conftest.$ac_ext <<_ACEOF
4303#line 4303 "configure"
4304#include "confdefs.h"
4305#include <sys/types.h>
4306
4307_ACEOF
4308if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4309  egrep "uid_t" >/dev/null 2>&1; then
4310  ac_cv_type_uid_t=yes
4311else
4312  ac_cv_type_uid_t=no
4313fi
4314rm -rf conftest*
4315
4316fi
4317echo "$as_me:4317: result: $ac_cv_type_uid_t" >&5
4318echo "${ECHO_T}$ac_cv_type_uid_t" >&6
4319if test $ac_cv_type_uid_t = no; then
4320
4321cat >>confdefs.h <<\EOF
4322#define uid_t int
4323EOF
4324
4325cat >>confdefs.h <<\EOF
4326#define gid_t int
4327EOF
4328
4329fi
4330
4331echo "$as_me:4331: checking for off_t" >&5
4332echo $ECHO_N "checking for off_t... $ECHO_C" >&6
4333if test "${ac_cv_type_off_t+set}" = set; then
4334  echo $ECHO_N "(cached) $ECHO_C" >&6
4335else
4336  cat >conftest.$ac_ext <<_ACEOF
4337#line 4337 "configure"
4338#include "confdefs.h"
4339$ac_includes_default
4340int
4341main ()
4342{
4343if ((off_t *) 0)
4344  return 0;
4345if (sizeof (off_t))
4346  return 0;
4347  ;
4348  return 0;
4349}
4350_ACEOF
4351rm -f conftest.$ac_objext
4352if { (eval echo "$as_me:4352: \"$ac_compile\"") >&5
4353  (eval $ac_compile) 2>&5
4354  ac_status=$?
4355  echo "$as_me:4355: \$? = $ac_status" >&5
4356  (exit $ac_status); } &&
4357         { ac_try='test -s conftest.$ac_objext'
4358  { (eval echo "$as_me:4358: \"$ac_try\"") >&5
4359  (eval $ac_try) 2>&5
4360  ac_status=$?
4361  echo "$as_me:4361: \$? = $ac_status" >&5
4362  (exit $ac_status); }; }; then
4363  ac_cv_type_off_t=yes
4364else
4365  echo "$as_me: failed program was:" >&5
4366cat conftest.$ac_ext >&5
4367ac_cv_type_off_t=no
4368fi
4369rm -f conftest.$ac_objext conftest.$ac_ext
4370fi
4371echo "$as_me:4371: result: $ac_cv_type_off_t" >&5
4372echo "${ECHO_T}$ac_cv_type_off_t" >&6
4373if test $ac_cv_type_off_t = yes; then
4374  :
4375else
4376
4377cat >>confdefs.h <<EOF
4378#define off_t long
4379EOF
4380
4381fi
4382
4383###	checks for library functions
4384
4385for ac_func in \
4386	bcopy \
4387	gethostname \
4388	getlogin \
4389	memmove \
4390	putenv \
4391	sched_yield \
4392	strerror \
4393	strftime \
4394	tcgetattr \
4395	waitpid \
4396	wcswidth \
4397	wcwidth
4398do
4399as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
4400echo "$as_me:4400: checking for $ac_func" >&5
4401echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
4402if eval "test \"\${$as_ac_var+set}\" = set"; then
4403  echo $ECHO_N "(cached) $ECHO_C" >&6
4404else
4405  cat >conftest.$ac_ext <<_ACEOF
4406#line 4406 "configure"
4407#include "confdefs.h"
4408/* System header to define __stub macros and hopefully few prototypes,
4409    which can conflict with char $ac_func (); below.  */
4410#include <assert.h>
4411/* Override any gcc2 internal prototype to avoid an error.  */
4412#ifdef __cplusplus
4413extern "C"
4414#endif
4415/* We use char because int might match the return type of a gcc2
4416   builtin and then its argument prototype would still apply.  */
4417char $ac_func ();
4418char (*f) ();
4419
4420int
4421main ()
4422{
4423/* The GNU C library defines this for functions which it implements
4424    to always fail with ENOSYS.  Some functions are actually named
4425    something starting with __ and the normal name is an alias.  */
4426#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4427choke me
4428#else
4429f = $ac_func;
4430#endif
4431
4432  ;
4433  return 0;
4434}
4435_ACEOF
4436rm -f conftest.$ac_objext conftest$ac_exeext
4437if { (eval echo "$as_me:4437: \"$ac_link\"") >&5
4438  (eval $ac_link) 2>&5
4439  ac_status=$?
4440  echo "$as_me:4440: \$? = $ac_status" >&5
4441  (exit $ac_status); } &&
4442         { ac_try='test -s conftest$ac_exeext'
4443  { (eval echo "$as_me:4443: \"$ac_try\"") >&5
4444  (eval $ac_try) 2>&5
4445  ac_status=$?
4446  echo "$as_me:4446: \$? = $ac_status" >&5
4447  (exit $ac_status); }; }; then
4448  eval "$as_ac_var=yes"
4449else
4450  echo "$as_me: failed program was:" >&5
4451cat conftest.$ac_ext >&5
4452eval "$as_ac_var=no"
4453fi
4454rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4455fi
4456echo "$as_me:4456: result: `eval echo '${'$as_ac_var'}'`" >&5
4457echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
4458if test `eval echo '${'$as_ac_var'}'` = yes; then
4459  cat >>confdefs.h <<EOF
4460#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
4461EOF
4462
4463fi
4464done
4465
4466echo "$as_me:4466: checking for memmove" >&5
4467echo $ECHO_N "checking for memmove... $ECHO_C" >&6
4468if test "${ac_cv_func_memmove+set}" = set; then
4469  echo $ECHO_N "(cached) $ECHO_C" >&6
4470else
4471  cat >conftest.$ac_ext <<_ACEOF
4472#line 4472 "configure"
4473#include "confdefs.h"
4474/* System header to define __stub macros and hopefully few prototypes,
4475    which can conflict with char memmove (); below.  */
4476#include <assert.h>
4477/* Override any gcc2 internal prototype to avoid an error.  */
4478#ifdef __cplusplus
4479extern "C"
4480#endif
4481/* We use char because int might match the return type of a gcc2
4482   builtin and then its argument prototype would still apply.  */
4483char memmove ();
4484char (*f) ();
4485
4486int
4487main ()
4488{
4489/* The GNU C library defines this for functions which it implements
4490    to always fail with ENOSYS.  Some functions are actually named
4491    something starting with __ and the normal name is an alias.  */
4492#if defined (__stub_memmove) || defined (__stub___memmove)
4493choke me
4494#else
4495f = memmove;
4496#endif
4497
4498  ;
4499  return 0;
4500}
4501_ACEOF
4502rm -f conftest.$ac_objext conftest$ac_exeext
4503if { (eval echo "$as_me:4503: \"$ac_link\"") >&5
4504  (eval $ac_link) 2>&5
4505  ac_status=$?
4506  echo "$as_me:4506: \$? = $ac_status" >&5
4507  (exit $ac_status); } &&
4508         { ac_try='test -s 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  ac_cv_func_memmove=yes
4515else
4516  echo "$as_me: failed program was:" >&5
4517cat conftest.$ac_ext >&5
4518ac_cv_func_memmove=no
4519fi
4520rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4521fi
4522echo "$as_me:4522: result: $ac_cv_func_memmove" >&5
4523echo "${ECHO_T}$ac_cv_func_memmove" >&6
4524if test $ac_cv_func_memmove = yes; then
4525  :
4526else
4527
4528echo "$as_me:4528: checking for bcopy" >&5
4529echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
4530if test "${ac_cv_func_bcopy+set}" = set; then
4531  echo $ECHO_N "(cached) $ECHO_C" >&6
4532else
4533  cat >conftest.$ac_ext <<_ACEOF
4534#line 4534 "configure"
4535#include "confdefs.h"
4536/* System header to define __stub macros and hopefully few prototypes,
4537    which can conflict with char bcopy (); below.  */
4538#include <assert.h>
4539/* Override any gcc2 internal prototype to avoid an error.  */
4540#ifdef __cplusplus
4541extern "C"
4542#endif
4543/* We use char because int might match the return type of a gcc2
4544   builtin and then its argument prototype would still apply.  */
4545char bcopy ();
4546char (*f) ();
4547
4548int
4549main ()
4550{
4551/* The GNU C library defines this for functions which it implements
4552    to always fail with ENOSYS.  Some functions are actually named
4553    something starting with __ and the normal name is an alias.  */
4554#if defined (__stub_bcopy) || defined (__stub___bcopy)
4555choke me
4556#else
4557f = bcopy;
4558#endif
4559
4560  ;
4561  return 0;
4562}
4563_ACEOF
4564rm -f conftest.$ac_objext conftest$ac_exeext
4565if { (eval echo "$as_me:4565: \"$ac_link\"") >&5
4566  (eval $ac_link) 2>&5
4567  ac_status=$?
4568  echo "$as_me:4568: \$? = $ac_status" >&5
4569  (exit $ac_status); } &&
4570         { ac_try='test -s conftest$ac_exeext'
4571  { (eval echo "$as_me:4571: \"$ac_try\"") >&5
4572  (eval $ac_try) 2>&5
4573  ac_status=$?
4574  echo "$as_me:4574: \$? = $ac_status" >&5
4575  (exit $ac_status); }; }; then
4576  ac_cv_func_bcopy=yes
4577else
4578  echo "$as_me: failed program was:" >&5
4579cat conftest.$ac_ext >&5
4580ac_cv_func_bcopy=no
4581fi
4582rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4583fi
4584echo "$as_me:4584: result: $ac_cv_func_bcopy" >&5
4585echo "${ECHO_T}$ac_cv_func_bcopy" >&6
4586if test $ac_cv_func_bcopy = yes; then
4587
4588	echo "$as_me:4588: checking if bcopy does overlapping moves" >&5
4589echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
4590if test "${cf_cv_good_bcopy+set}" = set; then
4591  echo $ECHO_N "(cached) $ECHO_C" >&6
4592else
4593
4594		if test "$cross_compiling" = yes; then
4595  cf_cv_good_bcopy=unknown
4596else
4597  cat >conftest.$ac_ext <<_ACEOF
4598#line 4598 "configure"
4599#include "confdefs.h"
4600
4601int main() {
4602	static char data[] = "abcdefghijklmnopqrstuwwxyz";
4603	char temp[40];
4604	bcopy(data, temp, sizeof(data));
4605	bcopy(temp+10, temp, 15);
4606	bcopy(temp+5, temp+15, 10);
4607	${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
4608}
4609
4610_ACEOF
4611rm -f conftest$ac_exeext
4612if { (eval echo "$as_me:4612: \"$ac_link\"") >&5
4613  (eval $ac_link) 2>&5
4614  ac_status=$?
4615  echo "$as_me:4615: \$? = $ac_status" >&5
4616  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4617  { (eval echo "$as_me:4617: \"$ac_try\"") >&5
4618  (eval $ac_try) 2>&5
4619  ac_status=$?
4620  echo "$as_me:4620: \$? = $ac_status" >&5
4621  (exit $ac_status); }; }; then
4622  cf_cv_good_bcopy=yes
4623else
4624  echo "$as_me: program exited with status $ac_status" >&5
4625echo "$as_me: failed program was:" >&5
4626cat conftest.$ac_ext >&5
4627cf_cv_good_bcopy=no
4628fi
4629rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4630fi
4631
4632fi
4633echo "$as_me:4633: result: $cf_cv_good_bcopy" >&5
4634echo "${ECHO_T}$cf_cv_good_bcopy" >&6
4635
4636else
4637  cf_cv_good_bcopy=no
4638fi
4639
4640	if test "$cf_cv_good_bcopy" = yes ; then
4641		cat >>confdefs.h <<\EOF
4642#define USE_OK_BCOPY 1
4643EOF
4644
4645	else
4646		cat >>confdefs.h <<\EOF
4647#define USE_MY_MEMMOVE 1
4648EOF
4649
4650	fi
4651
4652fi
4653
4654for ac_header in lastlog.h paths.h
4655do
4656as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4657echo "$as_me:4657: checking for $ac_header" >&5
4658echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4659if eval "test \"\${$as_ac_Header+set}\" = set"; then
4660  echo $ECHO_N "(cached) $ECHO_C" >&6
4661else
4662  cat >conftest.$ac_ext <<_ACEOF
4663#line 4663 "configure"
4664#include "confdefs.h"
4665#include <$ac_header>
4666_ACEOF
4667if { (eval echo "$as_me:4667: \"$ac_cpp conftest.$ac_ext\"") >&5
4668  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4669  ac_status=$?
4670  egrep -v '^ *\+' conftest.er1 >conftest.err
4671  rm -f conftest.er1
4672  cat conftest.err >&5
4673  echo "$as_me:4673: \$? = $ac_status" >&5
4674  (exit $ac_status); } >/dev/null; then
4675  if test -s conftest.err; then
4676    ac_cpp_err=$ac_c_preproc_warn_flag
4677  else
4678    ac_cpp_err=
4679  fi
4680else
4681  ac_cpp_err=yes
4682fi
4683if test -z "$ac_cpp_err"; then
4684  eval "$as_ac_Header=yes"
4685else
4686  echo "$as_me: failed program was:" >&5
4687  cat conftest.$ac_ext >&5
4688  eval "$as_ac_Header=no"
4689fi
4690rm -f conftest.err conftest.$ac_ext
4691fi
4692echo "$as_me:4692: result: `eval echo '${'$as_ac_Header'}'`" >&5
4693echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4694if test `eval echo '${'$as_ac_Header'}'` = yes; then
4695  cat >>confdefs.h <<EOF
4696#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4697EOF
4698
4699fi
4700done
4701
4702echo "$as_me:4702: checking for lastlog path" >&5
4703echo $ECHO_N "checking for lastlog path... $ECHO_C" >&6
4704if test "${cf_cv_path_lastlog+set}" = set; then
4705  echo $ECHO_N "(cached) $ECHO_C" >&6
4706else
4707
4708cat >conftest.$ac_ext <<_ACEOF
4709#line 4709 "configure"
4710#include "confdefs.h"
4711
4712#include <sys/types.h>
4713#ifdef HAVE_LASTLOG_H
4714#include <lastlog.h>
4715#else
4716#ifdef HAVE_PATHS_H
4717#include <paths.h>
4718#endif
4719#endif
4720int
4721main ()
4722{
4723char *path = _PATH_LASTLOG
4724  ;
4725  return 0;
4726}
4727_ACEOF
4728rm -f conftest.$ac_objext
4729if { (eval echo "$as_me:4729: \"$ac_compile\"") >&5
4730  (eval $ac_compile) 2>&5
4731  ac_status=$?
4732  echo "$as_me:4732: \$? = $ac_status" >&5
4733  (exit $ac_status); } &&
4734         { ac_try='test -s conftest.$ac_objext'
4735  { (eval echo "$as_me:4735: \"$ac_try\"") >&5
4736  (eval $ac_try) 2>&5
4737  ac_status=$?
4738  echo "$as_me:4738: \$? = $ac_status" >&5
4739  (exit $ac_status); }; }; then
4740  cf_cv_path_lastlog="_PATH_LASTLOG"
4741else
4742  echo "$as_me: failed program was:" >&5
4743cat conftest.$ac_ext >&5
4744if test -f /usr/adm/lastlog ; then
4745	 	cf_cv_path_lastlog=/usr/adm/lastlog
4746	else
4747		cf_cv_path_lastlog=no
4748	fi
4749fi
4750rm -f conftest.$ac_objext conftest.$ac_ext
4751
4752fi
4753echo "$as_me:4753: result: $cf_cv_path_lastlog" >&5
4754echo "${ECHO_T}$cf_cv_path_lastlog" >&6
4755test $cf_cv_path_lastlog != no && cat >>confdefs.h <<\EOF
4756#define USE_LASTLOG 1
4757EOF
4758
4759echo "$as_me:4759: checking for utmp implementation" >&5
4760echo $ECHO_N "checking for utmp implementation... $ECHO_C" >&6
4761if test "${cf_cv_have_utmp+set}" = set; then
4762  echo $ECHO_N "(cached) $ECHO_C" >&6
4763else
4764
4765	cf_cv_have_utmp=no
4766for cf_header in utmpx utmp ; do
4767cf_utmp_includes="
4768#include <sys/types.h>
4769#include <${cf_header}.h>
4770#define getutent getutxent
4771#ifdef USE_LASTLOG
4772#include <lastlog.h>	/* may conflict with utmpx.h on Linux */
4773#endif
4774"
4775	cat >conftest.$ac_ext <<_ACEOF
4776#line 4776 "configure"
4777#include "confdefs.h"
4778$cf_utmp_includes
4779int
4780main ()
4781{
4782struct $cf_header x;
4783	 char *name = x.ut_name; /* utmp.h and compatible definitions */
4784
4785  ;
4786  return 0;
4787}
4788_ACEOF
4789rm -f conftest.$ac_objext
4790if { (eval echo "$as_me:4790: \"$ac_compile\"") >&5
4791  (eval $ac_compile) 2>&5
4792  ac_status=$?
4793  echo "$as_me:4793: \$? = $ac_status" >&5
4794  (exit $ac_status); } &&
4795         { ac_try='test -s conftest.$ac_objext'
4796  { (eval echo "$as_me:4796: \"$ac_try\"") >&5
4797  (eval $ac_try) 2>&5
4798  ac_status=$?
4799  echo "$as_me:4799: \$? = $ac_status" >&5
4800  (exit $ac_status); }; }; then
4801  cf_cv_have_utmp=$cf_header
4802	 break
4803else
4804  echo "$as_me: failed program was:" >&5
4805cat conftest.$ac_ext >&5
4806
4807	cat >conftest.$ac_ext <<_ACEOF
4808#line 4808 "configure"
4809#include "confdefs.h"
4810$cf_utmp_includes
4811int
4812main ()
4813{
4814struct $cf_header x;
4815	 char *name = x.ut_user; /* utmpx.h must declare this */
4816
4817  ;
4818  return 0;
4819}
4820_ACEOF
4821rm -f conftest.$ac_objext
4822if { (eval echo "$as_me:4822: \"$ac_compile\"") >&5
4823  (eval $ac_compile) 2>&5
4824  ac_status=$?
4825  echo "$as_me:4825: \$? = $ac_status" >&5
4826  (exit $ac_status); } &&
4827         { ac_try='test -s conftest.$ac_objext'
4828  { (eval echo "$as_me:4828: \"$ac_try\"") >&5
4829  (eval $ac_try) 2>&5
4830  ac_status=$?
4831  echo "$as_me:4831: \$? = $ac_status" >&5
4832  (exit $ac_status); }; }; then
4833  cf_cv_have_utmp=$cf_header
4834	 break
4835
4836else
4837  echo "$as_me: failed program was:" >&5
4838cat conftest.$ac_ext >&5
4839fi
4840rm -f conftest.$ac_objext conftest.$ac_ext
4841fi
4842rm -f conftest.$ac_objext conftest.$ac_ext
4843done
4844
4845fi
4846echo "$as_me:4846: result: $cf_cv_have_utmp" >&5
4847echo "${ECHO_T}$cf_cv_have_utmp" >&6
4848
4849if test $cf_cv_have_utmp != no ; then
4850	cat >>confdefs.h <<\EOF
4851#define HAVE_UTMP 1
4852EOF
4853
4854	test $cf_cv_have_utmp = utmpx && cat >>confdefs.h <<\EOF
4855#define UTMPX_FOR_UTMP 1
4856EOF
4857
4858if test $cf_cv_have_utmp != no ; then
4859echo "$as_me:4859: checking if ${cf_cv_have_utmp}.ut_host is declared" >&5
4860echo $ECHO_N "checking if ${cf_cv_have_utmp}.ut_host is declared... $ECHO_C" >&6
4861if test "${cf_cv_have_utmp_ut_host+set}" = set; then
4862  echo $ECHO_N "(cached) $ECHO_C" >&6
4863else
4864
4865	cat >conftest.$ac_ext <<_ACEOF
4866#line 4866 "configure"
4867#include "confdefs.h"
4868
4869#include <sys/types.h>
4870#include <${cf_cv_have_utmp}.h>
4871int
4872main ()
4873{
4874struct $cf_cv_have_utmp x; char *y = &x.ut_host[0]
4875  ;
4876  return 0;
4877}
4878_ACEOF
4879rm -f conftest.$ac_objext
4880if { (eval echo "$as_me:4880: \"$ac_compile\"") >&5
4881  (eval $ac_compile) 2>&5
4882  ac_status=$?
4883  echo "$as_me:4883: \$? = $ac_status" >&5
4884  (exit $ac_status); } &&
4885         { ac_try='test -s conftest.$ac_objext'
4886  { (eval echo "$as_me:4886: \"$ac_try\"") >&5
4887  (eval $ac_try) 2>&5
4888  ac_status=$?
4889  echo "$as_me:4889: \$? = $ac_status" >&5
4890  (exit $ac_status); }; }; then
4891  cf_cv_have_utmp_ut_host=yes
4892else
4893  echo "$as_me: failed program was:" >&5
4894cat conftest.$ac_ext >&5
4895cf_cv_have_utmp_ut_host=no
4896fi
4897rm -f conftest.$ac_objext conftest.$ac_ext
4898
4899fi
4900
4901echo "$as_me:4901: result: $cf_cv_have_utmp_ut_host" >&5
4902echo "${ECHO_T}$cf_cv_have_utmp_ut_host" >&6
4903test $cf_cv_have_utmp_ut_host != no && cat >>confdefs.h <<\EOF
4904#define HAVE_UTMP_UT_HOST 1
4905EOF
4906
4907fi
4908
4909if test $cf_cv_have_utmp != no ; then
4910echo "$as_me:4910: checking if ${cf_cv_have_utmp}.ut_syslen is declared" >&5
4911echo $ECHO_N "checking if ${cf_cv_have_utmp}.ut_syslen is declared... $ECHO_C" >&6
4912if test "${cf_cv_have_utmp_ut_syslen+set}" = set; then
4913  echo $ECHO_N "(cached) $ECHO_C" >&6
4914else
4915
4916	cat >conftest.$ac_ext <<_ACEOF
4917#line 4917 "configure"
4918#include "confdefs.h"
4919
4920#include <sys/types.h>
4921#include <${cf_cv_have_utmp}.h>
4922int
4923main ()
4924{
4925struct $cf_cv_have_utmp x; int y = x.ut_syslen
4926  ;
4927  return 0;
4928}
4929_ACEOF
4930rm -f conftest.$ac_objext
4931if { (eval echo "$as_me:4931: \"$ac_compile\"") >&5
4932  (eval $ac_compile) 2>&5
4933  ac_status=$?
4934  echo "$as_me:4934: \$? = $ac_status" >&5
4935  (exit $ac_status); } &&
4936         { ac_try='test -s conftest.$ac_objext'
4937  { (eval echo "$as_me:4937: \"$ac_try\"") >&5
4938  (eval $ac_try) 2>&5
4939  ac_status=$?
4940  echo "$as_me:4940: \$? = $ac_status" >&5
4941  (exit $ac_status); }; }; then
4942  cf_cv_have_utmp_ut_syslen=yes
4943else
4944  echo "$as_me: failed program was:" >&5
4945cat conftest.$ac_ext >&5
4946cf_cv_have_utmp_ut_syslen=no
4947fi
4948rm -f conftest.$ac_objext conftest.$ac_ext
4949
4950fi
4951
4952echo "$as_me:4952: result: $cf_cv_have_utmp_ut_syslen" >&5
4953echo "${ECHO_T}$cf_cv_have_utmp_ut_syslen" >&6
4954test $cf_cv_have_utmp_ut_syslen != no && cat >>confdefs.h <<\EOF
4955#define HAVE_UTMP_UT_SYSLEN 1
4956EOF
4957
4958fi
4959
4960if test $cf_cv_have_utmp != no ; then
4961echo "$as_me:4961: checking if ${cf_cv_have_utmp}.ut_name is declared" >&5
4962echo $ECHO_N "checking if ${cf_cv_have_utmp}.ut_name is declared... $ECHO_C" >&6
4963if test "${cf_cv_have_utmp_ut_name+set}" = set; then
4964  echo $ECHO_N "(cached) $ECHO_C" >&6
4965else
4966
4967	cf_cv_have_utmp_ut_name=no
4968cf_utmp_includes="
4969#include <sys/types.h>
4970#include <${cf_cv_have_utmp}.h>
4971#define getutent getutxent
4972#ifdef USE_LASTLOG
4973#include <lastlog.h>		/* may conflict with utmpx.h on Linux */
4974#endif
4975"
4976for cf_header in ut_name ut_user ; do
4977	cat >conftest.$ac_ext <<_ACEOF
4978#line 4978 "configure"
4979#include "confdefs.h"
4980$cf_utmp_includes
4981int
4982main ()
4983{
4984struct $cf_cv_have_utmp x;
4985	 char *name = x.$cf_header;
4986
4987  ;
4988  return 0;
4989}
4990_ACEOF
4991rm -f conftest.$ac_objext
4992if { (eval echo "$as_me:4992: \"$ac_compile\"") >&5
4993  (eval $ac_compile) 2>&5
4994  ac_status=$?
4995  echo "$as_me:4995: \$? = $ac_status" >&5
4996  (exit $ac_status); } &&
4997         { ac_try='test -s conftest.$ac_objext'
4998  { (eval echo "$as_me:4998: \"$ac_try\"") >&5
4999  (eval $ac_try) 2>&5
5000  ac_status=$?
5001  echo "$as_me:5001: \$? = $ac_status" >&5
5002  (exit $ac_status); }; }; then
5003  cf_cv_have_utmp_ut_name=$cf_header
5004	 break
5005else
5006  echo "$as_me: failed program was:" >&5
5007cat conftest.$ac_ext >&5
5008fi
5009rm -f conftest.$ac_objext conftest.$ac_ext
5010done
5011
5012fi
5013echo "$as_me:5013: result: $cf_cv_have_utmp_ut_name" >&5
5014echo "${ECHO_T}$cf_cv_have_utmp_ut_name" >&6
5015
5016case $cf_cv_have_utmp_ut_name in #(vi
5017no) #(vi
5018	{ { echo "$as_me:5018: error: Cannot find declaration for ut.ut_name" >&5
5019echo "$as_me: error: Cannot find declaration for ut.ut_name" >&2;}
5020   { (exit 1); exit 1; }; }
5021	;;
5022ut_user)
5023	cat >>confdefs.h <<\EOF
5024#define ut_name ut_user
5025EOF
5026
5027	;;
5028esac
5029fi
5030
5031if test $cf_cv_have_utmp != no ; then
5032echo "$as_me:5032: checking for exit-status in $cf_cv_have_utmp" >&5
5033echo $ECHO_N "checking for exit-status in $cf_cv_have_utmp... $ECHO_C" >&6
5034if test "${cf_cv_have_utmp_ut_xstatus+set}" = set; then
5035  echo $ECHO_N "(cached) $ECHO_C" >&6
5036else
5037
5038for cf_result in \
5039	ut_exit.__e_exit \
5040	ut_exit.e_exit \
5041	ut_exit.ut_e_exit \
5042	ut_exit.ut_exit
5043do
5044cat >conftest.$ac_ext <<_ACEOF
5045#line 5045 "configure"
5046#include "confdefs.h"
5047
5048#include <sys/types.h>
5049#include <${cf_cv_have_utmp}.h>
5050int
5051main ()
5052{
5053struct $cf_cv_have_utmp x; long y = x.$cf_result = 0
5054  ;
5055  return 0;
5056}
5057_ACEOF
5058rm -f conftest.$ac_objext
5059if { (eval echo "$as_me:5059: \"$ac_compile\"") >&5
5060  (eval $ac_compile) 2>&5
5061  ac_status=$?
5062  echo "$as_me:5062: \$? = $ac_status" >&5
5063  (exit $ac_status); } &&
5064         { ac_try='test -s conftest.$ac_objext'
5065  { (eval echo "$as_me:5065: \"$ac_try\"") >&5
5066  (eval $ac_try) 2>&5
5067  ac_status=$?
5068  echo "$as_me:5068: \$? = $ac_status" >&5
5069  (exit $ac_status); }; }; then
5070  cf_cv_have_utmp_ut_xstatus=$cf_result
5071	 break
5072else
5073  echo "$as_me: failed program was:" >&5
5074cat conftest.$ac_ext >&5
5075cf_cv_have_utmp_ut_xstatus=no
5076fi
5077rm -f conftest.$ac_objext conftest.$ac_ext
5078done
5079
5080fi
5081echo "$as_me:5081: result: $cf_cv_have_utmp_ut_xstatus" >&5
5082echo "${ECHO_T}$cf_cv_have_utmp_ut_xstatus" >&6
5083if test $cf_cv_have_utmp_ut_xstatus != no ; then
5084	cat >>confdefs.h <<\EOF
5085#define HAVE_UTMP_UT_XSTATUS 1
5086EOF
5087
5088	cat >>confdefs.h <<EOF
5089#define ut_xstatus $cf_cv_have_utmp_ut_xstatus
5090EOF
5091
5092fi
5093fi
5094
5095if test $cf_cv_have_utmp != no ; then
5096echo "$as_me:5096: checking if ${cf_cv_have_utmp}.ut_xtime is declared" >&5
5097echo $ECHO_N "checking if ${cf_cv_have_utmp}.ut_xtime is declared... $ECHO_C" >&6
5098if test "${cf_cv_have_utmp_ut_xtime+set}" = set; then
5099  echo $ECHO_N "(cached) $ECHO_C" >&6
5100else
5101
5102	cat >conftest.$ac_ext <<_ACEOF
5103#line 5103 "configure"
5104#include "confdefs.h"
5105
5106#include <sys/types.h>
5107#include <${cf_cv_have_utmp}.h>
5108int
5109main ()
5110{
5111struct $cf_cv_have_utmp x; long y = x.ut_xtime = 0
5112  ;
5113  return 0;
5114}
5115_ACEOF
5116rm -f conftest.$ac_objext
5117if { (eval echo "$as_me:5117: \"$ac_compile\"") >&5
5118  (eval $ac_compile) 2>&5
5119  ac_status=$?
5120  echo "$as_me:5120: \$? = $ac_status" >&5
5121  (exit $ac_status); } &&
5122         { ac_try='test -s conftest.$ac_objext'
5123  { (eval echo "$as_me:5123: \"$ac_try\"") >&5
5124  (eval $ac_try) 2>&5
5125  ac_status=$?
5126  echo "$as_me:5126: \$? = $ac_status" >&5
5127  (exit $ac_status); }; }; then
5128  cf_cv_have_utmp_ut_xtime=yes
5129else
5130  echo "$as_me: failed program was:" >&5
5131cat conftest.$ac_ext >&5
5132cat >conftest.$ac_ext <<_ACEOF
5133#line 5133 "configure"
5134#include "confdefs.h"
5135
5136#include <sys/types.h>
5137#include <${cf_cv_have_utmp}.h>
5138int
5139main ()
5140{
5141struct $cf_cv_have_utmp x; long y = x.ut_tv.tv_sec
5142  ;
5143  return 0;
5144}
5145_ACEOF
5146rm -f conftest.$ac_objext
5147if { (eval echo "$as_me:5147: \"$ac_compile\"") >&5
5148  (eval $ac_compile) 2>&5
5149  ac_status=$?
5150  echo "$as_me:5150: \$? = $ac_status" >&5
5151  (exit $ac_status); } &&
5152         { ac_try='test -s conftest.$ac_objext'
5153  { (eval echo "$as_me:5153: \"$ac_try\"") >&5
5154  (eval $ac_try) 2>&5
5155  ac_status=$?
5156  echo "$as_me:5156: \$? = $ac_status" >&5
5157  (exit $ac_status); }; }; then
5158  cf_cv_have_utmp_ut_xtime=define
5159else
5160  echo "$as_me: failed program was:" >&5
5161cat conftest.$ac_ext >&5
5162cf_cv_have_utmp_ut_xtime=no
5163fi
5164rm -f conftest.$ac_objext conftest.$ac_ext
5165
5166fi
5167rm -f conftest.$ac_objext conftest.$ac_ext
5168
5169fi
5170echo "$as_me:5170: result: $cf_cv_have_utmp_ut_xtime" >&5
5171echo "${ECHO_T}$cf_cv_have_utmp_ut_xtime" >&6
5172if test $cf_cv_have_utmp_ut_xtime != no ; then
5173	cat >>confdefs.h <<\EOF
5174#define HAVE_UTMP_UT_XTIME 1
5175EOF
5176
5177	if test $cf_cv_have_utmp_ut_xtime = define ; then
5178		cat >>confdefs.h <<\EOF
5179#define ut_xtime ut_tv.tv_sec
5180EOF
5181
5182	fi
5183fi
5184fi
5185
5186if test $cf_cv_have_utmp != no ; then
5187echo "$as_me:5187: checking if ${cf_cv_have_utmp}.ut_session is declared" >&5
5188echo $ECHO_N "checking if ${cf_cv_have_utmp}.ut_session is declared... $ECHO_C" >&6
5189if test "${cf_cv_have_utmp_ut_session+set}" = set; then
5190  echo $ECHO_N "(cached) $ECHO_C" >&6
5191else
5192
5193	cat >conftest.$ac_ext <<_ACEOF
5194#line 5194 "configure"
5195#include "confdefs.h"
5196
5197#include <sys/types.h>
5198#include <${cf_cv_have_utmp}.h>
5199int
5200main ()
5201{
5202struct $cf_cv_have_utmp x; long y = x.ut_session
5203  ;
5204  return 0;
5205}
5206_ACEOF
5207rm -f conftest.$ac_objext
5208if { (eval echo "$as_me:5208: \"$ac_compile\"") >&5
5209  (eval $ac_compile) 2>&5
5210  ac_status=$?
5211  echo "$as_me:5211: \$? = $ac_status" >&5
5212  (exit $ac_status); } &&
5213         { ac_try='test -s conftest.$ac_objext'
5214  { (eval echo "$as_me:5214: \"$ac_try\"") >&5
5215  (eval $ac_try) 2>&5
5216  ac_status=$?
5217  echo "$as_me:5217: \$? = $ac_status" >&5
5218  (exit $ac_status); }; }; then
5219  cf_cv_have_utmp_ut_session=yes
5220else
5221  echo "$as_me: failed program was:" >&5
5222cat conftest.$ac_ext >&5
5223cf_cv_have_utmp_ut_session=no
5224fi
5225rm -f conftest.$ac_objext conftest.$ac_ext
5226
5227fi
5228echo "$as_me:5228: result: $cf_cv_have_utmp_ut_session" >&5
5229echo "${ECHO_T}$cf_cv_have_utmp_ut_session" >&6
5230if test $cf_cv_have_utmp_ut_session != no ; then
5231	cat >>confdefs.h <<\EOF
5232#define HAVE_UTMP_UT_SESSION 1
5233EOF
5234
5235fi
5236fi
5237
5238echo "$as_me:5238: checking if $cf_cv_have_utmp is SYSV flavor" >&5
5239echo $ECHO_N "checking if $cf_cv_have_utmp is SYSV flavor... $ECHO_C" >&6
5240if test "${cf_cv_sysv_utmp+set}" = set; then
5241  echo $ECHO_N "(cached) $ECHO_C" >&6
5242else
5243
5244test "$cf_cv_have_utmp" = "utmp" && cf_prefix="ut" || cf_prefix="utx"
5245cat >conftest.$ac_ext <<_ACEOF
5246#line 5246 "configure"
5247#include "confdefs.h"
5248
5249#include <sys/types.h>
5250#include <${cf_cv_have_utmp}.h>
5251int
5252main ()
5253{
5254
5255struct $cf_cv_have_utmp x;
5256	set${cf_prefix}ent ();
5257	get${cf_prefix}id(&x);
5258	put${cf_prefix}line(&x);
5259	end${cf_prefix}ent();
5260  ;
5261  return 0;
5262}
5263_ACEOF
5264rm -f conftest.$ac_objext conftest$ac_exeext
5265if { (eval echo "$as_me:5265: \"$ac_link\"") >&5
5266  (eval $ac_link) 2>&5
5267  ac_status=$?
5268  echo "$as_me:5268: \$? = $ac_status" >&5
5269  (exit $ac_status); } &&
5270         { ac_try='test -s conftest$ac_exeext'
5271  { (eval echo "$as_me:5271: \"$ac_try\"") >&5
5272  (eval $ac_try) 2>&5
5273  ac_status=$?
5274  echo "$as_me:5274: \$? = $ac_status" >&5
5275  (exit $ac_status); }; }; then
5276  cf_cv_sysv_utmp=yes
5277else
5278  echo "$as_me: failed program was:" >&5
5279cat conftest.$ac_ext >&5
5280cf_cv_sysv_utmp=no
5281fi
5282rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5283
5284fi
5285echo "$as_me:5285: result: $cf_cv_sysv_utmp" >&5
5286echo "${ECHO_T}$cf_cv_sysv_utmp" >&6
5287test $cf_cv_sysv_utmp = yes && cat >>confdefs.h <<\EOF
5288#define USE_SYSV_UTMP 1
5289EOF
5290
5291fi
5292
5293for ac_header in lastlog.h
5294do
5295as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5296echo "$as_me:5296: checking for $ac_header" >&5
5297echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5298if eval "test \"\${$as_ac_Header+set}\" = set"; then
5299  echo $ECHO_N "(cached) $ECHO_C" >&6
5300else
5301  cat >conftest.$ac_ext <<_ACEOF
5302#line 5302 "configure"
5303#include "confdefs.h"
5304#include <$ac_header>
5305_ACEOF
5306if { (eval echo "$as_me:5306: \"$ac_cpp conftest.$ac_ext\"") >&5
5307  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5308  ac_status=$?
5309  egrep -v '^ *\+' conftest.er1 >conftest.err
5310  rm -f conftest.er1
5311  cat conftest.err >&5
5312  echo "$as_me:5312: \$? = $ac_status" >&5
5313  (exit $ac_status); } >/dev/null; then
5314  if test -s conftest.err; then
5315    ac_cpp_err=$ac_c_preproc_warn_flag
5316  else
5317    ac_cpp_err=
5318  fi
5319else
5320  ac_cpp_err=yes
5321fi
5322if test -z "$ac_cpp_err"; then
5323  eval "$as_ac_Header=yes"
5324else
5325  echo "$as_me: failed program was:" >&5
5326  cat conftest.$ac_ext >&5
5327  eval "$as_ac_Header=no"
5328fi
5329rm -f conftest.err conftest.$ac_ext
5330fi
5331echo "$as_me:5331: result: `eval echo '${'$as_ac_Header'}'`" >&5
5332echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5333if test `eval echo '${'$as_ac_Header'}'` = yes; then
5334  cat >>confdefs.h <<EOF
5335#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5336EOF
5337
5338fi
5339done
5340
5341echo "$as_me:5341: checking for struct lastlog" >&5
5342echo $ECHO_N "checking for struct lastlog... $ECHO_C" >&6
5343if test "${cf_cv_struct_lastlog+set}" = set; then
5344  echo $ECHO_N "(cached) $ECHO_C" >&6
5345else
5346
5347if test "$cross_compiling" = yes; then
5348
5349cf_cv_struct_lastlog=unknown
5350else
5351  cat >conftest.$ac_ext <<_ACEOF
5352#line 5352 "configure"
5353#include "confdefs.h"
5354
5355#include <sys/types.h>
5356#include <time.h>
5357#include <lastlog.h>
5358
5359int main()
5360{
5361	struct lastlog data;
5362	return (sizeof(data.ll_time) != sizeof(time_t));
5363}
5364_ACEOF
5365rm -f conftest$ac_exeext
5366if { (eval echo "$as_me:5366: \"$ac_link\"") >&5
5367  (eval $ac_link) 2>&5
5368  ac_status=$?
5369  echo "$as_me:5369: \$? = $ac_status" >&5
5370  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5371  { (eval echo "$as_me:5371: \"$ac_try\"") >&5
5372  (eval $ac_try) 2>&5
5373  ac_status=$?
5374  echo "$as_me:5374: \$? = $ac_status" >&5
5375  (exit $ac_status); }; }; then
5376
5377cf_cv_struct_lastlog=yes
5378else
5379  echo "$as_me: program exited with status $ac_status" >&5
5380echo "$as_me: failed program was:" >&5
5381cat conftest.$ac_ext >&5
5382
5383cf_cv_struct_lastlog=no
5384fi
5385rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5386fi
5387fi
5388echo "$as_me:5388: result: $cf_cv_struct_lastlog" >&5
5389echo "${ECHO_T}$cf_cv_struct_lastlog" >&6
5390
5391test $cf_cv_struct_lastlog != no && cat >>confdefs.h <<\EOF
5392#define USE_STRUCT_LASTLOG 1
5393EOF
5394
5395for ac_header in \
5396sys/param.h \
5397
5398do
5399as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5400echo "$as_me:5400: checking for $ac_header" >&5
5401echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5402if eval "test \"\${$as_ac_Header+set}\" = set"; then
5403  echo $ECHO_N "(cached) $ECHO_C" >&6
5404else
5405  cat >conftest.$ac_ext <<_ACEOF
5406#line 5406 "configure"
5407#include "confdefs.h"
5408#include <$ac_header>
5409_ACEOF
5410if { (eval echo "$as_me:5410: \"$ac_cpp conftest.$ac_ext\"") >&5
5411  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5412  ac_status=$?
5413  egrep -v '^ *\+' conftest.er1 >conftest.err
5414  rm -f conftest.er1
5415  cat conftest.err >&5
5416  echo "$as_me:5416: \$? = $ac_status" >&5
5417  (exit $ac_status); } >/dev/null; then
5418  if test -s conftest.err; then
5419    ac_cpp_err=$ac_c_preproc_warn_flag
5420  else
5421    ac_cpp_err=
5422  fi
5423else
5424  ac_cpp_err=yes
5425fi
5426if test -z "$ac_cpp_err"; then
5427  eval "$as_ac_Header=yes"
5428else
5429  echo "$as_me: failed program was:" >&5
5430  cat conftest.$ac_ext >&5
5431  eval "$as_ac_Header=no"
5432fi
5433rm -f conftest.err conftest.$ac_ext
5434fi
5435echo "$as_me:5435: result: `eval echo '${'$as_ac_Header'}'`" >&5
5436echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5437if test `eval echo '${'$as_ac_Header'}'` = yes; then
5438  cat >>confdefs.h <<EOF
5439#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5440EOF
5441
5442fi
5443done
5444
5445echo "$as_me:5445: checking if POSIX saved-ids are supported" >&5
5446echo $ECHO_N "checking if POSIX saved-ids are supported... $ECHO_C" >&6
5447if test "${cf_cv_posix_saved_ids+set}" = set; then
5448  echo $ECHO_N "(cached) $ECHO_C" >&6
5449else
5450
5451cat >conftest.$ac_ext <<_ACEOF
5452#line 5452 "configure"
5453#include "confdefs.h"
5454
5455#include <unistd.h>
5456#ifdef HAVE_SYS_PARAM_H
5457#include <sys/param.h>		/* this may define "BSD" */
5458#endif
5459
5460int
5461main ()
5462{
5463
5464#if defined(_POSIX_SAVED_IDS) && (_POSIX_SAVED_IDS > 0)
5465	void *p = (void *) seteuid;
5466	int x = seteuid(geteuid());
5467#elif defined(BSD) && (BSD >= 199103)
5468/* The BSD's may implement the runtime check - and it fails.
5469 * However, saved-ids work almost like POSIX (close enough for most uses).
5470 */
5471#else
5472make an error
5473#endif
5474
5475  ;
5476  return 0;
5477}
5478_ACEOF
5479rm -f conftest.$ac_objext conftest$ac_exeext
5480if { (eval echo "$as_me:5480: \"$ac_link\"") >&5
5481  (eval $ac_link) 2>&5
5482  ac_status=$?
5483  echo "$as_me:5483: \$? = $ac_status" >&5
5484  (exit $ac_status); } &&
5485         { ac_try='test -s conftest$ac_exeext'
5486  { (eval echo "$as_me:5486: \"$ac_try\"") >&5
5487  (eval $ac_try) 2>&5
5488  ac_status=$?
5489  echo "$as_me:5489: \$? = $ac_status" >&5
5490  (exit $ac_status); }; }; then
5491  cf_cv_posix_saved_ids=yes
5492
5493else
5494  echo "$as_me: failed program was:" >&5
5495cat conftest.$ac_ext >&5
5496
5497if test "$cross_compiling" = yes; then
5498  cf_cv_posix_saved_ids=unknown
5499else
5500  cat >conftest.$ac_ext <<_ACEOF
5501#line 5501 "configure"
5502#include "confdefs.h"
5503
5504#ifdef HAVE_STDLIB_H
5505#include <stdlib.h>
5506#endif
5507#include <unistd.h>
5508int main()
5509{
5510	void *p = (void *) seteuid;
5511	long code = sysconf(_SC_SAVED_IDS);
5512	${cf_cv_main_return:-return}  ((code > 0) ? 0 : 1);
5513}
5514_ACEOF
5515rm -f conftest$ac_exeext
5516if { (eval echo "$as_me:5516: \"$ac_link\"") >&5
5517  (eval $ac_link) 2>&5
5518  ac_status=$?
5519  echo "$as_me:5519: \$? = $ac_status" >&5
5520  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5521  { (eval echo "$as_me:5521: \"$ac_try\"") >&5
5522  (eval $ac_try) 2>&5
5523  ac_status=$?
5524  echo "$as_me:5524: \$? = $ac_status" >&5
5525  (exit $ac_status); }; }; then
5526  cf_cv_posix_saved_ids=yes
5527else
5528  echo "$as_me: program exited with status $ac_status" >&5
5529echo "$as_me: failed program was:" >&5
5530cat conftest.$ac_ext >&5
5531cf_cv_posix_saved_ids=no
5532fi
5533rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5534fi
5535
5536fi
5537rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5538
5539fi
5540echo "$as_me:5540: result: $cf_cv_posix_saved_ids" >&5
5541echo "${ECHO_T}$cf_cv_posix_saved_ids" >&6
5542
5543test "$cf_cv_posix_saved_ids" = yes && cat >>confdefs.h <<\EOF
5544#define HAVE_POSIX_SAVED_IDS 1
5545EOF
5546
5547# compute a reasonable value for $TERM to give tgetent(), since we may be
5548# running in 'screen', which sets $TERMCAP to a specific entry that is not
5549# necessarily in /etc/termcap - unsetenv is not portable, so we cannot simply
5550# discard $TERMCAP.
5551cf_TERMVAR=vt100
5552if test -n "$TERMCAP"
5553then
5554	cf_TERMCAP=`echo "$TERMCAP" | tr '\n' ' ' | sed -e 's/^..|//' -e 's/|.*//'`
5555	case "$cf_TERMCAP" in #(vi
5556	screen*.*) #(vi
5557		;;
5558	*)
5559		cf_TERMVAR="$cf_TERMCAP"
5560		;;
5561	esac
5562fi
5563test -z "$cf_TERMVAR" && cf_TERMVAR=vt100
5564
5565echo "$as_me:5565: checking if we want full tgetent function" >&5
5566echo $ECHO_N "checking if we want full tgetent function... $ECHO_C" >&6
5567
5568# Check whether --enable-full-tgetent or --disable-full-tgetent was given.
5569if test "${enable_full_tgetent+set}" = set; then
5570  enableval="$enable_full_tgetent"
5571  test "$enableval" != no && enableval=yes
5572  if test "$enableval" != "yes" ; then
5573    cf_full_tgetent=no
5574  else
5575    cf_full_tgetent=yes
5576  fi
5577else
5578  enableval=yes
5579  cf_full_tgetent=yes
5580
5581fi;
5582echo "$as_me:5582: result: $cf_full_tgetent" >&5
5583echo "${ECHO_T}$cf_full_tgetent" >&6
5584
5585if test "$cf_full_tgetent" = yes ; then
5586	cf_test_message="full tgetent"
5587else
5588	cf_test_message="tgetent"
5589fi
5590
5591echo "$as_me:5591: checking for $cf_test_message function" >&5
5592echo $ECHO_N "checking for $cf_test_message function... $ECHO_C" >&6
5593if test "${cf_cv_lib_tgetent+set}" = set; then
5594  echo $ECHO_N "(cached) $ECHO_C" >&6
5595else
5596
5597cf_save_LIBS="$LIBS"
5598cf_cv_lib_tgetent=no
5599if test "$cf_full_tgetent" = yes ; then
5600	cf_TERMLIB="termcap termlib ncurses curses"
5601	cf_TERMTST="buffer[0] == 0"
5602else
5603	cf_TERMLIB="termlib ncurses curses"
5604	cf_TERMTST="0"
5605fi
5606for cf_termlib in '' $cf_TERMLIB ; do
5607	LIBS="$cf_save_LIBS"
5608	test -n "$cf_termlib" && LIBS="-l$cf_termlib $LIBS"
5609	if test "$cross_compiling" = yes; then
5610  echo "cross-compiling, cannot verify if a termcap/tgetent is present in $cf_termlib" 1>&5
5611else
5612  cat >conftest.$ac_ext <<_ACEOF
5613#line 5613 "configure"
5614#include "confdefs.h"
5615
5616/* terminfo implementations ignore the buffer argument, making it useless for
5617 * the xterm application, which uses this information to make a new TERMCAP
5618 * environment variable.
5619 */
5620int main()
5621{
5622	char buffer[1024];
5623	buffer[0] = 0;
5624	tgetent(buffer, "$cf_TERMVAR");
5625	${cf_cv_main_return:-return} ($cf_TERMTST); }
5626_ACEOF
5627rm -f conftest$ac_exeext
5628if { (eval echo "$as_me:5628: \"$ac_link\"") >&5
5629  (eval $ac_link) 2>&5
5630  ac_status=$?
5631  echo "$as_me:5631: \$? = $ac_status" >&5
5632  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5633  { (eval echo "$as_me:5633: \"$ac_try\"") >&5
5634  (eval $ac_try) 2>&5
5635  ac_status=$?
5636  echo "$as_me:5636: \$? = $ac_status" >&5
5637  (exit $ac_status); }; }; then
5638  echo "yes, there is a termcap/tgetent in $cf_termlib" 1>&5
5639	 if test -n "$cf_termlib" ; then
5640	 	cf_cv_lib_tgetent="-l$cf_termlib"
5641	 else
5642	 	cf_cv_lib_tgetent=yes
5643	 fi
5644	 break
5645else
5646  echo "$as_me: program exited with status $ac_status" >&5
5647echo "$as_me: failed program was:" >&5
5648cat conftest.$ac_ext >&5
5649echo "no, there is no termcap/tgetent in $cf_termlib" 1>&5
5650fi
5651rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5652fi
5653done
5654LIBS="$cf_save_LIBS"
5655
5656fi
5657echo "$as_me:5657: result: $cf_cv_lib_tgetent" >&5
5658echo "${ECHO_T}$cf_cv_lib_tgetent" >&6
5659
5660# If we found a working tgetent(), set LIBS and check for termcap.h.
5661# (LIBS cannot be set inside AC_CACHE_CHECK; the commands there should
5662# not have side effects other than setting the cache variable, because
5663# they are not executed when a cached value exists.)
5664if test "x$cf_cv_lib_tgetent" != xno ; then
5665	test "x$cf_cv_lib_tgetent" != xyes && LIBS="$cf_cv_lib_tgetent $LIBS"
5666	cat >>confdefs.h <<\EOF
5667#define USE_TERMCAP 1
5668EOF
5669
5670	if test "$cf_full_tgetent" = no ; then
5671		cat >conftest.$ac_ext <<_ACEOF
5672#line 5672 "configure"
5673#include "confdefs.h"
5674
5675#include <termcap.h>
5676int
5677main ()
5678{
5679
5680#ifdef NCURSES_VERSION
5681make an error
5682#endif
5683  ;
5684  return 0;
5685}
5686_ACEOF
5687rm -f conftest.$ac_objext
5688if { (eval echo "$as_me:5688: \"$ac_compile\"") >&5
5689  (eval $ac_compile) 2>&5
5690  ac_status=$?
5691  echo "$as_me:5691: \$? = $ac_status" >&5
5692  (exit $ac_status); } &&
5693         { ac_try='test -s conftest.$ac_objext'
5694  { (eval echo "$as_me:5694: \"$ac_try\"") >&5
5695  (eval $ac_try) 2>&5
5696  ac_status=$?
5697  echo "$as_me:5697: \$? = $ac_status" >&5
5698  (exit $ac_status); }; }; then
5699  cat >>confdefs.h <<\EOF
5700#define HAVE_TERMCAP_H 1
5701EOF
5702
5703else
5704  echo "$as_me: failed program was:" >&5
5705cat conftest.$ac_ext >&5
5706fi
5707rm -f conftest.$ac_objext conftest.$ac_ext
5708	else
5709
5710for ac_header in termcap.h
5711do
5712as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5713echo "$as_me:5713: checking for $ac_header" >&5
5714echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5715if eval "test \"\${$as_ac_Header+set}\" = set"; then
5716  echo $ECHO_N "(cached) $ECHO_C" >&6
5717else
5718  cat >conftest.$ac_ext <<_ACEOF
5719#line 5719 "configure"
5720#include "confdefs.h"
5721#include <$ac_header>
5722_ACEOF
5723if { (eval echo "$as_me:5723: \"$ac_cpp conftest.$ac_ext\"") >&5
5724  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5725  ac_status=$?
5726  egrep -v '^ *\+' conftest.er1 >conftest.err
5727  rm -f conftest.er1
5728  cat conftest.err >&5
5729  echo "$as_me:5729: \$? = $ac_status" >&5
5730  (exit $ac_status); } >/dev/null; then
5731  if test -s conftest.err; then
5732    ac_cpp_err=$ac_c_preproc_warn_flag
5733  else
5734    ac_cpp_err=
5735  fi
5736else
5737  ac_cpp_err=yes
5738fi
5739if test -z "$ac_cpp_err"; then
5740  eval "$as_ac_Header=yes"
5741else
5742  echo "$as_me: failed program was:" >&5
5743  cat conftest.$ac_ext >&5
5744  eval "$as_ac_Header=no"
5745fi
5746rm -f conftest.err conftest.$ac_ext
5747fi
5748echo "$as_me:5748: result: `eval echo '${'$as_ac_Header'}'`" >&5
5749echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5750if test `eval echo '${'$as_ac_Header'}'` = yes; then
5751  cat >>confdefs.h <<EOF
5752#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5753EOF
5754
5755fi
5756done
5757
5758	fi
5759else
5760        # If we didn't find a tgetent() that supports the buffer
5761        # argument, look again to see whether we can find even
5762        # a crippled one.  A crippled tgetent() is still useful to
5763        # validate values for the TERM environment variable given to
5764        # child processes.
5765	echo "$as_me:5765: checking for partial tgetent function" >&5
5766echo $ECHO_N "checking for partial tgetent function... $ECHO_C" >&6
5767if test "${cf_cv_lib_part_tgetent+set}" = set; then
5768  echo $ECHO_N "(cached) $ECHO_C" >&6
5769else
5770
5771	cf_cv_lib_part_tgetent=no
5772	for cf_termlib in $cf_TERMLIB ; do
5773		LIBS="$cf_save_LIBS -l$cf_termlib"
5774		cat >conftest.$ac_ext <<_ACEOF
5775#line 5775 "configure"
5776#include "confdefs.h"
5777
5778int
5779main ()
5780{
5781tgetent(0, "$cf_TERMVAR")
5782  ;
5783  return 0;
5784}
5785_ACEOF
5786rm -f conftest.$ac_objext conftest$ac_exeext
5787if { (eval echo "$as_me:5787: \"$ac_link\"") >&5
5788  (eval $ac_link) 2>&5
5789  ac_status=$?
5790  echo "$as_me:5790: \$? = $ac_status" >&5
5791  (exit $ac_status); } &&
5792         { ac_try='test -s conftest$ac_exeext'
5793  { (eval echo "$as_me:5793: \"$ac_try\"") >&5
5794  (eval $ac_try) 2>&5
5795  ac_status=$?
5796  echo "$as_me:5796: \$? = $ac_status" >&5
5797  (exit $ac_status); }; }; then
5798  echo "there is a terminfo/tgetent in $cf_termlib" 1>&5
5799			 cf_cv_lib_part_tgetent="-l$cf_termlib"
5800			 break
5801else
5802  echo "$as_me: failed program was:" >&5
5803cat conftest.$ac_ext >&5
5804fi
5805rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5806	done
5807	LIBS="$cf_save_LIBS"
5808
5809fi
5810echo "$as_me:5810: result: $cf_cv_lib_part_tgetent" >&5
5811echo "${ECHO_T}$cf_cv_lib_part_tgetent" >&6
5812
5813	if test "$cf_cv_lib_part_tgetent" != no ; then
5814		LIBS="$cf_cv_lib_part_tgetent $LIBS"
5815
5816for ac_header in termcap.h
5817do
5818as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5819echo "$as_me:5819: checking for $ac_header" >&5
5820echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5821if eval "test \"\${$as_ac_Header+set}\" = set"; then
5822  echo $ECHO_N "(cached) $ECHO_C" >&6
5823else
5824  cat >conftest.$ac_ext <<_ACEOF
5825#line 5825 "configure"
5826#include "confdefs.h"
5827#include <$ac_header>
5828_ACEOF
5829if { (eval echo "$as_me:5829: \"$ac_cpp conftest.$ac_ext\"") >&5
5830  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5831  ac_status=$?
5832  egrep -v '^ *\+' conftest.er1 >conftest.err
5833  rm -f conftest.er1
5834  cat conftest.err >&5
5835  echo "$as_me:5835: \$? = $ac_status" >&5
5836  (exit $ac_status); } >/dev/null; then
5837  if test -s conftest.err; then
5838    ac_cpp_err=$ac_c_preproc_warn_flag
5839  else
5840    ac_cpp_err=
5841  fi
5842else
5843  ac_cpp_err=yes
5844fi
5845if test -z "$ac_cpp_err"; then
5846  eval "$as_ac_Header=yes"
5847else
5848  echo "$as_me: failed program was:" >&5
5849  cat conftest.$ac_ext >&5
5850  eval "$as_ac_Header=no"
5851fi
5852rm -f conftest.err conftest.$ac_ext
5853fi
5854echo "$as_me:5854: result: `eval echo '${'$as_ac_Header'}'`" >&5
5855echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5856if test `eval echo '${'$as_ac_Header'}'` = yes; then
5857  cat >>confdefs.h <<EOF
5858#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5859EOF
5860
5861fi
5862done
5863
5864                # If this is linking against ncurses, we'll trigger the
5865                # ifdef in resize.c that turns the termcap stuff back off.
5866		cat >>confdefs.h <<\EOF
5867#define USE_TERMINFO 1
5868EOF
5869
5870	fi
5871fi
5872
5873echo "$as_me:5873: checking for X applications class" >&5
5874echo $ECHO_N "checking for X applications class... $ECHO_C" >&6
5875
5876# Check whether --with-app-class or --without-app-class was given.
5877if test "${with_app_class+set}" = set; then
5878  withval="$with_app_class"
5879  APP_CLASS=$withval
5880else
5881  APP_CLASS=XTerm
5882fi;
5883
5884case x$APP_CLASS in #(vi
5885*[/@,%]*) #(vi
5886	{ echo "$as_me:5886: WARNING: X applications class cannot contain punctuation" >&5
5887echo "$as_me: WARNING: X applications class cannot contain punctuation" >&2;}
5888	APP_CLASS=XTerm
5889	;;
5890x[A-Z]*) #(vi
5891	;;
5892*)
5893	{ echo "$as_me:5893: WARNING: X applications class must start with capital, ignoring $APP_CLASS" >&5
5894echo "$as_me: WARNING: X applications class must start with capital, ignoring $APP_CLASS" >&2;}
5895	APP_CLASS=XTerm
5896	;;
5897esac
5898
5899echo "$as_me:5899: result: $APP_CLASS" >&5
5900echo "${ECHO_T}$APP_CLASS" >&6
5901
5902echo "$as_me:5902: checking for directory to install resource files" >&5
5903echo $ECHO_N "checking for directory to install resource files... $ECHO_C" >&6
5904
5905# Check whether --with-app-defaults or --without-app-defaults was given.
5906if test "${with_app_defaults+set}" = set; then
5907  withval="$with_app_defaults"
5908
5909else
5910  withval="${appsdir:-'\$(exec_prefix)/lib/X11/app-defaults'}"
5911fi; if test -n "'\$(exec_prefix)/lib/X11/app-defaults'" ; then
5912
5913if test "x$prefix" != xNONE; then
5914  cf_path_syntax="$prefix"
5915else
5916  cf_path_syntax="$ac_default_prefix"
5917fi
5918
5919case ".$withval" in #(vi
5920.\$\(*\)*|.\'*\'*) #(vi
5921  ;;
5922..|./*|.\\*) #(vi
5923  ;;
5924.[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
5925  ;;
5926.\${*prefix}*) #(vi
5927  eval withval="$withval"
5928  case ".$withval" in #(vi
5929  .NONE/*)
5930    withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
5931    ;;
5932  esac
5933  ;; #(vi
5934.no|.NONE/*)
5935  withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
5936  ;;
5937*)
5938  { { echo "$as_me:5938: error: expected a pathname, not \"$withval\"" >&5
5939echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
5940   { (exit 1); exit 1; }; }
5941  ;;
5942esac
5943
5944fi
5945appsdir="$withval"
5946
5947echo "$as_me:5947: result: $appsdir" >&5
5948echo "${ECHO_T}$appsdir" >&6
5949
5950no_appsdir=
5951test "$appsdir" = no && no_appsdir="#"
5952
5953echo "$as_me:5953: checking for directory to install icons" >&5
5954echo $ECHO_N "checking for directory to install icons... $ECHO_C" >&6
5955
5956# Check whether --with-icondir or --without-icondir was given.
5957if test "${with_icondir+set}" = set; then
5958  withval="$with_icondir"
5959
5960else
5961  withval="${icondir:-'\$(exec_prefix)/share/pixmaps'}"
5962fi; if test -n "'\$(exec_prefix)/share/pixmaps'" ; then
5963
5964if test "x$prefix" != xNONE; then
5965  cf_path_syntax="$prefix"
5966else
5967  cf_path_syntax="$ac_default_prefix"
5968fi
5969
5970case ".$withval" in #(vi
5971.\$\(*\)*|.\'*\'*) #(vi
5972  ;;
5973..|./*|.\\*) #(vi
5974  ;;
5975.[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
5976  ;;
5977.\${*prefix}*) #(vi
5978  eval withval="$withval"
5979  case ".$withval" in #(vi
5980  .NONE/*)
5981    withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
5982    ;;
5983  esac
5984  ;; #(vi
5985.no|.NONE/*)
5986  withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
5987  ;;
5988*)
5989  { { echo "$as_me:5989: error: expected a pathname, not \"$withval\"" >&5
5990echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
5991   { (exit 1); exit 1; }; }
5992  ;;
5993esac
5994
5995fi
5996icondir="$withval"
5997
5998echo "$as_me:5998: result: $icondir" >&5
5999echo "${ECHO_T}$icondir" >&6
6000
6001no_icondir=
6002test "$icondir" = no && no_icondir="#"
6003
6004# Comment-out the install-desktop rule if the desktop-utils are not found.
6005echo "$as_me:6005: checking if you want to install desktop files" >&5
6006echo $ECHO_N "checking if you want to install desktop files... $ECHO_C" >&6
6007
6008# Check whether --enable-desktop or --disable-desktop was given.
6009if test "${enable_desktop+set}" = set; then
6010  enableval="$enable_desktop"
6011  test "$enableval" != no && enableval=yes
6012  if test "$enableval" != "yes" ; then
6013    enable_desktop=$enableval
6014  else
6015    enable_desktop=$enableval
6016  fi
6017else
6018  enableval=yes
6019  enable_desktop=$enableval
6020
6021fi;
6022echo "$as_me:6022: result: $enable_desktop" >&5
6023echo "${ECHO_T}$enable_desktop" >&6
6024
6025desktop_utils=
6026if test "$enable_desktop" = yes ; then
6027# Extract the first word of "desktop-file-install", so it can be a program name with args.
6028set dummy desktop-file-install; ac_word=$2
6029echo "$as_me:6029: checking for $ac_word" >&5
6030echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6031if test "${ac_cv_prog_desktop_utils+set}" = set; then
6032  echo $ECHO_N "(cached) $ECHO_C" >&6
6033else
6034  if test -n "$desktop_utils"; then
6035  ac_cv_prog_desktop_utils="$desktop_utils" # Let the user override the test.
6036else
6037  ac_save_IFS=$IFS; IFS=$ac_path_separator
6038ac_dummy="$PATH"
6039for ac_dir in $ac_dummy; do
6040  IFS=$ac_save_IFS
6041  test -z "$ac_dir" && ac_dir=.
6042  $as_executable_p "$ac_dir/$ac_word" || continue
6043ac_cv_prog_desktop_utils="yes"
6044echo "$as_me:6044: found $ac_dir/$ac_word" >&5
6045break
6046done
6047
6048  test -z "$ac_cv_prog_desktop_utils" && ac_cv_prog_desktop_utils="no"
6049fi
6050fi
6051desktop_utils=$ac_cv_prog_desktop_utils
6052if test -n "$desktop_utils"; then
6053  echo "$as_me:6053: result: $desktop_utils" >&5
6054echo "${ECHO_T}$desktop_utils" >&6
6055else
6056  echo "$as_me:6056: result: no" >&5
6057echo "${ECHO_T}no" >&6
6058fi
6059
6060fi
6061
6062test "$desktop_utils" = yes && desktop_utils= || desktop_utils="#"
6063
6064if test -z "$desktop_utils"
6065then
6066	echo "$as_me:6066: checking for requested desktop-category" >&5
6067echo $ECHO_N "checking for requested desktop-category... $ECHO_C" >&6
6068
6069# Check whether --with-desktop-category or --without-desktop-category was given.
6070if test "${with_desktop_category+set}" = set; then
6071  withval="$with_desktop_category"
6072  cf_desktop_want=$withval
6073else
6074  cf_desktop_want=auto
6075fi;
6076	echo "$as_me:6076: result: $cf_desktop_want" >&5
6077echo "${ECHO_T}$cf_desktop_want" >&6
6078
6079	if test "$cf_desktop_want" = auto
6080	then
6081		rm -rf conftest*
6082		cf_desktop_also=
6083		for cf_desktop_dir in  \
6084			/usr/share/app-install \
6085			/usr/share/applications
6086		do
6087			if test -d $cf_desktop_dir
6088			then
6089				find $cf_desktop_dir -name '*.desktop' | \
6090				while true
6091				do
6092					read cf_desktop_path
6093					test -z "$cf_desktop_path" && break
6094					cf_desktop_name=`basename $cf_desktop_path .desktop`
6095					case $cf_desktop_name in #(vi
6096					xterm|*-xterm|*rxvt*|konsole|*-terminal)
6097						test -n "$verbose" && echo "	inspect $cf_desktop_path" 1>&6
6098
6099echo "${as_me:-configure}:6099: testing inspect $cf_desktop_path ..." 1>&5
6100
6101						egrep '^Categories=' $cf_desktop_path | \
6102							tr ';' '\n' | \
6103							sed -e 's%^.*=%%' -e '/^$/d' >>conftest.1
6104						;;
6105					esac
6106				done
6107			fi
6108		done
6109		if test -s conftest.1
6110		then
6111			cf_desktop_last=
6112			sort conftest.1 | \
6113			while true
6114			do
6115				read cf_desktop_this
6116				test -z "$cf_desktop_this" && break
6117				case $cf_desktop_this in #(vi
6118				Qt*|GTK*|KDE*|GNOME*|*XFCE*|*Xfce*) #(vi
6119					;;
6120				System|TerminalEmulator|Utility|*)
6121					test "x$cf_desktop_last" != "x$cf_desktop_this" && echo $cf_desktop_this >>conftest.2
6122					;;
6123				esac
6124				cf_desktop_last=$cf_desktop_this
6125			done
6126			cf_desktop_want=`cat conftest.2 | tr '\n' ';'`
6127		fi
6128	fi
6129	DESKTOP_CATEGORY=`echo "$cf_desktop_want" | sed -e 's/[ ,]/;/g'`
6130	test -n "$verbose" && echo "	resulting category=$DESKTOP_CATEGORY" 1>&6
6131
6132echo "${as_me:-configure}:6132: testing resulting category=$DESKTOP_CATEGORY ..." 1>&5
6133
6134fi
6135
6136echo "$as_me:6136: checking for install-permissions reference" >&5
6137echo $ECHO_N "checking for install-permissions reference... $ECHO_C" >&6
6138
6139# Check whether --with-reference or --without-reference was given.
6140if test "${with_reference+set}" = set; then
6141  withval="$with_reference"
6142  with_reference=$withval
6143else
6144  with_reference=xterm
6145fi;
6146echo "$as_me:6146: result: $with_reference" >&5
6147echo "${ECHO_T}$with_reference" >&6
6148
6149with_full_paths=yes
6150
6151	case $cf_cv_system_name in
6152	os2*)	PATH_SEPARATOR=';'  ;;
6153	*)	PATH_SEPARATOR=':'  ;;
6154	esac
6155
6156test -z "$XTERM_PATH" && XTERM_PATH=$with_reference
6157for ac_prog in $XTERM_PATH $with_reference
6158do
6159  # Extract the first word of "$ac_prog", so it can be a program name with args.
6160set dummy $ac_prog; ac_word=$2
6161echo "$as_me:6161: checking for $ac_word" >&5
6162echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6163if test "${ac_cv_path_XTERM_PATH+set}" = set; then
6164  echo $ECHO_N "(cached) $ECHO_C" >&6
6165else
6166  case $XTERM_PATH in
6167  [\\/]* | ?:[\\/]*)
6168  ac_cv_path_XTERM_PATH="$XTERM_PATH" # Let the user override the test with a path.
6169  ;;
6170  *)
6171  ac_save_IFS=$IFS; IFS=$ac_path_separator
6172ac_dummy="$PATH"
6173for ac_dir in $ac_dummy; do
6174  IFS=$ac_save_IFS
6175  test -z "$ac_dir" && ac_dir=.
6176  if $as_executable_p "$ac_dir/$ac_word"; then
6177   ac_cv_path_XTERM_PATH="$ac_dir/$ac_word"
6178   echo "$as_me:6178: found $ac_dir/$ac_word" >&5
6179   break
6180fi
6181done
6182
6183  ;;
6184esac
6185fi
6186XTERM_PATH=$ac_cv_path_XTERM_PATH
6187
6188if test -n "$XTERM_PATH"; then
6189  echo "$as_me:6189: result: $XTERM_PATH" >&5
6190echo "${ECHO_T}$XTERM_PATH" >&6
6191else
6192  echo "$as_me:6192: result: no" >&5
6193echo "${ECHO_T}no" >&6
6194fi
6195
6196  test -n "$XTERM_PATH" && break
6197done
6198test -n "$XTERM_PATH" || XTERM_PATH="$XTERM_PATH"
6199
6200cf_path_prog=""
6201cf_path_args=""
6202IFS="${IFS:- 	}"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
6203for cf_temp in $ac_cv_path_XTERM_PATH
6204do
6205	if test -z "$cf_path_prog" ; then
6206		if test "$with_full_paths" = yes ; then
6207
6208if test "x$prefix" != xNONE; then
6209  cf_path_syntax="$prefix"
6210else
6211  cf_path_syntax="$ac_default_prefix"
6212fi
6213
6214case ".$cf_temp" in #(vi
6215.\$\(*\)*|.\'*\'*) #(vi
6216  ;;
6217..|./*|.\\*) #(vi
6218  ;;
6219.[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6220  ;;
6221.\${*prefix}*) #(vi
6222  eval cf_temp="$cf_temp"
6223  case ".$cf_temp" in #(vi
6224  .NONE/*)
6225    cf_temp=`echo $cf_temp | sed -e s%NONE%$cf_path_syntax%`
6226    ;;
6227  esac
6228  ;; #(vi
6229.no|.NONE/*)
6230  cf_temp=`echo $cf_temp | sed -e s%NONE%$cf_path_syntax%`
6231  ;;
6232*)
6233  break
6234  ;;
6235esac
6236
6237			cf_path_prog="$cf_temp"
6238		else
6239			cf_path_prog="`basename $cf_temp`"
6240		fi
6241	elif test -z "$cf_path_args" ; then
6242		cf_path_args="$cf_temp"
6243	else
6244		cf_path_args="$cf_path_args $cf_temp"
6245	fi
6246done
6247IFS="$cf_save_ifs"
6248
6249if test -n "$cf_path_prog" ; then
6250
6251echo "${as_me:-configure}:6251: testing defining path for ${cf_path_prog} ..." 1>&5
6252
6253	cat >>confdefs.h <<EOF
6254#define XTERM_PATH_PATH "$cf_path_prog"
6255EOF
6256
6257	test -n "$cf_path_args" && cat >>confdefs.h <<EOF
6258#define XTERM_PATH_ARGS "$cf_path_args"
6259EOF
6260
6261fi
6262
6263# If any of --program-prefix, --program-suffix or --program-transform-name is
6264# given, accept an option tell the makefile to create a symbolic link, e.g.,
6265# to "xterm" on install.
6266XTERM_SYMLINK=NONE
6267
6268if test "$program_transform_name" != "'s,,,'" ; then
6269cf_name=`echo "$program_transform_name" | sed -e 's,\\$\\$,$,g'`
6270cf_name=`echo xterm |sed -e "$cf_name"`
6271echo "$as_me:6271: checking for symbolic link to create to $cf_name" >&5
6272echo $ECHO_N "checking for symbolic link to create to $cf_name... $ECHO_C" >&6
6273
6274# Check whether --with-xterm-symlink or --without-xterm-symlink was given.
6275if test "${with_xterm_symlink+set}" = set; then
6276  withval="$with_xterm_symlink"
6277  with_symlink=$withval
6278else
6279  with_symlink=xterm
6280fi;
6281echo "$as_me:6281: result: $with_symlink" >&5
6282echo "${ECHO_T}$with_symlink" >&6
6283test "$with_symlink" = yes && with_symlink=xterm
6284test -n "$with_symlink" && \
6285	test "$with_symlink" != no && \
6286	test "$with_symlink" != $cf_name && \
6287	XTERM_SYMLINK="$with_symlink"
6288fi
6289
6290echo "$as_me:6290: checking if you want to disable setuid" >&5
6291echo $ECHO_N "checking if you want to disable setuid... $ECHO_C" >&6
6292
6293# Check whether --enable-setuid or --disable-setuid was given.
6294if test "${enable_setuid+set}" = set; then
6295  enableval="$enable_setuid"
6296  test "$enableval" != no && enableval=yes
6297  if test "$enableval" != "yes" ; then
6298    disable_setuid=yes
6299  else
6300    disable_setuid=no
6301  fi
6302else
6303  enableval=yes
6304  disable_setuid=no
6305
6306fi;
6307echo "$as_me:6307: result: $disable_setuid" >&5
6308echo "${ECHO_T}$disable_setuid" >&6
6309
6310echo "$as_me:6310: checking if you want to disable setgid" >&5
6311echo $ECHO_N "checking if you want to disable setgid... $ECHO_C" >&6
6312
6313# Check whether --enable-setgid or --disable-setgid was given.
6314if test "${enable_setgid+set}" = set; then
6315  enableval="$enable_setgid"
6316  test "$enableval" != no && enableval=yes
6317  if test "$enableval" != "yes" ; then
6318    disable_setgid=yes
6319  else
6320    disable_setgid=no
6321  fi
6322else
6323  enableval=yes
6324  disable_setgid=no
6325
6326fi;
6327echo "$as_me:6327: result: $disable_setgid" >&5
6328echo "${ECHO_T}$disable_setgid" >&6
6329
6330echo "$as_me:6330: checking if you want to run xterm setuid to a given user" >&5
6331echo $ECHO_N "checking if you want to run xterm setuid to a given user... $ECHO_C" >&6
6332
6333# Check whether --with-setuid or --without-setuid was given.
6334if test "${with_setuid+set}" = set; then
6335  withval="$with_setuid"
6336  use_given_setuid=$withval
6337else
6338  use_given_setuid=no
6339fi;
6340echo "$as_me:6340: result: $use_given_setuid" >&5
6341echo "${ECHO_T}$use_given_setuid" >&6
6342
6343if test "$use_given_setuid" != no ; then
6344	if test "$use_given_setuid" = yes ; then
6345		cf_cv_given_setuid=root
6346	else
6347		cf_cv_given_setuid=$use_given_setuid
6348	fi
6349	# inherit SINSTALL_OPTS from environment to allow packager to customize it.
6350	SINSTALL_OPTS="$SINSTALL_OPTS u+s -u $cf_cv_given_setuid"
6351fi
6352
6353echo "$as_me:6353: checking if you want to run xterm setgid to match utmp/utmpx file" >&5
6354echo $ECHO_N "checking if you want to run xterm setgid to match utmp/utmpx file... $ECHO_C" >&6
6355
6356# Check whether --with-utmp-setgid or --without-utmp-setgid was given.
6357if test "${with_utmp_setgid+set}" = set; then
6358  withval="$with_utmp_setgid"
6359  use_utmp_setgid=$withval
6360else
6361  use_utmp_setgid=no
6362fi;
6363echo "$as_me:6363: result: $use_utmp_setgid" >&5
6364echo "${ECHO_T}$use_utmp_setgid" >&6
6365
6366if test "$use_utmp_setgid" != no ; then
6367	if test "$use_utmp_setgid" = yes ; then
6368
6369if test $cf_cv_have_utmp != no ; then
6370echo "$as_me:6370: checking for utmp/utmpx group" >&5
6371echo $ECHO_N "checking for utmp/utmpx group... $ECHO_C" >&6
6372if test "${cf_cv_utmp_group+set}" = set; then
6373  echo $ECHO_N "(cached) $ECHO_C" >&6
6374else
6375
6376for cf_utmp_path in /var/adm /var/run
6377do
6378	for cf_utmp_file in utmpx utmp
6379	do
6380		if test -f $cf_utmp_path/$cf_utmp_file
6381		then
6382			cf_cv_utmp_group=root
6383
6384			cf_option="-l -L"
6385
6386			# Expect listing to have fields like this:
6387			#-r--r--r--   1 user      group       34293 Jul 18 16:29 pathname
6388			ls $cf_option $cf_utmp_path/$cf_utmp_file >conftest
6389			read cf_mode cf_links cf_usr cf_grp cf_size cf_date1 cf_date2 cf_date3 cf_rest <conftest
6390			if test -z "$cf_rest" ; then
6391				cf_option="$cf_option -g"
6392				ls $cf_option $cf_utmp_path/$cf_utmp_file >conftest
6393				read cf_mode cf_links cf_usr cf_grp cf_size cf_date1 cf_date2 cf_date3 cf_rest <conftest
6394			fi
6395			rm -f conftest
6396
6397			# If we have a pathname, and the date fields look right, assume we've
6398			# captured the group as well.
6399			if test -n "$cf_rest" ; then
6400				cf_test=`echo "${cf_date2}${cf_date3}" | sed -e 's/[0-9:]//g'`
6401				if test -z "$cf_test" ; then
6402					cf_cv_utmp_group=$cf_grp;
6403				fi
6404			fi
6405			break
6406		fi
6407	done
6408	test -n "$cf_cv_utmp_group" && break
6409done
6410
6411fi
6412echo "$as_me:6412: result: $cf_cv_utmp_group" >&5
6413echo "${ECHO_T}$cf_cv_utmp_group" >&6
6414else
6415	{ { echo "$as_me:6415: error: cannot find utmp group" >&5
6416echo "$as_me: error: cannot find utmp group" >&2;}
6417   { (exit 1); exit 1; }; }
6418fi
6419
6420	else
6421		cf_cv_utmp_group=$use_utmp_setgid
6422	fi
6423	if test "$cf_cv_posix_saved_ids" != yes ; then
6424		{ { echo "$as_me:6424: error: Your system does not support POSIX saved-ids" >&5
6425echo "$as_me: error: Your system does not support POSIX saved-ids" >&2;}
6426   { (exit 1); exit 1; }; }
6427	fi
6428	cat >>confdefs.h <<\EOF
6429#define USE_UTMP_SETGID 1
6430EOF
6431
6432	SINSTALL_OPTS="$SINSTALL_OPTS g+s -g $cf_cv_utmp_group"
6433fi
6434
6435echo "$as_me:6435: checking if you want to link with utempter" >&5
6436echo $ECHO_N "checking if you want to link with utempter... $ECHO_C" >&6
6437
6438# Check whether --with-utempter or --without-utempter was given.
6439if test "${with_utempter+set}" = set; then
6440  withval="$with_utempter"
6441  use_utempter=$withval
6442else
6443  use_utempter=no
6444fi;
6445echo "$as_me:6445: result: $use_utempter" >&5
6446echo "${ECHO_T}$use_utempter" >&6
6447
6448if test "$use_utempter" = yes ; then
6449
6450echo "$as_me:6450: checking if we can link with utempter library" >&5
6451echo $ECHO_N "checking if we can link with utempter library... $ECHO_C" >&6
6452if test "${cf_cv_have_utempter+set}" = set; then
6453  echo $ECHO_N "(cached) $ECHO_C" >&6
6454else
6455
6456cf_save_LIBS="$LIBS"
6457LIBS="-lutempter $LIBS"
6458cat >conftest.$ac_ext <<_ACEOF
6459#line 6459 "configure"
6460#include "confdefs.h"
6461
6462#include <utempter.h>
6463
6464int
6465main ()
6466{
6467
6468	addToUtmp("/dev/tty", 0, 1);
6469	removeFromUtmp();
6470
6471  ;
6472  return 0;
6473}
6474_ACEOF
6475rm -f conftest.$ac_objext conftest$ac_exeext
6476if { (eval echo "$as_me:6476: \"$ac_link\"") >&5
6477  (eval $ac_link) 2>&5
6478  ac_status=$?
6479  echo "$as_me:6479: \$? = $ac_status" >&5
6480  (exit $ac_status); } &&
6481         { ac_try='test -s conftest$ac_exeext'
6482  { (eval echo "$as_me:6482: \"$ac_try\"") >&5
6483  (eval $ac_try) 2>&5
6484  ac_status=$?
6485  echo "$as_me:6485: \$? = $ac_status" >&5
6486  (exit $ac_status); }; }; then
6487
6488	cf_cv_have_utempter=yes
6489else
6490  echo "$as_me: failed program was:" >&5
6491cat conftest.$ac_ext >&5
6492
6493	cf_cv_have_utempter=no
6494fi
6495rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6496LIBS="$cf_save_LIBS"
6497
6498fi
6499echo "$as_me:6499: result: $cf_cv_have_utempter" >&5
6500echo "${ECHO_T}$cf_cv_have_utempter" >&6
6501if test "$cf_cv_have_utempter" = yes ; then
6502	cat >>confdefs.h <<\EOF
6503#define USE_UTEMPTER 1
6504EOF
6505
6506	LIBS="-lutempter $LIBS"
6507fi
6508
6509	test "$cf_cv_have_utempter" != yes && use_utempter=no
6510else
6511	use_utempter=no
6512fi
6513
6514# Some configurations permit (or require) either setuid or setgid mode.
6515# Let the user decide.
6516if test "$use_utempter" = yes ; then
6517	if test "${enable_setuid+set}" != set ; then
6518		disable_setuid=yes
6519		test -n "$verbose" && echo "	No --disable-setuid option given, force to yes" 1>&6
6520
6521echo "${as_me:-configure}:6521: testing No --disable-setuid option given, force to yes ..." 1>&5
6522
6523	fi
6524fi
6525
6526###	checks for external data
6527
6528echo "$as_me:6528: checking if external errno is declared" >&5
6529echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
6530if test "${cf_cv_dcl_errno+set}" = set; then
6531  echo $ECHO_N "(cached) $ECHO_C" >&6
6532else
6533
6534    cat >conftest.$ac_ext <<_ACEOF
6535#line 6535 "configure"
6536#include "confdefs.h"
6537
6538#ifdef HAVE_STDLIB_H
6539#include <stdlib.h>
6540#endif
6541#include <stdio.h>
6542#include <sys/types.h>
6543#include <errno.h>
6544int
6545main ()
6546{
6547int x = (int) errno
6548  ;
6549  return 0;
6550}
6551_ACEOF
6552rm -f conftest.$ac_objext
6553if { (eval echo "$as_me:6553: \"$ac_compile\"") >&5
6554  (eval $ac_compile) 2>&5
6555  ac_status=$?
6556  echo "$as_me:6556: \$? = $ac_status" >&5
6557  (exit $ac_status); } &&
6558         { ac_try='test -s conftest.$ac_objext'
6559  { (eval echo "$as_me:6559: \"$ac_try\"") >&5
6560  (eval $ac_try) 2>&5
6561  ac_status=$?
6562  echo "$as_me:6562: \$? = $ac_status" >&5
6563  (exit $ac_status); }; }; then
6564  cf_cv_dcl_errno=yes
6565else
6566  echo "$as_me: failed program was:" >&5
6567cat conftest.$ac_ext >&5
6568cf_cv_dcl_errno=no
6569fi
6570rm -f conftest.$ac_objext conftest.$ac_ext
6571
6572fi
6573echo "$as_me:6573: result: $cf_cv_dcl_errno" >&5
6574echo "${ECHO_T}$cf_cv_dcl_errno" >&6
6575
6576if test "$cf_cv_dcl_errno" = no ; then
6577
6578cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
6579
6580    cat >>confdefs.h <<EOF
6581#define $cf_result 1
6582EOF
6583
6584fi
6585
6586# It's possible (for near-UNIX clones) that the data doesn't exist
6587
6588echo "$as_me:6588: checking if external errno exists" >&5
6589echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
6590if test "${cf_cv_have_errno+set}" = set; then
6591  echo $ECHO_N "(cached) $ECHO_C" >&6
6592else
6593
6594    cat >conftest.$ac_ext <<_ACEOF
6595#line 6595 "configure"
6596#include "confdefs.h"
6597
6598#undef errno
6599extern int errno;
6600
6601int
6602main ()
6603{
6604errno = 2
6605  ;
6606  return 0;
6607}
6608_ACEOF
6609rm -f conftest.$ac_objext conftest$ac_exeext
6610if { (eval echo "$as_me:6610: \"$ac_link\"") >&5
6611  (eval $ac_link) 2>&5
6612  ac_status=$?
6613  echo "$as_me:6613: \$? = $ac_status" >&5
6614  (exit $ac_status); } &&
6615         { ac_try='test -s conftest$ac_exeext'
6616  { (eval echo "$as_me:6616: \"$ac_try\"") >&5
6617  (eval $ac_try) 2>&5
6618  ac_status=$?
6619  echo "$as_me:6619: \$? = $ac_status" >&5
6620  (exit $ac_status); }; }; then
6621  cf_cv_have_errno=yes
6622else
6623  echo "$as_me: failed program was:" >&5
6624cat conftest.$ac_ext >&5
6625cf_cv_have_errno=no
6626fi
6627rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6628
6629fi
6630echo "$as_me:6630: result: $cf_cv_have_errno" >&5
6631echo "${ECHO_T}$cf_cv_have_errno" >&6
6632
6633if test "$cf_cv_have_errno" = yes ; then
6634
6635cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
6636
6637    cat >>confdefs.h <<EOF
6638#define $cf_result 1
6639EOF
6640
6641fi
6642
6643echo "$as_me:6643: checking for explicit tty group name" >&5
6644echo $ECHO_N "checking for explicit tty group name... $ECHO_C" >&6
6645
6646# Check whether --with-tty-group or --without-tty-group was given.
6647if test "${with_tty_group+set}" = set; then
6648  withval="$with_tty_group"
6649  cf_tty_group=$withval
6650else
6651  cf_tty_group=auto...
6652fi;
6653test -z "$cf_tty_group"    && cf_tty_group=auto...
6654test "$cf_tty_group" = yes && cf_tty_group=auto...
6655echo "$as_me:6655: result: $cf_tty_group" >&5
6656echo "${ECHO_T}$cf_tty_group" >&6
6657
6658if test "$cf_tty_group" = "auto..." ; then
6659echo "$as_me:6659: checking for tty group name" >&5
6660echo $ECHO_N "checking for tty group name... $ECHO_C" >&6
6661if test "${cf_cv_tty_group_name+set}" = set; then
6662  echo $ECHO_N "(cached) $ECHO_C" >&6
6663else
6664
6665# If we are configuring as root, it is hard to get a clue about the tty group.
6666# But we'll guess based on how our connection is set up - assuming it is done
6667# properly.
6668
6669cf_uid=`id | sed -e 's/^^=*=//' -e 's/(.*$//'`
6670# )vi
6671if test "$cf_uid" != 0 ; then
6672cf_cv_tty_group_name=
6673cf_tty_name=`tty`
6674test "$cf_tty_name" = "not a tty" && cf_tty_name=/dev/tty
6675test -z "$cf_tty_name" && cf_tty_name=/dev/tty
6676if test -c "$cf_tty_name"
6677then
6678	cf_option="-l -L"
6679
6680	# Expect listing to have fields like this:
6681	#-rwxrwxrwx   1 user      group       34293 Jul 18 16:29 pathname
6682	ls $cf_option $cf_tty_name >conftest.out
6683	read cf_mode cf_links cf_usr cf_grp cf_size cf_date1 cf_date2 cf_date3 cf_rest <conftest.out
6684	if test -z "$cf_rest" ; then
6685		cf_option="$cf_option -g"
6686		ls $cf_option $cf_tty_name >conftest.out
6687		read cf_mode cf_links cf_usr cf_grp cf_size cf_date1 cf_date2 cf_date3 cf_rest <conftest.out
6688	fi
6689	rm -f conftest.out
6690	cf_cv_tty_group_name=$cf_grp
6691fi
6692fi
6693
6694# If we cannot deduce the tty group, fall back on hardcoded cases
6695
6696if test -z "$cf_cv_tty_group_name"
6697then
6698case $host_os in #(vi
6699osf*) #(vi
6700	cf_cv_tty_group_name="terminal"
6701	;;
6702*)
6703	cf_cv_tty_group_name="unknown"
6704	if ( egrep '^tty:' /etc/group 2>/dev/null 1>/dev/null ) then
6705		cf_cv_tty_group_name="tty"
6706	fi
6707	;;
6708esac
6709fi
6710
6711fi
6712echo "$as_me:6712: result: $cf_cv_tty_group_name" >&5
6713echo "${ECHO_T}$cf_cv_tty_group_name" >&6
6714cf_tty_group="$cf_cv_tty_group_name"
6715else
6716	# if configure option, always do this
6717	cat >>confdefs.h <<\EOF
6718#define USE_TTY_GROUP 1
6719EOF
6720
6721fi
6722
6723cat >>confdefs.h <<EOF
6724#define TTY_GROUP_NAME "$cf_tty_group"
6725EOF
6726
6727# This is only a double-check that the group-name we obtained above really
6728# does apply to the device.  We cannot perform this test if we are in batch
6729# mode, or if we are cross-compiling.
6730
6731echo "$as_me:6731: checking if we may use the $cf_tty_group group" >&5
6732echo $ECHO_N "checking if we may use the $cf_tty_group group... $ECHO_C" >&6
6733if test "${cf_cv_tty_group+set}" = set; then
6734  echo $ECHO_N "(cached) $ECHO_C" >&6
6735else
6736
6737cf_tty_name=`tty`
6738if test "$cf_tty_name" != "not a tty"
6739then
6740if test "$cross_compiling" = yes; then
6741  cf_cv_tty_group=unknown
6742else
6743  cat >conftest.$ac_ext <<_ACEOF
6744#line 6744 "configure"
6745#include "confdefs.h"
6746
6747#include <unistd.h>
6748#include <sys/types.h>
6749#include <sys/stat.h>
6750#include <grp.h>
6751int main()
6752{
6753	struct stat sb;
6754	struct group *ttygrp = getgrnam(TTY_GROUP_NAME);
6755	char *name = ttyname(0);
6756
6757	endgrent();
6758	if (ttygrp != 0
6759	 && name != 0
6760	 && stat(name, &sb) == 0
6761	 && sb.st_gid != getgid()
6762	 && sb.st_gid == ttygrp->gr_gid) {
6763		${cf_cv_main_return:-return} (0);
6764	}
6765	${cf_cv_main_return:-return} (1);
6766}
6767
6768_ACEOF
6769rm -f conftest$ac_exeext
6770if { (eval echo "$as_me:6770: \"$ac_link\"") >&5
6771  (eval $ac_link) 2>&5
6772  ac_status=$?
6773  echo "$as_me:6773: \$? = $ac_status" >&5
6774  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6775  { (eval echo "$as_me:6775: \"$ac_try\"") >&5
6776  (eval $ac_try) 2>&5
6777  ac_status=$?
6778  echo "$as_me:6778: \$? = $ac_status" >&5
6779  (exit $ac_status); }; }; then
6780  cf_cv_tty_group=yes
6781else
6782  echo "$as_me: program exited with status $ac_status" >&5
6783echo "$as_me: failed program was:" >&5
6784cat conftest.$ac_ext >&5
6785cf_cv_tty_group=no
6786fi
6787rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6788fi
6789elif test "$cross_compiling" = yes; then
6790	cf_cv_tty_group=unknown
6791else
6792	cf_cv_tty_group=yes
6793fi
6794
6795fi
6796echo "$as_me:6796: result: $cf_cv_tty_group" >&5
6797echo "${ECHO_T}$cf_cv_tty_group" >&6
6798
6799if test $cf_cv_tty_group = no ; then
6800	{ echo "$as_me:6800: WARNING: Cannot use $cf_tty_group group" >&5
6801echo "$as_me: WARNING: Cannot use $cf_tty_group group" >&2;}
6802else
6803	cat >>confdefs.h <<\EOF
6804#define USE_TTY_GROUP 1
6805EOF
6806
6807fi
6808
6809###	checks for system services and user specified options
6810
6811echo "$as_me:6811: checking for sys/wait.h that is POSIX.1 compatible" >&5
6812echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6
6813if test "${ac_cv_header_sys_wait_h+set}" = set; then
6814  echo $ECHO_N "(cached) $ECHO_C" >&6
6815else
6816  cat >conftest.$ac_ext <<_ACEOF
6817#line 6817 "configure"
6818#include "confdefs.h"
6819#include <sys/types.h>
6820#include <sys/wait.h>
6821#ifndef WEXITSTATUS
6822# define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
6823#endif
6824#ifndef WIFEXITED
6825# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
6826#endif
6827
6828int
6829main ()
6830{
6831  int s;
6832  wait (&s);
6833  s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
6834  ;
6835  return 0;
6836}
6837_ACEOF
6838rm -f conftest.$ac_objext
6839if { (eval echo "$as_me:6839: \"$ac_compile\"") >&5
6840  (eval $ac_compile) 2>&5
6841  ac_status=$?
6842  echo "$as_me:6842: \$? = $ac_status" >&5
6843  (exit $ac_status); } &&
6844         { ac_try='test -s conftest.$ac_objext'
6845  { (eval echo "$as_me:6845: \"$ac_try\"") >&5
6846  (eval $ac_try) 2>&5
6847  ac_status=$?
6848  echo "$as_me:6848: \$? = $ac_status" >&5
6849  (exit $ac_status); }; }; then
6850  ac_cv_header_sys_wait_h=yes
6851else
6852  echo "$as_me: failed program was:" >&5
6853cat conftest.$ac_ext >&5
6854ac_cv_header_sys_wait_h=no
6855fi
6856rm -f conftest.$ac_objext conftest.$ac_ext
6857fi
6858echo "$as_me:6858: result: $ac_cv_header_sys_wait_h" >&5
6859echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6
6860if test $ac_cv_header_sys_wait_h = yes; then
6861
6862cat >>confdefs.h <<\EOF
6863#define HAVE_SYS_WAIT_H 1
6864EOF
6865
6866fi
6867
6868echo "$as_me:6868: checking for POSIX wait functions" >&5
6869echo $ECHO_N "checking for POSIX wait functions... $ECHO_C" >&6
6870if test "${cf_cv_posix_wait+set}" = set; then
6871  echo $ECHO_N "(cached) $ECHO_C" >&6
6872else
6873
6874cat >conftest.$ac_ext <<_ACEOF
6875#line 6875 "configure"
6876#include "confdefs.h"
6877
6878#include <stdlib.h>
6879#include <stdio.h>
6880#include <sys/types.h>
6881#ifdef HAVE_SYS_WAIT_H
6882#include <sys/wait.h>
6883#endif
6884
6885int
6886main ()
6887{
6888
6889	int stat_loc;
6890	pid_t pid = waitpid(-1, &stat_loc, WNOHANG|WUNTRACED);
6891	pid_t pid2 = wait(&stat_loc);
6892
6893  ;
6894  return 0;
6895}
6896_ACEOF
6897rm -f conftest.$ac_objext conftest$ac_exeext
6898if { (eval echo "$as_me:6898: \"$ac_link\"") >&5
6899  (eval $ac_link) 2>&5
6900  ac_status=$?
6901  echo "$as_me:6901: \$? = $ac_status" >&5
6902  (exit $ac_status); } &&
6903         { ac_try='test -s conftest$ac_exeext'
6904  { (eval echo "$as_me:6904: \"$ac_try\"") >&5
6905  (eval $ac_try) 2>&5
6906  ac_status=$?
6907  echo "$as_me:6907: \$? = $ac_status" >&5
6908  (exit $ac_status); }; }; then
6909  cf_cv_posix_wait=yes
6910else
6911  echo "$as_me: failed program was:" >&5
6912cat conftest.$ac_ext >&5
6913cf_cv_posix_wait=no
6914fi
6915rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6916
6917fi
6918echo "$as_me:6918: result: $cf_cv_posix_wait" >&5
6919echo "${ECHO_T}$cf_cv_posix_wait" >&6
6920test "$cf_cv_posix_wait" = yes && cat >>confdefs.h <<\EOF
6921#define USE_POSIX_WAIT 1
6922EOF
6923
6924echo "$as_me:6924: checking if external sys_nerr is declared" >&5
6925echo $ECHO_N "checking if external sys_nerr is declared... $ECHO_C" >&6
6926if test "${cf_cv_dcl_sys_nerr+set}" = set; then
6927  echo $ECHO_N "(cached) $ECHO_C" >&6
6928else
6929
6930    cat >conftest.$ac_ext <<_ACEOF
6931#line 6931 "configure"
6932#include "confdefs.h"
6933
6934#ifdef HAVE_STDLIB_H
6935#include <stdlib.h>
6936#endif
6937#include <stdio.h>
6938#include <sys/types.h>
6939#include <errno.h>
6940int
6941main ()
6942{
6943int x = (int) sys_nerr
6944  ;
6945  return 0;
6946}
6947_ACEOF
6948rm -f conftest.$ac_objext
6949if { (eval echo "$as_me:6949: \"$ac_compile\"") >&5
6950  (eval $ac_compile) 2>&5
6951  ac_status=$?
6952  echo "$as_me:6952: \$? = $ac_status" >&5
6953  (exit $ac_status); } &&
6954         { ac_try='test -s conftest.$ac_objext'
6955  { (eval echo "$as_me:6955: \"$ac_try\"") >&5
6956  (eval $ac_try) 2>&5
6957  ac_status=$?
6958  echo "$as_me:6958: \$? = $ac_status" >&5
6959  (exit $ac_status); }; }; then
6960  cf_cv_dcl_sys_nerr=yes
6961else
6962  echo "$as_me: failed program was:" >&5
6963cat conftest.$ac_ext >&5
6964cf_cv_dcl_sys_nerr=no
6965fi
6966rm -f conftest.$ac_objext conftest.$ac_ext
6967
6968fi
6969echo "$as_me:6969: result: $cf_cv_dcl_sys_nerr" >&5
6970echo "${ECHO_T}$cf_cv_dcl_sys_nerr" >&6
6971
6972if test "$cf_cv_dcl_sys_nerr" = no ; then
6973
6974cf_result=`echo "decl_sys_nerr" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
6975
6976    cat >>confdefs.h <<EOF
6977#define $cf_result 1
6978EOF
6979
6980fi
6981
6982# It's possible (for near-UNIX clones) that the data doesn't exist
6983
6984echo "$as_me:6984: checking if external sys_nerr exists" >&5
6985echo $ECHO_N "checking if external sys_nerr exists... $ECHO_C" >&6
6986if test "${cf_cv_have_sys_nerr+set}" = set; then
6987  echo $ECHO_N "(cached) $ECHO_C" >&6
6988else
6989
6990    cat >conftest.$ac_ext <<_ACEOF
6991#line 6991 "configure"
6992#include "confdefs.h"
6993
6994#undef sys_nerr
6995extern int sys_nerr;
6996
6997int
6998main ()
6999{
7000sys_nerr = 2
7001  ;
7002  return 0;
7003}
7004_ACEOF
7005rm -f conftest.$ac_objext conftest$ac_exeext
7006if { (eval echo "$as_me:7006: \"$ac_link\"") >&5
7007  (eval $ac_link) 2>&5
7008  ac_status=$?
7009  echo "$as_me:7009: \$? = $ac_status" >&5
7010  (exit $ac_status); } &&
7011         { ac_try='test -s conftest$ac_exeext'
7012  { (eval echo "$as_me:7012: \"$ac_try\"") >&5
7013  (eval $ac_try) 2>&5
7014  ac_status=$?
7015  echo "$as_me:7015: \$? = $ac_status" >&5
7016  (exit $ac_status); }; }; then
7017  cf_cv_have_sys_nerr=yes
7018else
7019  echo "$as_me: failed program was:" >&5
7020cat conftest.$ac_ext >&5
7021cf_cv_have_sys_nerr=no
7022fi
7023rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7024
7025fi
7026echo "$as_me:7026: result: $cf_cv_have_sys_nerr" >&5
7027echo "${ECHO_T}$cf_cv_have_sys_nerr" >&6
7028
7029if test "$cf_cv_have_sys_nerr" = yes ; then
7030
7031cf_result=`echo "have_sys_nerr" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
7032
7033    cat >>confdefs.h <<EOF
7034#define $cf_result 1
7035EOF
7036
7037fi
7038
7039echo "$as_me:7039: checking if external sys_errlist is declared" >&5
7040echo $ECHO_N "checking if external sys_errlist is declared... $ECHO_C" >&6
7041if test "${cf_cv_dcl_sys_errlist+set}" = set; then
7042  echo $ECHO_N "(cached) $ECHO_C" >&6
7043else
7044
7045    cat >conftest.$ac_ext <<_ACEOF
7046#line 7046 "configure"
7047#include "confdefs.h"
7048
7049#ifdef HAVE_STDLIB_H
7050#include <stdlib.h>
7051#endif
7052#include <stdio.h>
7053#include <sys/types.h>
7054#include <errno.h>
7055int
7056main ()
7057{
7058int x = (int) sys_errlist
7059  ;
7060  return 0;
7061}
7062_ACEOF
7063rm -f conftest.$ac_objext
7064if { (eval echo "$as_me:7064: \"$ac_compile\"") >&5
7065  (eval $ac_compile) 2>&5
7066  ac_status=$?
7067  echo "$as_me:7067: \$? = $ac_status" >&5
7068  (exit $ac_status); } &&
7069         { ac_try='test -s conftest.$ac_objext'
7070  { (eval echo "$as_me:7070: \"$ac_try\"") >&5
7071  (eval $ac_try) 2>&5
7072  ac_status=$?
7073  echo "$as_me:7073: \$? = $ac_status" >&5
7074  (exit $ac_status); }; }; then
7075  cf_cv_dcl_sys_errlist=yes
7076else
7077  echo "$as_me: failed program was:" >&5
7078cat conftest.$ac_ext >&5
7079cf_cv_dcl_sys_errlist=no
7080fi
7081rm -f conftest.$ac_objext conftest.$ac_ext
7082
7083fi
7084echo "$as_me:7084: result: $cf_cv_dcl_sys_errlist" >&5
7085echo "${ECHO_T}$cf_cv_dcl_sys_errlist" >&6
7086
7087if test "$cf_cv_dcl_sys_errlist" = no ; then
7088
7089cf_result=`echo "decl_sys_errlist" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
7090
7091    cat >>confdefs.h <<EOF
7092#define $cf_result 1
7093EOF
7094
7095fi
7096
7097# It's possible (for near-UNIX clones) that the data doesn't exist
7098
7099echo "$as_me:7099: checking if external sys_errlist exists" >&5
7100echo $ECHO_N "checking if external sys_errlist exists... $ECHO_C" >&6
7101if test "${cf_cv_have_sys_errlist+set}" = set; then
7102  echo $ECHO_N "(cached) $ECHO_C" >&6
7103else
7104
7105    cat >conftest.$ac_ext <<_ACEOF
7106#line 7106 "configure"
7107#include "confdefs.h"
7108
7109#undef sys_errlist
7110extern int sys_errlist;
7111
7112int
7113main ()
7114{
7115sys_errlist = 2
7116  ;
7117  return 0;
7118}
7119_ACEOF
7120rm -f conftest.$ac_objext conftest$ac_exeext
7121if { (eval echo "$as_me:7121: \"$ac_link\"") >&5
7122  (eval $ac_link) 2>&5
7123  ac_status=$?
7124  echo "$as_me:7124: \$? = $ac_status" >&5
7125  (exit $ac_status); } &&
7126         { ac_try='test -s conftest$ac_exeext'
7127  { (eval echo "$as_me:7127: \"$ac_try\"") >&5
7128  (eval $ac_try) 2>&5
7129  ac_status=$?
7130  echo "$as_me:7130: \$? = $ac_status" >&5
7131  (exit $ac_status); }; }; then
7132  cf_cv_have_sys_errlist=yes
7133else
7134  echo "$as_me: failed program was:" >&5
7135cat conftest.$ac_ext >&5
7136cf_cv_have_sys_errlist=no
7137fi
7138rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7139
7140fi
7141echo "$as_me:7141: result: $cf_cv_have_sys_errlist" >&5
7142echo "${ECHO_T}$cf_cv_have_sys_errlist" >&6
7143
7144if test "$cf_cv_have_sys_errlist" = yes ; then
7145
7146cf_result=`echo "have_sys_errlist" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
7147
7148    cat >>confdefs.h <<EOF
7149#define $cf_result 1
7150EOF
7151
7152fi
7153
7154for ac_header in \
7155termios.h \
7156stdlib.h \
7157X11/Intrinsic.h \
7158
7159do
7160as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7161echo "$as_me:7161: checking for $ac_header" >&5
7162echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7163if eval "test \"\${$as_ac_Header+set}\" = set"; then
7164  echo $ECHO_N "(cached) $ECHO_C" >&6
7165else
7166  cat >conftest.$ac_ext <<_ACEOF
7167#line 7167 "configure"
7168#include "confdefs.h"
7169#include <$ac_header>
7170_ACEOF
7171if { (eval echo "$as_me:7171: \"$ac_cpp conftest.$ac_ext\"") >&5
7172  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7173  ac_status=$?
7174  egrep -v '^ *\+' conftest.er1 >conftest.err
7175  rm -f conftest.er1
7176  cat conftest.err >&5
7177  echo "$as_me:7177: \$? = $ac_status" >&5
7178  (exit $ac_status); } >/dev/null; then
7179  if test -s conftest.err; then
7180    ac_cpp_err=$ac_c_preproc_warn_flag
7181  else
7182    ac_cpp_err=
7183  fi
7184else
7185  ac_cpp_err=yes
7186fi
7187if test -z "$ac_cpp_err"; then
7188  eval "$as_ac_Header=yes"
7189else
7190  echo "$as_me: failed program was:" >&5
7191  cat conftest.$ac_ext >&5
7192  eval "$as_ac_Header=no"
7193fi
7194rm -f conftest.err conftest.$ac_ext
7195fi
7196echo "$as_me:7196: result: `eval echo '${'$as_ac_Header'}'`" >&5
7197echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7198if test `eval echo '${'$as_ac_Header'}'` = yes; then
7199  cat >>confdefs.h <<EOF
7200#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7201EOF
7202
7203fi
7204done
7205
7206echo "$as_me:7206: checking if we should define SYSV" >&5
7207echo $ECHO_N "checking if we should define SYSV... $ECHO_C" >&6
7208if test "${cf_cv_sysv+set}" = set; then
7209  echo $ECHO_N "(cached) $ECHO_C" >&6
7210else
7211
7212cat >conftest.$ac_ext <<_ACEOF
7213#line 7213 "configure"
7214#include "confdefs.h"
7215
7216#undef  SYSV
7217#define SYSV 1			/* get Xos.h to declare sys_errlist[] */
7218#ifdef HAVE_STDLIB_H
7219#include <stdlib.h>		/* look for wchar_t */
7220#endif
7221#ifdef HAVE_X11_INTRINSIC_H
7222#include <X11/Intrinsic.h>	/* Intrinsic.h has other traps... */
7223#endif
7224#ifdef HAVE_TERMIOS_H		/* needed for HPUX 10.20 */
7225#include <termios.h>
7226#define STRUCT_TERMIOS struct termios
7227#else
7228#define STRUCT_TERMIOS struct termio
7229#endif
7230#include <curses.h>
7231#include <term.h>		/* eliminate most BSD hacks */
7232#include <errno.h>		/* declare sys_errlist on older systems */
7233#include <sys/termio.h>		/* eliminate most of the remaining ones */
7234
7235int
7236main ()
7237{
7238
7239static STRUCT_TERMIOS d_tio;
7240	d_tio.c_cc[VINTR] = 0;
7241	d_tio.c_cc[VQUIT] = 0;
7242	d_tio.c_cc[VERASE] = 0;
7243	d_tio.c_cc[VKILL] = 0;
7244	d_tio.c_cc[VEOF] = 0;
7245	d_tio.c_cc[VEOL] = 0;
7246	d_tio.c_cc[VMIN] = 0;
7247	d_tio.c_cc[VTIME] = 0;
7248#if defined(HAVE_SYS_ERRLIST) && !defined(DECL_SYS_ERRLIST)
7249sys_errlist[0] = "";		/* Cygwin mis-declares this */
7250#endif
7251
7252  ;
7253  return 0;
7254}
7255_ACEOF
7256rm -f conftest.$ac_objext
7257if { (eval echo "$as_me:7257: \"$ac_compile\"") >&5
7258  (eval $ac_compile) 2>&5
7259  ac_status=$?
7260  echo "$as_me:7260: \$? = $ac_status" >&5
7261  (exit $ac_status); } &&
7262         { ac_try='test -s conftest.$ac_objext'
7263  { (eval echo "$as_me:7263: \"$ac_try\"") >&5
7264  (eval $ac_try) 2>&5
7265  ac_status=$?
7266  echo "$as_me:7266: \$? = $ac_status" >&5
7267  (exit $ac_status); }; }; then
7268  cf_cv_sysv=yes
7269else
7270  echo "$as_me: failed program was:" >&5
7271cat conftest.$ac_ext >&5
7272cf_cv_sysv=no
7273fi
7274rm -f conftest.$ac_objext conftest.$ac_ext
7275
7276fi
7277echo "$as_me:7277: result: $cf_cv_sysv" >&5
7278echo "${ECHO_T}$cf_cv_sysv" >&6
7279test "$cf_cv_sysv" = yes && cat >>confdefs.h <<\EOF
7280#define SYSV 1
7281EOF
7282
7283echo "$as_me:7283: checking for elf_begin in -lelf" >&5
7284echo $ECHO_N "checking for elf_begin in -lelf... $ECHO_C" >&6
7285if test "${ac_cv_lib_elf_elf_begin+set}" = set; then
7286  echo $ECHO_N "(cached) $ECHO_C" >&6
7287else
7288  ac_check_lib_save_LIBS=$LIBS
7289LIBS="-lelf  $LIBS"
7290cat >conftest.$ac_ext <<_ACEOF
7291#line 7291 "configure"
7292#include "confdefs.h"
7293
7294/* Override any gcc2 internal prototype to avoid an error.  */
7295#ifdef __cplusplus
7296extern "C"
7297#endif
7298/* We use char because int might match the return type of a gcc2
7299   builtin and then its argument prototype would still apply.  */
7300char elf_begin ();
7301int
7302main ()
7303{
7304elf_begin ();
7305  ;
7306  return 0;
7307}
7308_ACEOF
7309rm -f conftest.$ac_objext conftest$ac_exeext
7310if { (eval echo "$as_me:7310: \"$ac_link\"") >&5
7311  (eval $ac_link) 2>&5
7312  ac_status=$?
7313  echo "$as_me:7313: \$? = $ac_status" >&5
7314  (exit $ac_status); } &&
7315         { ac_try='test -s conftest$ac_exeext'
7316  { (eval echo "$as_me:7316: \"$ac_try\"") >&5
7317  (eval $ac_try) 2>&5
7318  ac_status=$?
7319  echo "$as_me:7319: \$? = $ac_status" >&5
7320  (exit $ac_status); }; }; then
7321  ac_cv_lib_elf_elf_begin=yes
7322else
7323  echo "$as_me: failed program was:" >&5
7324cat conftest.$ac_ext >&5
7325ac_cv_lib_elf_elf_begin=no
7326fi
7327rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7328LIBS=$ac_check_lib_save_LIBS
7329fi
7330echo "$as_me:7330: result: $ac_cv_lib_elf_elf_begin" >&5
7331echo "${ECHO_T}$ac_cv_lib_elf_elf_begin" >&6
7332if test $ac_cv_lib_elf_elf_begin = yes; then
7333
7334echo "$as_me:7334: checking if this is an SVR4 system" >&5
7335echo $ECHO_N "checking if this is an SVR4 system... $ECHO_C" >&6
7336if test "${cf_cv_svr4+set}" = set; then
7337  echo $ECHO_N "(cached) $ECHO_C" >&6
7338else
7339
7340cat >conftest.$ac_ext <<_ACEOF
7341#line 7341 "configure"
7342#include "confdefs.h"
7343
7344#include <elf.h>
7345#include <sys/termio.h>
7346
7347int
7348main ()
7349{
7350
7351static struct termio d_tio;
7352	d_tio.c_cc[VINTR] = 0;
7353	d_tio.c_cc[VQUIT] = 0;
7354	d_tio.c_cc[VERASE] = 0;
7355	d_tio.c_cc[VKILL] = 0;
7356	d_tio.c_cc[VEOF] = 0;
7357	d_tio.c_cc[VEOL] = 0;
7358	d_tio.c_cc[VMIN] = 0;
7359	d_tio.c_cc[VTIME] = 0;
7360	d_tio.c_cc[VLNEXT] = 0;
7361
7362  ;
7363  return 0;
7364}
7365_ACEOF
7366rm -f conftest.$ac_objext
7367if { (eval echo "$as_me:7367: \"$ac_compile\"") >&5
7368  (eval $ac_compile) 2>&5
7369  ac_status=$?
7370  echo "$as_me:7370: \$? = $ac_status" >&5
7371  (exit $ac_status); } &&
7372         { ac_try='test -s conftest.$ac_objext'
7373  { (eval echo "$as_me:7373: \"$ac_try\"") >&5
7374  (eval $ac_try) 2>&5
7375  ac_status=$?
7376  echo "$as_me:7376: \$? = $ac_status" >&5
7377  (exit $ac_status); }; }; then
7378  cf_cv_svr4=yes
7379else
7380  echo "$as_me: failed program was:" >&5
7381cat conftest.$ac_ext >&5
7382cf_cv_svr4=no
7383fi
7384rm -f conftest.$ac_objext conftest.$ac_ext
7385
7386fi
7387echo "$as_me:7387: result: $cf_cv_svr4" >&5
7388echo "${ECHO_T}$cf_cv_svr4" >&6
7389
7390fi
7391
7392test "$cf_cv_svr4" = yes && cat >>confdefs.h <<\EOF
7393#define SVR4 1
7394EOF
7395
7396echo "$as_me:7396: checking for X" >&5
7397echo $ECHO_N "checking for X... $ECHO_C" >&6
7398
7399# Check whether --with-x or --without-x was given.
7400if test "${with_x+set}" = set; then
7401  withval="$with_x"
7402
7403fi;
7404# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
7405if test "x$with_x" = xno; then
7406  # The user explicitly disabled X.
7407  have_x=disabled
7408else
7409  if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
7410    # Both variables are already set.
7411    have_x=yes
7412  else
7413    if test "${ac_cv_have_x+set}" = set; then
7414  echo $ECHO_N "(cached) $ECHO_C" >&6
7415else
7416  # One or both of the vars are not set, and there is no cached value.
7417ac_x_includes=no ac_x_libraries=no
7418rm -fr conftest.dir
7419if mkdir conftest.dir; then
7420  cd conftest.dir
7421  # Make sure to not put "make" in the Imakefile rules, since we grep it out.
7422  cat >Imakefile <<'EOF'
7423acfindx:
7424	@echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
7425EOF
7426  if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
7427    # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
7428    eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
7429    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
7430    for ac_extension in a so sl dylib dll; do
7431      if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
7432         test -f $ac_im_libdir/libX11.$ac_extension; then
7433        ac_im_usrlibdir=$ac_im_libdir; break
7434      fi
7435    done
7436    # Screen out bogus values from the imake configuration.  They are
7437    # bogus both because they are the default anyway, and because
7438    # using them would break gcc on systems where it needs fixed includes.
7439    case $ac_im_incroot in
7440	/usr/include) ;;
7441	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
7442    esac
7443    case $ac_im_usrlibdir in
7444	/usr/lib | /lib) ;;
7445	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
7446    esac
7447  fi
7448  cd ..
7449  rm -fr conftest.dir
7450fi
7451
7452# Standard set of common directories for X headers.
7453# Check X11 before X11Rn because it is often a symlink to the current release.
7454ac_x_header_dirs='
7455/usr/X11/include
7456/usr/X11R6/include
7457/usr/X11R5/include
7458/usr/X11R4/include
7459
7460/usr/include/X11
7461/usr/include/X11R6
7462/usr/include/X11R5
7463/usr/include/X11R4
7464
7465/usr/local/X11/include
7466/usr/local/X11R6/include
7467/usr/local/X11R5/include
7468/usr/local/X11R4/include
7469
7470/usr/local/include/X11
7471/usr/local/include/X11R6
7472/usr/local/include/X11R5
7473/usr/local/include/X11R4
7474
7475/usr/X386/include
7476/usr/x386/include
7477/usr/XFree86/include/X11
7478
7479/usr/include
7480/usr/local/include
7481/usr/unsupported/include
7482/usr/athena/include
7483/usr/local/x11r5/include
7484/usr/lpp/Xamples/include
7485
7486/usr/openwin/include
7487/usr/openwin/share/include'
7488
7489if test "$ac_x_includes" = no; then
7490  # Guess where to find include files, by looking for Intrinsic.h.
7491  # First, try using that file with no special directory specified.
7492  cat >conftest.$ac_ext <<_ACEOF
7493#line 7493 "configure"
7494#include "confdefs.h"
7495#include <X11/Intrinsic.h>
7496_ACEOF
7497if { (eval echo "$as_me:7497: \"$ac_cpp conftest.$ac_ext\"") >&5
7498  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7499  ac_status=$?
7500  egrep -v '^ *\+' conftest.er1 >conftest.err
7501  rm -f conftest.er1
7502  cat conftest.err >&5
7503  echo "$as_me:7503: \$? = $ac_status" >&5
7504  (exit $ac_status); } >/dev/null; then
7505  if test -s conftest.err; then
7506    ac_cpp_err=$ac_c_preproc_warn_flag
7507  else
7508    ac_cpp_err=
7509  fi
7510else
7511  ac_cpp_err=yes
7512fi
7513if test -z "$ac_cpp_err"; then
7514  # We can compile using X headers with no special include directory.
7515ac_x_includes=
7516else
7517  echo "$as_me: failed program was:" >&5
7518  cat conftest.$ac_ext >&5
7519  for ac_dir in $ac_x_header_dirs; do
7520  if test -r "$ac_dir/X11/Intrinsic.h"; then
7521    ac_x_includes=$ac_dir
7522    break
7523  fi
7524done
7525fi
7526rm -f conftest.err conftest.$ac_ext
7527fi # $ac_x_includes = no
7528
7529if test "$ac_x_libraries" = no; then
7530  # Check for the libraries.
7531  # See if we find them without any special options.
7532  # Don't add to $LIBS permanently.
7533  ac_save_LIBS=$LIBS
7534  LIBS="-lXt $LIBS"
7535  cat >conftest.$ac_ext <<_ACEOF
7536#line 7536 "configure"
7537#include "confdefs.h"
7538#include <X11/Intrinsic.h>
7539int
7540main ()
7541{
7542XtMalloc (0)
7543  ;
7544  return 0;
7545}
7546_ACEOF
7547rm -f conftest.$ac_objext conftest$ac_exeext
7548if { (eval echo "$as_me:7548: \"$ac_link\"") >&5
7549  (eval $ac_link) 2>&5
7550  ac_status=$?
7551  echo "$as_me:7551: \$? = $ac_status" >&5
7552  (exit $ac_status); } &&
7553         { ac_try='test -s conftest$ac_exeext'
7554  { (eval echo "$as_me:7554: \"$ac_try\"") >&5
7555  (eval $ac_try) 2>&5
7556  ac_status=$?
7557  echo "$as_me:7557: \$? = $ac_status" >&5
7558  (exit $ac_status); }; }; then
7559  LIBS=$ac_save_LIBS
7560# We can link X programs with no special library path.
7561ac_x_libraries=
7562else
7563  echo "$as_me: failed program was:" >&5
7564cat conftest.$ac_ext >&5
7565LIBS=$ac_save_LIBS
7566for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
7567do
7568  # Don't even attempt the hair of trying to link an X program!
7569  for ac_extension in a so sl dylib dll; do
7570    if test -r $ac_dir/libXt.$ac_extension; then
7571      ac_x_libraries=$ac_dir
7572      break 2
7573    fi
7574  done
7575done
7576fi
7577rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7578fi # $ac_x_libraries = no
7579
7580if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
7581  # Didn't find X anywhere.  Cache the known absence of X.
7582  ac_cv_have_x="have_x=no"
7583else
7584  # Record where we found X for the cache.
7585  ac_cv_have_x="have_x=yes \
7586	        ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
7587fi
7588fi
7589
7590  fi
7591  eval "$ac_cv_have_x"
7592fi # $with_x != no
7593
7594if test "$have_x" != yes; then
7595  echo "$as_me:7595: result: $have_x" >&5
7596echo "${ECHO_T}$have_x" >&6
7597  no_x=yes
7598else
7599  # If each of the values was on the command line, it overrides each guess.
7600  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
7601  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
7602  # Update the cache value to reflect the command line values.
7603  ac_cv_have_x="have_x=yes \
7604		ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
7605  echo "$as_me:7605: result: libraries $x_libraries, headers $x_includes" >&5
7606echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6
7607fi
7608
7609if test "$no_x" = yes; then
7610  # Not all programs may use this symbol, but it does not hurt to define it.
7611
7612cat >>confdefs.h <<\EOF
7613#define X_DISPLAY_MISSING 1
7614EOF
7615
7616  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
7617else
7618  if test -n "$x_includes"; then
7619    X_CFLAGS="$X_CFLAGS -I$x_includes"
7620  fi
7621
7622  # It would also be nice to do this for all -L options, not just this one.
7623  if test -n "$x_libraries"; then
7624    X_LIBS="$X_LIBS -L$x_libraries"
7625    # For Solaris; some versions of Sun CC require a space after -R and
7626    # others require no space.  Words are not sufficient . . . .
7627    case `(uname -sr) 2>/dev/null` in
7628    "SunOS 5"*)
7629      echo "$as_me:7629: checking whether -R must be followed by a space" >&5
7630echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6
7631      ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
7632      cat >conftest.$ac_ext <<_ACEOF
7633#line 7633 "configure"
7634#include "confdefs.h"
7635
7636int
7637main ()
7638{
7639
7640  ;
7641  return 0;
7642}
7643_ACEOF
7644rm -f conftest.$ac_objext conftest$ac_exeext
7645if { (eval echo "$as_me:7645: \"$ac_link\"") >&5
7646  (eval $ac_link) 2>&5
7647  ac_status=$?
7648  echo "$as_me:7648: \$? = $ac_status" >&5
7649  (exit $ac_status); } &&
7650         { ac_try='test -s conftest$ac_exeext'
7651  { (eval echo "$as_me:7651: \"$ac_try\"") >&5
7652  (eval $ac_try) 2>&5
7653  ac_status=$?
7654  echo "$as_me:7654: \$? = $ac_status" >&5
7655  (exit $ac_status); }; }; then
7656  ac_R_nospace=yes
7657else
7658  echo "$as_me: failed program was:" >&5
7659cat conftest.$ac_ext >&5
7660ac_R_nospace=no
7661fi
7662rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7663      if test $ac_R_nospace = yes; then
7664	echo "$as_me:7664: result: no" >&5
7665echo "${ECHO_T}no" >&6
7666	X_LIBS="$X_LIBS -R$x_libraries"
7667      else
7668	LIBS="$ac_xsave_LIBS -R $x_libraries"
7669	cat >conftest.$ac_ext <<_ACEOF
7670#line 7670 "configure"
7671#include "confdefs.h"
7672
7673int
7674main ()
7675{
7676
7677  ;
7678  return 0;
7679}
7680_ACEOF
7681rm -f conftest.$ac_objext conftest$ac_exeext
7682if { (eval echo "$as_me:7682: \"$ac_link\"") >&5
7683  (eval $ac_link) 2>&5
7684  ac_status=$?
7685  echo "$as_me:7685: \$? = $ac_status" >&5
7686  (exit $ac_status); } &&
7687         { ac_try='test -s conftest$ac_exeext'
7688  { (eval echo "$as_me:7688: \"$ac_try\"") >&5
7689  (eval $ac_try) 2>&5
7690  ac_status=$?
7691  echo "$as_me:7691: \$? = $ac_status" >&5
7692  (exit $ac_status); }; }; then
7693  ac_R_space=yes
7694else
7695  echo "$as_me: failed program was:" >&5
7696cat conftest.$ac_ext >&5
7697ac_R_space=no
7698fi
7699rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7700	if test $ac_R_space = yes; then
7701	  echo "$as_me:7701: result: yes" >&5
7702echo "${ECHO_T}yes" >&6
7703	  X_LIBS="$X_LIBS -R $x_libraries"
7704	else
7705	  echo "$as_me:7705: result: neither works" >&5
7706echo "${ECHO_T}neither works" >&6
7707	fi
7708      fi
7709      LIBS=$ac_xsave_LIBS
7710    esac
7711  fi
7712
7713  # Check for system-dependent libraries X programs must link with.
7714  # Do this before checking for the system-independent R6 libraries
7715  # (-lICE), since we may need -lsocket or whatever for X linking.
7716
7717  if test "$ISC" = yes; then
7718    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
7719  else
7720    # Martyn Johnson says this is needed for Ultrix, if the X
7721    # libraries were built with DECnet support.  And Karl Berry says
7722    # the Alpha needs dnet_stub (dnet does not exist).
7723    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
7724    cat >conftest.$ac_ext <<_ACEOF
7725#line 7725 "configure"
7726#include "confdefs.h"
7727
7728/* Override any gcc2 internal prototype to avoid an error.  */
7729#ifdef __cplusplus
7730extern "C"
7731#endif
7732/* We use char because int might match the return type of a gcc2
7733   builtin and then its argument prototype would still apply.  */
7734char XOpenDisplay ();
7735int
7736main ()
7737{
7738XOpenDisplay ();
7739  ;
7740  return 0;
7741}
7742_ACEOF
7743rm -f conftest.$ac_objext conftest$ac_exeext
7744if { (eval echo "$as_me:7744: \"$ac_link\"") >&5
7745  (eval $ac_link) 2>&5
7746  ac_status=$?
7747  echo "$as_me:7747: \$? = $ac_status" >&5
7748  (exit $ac_status); } &&
7749         { ac_try='test -s conftest$ac_exeext'
7750  { (eval echo "$as_me:7750: \"$ac_try\"") >&5
7751  (eval $ac_try) 2>&5
7752  ac_status=$?
7753  echo "$as_me:7753: \$? = $ac_status" >&5
7754  (exit $ac_status); }; }; then
7755  :
7756else
7757  echo "$as_me: failed program was:" >&5
7758cat conftest.$ac_ext >&5
7759echo "$as_me:7759: checking for dnet_ntoa in -ldnet" >&5
7760echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6
7761if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
7762  echo $ECHO_N "(cached) $ECHO_C" >&6
7763else
7764  ac_check_lib_save_LIBS=$LIBS
7765LIBS="-ldnet  $LIBS"
7766cat >conftest.$ac_ext <<_ACEOF
7767#line 7767 "configure"
7768#include "confdefs.h"
7769
7770/* Override any gcc2 internal prototype to avoid an error.  */
7771#ifdef __cplusplus
7772extern "C"
7773#endif
7774/* We use char because int might match the return type of a gcc2
7775   builtin and then its argument prototype would still apply.  */
7776char dnet_ntoa ();
7777int
7778main ()
7779{
7780dnet_ntoa ();
7781  ;
7782  return 0;
7783}
7784_ACEOF
7785rm -f conftest.$ac_objext conftest$ac_exeext
7786if { (eval echo "$as_me:7786: \"$ac_link\"") >&5
7787  (eval $ac_link) 2>&5
7788  ac_status=$?
7789  echo "$as_me:7789: \$? = $ac_status" >&5
7790  (exit $ac_status); } &&
7791         { ac_try='test -s conftest$ac_exeext'
7792  { (eval echo "$as_me:7792: \"$ac_try\"") >&5
7793  (eval $ac_try) 2>&5
7794  ac_status=$?
7795  echo "$as_me:7795: \$? = $ac_status" >&5
7796  (exit $ac_status); }; }; then
7797  ac_cv_lib_dnet_dnet_ntoa=yes
7798else
7799  echo "$as_me: failed program was:" >&5
7800cat conftest.$ac_ext >&5
7801ac_cv_lib_dnet_dnet_ntoa=no
7802fi
7803rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7804LIBS=$ac_check_lib_save_LIBS
7805fi
7806echo "$as_me:7806: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
7807echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6
7808if test $ac_cv_lib_dnet_dnet_ntoa = yes; then
7809  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
7810fi
7811
7812    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
7813      echo "$as_me:7813: checking for dnet_ntoa in -ldnet_stub" >&5
7814echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6
7815if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then
7816  echo $ECHO_N "(cached) $ECHO_C" >&6
7817else
7818  ac_check_lib_save_LIBS=$LIBS
7819LIBS="-ldnet_stub  $LIBS"
7820cat >conftest.$ac_ext <<_ACEOF
7821#line 7821 "configure"
7822#include "confdefs.h"
7823
7824/* Override any gcc2 internal prototype to avoid an error.  */
7825#ifdef __cplusplus
7826extern "C"
7827#endif
7828/* We use char because int might match the return type of a gcc2
7829   builtin and then its argument prototype would still apply.  */
7830char dnet_ntoa ();
7831int
7832main ()
7833{
7834dnet_ntoa ();
7835  ;
7836  return 0;
7837}
7838_ACEOF
7839rm -f conftest.$ac_objext conftest$ac_exeext
7840if { (eval echo "$as_me:7840: \"$ac_link\"") >&5
7841  (eval $ac_link) 2>&5
7842  ac_status=$?
7843  echo "$as_me:7843: \$? = $ac_status" >&5
7844  (exit $ac_status); } &&
7845         { ac_try='test -s conftest$ac_exeext'
7846  { (eval echo "$as_me:7846: \"$ac_try\"") >&5
7847  (eval $ac_try) 2>&5
7848  ac_status=$?
7849  echo "$as_me:7849: \$? = $ac_status" >&5
7850  (exit $ac_status); }; }; then
7851  ac_cv_lib_dnet_stub_dnet_ntoa=yes
7852else
7853  echo "$as_me: failed program was:" >&5
7854cat conftest.$ac_ext >&5
7855ac_cv_lib_dnet_stub_dnet_ntoa=no
7856fi
7857rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7858LIBS=$ac_check_lib_save_LIBS
7859fi
7860echo "$as_me:7860: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
7861echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6
7862if test $ac_cv_lib_dnet_stub_dnet_ntoa = yes; then
7863  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
7864fi
7865
7866    fi
7867fi
7868rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7869    LIBS="$ac_xsave_LIBS"
7870
7871    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
7872    # to get the SysV transport functions.
7873    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
7874    # needs -lnsl.
7875    # The nsl library prevents programs from opening the X display
7876    # on Irix 5.2, according to T.E. Dickey.
7877    # The functions gethostbyname, getservbyname, and inet_addr are
7878    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
7879    echo "$as_me:7879: checking for gethostbyname" >&5
7880echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6
7881if test "${ac_cv_func_gethostbyname+set}" = set; then
7882  echo $ECHO_N "(cached) $ECHO_C" >&6
7883else
7884  cat >conftest.$ac_ext <<_ACEOF
7885#line 7885 "configure"
7886#include "confdefs.h"
7887/* System header to define __stub macros and hopefully few prototypes,
7888    which can conflict with char gethostbyname (); below.  */
7889#include <assert.h>
7890/* Override any gcc2 internal prototype to avoid an error.  */
7891#ifdef __cplusplus
7892extern "C"
7893#endif
7894/* We use char because int might match the return type of a gcc2
7895   builtin and then its argument prototype would still apply.  */
7896char gethostbyname ();
7897char (*f) ();
7898
7899int
7900main ()
7901{
7902/* The GNU C library defines this for functions which it implements
7903    to always fail with ENOSYS.  Some functions are actually named
7904    something starting with __ and the normal name is an alias.  */
7905#if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
7906choke me
7907#else
7908f = gethostbyname;
7909#endif
7910
7911  ;
7912  return 0;
7913}
7914_ACEOF
7915rm -f conftest.$ac_objext conftest$ac_exeext
7916if { (eval echo "$as_me:7916: \"$ac_link\"") >&5
7917  (eval $ac_link) 2>&5
7918  ac_status=$?
7919  echo "$as_me:7919: \$? = $ac_status" >&5
7920  (exit $ac_status); } &&
7921         { ac_try='test -s conftest$ac_exeext'
7922  { (eval echo "$as_me:7922: \"$ac_try\"") >&5
7923  (eval $ac_try) 2>&5
7924  ac_status=$?
7925  echo "$as_me:7925: \$? = $ac_status" >&5
7926  (exit $ac_status); }; }; then
7927  ac_cv_func_gethostbyname=yes
7928else
7929  echo "$as_me: failed program was:" >&5
7930cat conftest.$ac_ext >&5
7931ac_cv_func_gethostbyname=no
7932fi
7933rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7934fi
7935echo "$as_me:7935: result: $ac_cv_func_gethostbyname" >&5
7936echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6
7937
7938    if test $ac_cv_func_gethostbyname = no; then
7939      echo "$as_me:7939: checking for gethostbyname in -lnsl" >&5
7940echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6
7941if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
7942  echo $ECHO_N "(cached) $ECHO_C" >&6
7943else
7944  ac_check_lib_save_LIBS=$LIBS
7945LIBS="-lnsl  $LIBS"
7946cat >conftest.$ac_ext <<_ACEOF
7947#line 7947 "configure"
7948#include "confdefs.h"
7949
7950/* Override any gcc2 internal prototype to avoid an error.  */
7951#ifdef __cplusplus
7952extern "C"
7953#endif
7954/* We use char because int might match the return type of a gcc2
7955   builtin and then its argument prototype would still apply.  */
7956char gethostbyname ();
7957int
7958main ()
7959{
7960gethostbyname ();
7961  ;
7962  return 0;
7963}
7964_ACEOF
7965rm -f conftest.$ac_objext conftest$ac_exeext
7966if { (eval echo "$as_me:7966: \"$ac_link\"") >&5
7967  (eval $ac_link) 2>&5
7968  ac_status=$?
7969  echo "$as_me:7969: \$? = $ac_status" >&5
7970  (exit $ac_status); } &&
7971         { ac_try='test -s conftest$ac_exeext'
7972  { (eval echo "$as_me:7972: \"$ac_try\"") >&5
7973  (eval $ac_try) 2>&5
7974  ac_status=$?
7975  echo "$as_me:7975: \$? = $ac_status" >&5
7976  (exit $ac_status); }; }; then
7977  ac_cv_lib_nsl_gethostbyname=yes
7978else
7979  echo "$as_me: failed program was:" >&5
7980cat conftest.$ac_ext >&5
7981ac_cv_lib_nsl_gethostbyname=no
7982fi
7983rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7984LIBS=$ac_check_lib_save_LIBS
7985fi
7986echo "$as_me:7986: result: $ac_cv_lib_nsl_gethostbyname" >&5
7987echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6
7988if test $ac_cv_lib_nsl_gethostbyname = yes; then
7989  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
7990fi
7991
7992      if test $ac_cv_lib_nsl_gethostbyname = no; then
7993        echo "$as_me:7993: checking for gethostbyname in -lbsd" >&5
7994echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6
7995if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then
7996  echo $ECHO_N "(cached) $ECHO_C" >&6
7997else
7998  ac_check_lib_save_LIBS=$LIBS
7999LIBS="-lbsd  $LIBS"
8000cat >conftest.$ac_ext <<_ACEOF
8001#line 8001 "configure"
8002#include "confdefs.h"
8003
8004/* Override any gcc2 internal prototype to avoid an error.  */
8005#ifdef __cplusplus
8006extern "C"
8007#endif
8008/* We use char because int might match the return type of a gcc2
8009   builtin and then its argument prototype would still apply.  */
8010char gethostbyname ();
8011int
8012main ()
8013{
8014gethostbyname ();
8015  ;
8016  return 0;
8017}
8018_ACEOF
8019rm -f conftest.$ac_objext conftest$ac_exeext
8020if { (eval echo "$as_me:8020: \"$ac_link\"") >&5
8021  (eval $ac_link) 2>&5
8022  ac_status=$?
8023  echo "$as_me:8023: \$? = $ac_status" >&5
8024  (exit $ac_status); } &&
8025         { ac_try='test -s conftest$ac_exeext'
8026  { (eval echo "$as_me:8026: \"$ac_try\"") >&5
8027  (eval $ac_try) 2>&5
8028  ac_status=$?
8029  echo "$as_me:8029: \$? = $ac_status" >&5
8030  (exit $ac_status); }; }; then
8031  ac_cv_lib_bsd_gethostbyname=yes
8032else
8033  echo "$as_me: failed program was:" >&5
8034cat conftest.$ac_ext >&5
8035ac_cv_lib_bsd_gethostbyname=no
8036fi
8037rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8038LIBS=$ac_check_lib_save_LIBS
8039fi
8040echo "$as_me:8040: result: $ac_cv_lib_bsd_gethostbyname" >&5
8041echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6
8042if test $ac_cv_lib_bsd_gethostbyname = yes; then
8043  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
8044fi
8045
8046      fi
8047    fi
8048
8049    # lieder@skyler.mavd.honeywell.com says without -lsocket,
8050    # socket/setsockopt and other routines are undefined under SCO ODT
8051    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
8052    # on later versions), says Simon Leinen: it contains gethostby*
8053    # variants that don't use the nameserver (or something).  -lsocket
8054    # must be given before -lnsl if both are needed.  We assume that
8055    # if connect needs -lnsl, so does gethostbyname.
8056    echo "$as_me:8056: checking for connect" >&5
8057echo $ECHO_N "checking for connect... $ECHO_C" >&6
8058if test "${ac_cv_func_connect+set}" = set; then
8059  echo $ECHO_N "(cached) $ECHO_C" >&6
8060else
8061  cat >conftest.$ac_ext <<_ACEOF
8062#line 8062 "configure"
8063#include "confdefs.h"
8064/* System header to define __stub macros and hopefully few prototypes,
8065    which can conflict with char connect (); below.  */
8066#include <assert.h>
8067/* Override any gcc2 internal prototype to avoid an error.  */
8068#ifdef __cplusplus
8069extern "C"
8070#endif
8071/* We use char because int might match the return type of a gcc2
8072   builtin and then its argument prototype would still apply.  */
8073char connect ();
8074char (*f) ();
8075
8076int
8077main ()
8078{
8079/* The GNU C library defines this for functions which it implements
8080    to always fail with ENOSYS.  Some functions are actually named
8081    something starting with __ and the normal name is an alias.  */
8082#if defined (__stub_connect) || defined (__stub___connect)
8083choke me
8084#else
8085f = connect;
8086#endif
8087
8088  ;
8089  return 0;
8090}
8091_ACEOF
8092rm -f conftest.$ac_objext conftest$ac_exeext
8093if { (eval echo "$as_me:8093: \"$ac_link\"") >&5
8094  (eval $ac_link) 2>&5
8095  ac_status=$?
8096  echo "$as_me:8096: \$? = $ac_status" >&5
8097  (exit $ac_status); } &&
8098         { ac_try='test -s conftest$ac_exeext'
8099  { (eval echo "$as_me:8099: \"$ac_try\"") >&5
8100  (eval $ac_try) 2>&5
8101  ac_status=$?
8102  echo "$as_me:8102: \$? = $ac_status" >&5
8103  (exit $ac_status); }; }; then
8104  ac_cv_func_connect=yes
8105else
8106  echo "$as_me: failed program was:" >&5
8107cat conftest.$ac_ext >&5
8108ac_cv_func_connect=no
8109fi
8110rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8111fi
8112echo "$as_me:8112: result: $ac_cv_func_connect" >&5
8113echo "${ECHO_T}$ac_cv_func_connect" >&6
8114
8115    if test $ac_cv_func_connect = no; then
8116      echo "$as_me:8116: checking for connect in -lsocket" >&5
8117echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6
8118if test "${ac_cv_lib_socket_connect+set}" = set; then
8119  echo $ECHO_N "(cached) $ECHO_C" >&6
8120else
8121  ac_check_lib_save_LIBS=$LIBS
8122LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
8123cat >conftest.$ac_ext <<_ACEOF
8124#line 8124 "configure"
8125#include "confdefs.h"
8126
8127/* Override any gcc2 internal prototype to avoid an error.  */
8128#ifdef __cplusplus
8129extern "C"
8130#endif
8131/* We use char because int might match the return type of a gcc2
8132   builtin and then its argument prototype would still apply.  */
8133char connect ();
8134int
8135main ()
8136{
8137connect ();
8138  ;
8139  return 0;
8140}
8141_ACEOF
8142rm -f conftest.$ac_objext conftest$ac_exeext
8143if { (eval echo "$as_me:8143: \"$ac_link\"") >&5
8144  (eval $ac_link) 2>&5
8145  ac_status=$?
8146  echo "$as_me:8146: \$? = $ac_status" >&5
8147  (exit $ac_status); } &&
8148         { ac_try='test -s conftest$ac_exeext'
8149  { (eval echo "$as_me:8149: \"$ac_try\"") >&5
8150  (eval $ac_try) 2>&5
8151  ac_status=$?
8152  echo "$as_me:8152: \$? = $ac_status" >&5
8153  (exit $ac_status); }; }; then
8154  ac_cv_lib_socket_connect=yes
8155else
8156  echo "$as_me: failed program was:" >&5
8157cat conftest.$ac_ext >&5
8158ac_cv_lib_socket_connect=no
8159fi
8160rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8161LIBS=$ac_check_lib_save_LIBS
8162fi
8163echo "$as_me:8163: result: $ac_cv_lib_socket_connect" >&5
8164echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6
8165if test $ac_cv_lib_socket_connect = yes; then
8166  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
8167fi
8168
8169    fi
8170
8171    # Guillermo Gomez says -lposix is necessary on A/UX.
8172    echo "$as_me:8172: checking for remove" >&5
8173echo $ECHO_N "checking for remove... $ECHO_C" >&6
8174if test "${ac_cv_func_remove+set}" = set; then
8175  echo $ECHO_N "(cached) $ECHO_C" >&6
8176else
8177  cat >conftest.$ac_ext <<_ACEOF
8178#line 8178 "configure"
8179#include "confdefs.h"
8180/* System header to define __stub macros and hopefully few prototypes,
8181    which can conflict with char remove (); below.  */
8182#include <assert.h>
8183/* Override any gcc2 internal prototype to avoid an error.  */
8184#ifdef __cplusplus
8185extern "C"
8186#endif
8187/* We use char because int might match the return type of a gcc2
8188   builtin and then its argument prototype would still apply.  */
8189char remove ();
8190char (*f) ();
8191
8192int
8193main ()
8194{
8195/* The GNU C library defines this for functions which it implements
8196    to always fail with ENOSYS.  Some functions are actually named
8197    something starting with __ and the normal name is an alias.  */
8198#if defined (__stub_remove) || defined (__stub___remove)
8199choke me
8200#else
8201f = remove;
8202#endif
8203
8204  ;
8205  return 0;
8206}
8207_ACEOF
8208rm -f conftest.$ac_objext conftest$ac_exeext
8209if { (eval echo "$as_me:8209: \"$ac_link\"") >&5
8210  (eval $ac_link) 2>&5
8211  ac_status=$?
8212  echo "$as_me:8212: \$? = $ac_status" >&5
8213  (exit $ac_status); } &&
8214         { ac_try='test -s conftest$ac_exeext'
8215  { (eval echo "$as_me:8215: \"$ac_try\"") >&5
8216  (eval $ac_try) 2>&5
8217  ac_status=$?
8218  echo "$as_me:8218: \$? = $ac_status" >&5
8219  (exit $ac_status); }; }; then
8220  ac_cv_func_remove=yes
8221else
8222  echo "$as_me: failed program was:" >&5
8223cat conftest.$ac_ext >&5
8224ac_cv_func_remove=no
8225fi
8226rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8227fi
8228echo "$as_me:8228: result: $ac_cv_func_remove" >&5
8229echo "${ECHO_T}$ac_cv_func_remove" >&6
8230
8231    if test $ac_cv_func_remove = no; then
8232      echo "$as_me:8232: checking for remove in -lposix" >&5
8233echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6
8234if test "${ac_cv_lib_posix_remove+set}" = set; then
8235  echo $ECHO_N "(cached) $ECHO_C" >&6
8236else
8237  ac_check_lib_save_LIBS=$LIBS
8238LIBS="-lposix  $LIBS"
8239cat >conftest.$ac_ext <<_ACEOF
8240#line 8240 "configure"
8241#include "confdefs.h"
8242
8243/* Override any gcc2 internal prototype to avoid an error.  */
8244#ifdef __cplusplus
8245extern "C"
8246#endif
8247/* We use char because int might match the return type of a gcc2
8248   builtin and then its argument prototype would still apply.  */
8249char remove ();
8250int
8251main ()
8252{
8253remove ();
8254  ;
8255  return 0;
8256}
8257_ACEOF
8258rm -f conftest.$ac_objext conftest$ac_exeext
8259if { (eval echo "$as_me:8259: \"$ac_link\"") >&5
8260  (eval $ac_link) 2>&5
8261  ac_status=$?
8262  echo "$as_me:8262: \$? = $ac_status" >&5
8263  (exit $ac_status); } &&
8264         { ac_try='test -s conftest$ac_exeext'
8265  { (eval echo "$as_me:8265: \"$ac_try\"") >&5
8266  (eval $ac_try) 2>&5
8267  ac_status=$?
8268  echo "$as_me:8268: \$? = $ac_status" >&5
8269  (exit $ac_status); }; }; then
8270  ac_cv_lib_posix_remove=yes
8271else
8272  echo "$as_me: failed program was:" >&5
8273cat conftest.$ac_ext >&5
8274ac_cv_lib_posix_remove=no
8275fi
8276rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8277LIBS=$ac_check_lib_save_LIBS
8278fi
8279echo "$as_me:8279: result: $ac_cv_lib_posix_remove" >&5
8280echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6
8281if test $ac_cv_lib_posix_remove = yes; then
8282  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
8283fi
8284
8285    fi
8286
8287    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
8288    echo "$as_me:8288: checking for shmat" >&5
8289echo $ECHO_N "checking for shmat... $ECHO_C" >&6
8290if test "${ac_cv_func_shmat+set}" = set; then
8291  echo $ECHO_N "(cached) $ECHO_C" >&6
8292else
8293  cat >conftest.$ac_ext <<_ACEOF
8294#line 8294 "configure"
8295#include "confdefs.h"
8296/* System header to define __stub macros and hopefully few prototypes,
8297    which can conflict with char shmat (); below.  */
8298#include <assert.h>
8299/* Override any gcc2 internal prototype to avoid an error.  */
8300#ifdef __cplusplus
8301extern "C"
8302#endif
8303/* We use char because int might match the return type of a gcc2
8304   builtin and then its argument prototype would still apply.  */
8305char shmat ();
8306char (*f) ();
8307
8308int
8309main ()
8310{
8311/* The GNU C library defines this for functions which it implements
8312    to always fail with ENOSYS.  Some functions are actually named
8313    something starting with __ and the normal name is an alias.  */
8314#if defined (__stub_shmat) || defined (__stub___shmat)
8315choke me
8316#else
8317f = shmat;
8318#endif
8319
8320  ;
8321  return 0;
8322}
8323_ACEOF
8324rm -f conftest.$ac_objext conftest$ac_exeext
8325if { (eval echo "$as_me:8325: \"$ac_link\"") >&5
8326  (eval $ac_link) 2>&5
8327  ac_status=$?
8328  echo "$as_me:8328: \$? = $ac_status" >&5
8329  (exit $ac_status); } &&
8330         { ac_try='test -s conftest$ac_exeext'
8331  { (eval echo "$as_me:8331: \"$ac_try\"") >&5
8332  (eval $ac_try) 2>&5
8333  ac_status=$?
8334  echo "$as_me:8334: \$? = $ac_status" >&5
8335  (exit $ac_status); }; }; then
8336  ac_cv_func_shmat=yes
8337else
8338  echo "$as_me: failed program was:" >&5
8339cat conftest.$ac_ext >&5
8340ac_cv_func_shmat=no
8341fi
8342rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8343fi
8344echo "$as_me:8344: result: $ac_cv_func_shmat" >&5
8345echo "${ECHO_T}$ac_cv_func_shmat" >&6
8346
8347    if test $ac_cv_func_shmat = no; then
8348      echo "$as_me:8348: checking for shmat in -lipc" >&5
8349echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6
8350if test "${ac_cv_lib_ipc_shmat+set}" = set; then
8351  echo $ECHO_N "(cached) $ECHO_C" >&6
8352else
8353  ac_check_lib_save_LIBS=$LIBS
8354LIBS="-lipc  $LIBS"
8355cat >conftest.$ac_ext <<_ACEOF
8356#line 8356 "configure"
8357#include "confdefs.h"
8358
8359/* Override any gcc2 internal prototype to avoid an error.  */
8360#ifdef __cplusplus
8361extern "C"
8362#endif
8363/* We use char because int might match the return type of a gcc2
8364   builtin and then its argument prototype would still apply.  */
8365char shmat ();
8366int
8367main ()
8368{
8369shmat ();
8370  ;
8371  return 0;
8372}
8373_ACEOF
8374rm -f conftest.$ac_objext conftest$ac_exeext
8375if { (eval echo "$as_me:8375: \"$ac_link\"") >&5
8376  (eval $ac_link) 2>&5
8377  ac_status=$?
8378  echo "$as_me:8378: \$? = $ac_status" >&5
8379  (exit $ac_status); } &&
8380         { ac_try='test -s conftest$ac_exeext'
8381  { (eval echo "$as_me:8381: \"$ac_try\"") >&5
8382  (eval $ac_try) 2>&5
8383  ac_status=$?
8384  echo "$as_me:8384: \$? = $ac_status" >&5
8385  (exit $ac_status); }; }; then
8386  ac_cv_lib_ipc_shmat=yes
8387else
8388  echo "$as_me: failed program was:" >&5
8389cat conftest.$ac_ext >&5
8390ac_cv_lib_ipc_shmat=no
8391fi
8392rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8393LIBS=$ac_check_lib_save_LIBS
8394fi
8395echo "$as_me:8395: result: $ac_cv_lib_ipc_shmat" >&5
8396echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6
8397if test $ac_cv_lib_ipc_shmat = yes; then
8398  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
8399fi
8400
8401    fi
8402  fi
8403
8404  # Check for libraries that X11R6 Xt/Xaw programs need.
8405  ac_save_LDFLAGS=$LDFLAGS
8406  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
8407  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
8408  # check for ICE first), but we must link in the order -lSM -lICE or
8409  # we get undefined symbols.  So assume we have SM if we have ICE.
8410  # These have to be linked with before -lX11, unlike the other
8411  # libraries we check for below, so use a different variable.
8412  # John Interrante, Karl Berry
8413  echo "$as_me:8413: checking for IceConnectionNumber in -lICE" >&5
8414echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6
8415if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then
8416  echo $ECHO_N "(cached) $ECHO_C" >&6
8417else
8418  ac_check_lib_save_LIBS=$LIBS
8419LIBS="-lICE $X_EXTRA_LIBS $LIBS"
8420cat >conftest.$ac_ext <<_ACEOF
8421#line 8421 "configure"
8422#include "confdefs.h"
8423
8424/* Override any gcc2 internal prototype to avoid an error.  */
8425#ifdef __cplusplus
8426extern "C"
8427#endif
8428/* We use char because int might match the return type of a gcc2
8429   builtin and then its argument prototype would still apply.  */
8430char IceConnectionNumber ();
8431int
8432main ()
8433{
8434IceConnectionNumber ();
8435  ;
8436  return 0;
8437}
8438_ACEOF
8439rm -f conftest.$ac_objext conftest$ac_exeext
8440if { (eval echo "$as_me:8440: \"$ac_link\"") >&5
8441  (eval $ac_link) 2>&5
8442  ac_status=$?
8443  echo "$as_me:8443: \$? = $ac_status" >&5
8444  (exit $ac_status); } &&
8445         { ac_try='test -s conftest$ac_exeext'
8446  { (eval echo "$as_me:8446: \"$ac_try\"") >&5
8447  (eval $ac_try) 2>&5
8448  ac_status=$?
8449  echo "$as_me:8449: \$? = $ac_status" >&5
8450  (exit $ac_status); }; }; then
8451  ac_cv_lib_ICE_IceConnectionNumber=yes
8452else
8453  echo "$as_me: failed program was:" >&5
8454cat conftest.$ac_ext >&5
8455ac_cv_lib_ICE_IceConnectionNumber=no
8456fi
8457rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8458LIBS=$ac_check_lib_save_LIBS
8459fi
8460echo "$as_me:8460: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
8461echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6
8462if test $ac_cv_lib_ICE_IceConnectionNumber = yes; then
8463  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
8464fi
8465
8466  LDFLAGS=$ac_save_LDFLAGS
8467
8468fi
8469
8470echo "$as_me:8470: checking if you want to use pkg-config" >&5
8471echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
8472
8473# Check whether --with-pkg-config or --without-pkg-config was given.
8474if test "${with_pkg_config+set}" = set; then
8475  withval="$with_pkg_config"
8476  cf_pkg_config=$withval
8477else
8478  cf_pkg_config=yes
8479fi;
8480echo "$as_me:8480: result: $cf_pkg_config" >&5
8481echo "${ECHO_T}$cf_pkg_config" >&6
8482
8483case $cf_pkg_config in #(vi
8484no) #(vi
8485	PKG_CONFIG=none
8486	;;
8487yes) #(vi
8488
8489if test -n "$ac_tool_prefix"; then
8490  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
8491set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
8492echo "$as_me:8492: checking for $ac_word" >&5
8493echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8494if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
8495  echo $ECHO_N "(cached) $ECHO_C" >&6
8496else
8497  case $PKG_CONFIG in
8498  [\\/]* | ?:[\\/]*)
8499  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8500  ;;
8501  *)
8502  ac_save_IFS=$IFS; IFS=$ac_path_separator
8503ac_dummy="$PATH"
8504for ac_dir in $ac_dummy; do
8505  IFS=$ac_save_IFS
8506  test -z "$ac_dir" && ac_dir=.
8507  if $as_executable_p "$ac_dir/$ac_word"; then
8508   ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
8509   echo "$as_me:8509: found $ac_dir/$ac_word" >&5
8510   break
8511fi
8512done
8513
8514  ;;
8515esac
8516fi
8517PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8518
8519if test -n "$PKG_CONFIG"; then
8520  echo "$as_me:8520: result: $PKG_CONFIG" >&5
8521echo "${ECHO_T}$PKG_CONFIG" >&6
8522else
8523  echo "$as_me:8523: result: no" >&5
8524echo "${ECHO_T}no" >&6
8525fi
8526
8527fi
8528if test -z "$ac_cv_path_PKG_CONFIG"; then
8529  ac_pt_PKG_CONFIG=$PKG_CONFIG
8530  # Extract the first word of "pkg-config", so it can be a program name with args.
8531set dummy pkg-config; ac_word=$2
8532echo "$as_me:8532: checking for $ac_word" >&5
8533echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8534if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
8535  echo $ECHO_N "(cached) $ECHO_C" >&6
8536else
8537  case $ac_pt_PKG_CONFIG in
8538  [\\/]* | ?:[\\/]*)
8539  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
8540  ;;
8541  *)
8542  ac_save_IFS=$IFS; IFS=$ac_path_separator
8543ac_dummy="$PATH"
8544for ac_dir in $ac_dummy; do
8545  IFS=$ac_save_IFS
8546  test -z "$ac_dir" && ac_dir=.
8547  if $as_executable_p "$ac_dir/$ac_word"; then
8548   ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
8549   echo "$as_me:8549: found $ac_dir/$ac_word" >&5
8550   break
8551fi
8552done
8553
8554  test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
8555  ;;
8556esac
8557fi
8558ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
8559
8560if test -n "$ac_pt_PKG_CONFIG"; then
8561  echo "$as_me:8561: result: $ac_pt_PKG_CONFIG" >&5
8562echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
8563else
8564  echo "$as_me:8564: result: no" >&5
8565echo "${ECHO_T}no" >&6
8566fi
8567
8568  PKG_CONFIG=$ac_pt_PKG_CONFIG
8569else
8570  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
8571fi
8572
8573	;;
8574*)
8575	PKG_CONFIG=$withval
8576	;;
8577esac
8578
8579test -z "$PKG_CONFIG" && PKG_CONFIG=none
8580if test "$PKG_CONFIG" != none ; then
8581
8582if test "x$prefix" != xNONE; then
8583  cf_path_syntax="$prefix"
8584else
8585  cf_path_syntax="$ac_default_prefix"
8586fi
8587
8588case ".$PKG_CONFIG" in #(vi
8589.\$\(*\)*|.\'*\'*) #(vi
8590  ;;
8591..|./*|.\\*) #(vi
8592  ;;
8593.[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
8594  ;;
8595.\${*prefix}*) #(vi
8596  eval PKG_CONFIG="$PKG_CONFIG"
8597  case ".$PKG_CONFIG" in #(vi
8598  .NONE/*)
8599    PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
8600    ;;
8601  esac
8602  ;; #(vi
8603.no|.NONE/*)
8604  PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
8605  ;;
8606*)
8607  { { echo "$as_me:8607: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
8608echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
8609   { (exit 1); exit 1; }; }
8610  ;;
8611esac
8612
8613fi
8614
8615cf_have_X_LIBS=no
8616
8617if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xt; then
8618	test -n "$verbose" && echo "	found package xt" 1>&6
8619
8620echo "${as_me:-configure}:8620: testing found package xt ..." 1>&5
8621
8622	cf_pkgconfig_incs="`$PKG_CONFIG --cflags xt 2>/dev/null`"
8623	cf_pkgconfig_libs="`$PKG_CONFIG --libs   xt 2>/dev/null`"
8624	test -n "$verbose" && echo "	package xt CFLAGS: $cf_pkgconfig_incs" 1>&6
8625
8626echo "${as_me:-configure}:8626: testing package xt CFLAGS: $cf_pkgconfig_incs ..." 1>&5
8627
8628	test -n "$verbose" && echo "	package xt LIBS: $cf_pkgconfig_libs" 1>&6
8629
8630echo "${as_me:-configure}:8630: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5
8631
8632cf_fix_cppflags=no
8633cf_new_cflags=
8634cf_new_cppflags=
8635cf_new_extra_cppflags=
8636
8637for cf_add_cflags in $cf_pkgconfig_incs
8638do
8639case $cf_fix_cppflags in
8640no)
8641	case $cf_add_cflags in #(vi
8642	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8643		case $cf_add_cflags in
8644		-D*)
8645			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8646
8647			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8648				&& test -z "${cf_tst_cflags}" \
8649				&& cf_fix_cppflags=yes
8650
8651			if test $cf_fix_cppflags = yes ; then
8652				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8653				continue
8654			elif test "${cf_tst_cflags}" = "\"'" ; then
8655				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8656				continue
8657			fi
8658			;;
8659		esac
8660		case "$CPPFLAGS" in
8661		*$cf_add_cflags) #(vi
8662			;;
8663		*) #(vi
8664			case $cf_add_cflags in #(vi
8665			-D*)
8666				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8667
8668CPPFLAGS=`echo "$CPPFLAGS" | \
8669	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
8670		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
8671
8672				;;
8673			esac
8674			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8675			;;
8676		esac
8677		;;
8678	*)
8679		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8680		;;
8681	esac
8682	;;
8683yes)
8684	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8685
8686	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8687
8688	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8689		&& test -z "${cf_tst_cflags}" \
8690		&& cf_fix_cppflags=no
8691	;;
8692esac
8693done
8694
8695if test -n "$cf_new_cflags" ; then
8696
8697	CFLAGS="$CFLAGS $cf_new_cflags"
8698fi
8699
8700if test -n "$cf_new_cppflags" ; then
8701
8702	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8703fi
8704
8705if test -n "$cf_new_extra_cppflags" ; then
8706
8707	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8708fi
8709
8710	LIBS="$cf_pkgconfig_libs $LIBS"
8711
8712	case "x$LIBS" in #(vi
8713	*-lX11*) #(vi
8714		;;
8715	*)
8716# we have an "xt" package, but it may omit Xt's dependency on X11
8717echo "$as_me:8717: checking for usable X dependency" >&5
8718echo $ECHO_N "checking for usable X dependency... $ECHO_C" >&6
8719if test "${cf_cv_xt_x11_compat+set}" = set; then
8720  echo $ECHO_N "(cached) $ECHO_C" >&6
8721else
8722
8723cat >conftest.$ac_ext <<_ACEOF
8724#line 8724 "configure"
8725#include "confdefs.h"
8726
8727#include <X11/Xlib.h>
8728
8729int
8730main ()
8731{
8732
8733	int rc1 = XDrawLine((Display*) 0, (Drawable) 0, (GC) 0, 0, 0, 0, 0);
8734	int rc2 = XClearWindow((Display*) 0, (Window) 0);
8735	int rc3 = XMoveWindow((Display*) 0, (Window) 0, 0, 0);
8736	int rc4 = XMoveResizeWindow((Display*)0, (Window)0, 0, 0, 0, 0);
8737
8738  ;
8739  return 0;
8740}
8741_ACEOF
8742rm -f conftest.$ac_objext conftest$ac_exeext
8743if { (eval echo "$as_me:8743: \"$ac_link\"") >&5
8744  (eval $ac_link) 2>&5
8745  ac_status=$?
8746  echo "$as_me:8746: \$? = $ac_status" >&5
8747  (exit $ac_status); } &&
8748         { ac_try='test -s conftest$ac_exeext'
8749  { (eval echo "$as_me:8749: \"$ac_try\"") >&5
8750  (eval $ac_try) 2>&5
8751  ac_status=$?
8752  echo "$as_me:8752: \$? = $ac_status" >&5
8753  (exit $ac_status); }; }; then
8754  cf_cv_xt_x11_compat=yes
8755else
8756  echo "$as_me: failed program was:" >&5
8757cat conftest.$ac_ext >&5
8758cf_cv_xt_x11_compat=no
8759fi
8760rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8761fi
8762echo "$as_me:8762: result: $cf_cv_xt_x11_compat" >&5
8763echo "${ECHO_T}$cf_cv_xt_x11_compat" >&6
8764		if test "$cf_cv_xt_x11_compat" = no
8765		then
8766			test -n "$verbose" && echo "	work around broken X11 dependency" 1>&6
8767
8768echo "${as_me:-configure}:8768: testing work around broken X11 dependency ..." 1>&5
8769
8770			# 2010/11/19 - good enough until a working Xt on Xcb is delivered.
8771
8772if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists x11; then
8773	test -n "$verbose" && echo "	found package x11" 1>&6
8774
8775echo "${as_me:-configure}:8775: testing found package x11 ..." 1>&5
8776
8777	cf_pkgconfig_incs="`$PKG_CONFIG --cflags x11 2>/dev/null`"
8778	cf_pkgconfig_libs="`$PKG_CONFIG --libs   x11 2>/dev/null`"
8779	test -n "$verbose" && echo "	package x11 CFLAGS: $cf_pkgconfig_incs" 1>&6
8780
8781echo "${as_me:-configure}:8781: testing package x11 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
8782
8783	test -n "$verbose" && echo "	package x11 LIBS: $cf_pkgconfig_libs" 1>&6
8784
8785echo "${as_me:-configure}:8785: testing package x11 LIBS: $cf_pkgconfig_libs ..." 1>&5
8786
8787cf_fix_cppflags=no
8788cf_new_cflags=
8789cf_new_cppflags=
8790cf_new_extra_cppflags=
8791
8792for cf_add_cflags in $cf_pkgconfig_incs
8793do
8794case $cf_fix_cppflags in
8795no)
8796	case $cf_add_cflags in #(vi
8797	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8798		case $cf_add_cflags in
8799		-D*)
8800			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8801
8802			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8803				&& test -z "${cf_tst_cflags}" \
8804				&& cf_fix_cppflags=yes
8805
8806			if test $cf_fix_cppflags = yes ; then
8807				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8808				continue
8809			elif test "${cf_tst_cflags}" = "\"'" ; then
8810				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8811				continue
8812			fi
8813			;;
8814		esac
8815		case "$CPPFLAGS" in
8816		*$cf_add_cflags) #(vi
8817			;;
8818		*) #(vi
8819			case $cf_add_cflags in #(vi
8820			-D*)
8821				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8822
8823CPPFLAGS=`echo "$CPPFLAGS" | \
8824	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
8825		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
8826
8827				;;
8828			esac
8829			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8830			;;
8831		esac
8832		;;
8833	*)
8834		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8835		;;
8836	esac
8837	;;
8838yes)
8839	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8840
8841	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8842
8843	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8844		&& test -z "${cf_tst_cflags}" \
8845		&& cf_fix_cppflags=no
8846	;;
8847esac
8848done
8849
8850if test -n "$cf_new_cflags" ; then
8851
8852	CFLAGS="$CFLAGS $cf_new_cflags"
8853fi
8854
8855if test -n "$cf_new_cppflags" ; then
8856
8857	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8858fi
8859
8860if test -n "$cf_new_extra_cppflags" ; then
8861
8862	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8863fi
8864
8865	LIBS="$cf_pkgconfig_libs $LIBS"
8866	:
8867else
8868
8869test -n "$verbose" && echo "	...before $LIBS" 1>&6
8870
8871echo "${as_me:-configure}:8871: testing ...before $LIBS ..." 1>&5
8872
8873LIBS=`echo "$LIBS" | sed -e "s/[ 	][ 	]*/ /g" -e "s,-lXt ,-lXt -lX11 ," -e 's/  / /g'`
8874test -n "$verbose" && echo "	...after  $LIBS" 1>&6
8875
8876echo "${as_me:-configure}:8876: testing ...after  $LIBS ..." 1>&5
8877
8878fi
8879
8880		fi
8881		;;
8882	esac
8883
8884echo "$as_me:8884: checking for usable X Toolkit package" >&5
8885echo $ECHO_N "checking for usable X Toolkit package... $ECHO_C" >&6
8886if test "${cf_cv_xt_ice_compat+set}" = set; then
8887  echo $ECHO_N "(cached) $ECHO_C" >&6
8888else
8889
8890cat >conftest.$ac_ext <<_ACEOF
8891#line 8891 "configure"
8892#include "confdefs.h"
8893
8894#include <X11/Shell.h>
8895
8896int
8897main ()
8898{
8899int num = IceConnectionNumber(0)
8900
8901  ;
8902  return 0;
8903}
8904_ACEOF
8905rm -f conftest.$ac_objext conftest$ac_exeext
8906if { (eval echo "$as_me:8906: \"$ac_link\"") >&5
8907  (eval $ac_link) 2>&5
8908  ac_status=$?
8909  echo "$as_me:8909: \$? = $ac_status" >&5
8910  (exit $ac_status); } &&
8911         { ac_try='test -s conftest$ac_exeext'
8912  { (eval echo "$as_me:8912: \"$ac_try\"") >&5
8913  (eval $ac_try) 2>&5
8914  ac_status=$?
8915  echo "$as_me:8915: \$? = $ac_status" >&5
8916  (exit $ac_status); }; }; then
8917  cf_cv_xt_ice_compat=yes
8918else
8919  echo "$as_me: failed program was:" >&5
8920cat conftest.$ac_ext >&5
8921cf_cv_xt_ice_compat=no
8922fi
8923rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8924fi
8925echo "$as_me:8925: result: $cf_cv_xt_ice_compat" >&5
8926echo "${ECHO_T}$cf_cv_xt_ice_compat" >&6
8927
8928	if test "$cf_cv_xt_ice_compat" = no
8929	then
8930		# workaround for broken ".pc" files used for X Toolkit.
8931		case "x$X_PRE_LIBS" in #(vi
8932		*-lICE*)
8933			case "x$LIBS" in #(vi
8934			*-lICE*) #(vi
8935				;;
8936			*)
8937				test -n "$verbose" && echo "	work around broken ICE dependency" 1>&6
8938
8939echo "${as_me:-configure}:8939: testing work around broken ICE dependency ..." 1>&5
8940
8941if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists ice; then
8942	test -n "$verbose" && echo "	found package ice" 1>&6
8943
8944echo "${as_me:-configure}:8944: testing found package ice ..." 1>&5
8945
8946	cf_pkgconfig_incs="`$PKG_CONFIG --cflags ice 2>/dev/null`"
8947	cf_pkgconfig_libs="`$PKG_CONFIG --libs   ice 2>/dev/null`"
8948	test -n "$verbose" && echo "	package ice CFLAGS: $cf_pkgconfig_incs" 1>&6
8949
8950echo "${as_me:-configure}:8950: testing package ice CFLAGS: $cf_pkgconfig_incs ..." 1>&5
8951
8952	test -n "$verbose" && echo "	package ice LIBS: $cf_pkgconfig_libs" 1>&6
8953
8954echo "${as_me:-configure}:8954: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5
8955
8956cf_fix_cppflags=no
8957cf_new_cflags=
8958cf_new_cppflags=
8959cf_new_extra_cppflags=
8960
8961for cf_add_cflags in $cf_pkgconfig_incs
8962do
8963case $cf_fix_cppflags in
8964no)
8965	case $cf_add_cflags in #(vi
8966	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8967		case $cf_add_cflags in
8968		-D*)
8969			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8970
8971			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8972				&& test -z "${cf_tst_cflags}" \
8973				&& cf_fix_cppflags=yes
8974
8975			if test $cf_fix_cppflags = yes ; then
8976				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8977				continue
8978			elif test "${cf_tst_cflags}" = "\"'" ; then
8979				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8980				continue
8981			fi
8982			;;
8983		esac
8984		case "$CPPFLAGS" in
8985		*$cf_add_cflags) #(vi
8986			;;
8987		*) #(vi
8988			case $cf_add_cflags in #(vi
8989			-D*)
8990				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8991
8992CPPFLAGS=`echo "$CPPFLAGS" | \
8993	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
8994		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
8995
8996				;;
8997			esac
8998			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8999			;;
9000		esac
9001		;;
9002	*)
9003		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
9004		;;
9005	esac
9006	;;
9007yes)
9008	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9009
9010	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9011
9012	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
9013		&& test -z "${cf_tst_cflags}" \
9014		&& cf_fix_cppflags=no
9015	;;
9016esac
9017done
9018
9019if test -n "$cf_new_cflags" ; then
9020
9021	CFLAGS="$CFLAGS $cf_new_cflags"
9022fi
9023
9024if test -n "$cf_new_cppflags" ; then
9025
9026	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
9027fi
9028
9029if test -n "$cf_new_extra_cppflags" ; then
9030
9031	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
9032fi
9033
9034	LIBS="$cf_pkgconfig_libs $LIBS"
9035
9036if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists sm; then
9037	test -n "$verbose" && echo "	found package sm" 1>&6
9038
9039echo "${as_me:-configure}:9039: testing found package sm ..." 1>&5
9040
9041	cf_pkgconfig_incs="`$PKG_CONFIG --cflags sm 2>/dev/null`"
9042	cf_pkgconfig_libs="`$PKG_CONFIG --libs   sm 2>/dev/null`"
9043	test -n "$verbose" && echo "	package sm CFLAGS: $cf_pkgconfig_incs" 1>&6
9044
9045echo "${as_me:-configure}:9045: testing package sm CFLAGS: $cf_pkgconfig_incs ..." 1>&5
9046
9047	test -n "$verbose" && echo "	package sm LIBS: $cf_pkgconfig_libs" 1>&6
9048
9049echo "${as_me:-configure}:9049: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5
9050
9051cf_fix_cppflags=no
9052cf_new_cflags=
9053cf_new_cppflags=
9054cf_new_extra_cppflags=
9055
9056for cf_add_cflags in $cf_pkgconfig_incs
9057do
9058case $cf_fix_cppflags in
9059no)
9060	case $cf_add_cflags in #(vi
9061	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
9062		case $cf_add_cflags in
9063		-D*)
9064			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9065
9066			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
9067				&& test -z "${cf_tst_cflags}" \
9068				&& cf_fix_cppflags=yes
9069
9070			if test $cf_fix_cppflags = yes ; then
9071				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9072				continue
9073			elif test "${cf_tst_cflags}" = "\"'" ; then
9074				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9075				continue
9076			fi
9077			;;
9078		esac
9079		case "$CPPFLAGS" in
9080		*$cf_add_cflags) #(vi
9081			;;
9082		*) #(vi
9083			case $cf_add_cflags in #(vi
9084			-D*)
9085				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9086
9087CPPFLAGS=`echo "$CPPFLAGS" | \
9088	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
9089		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
9090
9091				;;
9092			esac
9093			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
9094			;;
9095		esac
9096		;;
9097	*)
9098		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
9099		;;
9100	esac
9101	;;
9102yes)
9103	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9104
9105	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9106
9107	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
9108		&& test -z "${cf_tst_cflags}" \
9109		&& cf_fix_cppflags=no
9110	;;
9111esac
9112done
9113
9114if test -n "$cf_new_cflags" ; then
9115
9116	CFLAGS="$CFLAGS $cf_new_cflags"
9117fi
9118
9119if test -n "$cf_new_cppflags" ; then
9120
9121	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
9122fi
9123
9124if test -n "$cf_new_extra_cppflags" ; then
9125
9126	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
9127fi
9128
9129	LIBS="$cf_pkgconfig_libs $LIBS"
9130	:
9131else
9132	:
9133fi
9134
9135else
9136
9137test -n "$verbose" && echo "	...before $LIBS" 1>&6
9138
9139echo "${as_me:-configure}:9139: testing ...before $LIBS ..." 1>&5
9140
9141LIBS=`echo "$LIBS" | sed -e "s/[ 	][ 	]*/ /g" -e "s,-lXt ,-lXt $X_PRE_LIBS ," -e 's/  / /g'`
9142test -n "$verbose" && echo "	...after  $LIBS" 1>&6
9143
9144echo "${as_me:-configure}:9144: testing ...after  $LIBS ..." 1>&5
9145
9146fi
9147
9148				;;
9149			esac
9150			;;
9151		esac
9152	fi
9153
9154	cf_have_X_LIBS=yes
9155
9156else
9157
9158	LDFLAGS="$X_LIBS $LDFLAGS"
9159
9160test -n "$verbose" && echo "	checking additions to CFLAGS" 1>&6
9161
9162echo "${as_me:-configure}:9162: testing checking additions to CFLAGS ..." 1>&5
9163
9164cf_check_cflags="$CFLAGS"
9165cf_check_cppflags="$CPPFLAGS"
9166
9167cf_fix_cppflags=no
9168cf_new_cflags=
9169cf_new_cppflags=
9170cf_new_extra_cppflags=
9171
9172for cf_add_cflags in $X_CFLAGS
9173do
9174case $cf_fix_cppflags in
9175no)
9176	case $cf_add_cflags in #(vi
9177	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
9178		case $cf_add_cflags in
9179		-D*)
9180			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9181
9182			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
9183				&& test -z "${cf_tst_cflags}" \
9184				&& cf_fix_cppflags=yes
9185
9186			if test $cf_fix_cppflags = yes ; then
9187				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9188				continue
9189			elif test "${cf_tst_cflags}" = "\"'" ; then
9190				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9191				continue
9192			fi
9193			;;
9194		esac
9195		case "$CPPFLAGS" in
9196		*$cf_add_cflags) #(vi
9197			;;
9198		*) #(vi
9199			case $cf_add_cflags in #(vi
9200			-D*)
9201				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9202
9203CPPFLAGS=`echo "$CPPFLAGS" | \
9204	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
9205		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
9206
9207				;;
9208			esac
9209			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
9210			;;
9211		esac
9212		;;
9213	*)
9214		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
9215		;;
9216	esac
9217	;;
9218yes)
9219	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9220
9221	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9222
9223	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
9224		&& test -z "${cf_tst_cflags}" \
9225		&& cf_fix_cppflags=no
9226	;;
9227esac
9228done
9229
9230if test -n "$cf_new_cflags" ; then
9231	test -n "$verbose" && echo "	add to \$CFLAGS $cf_new_cflags" 1>&6
9232
9233echo "${as_me:-configure}:9233: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
9234
9235	CFLAGS="$CFLAGS $cf_new_cflags"
9236fi
9237
9238if test -n "$cf_new_cppflags" ; then
9239	test -n "$verbose" && echo "	add to \$CPPFLAGS $cf_new_cppflags" 1>&6
9240
9241echo "${as_me:-configure}:9241: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
9242
9243	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
9244fi
9245
9246if test -n "$cf_new_extra_cppflags" ; then
9247	test -n "$verbose" && echo "	add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
9248
9249echo "${as_me:-configure}:9249: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
9250
9251	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
9252fi
9253
9254if test "$cf_check_cflags" != "$CFLAGS" ; then
9255cat >conftest.$ac_ext <<_ACEOF
9256#line 9256 "configure"
9257#include "confdefs.h"
9258#include <stdio.h>
9259int
9260main ()
9261{
9262printf("Hello world");
9263  ;
9264  return 0;
9265}
9266_ACEOF
9267rm -f conftest.$ac_objext conftest$ac_exeext
9268if { (eval echo "$as_me:9268: \"$ac_link\"") >&5
9269  (eval $ac_link) 2>&5
9270  ac_status=$?
9271  echo "$as_me:9271: \$? = $ac_status" >&5
9272  (exit $ac_status); } &&
9273         { ac_try='test -s conftest$ac_exeext'
9274  { (eval echo "$as_me:9274: \"$ac_try\"") >&5
9275  (eval $ac_try) 2>&5
9276  ac_status=$?
9277  echo "$as_me:9277: \$? = $ac_status" >&5
9278  (exit $ac_status); }; }; then
9279  :
9280else
9281  echo "$as_me: failed program was:" >&5
9282cat conftest.$ac_ext >&5
9283test -n "$verbose" && echo "	test-compile failed.  Undoing change to \$CFLAGS" 1>&6
9284
9285echo "${as_me:-configure}:9285: testing test-compile failed.  Undoing change to \$CFLAGS ..." 1>&5
9286
9287	 if test "$cf_check_cppflags" != "$CPPFLAGS" ; then
9288		 test -n "$verbose" && echo "	but keeping change to \$CPPFLAGS" 1>&6
9289
9290echo "${as_me:-configure}:9290: testing but keeping change to \$CPPFLAGS ..." 1>&5
9291
9292	 fi
9293	 CFLAGS="$cf_check_flags"
9294fi
9295rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9296fi
9297
9298	echo "$as_me:9298: checking for XOpenDisplay" >&5
9299echo $ECHO_N "checking for XOpenDisplay... $ECHO_C" >&6
9300if test "${ac_cv_func_XOpenDisplay+set}" = set; then
9301  echo $ECHO_N "(cached) $ECHO_C" >&6
9302else
9303  cat >conftest.$ac_ext <<_ACEOF
9304#line 9304 "configure"
9305#include "confdefs.h"
9306/* System header to define __stub macros and hopefully few prototypes,
9307    which can conflict with char XOpenDisplay (); below.  */
9308#include <assert.h>
9309/* Override any gcc2 internal prototype to avoid an error.  */
9310#ifdef __cplusplus
9311extern "C"
9312#endif
9313/* We use char because int might match the return type of a gcc2
9314   builtin and then its argument prototype would still apply.  */
9315char XOpenDisplay ();
9316char (*f) ();
9317
9318int
9319main ()
9320{
9321/* The GNU C library defines this for functions which it implements
9322    to always fail with ENOSYS.  Some functions are actually named
9323    something starting with __ and the normal name is an alias.  */
9324#if defined (__stub_XOpenDisplay) || defined (__stub___XOpenDisplay)
9325choke me
9326#else
9327f = XOpenDisplay;
9328#endif
9329
9330  ;
9331  return 0;
9332}
9333_ACEOF
9334rm -f conftest.$ac_objext conftest$ac_exeext
9335if { (eval echo "$as_me:9335: \"$ac_link\"") >&5
9336  (eval $ac_link) 2>&5
9337  ac_status=$?
9338  echo "$as_me:9338: \$? = $ac_status" >&5
9339  (exit $ac_status); } &&
9340         { ac_try='test -s conftest$ac_exeext'
9341  { (eval echo "$as_me:9341: \"$ac_try\"") >&5
9342  (eval $ac_try) 2>&5
9343  ac_status=$?
9344  echo "$as_me:9344: \$? = $ac_status" >&5
9345  (exit $ac_status); }; }; then
9346  ac_cv_func_XOpenDisplay=yes
9347else
9348  echo "$as_me: failed program was:" >&5
9349cat conftest.$ac_ext >&5
9350ac_cv_func_XOpenDisplay=no
9351fi
9352rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9353fi
9354echo "$as_me:9354: result: $ac_cv_func_XOpenDisplay" >&5
9355echo "${ECHO_T}$ac_cv_func_XOpenDisplay" >&6
9356if test $ac_cv_func_XOpenDisplay = yes; then
9357  :
9358else
9359
9360	echo "$as_me:9360: checking for XOpenDisplay in -lX11" >&5
9361echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6
9362if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then
9363  echo $ECHO_N "(cached) $ECHO_C" >&6
9364else
9365  ac_check_lib_save_LIBS=$LIBS
9366LIBS="-lX11 $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
9367cat >conftest.$ac_ext <<_ACEOF
9368#line 9368 "configure"
9369#include "confdefs.h"
9370
9371/* Override any gcc2 internal prototype to avoid an error.  */
9372#ifdef __cplusplus
9373extern "C"
9374#endif
9375/* We use char because int might match the return type of a gcc2
9376   builtin and then its argument prototype would still apply.  */
9377char XOpenDisplay ();
9378int
9379main ()
9380{
9381XOpenDisplay ();
9382  ;
9383  return 0;
9384}
9385_ACEOF
9386rm -f conftest.$ac_objext conftest$ac_exeext
9387if { (eval echo "$as_me:9387: \"$ac_link\"") >&5
9388  (eval $ac_link) 2>&5
9389  ac_status=$?
9390  echo "$as_me:9390: \$? = $ac_status" >&5
9391  (exit $ac_status); } &&
9392         { ac_try='test -s conftest$ac_exeext'
9393  { (eval echo "$as_me:9393: \"$ac_try\"") >&5
9394  (eval $ac_try) 2>&5
9395  ac_status=$?
9396  echo "$as_me:9396: \$? = $ac_status" >&5
9397  (exit $ac_status); }; }; then
9398  ac_cv_lib_X11_XOpenDisplay=yes
9399else
9400  echo "$as_me: failed program was:" >&5
9401cat conftest.$ac_ext >&5
9402ac_cv_lib_X11_XOpenDisplay=no
9403fi
9404rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9405LIBS=$ac_check_lib_save_LIBS
9406fi
9407echo "$as_me:9407: result: $ac_cv_lib_X11_XOpenDisplay" >&5
9408echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6
9409if test $ac_cv_lib_X11_XOpenDisplay = yes; then
9410  LIBS="-lX11 $LIBS"
9411fi
9412
9413fi
9414
9415	echo "$as_me:9415: checking for XtAppInitialize" >&5
9416echo $ECHO_N "checking for XtAppInitialize... $ECHO_C" >&6
9417if test "${ac_cv_func_XtAppInitialize+set}" = set; then
9418  echo $ECHO_N "(cached) $ECHO_C" >&6
9419else
9420  cat >conftest.$ac_ext <<_ACEOF
9421#line 9421 "configure"
9422#include "confdefs.h"
9423/* System header to define __stub macros and hopefully few prototypes,
9424    which can conflict with char XtAppInitialize (); below.  */
9425#include <assert.h>
9426/* Override any gcc2 internal prototype to avoid an error.  */
9427#ifdef __cplusplus
9428extern "C"
9429#endif
9430/* We use char because int might match the return type of a gcc2
9431   builtin and then its argument prototype would still apply.  */
9432char XtAppInitialize ();
9433char (*f) ();
9434
9435int
9436main ()
9437{
9438/* The GNU C library defines this for functions which it implements
9439    to always fail with ENOSYS.  Some functions are actually named
9440    something starting with __ and the normal name is an alias.  */
9441#if defined (__stub_XtAppInitialize) || defined (__stub___XtAppInitialize)
9442choke me
9443#else
9444f = XtAppInitialize;
9445#endif
9446
9447  ;
9448  return 0;
9449}
9450_ACEOF
9451rm -f conftest.$ac_objext conftest$ac_exeext
9452if { (eval echo "$as_me:9452: \"$ac_link\"") >&5
9453  (eval $ac_link) 2>&5
9454  ac_status=$?
9455  echo "$as_me:9455: \$? = $ac_status" >&5
9456  (exit $ac_status); } &&
9457         { ac_try='test -s conftest$ac_exeext'
9458  { (eval echo "$as_me:9458: \"$ac_try\"") >&5
9459  (eval $ac_try) 2>&5
9460  ac_status=$?
9461  echo "$as_me:9461: \$? = $ac_status" >&5
9462  (exit $ac_status); }; }; then
9463  ac_cv_func_XtAppInitialize=yes
9464else
9465  echo "$as_me: failed program was:" >&5
9466cat conftest.$ac_ext >&5
9467ac_cv_func_XtAppInitialize=no
9468fi
9469rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9470fi
9471echo "$as_me:9471: result: $ac_cv_func_XtAppInitialize" >&5
9472echo "${ECHO_T}$ac_cv_func_XtAppInitialize" >&6
9473if test $ac_cv_func_XtAppInitialize = yes; then
9474  :
9475else
9476
9477	echo "$as_me:9477: checking for XtAppInitialize in -lXt" >&5
9478echo $ECHO_N "checking for XtAppInitialize in -lXt... $ECHO_C" >&6
9479if test "${ac_cv_lib_Xt_XtAppInitialize+set}" = set; then
9480  echo $ECHO_N "(cached) $ECHO_C" >&6
9481else
9482  ac_check_lib_save_LIBS=$LIBS
9483LIBS="-lXt $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
9484cat >conftest.$ac_ext <<_ACEOF
9485#line 9485 "configure"
9486#include "confdefs.h"
9487
9488/* Override any gcc2 internal prototype to avoid an error.  */
9489#ifdef __cplusplus
9490extern "C"
9491#endif
9492/* We use char because int might match the return type of a gcc2
9493   builtin and then its argument prototype would still apply.  */
9494char XtAppInitialize ();
9495int
9496main ()
9497{
9498XtAppInitialize ();
9499  ;
9500  return 0;
9501}
9502_ACEOF
9503rm -f conftest.$ac_objext conftest$ac_exeext
9504if { (eval echo "$as_me:9504: \"$ac_link\"") >&5
9505  (eval $ac_link) 2>&5
9506  ac_status=$?
9507  echo "$as_me:9507: \$? = $ac_status" >&5
9508  (exit $ac_status); } &&
9509         { ac_try='test -s conftest$ac_exeext'
9510  { (eval echo "$as_me:9510: \"$ac_try\"") >&5
9511  (eval $ac_try) 2>&5
9512  ac_status=$?
9513  echo "$as_me:9513: \$? = $ac_status" >&5
9514  (exit $ac_status); }; }; then
9515  ac_cv_lib_Xt_XtAppInitialize=yes
9516else
9517  echo "$as_me: failed program was:" >&5
9518cat conftest.$ac_ext >&5
9519ac_cv_lib_Xt_XtAppInitialize=no
9520fi
9521rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9522LIBS=$ac_check_lib_save_LIBS
9523fi
9524echo "$as_me:9524: result: $ac_cv_lib_Xt_XtAppInitialize" >&5
9525echo "${ECHO_T}$ac_cv_lib_Xt_XtAppInitialize" >&6
9526if test $ac_cv_lib_Xt_XtAppInitialize = yes; then
9527  cat >>confdefs.h <<\EOF
9528#define HAVE_LIBXT 1
9529EOF
9530
9531		 cf_have_X_LIBS=Xt
9532		 LIBS="-lXt $X_PRE_LIBS $LIBS $X_EXTRA_LIBS"
9533fi
9534
9535fi
9536
9537fi
9538
9539if test $cf_have_X_LIBS = no ; then
9540	{ echo "$as_me:9540: WARNING: Unable to successfully link X Toolkit library (-lXt) with
9541test program.  You will have to check and add the proper libraries by hand
9542to makefile." >&5
9543echo "$as_me: WARNING: Unable to successfully link X Toolkit library (-lXt) with
9544test program.  You will have to check and add the proper libraries by hand
9545to makefile." >&2;}
9546fi
9547
9548for ac_header in \
9549	X11/DECkeysym.h \
9550	X11/Sunkeysym.h \
9551	X11/XF86keysym.h \
9552	X11/XKBlib.h \
9553	X11/Xpoll.h \
9554	X11/extensions/XKB.h \
9555
9556do
9557as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9558echo "$as_me:9558: checking for $ac_header" >&5
9559echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9560if eval "test \"\${$as_ac_Header+set}\" = set"; then
9561  echo $ECHO_N "(cached) $ECHO_C" >&6
9562else
9563  cat >conftest.$ac_ext <<_ACEOF
9564#line 9564 "configure"
9565#include "confdefs.h"
9566#include <$ac_header>
9567_ACEOF
9568if { (eval echo "$as_me:9568: \"$ac_cpp conftest.$ac_ext\"") >&5
9569  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9570  ac_status=$?
9571  egrep -v '^ *\+' conftest.er1 >conftest.err
9572  rm -f conftest.er1
9573  cat conftest.err >&5
9574  echo "$as_me:9574: \$? = $ac_status" >&5
9575  (exit $ac_status); } >/dev/null; then
9576  if test -s conftest.err; then
9577    ac_cpp_err=$ac_c_preproc_warn_flag
9578  else
9579    ac_cpp_err=
9580  fi
9581else
9582  ac_cpp_err=yes
9583fi
9584if test -z "$ac_cpp_err"; then
9585  eval "$as_ac_Header=yes"
9586else
9587  echo "$as_me: failed program was:" >&5
9588  cat conftest.$ac_ext >&5
9589  eval "$as_ac_Header=no"
9590fi
9591rm -f conftest.err conftest.$ac_ext
9592fi
9593echo "$as_me:9593: result: `eval echo '${'$as_ac_Header'}'`" >&5
9594echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9595if test `eval echo '${'$as_ac_Header'}'` = yes; then
9596  cat >>confdefs.h <<EOF
9597#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9598EOF
9599
9600fi
9601done
9602
9603cf_x_athena=${cf_x_athena:-Xaw}
9604
9605echo "$as_me:9605: checking if you want to link with Xaw 3d library" >&5
9606echo $ECHO_N "checking if you want to link with Xaw 3d library... $ECHO_C" >&6
9607withval=
9608
9609# Check whether --with-Xaw3d or --without-Xaw3d was given.
9610if test "${with_Xaw3d+set}" = set; then
9611  withval="$with_Xaw3d"
9612
9613fi;
9614if test "$withval" = yes ; then
9615	cf_x_athena=Xaw3d
9616	echo "$as_me:9616: result: yes" >&5
9617echo "${ECHO_T}yes" >&6
9618else
9619	echo "$as_me:9619: result: no" >&5
9620echo "${ECHO_T}no" >&6
9621fi
9622
9623echo "$as_me:9623: checking if you want to link with neXT Athena library" >&5
9624echo $ECHO_N "checking if you want to link with neXT Athena library... $ECHO_C" >&6
9625withval=
9626
9627# Check whether --with-neXtaw or --without-neXtaw was given.
9628if test "${with_neXtaw+set}" = set; then
9629  withval="$with_neXtaw"
9630
9631fi;
9632if test "$withval" = yes ; then
9633	cf_x_athena=neXtaw
9634	echo "$as_me:9634: result: yes" >&5
9635echo "${ECHO_T}yes" >&6
9636else
9637	echo "$as_me:9637: result: no" >&5
9638echo "${ECHO_T}no" >&6
9639fi
9640
9641echo "$as_me:9641: checking if you want to link with Athena-Plus library" >&5
9642echo $ECHO_N "checking if you want to link with Athena-Plus library... $ECHO_C" >&6
9643withval=
9644
9645# Check whether --with-XawPlus or --without-XawPlus was given.
9646if test "${with_XawPlus+set}" = set; then
9647  withval="$with_XawPlus"
9648
9649fi;
9650if test "$withval" = yes ; then
9651	cf_x_athena=XawPlus
9652	echo "$as_me:9652: result: yes" >&5
9653echo "${ECHO_T}yes" >&6
9654else
9655	echo "$as_me:9655: result: no" >&5
9656echo "${ECHO_T}no" >&6
9657fi
9658
9659cf_x_athena_lib=""
9660
9661if test "$PKG_CONFIG" != none ; then
9662	cf_athena_list=
9663	test "$cf_x_athena" = Xaw && cf_athena_list="xaw8 xaw7 xaw6"
9664	for cf_athena_pkg in \
9665		$cf_athena_list \
9666		${cf_x_athena} \
9667		${cf_x_athena}-devel \
9668		lib${cf_x_athena} \
9669		lib${cf_x_athena}-devel
9670	do
9671
9672if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists $cf_athena_pkg; then
9673	test -n "$verbose" && echo "	found package $cf_athena_pkg" 1>&6
9674
9675echo "${as_me:-configure}:9675: testing found package $cf_athena_pkg ..." 1>&5
9676
9677	cf_pkgconfig_incs="`$PKG_CONFIG --cflags $cf_athena_pkg 2>/dev/null`"
9678	cf_pkgconfig_libs="`$PKG_CONFIG --libs   $cf_athena_pkg 2>/dev/null`"
9679	test -n "$verbose" && echo "	package $cf_athena_pkg CFLAGS: $cf_pkgconfig_incs" 1>&6
9680
9681echo "${as_me:-configure}:9681: testing package $cf_athena_pkg CFLAGS: $cf_pkgconfig_incs ..." 1>&5
9682
9683	test -n "$verbose" && echo "	package $cf_athena_pkg LIBS: $cf_pkgconfig_libs" 1>&6
9684
9685echo "${as_me:-configure}:9685: testing package $cf_athena_pkg LIBS: $cf_pkgconfig_libs ..." 1>&5
9686
9687cf_fix_cppflags=no
9688cf_new_cflags=
9689cf_new_cppflags=
9690cf_new_extra_cppflags=
9691
9692for cf_add_cflags in $cf_pkgconfig_incs
9693do
9694case $cf_fix_cppflags in
9695no)
9696	case $cf_add_cflags in #(vi
9697	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
9698		case $cf_add_cflags in
9699		-D*)
9700			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9701
9702			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
9703				&& test -z "${cf_tst_cflags}" \
9704				&& cf_fix_cppflags=yes
9705
9706			if test $cf_fix_cppflags = yes ; then
9707				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9708				continue
9709			elif test "${cf_tst_cflags}" = "\"'" ; then
9710				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9711				continue
9712			fi
9713			;;
9714		esac
9715		case "$CPPFLAGS" in
9716		*$cf_add_cflags) #(vi
9717			;;
9718		*) #(vi
9719			case $cf_add_cflags in #(vi
9720			-D*)
9721				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9722
9723CPPFLAGS=`echo "$CPPFLAGS" | \
9724	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
9725		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
9726
9727				;;
9728			esac
9729			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
9730			;;
9731		esac
9732		;;
9733	*)
9734		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
9735		;;
9736	esac
9737	;;
9738yes)
9739	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9740
9741	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9742
9743	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
9744		&& test -z "${cf_tst_cflags}" \
9745		&& cf_fix_cppflags=no
9746	;;
9747esac
9748done
9749
9750if test -n "$cf_new_cflags" ; then
9751
9752	CFLAGS="$CFLAGS $cf_new_cflags"
9753fi
9754
9755if test -n "$cf_new_cppflags" ; then
9756
9757	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
9758fi
9759
9760if test -n "$cf_new_extra_cppflags" ; then
9761
9762	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
9763fi
9764
9765	LIBS="$cf_pkgconfig_libs $LIBS"
9766
9767			cf_x_athena_lib="$cf_pkgconfig_libs"
9768
9769cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9770
9771			cat >>confdefs.h <<EOF
9772#define $cf_x_athena_LIBS 1
9773EOF
9774
9775echo "$as_me:9775: checking for usable $cf_x_athena/Xmu package" >&5
9776echo $ECHO_N "checking for usable $cf_x_athena/Xmu package... $ECHO_C" >&6
9777if test "${cf_cv_xaw_compat+set}" = set; then
9778  echo $ECHO_N "(cached) $ECHO_C" >&6
9779else
9780
9781cat >conftest.$ac_ext <<_ACEOF
9782#line 9782 "configure"
9783#include "confdefs.h"
9784
9785#include <X11/Xmu/CharSet.h>
9786
9787int
9788main ()
9789{
9790
9791int check = XmuCompareISOLatin1("big", "small")
9792
9793  ;
9794  return 0;
9795}
9796_ACEOF
9797rm -f conftest.$ac_objext conftest$ac_exeext
9798if { (eval echo "$as_me:9798: \"$ac_link\"") >&5
9799  (eval $ac_link) 2>&5
9800  ac_status=$?
9801  echo "$as_me:9801: \$? = $ac_status" >&5
9802  (exit $ac_status); } &&
9803         { ac_try='test -s conftest$ac_exeext'
9804  { (eval echo "$as_me:9804: \"$ac_try\"") >&5
9805  (eval $ac_try) 2>&5
9806  ac_status=$?
9807  echo "$as_me:9807: \$? = $ac_status" >&5
9808  (exit $ac_status); }; }; then
9809  cf_cv_xaw_compat=yes
9810else
9811  echo "$as_me: failed program was:" >&5
9812cat conftest.$ac_ext >&5
9813cf_cv_xaw_compat=no
9814fi
9815rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9816fi
9817echo "$as_me:9817: result: $cf_cv_xaw_compat" >&5
9818echo "${ECHO_T}$cf_cv_xaw_compat" >&6
9819
9820			if test "$cf_cv_xaw_compat" = no
9821			then
9822				# workaround for broken ".pc" files...
9823				case "$cf_x_athena_lib" in #(vi
9824				*-lXmu*) #(vi
9825					;;
9826				*)
9827					test -n "$verbose" && echo "	work around broken package" 1>&6
9828
9829echo "${as_me:-configure}:9829: testing work around broken package ..." 1>&5
9830
9831if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xmu; then
9832	test -n "$verbose" && echo "	found package xmu" 1>&6
9833
9834echo "${as_me:-configure}:9834: testing found package xmu ..." 1>&5
9835
9836	cf_pkgconfig_incs="`$PKG_CONFIG --cflags xmu 2>/dev/null`"
9837	cf_pkgconfig_libs="`$PKG_CONFIG --libs   xmu 2>/dev/null`"
9838	test -n "$verbose" && echo "	package xmu CFLAGS: $cf_pkgconfig_incs" 1>&6
9839
9840echo "${as_me:-configure}:9840: testing package xmu CFLAGS: $cf_pkgconfig_incs ..." 1>&5
9841
9842	test -n "$verbose" && echo "	package xmu LIBS: $cf_pkgconfig_libs" 1>&6
9843
9844echo "${as_me:-configure}:9844: testing package xmu LIBS: $cf_pkgconfig_libs ..." 1>&5
9845
9846cf_fix_cppflags=no
9847cf_new_cflags=
9848cf_new_cppflags=
9849cf_new_extra_cppflags=
9850
9851for cf_add_cflags in $cf_pkgconfig_incs
9852do
9853case $cf_fix_cppflags in
9854no)
9855	case $cf_add_cflags in #(vi
9856	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
9857		case $cf_add_cflags in
9858		-D*)
9859			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9860
9861			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
9862				&& test -z "${cf_tst_cflags}" \
9863				&& cf_fix_cppflags=yes
9864
9865			if test $cf_fix_cppflags = yes ; then
9866				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9867				continue
9868			elif test "${cf_tst_cflags}" = "\"'" ; then
9869				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9870				continue
9871			fi
9872			;;
9873		esac
9874		case "$CPPFLAGS" in
9875		*$cf_add_cflags) #(vi
9876			;;
9877		*) #(vi
9878			case $cf_add_cflags in #(vi
9879			-D*)
9880				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9881
9882CPPFLAGS=`echo "$CPPFLAGS" | \
9883	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
9884		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
9885
9886				;;
9887			esac
9888			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
9889			;;
9890		esac
9891		;;
9892	*)
9893		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
9894		;;
9895	esac
9896	;;
9897yes)
9898	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9899
9900	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9901
9902	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
9903		&& test -z "${cf_tst_cflags}" \
9904		&& cf_fix_cppflags=no
9905	;;
9906esac
9907done
9908
9909if test -n "$cf_new_cflags" ; then
9910
9911	CFLAGS="$CFLAGS $cf_new_cflags"
9912fi
9913
9914if test -n "$cf_new_cppflags" ; then
9915
9916	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
9917fi
9918
9919if test -n "$cf_new_extra_cppflags" ; then
9920
9921	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
9922fi
9923
9924	LIBS="$cf_pkgconfig_libs $LIBS"
9925	:
9926else
9927
9928test -n "$verbose" && echo "	...before $LIBS" 1>&6
9929
9930echo "${as_me:-configure}:9930: testing ...before $LIBS ..." 1>&5
9931
9932LIBS=`echo "$LIBS" | sed -e "s/[ 	][ 	]*/ /g" -e "s,-lXt ,-lXt -lXmu ," -e 's/  / /g'`
9933test -n "$verbose" && echo "	...after  $LIBS" 1>&6
9934
9935echo "${as_me:-configure}:9935: testing ...after  $LIBS ..." 1>&5
9936
9937fi
9938
9939					;;
9940				esac
9941			fi
9942
9943			break
9944else
9945	:
9946fi
9947
9948	done
9949fi
9950
9951if test -z "$cf_x_athena_lib" ; then
9952
9953if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists Xext; then
9954	test -n "$verbose" && echo "	found package Xext" 1>&6
9955
9956echo "${as_me:-configure}:9956: testing found package Xext ..." 1>&5
9957
9958	cf_pkgconfig_incs="`$PKG_CONFIG --cflags Xext 2>/dev/null`"
9959	cf_pkgconfig_libs="`$PKG_CONFIG --libs   Xext 2>/dev/null`"
9960	test -n "$verbose" && echo "	package Xext CFLAGS: $cf_pkgconfig_incs" 1>&6
9961
9962echo "${as_me:-configure}:9962: testing package Xext CFLAGS: $cf_pkgconfig_incs ..." 1>&5
9963
9964	test -n "$verbose" && echo "	package Xext LIBS: $cf_pkgconfig_libs" 1>&6
9965
9966echo "${as_me:-configure}:9966: testing package Xext LIBS: $cf_pkgconfig_libs ..." 1>&5
9967
9968cf_fix_cppflags=no
9969cf_new_cflags=
9970cf_new_cppflags=
9971cf_new_extra_cppflags=
9972
9973for cf_add_cflags in $cf_pkgconfig_incs
9974do
9975case $cf_fix_cppflags in
9976no)
9977	case $cf_add_cflags in #(vi
9978	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
9979		case $cf_add_cflags in
9980		-D*)
9981			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9982
9983			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
9984				&& test -z "${cf_tst_cflags}" \
9985				&& cf_fix_cppflags=yes
9986
9987			if test $cf_fix_cppflags = yes ; then
9988				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9989				continue
9990			elif test "${cf_tst_cflags}" = "\"'" ; then
9991				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9992				continue
9993			fi
9994			;;
9995		esac
9996		case "$CPPFLAGS" in
9997		*$cf_add_cflags) #(vi
9998			;;
9999		*) #(vi
10000			case $cf_add_cflags in #(vi
10001			-D*)
10002				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10003
10004CPPFLAGS=`echo "$CPPFLAGS" | \
10005	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
10006		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
10007
10008				;;
10009			esac
10010			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10011			;;
10012		esac
10013		;;
10014	*)
10015		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10016		;;
10017	esac
10018	;;
10019yes)
10020	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10021
10022	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10023
10024	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10025		&& test -z "${cf_tst_cflags}" \
10026		&& cf_fix_cppflags=no
10027	;;
10028esac
10029done
10030
10031if test -n "$cf_new_cflags" ; then
10032
10033	CFLAGS="$CFLAGS $cf_new_cflags"
10034fi
10035
10036if test -n "$cf_new_cppflags" ; then
10037
10038	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
10039fi
10040
10041if test -n "$cf_new_extra_cppflags" ; then
10042
10043	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10044fi
10045
10046	LIBS="$cf_pkgconfig_libs $LIBS"
10047	:
10048else
10049
10050	echo "$as_me:10050: checking for XextCreateExtension in -lXext" >&5
10051echo $ECHO_N "checking for XextCreateExtension in -lXext... $ECHO_C" >&6
10052if test "${ac_cv_lib_Xext_XextCreateExtension+set}" = set; then
10053  echo $ECHO_N "(cached) $ECHO_C" >&6
10054else
10055  ac_check_lib_save_LIBS=$LIBS
10056LIBS="-lXext  $LIBS"
10057cat >conftest.$ac_ext <<_ACEOF
10058#line 10058 "configure"
10059#include "confdefs.h"
10060
10061/* Override any gcc2 internal prototype to avoid an error.  */
10062#ifdef __cplusplus
10063extern "C"
10064#endif
10065/* We use char because int might match the return type of a gcc2
10066   builtin and then its argument prototype would still apply.  */
10067char XextCreateExtension ();
10068int
10069main ()
10070{
10071XextCreateExtension ();
10072  ;
10073  return 0;
10074}
10075_ACEOF
10076rm -f conftest.$ac_objext conftest$ac_exeext
10077if { (eval echo "$as_me:10077: \"$ac_link\"") >&5
10078  (eval $ac_link) 2>&5
10079  ac_status=$?
10080  echo "$as_me:10080: \$? = $ac_status" >&5
10081  (exit $ac_status); } &&
10082         { ac_try='test -s conftest$ac_exeext'
10083  { (eval echo "$as_me:10083: \"$ac_try\"") >&5
10084  (eval $ac_try) 2>&5
10085  ac_status=$?
10086  echo "$as_me:10086: \$? = $ac_status" >&5
10087  (exit $ac_status); }; }; then
10088  ac_cv_lib_Xext_XextCreateExtension=yes
10089else
10090  echo "$as_me: failed program was:" >&5
10091cat conftest.$ac_ext >&5
10092ac_cv_lib_Xext_XextCreateExtension=no
10093fi
10094rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10095LIBS=$ac_check_lib_save_LIBS
10096fi
10097echo "$as_me:10097: result: $ac_cv_lib_Xext_XextCreateExtension" >&5
10098echo "${ECHO_T}$ac_cv_lib_Xext_XextCreateExtension" >&6
10099if test $ac_cv_lib_Xext_XextCreateExtension = yes; then
10100  LIBS="-lXext $LIBS"
10101fi
10102
10103fi
10104
10105cf_have_X_LIBS=no
10106
10107if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xt; then
10108	test -n "$verbose" && echo "	found package xt" 1>&6
10109
10110echo "${as_me:-configure}:10110: testing found package xt ..." 1>&5
10111
10112	cf_pkgconfig_incs="`$PKG_CONFIG --cflags xt 2>/dev/null`"
10113	cf_pkgconfig_libs="`$PKG_CONFIG --libs   xt 2>/dev/null`"
10114	test -n "$verbose" && echo "	package xt CFLAGS: $cf_pkgconfig_incs" 1>&6
10115
10116echo "${as_me:-configure}:10116: testing package xt CFLAGS: $cf_pkgconfig_incs ..." 1>&5
10117
10118	test -n "$verbose" && echo "	package xt LIBS: $cf_pkgconfig_libs" 1>&6
10119
10120echo "${as_me:-configure}:10120: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5
10121
10122cf_fix_cppflags=no
10123cf_new_cflags=
10124cf_new_cppflags=
10125cf_new_extra_cppflags=
10126
10127for cf_add_cflags in $cf_pkgconfig_incs
10128do
10129case $cf_fix_cppflags in
10130no)
10131	case $cf_add_cflags in #(vi
10132	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
10133		case $cf_add_cflags in
10134		-D*)
10135			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10136
10137			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10138				&& test -z "${cf_tst_cflags}" \
10139				&& cf_fix_cppflags=yes
10140
10141			if test $cf_fix_cppflags = yes ; then
10142				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10143				continue
10144			elif test "${cf_tst_cflags}" = "\"'" ; then
10145				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10146				continue
10147			fi
10148			;;
10149		esac
10150		case "$CPPFLAGS" in
10151		*$cf_add_cflags) #(vi
10152			;;
10153		*) #(vi
10154			case $cf_add_cflags in #(vi
10155			-D*)
10156				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10157
10158CPPFLAGS=`echo "$CPPFLAGS" | \
10159	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
10160		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
10161
10162				;;
10163			esac
10164			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10165			;;
10166		esac
10167		;;
10168	*)
10169		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10170		;;
10171	esac
10172	;;
10173yes)
10174	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10175
10176	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10177
10178	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10179		&& test -z "${cf_tst_cflags}" \
10180		&& cf_fix_cppflags=no
10181	;;
10182esac
10183done
10184
10185if test -n "$cf_new_cflags" ; then
10186
10187	CFLAGS="$CFLAGS $cf_new_cflags"
10188fi
10189
10190if test -n "$cf_new_cppflags" ; then
10191
10192	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
10193fi
10194
10195if test -n "$cf_new_extra_cppflags" ; then
10196
10197	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10198fi
10199
10200	LIBS="$cf_pkgconfig_libs $LIBS"
10201
10202	case "x$LIBS" in #(vi
10203	*-lX11*) #(vi
10204		;;
10205	*)
10206# we have an "xt" package, but it may omit Xt's dependency on X11
10207echo "$as_me:10207: checking for usable X dependency" >&5
10208echo $ECHO_N "checking for usable X dependency... $ECHO_C" >&6
10209if test "${cf_cv_xt_x11_compat+set}" = set; then
10210  echo $ECHO_N "(cached) $ECHO_C" >&6
10211else
10212
10213cat >conftest.$ac_ext <<_ACEOF
10214#line 10214 "configure"
10215#include "confdefs.h"
10216
10217#include <X11/Xlib.h>
10218
10219int
10220main ()
10221{
10222
10223	int rc1 = XDrawLine((Display*) 0, (Drawable) 0, (GC) 0, 0, 0, 0, 0);
10224	int rc2 = XClearWindow((Display*) 0, (Window) 0);
10225	int rc3 = XMoveWindow((Display*) 0, (Window) 0, 0, 0);
10226	int rc4 = XMoveResizeWindow((Display*)0, (Window)0, 0, 0, 0, 0);
10227
10228  ;
10229  return 0;
10230}
10231_ACEOF
10232rm -f conftest.$ac_objext conftest$ac_exeext
10233if { (eval echo "$as_me:10233: \"$ac_link\"") >&5
10234  (eval $ac_link) 2>&5
10235  ac_status=$?
10236  echo "$as_me:10236: \$? = $ac_status" >&5
10237  (exit $ac_status); } &&
10238         { ac_try='test -s conftest$ac_exeext'
10239  { (eval echo "$as_me:10239: \"$ac_try\"") >&5
10240  (eval $ac_try) 2>&5
10241  ac_status=$?
10242  echo "$as_me:10242: \$? = $ac_status" >&5
10243  (exit $ac_status); }; }; then
10244  cf_cv_xt_x11_compat=yes
10245else
10246  echo "$as_me: failed program was:" >&5
10247cat conftest.$ac_ext >&5
10248cf_cv_xt_x11_compat=no
10249fi
10250rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10251fi
10252echo "$as_me:10252: result: $cf_cv_xt_x11_compat" >&5
10253echo "${ECHO_T}$cf_cv_xt_x11_compat" >&6
10254		if test "$cf_cv_xt_x11_compat" = no
10255		then
10256			test -n "$verbose" && echo "	work around broken X11 dependency" 1>&6
10257
10258echo "${as_me:-configure}:10258: testing work around broken X11 dependency ..." 1>&5
10259
10260			# 2010/11/19 - good enough until a working Xt on Xcb is delivered.
10261
10262if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists x11; then
10263	test -n "$verbose" && echo "	found package x11" 1>&6
10264
10265echo "${as_me:-configure}:10265: testing found package x11 ..." 1>&5
10266
10267	cf_pkgconfig_incs="`$PKG_CONFIG --cflags x11 2>/dev/null`"
10268	cf_pkgconfig_libs="`$PKG_CONFIG --libs   x11 2>/dev/null`"
10269	test -n "$verbose" && echo "	package x11 CFLAGS: $cf_pkgconfig_incs" 1>&6
10270
10271echo "${as_me:-configure}:10271: testing package x11 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
10272
10273	test -n "$verbose" && echo "	package x11 LIBS: $cf_pkgconfig_libs" 1>&6
10274
10275echo "${as_me:-configure}:10275: testing package x11 LIBS: $cf_pkgconfig_libs ..." 1>&5
10276
10277cf_fix_cppflags=no
10278cf_new_cflags=
10279cf_new_cppflags=
10280cf_new_extra_cppflags=
10281
10282for cf_add_cflags in $cf_pkgconfig_incs
10283do
10284case $cf_fix_cppflags in
10285no)
10286	case $cf_add_cflags in #(vi
10287	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
10288		case $cf_add_cflags in
10289		-D*)
10290			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10291
10292			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10293				&& test -z "${cf_tst_cflags}" \
10294				&& cf_fix_cppflags=yes
10295
10296			if test $cf_fix_cppflags = yes ; then
10297				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10298				continue
10299			elif test "${cf_tst_cflags}" = "\"'" ; then
10300				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10301				continue
10302			fi
10303			;;
10304		esac
10305		case "$CPPFLAGS" in
10306		*$cf_add_cflags) #(vi
10307			;;
10308		*) #(vi
10309			case $cf_add_cflags in #(vi
10310			-D*)
10311				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10312
10313CPPFLAGS=`echo "$CPPFLAGS" | \
10314	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
10315		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
10316
10317				;;
10318			esac
10319			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10320			;;
10321		esac
10322		;;
10323	*)
10324		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10325		;;
10326	esac
10327	;;
10328yes)
10329	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10330
10331	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10332
10333	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10334		&& test -z "${cf_tst_cflags}" \
10335		&& cf_fix_cppflags=no
10336	;;
10337esac
10338done
10339
10340if test -n "$cf_new_cflags" ; then
10341
10342	CFLAGS="$CFLAGS $cf_new_cflags"
10343fi
10344
10345if test -n "$cf_new_cppflags" ; then
10346
10347	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
10348fi
10349
10350if test -n "$cf_new_extra_cppflags" ; then
10351
10352	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10353fi
10354
10355	LIBS="$cf_pkgconfig_libs $LIBS"
10356	:
10357else
10358
10359test -n "$verbose" && echo "	...before $LIBS" 1>&6
10360
10361echo "${as_me:-configure}:10361: testing ...before $LIBS ..." 1>&5
10362
10363LIBS=`echo "$LIBS" | sed -e "s/[ 	][ 	]*/ /g" -e "s,-lXt ,-lXt -lX11 ," -e 's/  / /g'`
10364test -n "$verbose" && echo "	...after  $LIBS" 1>&6
10365
10366echo "${as_me:-configure}:10366: testing ...after  $LIBS ..." 1>&5
10367
10368fi
10369
10370		fi
10371		;;
10372	esac
10373
10374echo "$as_me:10374: checking for usable X Toolkit package" >&5
10375echo $ECHO_N "checking for usable X Toolkit package... $ECHO_C" >&6
10376if test "${cf_cv_xt_ice_compat+set}" = set; then
10377  echo $ECHO_N "(cached) $ECHO_C" >&6
10378else
10379
10380cat >conftest.$ac_ext <<_ACEOF
10381#line 10381 "configure"
10382#include "confdefs.h"
10383
10384#include <X11/Shell.h>
10385
10386int
10387main ()
10388{
10389int num = IceConnectionNumber(0)
10390
10391  ;
10392  return 0;
10393}
10394_ACEOF
10395rm -f conftest.$ac_objext conftest$ac_exeext
10396if { (eval echo "$as_me:10396: \"$ac_link\"") >&5
10397  (eval $ac_link) 2>&5
10398  ac_status=$?
10399  echo "$as_me:10399: \$? = $ac_status" >&5
10400  (exit $ac_status); } &&
10401         { ac_try='test -s conftest$ac_exeext'
10402  { (eval echo "$as_me:10402: \"$ac_try\"") >&5
10403  (eval $ac_try) 2>&5
10404  ac_status=$?
10405  echo "$as_me:10405: \$? = $ac_status" >&5
10406  (exit $ac_status); }; }; then
10407  cf_cv_xt_ice_compat=yes
10408else
10409  echo "$as_me: failed program was:" >&5
10410cat conftest.$ac_ext >&5
10411cf_cv_xt_ice_compat=no
10412fi
10413rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10414fi
10415echo "$as_me:10415: result: $cf_cv_xt_ice_compat" >&5
10416echo "${ECHO_T}$cf_cv_xt_ice_compat" >&6
10417
10418	if test "$cf_cv_xt_ice_compat" = no
10419	then
10420		# workaround for broken ".pc" files used for X Toolkit.
10421		case "x$X_PRE_LIBS" in #(vi
10422		*-lICE*)
10423			case "x$LIBS" in #(vi
10424			*-lICE*) #(vi
10425				;;
10426			*)
10427				test -n "$verbose" && echo "	work around broken ICE dependency" 1>&6
10428
10429echo "${as_me:-configure}:10429: testing work around broken ICE dependency ..." 1>&5
10430
10431if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists ice; then
10432	test -n "$verbose" && echo "	found package ice" 1>&6
10433
10434echo "${as_me:-configure}:10434: testing found package ice ..." 1>&5
10435
10436	cf_pkgconfig_incs="`$PKG_CONFIG --cflags ice 2>/dev/null`"
10437	cf_pkgconfig_libs="`$PKG_CONFIG --libs   ice 2>/dev/null`"
10438	test -n "$verbose" && echo "	package ice CFLAGS: $cf_pkgconfig_incs" 1>&6
10439
10440echo "${as_me:-configure}:10440: testing package ice CFLAGS: $cf_pkgconfig_incs ..." 1>&5
10441
10442	test -n "$verbose" && echo "	package ice LIBS: $cf_pkgconfig_libs" 1>&6
10443
10444echo "${as_me:-configure}:10444: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5
10445
10446cf_fix_cppflags=no
10447cf_new_cflags=
10448cf_new_cppflags=
10449cf_new_extra_cppflags=
10450
10451for cf_add_cflags in $cf_pkgconfig_incs
10452do
10453case $cf_fix_cppflags in
10454no)
10455	case $cf_add_cflags in #(vi
10456	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
10457		case $cf_add_cflags in
10458		-D*)
10459			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10460
10461			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10462				&& test -z "${cf_tst_cflags}" \
10463				&& cf_fix_cppflags=yes
10464
10465			if test $cf_fix_cppflags = yes ; then
10466				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10467				continue
10468			elif test "${cf_tst_cflags}" = "\"'" ; then
10469				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10470				continue
10471			fi
10472			;;
10473		esac
10474		case "$CPPFLAGS" in
10475		*$cf_add_cflags) #(vi
10476			;;
10477		*) #(vi
10478			case $cf_add_cflags in #(vi
10479			-D*)
10480				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10481
10482CPPFLAGS=`echo "$CPPFLAGS" | \
10483	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
10484		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
10485
10486				;;
10487			esac
10488			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10489			;;
10490		esac
10491		;;
10492	*)
10493		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10494		;;
10495	esac
10496	;;
10497yes)
10498	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10499
10500	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10501
10502	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10503		&& test -z "${cf_tst_cflags}" \
10504		&& cf_fix_cppflags=no
10505	;;
10506esac
10507done
10508
10509if test -n "$cf_new_cflags" ; then
10510
10511	CFLAGS="$CFLAGS $cf_new_cflags"
10512fi
10513
10514if test -n "$cf_new_cppflags" ; then
10515
10516	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
10517fi
10518
10519if test -n "$cf_new_extra_cppflags" ; then
10520
10521	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10522fi
10523
10524	LIBS="$cf_pkgconfig_libs $LIBS"
10525
10526if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists sm; then
10527	test -n "$verbose" && echo "	found package sm" 1>&6
10528
10529echo "${as_me:-configure}:10529: testing found package sm ..." 1>&5
10530
10531	cf_pkgconfig_incs="`$PKG_CONFIG --cflags sm 2>/dev/null`"
10532	cf_pkgconfig_libs="`$PKG_CONFIG --libs   sm 2>/dev/null`"
10533	test -n "$verbose" && echo "	package sm CFLAGS: $cf_pkgconfig_incs" 1>&6
10534
10535echo "${as_me:-configure}:10535: testing package sm CFLAGS: $cf_pkgconfig_incs ..." 1>&5
10536
10537	test -n "$verbose" && echo "	package sm LIBS: $cf_pkgconfig_libs" 1>&6
10538
10539echo "${as_me:-configure}:10539: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5
10540
10541cf_fix_cppflags=no
10542cf_new_cflags=
10543cf_new_cppflags=
10544cf_new_extra_cppflags=
10545
10546for cf_add_cflags in $cf_pkgconfig_incs
10547do
10548case $cf_fix_cppflags in
10549no)
10550	case $cf_add_cflags in #(vi
10551	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
10552		case $cf_add_cflags in
10553		-D*)
10554			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10555
10556			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10557				&& test -z "${cf_tst_cflags}" \
10558				&& cf_fix_cppflags=yes
10559
10560			if test $cf_fix_cppflags = yes ; then
10561				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10562				continue
10563			elif test "${cf_tst_cflags}" = "\"'" ; then
10564				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10565				continue
10566			fi
10567			;;
10568		esac
10569		case "$CPPFLAGS" in
10570		*$cf_add_cflags) #(vi
10571			;;
10572		*) #(vi
10573			case $cf_add_cflags in #(vi
10574			-D*)
10575				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10576
10577CPPFLAGS=`echo "$CPPFLAGS" | \
10578	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
10579		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
10580
10581				;;
10582			esac
10583			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10584			;;
10585		esac
10586		;;
10587	*)
10588		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10589		;;
10590	esac
10591	;;
10592yes)
10593	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10594
10595	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10596
10597	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10598		&& test -z "${cf_tst_cflags}" \
10599		&& cf_fix_cppflags=no
10600	;;
10601esac
10602done
10603
10604if test -n "$cf_new_cflags" ; then
10605
10606	CFLAGS="$CFLAGS $cf_new_cflags"
10607fi
10608
10609if test -n "$cf_new_cppflags" ; then
10610
10611	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
10612fi
10613
10614if test -n "$cf_new_extra_cppflags" ; then
10615
10616	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10617fi
10618
10619	LIBS="$cf_pkgconfig_libs $LIBS"
10620	:
10621else
10622	:
10623fi
10624
10625else
10626
10627test -n "$verbose" && echo "	...before $LIBS" 1>&6
10628
10629echo "${as_me:-configure}:10629: testing ...before $LIBS ..." 1>&5
10630
10631LIBS=`echo "$LIBS" | sed -e "s/[ 	][ 	]*/ /g" -e "s,-lXt ,-lXt $X_PRE_LIBS ," -e 's/  / /g'`
10632test -n "$verbose" && echo "	...after  $LIBS" 1>&6
10633
10634echo "${as_me:-configure}:10634: testing ...after  $LIBS ..." 1>&5
10635
10636fi
10637
10638				;;
10639			esac
10640			;;
10641		esac
10642	fi
10643
10644	cf_have_X_LIBS=yes
10645
10646else
10647
10648	LDFLAGS="$X_LIBS $LDFLAGS"
10649
10650test -n "$verbose" && echo "	checking additions to CFLAGS" 1>&6
10651
10652echo "${as_me:-configure}:10652: testing checking additions to CFLAGS ..." 1>&5
10653
10654cf_check_cflags="$CFLAGS"
10655cf_check_cppflags="$CPPFLAGS"
10656
10657cf_fix_cppflags=no
10658cf_new_cflags=
10659cf_new_cppflags=
10660cf_new_extra_cppflags=
10661
10662for cf_add_cflags in $X_CFLAGS
10663do
10664case $cf_fix_cppflags in
10665no)
10666	case $cf_add_cflags in #(vi
10667	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
10668		case $cf_add_cflags in
10669		-D*)
10670			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10671
10672			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10673				&& test -z "${cf_tst_cflags}" \
10674				&& cf_fix_cppflags=yes
10675
10676			if test $cf_fix_cppflags = yes ; then
10677				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10678				continue
10679			elif test "${cf_tst_cflags}" = "\"'" ; then
10680				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10681				continue
10682			fi
10683			;;
10684		esac
10685		case "$CPPFLAGS" in
10686		*$cf_add_cflags) #(vi
10687			;;
10688		*) #(vi
10689			case $cf_add_cflags in #(vi
10690			-D*)
10691				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10692
10693CPPFLAGS=`echo "$CPPFLAGS" | \
10694	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
10695		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
10696
10697				;;
10698			esac
10699			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10700			;;
10701		esac
10702		;;
10703	*)
10704		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10705		;;
10706	esac
10707	;;
10708yes)
10709	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10710
10711	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10712
10713	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10714		&& test -z "${cf_tst_cflags}" \
10715		&& cf_fix_cppflags=no
10716	;;
10717esac
10718done
10719
10720if test -n "$cf_new_cflags" ; then
10721	test -n "$verbose" && echo "	add to \$CFLAGS $cf_new_cflags" 1>&6
10722
10723echo "${as_me:-configure}:10723: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
10724
10725	CFLAGS="$CFLAGS $cf_new_cflags"
10726fi
10727
10728if test -n "$cf_new_cppflags" ; then
10729	test -n "$verbose" && echo "	add to \$CPPFLAGS $cf_new_cppflags" 1>&6
10730
10731echo "${as_me:-configure}:10731: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
10732
10733	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
10734fi
10735
10736if test -n "$cf_new_extra_cppflags" ; then
10737	test -n "$verbose" && echo "	add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
10738
10739echo "${as_me:-configure}:10739: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
10740
10741	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10742fi
10743
10744if test "$cf_check_cflags" != "$CFLAGS" ; then
10745cat >conftest.$ac_ext <<_ACEOF
10746#line 10746 "configure"
10747#include "confdefs.h"
10748#include <stdio.h>
10749int
10750main ()
10751{
10752printf("Hello world");
10753  ;
10754  return 0;
10755}
10756_ACEOF
10757rm -f conftest.$ac_objext conftest$ac_exeext
10758if { (eval echo "$as_me:10758: \"$ac_link\"") >&5
10759  (eval $ac_link) 2>&5
10760  ac_status=$?
10761  echo "$as_me:10761: \$? = $ac_status" >&5
10762  (exit $ac_status); } &&
10763         { ac_try='test -s conftest$ac_exeext'
10764  { (eval echo "$as_me:10764: \"$ac_try\"") >&5
10765  (eval $ac_try) 2>&5
10766  ac_status=$?
10767  echo "$as_me:10767: \$? = $ac_status" >&5
10768  (exit $ac_status); }; }; then
10769  :
10770else
10771  echo "$as_me: failed program was:" >&5
10772cat conftest.$ac_ext >&5
10773test -n "$verbose" && echo "	test-compile failed.  Undoing change to \$CFLAGS" 1>&6
10774
10775echo "${as_me:-configure}:10775: testing test-compile failed.  Undoing change to \$CFLAGS ..." 1>&5
10776
10777	 if test "$cf_check_cppflags" != "$CPPFLAGS" ; then
10778		 test -n "$verbose" && echo "	but keeping change to \$CPPFLAGS" 1>&6
10779
10780echo "${as_me:-configure}:10780: testing but keeping change to \$CPPFLAGS ..." 1>&5
10781
10782	 fi
10783	 CFLAGS="$cf_check_flags"
10784fi
10785rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10786fi
10787
10788	echo "$as_me:10788: checking for XOpenDisplay" >&5
10789echo $ECHO_N "checking for XOpenDisplay... $ECHO_C" >&6
10790if test "${ac_cv_func_XOpenDisplay+set}" = set; then
10791  echo $ECHO_N "(cached) $ECHO_C" >&6
10792else
10793  cat >conftest.$ac_ext <<_ACEOF
10794#line 10794 "configure"
10795#include "confdefs.h"
10796/* System header to define __stub macros and hopefully few prototypes,
10797    which can conflict with char XOpenDisplay (); below.  */
10798#include <assert.h>
10799/* Override any gcc2 internal prototype to avoid an error.  */
10800#ifdef __cplusplus
10801extern "C"
10802#endif
10803/* We use char because int might match the return type of a gcc2
10804   builtin and then its argument prototype would still apply.  */
10805char XOpenDisplay ();
10806char (*f) ();
10807
10808int
10809main ()
10810{
10811/* The GNU C library defines this for functions which it implements
10812    to always fail with ENOSYS.  Some functions are actually named
10813    something starting with __ and the normal name is an alias.  */
10814#if defined (__stub_XOpenDisplay) || defined (__stub___XOpenDisplay)
10815choke me
10816#else
10817f = XOpenDisplay;
10818#endif
10819
10820  ;
10821  return 0;
10822}
10823_ACEOF
10824rm -f conftest.$ac_objext conftest$ac_exeext
10825if { (eval echo "$as_me:10825: \"$ac_link\"") >&5
10826  (eval $ac_link) 2>&5
10827  ac_status=$?
10828  echo "$as_me:10828: \$? = $ac_status" >&5
10829  (exit $ac_status); } &&
10830         { ac_try='test -s conftest$ac_exeext'
10831  { (eval echo "$as_me:10831: \"$ac_try\"") >&5
10832  (eval $ac_try) 2>&5
10833  ac_status=$?
10834  echo "$as_me:10834: \$? = $ac_status" >&5
10835  (exit $ac_status); }; }; then
10836  ac_cv_func_XOpenDisplay=yes
10837else
10838  echo "$as_me: failed program was:" >&5
10839cat conftest.$ac_ext >&5
10840ac_cv_func_XOpenDisplay=no
10841fi
10842rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10843fi
10844echo "$as_me:10844: result: $ac_cv_func_XOpenDisplay" >&5
10845echo "${ECHO_T}$ac_cv_func_XOpenDisplay" >&6
10846if test $ac_cv_func_XOpenDisplay = yes; then
10847  :
10848else
10849
10850	echo "$as_me:10850: checking for XOpenDisplay in -lX11" >&5
10851echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6
10852if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then
10853  echo $ECHO_N "(cached) $ECHO_C" >&6
10854else
10855  ac_check_lib_save_LIBS=$LIBS
10856LIBS="-lX11 $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
10857cat >conftest.$ac_ext <<_ACEOF
10858#line 10858 "configure"
10859#include "confdefs.h"
10860
10861/* Override any gcc2 internal prototype to avoid an error.  */
10862#ifdef __cplusplus
10863extern "C"
10864#endif
10865/* We use char because int might match the return type of a gcc2
10866   builtin and then its argument prototype would still apply.  */
10867char XOpenDisplay ();
10868int
10869main ()
10870{
10871XOpenDisplay ();
10872  ;
10873  return 0;
10874}
10875_ACEOF
10876rm -f conftest.$ac_objext conftest$ac_exeext
10877if { (eval echo "$as_me:10877: \"$ac_link\"") >&5
10878  (eval $ac_link) 2>&5
10879  ac_status=$?
10880  echo "$as_me:10880: \$? = $ac_status" >&5
10881  (exit $ac_status); } &&
10882         { ac_try='test -s conftest$ac_exeext'
10883  { (eval echo "$as_me:10883: \"$ac_try\"") >&5
10884  (eval $ac_try) 2>&5
10885  ac_status=$?
10886  echo "$as_me:10886: \$? = $ac_status" >&5
10887  (exit $ac_status); }; }; then
10888  ac_cv_lib_X11_XOpenDisplay=yes
10889else
10890  echo "$as_me: failed program was:" >&5
10891cat conftest.$ac_ext >&5
10892ac_cv_lib_X11_XOpenDisplay=no
10893fi
10894rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10895LIBS=$ac_check_lib_save_LIBS
10896fi
10897echo "$as_me:10897: result: $ac_cv_lib_X11_XOpenDisplay" >&5
10898echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6
10899if test $ac_cv_lib_X11_XOpenDisplay = yes; then
10900  LIBS="-lX11 $LIBS"
10901fi
10902
10903fi
10904
10905	echo "$as_me:10905: checking for XtAppInitialize" >&5
10906echo $ECHO_N "checking for XtAppInitialize... $ECHO_C" >&6
10907if test "${ac_cv_func_XtAppInitialize+set}" = set; then
10908  echo $ECHO_N "(cached) $ECHO_C" >&6
10909else
10910  cat >conftest.$ac_ext <<_ACEOF
10911#line 10911 "configure"
10912#include "confdefs.h"
10913/* System header to define __stub macros and hopefully few prototypes,
10914    which can conflict with char XtAppInitialize (); below.  */
10915#include <assert.h>
10916/* Override any gcc2 internal prototype to avoid an error.  */
10917#ifdef __cplusplus
10918extern "C"
10919#endif
10920/* We use char because int might match the return type of a gcc2
10921   builtin and then its argument prototype would still apply.  */
10922char XtAppInitialize ();
10923char (*f) ();
10924
10925int
10926main ()
10927{
10928/* The GNU C library defines this for functions which it implements
10929    to always fail with ENOSYS.  Some functions are actually named
10930    something starting with __ and the normal name is an alias.  */
10931#if defined (__stub_XtAppInitialize) || defined (__stub___XtAppInitialize)
10932choke me
10933#else
10934f = XtAppInitialize;
10935#endif
10936
10937  ;
10938  return 0;
10939}
10940_ACEOF
10941rm -f conftest.$ac_objext conftest$ac_exeext
10942if { (eval echo "$as_me:10942: \"$ac_link\"") >&5
10943  (eval $ac_link) 2>&5
10944  ac_status=$?
10945  echo "$as_me:10945: \$? = $ac_status" >&5
10946  (exit $ac_status); } &&
10947         { ac_try='test -s conftest$ac_exeext'
10948  { (eval echo "$as_me:10948: \"$ac_try\"") >&5
10949  (eval $ac_try) 2>&5
10950  ac_status=$?
10951  echo "$as_me:10951: \$? = $ac_status" >&5
10952  (exit $ac_status); }; }; then
10953  ac_cv_func_XtAppInitialize=yes
10954else
10955  echo "$as_me: failed program was:" >&5
10956cat conftest.$ac_ext >&5
10957ac_cv_func_XtAppInitialize=no
10958fi
10959rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10960fi
10961echo "$as_me:10961: result: $ac_cv_func_XtAppInitialize" >&5
10962echo "${ECHO_T}$ac_cv_func_XtAppInitialize" >&6
10963if test $ac_cv_func_XtAppInitialize = yes; then
10964  :
10965else
10966
10967	echo "$as_me:10967: checking for XtAppInitialize in -lXt" >&5
10968echo $ECHO_N "checking for XtAppInitialize in -lXt... $ECHO_C" >&6
10969if test "${ac_cv_lib_Xt_XtAppInitialize+set}" = set; then
10970  echo $ECHO_N "(cached) $ECHO_C" >&6
10971else
10972  ac_check_lib_save_LIBS=$LIBS
10973LIBS="-lXt $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
10974cat >conftest.$ac_ext <<_ACEOF
10975#line 10975 "configure"
10976#include "confdefs.h"
10977
10978/* Override any gcc2 internal prototype to avoid an error.  */
10979#ifdef __cplusplus
10980extern "C"
10981#endif
10982/* We use char because int might match the return type of a gcc2
10983   builtin and then its argument prototype would still apply.  */
10984char XtAppInitialize ();
10985int
10986main ()
10987{
10988XtAppInitialize ();
10989  ;
10990  return 0;
10991}
10992_ACEOF
10993rm -f conftest.$ac_objext conftest$ac_exeext
10994if { (eval echo "$as_me:10994: \"$ac_link\"") >&5
10995  (eval $ac_link) 2>&5
10996  ac_status=$?
10997  echo "$as_me:10997: \$? = $ac_status" >&5
10998  (exit $ac_status); } &&
10999         { ac_try='test -s conftest$ac_exeext'
11000  { (eval echo "$as_me:11000: \"$ac_try\"") >&5
11001  (eval $ac_try) 2>&5
11002  ac_status=$?
11003  echo "$as_me:11003: \$? = $ac_status" >&5
11004  (exit $ac_status); }; }; then
11005  ac_cv_lib_Xt_XtAppInitialize=yes
11006else
11007  echo "$as_me: failed program was:" >&5
11008cat conftest.$ac_ext >&5
11009ac_cv_lib_Xt_XtAppInitialize=no
11010fi
11011rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11012LIBS=$ac_check_lib_save_LIBS
11013fi
11014echo "$as_me:11014: result: $ac_cv_lib_Xt_XtAppInitialize" >&5
11015echo "${ECHO_T}$ac_cv_lib_Xt_XtAppInitialize" >&6
11016if test $ac_cv_lib_Xt_XtAppInitialize = yes; then
11017  cat >>confdefs.h <<\EOF
11018#define HAVE_LIBXT 1
11019EOF
11020
11021		 cf_have_X_LIBS=Xt
11022		 LIBS="-lXt $X_PRE_LIBS $LIBS $X_EXTRA_LIBS"
11023fi
11024
11025fi
11026
11027fi
11028
11029if test $cf_have_X_LIBS = no ; then
11030	{ echo "$as_me:11030: WARNING: Unable to successfully link X Toolkit library (-lXt) with
11031test program.  You will have to check and add the proper libraries by hand
11032to makefile." >&5
11033echo "$as_me: WARNING: Unable to successfully link X Toolkit library (-lXt) with
11034test program.  You will have to check and add the proper libraries by hand
11035to makefile." >&2;}
11036fi
11037
11038cf_x_athena_root=$cf_x_athena
11039cf_x_athena_inc=""
11040
11041for cf_path in default \
11042	/usr/contrib/X11R6 \
11043	/usr/contrib/X11R5 \
11044	/usr/lib/X11R5 \
11045	/usr/local
11046do
11047	if test -z "$cf_x_athena_inc" ; then
11048		cf_save="$CPPFLAGS"
11049		cf_test=X11/$cf_x_athena_root/SimpleMenu.h
11050		if test $cf_path != default ; then
11051			CPPFLAGS="$cf_save -I$cf_path/include"
11052			echo "$as_me:11052: checking for $cf_test in $cf_path" >&5
11053echo $ECHO_N "checking for $cf_test in $cf_path... $ECHO_C" >&6
11054		else
11055			echo "$as_me:11055: checking for $cf_test" >&5
11056echo $ECHO_N "checking for $cf_test... $ECHO_C" >&6
11057		fi
11058		cat >conftest.$ac_ext <<_ACEOF
11059#line 11059 "configure"
11060#include "confdefs.h"
11061
11062#include <X11/Intrinsic.h>
11063#include <$cf_test>
11064int
11065main ()
11066{
11067
11068  ;
11069  return 0;
11070}
11071_ACEOF
11072rm -f conftest.$ac_objext
11073if { (eval echo "$as_me:11073: \"$ac_compile\"") >&5
11074  (eval $ac_compile) 2>&5
11075  ac_status=$?
11076  echo "$as_me:11076: \$? = $ac_status" >&5
11077  (exit $ac_status); } &&
11078         { ac_try='test -s conftest.$ac_objext'
11079  { (eval echo "$as_me:11079: \"$ac_try\"") >&5
11080  (eval $ac_try) 2>&5
11081  ac_status=$?
11082  echo "$as_me:11082: \$? = $ac_status" >&5
11083  (exit $ac_status); }; }; then
11084  cf_result=yes
11085else
11086  echo "$as_me: failed program was:" >&5
11087cat conftest.$ac_ext >&5
11088cf_result=no
11089fi
11090rm -f conftest.$ac_objext conftest.$ac_ext
11091		echo "$as_me:11091: result: $cf_result" >&5
11092echo "${ECHO_T}$cf_result" >&6
11093		if test "$cf_result" = yes ; then
11094			cf_x_athena_inc=$cf_path
11095			break
11096		else
11097			CPPFLAGS="$cf_save"
11098		fi
11099	fi
11100done
11101
11102if test -z "$cf_x_athena_inc" ; then
11103	{ echo "$as_me:11103: WARNING: Unable to successfully find Athena header files with test program" >&5
11104echo "$as_me: WARNING: Unable to successfully find Athena header files with test program" >&2;}
11105elif test "$cf_x_athena_inc" != default ; then
11106	CPPFLAGS="$CPPFLAGS -I$cf_x_athena_inc"
11107fi
11108
11109cf_x_athena_root=$cf_x_athena
11110cf_x_athena_lib=""
11111
11112for cf_path in default \
11113	/usr/contrib/X11R6 \
11114	/usr/contrib/X11R5 \
11115	/usr/lib/X11R5 \
11116	/usr/local
11117do
11118	for cf_lib in \
11119		"-l$cf_x_athena_root -lXmu" \
11120		"-l$cf_x_athena_root -lXpm -lXmu" \
11121		"-l${cf_x_athena_root}_s -lXmu_s"
11122	do
11123		if test -z "$cf_x_athena_lib" ; then
11124			cf_save="$LIBS"
11125			cf_test=XawSimpleMenuAddGlobalActions
11126			if test $cf_path != default ; then
11127				LIBS="-L$cf_path/lib $cf_lib $LIBS"
11128				echo "$as_me:11128: checking for $cf_lib in $cf_path" >&5
11129echo $ECHO_N "checking for $cf_lib in $cf_path... $ECHO_C" >&6
11130			else
11131				LIBS="$cf_lib $LIBS"
11132				echo "$as_me:11132: checking for $cf_test in $cf_lib" >&5
11133echo $ECHO_N "checking for $cf_test in $cf_lib... $ECHO_C" >&6
11134			fi
11135			cat >conftest.$ac_ext <<_ACEOF
11136#line 11136 "configure"
11137#include "confdefs.h"
11138
11139#include <X11/Intrinsic.h>
11140#include <X11/$cf_x_athena_root/SimpleMenu.h>
11141
11142int
11143main ()
11144{
11145
11146$cf_test((XtAppContext) 0)
11147  ;
11148  return 0;
11149}
11150_ACEOF
11151rm -f conftest.$ac_objext conftest$ac_exeext
11152if { (eval echo "$as_me:11152: \"$ac_link\"") >&5
11153  (eval $ac_link) 2>&5
11154  ac_status=$?
11155  echo "$as_me:11155: \$? = $ac_status" >&5
11156  (exit $ac_status); } &&
11157         { ac_try='test -s conftest$ac_exeext'
11158  { (eval echo "$as_me:11158: \"$ac_try\"") >&5
11159  (eval $ac_try) 2>&5
11160  ac_status=$?
11161  echo "$as_me:11161: \$? = $ac_status" >&5
11162  (exit $ac_status); }; }; then
11163  cf_result=yes
11164else
11165  echo "$as_me: failed program was:" >&5
11166cat conftest.$ac_ext >&5
11167cf_result=no
11168fi
11169rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11170			echo "$as_me:11170: result: $cf_result" >&5
11171echo "${ECHO_T}$cf_result" >&6
11172			if test "$cf_result" = yes ; then
11173				cf_x_athena_lib="$cf_lib"
11174				break
11175			fi
11176			LIBS="$cf_save"
11177		fi
11178	done
11179done
11180
11181if test -z "$cf_x_athena_lib" ; then
11182	{ { echo "$as_me:11182: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&5
11183echo "$as_me: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&2;}
11184   { (exit 1); exit 1; }; }
11185fi
11186
11187cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
11188
11189cat >>confdefs.h <<EOF
11190#define $cf_x_athena_LIBS 1
11191EOF
11192
11193fi
11194
11195for ac_header in X11/Xpoll.h
11196do
11197as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11198echo "$as_me:11198: checking for $ac_header" >&5
11199echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11200if eval "test \"\${$as_ac_Header+set}\" = set"; then
11201  echo $ECHO_N "(cached) $ECHO_C" >&6
11202else
11203  cat >conftest.$ac_ext <<_ACEOF
11204#line 11204 "configure"
11205#include "confdefs.h"
11206#include <$ac_header>
11207_ACEOF
11208if { (eval echo "$as_me:11208: \"$ac_cpp conftest.$ac_ext\"") >&5
11209  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11210  ac_status=$?
11211  egrep -v '^ *\+' conftest.er1 >conftest.err
11212  rm -f conftest.er1
11213  cat conftest.err >&5
11214  echo "$as_me:11214: \$? = $ac_status" >&5
11215  (exit $ac_status); } >/dev/null; then
11216  if test -s conftest.err; then
11217    ac_cpp_err=$ac_c_preproc_warn_flag
11218  else
11219    ac_cpp_err=
11220  fi
11221else
11222  ac_cpp_err=yes
11223fi
11224if test -z "$ac_cpp_err"; then
11225  eval "$as_ac_Header=yes"
11226else
11227  echo "$as_me: failed program was:" >&5
11228  cat conftest.$ac_ext >&5
11229  eval "$as_ac_Header=no"
11230fi
11231rm -f conftest.err conftest.$ac_ext
11232fi
11233echo "$as_me:11233: result: `eval echo '${'$as_ac_Header'}'`" >&5
11234echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11235if test `eval echo '${'$as_ac_Header'}'` = yes; then
11236  cat >>confdefs.h <<EOF
11237#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11238EOF
11239
11240fi
11241done
11242
11243echo "$as_me:11243: checking for declaration of fd_set" >&5
11244echo $ECHO_N "checking for declaration of fd_set... $ECHO_C" >&6
11245if test "${cf_cv_type_fd_set+set}" = set; then
11246  echo $ECHO_N "(cached) $ECHO_C" >&6
11247else
11248
11249echo "${as_me:-configure}:11249: testing sys/types alone ..." 1>&5
11250
11251cat >conftest.$ac_ext <<_ACEOF
11252#line 11252 "configure"
11253#include "confdefs.h"
11254
11255#include <sys/types.h>
11256int
11257main ()
11258{
11259fd_set x
11260  ;
11261  return 0;
11262}
11263_ACEOF
11264rm -f conftest.$ac_objext
11265if { (eval echo "$as_me:11265: \"$ac_compile\"") >&5
11266  (eval $ac_compile) 2>&5
11267  ac_status=$?
11268  echo "$as_me:11268: \$? = $ac_status" >&5
11269  (exit $ac_status); } &&
11270         { ac_try='test -s conftest.$ac_objext'
11271  { (eval echo "$as_me:11271: \"$ac_try\"") >&5
11272  (eval $ac_try) 2>&5
11273  ac_status=$?
11274  echo "$as_me:11274: \$? = $ac_status" >&5
11275  (exit $ac_status); }; }; then
11276  cf_cv_type_fd_set=sys/types.h
11277else
11278  echo "$as_me: failed program was:" >&5
11279cat conftest.$ac_ext >&5
11280
11281echo "${as_me:-configure}:11281: testing X11/Xpoll.h ..." 1>&5
11282
11283cat >conftest.$ac_ext <<_ACEOF
11284#line 11284 "configure"
11285#include "confdefs.h"
11286
11287#ifdef HAVE_X11_XPOLL_H
11288#include <X11/Xpoll.h>
11289#endif
11290int
11291main ()
11292{
11293fd_set x
11294  ;
11295  return 0;
11296}
11297_ACEOF
11298rm -f conftest.$ac_objext
11299if { (eval echo "$as_me:11299: \"$ac_compile\"") >&5
11300  (eval $ac_compile) 2>&5
11301  ac_status=$?
11302  echo "$as_me:11302: \$? = $ac_status" >&5
11303  (exit $ac_status); } &&
11304         { ac_try='test -s conftest.$ac_objext'
11305  { (eval echo "$as_me:11305: \"$ac_try\"") >&5
11306  (eval $ac_try) 2>&5
11307  ac_status=$?
11308  echo "$as_me:11308: \$? = $ac_status" >&5
11309  (exit $ac_status); }; }; then
11310  cf_cv_type_fd_set=X11/Xpoll.h
11311else
11312  echo "$as_me: failed program was:" >&5
11313cat conftest.$ac_ext >&5
11314
11315echo "${as_me:-configure}:11315: testing sys/select.h ..." 1>&5
11316
11317cat >conftest.$ac_ext <<_ACEOF
11318#line 11318 "configure"
11319#include "confdefs.h"
11320
11321#include <sys/types.h>
11322#include <sys/select.h>
11323int
11324main ()
11325{
11326fd_set x
11327  ;
11328  return 0;
11329}
11330_ACEOF
11331rm -f conftest.$ac_objext
11332if { (eval echo "$as_me:11332: \"$ac_compile\"") >&5
11333  (eval $ac_compile) 2>&5
11334  ac_status=$?
11335  echo "$as_me:11335: \$? = $ac_status" >&5
11336  (exit $ac_status); } &&
11337         { ac_try='test -s conftest.$ac_objext'
11338  { (eval echo "$as_me:11338: \"$ac_try\"") >&5
11339  (eval $ac_try) 2>&5
11340  ac_status=$?
11341  echo "$as_me:11341: \$? = $ac_status" >&5
11342  (exit $ac_status); }; }; then
11343  cf_cv_type_fd_set=sys/select.h
11344else
11345  echo "$as_me: failed program was:" >&5
11346cat conftest.$ac_ext >&5
11347cf_cv_type_fd_set=unknown
11348fi
11349rm -f conftest.$ac_objext conftest.$ac_ext
11350fi
11351rm -f conftest.$ac_objext conftest.$ac_ext
11352fi
11353rm -f conftest.$ac_objext conftest.$ac_ext
11354fi
11355echo "$as_me:11355: result: $cf_cv_type_fd_set" >&5
11356echo "${ECHO_T}$cf_cv_type_fd_set" >&6
11357if test $cf_cv_type_fd_set = sys/select.h ; then
11358	cat >>confdefs.h <<\EOF
11359#define USE_SYS_SELECT_H 1
11360EOF
11361
11362fi
11363
11364echo "$as_me:11364: checking for declaration of fd_mask" >&5
11365echo $ECHO_N "checking for declaration of fd_mask... $ECHO_C" >&6
11366if test "${cf_cv_type_fd_mask+set}" = set; then
11367  echo $ECHO_N "(cached) $ECHO_C" >&6
11368else
11369
11370    if test x$cf_cv_type_fd_set = xX11/Xpoll.h ; then
11371        cat >conftest.$ac_ext <<_ACEOF
11372#line 11372 "configure"
11373#include "confdefs.h"
11374
11375#include <X11/Xpoll.h>
11376int
11377main ()
11378{
11379fd_mask x
11380  ;
11381  return 0;
11382}
11383_ACEOF
11384rm -f conftest.$ac_objext
11385if { (eval echo "$as_me:11385: \"$ac_compile\"") >&5
11386  (eval $ac_compile) 2>&5
11387  ac_status=$?
11388  echo "$as_me:11388: \$? = $ac_status" >&5
11389  (exit $ac_status); } &&
11390         { ac_try='test -s conftest.$ac_objext'
11391  { (eval echo "$as_me:11391: \"$ac_try\"") >&5
11392  (eval $ac_try) 2>&5
11393  ac_status=$?
11394  echo "$as_me:11394: \$? = $ac_status" >&5
11395  (exit $ac_status); }; }; then
11396  :
11397else
11398  echo "$as_me: failed program was:" >&5
11399cat conftest.$ac_ext >&5
11400
11401echo "${as_me:-configure}:11401: testing if we must define CSRG_BASED ..." 1>&5
11402
11403# Xosdefs.h on Mac OS X may not define this (but it should).
11404            cat >conftest.$ac_ext <<_ACEOF
11405#line 11405 "configure"
11406#include "confdefs.h"
11407
11408#define CSRG_BASED
11409#include <X11/Xpoll.h>
11410int
11411main ()
11412{
11413fd_mask x
11414  ;
11415  return 0;
11416}
11417_ACEOF
11418rm -f conftest.$ac_objext
11419if { (eval echo "$as_me:11419: \"$ac_compile\"") >&5
11420  (eval $ac_compile) 2>&5
11421  ac_status=$?
11422  echo "$as_me:11422: \$? = $ac_status" >&5
11423  (exit $ac_status); } &&
11424         { ac_try='test -s conftest.$ac_objext'
11425  { (eval echo "$as_me:11425: \"$ac_try\"") >&5
11426  (eval $ac_try) 2>&5
11427  ac_status=$?
11428  echo "$as_me:11428: \$? = $ac_status" >&5
11429  (exit $ac_status); }; }; then
11430  cf_cv_type_fd_mask=CSRG_BASED
11431else
11432  echo "$as_me: failed program was:" >&5
11433cat conftest.$ac_ext >&5
11434fi
11435rm -f conftest.$ac_objext conftest.$ac_ext
11436fi
11437rm -f conftest.$ac_objext conftest.$ac_ext
11438    else
11439        cf_cv_type_fd_mask=$cf_cv_type_fd_set
11440    fi
11441
11442fi
11443echo "$as_me:11443: result: $cf_cv_type_fd_mask" >&5
11444echo "${ECHO_T}$cf_cv_type_fd_mask" >&6
11445if test x$cf_cv_type_fd_mask = xCSRG_BASED ; then
11446    cat >>confdefs.h <<\EOF
11447#define CSRG_BASED 1
11448EOF
11449
11450fi
11451
11452echo "$as_me:11452: checking for IRIX 6.5 baud-rate redefinitions" >&5
11453echo $ECHO_N "checking for IRIX 6.5 baud-rate redefinitions... $ECHO_C" >&6
11454if test "${cf_cv_termio_c_ispeed+set}" = set; then
11455  echo $ECHO_N "(cached) $ECHO_C" >&6
11456else
11457
11458cat >conftest.$ac_ext <<_ACEOF
11459#line 11459 "configure"
11460#include "confdefs.h"
11461
11462#include <sys/types.h>
11463#include <sys/termio.h>
11464int
11465main ()
11466{
11467
11468struct termio foo;
11469foo.c_ispeed = B38400;
11470foo.c_ospeed = B9600;
11471
11472  ;
11473  return 0;
11474}
11475_ACEOF
11476rm -f conftest.$ac_objext
11477if { (eval echo "$as_me:11477: \"$ac_compile\"") >&5
11478  (eval $ac_compile) 2>&5
11479  ac_status=$?
11480  echo "$as_me:11480: \$? = $ac_status" >&5
11481  (exit $ac_status); } &&
11482         { ac_try='test -s conftest.$ac_objext'
11483  { (eval echo "$as_me:11483: \"$ac_try\"") >&5
11484  (eval $ac_try) 2>&5
11485  ac_status=$?
11486  echo "$as_me:11486: \$? = $ac_status" >&5
11487  (exit $ac_status); }; }; then
11488  cf_cv_termio_c_ispeed=yes
11489
11490else
11491  echo "$as_me: failed program was:" >&5
11492cat conftest.$ac_ext >&5
11493cf_cv_termio_c_ispeed=no
11494fi
11495rm -f conftest.$ac_objext conftest.$ac_ext
11496
11497fi
11498echo "$as_me:11498: result: $cf_cv_termio_c_ispeed" >&5
11499echo "${ECHO_T}$cf_cv_termio_c_ispeed" >&6
11500test "$cf_cv_termio_c_ispeed" = yes && cat >>confdefs.h <<\EOF
11501#define HAVE_TERMIO_C_ISPEED 1
11502EOF
11503
11504LIBS="$LIBS $X_EXTRA_LIBS"
11505
11506# Check for openpty() in -lutil if the UNIX98-style pty functions are not
11507# available. E.g. for GNU libc 2.0.
11508case $host_os in #(vi
11509freebsd*|netbsd*|dragonfly*) # 2004/8/15 - revisit this if/when grantpt is known to work.
11510
11511echo "$as_me:11511: checking for openpty in -lutil" >&5
11512echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
11513if test "${ac_cv_lib_util_openpty+set}" = set; then
11514  echo $ECHO_N "(cached) $ECHO_C" >&6
11515else
11516  ac_check_lib_save_LIBS=$LIBS
11517LIBS="-lutil  $LIBS"
11518cat >conftest.$ac_ext <<_ACEOF
11519#line 11519 "configure"
11520#include "confdefs.h"
11521
11522/* Override any gcc2 internal prototype to avoid an error.  */
11523#ifdef __cplusplus
11524extern "C"
11525#endif
11526/* We use char because int might match the return type of a gcc2
11527   builtin and then its argument prototype would still apply.  */
11528char openpty ();
11529int
11530main ()
11531{
11532openpty ();
11533  ;
11534  return 0;
11535}
11536_ACEOF
11537rm -f conftest.$ac_objext conftest$ac_exeext
11538if { (eval echo "$as_me:11538: \"$ac_link\"") >&5
11539  (eval $ac_link) 2>&5
11540  ac_status=$?
11541  echo "$as_me:11541: \$? = $ac_status" >&5
11542  (exit $ac_status); } &&
11543         { ac_try='test -s conftest$ac_exeext'
11544  { (eval echo "$as_me:11544: \"$ac_try\"") >&5
11545  (eval $ac_try) 2>&5
11546  ac_status=$?
11547  echo "$as_me:11547: \$? = $ac_status" >&5
11548  (exit $ac_status); }; }; then
11549  ac_cv_lib_util_openpty=yes
11550else
11551  echo "$as_me: failed program was:" >&5
11552cat conftest.$ac_ext >&5
11553ac_cv_lib_util_openpty=no
11554fi
11555rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11556LIBS=$ac_check_lib_save_LIBS
11557fi
11558echo "$as_me:11558: result: $ac_cv_lib_util_openpty" >&5
11559echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
11560if test $ac_cv_lib_util_openpty = yes; then
11561  cat >>confdefs.h <<EOF
11562#define HAVE_LIBUTIL 1
11563EOF
11564
11565  LIBS="-lutil $LIBS"
11566
11567fi
11568
11569	;;
11570*)
11571
11572for ac_func in grantpt
11573do
11574as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11575echo "$as_me:11575: checking for $ac_func" >&5
11576echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11577if eval "test \"\${$as_ac_var+set}\" = set"; then
11578  echo $ECHO_N "(cached) $ECHO_C" >&6
11579else
11580  cat >conftest.$ac_ext <<_ACEOF
11581#line 11581 "configure"
11582#include "confdefs.h"
11583/* System header to define __stub macros and hopefully few prototypes,
11584    which can conflict with char $ac_func (); below.  */
11585#include <assert.h>
11586/* Override any gcc2 internal prototype to avoid an error.  */
11587#ifdef __cplusplus
11588extern "C"
11589#endif
11590/* We use char because int might match the return type of a gcc2
11591   builtin and then its argument prototype would still apply.  */
11592char $ac_func ();
11593char (*f) ();
11594
11595int
11596main ()
11597{
11598/* The GNU C library defines this for functions which it implements
11599    to always fail with ENOSYS.  Some functions are actually named
11600    something starting with __ and the normal name is an alias.  */
11601#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11602choke me
11603#else
11604f = $ac_func;
11605#endif
11606
11607  ;
11608  return 0;
11609}
11610_ACEOF
11611rm -f conftest.$ac_objext conftest$ac_exeext
11612if { (eval echo "$as_me:11612: \"$ac_link\"") >&5
11613  (eval $ac_link) 2>&5
11614  ac_status=$?
11615  echo "$as_me:11615: \$? = $ac_status" >&5
11616  (exit $ac_status); } &&
11617         { ac_try='test -s conftest$ac_exeext'
11618  { (eval echo "$as_me:11618: \"$ac_try\"") >&5
11619  (eval $ac_try) 2>&5
11620  ac_status=$?
11621  echo "$as_me:11621: \$? = $ac_status" >&5
11622  (exit $ac_status); }; }; then
11623  eval "$as_ac_var=yes"
11624else
11625  echo "$as_me: failed program was:" >&5
11626cat conftest.$ac_ext >&5
11627eval "$as_ac_var=no"
11628fi
11629rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11630fi
11631echo "$as_me:11631: result: `eval echo '${'$as_ac_var'}'`" >&5
11632echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11633if test `eval echo '${'$as_ac_var'}'` = yes; then
11634  cat >>confdefs.h <<EOF
11635#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11636EOF
11637
11638else
11639
11640echo "$as_me:11640: checking for openpty in -lutil" >&5
11641echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
11642if test "${ac_cv_lib_util_openpty+set}" = set; then
11643  echo $ECHO_N "(cached) $ECHO_C" >&6
11644else
11645  ac_check_lib_save_LIBS=$LIBS
11646LIBS="-lutil  $LIBS"
11647cat >conftest.$ac_ext <<_ACEOF
11648#line 11648 "configure"
11649#include "confdefs.h"
11650
11651/* Override any gcc2 internal prototype to avoid an error.  */
11652#ifdef __cplusplus
11653extern "C"
11654#endif
11655/* We use char because int might match the return type of a gcc2
11656   builtin and then its argument prototype would still apply.  */
11657char openpty ();
11658int
11659main ()
11660{
11661openpty ();
11662  ;
11663  return 0;
11664}
11665_ACEOF
11666rm -f conftest.$ac_objext conftest$ac_exeext
11667if { (eval echo "$as_me:11667: \"$ac_link\"") >&5
11668  (eval $ac_link) 2>&5
11669  ac_status=$?
11670  echo "$as_me:11670: \$? = $ac_status" >&5
11671  (exit $ac_status); } &&
11672         { ac_try='test -s conftest$ac_exeext'
11673  { (eval echo "$as_me:11673: \"$ac_try\"") >&5
11674  (eval $ac_try) 2>&5
11675  ac_status=$?
11676  echo "$as_me:11676: \$? = $ac_status" >&5
11677  (exit $ac_status); }; }; then
11678  ac_cv_lib_util_openpty=yes
11679else
11680  echo "$as_me: failed program was:" >&5
11681cat conftest.$ac_ext >&5
11682ac_cv_lib_util_openpty=no
11683fi
11684rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11685LIBS=$ac_check_lib_save_LIBS
11686fi
11687echo "$as_me:11687: result: $ac_cv_lib_util_openpty" >&5
11688echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
11689if test $ac_cv_lib_util_openpty = yes; then
11690  cat >>confdefs.h <<EOF
11691#define HAVE_LIBUTIL 1
11692EOF
11693
11694  LIBS="-lutil $LIBS"
11695
11696fi
11697
11698fi
11699done
11700
11701	;;
11702esac
11703
11704for ac_func in XkbQueryExtension
11705do
11706as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11707echo "$as_me:11707: checking for $ac_func" >&5
11708echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11709if eval "test \"\${$as_ac_var+set}\" = set"; then
11710  echo $ECHO_N "(cached) $ECHO_C" >&6
11711else
11712  cat >conftest.$ac_ext <<_ACEOF
11713#line 11713 "configure"
11714#include "confdefs.h"
11715/* System header to define __stub macros and hopefully few prototypes,
11716    which can conflict with char $ac_func (); below.  */
11717#include <assert.h>
11718/* Override any gcc2 internal prototype to avoid an error.  */
11719#ifdef __cplusplus
11720extern "C"
11721#endif
11722/* We use char because int might match the return type of a gcc2
11723   builtin and then its argument prototype would still apply.  */
11724char $ac_func ();
11725char (*f) ();
11726
11727int
11728main ()
11729{
11730/* The GNU C library defines this for functions which it implements
11731    to always fail with ENOSYS.  Some functions are actually named
11732    something starting with __ and the normal name is an alias.  */
11733#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11734choke me
11735#else
11736f = $ac_func;
11737#endif
11738
11739  ;
11740  return 0;
11741}
11742_ACEOF
11743rm -f conftest.$ac_objext conftest$ac_exeext
11744if { (eval echo "$as_me:11744: \"$ac_link\"") >&5
11745  (eval $ac_link) 2>&5
11746  ac_status=$?
11747  echo "$as_me:11747: \$? = $ac_status" >&5
11748  (exit $ac_status); } &&
11749         { ac_try='test -s conftest$ac_exeext'
11750  { (eval echo "$as_me:11750: \"$ac_try\"") >&5
11751  (eval $ac_try) 2>&5
11752  ac_status=$?
11753  echo "$as_me:11753: \$? = $ac_status" >&5
11754  (exit $ac_status); }; }; then
11755  eval "$as_ac_var=yes"
11756else
11757  echo "$as_me: failed program was:" >&5
11758cat conftest.$ac_ext >&5
11759eval "$as_ac_var=no"
11760fi
11761rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11762fi
11763echo "$as_me:11763: result: `eval echo '${'$as_ac_var'}'`" >&5
11764echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11765if test `eval echo '${'$as_ac_var'}'` = yes; then
11766  cat >>confdefs.h <<EOF
11767#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11768EOF
11769
11770fi
11771done
11772
11773echo "$as_me:11773: checking for XKB Bell extension" >&5
11774echo $ECHO_N "checking for XKB Bell extension... $ECHO_C" >&6
11775if test "${cf_cv_xkb_bell_ext+set}" = set; then
11776  echo $ECHO_N "(cached) $ECHO_C" >&6
11777else
11778
11779cat >conftest.$ac_ext <<_ACEOF
11780#line 11780 "configure"
11781#include "confdefs.h"
11782
11783#include <X11/Intrinsic.h>
11784#include <X11/XKBlib.h>		/* has the prototype */
11785#include <X11/extensions/XKBbells.h>	/* has the XkbBI_xxx definitions */
11786
11787int
11788main ()
11789{
11790
11791	int x = (XkbBI_Info |XkbBI_MinorError |XkbBI_MajorError |XkbBI_TerminalBell |XkbBI_MarginBell);
11792	Atom y;
11793	XkbBell((Display *)0, (Widget)0, 0, y);
11794
11795  ;
11796  return 0;
11797}
11798_ACEOF
11799rm -f conftest.$ac_objext conftest$ac_exeext
11800if { (eval echo "$as_me:11800: \"$ac_link\"") >&5
11801  (eval $ac_link) 2>&5
11802  ac_status=$?
11803  echo "$as_me:11803: \$? = $ac_status" >&5
11804  (exit $ac_status); } &&
11805         { ac_try='test -s conftest$ac_exeext'
11806  { (eval echo "$as_me:11806: \"$ac_try\"") >&5
11807  (eval $ac_try) 2>&5
11808  ac_status=$?
11809  echo "$as_me:11809: \$? = $ac_status" >&5
11810  (exit $ac_status); }; }; then
11811  cf_cv_xkb_bell_ext=yes
11812else
11813  echo "$as_me: failed program was:" >&5
11814cat conftest.$ac_ext >&5
11815cf_cv_xkb_bell_ext=no
11816fi
11817rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11818
11819fi
11820echo "$as_me:11820: result: $cf_cv_xkb_bell_ext" >&5
11821echo "${ECHO_T}$cf_cv_xkb_bell_ext" >&6
11822test "$cf_cv_xkb_bell_ext" = yes && cat >>confdefs.h <<\EOF
11823#define HAVE_XKB_BELL_EXT 1
11824EOF
11825
11826for ac_func in Xutf8LookupString
11827do
11828as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11829echo "$as_me:11829: checking for $ac_func" >&5
11830echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11831if eval "test \"\${$as_ac_var+set}\" = set"; then
11832  echo $ECHO_N "(cached) $ECHO_C" >&6
11833else
11834  cat >conftest.$ac_ext <<_ACEOF
11835#line 11835 "configure"
11836#include "confdefs.h"
11837/* System header to define __stub macros and hopefully few prototypes,
11838    which can conflict with char $ac_func (); below.  */
11839#include <assert.h>
11840/* Override any gcc2 internal prototype to avoid an error.  */
11841#ifdef __cplusplus
11842extern "C"
11843#endif
11844/* We use char because int might match the return type of a gcc2
11845   builtin and then its argument prototype would still apply.  */
11846char $ac_func ();
11847char (*f) ();
11848
11849int
11850main ()
11851{
11852/* The GNU C library defines this for functions which it implements
11853    to always fail with ENOSYS.  Some functions are actually named
11854    something starting with __ and the normal name is an alias.  */
11855#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11856choke me
11857#else
11858f = $ac_func;
11859#endif
11860
11861  ;
11862  return 0;
11863}
11864_ACEOF
11865rm -f conftest.$ac_objext conftest$ac_exeext
11866if { (eval echo "$as_me:11866: \"$ac_link\"") >&5
11867  (eval $ac_link) 2>&5
11868  ac_status=$?
11869  echo "$as_me:11869: \$? = $ac_status" >&5
11870  (exit $ac_status); } &&
11871         { ac_try='test -s conftest$ac_exeext'
11872  { (eval echo "$as_me:11872: \"$ac_try\"") >&5
11873  (eval $ac_try) 2>&5
11874  ac_status=$?
11875  echo "$as_me:11875: \$? = $ac_status" >&5
11876  (exit $ac_status); }; }; then
11877  eval "$as_ac_var=yes"
11878else
11879  echo "$as_me: failed program was:" >&5
11880cat conftest.$ac_ext >&5
11881eval "$as_ac_var=no"
11882fi
11883rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11884fi
11885echo "$as_me:11885: result: `eval echo '${'$as_ac_var'}'`" >&5
11886echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11887if test `eval echo '${'$as_ac_var'}'` = yes; then
11888  cat >>confdefs.h <<EOF
11889#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11890EOF
11891
11892else
11893
11894	EXTRAHDRS="$EXTRAHDRS xutf8.h"
11895	EXTRASRCS="$EXTRASRCS xutf8.c"
11896	EXTRAOBJS="$EXTRAOBJS xutf8.o"
11897
11898fi
11899done
11900
11901echo "$as_me:11901: checking if you want narrow prototypes for X libraries" >&5
11902echo $ECHO_N "checking if you want narrow prototypes for X libraries... $ECHO_C" >&6
11903
11904case `$ac_config_guess` in #(vi
11905*cygwin*|*freebsd*|*gnu*|*irix5*|*irix6*|*linux-gnu*|*netbsd*|*openbsd*|*qnx*|*sco*|*sgi*) #(vi
11906	cf_default_narrowproto=yes
11907	;;
11908*)
11909	cf_default_narrowproto=no
11910	;;
11911esac
11912
11913# Check whether --enable-narrowproto or --disable-narrowproto was given.
11914if test "${enable_narrowproto+set}" = set; then
11915  enableval="$enable_narrowproto"
11916  test "$enableval" != no && enableval=yes
11917  if test "$enableval" != "$cf_default_narrowproto" ; then
11918    enable_narrowproto=$enableval
11919  else
11920    enable_narrowproto=$cf_default_narrowproto
11921  fi
11922else
11923  enableval=$cf_default_narrowproto
11924  enable_narrowproto=$cf_default_narrowproto
11925
11926fi;
11927echo "$as_me:11927: result: $enable_narrowproto" >&5
11928echo "${ECHO_T}$enable_narrowproto" >&6
11929
11930echo "$as_me:11930: checking if we should use imake to help" >&5
11931echo $ECHO_N "checking if we should use imake to help... $ECHO_C" >&6
11932
11933# Check whether --enable-imake or --disable-imake was given.
11934if test "${enable_imake+set}" = set; then
11935  enableval="$enable_imake"
11936  test "$enableval" != no && enableval=yes
11937  if test "$enableval" != "yes" ; then
11938    enable_imake=no
11939  else
11940    enable_imake=yes
11941  fi
11942else
11943  enableval=yes
11944  enable_imake=yes
11945
11946fi;
11947echo "$as_me:11947: result: $enable_imake" >&5
11948echo "${ECHO_T}$enable_imake" >&6
11949
11950if test "$enable_imake" = yes ; then
11951
11952for ac_prog in xmkmf imake
11953do
11954  # Extract the first word of "$ac_prog", so it can be a program name with args.
11955set dummy $ac_prog; ac_word=$2
11956echo "$as_me:11956: checking for $ac_word" >&5
11957echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
11958if test "${ac_cv_path_IMAKE+set}" = set; then
11959  echo $ECHO_N "(cached) $ECHO_C" >&6
11960else
11961  case $IMAKE in
11962  [\\/]* | ?:[\\/]*)
11963  ac_cv_path_IMAKE="$IMAKE" # Let the user override the test with a path.
11964  ;;
11965  *)
11966  ac_save_IFS=$IFS; IFS=$ac_path_separator
11967ac_dummy="$PATH"
11968for ac_dir in $ac_dummy; do
11969  IFS=$ac_save_IFS
11970  test -z "$ac_dir" && ac_dir=.
11971  if $as_executable_p "$ac_dir/$ac_word"; then
11972   ac_cv_path_IMAKE="$ac_dir/$ac_word"
11973   echo "$as_me:11973: found $ac_dir/$ac_word" >&5
11974   break
11975fi
11976done
11977
11978  ;;
11979esac
11980fi
11981IMAKE=$ac_cv_path_IMAKE
11982
11983if test -n "$IMAKE"; then
11984  echo "$as_me:11984: result: $IMAKE" >&5
11985echo "${ECHO_T}$IMAKE" >&6
11986else
11987  echo "$as_me:11987: result: no" >&5
11988echo "${ECHO_T}no" >&6
11989fi
11990
11991  test -n "$IMAKE" && break
11992done
11993
11994if test -n "$IMAKE" ; then
11995
11996case $IMAKE in # (vi
11997*/imake)
11998	cf_imake_opts="-DUseInstalled=YES" # (vi
11999	;;
12000*/util/xmkmf)
12001	# A single parameter tells xmkmf where the config-files are:
12002	cf_imake_opts="`echo $IMAKE|sed -e s,/config/util/xmkmf,,`" # (vi
12003	;;
12004*)
12005	cf_imake_opts=
12006	;;
12007esac
12008
12009# If it's installed properly, imake (or its wrapper, xmkmf) will point to the
12010# config directory.
12011if mkdir conftestdir; then
12012	CDPATH=; export CDPATH
12013	cf_makefile=`cd $srcdir;pwd`/Imakefile
12014	cd conftestdir
12015
12016	cat >fix_cflags.sed <<'CF_EOF'
12017s/\\//g
12018s/[ 	][ 	]*/ /g
12019s/"//g
12020:pack
12021s/\(=[^ ][^ ]*\) \([^-]\)/\1	\2/g
12022t pack
12023s/\(-D[a-zA-Z0-9_][a-zA-Z0-9_]*\)=\([^\'0-9 ][^ ]*\)/\1='\\"\2\\"'/g
12024s/^IMAKE[ ]/IMAKE_CFLAGS="/
12025s/	/ /g
12026s/$/"/
12027CF_EOF
12028
12029	cat >fix_lflags.sed <<'CF_EOF'
12030s/^IMAKE[ 	]*/IMAKE_LOADFLAGS="/
12031s/$/"/
12032CF_EOF
12033
12034	echo >./Imakefile
12035	test -f $cf_makefile && cat $cf_makefile >>./Imakefile
12036
12037	cat >> ./Imakefile <<'CF_EOF'
12038findstddefs:
12039	@echo IMAKE ${ALLDEFINES} $(MAIN_DEFINES) $(VENDORMANDEFS)       | sed -f fix_cflags.sed
12040	@echo IMAKE ${EXTRA_LOAD_FLAGS} | sed -f fix_lflags.sed
12041CF_EOF
12042
12043	if ( $IMAKE $cf_imake_opts 1>/dev/null 2>&5 && test -f Makefile)
12044	then
12045		test -n "$verbose" && echo "	Using $IMAKE $cf_imake_opts" 1>&6
12046
12047echo "${as_me:-configure}:12047: testing Using $IMAKE $cf_imake_opts ..." 1>&5
12048
12049	else
12050		# sometimes imake doesn't have the config path compiled in.  Find it.
12051		cf_config=
12052		for cf_libpath in $X_LIBS $LIBS ; do
12053			case $cf_libpath in # (vi
12054			-L*)
12055				cf_libpath=`echo .$cf_libpath | sed -e 's/^...//'`
12056				cf_libpath=$cf_libpath/X11/config
12057				if test -d $cf_libpath ; then
12058					cf_config=$cf_libpath
12059					break
12060				fi
12061				;;
12062			esac
12063		done
12064		if test -z "$cf_config" ; then
12065			{ echo "$as_me:12065: WARNING: Could not find imake config-directory" >&5
12066echo "$as_me: WARNING: Could not find imake config-directory" >&2;}
12067		else
12068			cf_imake_opts="$cf_imake_opts -I$cf_config"
12069			if ( $IMAKE -v $cf_imake_opts 2>&5)
12070			then
12071				test -n "$verbose" && echo "	Using $IMAKE $cf_config" 1>&6
12072
12073echo "${as_me:-configure}:12073: testing Using $IMAKE $cf_config ..." 1>&5
12074
12075			else
12076				{ echo "$as_me:12076: WARNING: Cannot run $IMAKE" >&5
12077echo "$as_me: WARNING: Cannot run $IMAKE" >&2;}
12078			fi
12079		fi
12080	fi
12081
12082	# GNU make sometimes prints "make[1]: Entering...", which
12083	# would confuse us.
12084	eval `make findstddefs 2>/dev/null | grep -v make`
12085
12086	cd ..
12087	rm -rf conftestdir
12088
12089	# We use ${ALLDEFINES} rather than ${STD_DEFINES} because the former
12090	# declares XTFUNCPROTO there.  However, some vendors (e.g., SGI) have
12091	# modified it to support site.cf, adding a kludge for the /usr/include
12092	# directory.  Try to filter that out, otherwise gcc won't find its
12093	# headers.
12094	if test -n "$GCC" ; then
12095	    if test -n "$IMAKE_CFLAGS" ; then
12096		cf_nostdinc=""
12097		cf_std_incl=""
12098		cf_cpp_opts=""
12099		for cf_opt in $IMAKE_CFLAGS
12100		do
12101		    case "$cf_opt" in
12102		    -nostdinc) #(vi
12103			cf_nostdinc="$cf_opt"
12104			;;
12105		    -I/usr/include) #(vi
12106			cf_std_incl="$cf_opt"
12107			;;
12108		    *) #(vi
12109			cf_cpp_opts="$cf_cpp_opts $cf_opt"
12110			;;
12111		    esac
12112		done
12113		if test -z "$cf_nostdinc" ; then
12114		    IMAKE_CFLAGS="$cf_cpp_opts $cf_std_incl"
12115		elif test -z "$cf_std_incl" ; then
12116		    IMAKE_CFLAGS="$cf_cpp_opts $cf_nostdinc"
12117		else
12118		    test -n "$verbose" && echo "	suppressed \"$cf_nostdinc\" and \"$cf_std_incl\"" 1>&6
12119
12120echo "${as_me:-configure}:12120: testing suppressed \"$cf_nostdinc\" and \"$cf_std_incl\" ..." 1>&5
12121
12122		    IMAKE_CFLAGS="$cf_cpp_opts"
12123		fi
12124	    fi
12125	fi
12126fi
12127
12128# Some imake configurations define PROJECTROOT with an empty value.  Remove
12129# the empty definition.
12130case $IMAKE_CFLAGS in
12131*-DPROJECTROOT=/*)
12132	;;
12133*)
12134	IMAKE_CFLAGS=`echo "$IMAKE_CFLAGS" |sed -e "s,-DPROJECTROOT=[ 	], ,"`
12135	;;
12136esac
12137
12138fi
12139
12140test -n "$verbose" && echo "	IMAKE_CFLAGS $IMAKE_CFLAGS" 1>&6
12141
12142echo "${as_me:-configure}:12142: testing IMAKE_CFLAGS $IMAKE_CFLAGS ..." 1>&5
12143
12144test -n "$verbose" && echo "	IMAKE_LOADFLAGS $IMAKE_LOADFLAGS" 1>&6
12145
12146echo "${as_me:-configure}:12146: testing IMAKE_LOADFLAGS $IMAKE_LOADFLAGS ..." 1>&5
12147
12148fi
12149
12150if test -n "$IMAKE" && test -n "$IMAKE_CFLAGS" ; then
12151
12152cf_fix_cppflags=no
12153cf_new_cflags=
12154cf_new_cppflags=
12155cf_new_extra_cppflags=
12156
12157for cf_add_cflags in $IMAKE_CFLAGS
12158do
12159case $cf_fix_cppflags in
12160no)
12161	case $cf_add_cflags in #(vi
12162	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
12163		case $cf_add_cflags in
12164		-D*)
12165			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12166
12167			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12168				&& test -z "${cf_tst_cflags}" \
12169				&& cf_fix_cppflags=yes
12170
12171			if test $cf_fix_cppflags = yes ; then
12172				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12173				continue
12174			elif test "${cf_tst_cflags}" = "\"'" ; then
12175				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12176				continue
12177			fi
12178			;;
12179		esac
12180		case "$CPPFLAGS" in
12181		*$cf_add_cflags) #(vi
12182			;;
12183		*) #(vi
12184			case $cf_add_cflags in #(vi
12185			-D*)
12186				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12187
12188CPPFLAGS=`echo "$CPPFLAGS" | \
12189	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
12190		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
12191
12192				;;
12193			esac
12194			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12195			;;
12196		esac
12197		;;
12198	*)
12199		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12200		;;
12201	esac
12202	;;
12203yes)
12204	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12205
12206	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12207
12208	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12209		&& test -z "${cf_tst_cflags}" \
12210		&& cf_fix_cppflags=no
12211	;;
12212esac
12213done
12214
12215if test -n "$cf_new_cflags" ; then
12216
12217	CFLAGS="$CFLAGS $cf_new_cflags"
12218fi
12219
12220if test -n "$cf_new_cppflags" ; then
12221
12222	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
12223fi
12224
12225if test -n "$cf_new_extra_cppflags" ; then
12226
12227	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12228fi
12229
12230else
12231	IMAKE_CFLAGS=
12232	IMAKE_LOADFLAGS=
12233	test -n "$verbose" && echo "	make fallback definitions" 1>&6
12234
12235echo "${as_me:-configure}:12235: testing make fallback definitions ..." 1>&5
12236
12237	# We prefer config.guess' values when we can get them, to avoid
12238	# inconsistent results with uname (AIX for instance).  However,
12239	# config.guess is not always consistent either.
12240	case $host_os in
12241	*[0-9].[0-9]*)
12242		UNAME_RELEASE="$host_os"
12243		;;
12244	*)
12245		UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
12246		;;
12247	esac
12248
12249	case .$UNAME_RELEASE in
12250	*[0-9].[0-9]*)
12251		OSMAJORVERSION=`echo "$UNAME_RELEASE" |sed -e 's/^[^0-9]*//' -e 's/\..*//'`
12252		OSMINORVERSION=`echo "$UNAME_RELEASE" |sed -e 's/^[^0-9]*//' -e 's/^[^.]*\.//' -e 's/\..*//' -e 's/[^0-9].*//' `
12253		test -z "$OSMAJORVERSION" && OSMAJORVERSION=1
12254		test -z "$OSMINORVERSION" && OSMINORVERSION=0
12255		IMAKE_CFLAGS="-DOSMAJORVERSION=$OSMAJORVERSION -DOSMINORVERSION=$OSMINORVERSION $IMAKE_CFLAGS"
12256		;;
12257	esac
12258
12259	# FUNCPROTO is standard with X11R6, but XFree86 drops it, leaving some
12260	# fallback/fragments for NeedPrototypes, etc.
12261	IMAKE_CFLAGS="-DFUNCPROTO=15 $IMAKE_CFLAGS"
12262
12263	# If this is not set properly, Xaw's scrollbars will not work
12264	if test "$enable_narrowproto" = yes ; then
12265		IMAKE_CFLAGS="-DNARROWPROTO=1 $IMAKE_CFLAGS"
12266	fi
12267
12268	# Other special definitions:
12269	case $host_os in
12270	aix*)
12271		# imake on AIX 5.1 defines AIXV3.  really.
12272		IMAKE_CFLAGS="-DAIXV3 -DAIXV4 $IMAKE_CFLAGS"
12273		;;
12274	irix[56].*) #(vi
12275		# these are needed to make SIGWINCH work in xterm
12276		IMAKE_CFLAGS="-DSYSV -DSVR4 $IMAKE_CFLAGS"
12277		;;
12278	esac
12279
12280cf_fix_cppflags=no
12281cf_new_cflags=
12282cf_new_cppflags=
12283cf_new_extra_cppflags=
12284
12285for cf_add_cflags in $IMAKE_CFLAGS
12286do
12287case $cf_fix_cppflags in
12288no)
12289	case $cf_add_cflags in #(vi
12290	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
12291		case $cf_add_cflags in
12292		-D*)
12293			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12294
12295			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12296				&& test -z "${cf_tst_cflags}" \
12297				&& cf_fix_cppflags=yes
12298
12299			if test $cf_fix_cppflags = yes ; then
12300				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12301				continue
12302			elif test "${cf_tst_cflags}" = "\"'" ; then
12303				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12304				continue
12305			fi
12306			;;
12307		esac
12308		case "$CPPFLAGS" in
12309		*$cf_add_cflags) #(vi
12310			;;
12311		*) #(vi
12312			case $cf_add_cflags in #(vi
12313			-D*)
12314				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12315
12316CPPFLAGS=`echo "$CPPFLAGS" | \
12317	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
12318		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
12319
12320				;;
12321			esac
12322			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12323			;;
12324		esac
12325		;;
12326	*)
12327		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12328		;;
12329	esac
12330	;;
12331yes)
12332	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12333
12334	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12335
12336	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12337		&& test -z "${cf_tst_cflags}" \
12338		&& cf_fix_cppflags=no
12339	;;
12340esac
12341done
12342
12343if test -n "$cf_new_cflags" ; then
12344
12345	CFLAGS="$CFLAGS $cf_new_cflags"
12346fi
12347
12348if test -n "$cf_new_cppflags" ; then
12349
12350	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
12351fi
12352
12353if test -n "$cf_new_extra_cppflags" ; then
12354
12355	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12356fi
12357
12358fi
12359
12360# If we have already established that there is a full termcap implementation,
12361# suppress the definitions for terminfo that we make have imported from the
12362# imake-file.
12363if test "x$cf_cv_lib_tgetent" != xno ; then
12364	case "$IMAKE_CFLAGS" in
12365	*-DUSE_TERMINFO\ -DHAVE_TIGETSTR*)
12366
12367	test -n "$verbose" && echo "	removing terminfo flags from IMAKE_CFLAGS" 1>&6
12368
12369echo "${as_me:-configure}:12369: testing removing terminfo flags from IMAKE_CFLAGS ..." 1>&5
12370
12371	IMAKE_CFLAGS=`echo "$IMAKE_CFLAGS" | sed -e 's/-DUSE_TERMINFO[ 	]*-DHAVE_TIGETSTR[ 	]*//'`
12372	test -n "$verbose" && echo "	...result $IMAKE_CFLAGS" 1>&6
12373
12374echo "${as_me:-configure}:12374: testing ...result $IMAKE_CFLAGS ..." 1>&5
12375
12376	test -n "$verbose" && echo "	removing terminfo flags from CPPFLAGS" 1>&6
12377
12378echo "${as_me:-configure}:12378: testing removing terminfo flags from CPPFLAGS ..." 1>&5
12379
12380	CPPFLAGS=`echo "$CPPFLAGS" | sed -e 's/-DUSE_TERMINFO[ 	]*-DHAVE_TIGETSTR[ 	]*//'`
12381	test -n "$verbose" && echo "	...result $CPPFLAGS" 1>&6
12382
12383echo "${as_me:-configure}:12383: testing ...result $CPPFLAGS ..." 1>&5
12384
12385		;;
12386	esac
12387fi
12388
12389echo "$as_me:12389: checking for default terminal-id" >&5
12390echo $ECHO_N "checking for default terminal-id... $ECHO_C" >&6
12391
12392# Check whether --with-terminal-id or --without-terminal-id was given.
12393if test "${with_terminal_id+set}" = set; then
12394  withval="$with_terminal_id"
12395  default_termid=$withval
12396else
12397  default_termid=vt100
12398fi;
12399echo "$as_me:12399: result: $default_termid" >&5
12400echo "${ECHO_T}$default_termid" >&6
12401case $default_termid in
12402vt*)	default_termid=`echo $default_termid | sed -e 's/^..//'`
12403	;;
12404esac
12405cat >>confdefs.h <<EOF
12406#define DFT_DECID "$default_termid"
12407EOF
12408
12409echo "$as_me:12409: checking for default terminal-type" >&5
12410echo $ECHO_N "checking for default terminal-type... $ECHO_C" >&6
12411
12412# Check whether --with-terminal-type or --without-terminal-type was given.
12413if test "${with_terminal_type+set}" = set; then
12414  withval="$with_terminal_type"
12415  default_TERM=$withval
12416else
12417  default_TERM=xterm
12418fi;
12419echo "$as_me:12419: result: $default_TERM" >&5
12420echo "${ECHO_T}$default_TERM" >&6
12421cat >>confdefs.h <<EOF
12422#define DFT_TERMTYPE "$default_TERM"
12423EOF
12424
12425# Extract the first word of "tic", so it can be a program name with args.
12426set dummy tic; ac_word=$2
12427echo "$as_me:12427: checking for $ac_word" >&5
12428echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
12429if test "${ac_cv_prog_cf_tic_prog+set}" = set; then
12430  echo $ECHO_N "(cached) $ECHO_C" >&6
12431else
12432  if test -n "$cf_tic_prog"; then
12433  ac_cv_prog_cf_tic_prog="$cf_tic_prog" # Let the user override the test.
12434else
12435  ac_save_IFS=$IFS; IFS=$ac_path_separator
12436ac_dummy="$PATH"
12437for ac_dir in $ac_dummy; do
12438  IFS=$ac_save_IFS
12439  test -z "$ac_dir" && ac_dir=.
12440  $as_executable_p "$ac_dir/$ac_word" || continue
12441ac_cv_prog_cf_tic_prog="yes"
12442echo "$as_me:12442: found $ac_dir/$ac_word" >&5
12443break
12444done
12445
12446  test -z "$ac_cv_prog_cf_tic_prog" && ac_cv_prog_cf_tic_prog="no"
12447fi
12448fi
12449cf_tic_prog=$ac_cv_prog_cf_tic_prog
12450if test -n "$cf_tic_prog"; then
12451  echo "$as_me:12451: result: $cf_tic_prog" >&5
12452echo "${ECHO_T}$cf_tic_prog" >&6
12453else
12454  echo "$as_me:12454: result: no" >&5
12455echo "${ECHO_T}no" >&6
12456fi
12457
12458if test "$cf_tic_prog" = yes ; then
12459	echo "$as_me:12459: checking for private terminfo-directory" >&5
12460echo $ECHO_N "checking for private terminfo-directory... $ECHO_C" >&6
12461
12462# Check whether --with-own-terminfo or --without-own-terminfo was given.
12463if test "${with_own_terminfo+set}" = set; then
12464  withval="$with_own_terminfo"
12465  TERMINFO_DIR=$withval
12466else
12467  TERMINFO_DIR=${TERMINFO-none}
12468fi;
12469	echo "$as_me:12469: result: $TERMINFO_DIR" >&5
12470echo "${ECHO_T}$TERMINFO_DIR" >&6
12471	if test "$TERMINFO_DIR" = yes ; then
12472		{ echo "$as_me:12472: WARNING: no value given" >&5
12473echo "$as_me: WARNING: no value given" >&2;}
12474	elif test "$TERMINFO_DIR" != none ; then
12475		if test -d $TERMINFO_DIR ; then
12476			cat >>confdefs.h <<EOF
12477#define OWN_TERMINFO_DIR "$TERMINFO_DIR"
12478EOF
12479
12480		else
12481			{ echo "$as_me:12481: WARNING: not a directory" >&5
12482echo "$as_me: WARNING: not a directory" >&2;}
12483		fi
12484	elif test "$prefix" != NONE ; then
12485		TERMINFO_DIR='${prefix}/lib/terminfo'
12486	elif test -d /usr/lib/terminfo ; then
12487		TERMINFO_DIR=/usr/lib/terminfo
12488	else
12489		TERMINFO_DIR=
12490	fi
12491	SET_TERMINFO=
12492	if test -n "$TERMINFO_DIR" ; then
12493		TERMINFO_DIR='$(DESTDIR)'$TERMINFO_DIR
12494		SET_TERMINFO='TERMINFO=$(TERMINFO_DIR)'
12495	fi
12496	no_ticprog=
12497else
12498	no_ticprog="#"
12499	TERMINFO_DIR=
12500	SET_TERMINFO=
12501fi
12502
12503###############################################################################
12504
12505echo "$as_me:12505: checking if you want active-icons" >&5
12506echo $ECHO_N "checking if you want active-icons... $ECHO_C" >&6
12507
12508# Check whether --enable-active-icon or --disable-active-icon was given.
12509if test "${enable_active_icon+set}" = set; then
12510  enableval="$enable_active_icon"
12511  test "$enableval" != no && enableval=yes
12512  if test "$enableval" != "yes" ; then
12513    enable_active_icon=no
12514  else
12515    enable_active_icon=yes
12516  fi
12517else
12518  enableval=yes
12519  enable_active_icon=yes
12520
12521fi;
12522echo "$as_me:12522: result: $enable_active_icon" >&5
12523echo "${ECHO_T}$enable_active_icon" >&6
12524if test "$enable_active_icon" = no ; then
12525	cat >>confdefs.h <<\EOF
12526#define NO_ACTIVE_ICON 1
12527EOF
12528
12529fi
12530
12531echo "$as_me:12531: checking if you want ANSI color" >&5
12532echo $ECHO_N "checking if you want ANSI color... $ECHO_C" >&6
12533
12534# Check whether --enable-ansi-color or --disable-ansi-color was given.
12535if test "${enable_ansi_color+set}" = set; then
12536  enableval="$enable_ansi_color"
12537  test "$enableval" != no && enableval=yes
12538  if test "$enableval" != "yes" ; then
12539    enable_ansi_color=no
12540  else
12541    enable_ansi_color=yes
12542  fi
12543else
12544  enableval=yes
12545  enable_ansi_color=yes
12546
12547fi;
12548echo "$as_me:12548: result: $enable_ansi_color" >&5
12549echo "${ECHO_T}$enable_ansi_color" >&6
12550test "$enable_ansi_color" = no && cat >>confdefs.h <<\EOF
12551#define OPT_ISO_COLORS 0
12552EOF
12553
12554if test "$enable_ansi_color" = yes ; then
12555
12556	echo "$as_me:12556: checking if you want 16 colors like aixterm" >&5
12557echo $ECHO_N "checking if you want 16 colors like aixterm... $ECHO_C" >&6
12558
12559# Check whether --enable-16-color or --disable-16-color was given.
12560if test "${enable_16_color+set}" = set; then
12561  enableval="$enable_16_color"
12562  test "$enableval" != no && enableval=yes
12563  if test "$enableval" != "yes" ; then
12564    enable_16_color=no
12565  else
12566    enable_16_color=yes
12567  fi
12568else
12569  enableval=yes
12570  enable_16_color=yes
12571
12572fi;
12573	echo "$as_me:12573: result: $enable_16_color" >&5
12574echo "${ECHO_T}$enable_16_color" >&6
12575	test "$enable_16_color" = no && cat >>confdefs.h <<\EOF
12576#define OPT_AIX_COLORS 0
12577EOF
12578
12579	echo "$as_me:12579: checking if you want 256 colors" >&5
12580echo $ECHO_N "checking if you want 256 colors... $ECHO_C" >&6
12581
12582# Check whether --enable-256-color or --disable-256-color was given.
12583if test "${enable_256_color+set}" = set; then
12584  enableval="$enable_256_color"
12585  test "$enableval" != yes && enableval=no
12586  if test "$enableval" != "no" ; then
12587    enable_256_color=yes
12588  else
12589    enable_256_color=no
12590  fi
12591else
12592  enableval=no
12593  enable_256_color=no
12594
12595fi;
12596	echo "$as_me:12596: result: $enable_256_color" >&5
12597echo "${ECHO_T}$enable_256_color" >&6
12598	if test "$enable_256_color" = yes ; then
12599		CHARPROC_DEPS="$CHARPROC_DEPS 256colres.h"
12600		EXTRAHDRS="$EXTRAHDRS 256colres.h"
12601		cat >>confdefs.h <<\EOF
12602#define OPT_256_COLORS 1
12603EOF
12604
12605	else
12606	echo "$as_me:12606: checking if you want 88 colors" >&5
12607echo $ECHO_N "checking if you want 88 colors... $ECHO_C" >&6
12608
12609# Check whether --enable-88-color or --disable-88-color was given.
12610if test "${enable_88_color+set}" = set; then
12611  enableval="$enable_88_color"
12612  test "$enableval" != yes && enableval=no
12613  if test "$enableval" != "no" ; then
12614    enable_88_color=yes
12615  else
12616    enable_88_color=no
12617  fi
12618else
12619  enableval=no
12620  enable_88_color=no
12621
12622fi;
12623	echo "$as_me:12623: result: $enable_88_color" >&5
12624echo "${ECHO_T}$enable_88_color" >&6
12625	if test "$enable_88_color" = yes ; then
12626		CHARPROC_DEPS="$CHARPROC_DEPS 88colres.h"
12627		EXTRAHDRS="$EXTRAHDRS 88colres.h"
12628		cat >>confdefs.h <<\EOF
12629#define OPT_88_COLORS 1
12630EOF
12631
12632	fi
12633	fi
12634
12635fi
12636
12637echo "$as_me:12637: checking if you want blinking cursor" >&5
12638echo $ECHO_N "checking if you want blinking cursor... $ECHO_C" >&6
12639
12640# Check whether --enable-blink-cursor or --disable-blink-cursor was given.
12641if test "${enable_blink_cursor+set}" = set; then
12642  enableval="$enable_blink_cursor"
12643  test "$enableval" != no && enableval=yes
12644  if test "$enableval" != "yes" ; then
12645    enable_blink_curs=no
12646  else
12647    enable_blink_curs=yes
12648  fi
12649else
12650  enableval=yes
12651  enable_blink_curs=yes
12652
12653fi;
12654echo "$as_me:12654: result: $enable_blink_curs" >&5
12655echo "${ECHO_T}$enable_blink_curs" >&6
12656test "$enable_blink_curs" = no && cat >>confdefs.h <<\EOF
12657#define OPT_BLINK_CURS 0
12658EOF
12659
12660echo "$as_me:12660: checking if you want to ignore Linux's broken palette-strings" >&5
12661echo $ECHO_N "checking if you want to ignore Linux's broken palette-strings... $ECHO_C" >&6
12662
12663case $host_os in #(vi
12664linux*)
12665	assume_broken_osc=yes ;; #(vi
12666*)
12667	assume_broken_osc=no ;;
12668esac
12669
12670# Check whether --enable-broken-osc or --disable-broken-osc was given.
12671if test "${enable_broken_osc+set}" = set; then
12672  enableval="$enable_broken_osc"
12673  test "$enableval" != no && enableval=yes
12674  if test "$enableval" != "$assume_broken_osc" ; then
12675    enable_broken_osc=$enableval
12676  else
12677    enable_broken_osc=$enableval
12678  fi
12679else
12680  enableval=$assume_broken_osc
12681  enable_broken_osc=$enableval
12682
12683fi;
12684echo "$as_me:12684: result: $enable_broken_osc" >&5
12685echo "${ECHO_T}$enable_broken_osc" >&6
12686if test "$enable_broken_osc" = yes ; then
12687	cat >>confdefs.h <<\EOF
12688#define OPT_BROKEN_OSC 1
12689EOF
12690
12691else
12692	cat >>confdefs.h <<\EOF
12693#define OPT_BROKEN_OSC 0
12694EOF
12695
12696fi
12697
12698echo "$as_me:12698: checking if you want to allow broken string-terminators" >&5
12699echo $ECHO_N "checking if you want to allow broken string-terminators... $ECHO_C" >&6
12700
12701# Check whether --enable-broken-st or --disable-broken-st was given.
12702if test "${enable_broken_st+set}" = set; then
12703  enableval="$enable_broken_st"
12704  test "$enableval" != yes && enableval=no
12705  if test "$enableval" != "no" ; then
12706    enable_broken_st=no
12707  else
12708    enable_broken_st=yes
12709  fi
12710else
12711  enableval=no
12712  enable_broken_st=yes
12713
12714fi;
12715echo "$as_me:12715: result: $enable_broken_st" >&5
12716echo "${ECHO_T}$enable_broken_st" >&6
12717test "$enable_broken_st" = no && cat >>confdefs.h <<\EOF
12718#define OPT_BROKEN_ST 0
12719EOF
12720
12721echo "$as_me:12721: checking if you want printable 128-159" >&5
12722echo $ECHO_N "checking if you want printable 128-159... $ECHO_C" >&6
12723
12724# Check whether --enable-c1-print or --disable-c1-print was given.
12725if test "${enable_c1_print+set}" = set; then
12726  enableval="$enable_c1_print"
12727  test "$enableval" != no && enableval=yes
12728  if test "$enableval" != "yes" ; then
12729    enable_c1_print=no
12730  else
12731    enable_c1_print=yes
12732  fi
12733else
12734  enableval=yes
12735  enable_c1_print=yes
12736
12737fi;
12738echo "$as_me:12738: result: $enable_c1_print" >&5
12739echo "${ECHO_T}$enable_c1_print" >&6
12740test "$enable_c1_print" = no && cat >>confdefs.h <<\EOF
12741#define OPT_C1_PRINT 0
12742EOF
12743
12744if test "$enable_ansi_color" = yes ; then
12745
12746	echo "$as_me:12746: checking if you want bold colors mapped like IBM PC" >&5
12747echo $ECHO_N "checking if you want bold colors mapped like IBM PC... $ECHO_C" >&6
12748
12749# Check whether --enable-bold-color or --disable-bold-color was given.
12750if test "${enable_bold_color+set}" = set; then
12751  enableval="$enable_bold_color"
12752  test "$enableval" != no && enableval=yes
12753  if test "$enableval" != "yes" ; then
12754    enable_pc_color=no
12755  else
12756    enable_pc_color=yes
12757  fi
12758else
12759  enableval=yes
12760  enable_pc_color=yes
12761
12762fi;
12763	echo "$as_me:12763: result: $enable_pc_color" >&5
12764echo "${ECHO_T}$enable_pc_color" >&6
12765	test "$enable_pc_color" = no && cat >>confdefs.h <<\EOF
12766#define OPT_PC_COLORS 0
12767EOF
12768
12769	echo "$as_me:12769: checking if you want separate color-classes" >&5
12770echo $ECHO_N "checking if you want separate color-classes... $ECHO_C" >&6
12771
12772# Check whether --enable-color-class or --disable-color-class was given.
12773if test "${enable_color_class+set}" = set; then
12774  enableval="$enable_color_class"
12775  test "$enableval" != no && enableval=yes
12776  if test "$enableval" != "yes" ; then
12777    enable_color_class=no
12778  else
12779    enable_color_class=yes
12780  fi
12781else
12782  enableval=yes
12783  enable_color_class=yes
12784
12785fi;
12786	echo "$as_me:12786: result: $enable_color_class" >&5
12787echo "${ECHO_T}$enable_color_class" >&6
12788	test "$enable_color_class" = no && cat >>confdefs.h <<\EOF
12789#define OPT_COLOR_CLASS FALSE
12790EOF
12791
12792	echo "$as_me:12792: checking if you want color-mode enabled by default" >&5
12793echo $ECHO_N "checking if you want color-mode enabled by default... $ECHO_C" >&6
12794
12795# Check whether --enable-color-mode or --disable-color-mode was given.
12796if test "${enable_color_mode+set}" = set; then
12797  enableval="$enable_color_mode"
12798  test "$enableval" != no && enableval=yes
12799  if test "$enableval" != "yes" ; then
12800    default_colormode=no
12801  else
12802    default_colormode=yes
12803  fi
12804else
12805  enableval=yes
12806  default_colormode=yes
12807
12808fi;
12809	echo "$as_me:12809: result: $default_colormode" >&5
12810echo "${ECHO_T}$default_colormode" >&6
12811	test "$default_colormode" = no && cat >>confdefs.h <<\EOF
12812#define DFT_COLORMODE FALSE
12813EOF
12814
12815fi
12816
12817echo "$as_me:12817: checking if you want support for color highlighting" >&5
12818echo $ECHO_N "checking if you want support for color highlighting... $ECHO_C" >&6
12819
12820# Check whether --enable-highlighting or --disable-highlighting was given.
12821if test "${enable_highlighting+set}" = set; then
12822  enableval="$enable_highlighting"
12823  test "$enableval" != no && enableval=yes
12824  if test "$enableval" != "yes" ; then
12825    default_highlight=no
12826  else
12827    default_highlight=yes
12828  fi
12829else
12830  enableval=yes
12831  default_highlight=yes
12832
12833fi;
12834echo "$as_me:12834: result: $default_highlight" >&5
12835echo "${ECHO_T}$default_highlight" >&6
12836test "$default_highlight" = no && cat >>confdefs.h <<\EOF
12837#define OPT_HIGHLIGHT_COLOR 0
12838EOF
12839
12840echo "$as_me:12840: checking if you want support for doublesize characters" >&5
12841echo $ECHO_N "checking if you want support for doublesize characters... $ECHO_C" >&6
12842
12843# Check whether --enable-doublechars or --disable-doublechars was given.
12844if test "${enable_doublechars+set}" = set; then
12845  enableval="$enable_doublechars"
12846  test "$enableval" != no && enableval=yes
12847  if test "$enableval" != "yes" ; then
12848    enable_doublechars=no
12849  else
12850    enable_doublechars=yes
12851  fi
12852else
12853  enableval=yes
12854  enable_doublechars=yes
12855
12856fi;
12857echo "$as_me:12857: result: $enable_doublechars" >&5
12858echo "${ECHO_T}$enable_doublechars" >&6
12859test "$enable_doublechars" = no && cat >>confdefs.h <<\EOF
12860#define OPT_DEC_CHRSET 0
12861EOF
12862
12863echo "$as_me:12863: checking if you want fallback-support for box characters" >&5
12864echo $ECHO_N "checking if you want fallback-support for box characters... $ECHO_C" >&6
12865
12866# Check whether --enable-boxchars or --disable-boxchars was given.
12867if test "${enable_boxchars+set}" = set; then
12868  enableval="$enable_boxchars"
12869  test "$enableval" != no && enableval=yes
12870  if test "$enableval" != "yes" ; then
12871    enable_boxchars=no
12872  else
12873    enable_boxchars=yes
12874  fi
12875else
12876  enableval=yes
12877  enable_boxchars=yes
12878
12879fi;
12880echo "$as_me:12880: result: $enable_boxchars" >&5
12881echo "${ECHO_T}$enable_boxchars" >&6
12882test "$enable_boxchars" = no && cat >>confdefs.h <<\EOF
12883#define OPT_BOX_CHARS 0
12884EOF
12885
12886echo "$as_me:12886: checking if you want to allow spawning new xterms" >&5
12887echo $ECHO_N "checking if you want to allow spawning new xterms... $ECHO_C" >&6
12888
12889# Check whether --enable-exec-xterm or --disable-exec-xterm was given.
12890if test "${enable_exec_xterm+set}" = set; then
12891  enableval="$enable_exec_xterm"
12892  test "$enableval" != yes && enableval=no
12893  if test "$enableval" != "no" ; then
12894    enable_exec_xterm=yes
12895  else
12896    enable_exec_xterm=no
12897  fi
12898else
12899  enableval=no
12900  enable_exec_xterm=no
12901
12902fi;
12903echo "$as_me:12903: result: $enable_exec_xterm" >&5
12904echo "${ECHO_T}$enable_exec_xterm" >&6
12905if test "$enable_exec_xterm" = yes ; then
12906
12907echo "$as_me:12907: checking for proc tree with cwd-support" >&5
12908echo $ECHO_N "checking for proc tree with cwd-support... $ECHO_C" >&6
12909if test "${cf_cv_procfs_cwd+set}" = set; then
12910  echo $ECHO_N "(cached) $ECHO_C" >&6
12911else
12912
12913cf_cv_procfs_cwd=no
12914for cf_path in /proc /compat/linux/proc /usr/compat/linux/proc
12915do
12916	if test -d $cf_path && \
12917	   test -d $cf_path/$$ && \
12918	   ( test -d $cf_path/$$/cwd || \
12919	     test -L $cf_path/$$/cwd ); then
12920		cf_cv_procfs_cwd=$cf_path
12921		break
12922	fi
12923done
12924
12925fi
12926echo "$as_me:12926: result: $cf_cv_procfs_cwd" >&5
12927echo "${ECHO_T}$cf_cv_procfs_cwd" >&6
12928
12929	if test "$cf_cv_procfs_cwd" = no ; then
12930		{ echo "$as_me:12930: WARNING: no suitable proc filesystem found" >&5
12931echo "$as_me: WARNING: no suitable proc filesystem found" >&2;}
12932	else
12933		cat >>confdefs.h <<EOF
12934#define PROCFS_ROOT "$cf_cv_procfs_cwd"
12935EOF
12936
12937		cat >>confdefs.h <<\EOF
12938#define OPT_EXEC_XTERM 1
12939EOF
12940
12941	fi
12942fi
12943
12944echo "$as_me:12944: checking if you want to use FreeType library" >&5
12945echo $ECHO_N "checking if you want to use FreeType library... $ECHO_C" >&6
12946
12947# Check whether --enable-freetype or --disable-freetype was given.
12948if test "${enable_freetype+set}" = set; then
12949  enableval="$enable_freetype"
12950  test "$enableval" != no && enableval=yes
12951  if test "$enableval" != "yes" ; then
12952    enable_freetype=no
12953  else
12954    enable_freetype=yes
12955  fi
12956else
12957  enableval=yes
12958  enable_freetype=yes
12959
12960fi;
12961echo "$as_me:12961: result: $enable_freetype" >&5
12962echo "${ECHO_T}$enable_freetype" >&6
12963if test "$enable_freetype" = yes ; then
12964
12965cf_extra_freetype_libs=
12966FREETYPE_CONFIG=none
12967FREETYPE_PARAMS=
12968
12969echo "$as_me:12969: checking if you specified -D/-I options for FreeType" >&5
12970echo $ECHO_N "checking if you specified -D/-I options for FreeType... $ECHO_C" >&6
12971
12972# Check whether --with-freetype-cflags or --without-freetype-cflags was given.
12973if test "${with_freetype_cflags+set}" = set; then
12974  withval="$with_freetype_cflags"
12975  cf_cv_x_freetype_incs="$with_freetype_cflags"
12976else
12977  cf_cv_x_freetype_incs=no
12978fi;
12979echo "$as_me:12979: result: $cf_cv_x_freetype_incs" >&5
12980echo "${ECHO_T}$cf_cv_x_freetype_incs" >&6
12981
12982echo "$as_me:12982: checking if you specified -L/-l options for FreeType" >&5
12983echo $ECHO_N "checking if you specified -L/-l options for FreeType... $ECHO_C" >&6
12984
12985# Check whether --with-freetype-libs or --without-freetype-libs was given.
12986if test "${with_freetype_libs+set}" = set; then
12987  withval="$with_freetype_libs"
12988  cf_cv_x_freetype_libs="$with_freetype_libs"
12989else
12990  cf_cv_x_freetype_libs=no
12991fi;
12992echo "$as_me:12992: result: $cf_cv_x_freetype_libs" >&5
12993echo "${ECHO_T}$cf_cv_x_freetype_libs" >&6
12994
12995if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xft; then
12996	FREETYPE_CONFIG=$PKG_CONFIG
12997	FREETYPE_PARAMS=xft
12998else
12999	# Extract the first word of "xft-config", so it can be a program name with args.
13000set dummy xft-config; ac_word=$2
13001echo "$as_me:13001: checking for $ac_word" >&5
13002echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
13003if test "${ac_cv_path_FREETYPE_XFT_CONFIG+set}" = set; then
13004  echo $ECHO_N "(cached) $ECHO_C" >&6
13005else
13006  case $FREETYPE_XFT_CONFIG in
13007  [\\/]* | ?:[\\/]*)
13008  ac_cv_path_FREETYPE_XFT_CONFIG="$FREETYPE_XFT_CONFIG" # Let the user override the test with a path.
13009  ;;
13010  *)
13011  ac_save_IFS=$IFS; IFS=$ac_path_separator
13012ac_dummy="$PATH"
13013for ac_dir in $ac_dummy; do
13014  IFS=$ac_save_IFS
13015  test -z "$ac_dir" && ac_dir=.
13016  if $as_executable_p "$ac_dir/$ac_word"; then
13017   ac_cv_path_FREETYPE_XFT_CONFIG="$ac_dir/$ac_word"
13018   echo "$as_me:13018: found $ac_dir/$ac_word" >&5
13019   break
13020fi
13021done
13022
13023  test -z "$ac_cv_path_FREETYPE_XFT_CONFIG" && ac_cv_path_FREETYPE_XFT_CONFIG="none"
13024  ;;
13025esac
13026fi
13027FREETYPE_XFT_CONFIG=$ac_cv_path_FREETYPE_XFT_CONFIG
13028
13029if test -n "$FREETYPE_XFT_CONFIG"; then
13030  echo "$as_me:13030: result: $FREETYPE_XFT_CONFIG" >&5
13031echo "${ECHO_T}$FREETYPE_XFT_CONFIG" >&6
13032else
13033  echo "$as_me:13033: result: no" >&5
13034echo "${ECHO_T}no" >&6
13035fi
13036
13037	if test "$FREETYPE_XFT_CONFIG" != none; then
13038		FREETYPE_CONFIG=$FREETYPE_XFT_CONFIG
13039	else
13040		cf_extra_freetype_libs="-lXft"
13041		# Extract the first word of "freetype-config", so it can be a program name with args.
13042set dummy freetype-config; ac_word=$2
13043echo "$as_me:13043: checking for $ac_word" >&5
13044echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
13045if test "${ac_cv_path_FREETYPE_OLD_CONFIG+set}" = set; then
13046  echo $ECHO_N "(cached) $ECHO_C" >&6
13047else
13048  case $FREETYPE_OLD_CONFIG in
13049  [\\/]* | ?:[\\/]*)
13050  ac_cv_path_FREETYPE_OLD_CONFIG="$FREETYPE_OLD_CONFIG" # Let the user override the test with a path.
13051  ;;
13052  *)
13053  ac_save_IFS=$IFS; IFS=$ac_path_separator
13054ac_dummy="$PATH"
13055for ac_dir in $ac_dummy; do
13056  IFS=$ac_save_IFS
13057  test -z "$ac_dir" && ac_dir=.
13058  if $as_executable_p "$ac_dir/$ac_word"; then
13059   ac_cv_path_FREETYPE_OLD_CONFIG="$ac_dir/$ac_word"
13060   echo "$as_me:13060: found $ac_dir/$ac_word" >&5
13061   break
13062fi
13063done
13064
13065  test -z "$ac_cv_path_FREETYPE_OLD_CONFIG" && ac_cv_path_FREETYPE_OLD_CONFIG="none"
13066  ;;
13067esac
13068fi
13069FREETYPE_OLD_CONFIG=$ac_cv_path_FREETYPE_OLD_CONFIG
13070
13071if test -n "$FREETYPE_OLD_CONFIG"; then
13072  echo "$as_me:13072: result: $FREETYPE_OLD_CONFIG" >&5
13073echo "${ECHO_T}$FREETYPE_OLD_CONFIG" >&6
13074else
13075  echo "$as_me:13075: result: no" >&5
13076echo "${ECHO_T}no" >&6
13077fi
13078
13079		if test "$FREETYPE_OLD_CONFIG" != none; then
13080			FREETYPE_CONFIG=$FREETYPE_OLD_CONFIG
13081		fi
13082	fi
13083fi
13084echo "$as_me:13084: checking for FreeType config" >&5
13085echo $ECHO_N "checking for FreeType config... $ECHO_C" >&6
13086echo "$as_me:13086: result: $FREETYPE_CONFIG $FREETYPE_PARAMS" >&5
13087echo "${ECHO_T}$FREETYPE_CONFIG $FREETYPE_PARAMS" >&6
13088
13089if test "$FREETYPE_CONFIG" != none ; then
13090
13091	if test "$cf_cv_x_freetype_incs" = no ; then
13092		echo "$as_me:13092: checking for $FREETYPE_CONFIG cflags" >&5
13093echo $ECHO_N "checking for $FREETYPE_CONFIG cflags... $ECHO_C" >&6
13094		cf_cv_x_freetype_incs="`$FREETYPE_CONFIG $FREETYPE_PARAMS --cflags 2>/dev/null`"
13095		echo "$as_me:13095: result: $cf_cv_x_freetype_incs" >&5
13096echo "${ECHO_T}$cf_cv_x_freetype_incs" >&6
13097	fi
13098
13099	if test "$cf_cv_x_freetype_libs" = no ; then
13100		echo "$as_me:13100: checking for $FREETYPE_CONFIG libs" >&5
13101echo $ECHO_N "checking for $FREETYPE_CONFIG libs... $ECHO_C" >&6
13102		cf_cv_x_freetype_libs="$cf_extra_freetype_libs `$FREETYPE_CONFIG $FREETYPE_PARAMS --libs 2>/dev/null`"
13103		echo "$as_me:13103: result: $cf_cv_x_freetype_libs" >&5
13104echo "${ECHO_T}$cf_cv_x_freetype_libs" >&6
13105	fi
13106
13107fi
13108
13109if test "$cf_cv_x_freetype_incs" = no ; then
13110	cf_cv_x_freetype_incs=
13111fi
13112
13113if test "$cf_cv_x_freetype_libs" = no ; then
13114	cf_cv_x_freetype_libs=-lXft
13115fi
13116
13117echo "$as_me:13117: checking if we can link with FreeType libraries" >&5
13118echo $ECHO_N "checking if we can link with FreeType libraries... $ECHO_C" >&6
13119
13120cf_save_LIBS="$LIBS"
13121cf_save_INCS="$CPPFLAGS"
13122
13123LIBS="$cf_cv_x_freetype_libs $LIBS"
13124CPPFLAGS="$CPPFLAGS $cf_cv_x_freetype_incs"
13125
13126cat >conftest.$ac_ext <<_ACEOF
13127#line 13127 "configure"
13128#include "confdefs.h"
13129
13130#include <X11/Xlib.h>
13131#include <X11/extensions/Xrender.h>
13132#include <X11/Xft/Xft.h>
13133int
13134main ()
13135{
13136
13137	XftPattern  *pat = XftNameParse ("name");
13138  ;
13139  return 0;
13140}
13141_ACEOF
13142rm -f conftest.$ac_objext conftest$ac_exeext
13143if { (eval echo "$as_me:13143: \"$ac_link\"") >&5
13144  (eval $ac_link) 2>&5
13145  ac_status=$?
13146  echo "$as_me:13146: \$? = $ac_status" >&5
13147  (exit $ac_status); } &&
13148         { ac_try='test -s conftest$ac_exeext'
13149  { (eval echo "$as_me:13149: \"$ac_try\"") >&5
13150  (eval $ac_try) 2>&5
13151  ac_status=$?
13152  echo "$as_me:13152: \$? = $ac_status" >&5
13153  (exit $ac_status); }; }; then
13154  cf_cv_found_freetype=yes
13155else
13156  echo "$as_me: failed program was:" >&5
13157cat conftest.$ac_ext >&5
13158cf_cv_found_freetype=no
13159fi
13160rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13161echo "$as_me:13161: result: $cf_cv_found_freetype" >&5
13162echo "${ECHO_T}$cf_cv_found_freetype" >&6
13163
13164LIBS="$cf_save_LIBS"
13165CPPFLAGS="$cf_save_INCS"
13166
13167if test "$cf_cv_found_freetype" = yes ; then
13168	LIBS="$cf_cv_x_freetype_libs $LIBS"
13169
13170cf_fix_cppflags=no
13171cf_new_cflags=
13172cf_new_cppflags=
13173cf_new_extra_cppflags=
13174
13175for cf_add_cflags in $cf_cv_x_freetype_incs
13176do
13177case $cf_fix_cppflags in
13178no)
13179	case $cf_add_cflags in #(vi
13180	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
13181		case $cf_add_cflags in
13182		-D*)
13183			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13184
13185			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13186				&& test -z "${cf_tst_cflags}" \
13187				&& cf_fix_cppflags=yes
13188
13189			if test $cf_fix_cppflags = yes ; then
13190				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13191				continue
13192			elif test "${cf_tst_cflags}" = "\"'" ; then
13193				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13194				continue
13195			fi
13196			;;
13197		esac
13198		case "$CPPFLAGS" in
13199		*$cf_add_cflags) #(vi
13200			;;
13201		*) #(vi
13202			case $cf_add_cflags in #(vi
13203			-D*)
13204				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13205
13206CPPFLAGS=`echo "$CPPFLAGS" | \
13207	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
13208		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
13209
13210				;;
13211			esac
13212			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13213			;;
13214		esac
13215		;;
13216	*)
13217		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13218		;;
13219	esac
13220	;;
13221yes)
13222	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13223
13224	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13225
13226	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13227		&& test -z "${cf_tst_cflags}" \
13228		&& cf_fix_cppflags=no
13229	;;
13230esac
13231done
13232
13233if test -n "$cf_new_cflags" ; then
13234
13235	CFLAGS="$CFLAGS $cf_new_cflags"
13236fi
13237
13238if test -n "$cf_new_cppflags" ; then
13239
13240	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13241fi
13242
13243if test -n "$cf_new_extra_cppflags" ; then
13244
13245	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13246fi
13247
13248	cat >>confdefs.h <<\EOF
13249#define XRENDERFONT 1
13250EOF
13251
13252for ac_func in \
13253	XftDrawCharSpec \
13254	XftDrawSetClip \
13255	XftDrawSetClipRectangles \
13256
13257do
13258as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13259echo "$as_me:13259: checking for $ac_func" >&5
13260echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13261if eval "test \"\${$as_ac_var+set}\" = set"; then
13262  echo $ECHO_N "(cached) $ECHO_C" >&6
13263else
13264  cat >conftest.$ac_ext <<_ACEOF
13265#line 13265 "configure"
13266#include "confdefs.h"
13267/* System header to define __stub macros and hopefully few prototypes,
13268    which can conflict with char $ac_func (); below.  */
13269#include <assert.h>
13270/* Override any gcc2 internal prototype to avoid an error.  */
13271#ifdef __cplusplus
13272extern "C"
13273#endif
13274/* We use char because int might match the return type of a gcc2
13275   builtin and then its argument prototype would still apply.  */
13276char $ac_func ();
13277char (*f) ();
13278
13279int
13280main ()
13281{
13282/* The GNU C library defines this for functions which it implements
13283    to always fail with ENOSYS.  Some functions are actually named
13284    something starting with __ and the normal name is an alias.  */
13285#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13286choke me
13287#else
13288f = $ac_func;
13289#endif
13290
13291  ;
13292  return 0;
13293}
13294_ACEOF
13295rm -f conftest.$ac_objext conftest$ac_exeext
13296if { (eval echo "$as_me:13296: \"$ac_link\"") >&5
13297  (eval $ac_link) 2>&5
13298  ac_status=$?
13299  echo "$as_me:13299: \$? = $ac_status" >&5
13300  (exit $ac_status); } &&
13301         { ac_try='test -s conftest$ac_exeext'
13302  { (eval echo "$as_me:13302: \"$ac_try\"") >&5
13303  (eval $ac_try) 2>&5
13304  ac_status=$?
13305  echo "$as_me:13305: \$? = $ac_status" >&5
13306  (exit $ac_status); }; }; then
13307  eval "$as_ac_var=yes"
13308else
13309  echo "$as_me: failed program was:" >&5
13310cat conftest.$ac_ext >&5
13311eval "$as_ac_var=no"
13312fi
13313rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13314fi
13315echo "$as_me:13315: result: `eval echo '${'$as_ac_var'}'`" >&5
13316echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13317if test `eval echo '${'$as_ac_var'}'` = yes; then
13318  cat >>confdefs.h <<EOF
13319#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13320EOF
13321
13322fi
13323done
13324
13325else
13326	{ echo "$as_me:13326: WARNING: No libraries found for FreeType" >&5
13327echo "$as_me: WARNING: No libraries found for FreeType" >&2;}
13328	CPPFLAGS=`echo "$CPPFLAGS" | sed -e s/-DXRENDERFONT//`
13329fi
13330
13331# FIXME: revisit this if needed
13332
13333if test "$cf_cv_found_freetype" = yes ; then
13334echo "$as_me:13334: checking for usable Xft/fontconfig package" >&5
13335echo $ECHO_N "checking for usable Xft/fontconfig package... $ECHO_C" >&6
13336if test "${cf_cv_xft_compat+set}" = set; then
13337  echo $ECHO_N "(cached) $ECHO_C" >&6
13338else
13339
13340cat >conftest.$ac_ext <<_ACEOF
13341#line 13341 "configure"
13342#include "confdefs.h"
13343
13344#include <X11/Xft/Xft.h>
13345
13346int
13347main ()
13348{
13349
13350	XftPattern *pat;
13351	XftPatternBuild(pat,
13352					XFT_FAMILY, XftTypeString, "mono",
13353					(void *) 0);
13354
13355  ;
13356  return 0;
13357}
13358_ACEOF
13359rm -f conftest.$ac_objext conftest$ac_exeext
13360if { (eval echo "$as_me:13360: \"$ac_link\"") >&5
13361  (eval $ac_link) 2>&5
13362  ac_status=$?
13363  echo "$as_me:13363: \$? = $ac_status" >&5
13364  (exit $ac_status); } &&
13365         { ac_try='test -s conftest$ac_exeext'
13366  { (eval echo "$as_me:13366: \"$ac_try\"") >&5
13367  (eval $ac_try) 2>&5
13368  ac_status=$?
13369  echo "$as_me:13369: \$? = $ac_status" >&5
13370  (exit $ac_status); }; }; then
13371  cf_cv_xft_compat=yes
13372else
13373  echo "$as_me: failed program was:" >&5
13374cat conftest.$ac_ext >&5
13375cf_cv_xft_compat=no
13376fi
13377rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13378
13379fi
13380echo "$as_me:13380: result: $cf_cv_xft_compat" >&5
13381echo "${ECHO_T}$cf_cv_xft_compat" >&6
13382
13383if test "$cf_cv_xft_compat" = no
13384then
13385	# workaround for broken ".pc" files used for Xft.
13386	case "$cf_cv_x_freetype_libs" in #(vi
13387	*-lfontconfig*) #(vi
13388		;;
13389	*)
13390		test -n "$verbose" && echo "	work around broken package" 1>&6
13391
13392echo "${as_me:-configure}:13392: testing work around broken package ..." 1>&5
13393
13394if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists fontconfig; then
13395	test -n "$verbose" && echo "	found package fontconfig" 1>&6
13396
13397echo "${as_me:-configure}:13397: testing found package fontconfig ..." 1>&5
13398
13399	cf_pkgconfig_incs="`$PKG_CONFIG --cflags fontconfig 2>/dev/null`"
13400	cf_pkgconfig_libs="`$PKG_CONFIG --libs   fontconfig 2>/dev/null`"
13401	test -n "$verbose" && echo "	package fontconfig CFLAGS: $cf_pkgconfig_incs" 1>&6
13402
13403echo "${as_me:-configure}:13403: testing package fontconfig CFLAGS: $cf_pkgconfig_incs ..." 1>&5
13404
13405	test -n "$verbose" && echo "	package fontconfig LIBS: $cf_pkgconfig_libs" 1>&6
13406
13407echo "${as_me:-configure}:13407: testing package fontconfig LIBS: $cf_pkgconfig_libs ..." 1>&5
13408
13409cf_fix_cppflags=no
13410cf_new_cflags=
13411cf_new_cppflags=
13412cf_new_extra_cppflags=
13413
13414for cf_add_cflags in $cf_pkgconfig_incs
13415do
13416case $cf_fix_cppflags in
13417no)
13418	case $cf_add_cflags in #(vi
13419	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
13420		case $cf_add_cflags in
13421		-D*)
13422			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13423
13424			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13425				&& test -z "${cf_tst_cflags}" \
13426				&& cf_fix_cppflags=yes
13427
13428			if test $cf_fix_cppflags = yes ; then
13429				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13430				continue
13431			elif test "${cf_tst_cflags}" = "\"'" ; then
13432				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13433				continue
13434			fi
13435			;;
13436		esac
13437		case "$CPPFLAGS" in
13438		*$cf_add_cflags) #(vi
13439			;;
13440		*) #(vi
13441			case $cf_add_cflags in #(vi
13442			-D*)
13443				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13444
13445CPPFLAGS=`echo "$CPPFLAGS" | \
13446	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
13447		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
13448
13449				;;
13450			esac
13451			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13452			;;
13453		esac
13454		;;
13455	*)
13456		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13457		;;
13458	esac
13459	;;
13460yes)
13461	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13462
13463	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13464
13465	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13466		&& test -z "${cf_tst_cflags}" \
13467		&& cf_fix_cppflags=no
13468	;;
13469esac
13470done
13471
13472if test -n "$cf_new_cflags" ; then
13473
13474	CFLAGS="$CFLAGS $cf_new_cflags"
13475fi
13476
13477if test -n "$cf_new_cppflags" ; then
13478
13479	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13480fi
13481
13482if test -n "$cf_new_extra_cppflags" ; then
13483
13484	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13485fi
13486
13487	LIBS="$cf_pkgconfig_libs $LIBS"
13488	:
13489else
13490
13491test -n "$verbose" && echo "	...before $LIBS" 1>&6
13492
13493echo "${as_me:-configure}:13493: testing ...before $LIBS ..." 1>&5
13494
13495LIBS=`echo "$LIBS" | sed -e "s/[ 	][ 	]*/ /g" -e "s,-lXft ,-lXft -lfontconfig ," -e 's/  / /g'`
13496test -n "$verbose" && echo "	...after  $LIBS" 1>&6
13497
13498echo "${as_me:-configure}:13498: testing ...after  $LIBS ..." 1>&5
13499
13500fi
13501
13502		;;
13503	esac
13504fi
13505fi
13506
13507else
13508	CPPFLAGS=`echo "$CPPFLAGS" | sed -e s/-DXRENDERFONT//`
13509fi
13510
13511echo "$as_me:13511: checking if you want support for HP-style function keys" >&5
13512echo $ECHO_N "checking if you want support for HP-style function keys... $ECHO_C" >&6
13513
13514# Check whether --enable-hp-fkeys or --disable-hp-fkeys was given.
13515if test "${enable_hp_fkeys+set}" = set; then
13516  enableval="$enable_hp_fkeys"
13517  test "$enableval" != yes && enableval=no
13518  if test "$enableval" != "no" ; then
13519    enable_hp_fkeys=yes
13520  else
13521    enable_hp_fkeys=no
13522  fi
13523else
13524  enableval=no
13525  enable_hp_fkeys=no
13526
13527fi;
13528echo "$as_me:13528: result: $enable_hp_fkeys" >&5
13529echo "${ECHO_T}$enable_hp_fkeys" >&6
13530if test "$enable_hp_fkeys" = yes ; then
13531	cat >>confdefs.h <<\EOF
13532#define OPT_HP_FUNC_KEYS 1
13533EOF
13534
13535fi
13536
13537echo "$as_me:13537: checking if you want support for SCO-style function keys" >&5
13538echo $ECHO_N "checking if you want support for SCO-style function keys... $ECHO_C" >&6
13539
13540# Check whether --enable-sco-fkeys or --disable-sco-fkeys was given.
13541if test "${enable_sco_fkeys+set}" = set; then
13542  enableval="$enable_sco_fkeys"
13543  test "$enableval" != yes && enableval=no
13544  if test "$enableval" != "no" ; then
13545    enable_sco_fkeys=yes
13546  else
13547    enable_sco_fkeys=no
13548  fi
13549else
13550  enableval=no
13551  enable_sco_fkeys=no
13552
13553fi;
13554echo "$as_me:13554: result: $enable_sco_fkeys" >&5
13555echo "${ECHO_T}$enable_sco_fkeys" >&6
13556if test "$enable_sco_fkeys" = yes ; then
13557	cat >>confdefs.h <<\EOF
13558#define OPT_SCO_FUNC_KEYS 1
13559EOF
13560
13561fi
13562
13563echo "$as_me:13563: checking if you want support for Sun-style function keys" >&5
13564echo $ECHO_N "checking if you want support for Sun-style function keys... $ECHO_C" >&6
13565
13566# Check whether --enable-sun-fkeys or --disable-sun-fkeys was given.
13567if test "${enable_sun_fkeys+set}" = set; then
13568  enableval="$enable_sun_fkeys"
13569  test "$enableval" != no && enableval=yes
13570  if test "$enableval" != "yes" ; then
13571    enable_sun_fkeys=no
13572  else
13573    enable_sun_fkeys=yes
13574  fi
13575else
13576  enableval=yes
13577  enable_sun_fkeys=yes
13578
13579fi;
13580echo "$as_me:13580: result: $enable_sun_fkeys" >&5
13581echo "${ECHO_T}$enable_sun_fkeys" >&6
13582if test "$enable_sun_fkeys" = no ; then
13583	cat >>confdefs.h <<\EOF
13584#define OPT_SUN_FUNC_KEYS 0
13585EOF
13586
13587fi
13588
13589echo "$as_me:13589: checking if you want saved-lines stored as a FIFO" >&5
13590echo $ECHO_N "checking if you want saved-lines stored as a FIFO... $ECHO_C" >&6
13591
13592# Check whether --enable-fifo-lines or --disable-fifo-lines was given.
13593if test "${enable_fifo_lines+set}" = set; then
13594  enableval="$enable_fifo_lines"
13595  test "$enableval" != no && enableval=yes
13596  if test "$enableval" != "yes" ; then
13597    enable_fifo_lines=no
13598  else
13599    enable_fifo_lines=yes
13600  fi
13601else
13602  enableval=yes
13603  enable_fifo_lines=yes
13604
13605fi;
13606echo "$as_me:13606: result: $enable_fifo_lines" >&5
13607echo "${ECHO_T}$enable_fifo_lines" >&6
13608if test "$enable_fifo_lines" = yes ; then
13609	cat >>confdefs.h <<\EOF
13610#define OPT_FIFO_LINES 1
13611EOF
13612
13613fi
13614
13615echo "$as_me:13615: checking if you want support for internationalization" >&5
13616echo $ECHO_N "checking if you want support for internationalization... $ECHO_C" >&6
13617
13618# Check whether --enable-i18n or --disable-i18n was given.
13619if test "${enable_i18n+set}" = set; then
13620  enableval="$enable_i18n"
13621  test "$enableval" != no && enableval=yes
13622  if test "$enableval" != "yes" ; then
13623    enable_i18n=no
13624  else
13625    enable_i18n=yes
13626  fi
13627else
13628  enableval=yes
13629  enable_i18n=yes
13630
13631fi;
13632echo "$as_me:13632: result: $enable_i18n" >&5
13633echo "${ECHO_T}$enable_i18n" >&6
13634if test "$enable_i18n" = no ; then
13635	cat >>confdefs.h <<\EOF
13636#define OPT_I18N_SUPPORT 0
13637EOF
13638
13639fi
13640
13641echo "$as_me:13641: checking if you want support for initial-erase setup" >&5
13642echo $ECHO_N "checking if you want support for initial-erase setup... $ECHO_C" >&6
13643
13644# Check whether --enable-initial-erase or --disable-initial-erase was given.
13645if test "${enable_initial_erase+set}" = set; then
13646  enableval="$enable_initial_erase"
13647  test "$enableval" != no && enableval=yes
13648  if test "$enableval" != "yes" ; then
13649    enable_ie=no
13650  else
13651    enable_ie=yes
13652  fi
13653else
13654  enableval=yes
13655  enable_ie=yes
13656
13657fi;
13658echo "$as_me:13658: result: $enable_ie" >&5
13659echo "${ECHO_T}$enable_ie" >&6
13660if test "$enable_ie" = no ; then
13661	cat >>confdefs.h <<\EOF
13662#define OPT_INITIAL_ERASE 0
13663EOF
13664
13665fi
13666
13667echo "$as_me:13667: checking if you want support for input-method" >&5
13668echo $ECHO_N "checking if you want support for input-method... $ECHO_C" >&6
13669
13670# Check whether --enable-input-method or --disable-input-method was given.
13671if test "${enable_input_method+set}" = set; then
13672  enableval="$enable_input_method"
13673  test "$enableval" != no && enableval=yes
13674  if test "$enableval" != "yes" ; then
13675    enable_ximp=no
13676  else
13677    enable_ximp=yes
13678  fi
13679else
13680  enableval=yes
13681  enable_ximp=yes
13682
13683fi;
13684echo "$as_me:13684: result: $enable_ximp" >&5
13685echo "${ECHO_T}$enable_ximp" >&6
13686
13687echo "$as_me:13687: checking if X libraries support input-method" >&5
13688echo $ECHO_N "checking if X libraries support input-method... $ECHO_C" >&6
13689if test "${cf_cv_input_method+set}" = set; then
13690  echo $ECHO_N "(cached) $ECHO_C" >&6
13691else
13692
13693cat >conftest.$ac_ext <<_ACEOF
13694#line 13694 "configure"
13695#include "confdefs.h"
13696
13697#include <X11/IntrinsicP.h>
13698#include <X11/Xatom.h>
13699#include <X11/Xutil.h>
13700#include <X11/Xmu/Atoms.h>
13701#include <X11/Xmu/Converters.h>
13702#include <X11/Xaw/XawImP.h>
13703
13704int
13705main ()
13706{
13707
13708{
13709	XIM xim;
13710	XIMStyles *xim_styles = 0;
13711	XIMStyle input_style;
13712	Widget w = 0;
13713
13714	XSetLocaleModifiers("@im=none");
13715	xim = XOpenIM(XtDisplay(w), NULL, NULL, NULL);
13716	XGetIMValues(xim, XNQueryInputStyle, &xim_styles, NULL);
13717	XCloseIM(xim);
13718	input_style = (XIMPreeditNothing | XIMStatusNothing);
13719}
13720
13721  ;
13722  return 0;
13723}
13724_ACEOF
13725rm -f conftest.$ac_objext conftest$ac_exeext
13726if { (eval echo "$as_me:13726: \"$ac_link\"") >&5
13727  (eval $ac_link) 2>&5
13728  ac_status=$?
13729  echo "$as_me:13729: \$? = $ac_status" >&5
13730  (exit $ac_status); } &&
13731         { ac_try='test -s conftest$ac_exeext'
13732  { (eval echo "$as_me:13732: \"$ac_try\"") >&5
13733  (eval $ac_try) 2>&5
13734  ac_status=$?
13735  echo "$as_me:13735: \$? = $ac_status" >&5
13736  (exit $ac_status); }; }; then
13737  cf_cv_input_method=yes
13738else
13739  echo "$as_me: failed program was:" >&5
13740cat conftest.$ac_ext >&5
13741cf_cv_input_method=no
13742fi
13743rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13744fi
13745echo "$as_me:13745: result: $cf_cv_input_method" >&5
13746echo "${ECHO_T}$cf_cv_input_method" >&6
13747
13748test "$cf_cv_input_method" = no && enable_ximp=no
13749if test "$enable_ximp" = no ; then
13750	cat >>confdefs.h <<\EOF
13751#define OPT_INPUT_METHOD 0
13752EOF
13753
13754fi
13755
13756echo "$as_me:13756: checking if you want support for load-vt-fonts" >&5
13757echo $ECHO_N "checking if you want support for load-vt-fonts... $ECHO_C" >&6
13758
13759# Check whether --enable-load-vt-fonts or --disable-load-vt-fonts was given.
13760if test "${enable_load_vt_fonts+set}" = set; then
13761  enableval="$enable_load_vt_fonts"
13762  test "$enableval" != yes && enableval=no
13763  if test "$enableval" != "no" ; then
13764    enable_load_vt_fonts=yes
13765  else
13766    enable_load_vt_fonts=no
13767  fi
13768else
13769  enableval=no
13770  enable_load_vt_fonts=no
13771
13772fi;
13773echo "$as_me:13773: result: $enable_load_vt_fonts" >&5
13774echo "${ECHO_T}$enable_load_vt_fonts" >&6
13775if test "$enable_load_vt_fonts" = yes ; then
13776	cat >>confdefs.h <<\EOF
13777#define OPT_LOAD_VTFONTS 1
13778EOF
13779
13780fi
13781
13782echo "$as_me:13782: checking if you want support for logging" >&5
13783echo $ECHO_N "checking if you want support for logging... $ECHO_C" >&6
13784
13785# Check whether --enable-logging or --disable-logging was given.
13786if test "${enable_logging+set}" = set; then
13787  enableval="$enable_logging"
13788  test "$enableval" != yes && enableval=no
13789  if test "$enableval" != "no" ; then
13790    enable_logging=yes
13791  else
13792    enable_logging=no
13793  fi
13794else
13795  enableval=no
13796  enable_logging=no
13797
13798fi;
13799echo "$as_me:13799: result: $enable_logging" >&5
13800echo "${ECHO_T}$enable_logging" >&6
13801if test "$enable_logging" = yes ; then
13802	cat >>confdefs.h <<\EOF
13803#define ALLOWLOGGING 1
13804EOF
13805
13806	echo "$as_me:13806: checking if you want to allow logging via a pipe" >&5
13807echo $ECHO_N "checking if you want to allow logging via a pipe... $ECHO_C" >&6
13808
13809# Check whether --enable-logfile-exec or --disable-logfile-exec was given.
13810if test "${enable_logfile_exec+set}" = set; then
13811  enableval="$enable_logfile_exec"
13812  test "$enableval" != yes && enableval=no
13813  if test "$enableval" != "no" ; then
13814    enable_log_exec=yes
13815  else
13816    enable_log_exec=no
13817  fi
13818else
13819  enableval=no
13820  enable_log_exec=no
13821
13822fi;
13823	echo "$as_me:13823: result: $enable_log_exec" >&5
13824echo "${ECHO_T}$enable_log_exec" >&6
13825	if test "$enable_log_exec" = yes ; then
13826		cat >>confdefs.h <<\EOF
13827#define ALLOWLOGFILEEXEC 1
13828EOF
13829
13830	fi
13831fi
13832
13833echo "$as_me:13833: checking if you want support for iconify/maximize translations" >&5
13834echo $ECHO_N "checking if you want support for iconify/maximize translations... $ECHO_C" >&6
13835
13836# Check whether --enable-maximize or --disable-maximize was given.
13837if test "${enable_maximize+set}" = set; then
13838  enableval="$enable_maximize"
13839  test "$enableval" != no && enableval=yes
13840  if test "$enableval" != "yes" ; then
13841    enable_maximize=no
13842  else
13843    enable_maximize=yes
13844  fi
13845else
13846  enableval=yes
13847  enable_maximize=yes
13848
13849fi;
13850echo "$as_me:13850: result: $enable_maximize" >&5
13851echo "${ECHO_T}$enable_maximize" >&6
13852test "$enable_maximize" = no && cat >>confdefs.h <<\EOF
13853#define OPT_MAXIMIZE 0
13854EOF
13855
13856echo "$as_me:13856: checking if you want NumLock to override keyboard tables" >&5
13857echo $ECHO_N "checking if you want NumLock to override keyboard tables... $ECHO_C" >&6
13858
13859# Check whether --enable-num-lock or --disable-num-lock was given.
13860if test "${enable_num_lock+set}" = set; then
13861  enableval="$enable_num_lock"
13862  test "$enableval" != no && enableval=yes
13863  if test "$enableval" != "yes" ; then
13864    enable_numlock=no
13865  else
13866    enable_numlock=yes
13867  fi
13868else
13869  enableval=yes
13870  enable_numlock=yes
13871
13872fi;
13873echo "$as_me:13873: result: $enable_numlock" >&5
13874echo "${ECHO_T}$enable_numlock" >&6
13875test "$enable_numlock" = no && cat >>confdefs.h <<\EOF
13876#define OPT_NUM_LOCK 0
13877EOF
13878
13879echo "$as_me:13879: checking if you want support for get/set of base64 selection data" >&5
13880echo $ECHO_N "checking if you want support for get/set of base64 selection data... $ECHO_C" >&6
13881
13882# Check whether --enable-paste64 or --disable-paste64 was given.
13883if test "${enable_paste64+set}" = set; then
13884  enableval="$enable_paste64"
13885  test "$enableval" != no && enableval=yes
13886  if test "$enableval" != "yes" ; then
13887    enable_paste64=no
13888  else
13889    enable_paste64=yes
13890  fi
13891else
13892  enableval=yes
13893  enable_paste64=yes
13894
13895fi;
13896echo "$as_me:13896: result: $enable_paste64" >&5
13897echo "${ECHO_T}$enable_paste64" >&6
13898if test "$enable_paste64" = yes ; then
13899	cat >>confdefs.h <<\EOF
13900#define OPT_PASTE64 1
13901EOF
13902
13903else
13904	cat >>confdefs.h <<\EOF
13905#define OPT_PASTE64 0
13906EOF
13907
13908fi
13909
13910echo "$as_me:13910: checking if you want support for pty-handshaking" >&5
13911echo $ECHO_N "checking if you want support for pty-handshaking... $ECHO_C" >&6
13912
13913# Check whether --enable-pty-handshake or --disable-pty-handshake was given.
13914if test "${enable_pty_handshake+set}" = set; then
13915  enableval="$enable_pty_handshake"
13916  test "$enableval" != no && enableval=yes
13917  if test "$enableval" != "yes" ; then
13918    enable_pty_handshake=no
13919  else
13920    enable_pty_handshake=yes
13921  fi
13922else
13923  enableval=yes
13924  enable_pty_handshake=yes
13925
13926fi;
13927echo "$as_me:13927: result: $enable_pty_handshake" >&5
13928echo "${ECHO_T}$enable_pty_handshake" >&6
13929if test "$enable_pty_handshake" = yes ; then
13930	cat >>confdefs.h <<\EOF
13931#define OPT_PTY_HANDSHAKE 1
13932EOF
13933
13934else
13935	cat >>confdefs.h <<\EOF
13936#define OPT_PTY_HANDSHAKE 0
13937EOF
13938
13939fi
13940
13941echo "$as_me:13941: checking if you want support for mouse in readline applications" >&5
13942echo $ECHO_N "checking if you want support for mouse in readline applications... $ECHO_C" >&6
13943
13944# Check whether --enable-readline-mouse or --disable-readline-mouse was given.
13945if test "${enable_readline_mouse+set}" = set; then
13946  enableval="$enable_readline_mouse"
13947  test "$enableval" != yes && enableval=no
13948  if test "$enableval" != "no" ; then
13949    enable_readline_mouse=yes
13950  else
13951    enable_readline_mouse=no
13952  fi
13953else
13954  enableval=no
13955  enable_readline_mouse=no
13956
13957fi;
13958echo "$as_me:13958: result: $enable_readline_mouse" >&5
13959echo "${ECHO_T}$enable_readline_mouse" >&6
13960if test "$enable_readline_mouse" = yes ; then
13961	cat >>confdefs.h <<\EOF
13962#define OPT_READLINE 1
13963EOF
13964
13965fi
13966
13967echo "$as_me:13967: checking if you want support for regular-expression selections" >&5
13968echo $ECHO_N "checking if you want support for regular-expression selections... $ECHO_C" >&6
13969
13970# Check whether --enable-regex or --disable-regex was given.
13971if test "${enable_regex+set}" = set; then
13972  enableval="$enable_regex"
13973  test "$enableval" != no && enableval=yes
13974  if test "$enableval" != "yes" ; then
13975    enable_regex=no
13976  else
13977    enable_regex=yes
13978  fi
13979else
13980  enableval=yes
13981  enable_regex=yes
13982
13983fi;
13984echo "$as_me:13984: result: $enable_regex" >&5
13985echo "${ECHO_T}$enable_regex" >&6
13986if test "$enable_regex" = yes ; then
13987
13988echo "$as_me:13988: checking if you want to use PCRE for regular-expressions" >&5
13989echo $ECHO_N "checking if you want to use PCRE for regular-expressions... $ECHO_C" >&6
13990
13991# Check whether --with-pcre or --without-pcre was given.
13992if test "${with_pcre+set}" = set; then
13993  withval="$with_pcre"
13994
13995fi;
13996test -z "$with_pcre" && with_pcre=no
13997echo "$as_me:13997: result: $with_pcre" >&5
13998echo "${ECHO_T}$with_pcre" >&6
13999
14000if test "$with_pcre" != no ; then
14001
14002if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists libpcre; then
14003	test -n "$verbose" && echo "	found package libpcre" 1>&6
14004
14005echo "${as_me:-configure}:14005: testing found package libpcre ..." 1>&5
14006
14007	cf_pkgconfig_incs="`$PKG_CONFIG --cflags libpcre 2>/dev/null`"
14008	cf_pkgconfig_libs="`$PKG_CONFIG --libs   libpcre 2>/dev/null`"
14009	test -n "$verbose" && echo "	package libpcre CFLAGS: $cf_pkgconfig_incs" 1>&6
14010
14011echo "${as_me:-configure}:14011: testing package libpcre CFLAGS: $cf_pkgconfig_incs ..." 1>&5
14012
14013	test -n "$verbose" && echo "	package libpcre LIBS: $cf_pkgconfig_libs" 1>&6
14014
14015echo "${as_me:-configure}:14015: testing package libpcre LIBS: $cf_pkgconfig_libs ..." 1>&5
14016
14017cf_fix_cppflags=no
14018cf_new_cflags=
14019cf_new_cppflags=
14020cf_new_extra_cppflags=
14021
14022for cf_add_cflags in $cf_pkgconfig_incs
14023do
14024case $cf_fix_cppflags in
14025no)
14026	case $cf_add_cflags in #(vi
14027	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
14028		case $cf_add_cflags in
14029		-D*)
14030			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14031
14032			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
14033				&& test -z "${cf_tst_cflags}" \
14034				&& cf_fix_cppflags=yes
14035
14036			if test $cf_fix_cppflags = yes ; then
14037				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14038				continue
14039			elif test "${cf_tst_cflags}" = "\"'" ; then
14040				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14041				continue
14042			fi
14043			;;
14044		esac
14045		case "$CPPFLAGS" in
14046		*$cf_add_cflags) #(vi
14047			;;
14048		*) #(vi
14049			case $cf_add_cflags in #(vi
14050			-D*)
14051				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14052
14053CPPFLAGS=`echo "$CPPFLAGS" | \
14054	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
14055		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
14056
14057				;;
14058			esac
14059			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
14060			;;
14061		esac
14062		;;
14063	*)
14064		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
14065		;;
14066	esac
14067	;;
14068yes)
14069	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14070
14071	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14072
14073	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
14074		&& test -z "${cf_tst_cflags}" \
14075		&& cf_fix_cppflags=no
14076	;;
14077esac
14078done
14079
14080if test -n "$cf_new_cflags" ; then
14081
14082	CFLAGS="$CFLAGS $cf_new_cflags"
14083fi
14084
14085if test -n "$cf_new_cppflags" ; then
14086
14087	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
14088fi
14089
14090if test -n "$cf_new_extra_cppflags" ; then
14091
14092	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
14093fi
14094
14095	LIBS="$cf_pkgconfig_libs $LIBS"
14096	:
14097else
14098
14099echo "$as_me:14099: checking for pcre_compile in -lpcre" >&5
14100echo $ECHO_N "checking for pcre_compile in -lpcre... $ECHO_C" >&6
14101if test "${ac_cv_lib_pcre_pcre_compile+set}" = set; then
14102  echo $ECHO_N "(cached) $ECHO_C" >&6
14103else
14104  ac_check_lib_save_LIBS=$LIBS
14105LIBS="-lpcre  $LIBS"
14106cat >conftest.$ac_ext <<_ACEOF
14107#line 14107 "configure"
14108#include "confdefs.h"
14109
14110/* Override any gcc2 internal prototype to avoid an error.  */
14111#ifdef __cplusplus
14112extern "C"
14113#endif
14114/* We use char because int might match the return type of a gcc2
14115   builtin and then its argument prototype would still apply.  */
14116char pcre_compile ();
14117int
14118main ()
14119{
14120pcre_compile ();
14121  ;
14122  return 0;
14123}
14124_ACEOF
14125rm -f conftest.$ac_objext conftest$ac_exeext
14126if { (eval echo "$as_me:14126: \"$ac_link\"") >&5
14127  (eval $ac_link) 2>&5
14128  ac_status=$?
14129  echo "$as_me:14129: \$? = $ac_status" >&5
14130  (exit $ac_status); } &&
14131         { ac_try='test -s conftest$ac_exeext'
14132  { (eval echo "$as_me:14132: \"$ac_try\"") >&5
14133  (eval $ac_try) 2>&5
14134  ac_status=$?
14135  echo "$as_me:14135: \$? = $ac_status" >&5
14136  (exit $ac_status); }; }; then
14137  ac_cv_lib_pcre_pcre_compile=yes
14138else
14139  echo "$as_me: failed program was:" >&5
14140cat conftest.$ac_ext >&5
14141ac_cv_lib_pcre_pcre_compile=no
14142fi
14143rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14144LIBS=$ac_check_lib_save_LIBS
14145fi
14146echo "$as_me:14146: result: $ac_cv_lib_pcre_pcre_compile" >&5
14147echo "${ECHO_T}$ac_cv_lib_pcre_pcre_compile" >&6
14148if test $ac_cv_lib_pcre_pcre_compile = yes; then
14149  cat >>confdefs.h <<EOF
14150#define HAVE_LIBPCRE 1
14151EOF
14152
14153  LIBS="-lpcre $LIBS"
14154
14155else
14156  { { echo "$as_me:14156: error: Cannot find PCRE library" >&5
14157echo "$as_me: error: Cannot find PCRE library" >&2;}
14158   { (exit 1); exit 1; }; }
14159fi
14160
14161fi
14162
14163		cat >>confdefs.h <<\EOF
14164#define HAVE_LIB_PCRE 1
14165EOF
14166
14167		case $LIBS in #(vi
14168		*pcreposix*) #(vi
14169			;;
14170		*)
14171			echo "$as_me:14171: checking for pcreposix_regcomp in -lpcreposix" >&5
14172echo $ECHO_N "checking for pcreposix_regcomp in -lpcreposix... $ECHO_C" >&6
14173if test "${ac_cv_lib_pcreposix_pcreposix_regcomp+set}" = set; then
14174  echo $ECHO_N "(cached) $ECHO_C" >&6
14175else
14176  ac_check_lib_save_LIBS=$LIBS
14177LIBS="-lpcreposix  $LIBS"
14178cat >conftest.$ac_ext <<_ACEOF
14179#line 14179 "configure"
14180#include "confdefs.h"
14181
14182/* Override any gcc2 internal prototype to avoid an error.  */
14183#ifdef __cplusplus
14184extern "C"
14185#endif
14186/* We use char because int might match the return type of a gcc2
14187   builtin and then its argument prototype would still apply.  */
14188char pcreposix_regcomp ();
14189int
14190main ()
14191{
14192pcreposix_regcomp ();
14193  ;
14194  return 0;
14195}
14196_ACEOF
14197rm -f conftest.$ac_objext conftest$ac_exeext
14198if { (eval echo "$as_me:14198: \"$ac_link\"") >&5
14199  (eval $ac_link) 2>&5
14200  ac_status=$?
14201  echo "$as_me:14201: \$? = $ac_status" >&5
14202  (exit $ac_status); } &&
14203         { ac_try='test -s conftest$ac_exeext'
14204  { (eval echo "$as_me:14204: \"$ac_try\"") >&5
14205  (eval $ac_try) 2>&5
14206  ac_status=$?
14207  echo "$as_me:14207: \$? = $ac_status" >&5
14208  (exit $ac_status); }; }; then
14209  ac_cv_lib_pcreposix_pcreposix_regcomp=yes
14210else
14211  echo "$as_me: failed program was:" >&5
14212cat conftest.$ac_ext >&5
14213ac_cv_lib_pcreposix_pcreposix_regcomp=no
14214fi
14215rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14216LIBS=$ac_check_lib_save_LIBS
14217fi
14218echo "$as_me:14218: result: $ac_cv_lib_pcreposix_pcreposix_regcomp" >&5
14219echo "${ECHO_T}$ac_cv_lib_pcreposix_pcreposix_regcomp" >&6
14220if test $ac_cv_lib_pcreposix_pcreposix_regcomp = yes; then
14221  cat >>confdefs.h <<\EOF
14222#define HAVE_PCREPOSIX_H 1
14223EOF
14224
14225				 LIBS="-lpcreposix $LIBS"
14226else
14227  echo "$as_me:14227: checking for regcomp in -lpcreposix" >&5
14228echo $ECHO_N "checking for regcomp in -lpcreposix... $ECHO_C" >&6
14229if test "${ac_cv_lib_pcreposix_regcomp+set}" = set; then
14230  echo $ECHO_N "(cached) $ECHO_C" >&6
14231else
14232  ac_check_lib_save_LIBS=$LIBS
14233LIBS="-lpcreposix  $LIBS"
14234cat >conftest.$ac_ext <<_ACEOF
14235#line 14235 "configure"
14236#include "confdefs.h"
14237
14238/* Override any gcc2 internal prototype to avoid an error.  */
14239#ifdef __cplusplus
14240extern "C"
14241#endif
14242/* We use char because int might match the return type of a gcc2
14243   builtin and then its argument prototype would still apply.  */
14244char regcomp ();
14245int
14246main ()
14247{
14248regcomp ();
14249  ;
14250  return 0;
14251}
14252_ACEOF
14253rm -f conftest.$ac_objext conftest$ac_exeext
14254if { (eval echo "$as_me:14254: \"$ac_link\"") >&5
14255  (eval $ac_link) 2>&5
14256  ac_status=$?
14257  echo "$as_me:14257: \$? = $ac_status" >&5
14258  (exit $ac_status); } &&
14259         { ac_try='test -s conftest$ac_exeext'
14260  { (eval echo "$as_me:14260: \"$ac_try\"") >&5
14261  (eval $ac_try) 2>&5
14262  ac_status=$?
14263  echo "$as_me:14263: \$? = $ac_status" >&5
14264  (exit $ac_status); }; }; then
14265  ac_cv_lib_pcreposix_regcomp=yes
14266else
14267  echo "$as_me: failed program was:" >&5
14268cat conftest.$ac_ext >&5
14269ac_cv_lib_pcreposix_regcomp=no
14270fi
14271rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14272LIBS=$ac_check_lib_save_LIBS
14273fi
14274echo "$as_me:14274: result: $ac_cv_lib_pcreposix_regcomp" >&5
14275echo "${ECHO_T}$ac_cv_lib_pcreposix_regcomp" >&6
14276if test $ac_cv_lib_pcreposix_regcomp = yes; then
14277
14278					cat >>confdefs.h <<\EOF
14279#define HAVE_PCREPOSIX_H 1
14280EOF
14281
14282					LIBS="-lpcreposix $LIBS"
14283else
14284  { { echo "$as_me:14284: error: Cannot find PCRE POSIX library" >&5
14285echo "$as_me: error: Cannot find PCRE POSIX library" >&2;}
14286   { (exit 1); exit 1; }; }
14287fi
14288
14289fi
14290
14291			;;
14292		esac
14293fi
14294
14295	if test "$with_pcre" = no ; then
14296
14297cf_regex_func=no
14298
14299cf_regex_libs="regex re"
14300case $host_os in #(vi
14301mingw*)
14302	cf_regex_libs="regex.dll $cf_regex_libs"
14303	;;
14304esac
14305
14306echo "$as_me:14306: checking for regcomp" >&5
14307echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
14308if test "${ac_cv_func_regcomp+set}" = set; then
14309  echo $ECHO_N "(cached) $ECHO_C" >&6
14310else
14311  cat >conftest.$ac_ext <<_ACEOF
14312#line 14312 "configure"
14313#include "confdefs.h"
14314/* System header to define __stub macros and hopefully few prototypes,
14315    which can conflict with char regcomp (); below.  */
14316#include <assert.h>
14317/* Override any gcc2 internal prototype to avoid an error.  */
14318#ifdef __cplusplus
14319extern "C"
14320#endif
14321/* We use char because int might match the return type of a gcc2
14322   builtin and then its argument prototype would still apply.  */
14323char regcomp ();
14324char (*f) ();
14325
14326int
14327main ()
14328{
14329/* The GNU C library defines this for functions which it implements
14330    to always fail with ENOSYS.  Some functions are actually named
14331    something starting with __ and the normal name is an alias.  */
14332#if defined (__stub_regcomp) || defined (__stub___regcomp)
14333choke me
14334#else
14335f = regcomp;
14336#endif
14337
14338  ;
14339  return 0;
14340}
14341_ACEOF
14342rm -f conftest.$ac_objext conftest$ac_exeext
14343if { (eval echo "$as_me:14343: \"$ac_link\"") >&5
14344  (eval $ac_link) 2>&5
14345  ac_status=$?
14346  echo "$as_me:14346: \$? = $ac_status" >&5
14347  (exit $ac_status); } &&
14348         { ac_try='test -s conftest$ac_exeext'
14349  { (eval echo "$as_me:14349: \"$ac_try\"") >&5
14350  (eval $ac_try) 2>&5
14351  ac_status=$?
14352  echo "$as_me:14352: \$? = $ac_status" >&5
14353  (exit $ac_status); }; }; then
14354  ac_cv_func_regcomp=yes
14355else
14356  echo "$as_me: failed program was:" >&5
14357cat conftest.$ac_ext >&5
14358ac_cv_func_regcomp=no
14359fi
14360rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14361fi
14362echo "$as_me:14362: result: $ac_cv_func_regcomp" >&5
14363echo "${ECHO_T}$ac_cv_func_regcomp" >&6
14364if test $ac_cv_func_regcomp = yes; then
14365  cf_regex_func=regcomp
14366else
14367
14368	for cf_regex_lib in $cf_regex_libs
14369	do
14370		as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
14371echo "$as_me:14371: checking for regcomp in -l$cf_regex_lib" >&5
14372echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
14373if eval "test \"\${$as_ac_Lib+set}\" = set"; then
14374  echo $ECHO_N "(cached) $ECHO_C" >&6
14375else
14376  ac_check_lib_save_LIBS=$LIBS
14377LIBS="-l$cf_regex_lib  $LIBS"
14378cat >conftest.$ac_ext <<_ACEOF
14379#line 14379 "configure"
14380#include "confdefs.h"
14381
14382/* Override any gcc2 internal prototype to avoid an error.  */
14383#ifdef __cplusplus
14384extern "C"
14385#endif
14386/* We use char because int might match the return type of a gcc2
14387   builtin and then its argument prototype would still apply.  */
14388char regcomp ();
14389int
14390main ()
14391{
14392regcomp ();
14393  ;
14394  return 0;
14395}
14396_ACEOF
14397rm -f conftest.$ac_objext conftest$ac_exeext
14398if { (eval echo "$as_me:14398: \"$ac_link\"") >&5
14399  (eval $ac_link) 2>&5
14400  ac_status=$?
14401  echo "$as_me:14401: \$? = $ac_status" >&5
14402  (exit $ac_status); } &&
14403         { ac_try='test -s conftest$ac_exeext'
14404  { (eval echo "$as_me:14404: \"$ac_try\"") >&5
14405  (eval $ac_try) 2>&5
14406  ac_status=$?
14407  echo "$as_me:14407: \$? = $ac_status" >&5
14408  (exit $ac_status); }; }; then
14409  eval "$as_ac_Lib=yes"
14410else
14411  echo "$as_me: failed program was:" >&5
14412cat conftest.$ac_ext >&5
14413eval "$as_ac_Lib=no"
14414fi
14415rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14416LIBS=$ac_check_lib_save_LIBS
14417fi
14418echo "$as_me:14418: result: `eval echo '${'$as_ac_Lib'}'`" >&5
14419echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
14420if test `eval echo '${'$as_ac_Lib'}'` = yes; then
14421
14422				LIBS="-l$cf_regex_lib $LIBS"
14423				cf_regex_func=regcomp
14424				break
14425fi
14426
14427	done
14428
14429fi
14430
14431if test "$cf_regex_func" = no ; then
14432	echo "$as_me:14432: checking for compile" >&5
14433echo $ECHO_N "checking for compile... $ECHO_C" >&6
14434if test "${ac_cv_func_compile+set}" = set; then
14435  echo $ECHO_N "(cached) $ECHO_C" >&6
14436else
14437  cat >conftest.$ac_ext <<_ACEOF
14438#line 14438 "configure"
14439#include "confdefs.h"
14440/* System header to define __stub macros and hopefully few prototypes,
14441    which can conflict with char compile (); below.  */
14442#include <assert.h>
14443/* Override any gcc2 internal prototype to avoid an error.  */
14444#ifdef __cplusplus
14445extern "C"
14446#endif
14447/* We use char because int might match the return type of a gcc2
14448   builtin and then its argument prototype would still apply.  */
14449char compile ();
14450char (*f) ();
14451
14452int
14453main ()
14454{
14455/* The GNU C library defines this for functions which it implements
14456    to always fail with ENOSYS.  Some functions are actually named
14457    something starting with __ and the normal name is an alias.  */
14458#if defined (__stub_compile) || defined (__stub___compile)
14459choke me
14460#else
14461f = compile;
14462#endif
14463
14464  ;
14465  return 0;
14466}
14467_ACEOF
14468rm -f conftest.$ac_objext conftest$ac_exeext
14469if { (eval echo "$as_me:14469: \"$ac_link\"") >&5
14470  (eval $ac_link) 2>&5
14471  ac_status=$?
14472  echo "$as_me:14472: \$? = $ac_status" >&5
14473  (exit $ac_status); } &&
14474         { ac_try='test -s conftest$ac_exeext'
14475  { (eval echo "$as_me:14475: \"$ac_try\"") >&5
14476  (eval $ac_try) 2>&5
14477  ac_status=$?
14478  echo "$as_me:14478: \$? = $ac_status" >&5
14479  (exit $ac_status); }; }; then
14480  ac_cv_func_compile=yes
14481else
14482  echo "$as_me: failed program was:" >&5
14483cat conftest.$ac_ext >&5
14484ac_cv_func_compile=no
14485fi
14486rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14487fi
14488echo "$as_me:14488: result: $ac_cv_func_compile" >&5
14489echo "${ECHO_T}$ac_cv_func_compile" >&6
14490if test $ac_cv_func_compile = yes; then
14491  cf_regex_func=compile
14492else
14493
14494		echo "$as_me:14494: checking for compile in -lgen" >&5
14495echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
14496if test "${ac_cv_lib_gen_compile+set}" = set; then
14497  echo $ECHO_N "(cached) $ECHO_C" >&6
14498else
14499  ac_check_lib_save_LIBS=$LIBS
14500LIBS="-lgen  $LIBS"
14501cat >conftest.$ac_ext <<_ACEOF
14502#line 14502 "configure"
14503#include "confdefs.h"
14504
14505/* Override any gcc2 internal prototype to avoid an error.  */
14506#ifdef __cplusplus
14507extern "C"
14508#endif
14509/* We use char because int might match the return type of a gcc2
14510   builtin and then its argument prototype would still apply.  */
14511char compile ();
14512int
14513main ()
14514{
14515compile ();
14516  ;
14517  return 0;
14518}
14519_ACEOF
14520rm -f conftest.$ac_objext conftest$ac_exeext
14521if { (eval echo "$as_me:14521: \"$ac_link\"") >&5
14522  (eval $ac_link) 2>&5
14523  ac_status=$?
14524  echo "$as_me:14524: \$? = $ac_status" >&5
14525  (exit $ac_status); } &&
14526         { ac_try='test -s conftest$ac_exeext'
14527  { (eval echo "$as_me:14527: \"$ac_try\"") >&5
14528  (eval $ac_try) 2>&5
14529  ac_status=$?
14530  echo "$as_me:14530: \$? = $ac_status" >&5
14531  (exit $ac_status); }; }; then
14532  ac_cv_lib_gen_compile=yes
14533else
14534  echo "$as_me: failed program was:" >&5
14535cat conftest.$ac_ext >&5
14536ac_cv_lib_gen_compile=no
14537fi
14538rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14539LIBS=$ac_check_lib_save_LIBS
14540fi
14541echo "$as_me:14541: result: $ac_cv_lib_gen_compile" >&5
14542echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
14543if test $ac_cv_lib_gen_compile = yes; then
14544
14545				LIBS="-lgen $LIBS"
14546				cf_regex_func=compile
14547fi
14548
14549fi
14550
14551fi
14552
14553if test "$cf_regex_func" = no ; then
14554	{ echo "$as_me:14554: WARNING: cannot find regular expression library" >&5
14555echo "$as_me: WARNING: cannot find regular expression library" >&2;}
14556fi
14557
14558echo "$as_me:14558: checking for regular-expression headers" >&5
14559echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
14560if test "${cf_cv_regex_hdrs+set}" = set; then
14561  echo $ECHO_N "(cached) $ECHO_C" >&6
14562else
14563
14564cf_cv_regex_hdrs=no
14565case $cf_regex_func in #(vi
14566compile) #(vi
14567	for cf_regex_hdr in regexp.h regexpr.h
14568	do
14569		cat >conftest.$ac_ext <<_ACEOF
14570#line 14570 "configure"
14571#include "confdefs.h"
14572#include <$cf_regex_hdr>
14573int
14574main ()
14575{
14576
14577			char *p = compile("", "", "", 0);
14578			int x = step("", "");
14579
14580  ;
14581  return 0;
14582}
14583_ACEOF
14584rm -f conftest.$ac_objext conftest$ac_exeext
14585if { (eval echo "$as_me:14585: \"$ac_link\"") >&5
14586  (eval $ac_link) 2>&5
14587  ac_status=$?
14588  echo "$as_me:14588: \$? = $ac_status" >&5
14589  (exit $ac_status); } &&
14590         { ac_try='test -s conftest$ac_exeext'
14591  { (eval echo "$as_me:14591: \"$ac_try\"") >&5
14592  (eval $ac_try) 2>&5
14593  ac_status=$?
14594  echo "$as_me:14594: \$? = $ac_status" >&5
14595  (exit $ac_status); }; }; then
14596
14597			cf_cv_regex_hdrs=$cf_regex_hdr
14598			break
14599
14600else
14601  echo "$as_me: failed program was:" >&5
14602cat conftest.$ac_ext >&5
14603fi
14604rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14605	done
14606	;;
14607*)
14608	for cf_regex_hdr in regex.h
14609	do
14610		cat >conftest.$ac_ext <<_ACEOF
14611#line 14611 "configure"
14612#include "confdefs.h"
14613#include <sys/types.h>
14614#include <$cf_regex_hdr>
14615int
14616main ()
14617{
14618
14619			regex_t *p;
14620			int x = regcomp(p, "", 0);
14621			int y = regexec(p, "", 0, 0, 0);
14622			regfree(p);
14623
14624  ;
14625  return 0;
14626}
14627_ACEOF
14628rm -f conftest.$ac_objext conftest$ac_exeext
14629if { (eval echo "$as_me:14629: \"$ac_link\"") >&5
14630  (eval $ac_link) 2>&5
14631  ac_status=$?
14632  echo "$as_me:14632: \$? = $ac_status" >&5
14633  (exit $ac_status); } &&
14634         { ac_try='test -s conftest$ac_exeext'
14635  { (eval echo "$as_me:14635: \"$ac_try\"") >&5
14636  (eval $ac_try) 2>&5
14637  ac_status=$?
14638  echo "$as_me:14638: \$? = $ac_status" >&5
14639  (exit $ac_status); }; }; then
14640
14641			cf_cv_regex_hdrs=$cf_regex_hdr
14642			break
14643
14644else
14645  echo "$as_me: failed program was:" >&5
14646cat conftest.$ac_ext >&5
14647fi
14648rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14649	done
14650	;;
14651esac
14652
14653fi
14654echo "$as_me:14654: result: $cf_cv_regex_hdrs" >&5
14655echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
14656
14657case $cf_cv_regex_hdrs in #(vi
14658    no)	       { echo "$as_me:14658: WARNING: no regular expression header found" >&5
14659echo "$as_me: WARNING: no regular expression header found" >&2;} ;; #(vi
14660    regex.h)   cat >>confdefs.h <<\EOF
14661#define HAVE_REGEX_H_FUNCS 1
14662EOF
14663 ;; #(vi
14664    regexp.h)  cat >>confdefs.h <<\EOF
14665#define HAVE_REGEXP_H_FUNCS 1
14666EOF
14667 ;; #(vi
14668    regexpr.h) cat >>confdefs.h <<\EOF
14669#define HAVE_REGEXPR_H_FUNCS 1
14670EOF
14671 ;;
14672esac
14673
14674		if test "X$cf_cv_regex_hdrs" != "Xregex.h" ; then
14675			{ { echo "$as_me:14675: error: Only POSIX or PCRE regular expressions are supported" >&5
14676echo "$as_me: error: Only POSIX or PCRE regular expressions are supported" >&2;}
14677   { (exit 1); exit 1; }; }
14678		fi
14679	fi
14680	cat >>confdefs.h <<\EOF
14681#define OPT_SELECT_REGEX 1
14682EOF
14683
14684fi
14685
14686echo "$as_me:14686: checking if you want support for right-scrollbar" >&5
14687echo $ECHO_N "checking if you want support for right-scrollbar... $ECHO_C" >&6
14688
14689# Check whether --enable-rightbar or --disable-rightbar was given.
14690if test "${enable_rightbar+set}" = set; then
14691  enableval="$enable_rightbar"
14692  test "$enableval" != no && enableval=yes
14693  if test "$enableval" != "yes" ; then
14694    enable_rightbar=no
14695  else
14696    enable_rightbar=yes
14697  fi
14698else
14699  enableval=yes
14700  enable_rightbar=yes
14701
14702fi;
14703echo "$as_me:14703: result: $enable_rightbar" >&5
14704echo "${ECHO_T}$enable_rightbar" >&6
14705if test "$enable_rightbar" = yes ; then
14706	cat >>confdefs.h <<\EOF
14707#define SCROLLBAR_RIGHT 1
14708EOF
14709
14710fi
14711
14712echo "$as_me:14712: checking if you want check for redundant name-change" >&5
14713echo $ECHO_N "checking if you want check for redundant name-change... $ECHO_C" >&6
14714
14715# Check whether --enable-samename or --disable-samename was given.
14716if test "${enable_samename+set}" = set; then
14717  enableval="$enable_samename"
14718  test "$enableval" != no && enableval=yes
14719  if test "$enableval" != "yes" ; then
14720    enable_samename=no
14721  else
14722    enable_samename=yes
14723  fi
14724else
14725  enableval=yes
14726  enable_samename=yes
14727
14728fi;
14729echo "$as_me:14729: result: $enable_samename" >&5
14730echo "${ECHO_T}$enable_samename" >&6
14731test "$enable_samename" = no && cat >>confdefs.h <<\EOF
14732#define OPT_SAME_NAME 0
14733EOF
14734
14735echo "$as_me:14735: checking if you want support for session management" >&5
14736echo $ECHO_N "checking if you want support for session management... $ECHO_C" >&6
14737
14738# Check whether --enable-session-mgt or --disable-session-mgt was given.
14739if test "${enable_session_mgt+set}" = set; then
14740  enableval="$enable_session_mgt"
14741  test "$enableval" != no && enableval=yes
14742  if test "$enableval" != "yes" ; then
14743    enable_session_mgt=no
14744  else
14745    enable_session_mgt=yes
14746  fi
14747else
14748  enableval=yes
14749  enable_session_mgt=yes
14750
14751fi;
14752echo "$as_me:14752: result: $enable_session_mgt" >&5
14753echo "${ECHO_T}$enable_session_mgt" >&6
14754test "$enable_session_mgt" = no && cat >>confdefs.h <<\EOF
14755#define OPT_SESSION_MGT 0
14756EOF
14757
14758echo "$as_me:14758: checking if you want to use termcap function-keys" >&5
14759echo $ECHO_N "checking if you want to use termcap function-keys... $ECHO_C" >&6
14760
14761# Check whether --enable-tcap-fkeys or --disable-tcap-fkeys was given.
14762if test "${enable_tcap_fkeys+set}" = set; then
14763  enableval="$enable_tcap_fkeys"
14764  test "$enableval" != no && enableval=yes
14765  if test "$enableval" != "yes" ; then
14766    enable_tcap_fkeys=no
14767  else
14768    enable_tcap_fkeys=yes
14769  fi
14770else
14771  enableval=yes
14772  enable_tcap_fkeys=yes
14773
14774fi;
14775echo "$as_me:14775: result: $enable_tcap_fkeys" >&5
14776echo "${ECHO_T}$enable_tcap_fkeys" >&6
14777test "$enable_tcap_fkeys" = yes && cat >>confdefs.h <<\EOF
14778#define OPT_TCAP_FKEYS 1
14779EOF
14780
14781echo "$as_me:14781: checking if you want to use termcap-query/report" >&5
14782echo $ECHO_N "checking if you want to use termcap-query/report... $ECHO_C" >&6
14783
14784# Check whether --enable-tcap-query or --disable-tcap-query was given.
14785if test "${enable_tcap_query+set}" = set; then
14786  enableval="$enable_tcap_query"
14787  test "$enableval" != no && enableval=yes
14788  if test "$enableval" != "yes" ; then
14789    enable_tcap_query=no
14790  else
14791    enable_tcap_query=yes
14792  fi
14793else
14794  enableval=yes
14795  enable_tcap_query=yes
14796
14797fi;
14798echo "$as_me:14798: result: $enable_tcap_query" >&5
14799echo "${ECHO_T}$enable_tcap_query" >&6
14800test "$enable_tcap_query" = yes && cat >>confdefs.h <<\EOF
14801#define OPT_TCAP_QUERY 1
14802EOF
14803
14804echo "$as_me:14804: checking if you want support for tek4014" >&5
14805echo $ECHO_N "checking if you want support for tek4014... $ECHO_C" >&6
14806
14807# Check whether --enable-tek4014 or --disable-tek4014 was given.
14808if test "${enable_tek4014+set}" = set; then
14809  enableval="$enable_tek4014"
14810  test "$enableval" != no && enableval=yes
14811  if test "$enableval" != "yes" ; then
14812    enable_tek4014=no
14813  else
14814    enable_tek4014=yes
14815  fi
14816else
14817  enableval=yes
14818  enable_tek4014=yes
14819
14820fi;
14821echo "$as_me:14821: result: $enable_tek4014" >&5
14822echo "${ECHO_T}$enable_tek4014" >&6
14823if test "$enable_tek4014" = no ; then
14824	cat >>confdefs.h <<\EOF
14825#define OPT_TEK4014 0
14826EOF
14827
14828else
14829	EXTRAHDRS="$EXTRAHDRS Tekparse.h"
14830	EXTRASRCS="$EXTRASRCS TekPrsTbl.c Tekproc.c"
14831	EXTRAOBJS="$EXTRAOBJS TekPrsTbl.o Tekproc.o"
14832fi
14833
14834echo "$as_me:14834: checking if you want pulldown menus with a toolbar" >&5
14835echo $ECHO_N "checking if you want pulldown menus with a toolbar... $ECHO_C" >&6
14836
14837# Check whether --enable-toolbar or --disable-toolbar was given.
14838if test "${enable_toolbar+set}" = set; then
14839  enableval="$enable_toolbar"
14840  test "$enableval" != yes && enableval=no
14841  if test "$enableval" != "no" ; then
14842    enable_toolbar=yes
14843  else
14844    enable_toolbar=no
14845  fi
14846else
14847  enableval=no
14848  enable_toolbar=no
14849
14850fi;
14851echo "$as_me:14851: result: $enable_toolbar" >&5
14852echo "${ECHO_T}$enable_toolbar" >&6
14853if test "$enable_toolbar" = yes ; then
14854	cat >>confdefs.h <<\EOF
14855#define OPT_TOOLBAR 1
14856EOF
14857
14858fi
14859
14860echo "$as_me:14860: checking if you want VT52 emulation" >&5
14861echo $ECHO_N "checking if you want VT52 emulation... $ECHO_C" >&6
14862
14863# Check whether --enable-vt52 or --disable-vt52 was given.
14864if test "${enable_vt52+set}" = set; then
14865  enableval="$enable_vt52"
14866  test "$enableval" != no && enableval=yes
14867  if test "$enableval" != "yes" ; then
14868    enable_vt52=no
14869  else
14870    enable_vt52=yes
14871  fi
14872else
14873  enableval=yes
14874  enable_vt52=yes
14875
14876fi;
14877echo "$as_me:14877: result: $enable_vt52" >&5
14878echo "${ECHO_T}$enable_vt52" >&6
14879test "$enable_vt52" = no && cat >>confdefs.h <<\EOF
14880#define OPT_VT52_MODE 0
14881EOF
14882
14883echo "$as_me:14883: checking if you want to use mini-luit/Latin9 built-in support" >&5
14884echo $ECHO_N "checking if you want to use mini-luit/Latin9 built-in support... $ECHO_C" >&6
14885
14886# Check whether --enable-mini-luit or --disable-mini-luit was given.
14887if test "${enable_mini_luit+set}" = set; then
14888  enableval="$enable_mini_luit"
14889  test "$enableval" != yes && enableval=no
14890  if test "$enableval" != "no" ; then
14891    enable_mini_luit=yes
14892  else
14893    enable_mini_luit=no
14894  fi
14895else
14896  enableval=no
14897  enable_mini_luit=no
14898
14899fi;
14900echo "$as_me:14900: result: $enable_mini_luit" >&5
14901echo "${ECHO_T}$enable_mini_luit" >&6
14902if test "$enable_mini_luit" = yes ; then
14903	cat >>confdefs.h <<\EOF
14904#define OPT_MINI_LUIT 1
14905EOF
14906
14907fi
14908
14909echo "$as_me:14909: checking if you want to use luit" >&5
14910echo $ECHO_N "checking if you want to use luit... $ECHO_C" >&6
14911
14912# Check whether --enable-luit or --disable-luit was given.
14913if test "${enable_luit+set}" = set; then
14914  enableval="$enable_luit"
14915  test "$enableval" != yes && enableval=no
14916  if test "$enableval" != "no" ; then
14917    enable_luit=yes
14918  else
14919    enable_luit=$enable_mini_luit
14920  fi
14921else
14922  enableval=no
14923  enable_luit=$enable_mini_luit
14924
14925fi;
14926echo "$as_me:14926: result: $enable_luit" >&5
14927echo "${ECHO_T}$enable_luit" >&6
14928if test "$enable_luit" = yes ; then
14929	cat >>confdefs.h <<\EOF
14930#define OPT_LUIT_PROG 1
14931EOF
14932
14933test -z "$LUIT" && LUIT=xterm-filter
14934for ac_prog in $LUIT xterm-filter bluit luit
14935do
14936  # Extract the first word of "$ac_prog", so it can be a program name with args.
14937set dummy $ac_prog; ac_word=$2
14938echo "$as_me:14938: checking for $ac_word" >&5
14939echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
14940if test "${ac_cv_path_LUIT+set}" = set; then
14941  echo $ECHO_N "(cached) $ECHO_C" >&6
14942else
14943  case $LUIT in
14944  [\\/]* | ?:[\\/]*)
14945  ac_cv_path_LUIT="$LUIT" # Let the user override the test with a path.
14946  ;;
14947  *)
14948  ac_save_IFS=$IFS; IFS=$ac_path_separator
14949ac_dummy="$PATH"
14950for ac_dir in $ac_dummy; do
14951  IFS=$ac_save_IFS
14952  test -z "$ac_dir" && ac_dir=.
14953  if $as_executable_p "$ac_dir/$ac_word"; then
14954   ac_cv_path_LUIT="$ac_dir/$ac_word"
14955   echo "$as_me:14955: found $ac_dir/$ac_word" >&5
14956   break
14957fi
14958done
14959
14960  ;;
14961esac
14962fi
14963LUIT=$ac_cv_path_LUIT
14964
14965if test -n "$LUIT"; then
14966  echo "$as_me:14966: result: $LUIT" >&5
14967echo "${ECHO_T}$LUIT" >&6
14968else
14969  echo "$as_me:14969: result: no" >&5
14970echo "${ECHO_T}no" >&6
14971fi
14972
14973  test -n "$LUIT" && break
14974done
14975test -n "$LUIT" || LUIT="$LUIT"
14976
14977cf_path_prog=""
14978cf_path_args=""
14979IFS="${IFS:- 	}"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
14980for cf_temp in $ac_cv_path_LUIT
14981do
14982	if test -z "$cf_path_prog" ; then
14983		if test "$with_full_paths" = yes ; then
14984
14985if test "x$prefix" != xNONE; then
14986  cf_path_syntax="$prefix"
14987else
14988  cf_path_syntax="$ac_default_prefix"
14989fi
14990
14991case ".$cf_temp" in #(vi
14992.\$\(*\)*|.\'*\'*) #(vi
14993  ;;
14994..|./*|.\\*) #(vi
14995  ;;
14996.[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
14997  ;;
14998.\${*prefix}*) #(vi
14999  eval cf_temp="$cf_temp"
15000  case ".$cf_temp" in #(vi
15001  .NONE/*)
15002    cf_temp=`echo $cf_temp | sed -e s%NONE%$cf_path_syntax%`
15003    ;;
15004  esac
15005  ;; #(vi
15006.no|.NONE/*)
15007  cf_temp=`echo $cf_temp | sed -e s%NONE%$cf_path_syntax%`
15008  ;;
15009*)
15010  break
15011  ;;
15012esac
15013
15014			cf_path_prog="$cf_temp"
15015		else
15016			cf_path_prog="`basename $cf_temp`"
15017		fi
15018	elif test -z "$cf_path_args" ; then
15019		cf_path_args="$cf_temp"
15020	else
15021		cf_path_args="$cf_path_args $cf_temp"
15022	fi
15023done
15024IFS="$cf_save_ifs"
15025
15026if test -n "$cf_path_prog" ; then
15027
15028echo "${as_me:-configure}:15028: testing defining path for ${cf_path_prog} ..." 1>&5
15029
15030	cat >>confdefs.h <<EOF
15031#define LUIT_PATH "$cf_path_prog"
15032EOF
15033
15034	test -n "$cf_path_args" && cat >>confdefs.h <<EOF
15035#define LUIT_ARGS "$cf_path_args"
15036EOF
15037
15038fi
15039
15040fi
15041
15042echo "$as_me:15042: checking if you want wide-character support" >&5
15043echo $ECHO_N "checking if you want wide-character support... $ECHO_C" >&6
15044
15045# Check whether --enable-wide-chars or --disable-wide-chars was given.
15046if test "${enable_wide_chars+set}" = set; then
15047  enableval="$enable_wide_chars"
15048  test "$enableval" != no && enableval=yes
15049  if test "$enableval" != "$enable_luit" ; then
15050    enable_wchar=yes
15051  else
15052    enable_wchar=$enable_luit
15053  fi
15054else
15055  enableval=$enable_luit
15056  enable_wchar=$enable_luit
15057
15058fi;
15059echo "$as_me:15059: result: $enable_wchar" >&5
15060echo "${ECHO_T}$enable_wchar" >&6
15061
15062echo "$as_me:15062: checking if you want only 16-bit character support" >&5
15063echo $ECHO_N "checking if you want only 16-bit character support... $ECHO_C" >&6
15064
15065# Check whether --enable-16bit-chars or --disable-16bit-chars was given.
15066if test "${enable_16bit_chars+set}" = set; then
15067  enableval="$enable_16bit_chars"
15068  test "$enableval" != yes && enableval=no
15069  if test "$enableval" != "no" ; then
15070    enable_16bit_chars=yes
15071  else
15072    enable_16bit_chars=no
15073  fi
15074else
15075  enableval=no
15076  enable_16bit_chars=no
15077
15078fi;
15079echo "$as_me:15079: result: $enable_16bit_chars" >&5
15080echo "${ECHO_T}$enable_16bit_chars" >&6
15081
15082if test "$enable_16bit_chars" = yes ; then
15083	cat >>confdefs.h <<\EOF
15084#define OPT_WIDER_ICHAR 0
15085EOF
15086
15087	enable_wchar=yes
15088fi
15089
15090if test "$enable_wchar" = yes ; then
15091	cat >>confdefs.h <<\EOF
15092#define OPT_WIDE_CHARS 1
15093EOF
15094
15095	EXTRAHDRS="$EXTRAHDRS charclass.h precompose.h wcwidth.h"
15096	EXTRASRCS="$EXTRASRCS charclass.c precompose.c wcwidth.c"
15097	EXTRAOBJS="$EXTRAOBJS charclass.o precompose.o wcwidth.o"
15098fi
15099
15100echo "$as_me:15100: checking if you want dynamic-abbreviation support" >&5
15101echo $ECHO_N "checking if you want dynamic-abbreviation support... $ECHO_C" >&6
15102
15103# Check whether --enable-dabbrev or --disable-dabbrev was given.
15104if test "${enable_dabbrev+set}" = set; then
15105  enableval="$enable_dabbrev"
15106  test "$enableval" != yes && enableval=no
15107  if test "$enableval" != "no" ; then
15108    enable_dabbrev=yes
15109  else
15110    enable_dabbrev=no
15111  fi
15112else
15113  enableval=no
15114  enable_dabbrev=no
15115
15116fi;
15117echo "$as_me:15117: result: $enable_dabbrev" >&5
15118echo "${ECHO_T}$enable_dabbrev" >&6
15119if test "$enable_dabbrev" = yes ; then
15120	cat >>confdefs.h <<\EOF
15121#define OPT_DABBREV 1
15122EOF
15123
15124fi
15125
15126echo "$as_me:15126: checking if you want DECterm Locator support" >&5
15127echo $ECHO_N "checking if you want DECterm Locator support... $ECHO_C" >&6
15128
15129# Check whether --enable-dec-locator or --disable-dec-locator was given.
15130if test "${enable_dec_locator+set}" = set; then
15131  enableval="$enable_dec_locator"
15132  test "$enableval" != yes && enableval=no
15133  if test "$enableval" != "no" ; then
15134    enable_dec_locator=yes
15135  else
15136    enable_dec_locator=no
15137  fi
15138else
15139  enableval=no
15140  enable_dec_locator=no
15141
15142fi;
15143echo "$as_me:15143: result: $enable_dec_locator" >&5
15144echo "${ECHO_T}$enable_dec_locator" >&6
15145if test "$enable_dec_locator" = yes ; then
15146	cat >>confdefs.h <<\EOF
15147#define OPT_DEC_LOCATOR 1
15148EOF
15149
15150fi
15151
15152echo "$as_me:15152: checking if you want VT420 rectangle support" >&5
15153echo $ECHO_N "checking if you want VT420 rectangle support... $ECHO_C" >&6
15154
15155# Check whether --enable-rectangles or --disable-rectangles was given.
15156if test "${enable_rectangles+set}" = set; then
15157  enableval="$enable_rectangles"
15158  test "$enableval" != no && enableval=yes
15159  if test "$enableval" != "yes" ; then
15160    enable_rectangles=no
15161  else
15162    enable_rectangles=yes
15163  fi
15164else
15165  enableval=yes
15166  enable_rectangles=yes
15167
15168fi;
15169echo "$as_me:15169: result: $enable_rectangles" >&5
15170echo "${ECHO_T}$enable_rectangles" >&6
15171if test "$enable_rectangles" = yes ; then
15172	cat >>confdefs.h <<\EOF
15173#define OPT_DEC_RECTOPS 1
15174EOF
15175
15176fi
15177
15178echo "$as_me:15178: checking if you want -ziconbeep option" >&5
15179echo $ECHO_N "checking if you want -ziconbeep option... $ECHO_C" >&6
15180
15181# Check whether --enable-ziconbeep or --disable-ziconbeep was given.
15182if test "${enable_ziconbeep+set}" = set; then
15183  enableval="$enable_ziconbeep"
15184  test "$enableval" != no && enableval=yes
15185  if test "$enableval" != "yes" ; then
15186    enable_ziconbeep=no
15187  else
15188    enable_ziconbeep=yes
15189  fi
15190else
15191  enableval=yes
15192  enable_ziconbeep=yes
15193
15194fi;
15195echo "$as_me:15195: result: $enable_ziconbeep" >&5
15196echo "${ECHO_T}$enable_ziconbeep" >&6
15197test "$enable_ziconbeep" = no && cat >>confdefs.h <<\EOF
15198#define OPT_ZICONBEEP 0
15199EOF
15200
15201###############################################################################
15202
15203echo "$as_me:15203: checking if you want debugging traces" >&5
15204echo $ECHO_N "checking if you want debugging traces... $ECHO_C" >&6
15205
15206# Check whether --enable-trace or --disable-trace was given.
15207if test "${enable_trace+set}" = set; then
15208  enableval="$enable_trace"
15209  test "$enableval" != yes && enableval=no
15210  if test "$enableval" != "no" ; then
15211    enable_trace=yes
15212  else
15213    enable_trace=no
15214  fi
15215else
15216  enableval=no
15217  enable_trace=no
15218
15219fi;
15220echo "$as_me:15220: result: $enable_trace" >&5
15221echo "${ECHO_T}$enable_trace" >&6
15222if test "$enable_trace" = yes ; then
15223	cat >>confdefs.h <<\EOF
15224#define OPT_TRACE 1
15225EOF
15226
15227	EXTRASRCS="$EXTRASRCS trace.c"
15228	EXTRAOBJS="$EXTRAOBJS trace.o"
15229fi
15230
15231echo "$as_me:15231: checking if you want to test memory leaks" >&5
15232echo $ECHO_N "checking if you want to test memory leaks... $ECHO_C" >&6
15233
15234# Check whether --enable-leaks or --disable-leaks was given.
15235if test "${enable_leaks+set}" = set; then
15236  enableval="$enable_leaks"
15237  test "$enableval" != no && enableval=yes
15238  if test "$enableval" != "yes" ; then
15239    disable_leaks=yes
15240  else
15241    disable_leaks=no
15242  fi
15243else
15244  enableval=yes
15245  disable_leaks=no
15246
15247fi;
15248echo "$as_me:15248: result: $disable_leaks" >&5
15249echo "${ECHO_T}$disable_leaks" >&6
15250if test "$disable_leaks" = yes ; then
15251	cat >>confdefs.h <<\EOF
15252#define NO_LEAKS 1
15253EOF
15254
15255fi
15256
15257echo "$as_me:15257: checking if you want to see long compiling messages" >&5
15258echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
15259
15260# Check whether --enable-echo or --disable-echo was given.
15261if test "${enable_echo+set}" = set; then
15262  enableval="$enable_echo"
15263  test "$enableval" != no && enableval=yes
15264  if test "$enableval" != "yes" ; then
15265
15266    ECHO_LT='--silent'
15267    ECHO_LD='@echo linking $@;'
15268    RULE_CC='@echo compiling $<'
15269    SHOW_CC='@echo compiling $@'
15270    ECHO_CC='@'
15271
15272  else
15273
15274    ECHO_LT=''
15275    ECHO_LD=''
15276    RULE_CC=''
15277    SHOW_CC=''
15278    ECHO_CC=''
15279
15280  fi
15281else
15282  enableval=yes
15283
15284    ECHO_LT=''
15285    ECHO_LD=''
15286    RULE_CC=''
15287    SHOW_CC=''
15288    ECHO_CC=''
15289
15290fi;
15291echo "$as_me:15291: result: $enableval" >&5
15292echo "${ECHO_T}$enableval" >&6
15293
15294echo "$as_me:15294: checking if you want magic cookie emulation" >&5
15295echo $ECHO_N "checking if you want magic cookie emulation... $ECHO_C" >&6
15296
15297# Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
15298if test "${enable_xmc_glitch+set}" = set; then
15299  enableval="$enable_xmc_glitch"
15300  test "$enableval" != yes && enableval=no
15301  if test "$enableval" != "no" ; then
15302    enable_xmc=yes
15303  else
15304    enable_xmc=no
15305  fi
15306else
15307  enableval=no
15308  enable_xmc=no
15309
15310fi;
15311echo "$as_me:15311: result: $enable_xmc" >&5
15312echo "${ECHO_T}$enable_xmc" >&6
15313if test "$enable_xmc" = yes ; then
15314	cat >>confdefs.h <<\EOF
15315#define OPT_XMC_GLITCH 1
15316EOF
15317
15318	EXTRASRCS="$EXTRASRCS testxmc.c"
15319	EXTRAOBJS="$EXTRAOBJS testxmc.o"
15320fi
15321
15322for ac_func in tigetstr
15323do
15324as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15325echo "$as_me:15325: checking for $ac_func" >&5
15326echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15327if eval "test \"\${$as_ac_var+set}\" = set"; then
15328  echo $ECHO_N "(cached) $ECHO_C" >&6
15329else
15330  cat >conftest.$ac_ext <<_ACEOF
15331#line 15331 "configure"
15332#include "confdefs.h"
15333/* System header to define __stub macros and hopefully few prototypes,
15334    which can conflict with char $ac_func (); below.  */
15335#include <assert.h>
15336/* Override any gcc2 internal prototype to avoid an error.  */
15337#ifdef __cplusplus
15338extern "C"
15339#endif
15340/* We use char because int might match the return type of a gcc2
15341   builtin and then its argument prototype would still apply.  */
15342char $ac_func ();
15343char (*f) ();
15344
15345int
15346main ()
15347{
15348/* The GNU C library defines this for functions which it implements
15349    to always fail with ENOSYS.  Some functions are actually named
15350    something starting with __ and the normal name is an alias.  */
15351#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15352choke me
15353#else
15354f = $ac_func;
15355#endif
15356
15357  ;
15358  return 0;
15359}
15360_ACEOF
15361rm -f conftest.$ac_objext conftest$ac_exeext
15362if { (eval echo "$as_me:15362: \"$ac_link\"") >&5
15363  (eval $ac_link) 2>&5
15364  ac_status=$?
15365  echo "$as_me:15365: \$? = $ac_status" >&5
15366  (exit $ac_status); } &&
15367         { ac_try='test -s conftest$ac_exeext'
15368  { (eval echo "$as_me:15368: \"$ac_try\"") >&5
15369  (eval $ac_try) 2>&5
15370  ac_status=$?
15371  echo "$as_me:15371: \$? = $ac_status" >&5
15372  (exit $ac_status); }; }; then
15373  eval "$as_ac_var=yes"
15374else
15375  echo "$as_me: failed program was:" >&5
15376cat conftest.$ac_ext >&5
15377eval "$as_ac_var=no"
15378fi
15379rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15380fi
15381echo "$as_me:15381: result: `eval echo '${'$as_ac_var'}'`" >&5
15382echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15383if test `eval echo '${'$as_ac_var'}'` = yes; then
15384  cat >>confdefs.h <<EOF
15385#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15386EOF
15387
15388fi
15389done
15390
15391if test -n "$cf_cv_lib_part_tgetent"; then
15392
15393for ac_func in use_extended_names
15394do
15395as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15396echo "$as_me:15396: checking for $ac_func" >&5
15397echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15398if eval "test \"\${$as_ac_var+set}\" = set"; then
15399  echo $ECHO_N "(cached) $ECHO_C" >&6
15400else
15401  cat >conftest.$ac_ext <<_ACEOF
15402#line 15402 "configure"
15403#include "confdefs.h"
15404/* System header to define __stub macros and hopefully few prototypes,
15405    which can conflict with char $ac_func (); below.  */
15406#include <assert.h>
15407/* Override any gcc2 internal prototype to avoid an error.  */
15408#ifdef __cplusplus
15409extern "C"
15410#endif
15411/* We use char because int might match the return type of a gcc2
15412   builtin and then its argument prototype would still apply.  */
15413char $ac_func ();
15414char (*f) ();
15415
15416int
15417main ()
15418{
15419/* The GNU C library defines this for functions which it implements
15420    to always fail with ENOSYS.  Some functions are actually named
15421    something starting with __ and the normal name is an alias.  */
15422#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15423choke me
15424#else
15425f = $ac_func;
15426#endif
15427
15428  ;
15429  return 0;
15430}
15431_ACEOF
15432rm -f conftest.$ac_objext conftest$ac_exeext
15433if { (eval echo "$as_me:15433: \"$ac_link\"") >&5
15434  (eval $ac_link) 2>&5
15435  ac_status=$?
15436  echo "$as_me:15436: \$? = $ac_status" >&5
15437  (exit $ac_status); } &&
15438         { ac_try='test -s conftest$ac_exeext'
15439  { (eval echo "$as_me:15439: \"$ac_try\"") >&5
15440  (eval $ac_try) 2>&5
15441  ac_status=$?
15442  echo "$as_me:15442: \$? = $ac_status" >&5
15443  (exit $ac_status); }; }; then
15444  eval "$as_ac_var=yes"
15445else
15446  echo "$as_me: failed program was:" >&5
15447cat conftest.$ac_ext >&5
15448eval "$as_ac_var=no"
15449fi
15450rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15451fi
15452echo "$as_me:15452: result: `eval echo '${'$as_ac_var'}'`" >&5
15453echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15454if test `eval echo '${'$as_ac_var'}'` = yes; then
15455  cat >>confdefs.h <<EOF
15456#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15457EOF
15458
15459fi
15460done
15461
15462fi
15463
15464if test -n "$GCC" ; then
15465echo "$as_me:15465: checking if you want to turn on gcc warnings" >&5
15466echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6
15467
15468# Check whether --enable-warnings or --disable-warnings was given.
15469if test "${enable_warnings+set}" = set; then
15470  enableval="$enable_warnings"
15471  test "$enableval" != yes && enableval=no
15472  if test "$enableval" != "no" ; then
15473    with_warnings=yes
15474  else
15475    with_warnings=no
15476  fi
15477else
15478  enableval=no
15479  with_warnings=no
15480
15481fi;
15482echo "$as_me:15482: result: $with_warnings" >&5
15483echo "${ECHO_T}$with_warnings" >&6
15484if test "$with_warnings" = yes
15485then
15486
15487if test "$GCC" = yes
15488then
15489cat > conftest.i <<EOF
15490#ifndef GCC_PRINTF
15491#define GCC_PRINTF 0
15492#endif
15493#ifndef GCC_SCANF
15494#define GCC_SCANF 0
15495#endif
15496#ifndef GCC_NORETURN
15497#define GCC_NORETURN /* nothing */
15498#endif
15499#ifndef GCC_UNUSED
15500#define GCC_UNUSED /* nothing */
15501#endif
15502EOF
15503if test "$GCC" = yes
15504then
15505	{ echo "$as_me:15505: checking for $CC __attribute__ directives..." >&5
15506echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
15507cat > conftest.$ac_ext <<EOF
15508#line 15508 "${as_me:-configure}"
15509#include "confdefs.h"
15510#include "conftest.h"
15511#include "conftest.i"
15512#if	GCC_PRINTF
15513#define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
15514#else
15515#define GCC_PRINTFLIKE(fmt,var) /*nothing*/
15516#endif
15517#if	GCC_SCANF
15518#define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
15519#else
15520#define GCC_SCANFLIKE(fmt,var)  /*nothing*/
15521#endif
15522extern void wow(char *,...) GCC_SCANFLIKE(1,2);
15523extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
15524extern void foo(void) GCC_NORETURN;
15525int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
15526EOF
15527	cf_printf_attribute=no
15528	cf_scanf_attribute=no
15529	for cf_attribute in scanf printf unused noreturn
15530	do
15531
15532cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15533
15534		cf_directive="__attribute__(($cf_attribute))"
15535		echo "checking for $CC $cf_directive" 1>&5
15536
15537		case $cf_attribute in #(vi
15538		printf) #(vi
15539			cf_printf_attribute=yes
15540			cat >conftest.h <<EOF
15541#define GCC_$cf_ATTRIBUTE 1
15542EOF
15543			;;
15544		scanf) #(vi
15545			cf_scanf_attribute=yes
15546			cat >conftest.h <<EOF
15547#define GCC_$cf_ATTRIBUTE 1
15548EOF
15549			;;
15550		*) #(vi
15551			cat >conftest.h <<EOF
15552#define GCC_$cf_ATTRIBUTE $cf_directive
15553EOF
15554			;;
15555		esac
15556
15557		if { (eval echo "$as_me:15557: \"$ac_compile\"") >&5
15558  (eval $ac_compile) 2>&5
15559  ac_status=$?
15560  echo "$as_me:15560: \$? = $ac_status" >&5
15561  (exit $ac_status); }; then
15562			test -n "$verbose" && echo "$as_me:15562: result: ... $cf_attribute" >&5
15563echo "${ECHO_T}... $cf_attribute" >&6
15564			cat conftest.h >>confdefs.h
15565			case $cf_attribute in #(vi
15566			printf) #(vi
15567				if test "$cf_printf_attribute" = no ; then
15568					cat >>confdefs.h <<EOF
15569#define GCC_PRINTFLIKE(fmt,var) /* nothing */
15570EOF
15571				else
15572					cat >>confdefs.h <<EOF
15573#define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
15574EOF
15575				fi
15576				;;
15577			scanf) #(vi
15578				if test "$cf_scanf_attribute" = no ; then
15579					cat >>confdefs.h <<EOF
15580#define GCC_SCANFLIKE(fmt,var) /* nothing */
15581EOF
15582				else
15583					cat >>confdefs.h <<EOF
15584#define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
15585EOF
15586				fi
15587				;;
15588			esac
15589		fi
15590	done
15591else
15592	fgrep define conftest.i >>confdefs.h
15593fi
15594rm -rf conftest*
15595fi
15596
15597GCC_VERSION=none
15598if test "$GCC" = yes ; then
15599	echo "$as_me:15599: checking version of $CC" >&5
15600echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
15601	GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
15602	test -z "$GCC_VERSION" && GCC_VERSION=unknown
15603	echo "$as_me:15603: result: $GCC_VERSION" >&5
15604echo "${ECHO_T}$GCC_VERSION" >&6
15605fi
15606
15607INTEL_COMPILER=no
15608
15609if test "$GCC" = yes ; then
15610	case $host_os in
15611	linux*|gnu*)
15612		echo "$as_me:15612: checking if this is really Intel C compiler" >&5
15613echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
15614		cf_save_CFLAGS="$CFLAGS"
15615		CFLAGS="$CFLAGS -no-gcc"
15616		cat >conftest.$ac_ext <<_ACEOF
15617#line 15617 "configure"
15618#include "confdefs.h"
15619
15620int
15621main ()
15622{
15623
15624#ifdef __INTEL_COMPILER
15625#else
15626make an error
15627#endif
15628
15629  ;
15630  return 0;
15631}
15632_ACEOF
15633rm -f conftest.$ac_objext
15634if { (eval echo "$as_me:15634: \"$ac_compile\"") >&5
15635  (eval $ac_compile) 2>&5
15636  ac_status=$?
15637  echo "$as_me:15637: \$? = $ac_status" >&5
15638  (exit $ac_status); } &&
15639         { ac_try='test -s conftest.$ac_objext'
15640  { (eval echo "$as_me:15640: \"$ac_try\"") >&5
15641  (eval $ac_try) 2>&5
15642  ac_status=$?
15643  echo "$as_me:15643: \$? = $ac_status" >&5
15644  (exit $ac_status); }; }; then
15645  INTEL_COMPILER=yes
15646cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
15647
15648else
15649  echo "$as_me: failed program was:" >&5
15650cat conftest.$ac_ext >&5
15651fi
15652rm -f conftest.$ac_objext conftest.$ac_ext
15653		CFLAGS="$cf_save_CFLAGS"
15654		echo "$as_me:15654: result: $INTEL_COMPILER" >&5
15655echo "${ECHO_T}$INTEL_COMPILER" >&6
15656		;;
15657	esac
15658fi
15659
15660cat > conftest.$ac_ext <<EOF
15661#line 15661 "${as_me:-configure}"
15662int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
15663EOF
15664
15665if test "$INTEL_COMPILER" = yes
15666then
15667# The "-wdXXX" options suppress warnings:
15668# remark #1419: external declaration in primary source file
15669# remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
15670# remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
15671# remark #193: zero used for undefined preprocessing identifier
15672# remark #593: variable "curs_sb_left_arrow" was set but never used
15673# remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
15674# remark #869: parameter "tw" was never referenced
15675# remark #981: operands are evaluated in unspecified order
15676# warning #279: controlling expression is constant
15677
15678	{ echo "$as_me:15678: checking for $CC warning options..." >&5
15679echo "$as_me: checking for $CC warning options..." >&6;}
15680	cf_save_CFLAGS="$CFLAGS"
15681	EXTRA_CFLAGS="-Wall"
15682	for cf_opt in \
15683		wd1419 \
15684		wd1683 \
15685		wd1684 \
15686		wd193 \
15687		wd593 \
15688		wd279 \
15689		wd810 \
15690		wd869 \
15691		wd981
15692	do
15693		CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
15694		if { (eval echo "$as_me:15694: \"$ac_compile\"") >&5
15695  (eval $ac_compile) 2>&5
15696  ac_status=$?
15697  echo "$as_me:15697: \$? = $ac_status" >&5
15698  (exit $ac_status); }; then
15699			test -n "$verbose" && echo "$as_me:15699: result: ... -$cf_opt" >&5
15700echo "${ECHO_T}... -$cf_opt" >&6
15701			EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
15702		fi
15703	done
15704	CFLAGS="$cf_save_CFLAGS"
15705
15706elif test "$GCC" = yes
15707then
15708	{ echo "$as_me:15708: checking for $CC warning options..." >&5
15709echo "$as_me: checking for $CC warning options..." >&6;}
15710	cf_save_CFLAGS="$CFLAGS"
15711	EXTRA_CFLAGS=
15712	cf_warn_CONST=""
15713	test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
15714	for cf_opt in W Wall \
15715		Wbad-function-cast \
15716		Wcast-align \
15717		Wcast-qual \
15718		Winline \
15719		Wmissing-declarations \
15720		Wmissing-prototypes \
15721		Wnested-externs \
15722		Wpointer-arith \
15723		Wshadow \
15724		Wstrict-prototypes \
15725		Wundef $cf_warn_CONST Wdeclaration-after-statement Wextra Wno-unknown-pragmas Wswitch-enum
15726	do
15727		CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
15728		if { (eval echo "$as_me:15728: \"$ac_compile\"") >&5
15729  (eval $ac_compile) 2>&5
15730  ac_status=$?
15731  echo "$as_me:15731: \$? = $ac_status" >&5
15732  (exit $ac_status); }; then
15733			test -n "$verbose" && echo "$as_me:15733: result: ... -$cf_opt" >&5
15734echo "${ECHO_T}... -$cf_opt" >&6
15735			case $cf_opt in #(vi
15736			Wcast-qual) #(vi
15737				CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
15738				;;
15739			Winline) #(vi
15740				case $GCC_VERSION in
15741				[34].*)
15742					test -n "$verbose" && echo "	feature is broken in gcc $GCC_VERSION" 1>&6
15743
15744echo "${as_me:-configure}:15744: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
15745
15746					continue;;
15747				esac
15748				;;
15749			esac
15750			EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
15751		fi
15752	done
15753	CFLAGS="$cf_save_CFLAGS"
15754fi
15755rm -rf conftest*
15756
15757fi
15758fi
15759
15760test "$disable_setuid" = yes && cat >>confdefs.h <<\EOF
15761#define DISABLE_SETUID 1
15762EOF
15763
15764test "$disable_setgid" = yes && cat >>confdefs.h <<\EOF
15765#define DISABLE_SETGID 1
15766EOF
15767
15768if test $disable_setuid = yes ; then
15769	MAY_SETUID="#"
15770	NOT_SETUID=
15771elif test $disable_setgid = yes ; then
15772	MAY_SETUID="#"
15773	NOT_SETUID=
15774else
15775	MAY_SETUID=
15776	NOT_SETUID="#"
15777fi
15778
15779###	remove from CPPFLAGS the optional features we define in xtermcfg.h
15780###	or other conflicting symbols that may be defined via imake:
15781for cf_def in \
15782	__STDC__ \
15783	ALLOWLOGGING \
15784	ALLOWLOGFILEEXEC \
15785	OPT_LUIT_PROG \
15786	OPT_WIDE_CHARS \
15787	SCROLLBAR_RIGHT \
15788	USE_TTY_GROUP \
15789	USE_UTEMPTER \
15790	XRENDERFONT
15791do
15792	CPPFLAGS=`echo "$CPPFLAGS" | sed -e s/-D$cf_def//`
15793done
15794
15795echo "$as_me:15795: checking if filesystem supports mixed-case filenames" >&5
15796echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
15797if test "${cf_cv_mixedcase+set}" = set; then
15798  echo $ECHO_N "(cached) $ECHO_C" >&6
15799else
15800
15801if test "$cross_compiling" = yes ; then
15802	case $target_alias in #(vi
15803	*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-mingw32*|*-uwin*) #(vi
15804		cf_cv_mixedcase=no
15805		;;
15806	*)
15807		cf_cv_mixedcase=yes
15808		;;
15809	esac
15810else
15811	rm -f conftest CONFTEST
15812	echo test >conftest
15813	if test -f CONFTEST ; then
15814		cf_cv_mixedcase=no
15815	else
15816		cf_cv_mixedcase=yes
15817	fi
15818	rm -f conftest CONFTEST
15819fi
15820
15821fi
15822echo "$as_me:15822: result: $cf_cv_mixedcase" >&5
15823echo "${ECHO_T}$cf_cv_mixedcase" >&6
15824test "$cf_cv_mixedcase" = yes && cat >>confdefs.h <<\EOF
15825#define MIXEDCASE_FILENAMES 1
15826EOF
15827
15828for ac_prog in exctags ctags
15829do
15830  # Extract the first word of "$ac_prog", so it can be a program name with args.
15831set dummy $ac_prog; ac_word=$2
15832echo "$as_me:15832: checking for $ac_word" >&5
15833echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
15834if test "${ac_cv_prog_CTAGS+set}" = set; then
15835  echo $ECHO_N "(cached) $ECHO_C" >&6
15836else
15837  if test -n "$CTAGS"; then
15838  ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
15839else
15840  ac_save_IFS=$IFS; IFS=$ac_path_separator
15841ac_dummy="$PATH"
15842for ac_dir in $ac_dummy; do
15843  IFS=$ac_save_IFS
15844  test -z "$ac_dir" && ac_dir=.
15845  $as_executable_p "$ac_dir/$ac_word" || continue
15846ac_cv_prog_CTAGS="$ac_prog"
15847echo "$as_me:15847: found $ac_dir/$ac_word" >&5
15848break
15849done
15850
15851fi
15852fi
15853CTAGS=$ac_cv_prog_CTAGS
15854if test -n "$CTAGS"; then
15855  echo "$as_me:15855: result: $CTAGS" >&5
15856echo "${ECHO_T}$CTAGS" >&6
15857else
15858  echo "$as_me:15858: result: no" >&5
15859echo "${ECHO_T}no" >&6
15860fi
15861
15862  test -n "$CTAGS" && break
15863done
15864
15865for ac_prog in exetags etags
15866do
15867  # Extract the first word of "$ac_prog", so it can be a program name with args.
15868set dummy $ac_prog; ac_word=$2
15869echo "$as_me:15869: checking for $ac_word" >&5
15870echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
15871if test "${ac_cv_prog_ETAGS+set}" = set; then
15872  echo $ECHO_N "(cached) $ECHO_C" >&6
15873else
15874  if test -n "$ETAGS"; then
15875  ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
15876else
15877  ac_save_IFS=$IFS; IFS=$ac_path_separator
15878ac_dummy="$PATH"
15879for ac_dir in $ac_dummy; do
15880  IFS=$ac_save_IFS
15881  test -z "$ac_dir" && ac_dir=.
15882  $as_executable_p "$ac_dir/$ac_word" || continue
15883ac_cv_prog_ETAGS="$ac_prog"
15884echo "$as_me:15884: found $ac_dir/$ac_word" >&5
15885break
15886done
15887
15888fi
15889fi
15890ETAGS=$ac_cv_prog_ETAGS
15891if test -n "$ETAGS"; then
15892  echo "$as_me:15892: result: $ETAGS" >&5
15893echo "${ECHO_T}$ETAGS" >&6
15894else
15895  echo "$as_me:15895: result: no" >&5
15896echo "${ECHO_T}no" >&6
15897fi
15898
15899  test -n "$ETAGS" && break
15900done
15901
15902# Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
15903set dummy ${CTAGS:-ctags}; ac_word=$2
15904echo "$as_me:15904: checking for $ac_word" >&5
15905echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
15906if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
15907  echo $ECHO_N "(cached) $ECHO_C" >&6
15908else
15909  if test -n "$MAKE_LOWER_TAGS"; then
15910  ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
15911else
15912  ac_save_IFS=$IFS; IFS=$ac_path_separator
15913ac_dummy="$PATH"
15914for ac_dir in $ac_dummy; do
15915  IFS=$ac_save_IFS
15916  test -z "$ac_dir" && ac_dir=.
15917  $as_executable_p "$ac_dir/$ac_word" || continue
15918ac_cv_prog_MAKE_LOWER_TAGS="yes"
15919echo "$as_me:15919: found $ac_dir/$ac_word" >&5
15920break
15921done
15922
15923  test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
15924fi
15925fi
15926MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
15927if test -n "$MAKE_LOWER_TAGS"; then
15928  echo "$as_me:15928: result: $MAKE_LOWER_TAGS" >&5
15929echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
15930else
15931  echo "$as_me:15931: result: no" >&5
15932echo "${ECHO_T}no" >&6
15933fi
15934
15935if test "$cf_cv_mixedcase" = yes ; then
15936	# Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
15937set dummy ${ETAGS:-etags}; ac_word=$2
15938echo "$as_me:15938: checking for $ac_word" >&5
15939echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
15940if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
15941  echo $ECHO_N "(cached) $ECHO_C" >&6
15942else
15943  if test -n "$MAKE_UPPER_TAGS"; then
15944  ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
15945else
15946  ac_save_IFS=$IFS; IFS=$ac_path_separator
15947ac_dummy="$PATH"
15948for ac_dir in $ac_dummy; do
15949  IFS=$ac_save_IFS
15950  test -z "$ac_dir" && ac_dir=.
15951  $as_executable_p "$ac_dir/$ac_word" || continue
15952ac_cv_prog_MAKE_UPPER_TAGS="yes"
15953echo "$as_me:15953: found $ac_dir/$ac_word" >&5
15954break
15955done
15956
15957  test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
15958fi
15959fi
15960MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
15961if test -n "$MAKE_UPPER_TAGS"; then
15962  echo "$as_me:15962: result: $MAKE_UPPER_TAGS" >&5
15963echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
15964else
15965  echo "$as_me:15965: result: no" >&5
15966echo "${ECHO_T}no" >&6
15967fi
15968
15969else
15970	MAKE_UPPER_TAGS=no
15971fi
15972
15973if test "$MAKE_UPPER_TAGS" = yes ; then
15974	MAKE_UPPER_TAGS=
15975else
15976	MAKE_UPPER_TAGS="#"
15977fi
15978
15979if test "$MAKE_LOWER_TAGS" = yes ; then
15980	MAKE_LOWER_TAGS=
15981else
15982	MAKE_LOWER_TAGS="#"
15983fi
15984
15985LD_RPATH_OPT=
15986echo "$as_me:15986: checking for an rpath option" >&5
15987echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
15988case $cf_cv_system_name in #(vi
15989irix*) #(vi
15990	if test "$GCC" = yes; then
15991		LD_RPATH_OPT="-Wl,-rpath,"
15992	else
15993		LD_RPATH_OPT="-rpath "
15994	fi
15995	;;
15996linux*|gnu*|k*bsd*-gnu) #(vi
15997	LD_RPATH_OPT="-Wl,-rpath,"
15998	;;
15999openbsd[2-9].*|mirbsd*) #(vi
16000	LD_RPATH_OPT="-Wl,-rpath,"
16001	;;
16002freebsd*) #(vi
16003	LD_RPATH_OPT="-rpath "
16004	;;
16005netbsd*) #(vi
16006	LD_RPATH_OPT="-Wl,-rpath,"
16007	;;
16008osf*|mls+*) #(vi
16009	LD_RPATH_OPT="-rpath "
16010	;;
16011solaris2*) #(vi
16012	LD_RPATH_OPT="-R"
16013	;;
16014*)
16015	;;
16016esac
16017echo "$as_me:16017: result: $LD_RPATH_OPT" >&5
16018echo "${ECHO_T}$LD_RPATH_OPT" >&6
16019
16020case "x$LD_RPATH_OPT" in #(vi
16021x-R*)
16022	echo "$as_me:16022: checking if we need a space after rpath option" >&5
16023echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
16024	cf_save_LIBS="$LIBS"
16025	LIBS="${LD_RPATH_OPT}$libdir $LIBS"
16026	cat >conftest.$ac_ext <<_ACEOF
16027#line 16027 "configure"
16028#include "confdefs.h"
16029
16030int
16031main ()
16032{
16033
16034  ;
16035  return 0;
16036}
16037_ACEOF
16038rm -f conftest.$ac_objext conftest$ac_exeext
16039if { (eval echo "$as_me:16039: \"$ac_link\"") >&5
16040  (eval $ac_link) 2>&5
16041  ac_status=$?
16042  echo "$as_me:16042: \$? = $ac_status" >&5
16043  (exit $ac_status); } &&
16044         { ac_try='test -s conftest$ac_exeext'
16045  { (eval echo "$as_me:16045: \"$ac_try\"") >&5
16046  (eval $ac_try) 2>&5
16047  ac_status=$?
16048  echo "$as_me:16048: \$? = $ac_status" >&5
16049  (exit $ac_status); }; }; then
16050  cf_rpath_space=no
16051else
16052  echo "$as_me: failed program was:" >&5
16053cat conftest.$ac_ext >&5
16054cf_rpath_space=yes
16055fi
16056rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16057	LIBS="$cf_save_LIBS"
16058	echo "$as_me:16058: result: $cf_rpath_space" >&5
16059echo "${ECHO_T}$cf_rpath_space" >&6
16060	test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
16061	;;
16062esac
16063
16064echo "$as_me:16064: checking if rpath-hack should be disabled" >&5
16065echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
16066
16067# Check whether --enable-rpath-hack or --disable-rpath-hack was given.
16068if test "${enable_rpath_hack+set}" = set; then
16069  enableval="$enable_rpath_hack"
16070  test "$enableval" != no && enableval=yes
16071  if test "$enableval" != "yes" ; then
16072    cf_disable_rpath_hack=yes
16073  else
16074    cf_disable_rpath_hack=no
16075  fi
16076else
16077  enableval=yes
16078  cf_disable_rpath_hack=no
16079
16080fi;
16081echo "$as_me:16081: result: $cf_disable_rpath_hack" >&5
16082echo "${ECHO_T}$cf_disable_rpath_hack" >&6
16083if test "$cf_disable_rpath_hack" = no ; then
16084
16085echo "$as_me:16085: checking for updated LDFLAGS" >&5
16086echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
16087if test -n "$LD_RPATH_OPT" ; then
16088	echo "$as_me:16088: result: maybe" >&5
16089echo "${ECHO_T}maybe" >&6
16090
16091	for ac_prog in ldd
16092do
16093  # Extract the first word of "$ac_prog", so it can be a program name with args.
16094set dummy $ac_prog; ac_word=$2
16095echo "$as_me:16095: checking for $ac_word" >&5
16096echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
16097if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
16098  echo $ECHO_N "(cached) $ECHO_C" >&6
16099else
16100  if test -n "$cf_ldd_prog"; then
16101  ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
16102else
16103  ac_save_IFS=$IFS; IFS=$ac_path_separator
16104ac_dummy="$PATH"
16105for ac_dir in $ac_dummy; do
16106  IFS=$ac_save_IFS
16107  test -z "$ac_dir" && ac_dir=.
16108  $as_executable_p "$ac_dir/$ac_word" || continue
16109ac_cv_prog_cf_ldd_prog="$ac_prog"
16110echo "$as_me:16110: found $ac_dir/$ac_word" >&5
16111break
16112done
16113
16114fi
16115fi
16116cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
16117if test -n "$cf_ldd_prog"; then
16118  echo "$as_me:16118: result: $cf_ldd_prog" >&5
16119echo "${ECHO_T}$cf_ldd_prog" >&6
16120else
16121  echo "$as_me:16121: result: no" >&5
16122echo "${ECHO_T}no" >&6
16123fi
16124
16125  test -n "$cf_ldd_prog" && break
16126done
16127test -n "$cf_ldd_prog" || cf_ldd_prog="no"
16128
16129	cf_rpath_list="/usr/lib /lib"
16130	if test "$cf_ldd_prog" != no
16131	then
16132		cf_rpath_oops=
16133
16134cat >conftest.$ac_ext <<_ACEOF
16135#line 16135 "configure"
16136#include "confdefs.h"
16137#include <stdio.h>
16138int
16139main ()
16140{
16141printf("Hello");
16142  ;
16143  return 0;
16144}
16145_ACEOF
16146rm -f conftest.$ac_objext conftest$ac_exeext
16147if { (eval echo "$as_me:16147: \"$ac_link\"") >&5
16148  (eval $ac_link) 2>&5
16149  ac_status=$?
16150  echo "$as_me:16150: \$? = $ac_status" >&5
16151  (exit $ac_status); } &&
16152         { ac_try='test -s conftest$ac_exeext'
16153  { (eval echo "$as_me:16153: \"$ac_try\"") >&5
16154  (eval $ac_try) 2>&5
16155  ac_status=$?
16156  echo "$as_me:16156: \$? = $ac_status" >&5
16157  (exit $ac_status); }; }; then
16158  cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort -u`
16159		 cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[ 	]/%/%' -e 's%/[^/][^/]*$%%' |sort -u`
16160else
16161  echo "$as_me: failed program was:" >&5
16162cat conftest.$ac_ext >&5
16163fi
16164rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16165
16166		# If we passed the link-test, but get a "not found" on a given library,
16167		# this could be due to inept reconfiguration of gcc to make it only
16168		# partly honor /usr/local/lib (or whatever).  Sometimes this behavior
16169		# is intentional, e.g., installing gcc in /usr/bin and suppressing the
16170		# /usr/local libraries.
16171		if test -n "$cf_rpath_oops"
16172		then
16173			for cf_rpath_src in $cf_rpath_oops
16174			do
16175				for cf_rpath_dir in \
16176					/usr/local \
16177					/usr/pkg \
16178					/opt/sfw
16179				do
16180					if test -f $cf_rpath_dir/lib/$cf_rpath_src
16181					then
16182						test -n "$verbose" && echo "	...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
16183
16184echo "${as_me:-configure}:16184: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
16185
16186						LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
16187						break
16188					fi
16189				done
16190			done
16191		fi
16192	fi
16193
16194	test -n "$verbose" && echo "	...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
16195
16196echo "${as_me:-configure}:16196: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
16197
16198test -n "$verbose" && echo "	...checking LDFLAGS $LDFLAGS" 1>&6
16199
16200echo "${as_me:-configure}:16200: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
16201
16202cf_rpath_dst=
16203for cf_rpath_src in $LDFLAGS
16204do
16205	case $cf_rpath_src in #(vi
16206	-L*) #(vi
16207
16208		# check if this refers to a directory which we will ignore
16209		cf_rpath_skip=no
16210		if test -n "$cf_rpath_list"
16211		then
16212			for cf_rpath_item in $cf_rpath_list
16213			do
16214				if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
16215				then
16216					cf_rpath_skip=yes
16217					break
16218				fi
16219			done
16220		fi
16221
16222		if test "$cf_rpath_skip" = no
16223		then
16224			# transform the option
16225			if test "$LD_RPATH_OPT" = "-R " ; then
16226				cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
16227			else
16228				cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
16229			fi
16230
16231			# if we have not already added this, add it now
16232			cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
16233			if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
16234			then
16235				test -n "$verbose" && echo "	...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
16236
16237echo "${as_me:-configure}:16237: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
16238
16239				EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
16240			fi
16241		fi
16242		;;
16243	esac
16244	cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
16245done
16246LDFLAGS=$cf_rpath_dst
16247
16248test -n "$verbose" && echo "	...checked LDFLAGS $LDFLAGS" 1>&6
16249
16250echo "${as_me:-configure}:16250: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
16251
16252test -n "$verbose" && echo "	...checking LIBS $LIBS" 1>&6
16253
16254echo "${as_me:-configure}:16254: testing ...checking LIBS $LIBS ..." 1>&5
16255
16256cf_rpath_dst=
16257for cf_rpath_src in $LIBS
16258do
16259	case $cf_rpath_src in #(vi
16260	-L*) #(vi
16261
16262		# check if this refers to a directory which we will ignore
16263		cf_rpath_skip=no
16264		if test -n "$cf_rpath_list"
16265		then
16266			for cf_rpath_item in $cf_rpath_list
16267			do
16268				if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
16269				then
16270					cf_rpath_skip=yes
16271					break
16272				fi
16273			done
16274		fi
16275
16276		if test "$cf_rpath_skip" = no
16277		then
16278			# transform the option
16279			if test "$LD_RPATH_OPT" = "-R " ; then
16280				cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
16281			else
16282				cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
16283			fi
16284
16285			# if we have not already added this, add it now
16286			cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
16287			if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
16288			then
16289				test -n "$verbose" && echo "	...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
16290
16291echo "${as_me:-configure}:16291: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
16292
16293				EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
16294			fi
16295		fi
16296		;;
16297	esac
16298	cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
16299done
16300LIBS=$cf_rpath_dst
16301
16302test -n "$verbose" && echo "	...checked LIBS $LIBS" 1>&6
16303
16304echo "${as_me:-configure}:16304: testing ...checked LIBS $LIBS ..." 1>&5
16305
16306	test -n "$verbose" && echo "	...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
16307
16308echo "${as_me:-configure}:16308: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
16309
16310fi
16311
16312fi
16313
16314# Force plink.sh to not trim pcre's libraries, which have the same symbol
16315# names as the system regexp.
16316if test "$with_pcre" != no
16317then
16318	LIBS=`echo "$LIBS" | sed -e 's/-lpcre/-kpcre/g'`
16319fi
16320
16321###	output xtermcfg.h, etc
16322ac_config_files="$ac_config_files Makefile df-install"
16323cat >confcache <<\_ACEOF
16324# This file is a shell script that caches the results of configure
16325# tests run on this system so they can be shared between configure
16326# scripts and configure runs, see configure's option --config-cache.
16327# It is not useful on other systems.  If it contains results you don't
16328# want to keep, you may remove or edit it.
16329#
16330# config.status only pays attention to the cache file if you give it
16331# the --recheck option to rerun configure.
16332#
16333# `ac_cv_env_foo' variables (set or unset) will be overriden when
16334# loading this file, other *unset* `ac_cv_foo' will be assigned the
16335# following values.
16336
16337_ACEOF
16338
16339# The following way of writing the cache mishandles newlines in values,
16340# but we know of no workaround that is simple, portable, and efficient.
16341# So, don't put newlines in cache variables' values.
16342# Ultrix sh set writes to stderr and can't be redirected directly,
16343# and sets the high bit in the cache file unless we assign to the vars.
16344{
16345  (set) 2>&1 |
16346    case `(ac_space=' '; set | grep ac_space) 2>&1` in
16347    *ac_space=\ *)
16348      # `set' does not quote correctly, so add quotes (double-quote
16349      # substitution turns \\\\ into \\, and sed turns \\ into \).
16350      sed -n \
16351        "s/'/'\\\\''/g;
16352    	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
16353      ;;
16354    *)
16355      # `set' quotes correctly as required by POSIX, so do not add quotes.
16356      sed -n \
16357        "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
16358      ;;
16359    esac;
16360} |
16361  sed '
16362     t clear
16363     : clear
16364     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16365     t end
16366     /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16367     : end' >>confcache
16368if cmp -s $cache_file confcache; then :; else
16369  if test -w $cache_file; then
16370    test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
16371    cat confcache >$cache_file
16372  else
16373    echo "not updating unwritable cache $cache_file"
16374  fi
16375fi
16376rm -f confcache
16377
16378test "x$prefix" = xNONE && prefix=$ac_default_prefix
16379# Let make expand exec_prefix.
16380test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16381
16382# VPATH may cause trouble with some makes, so we remove $(srcdir),
16383# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
16384# trailing colons and then remove the whole line if VPATH becomes empty
16385# (actually we leave an empty line to preserve line numbers).
16386if test "x$srcdir" = x.; then
16387  ac_vpsub='/^[ 	]*VPATH[ 	]*=/{
16388s/:*\$(srcdir):*/:/;
16389s/:*\${srcdir}:*/:/;
16390s/:*@srcdir@:*/:/;
16391s/^\([^=]*=[ 	]*\):*/\1/;
16392s/:*$//;
16393s/^[^=]*=[ 	]*$//;
16394}'
16395fi
16396
16397DEFS=-DHAVE_CONFIG_H
16398
16399: ${CONFIG_STATUS=./config.status}
16400ac_clean_files_save=$ac_clean_files
16401ac_clean_files="$ac_clean_files $CONFIG_STATUS"
16402{ echo "$as_me:16402: creating $CONFIG_STATUS" >&5
16403echo "$as_me: creating $CONFIG_STATUS" >&6;}
16404cat >$CONFIG_STATUS <<_ACEOF
16405#! $SHELL
16406# Generated automatically by configure.
16407# Run this file to recreate the current configuration.
16408# Compiler output produced by configure, useful for debugging
16409# configure, is in config.log if it exists.
16410
16411debug=false
16412SHELL=\${CONFIG_SHELL-$SHELL}
16413ac_cs_invocation="\$0 \$@"
16414
16415_ACEOF
16416
16417cat >>$CONFIG_STATUS <<\_ACEOF
16418# Be Bourne compatible
16419if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
16420  emulate sh
16421  NULLCMD=:
16422elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
16423  set -o posix
16424fi
16425
16426# Name of the executable.
16427as_me=`echo "$0" |sed 's,.*[\\/],,'`
16428
16429if expr a : '\(a\)' >/dev/null 2>&1; then
16430  as_expr=expr
16431else
16432  as_expr=false
16433fi
16434
16435rm -f conf$$ conf$$.exe conf$$.file
16436echo >conf$$.file
16437if ln -s conf$$.file conf$$ 2>/dev/null; then
16438  # We could just check for DJGPP; but this test a) works b) is more generic
16439  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
16440  if test -f conf$$.exe; then
16441    # Don't use ln at all; we don't have any links
16442    as_ln_s='cp -p'
16443  else
16444    as_ln_s='ln -s'
16445  fi
16446elif ln conf$$.file conf$$ 2>/dev/null; then
16447  as_ln_s=ln
16448else
16449  as_ln_s='cp -p'
16450fi
16451rm -f conf$$ conf$$.exe conf$$.file
16452
16453as_executable_p="test -f"
16454
16455# Support unset when possible.
16456if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
16457  as_unset=unset
16458else
16459  as_unset=false
16460fi
16461
16462# NLS nuisances.
16463$as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
16464$as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
16465$as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
16466$as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
16467$as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
16468$as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
16469$as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
16470$as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
16471
16472# IFS
16473# We need space, tab and new line, in precisely that order.
16474as_nl='
16475'
16476IFS=" 	$as_nl"
16477
16478# CDPATH.
16479$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
16480
16481exec 6>&1
16482
16483_ACEOF
16484
16485# Files that config.status was made for.
16486if test -n "$ac_config_files"; then
16487  echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
16488fi
16489
16490if test -n "$ac_config_headers"; then
16491  echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
16492fi
16493
16494if test -n "$ac_config_links"; then
16495  echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
16496fi
16497
16498if test -n "$ac_config_commands"; then
16499  echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
16500fi
16501
16502cat >>$CONFIG_STATUS <<\EOF
16503
16504ac_cs_usage="\
16505\`$as_me' instantiates files from templates according to the
16506current configuration.
16507
16508Usage: $0 [OPTIONS] [FILE]...
16509
16510  -h, --help       print this help, then exit
16511  -V, --version    print version number, then exit
16512  -d, --debug      don't remove temporary files
16513      --recheck    update $as_me by reconfiguring in the same conditions
16514  --file=FILE[:TEMPLATE]
16515                   instantiate the configuration file FILE
16516  --header=FILE[:TEMPLATE]
16517                   instantiate the configuration header FILE
16518
16519Configuration files:
16520$config_files
16521
16522Configuration headers:
16523$config_headers
16524
16525Report bugs to <dickey@invisible-island.net>."
16526EOF
16527
16528cat >>$CONFIG_STATUS <<EOF
16529ac_cs_version="\\
16530config.status
16531configured by $0, generated by GNU Autoconf 2.52.20101002,
16532  with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
16533
16534Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
16535Free Software Foundation, Inc.
16536This config.status script is free software; the Free Software Foundation
16537gives unlimited permission to copy, distribute and modify it."
16538srcdir=$srcdir
16539INSTALL="$INSTALL"
16540EOF
16541
16542cat >>$CONFIG_STATUS <<\EOF
16543# If no file are specified by the user, then we need to provide default
16544# value.  By we need to know if files were specified by the user.
16545ac_need_defaults=:
16546while test $# != 0
16547do
16548  case $1 in
16549  --*=*)
16550    ac_option=`expr "x$1" : 'x\([^=]*\)='`
16551    ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
16552    shift
16553    set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
16554    shift
16555    ;;
16556  -*);;
16557  *) # This is not an option, so the user has probably given explicit
16558     # arguments.
16559     ac_need_defaults=false;;
16560  esac
16561
16562  case $1 in
16563  # Handling of the options.
16564EOF
16565cat >>$CONFIG_STATUS <<EOF
16566  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16567    echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
16568    exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
16569EOF
16570cat >>$CONFIG_STATUS <<\EOF
16571  --version | --vers* | -V )
16572    echo "$ac_cs_version"; exit 0 ;;
16573  --he | --h)
16574    # Conflict between --help and --header
16575    { { echo "$as_me:16575: error: ambiguous option: $1
16576Try \`$0 --help' for more information." >&5
16577echo "$as_me: error: ambiguous option: $1
16578Try \`$0 --help' for more information." >&2;}
16579   { (exit 1); exit 1; }; };;
16580  --help | --hel | -h )
16581    echo "$ac_cs_usage"; exit 0 ;;
16582  --debug | --d* | -d )
16583    debug=: ;;
16584  --file | --fil | --fi | --f )
16585    shift
16586    CONFIG_FILES="$CONFIG_FILES $1"
16587    ac_need_defaults=false;;
16588  --header | --heade | --head | --hea )
16589    shift
16590    CONFIG_HEADERS="$CONFIG_HEADERS $1"
16591    ac_need_defaults=false;;
16592
16593  # This is an error.
16594  -*) { { echo "$as_me:16594: error: unrecognized option: $1
16595Try \`$0 --help' for more information." >&5
16596echo "$as_me: error: unrecognized option: $1
16597Try \`$0 --help' for more information." >&2;}
16598   { (exit 1); exit 1; }; } ;;
16599
16600  *) ac_config_targets="$ac_config_targets $1" ;;
16601
16602  esac
16603  shift
16604done
16605
16606exec 5>>config.log
16607cat >&5 << _ACEOF
16608
16609## ----------------------- ##
16610## Running config.status.  ##
16611## ----------------------- ##
16612
16613This file was extended by $as_me 2.52.20101002, executed with
16614  CONFIG_FILES    = $CONFIG_FILES
16615  CONFIG_HEADERS  = $CONFIG_HEADERS
16616  CONFIG_LINKS    = $CONFIG_LINKS
16617  CONFIG_COMMANDS = $CONFIG_COMMANDS
16618  > $ac_cs_invocation
16619on `(hostname || uname -n) 2>/dev/null | sed 1q`
16620
16621_ACEOF
16622EOF
16623
16624cat >>$CONFIG_STATUS <<\EOF
16625for ac_config_target in $ac_config_targets
16626do
16627  case "$ac_config_target" in
16628  # Handling of arguments.
16629  "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
16630  "df-install" ) CONFIG_FILES="$CONFIG_FILES df-install" ;;
16631  "xtermcfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS xtermcfg.h:xtermcfg.hin" ;;
16632  *) { { echo "$as_me:16632: error: invalid argument: $ac_config_target" >&5
16633echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
16634   { (exit 1); exit 1; }; };;
16635  esac
16636done
16637
16638# If the user did not use the arguments to specify the items to instantiate,
16639# then the envvar interface is used.  Set only those that are not.
16640# We use the long form for the default assignment because of an extremely
16641# bizarre bug on SunOS 4.1.3.
16642if $ac_need_defaults; then
16643  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
16644  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
16645fi
16646
16647# Create a temporary directory, and hook for its removal unless debugging.
16648$debug ||
16649{
16650  trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
16651  trap '{ (exit 1); exit 1; }' 1 2 13 15
16652}
16653
16654# Create a (secure) tmp directory for tmp files.
16655: ${TMPDIR=/tmp}
16656{
16657  tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
16658  test -n "$tmp" && test -d "$tmp"
16659}  ||
16660{
16661  tmp=$TMPDIR/cs$$-$RANDOM
16662  (umask 077 && mkdir $tmp)
16663} ||
16664{
16665   echo "$me: cannot create a temporary directory in $TMPDIR" >&2
16666   { (exit 1); exit 1; }
16667}
16668
16669EOF
16670
16671cat >>$CONFIG_STATUS <<EOF
16672
16673#
16674# CONFIG_FILES section.
16675#
16676
16677# No need to generate the scripts if there are no CONFIG_FILES.
16678# This happens for instance when ./config.status config.h
16679if test -n "\$CONFIG_FILES"; then
16680  # Protect against being on the right side of a sed subst in config.status.
16681  sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
16682   s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
16683s,@SHELL@,$SHELL,;t t
16684s,@exec_prefix@,$exec_prefix,;t t
16685s,@prefix@,$prefix,;t t
16686s,@program_transform_name@,$program_transform_name,;t t
16687s,@bindir@,$bindir,;t t
16688s,@sbindir@,$sbindir,;t t
16689s,@libexecdir@,$libexecdir,;t t
16690s,@datadir@,$datadir,;t t
16691s,@sysconfdir@,$sysconfdir,;t t
16692s,@sharedstatedir@,$sharedstatedir,;t t
16693s,@localstatedir@,$localstatedir,;t t
16694s,@libdir@,$libdir,;t t
16695s,@includedir@,$includedir,;t t
16696s,@oldincludedir@,$oldincludedir,;t t
16697s,@infodir@,$infodir,;t t
16698s,@mandir@,$mandir,;t t
16699s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
16700s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
16701s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
16702s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
16703s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
16704s,@build_alias@,$build_alias,;t t
16705s,@host_alias@,$host_alias,;t t
16706s,@target_alias@,$target_alias,;t t
16707s,@ECHO_C@,$ECHO_C,;t t
16708s,@ECHO_N@,$ECHO_N,;t t
16709s,@ECHO_T@,$ECHO_T,;t t
16710s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
16711s,@DEFS@,$DEFS,;t t
16712s,@LIBS@,$LIBS,;t t
16713s,@build@,$build,;t t
16714s,@build_cpu@,$build_cpu,;t t
16715s,@build_vendor@,$build_vendor,;t t
16716s,@build_os@,$build_os,;t t
16717s,@host@,$host,;t t
16718s,@host_cpu@,$host_cpu,;t t
16719s,@host_vendor@,$host_vendor,;t t
16720s,@host_os@,$host_os,;t t
16721s,@CC@,$CC,;t t
16722s,@CFLAGS@,$CFLAGS,;t t
16723s,@LDFLAGS@,$LDFLAGS,;t t
16724s,@CPPFLAGS@,$CPPFLAGS,;t t
16725s,@ac_ct_CC@,$ac_ct_CC,;t t
16726s,@EXEEXT@,$EXEEXT,;t t
16727s,@OBJEXT@,$OBJEXT,;t t
16728s,@CPP@,$CPP,;t t
16729s,@AWK@,$AWK,;t t
16730s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
16731s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
16732s,@INSTALL_DATA@,$INSTALL_DATA,;t t
16733s,@LN_S@,$LN_S,;t t
16734s,@LINT@,$LINT,;t t
16735s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
16736s,@PROG_EXT@,$PROG_EXT,;t t
16737s,@APP_CLASS@,$APP_CLASS,;t t
16738s,@appsdir@,$appsdir,;t t
16739s,@no_appsdir@,$no_appsdir,;t t
16740s,@icondir@,$icondir,;t t
16741s,@no_icondir@,$no_icondir,;t t
16742s,@desktop_utils@,$desktop_utils,;t t
16743s,@DESKTOP_FLAGS@,$DESKTOP_FLAGS,;t t
16744s,@DESKTOP_CATEGORY@,$DESKTOP_CATEGORY,;t t
16745s,@XTERM_PATH@,$XTERM_PATH,;t t
16746s,@XTERM_SYMLINK@,$XTERM_SYMLINK,;t t
16747s,@SINSTALL_OPTS@,$SINSTALL_OPTS,;t t
16748s,@X_CFLAGS@,$X_CFLAGS,;t t
16749s,@X_PRE_LIBS@,$X_PRE_LIBS,;t t
16750s,@X_LIBS@,$X_LIBS,;t t
16751s,@X_EXTRA_LIBS@,$X_EXTRA_LIBS,;t t
16752s,@PKG_CONFIG@,$PKG_CONFIG,;t t
16753s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
16754s,@IMAKE@,$IMAKE,;t t
16755s,@IMAKE_CFLAGS@,$IMAKE_CFLAGS,;t t
16756s,@IMAKE_LOADFLAGS@,$IMAKE_LOADFLAGS,;t t
16757s,@cf_tic_prog@,$cf_tic_prog,;t t
16758s,@no_ticprog@,$no_ticprog,;t t
16759s,@TERMINFO_DIR@,$TERMINFO_DIR,;t t
16760s,@SET_TERMINFO@,$SET_TERMINFO,;t t
16761s,@FREETYPE_XFT_CONFIG@,$FREETYPE_XFT_CONFIG,;t t
16762s,@FREETYPE_OLD_CONFIG@,$FREETYPE_OLD_CONFIG,;t t
16763s,@HAVE_TYPE_FCCHAR32@,$HAVE_TYPE_FCCHAR32,;t t
16764s,@HAVE_TYPE_XFTCHARSPEC@,$HAVE_TYPE_XFTCHARSPEC,;t t
16765s,@LUIT@,$LUIT,;t t
16766s,@ECHO_LT@,$ECHO_LT,;t t
16767s,@ECHO_LD@,$ECHO_LD,;t t
16768s,@RULE_CC@,$RULE_CC,;t t
16769s,@SHOW_CC@,$SHOW_CC,;t t
16770s,@ECHO_CC@,$ECHO_CC,;t t
16771s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
16772s,@CHARPROC_DEPS@,$CHARPROC_DEPS,;t t
16773s,@EXTRAHDRS@,$EXTRAHDRS,;t t
16774s,@EXTRASRCS@,$EXTRASRCS,;t t
16775s,@EXTRAOBJS@,$EXTRAOBJS,;t t
16776s,@MAY_SETUID@,$MAY_SETUID,;t t
16777s,@NOT_SETUID@,$NOT_SETUID,;t t
16778s,@CTAGS@,$CTAGS,;t t
16779s,@ETAGS@,$ETAGS,;t t
16780s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
16781s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
16782s,@cf_ldd_prog@,$cf_ldd_prog,;t t
16783s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
16784CEOF
16785
16786EOF
16787
16788  cat >>$CONFIG_STATUS <<\EOF
16789  # Split the substitutions into bite-sized pieces for seds with
16790  # small command number limits, like on Digital OSF/1 and HP-UX.
16791  ac_max_sed_lines=48
16792  ac_sed_frag=1 # Number of current file.
16793  ac_beg=1 # First line for current file.
16794  ac_end=$ac_max_sed_lines # Line after last line for current file.
16795  ac_more_lines=:
16796  ac_sed_cmds=
16797  while $ac_more_lines; do
16798    if test $ac_beg -gt 1; then
16799      sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
16800    else
16801      sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
16802    fi
16803    if test ! -s $tmp/subs.frag; then
16804      ac_more_lines=false
16805    else
16806      # The purpose of the label and of the branching condition is to
16807      # speed up the sed processing (if there are no `@' at all, there
16808      # is no need to browse any of the substitutions).
16809      # These are the two extra sed commands mentioned above.
16810      (echo ':t
16811  /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
16812      if test -z "$ac_sed_cmds"; then
16813  	ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
16814      else
16815  	ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
16816      fi
16817      ac_sed_frag=`expr $ac_sed_frag + 1`
16818      ac_beg=$ac_end
16819      ac_end=`expr $ac_end + $ac_max_sed_lines`
16820    fi
16821  done
16822  if test -z "$ac_sed_cmds"; then
16823    ac_sed_cmds=cat
16824  fi
16825fi # test -n "$CONFIG_FILES"
16826
16827EOF
16828cat >>$CONFIG_STATUS <<\EOF
16829for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
16830  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16831  case $ac_file in
16832  - | *:- | *:-:* ) # input from stdin
16833        cat >$tmp/stdin
16834        ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16835        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16836  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16837        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16838  * )   ac_file_in=$ac_file.in ;;
16839  esac
16840
16841  # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
16842  ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16843         X"$ac_file" : 'X\(//\)[^/]' \| \
16844         X"$ac_file" : 'X\(//\)$' \| \
16845         X"$ac_file" : 'X\(/\)' \| \
16846         .     : '\(.\)' 2>/dev/null ||
16847echo X"$ac_file" |
16848    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
16849  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
16850  	  /^X\(\/\/\)$/{ s//\1/; q; }
16851  	  /^X\(\/\).*/{ s//\1/; q; }
16852  	  s/.*/./; q'`
16853  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16854    { case "$ac_dir" in
16855  [\\/]* | ?:[\\/]* ) as_incr_dir=;;
16856  *)                      as_incr_dir=.;;
16857esac
16858as_dummy="$ac_dir"
16859for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
16860  case $as_mkdir_dir in
16861    # Skip DOS drivespec
16862    ?:) as_incr_dir=$as_mkdir_dir ;;
16863    *)
16864      as_incr_dir=$as_incr_dir/$as_mkdir_dir
16865      test -d "$as_incr_dir" || mkdir "$as_incr_dir"
16866    ;;
16867  esac
16868done; }
16869
16870    ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
16871    # A "../" for each directory in $ac_dir_suffix.
16872    ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
16873  else
16874    ac_dir_suffix= ac_dots=
16875  fi
16876
16877  case $srcdir in
16878  .)  ac_srcdir=.
16879      if test -z "$ac_dots"; then
16880         ac_top_srcdir=.
16881      else
16882         ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
16883      fi ;;
16884  [\\/]* | ?:[\\/]* )
16885      ac_srcdir=$srcdir$ac_dir_suffix;
16886      ac_top_srcdir=$srcdir ;;
16887  *) # Relative path.
16888    ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
16889    ac_top_srcdir=$ac_dots$srcdir ;;
16890  esac
16891
16892  case $INSTALL in
16893  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
16894  *) ac_INSTALL=$ac_dots$INSTALL ;;
16895  esac
16896
16897  if test x"$ac_file" != x-; then
16898    { echo "$as_me:16898: creating $ac_file" >&5
16899echo "$as_me: creating $ac_file" >&6;}
16900    rm -f "$ac_file"
16901  fi
16902  # Let's still pretend it is `configure' which instantiates (i.e., don't
16903  # use $as_me), people would be surprised to read:
16904  #    /* config.h.  Generated automatically by config.status.  */
16905  configure_input="Generated automatically from `echo $ac_file_in |
16906                                                 sed 's,.*/,,'` by configure."
16907
16908  # First look for the input files in the build tree, otherwise in the
16909  # src tree.
16910  ac_file_inputs=`IFS=:
16911    for f in $ac_file_in; do
16912      case $f in
16913      -) echo $tmp/stdin ;;
16914      [\\/$]*)
16915         # Absolute (can't be DOS-style, as IFS=:)
16916         test -f "$f" || { { echo "$as_me:16916: error: cannot find input file: $f" >&5
16917echo "$as_me: error: cannot find input file: $f" >&2;}
16918   { (exit 1); exit 1; }; }
16919         echo $f;;
16920      *) # Relative
16921         if test -f "$f"; then
16922           # Build tree
16923           echo $f
16924         elif test -f "$srcdir/$f"; then
16925           # Source tree
16926           echo $srcdir/$f
16927         else
16928           # /dev/null tree
16929           { { echo "$as_me:16929: error: cannot find input file: $f" >&5
16930echo "$as_me: error: cannot find input file: $f" >&2;}
16931   { (exit 1); exit 1; }; }
16932         fi;;
16933      esac
16934    done` || { (exit 1); exit 1; }
16935EOF
16936cat >>$CONFIG_STATUS <<EOF
16937  sed "$ac_vpsub
16938$extrasub
16939EOF
16940cat >>$CONFIG_STATUS <<\EOF
16941:t
16942/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
16943s,@configure_input@,$configure_input,;t t
16944s,@srcdir@,$ac_srcdir,;t t
16945s,@top_srcdir@,$ac_top_srcdir,;t t
16946s,@INSTALL@,$ac_INSTALL,;t t
16947" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
16948  rm -f $tmp/stdin
16949  if test x"$ac_file" != x-; then
16950    mv $tmp/out $ac_file
16951  else
16952    cat $tmp/out
16953    rm -f $tmp/out
16954  fi
16955
16956done
16957EOF
16958cat >>$CONFIG_STATUS <<\EOF
16959
16960#
16961# CONFIG_HEADER section.
16962#
16963
16964# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
16965# NAME is the cpp macro being defined and VALUE is the value it is being given.
16966#
16967# ac_d sets the value in "#define NAME VALUE" lines.
16968ac_dA='s,^\([ 	]*\)#\([ 	]*define[ 	][ 	]*\)'
16969ac_dB='[ 	].*$,\1#\2'
16970ac_dC=' '
16971ac_dD=',;t'
16972# ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
16973ac_iA='s,^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
16974ac_iB='\([ 	]\),\1#\2define\3'
16975ac_iC=' '
16976ac_iD='\4,;t'
16977# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
16978ac_uA='s,^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
16979ac_uB='$,\1#\2define\3'
16980ac_uC=' '
16981ac_uD=',;t'
16982
16983for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
16984  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16985  case $ac_file in
16986  - | *:- | *:-:* ) # input from stdin
16987        cat >$tmp/stdin
16988        ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16989        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16990  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16991        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16992  * )   ac_file_in=$ac_file.in ;;
16993  esac
16994
16995  test x"$ac_file" != x- && { echo "$as_me:16995: creating $ac_file" >&5
16996echo "$as_me: creating $ac_file" >&6;}
16997
16998  # First look for the input files in the build tree, otherwise in the
16999  # src tree.
17000  ac_file_inputs=`IFS=:
17001    for f in $ac_file_in; do
17002      case $f in
17003      -) echo $tmp/stdin ;;
17004      [\\/$]*)
17005         # Absolute (can't be DOS-style, as IFS=:)
17006         test -f "$f" || { { echo "$as_me:17006: error: cannot find input file: $f" >&5
17007echo "$as_me: error: cannot find input file: $f" >&2;}
17008   { (exit 1); exit 1; }; }
17009         echo $f;;
17010      *) # Relative
17011         if test -f "$f"; then
17012           # Build tree
17013           echo $f
17014         elif test -f "$srcdir/$f"; then
17015           # Source tree
17016           echo $srcdir/$f
17017         else
17018           # /dev/null tree
17019           { { echo "$as_me:17019: error: cannot find input file: $f" >&5
17020echo "$as_me: error: cannot find input file: $f" >&2;}
17021   { (exit 1); exit 1; }; }
17022         fi;;
17023      esac
17024    done` || { (exit 1); exit 1; }
17025  # Remove the trailing spaces.
17026  sed 's/[ 	]*$//' $ac_file_inputs >$tmp/in
17027
17028EOF
17029
17030# Transform confdefs.h into two sed scripts, `conftest.defines' and
17031# `conftest.undefs', that substitutes the proper values into
17032# config.h.in to produce config.h.  The first handles `#define'
17033# templates, and the second `#undef' templates.
17034# And first: Protect against being on the right side of a sed subst in
17035# config.status.  Protect against being in an unquoted here document
17036# in config.status.
17037rm -f conftest.defines conftest.undefs
17038# Using a here document instead of a string reduces the quoting nightmare.
17039# Putting comments in sed scripts is not portable.
17040#
17041# `end' is used to avoid that the second main sed command (meant for
17042# 0-ary CPP macros) applies to n-ary macro definitions.
17043# See the Autoconf documentation for `clear'.
17044cat >confdef2sed.sed <<\EOF
17045s/[\\&,]/\\&/g
17046s,[\\$`],\\&,g
17047t clear
17048: clear
17049s,^[ 	]*#[ 	]*define[ 	][ 	]*\(\([^ 	(][^ 	(]*\)([^)]*)\)[ 	]*\(.*\)$,${ac_dA}\2${ac_dB}\1${ac_dC}\3${ac_dD},gp
17050t end
17051s,^[ 	]*#[ 	]*define[ 	][ 	]*\([^ 	][^ 	]*\)[ 	]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
17052: end
17053EOF
17054# If some macros were called several times there might be several times
17055# the same #defines, which is useless.  Nevertheless, we may not want to
17056# sort them, since we want the *last* AC-DEFINE to be honored.
17057uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
17058sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
17059sed 's/ac_d/ac_i/g' conftest.defines >>conftest.undefs
17060rm -f confdef2sed.sed
17061
17062# This sed command replaces #undef with comments.  This is necessary, for
17063# example, in the case of _POSIX_SOURCE, which is predefined and required
17064# on some systems where configure will not decide to define it.
17065cat >>conftest.undefs <<\EOF
17066s,^[ 	]*#[ 	]*undef[ 	][ 	]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
17067EOF
17068
17069# Break up conftest.defines because some shells have a limit on the size
17070# of here documents, and old seds have small limits too (100 cmds).
17071echo '  # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
17072echo '  if egrep "^[ 	]*#[ 	]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
17073echo '  # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
17074echo '  :' >>$CONFIG_STATUS
17075rm -f conftest.tail
17076while grep . conftest.defines >/dev/null
17077do
17078  # Write a limited-size here document to $tmp/defines.sed.
17079  echo '  cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
17080  # Speed up: don't consider the non `#define' lines.
17081  echo '/^[ 	]*#[ 	]*define/!b' >>$CONFIG_STATUS
17082  # Work around the forget-to-reset-the-flag bug.
17083  echo 't clr' >>$CONFIG_STATUS
17084  echo ': clr' >>$CONFIG_STATUS
17085  sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
17086  echo 'CEOF
17087  sed -f $tmp/defines.sed $tmp/in >$tmp/out
17088  rm -f $tmp/in
17089  mv $tmp/out $tmp/in
17090' >>$CONFIG_STATUS
17091  sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
17092  rm -f conftest.defines
17093  mv conftest.tail conftest.defines
17094done
17095rm -f conftest.defines
17096echo '  fi # egrep' >>$CONFIG_STATUS
17097echo >>$CONFIG_STATUS
17098
17099# Break up conftest.undefs because some shells have a limit on the size
17100# of here documents, and old seds have small limits too (100 cmds).
17101echo '  # Handle all the #undef templates' >>$CONFIG_STATUS
17102rm -f conftest.tail
17103while grep . conftest.undefs >/dev/null
17104do
17105  # Write a limited-size here document to $tmp/undefs.sed.
17106  echo '  cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
17107  # Speed up: don't consider the non `#undef'
17108  echo '/^[ 	]*#[ 	]*undef/!b' >>$CONFIG_STATUS
17109  # Work around the forget-to-reset-the-flag bug.
17110  echo 't clr' >>$CONFIG_STATUS
17111  echo ': clr' >>$CONFIG_STATUS
17112  sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
17113  echo 'CEOF
17114  sed -f $tmp/undefs.sed $tmp/in >$tmp/out
17115  rm -f $tmp/in
17116  mv $tmp/out $tmp/in
17117' >>$CONFIG_STATUS
17118  sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
17119  rm -f conftest.undefs
17120  mv conftest.tail conftest.undefs
17121done
17122rm -f conftest.undefs
17123
17124cat >>$CONFIG_STATUS <<\EOF
17125  # Let's still pretend it is `configure' which instantiates (i.e., don't
17126  # use $as_me), people would be surprised to read:
17127  #    /* config.h.  Generated automatically by config.status.  */
17128  if test x"$ac_file" = x-; then
17129    echo "/* Generated automatically by configure.  */" >$tmp/config.h
17130  else
17131    echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
17132  fi
17133  cat $tmp/in >>$tmp/config.h
17134  rm -f $tmp/in
17135  if test x"$ac_file" != x-; then
17136    if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
17137      { echo "$as_me:17137: $ac_file is unchanged" >&5
17138echo "$as_me: $ac_file is unchanged" >&6;}
17139    else
17140      ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17141         X"$ac_file" : 'X\(//\)[^/]' \| \
17142         X"$ac_file" : 'X\(//\)$' \| \
17143         X"$ac_file" : 'X\(/\)' \| \
17144         .     : '\(.\)' 2>/dev/null ||
17145echo X"$ac_file" |
17146    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
17147  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
17148  	  /^X\(\/\/\)$/{ s//\1/; q; }
17149  	  /^X\(\/\).*/{ s//\1/; q; }
17150  	  s/.*/./; q'`
17151      if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
17152        { case "$ac_dir" in
17153  [\\/]* | ?:[\\/]* ) as_incr_dir=;;
17154  *)                      as_incr_dir=.;;
17155esac
17156as_dummy="$ac_dir"
17157for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
17158  case $as_mkdir_dir in
17159    # Skip DOS drivespec
17160    ?:) as_incr_dir=$as_mkdir_dir ;;
17161    *)
17162      as_incr_dir=$as_incr_dir/$as_mkdir_dir
17163      test -d "$as_incr_dir" || mkdir "$as_incr_dir"
17164    ;;
17165  esac
17166done; }
17167
17168      fi
17169      rm -f $ac_file
17170      mv $tmp/config.h $ac_file
17171    fi
17172  else
17173    cat $tmp/config.h
17174    rm -f $tmp/config.h
17175  fi
17176done
17177EOF
17178
17179cat >>$CONFIG_STATUS <<\EOF
17180
17181{ (exit 0); exit 0; }
17182EOF
17183chmod +x $CONFIG_STATUS
17184ac_clean_files=$ac_clean_files_save
17185
17186# configure is writing to config.log, and then calls config.status.
17187# config.status does its own redirection, appending to config.log.
17188# Unfortunately, on DOS this fails, as config.log is still kept open
17189# by configure, so config.status won't be able to write to it; its
17190# output is simply discarded.  So we exec the FD to /dev/null,
17191# effectively closing config.log, so it can be properly (re)opened and
17192# appended to by config.status.  When coming back to configure, we
17193# need to make the FD available again.
17194if test "$no_create" != yes; then
17195  ac_cs_success=:
17196  exec 5>/dev/null
17197  $SHELL $CONFIG_STATUS || ac_cs_success=false
17198  exec 5>>config.log
17199  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17200  # would make configure fail if this is the last instruction.
17201  $ac_cs_success || { (exit 1); exit 1; }
17202fi
17203
17204