configure revision 0bd37d32
1#! /bin/sh
2# Guess values for system-dependent variables and create Makefiles.
3# Generated by Autoconf 2.52.20121002.
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'
173datarootdir='${prefix}/share'
174datadir='${datarootdir}'
175sysconfdir='${prefix}/etc'
176sharedstatedir='${prefix}/com'
177localstatedir='${prefix}/var'
178libdir='${exec_prefix}/lib'
179includedir='${prefix}/include'
180oldincludedir='/usr/include'
181infodir='${datarootdir}/info'
182mandir='${datarootdir}/man'
183
184# Identity of this package.
185PACKAGE_NAME=
186PACKAGE_TARNAME=
187PACKAGE_VERSION=
188PACKAGE_STRING=
189PACKAGE_BUGREPORT=
190
191ac_prev=
192for ac_option
193do
194  # If the previous option needs an argument, assign it.
195  if test -n "$ac_prev"; then
196    eval "$ac_prev=\$ac_option"
197    ac_prev=
198    continue
199  fi
200
201  ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
202
203  # Accept the important Cygnus configure options, so we can diagnose typos.
204
205  case $ac_option in
206
207  -bindir | --bindir | --bindi | --bind | --bin | --bi)
208    ac_prev=bindir ;;
209  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
210    bindir=$ac_optarg ;;
211
212  -build | --build | --buil | --bui | --bu)
213    ac_prev=build_alias ;;
214  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
215    build_alias=$ac_optarg ;;
216
217  -cache-file | --cache-file | --cache-fil | --cache-fi \
218  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
219    ac_prev=cache_file ;;
220  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
221  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
222    cache_file=$ac_optarg ;;
223
224  --config-cache | -C)
225    cache_file=config.cache ;;
226
227  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
228    ac_prev=datadir ;;
229  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
230  | --da=*)
231    datadir=$ac_optarg ;;
232
233  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
234  | --dataroo | --dataro | --datar)
235    ac_prev=datarootdir ;;
236  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
237  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
238    datarootdir=$ac_optarg ;;
239
240  -disable-* | --disable-*)
241    ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
242    # Reject names that are not valid shell variable names.
243    expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
244      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
245   { (exit 1); exit 1; }; }
246    ac_feature=`echo $ac_feature | sed 's/-/_/g'`
247    eval "enable_$ac_feature=no" ;;
248
249  -enable-* | --enable-*)
250    ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
251    # Reject names that are not valid shell variable names.
252    expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
253      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
254   { (exit 1); exit 1; }; }
255    ac_feature=`echo $ac_feature | sed 's/-/_/g'`
256    case $ac_option in
257      *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
258      *) ac_optarg=yes ;;
259    esac
260    eval "enable_$ac_feature='$ac_optarg'" ;;
261
262  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
263  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
264  | --exec | --exe | --ex)
265    ac_prev=exec_prefix ;;
266  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
267  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
268  | --exec=* | --exe=* | --ex=*)
269    exec_prefix=$ac_optarg ;;
270
271  -gas | --gas | --ga | --g)
272    # Obsolete; use --with-gas.
273    with_gas=yes ;;
274
275  -help | --help | --hel | --he | -h)
276    ac_init_help=long ;;
277  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
278    ac_init_help=recursive ;;
279  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
280    ac_init_help=short ;;
281
282  -host | --host | --hos | --ho)
283    ac_prev=host_alias ;;
284  -host=* | --host=* | --hos=* | --ho=*)
285    host_alias=$ac_optarg ;;
286
287  -includedir | --includedir | --includedi | --included | --include \
288  | --includ | --inclu | --incl | --inc)
289    ac_prev=includedir ;;
290  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
291  | --includ=* | --inclu=* | --incl=* | --inc=*)
292    includedir=$ac_optarg ;;
293
294  -infodir | --infodir | --infodi | --infod | --info | --inf)
295    ac_prev=infodir ;;
296  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
297    infodir=$ac_optarg ;;
298
299  -libdir | --libdir | --libdi | --libd)
300    ac_prev=libdir ;;
301  -libdir=* | --libdir=* | --libdi=* | --libd=*)
302    libdir=$ac_optarg ;;
303
304  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
305  | --libexe | --libex | --libe)
306    ac_prev=libexecdir ;;
307  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
308  | --libexe=* | --libex=* | --libe=*)
309    libexecdir=$ac_optarg ;;
310
311  -localstatedir | --localstatedir | --localstatedi | --localstated \
312  | --localstate | --localstat | --localsta | --localst \
313  | --locals | --local | --loca | --loc | --lo)
314    ac_prev=localstatedir ;;
315  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
316  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
317  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
318    localstatedir=$ac_optarg ;;
319
320  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
321    ac_prev=mandir ;;
322  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
323    mandir=$ac_optarg ;;
324
325  -nfp | --nfp | --nf)
326    # Obsolete; use --without-fp.
327    with_fp=no ;;
328
329  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
330  | --no-cr | --no-c)
331    no_create=yes ;;
332
333  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
334  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
335    no_recursion=yes ;;
336
337  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
338  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
339  | --oldin | --oldi | --old | --ol | --o)
340    ac_prev=oldincludedir ;;
341  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
342  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
343  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
344    oldincludedir=$ac_optarg ;;
345
346  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
347    ac_prev=prefix ;;
348  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
349    prefix=$ac_optarg ;;
350
351  -program-prefix | --program-prefix | --program-prefi | --program-pref \
352  | --program-pre | --program-pr | --program-p)
353    ac_prev=program_prefix ;;
354  -program-prefix=* | --program-prefix=* | --program-prefi=* \
355  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
356    program_prefix=$ac_optarg ;;
357
358  -program-suffix | --program-suffix | --program-suffi | --program-suff \
359  | --program-suf | --program-su | --program-s)
360    ac_prev=program_suffix ;;
361  -program-suffix=* | --program-suffix=* | --program-suffi=* \
362  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
363    program_suffix=$ac_optarg ;;
364
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    ac_prev=program_transform_name ;;
373  -program-transform-name=* | --program-transform-name=* \
374  | --program-transform-nam=* | --program-transform-na=* \
375  | --program-transform-n=* | --program-transform-=* \
376  | --program-transform=* | --program-transfor=* \
377  | --program-transfo=* | --program-transf=* \
378  | --program-trans=* | --program-tran=* \
379  | --progr-tra=* | --program-tr=* | --program-t=*)
380    program_transform_name=$ac_optarg ;;
381
382  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
383  | -silent | --silent | --silen | --sile | --sil)
384    silent=yes ;;
385
386  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
387    ac_prev=sbindir ;;
388  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
389  | --sbi=* | --sb=*)
390    sbindir=$ac_optarg ;;
391
392  -sharedstatedir | --sharedstatedir | --sharedstatedi \
393  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
394  | --sharedst | --shareds | --shared | --share | --shar \
395  | --sha | --sh)
396    ac_prev=sharedstatedir ;;
397  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
398  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
399  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
400  | --sha=* | --sh=*)
401    sharedstatedir=$ac_optarg ;;
402
403  -site | --site | --sit)
404    ac_prev=site ;;
405  -site=* | --site=* | --sit=*)
406    site=$ac_optarg ;;
407
408  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
409    ac_prev=srcdir ;;
410  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
411    srcdir=$ac_optarg ;;
412
413  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
414  | --syscon | --sysco | --sysc | --sys | --sy)
415    ac_prev=sysconfdir ;;
416  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
417  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
418    sysconfdir=$ac_optarg ;;
419
420  -target | --target | --targe | --targ | --tar | --ta | --t)
421    ac_prev=target_alias ;;
422  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
423    target_alias=$ac_optarg ;;
424
425  -v | -verbose | --verbose | --verbos | --verbo | --verb)
426    verbose=yes ;;
427
428  -version | --version | --versio | --versi | --vers | -V)
429    ac_init_version=: ;;
430
431  -with-* | --with-*)
432    ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
433    # Reject names that are not valid shell variable names.
434    expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
435      { echo "$as_me: error: invalid package name: $ac_package" >&2
436   { (exit 1); exit 1; }; }
437    ac_package=`echo $ac_package| sed 's/-/_/g'`
438    case $ac_option in
439      *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
440      *) ac_optarg=yes ;;
441    esac
442    eval "with_$ac_package='$ac_optarg'" ;;
443
444  -without-* | --without-*)
445    ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
446    # Reject names that are not valid shell variable names.
447    expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
448      { echo "$as_me: error: invalid package name: $ac_package" >&2
449   { (exit 1); exit 1; }; }
450    ac_package=`echo $ac_package | sed 's/-/_/g'`
451    eval "with_$ac_package=no" ;;
452
453  --x)
454    # Obsolete; use --with-x.
455    with_x=yes ;;
456
457  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
458  | --x-incl | --x-inc | --x-in | --x-i)
459    ac_prev=x_includes ;;
460  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
461  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
462    x_includes=$ac_optarg ;;
463
464  -x-libraries | --x-libraries | --x-librarie | --x-librari \
465  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
466    ac_prev=x_libraries ;;
467  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
468  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
469    x_libraries=$ac_optarg ;;
470
471  -*) { echo "$as_me: error: unrecognized option: $ac_option
472Try \`$0 --help' for more information." >&2
473   { (exit 1); exit 1; }; }
474    ;;
475
476  *=*)
477    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
478    # Reject names that are not valid shell variable names.
479    expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
480      { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
481   { (exit 1); exit 1; }; }
482    ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
483    eval "$ac_envvar='$ac_optarg'"
484    export $ac_envvar ;;
485
486  *)
487    # FIXME: should be removed in autoconf 3.0.
488    echo "$as_me: WARNING: you should use --build, --host, --target" >&2
489    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
490      echo "$as_me: WARNING: invalid host type: $ac_option" >&2
491    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
492    ;;
493
494  esac
495done
496
497if test -n "$ac_prev"; then
498  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
499  { echo "$as_me: error: missing argument to $ac_option" >&2
500   { (exit 1); exit 1; }; }
501fi
502
503# Be sure to have absolute paths.
504for ac_var in exec_prefix prefix
505do
506  eval ac_val=$`echo $ac_var`
507  case $ac_val in
508    [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
509    *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
510   { (exit 1); exit 1; }; };;
511  esac
512done
513
514# Be sure to have absolute paths.
515for ac_var in bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir \
516              localstatedir libdir includedir oldincludedir infodir mandir
517do
518  eval ac_val=$`echo $ac_var`
519  case $ac_val in
520    [\\/$]* | ?:[\\/]* ) ;;
521    *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
522   { (exit 1); exit 1; }; };;
523  esac
524done
525
526# There might be people who depend on the old broken behavior: `$host'
527# used to hold the argument of --host etc.
528build=$build_alias
529host=$host_alias
530target=$target_alias
531
532# FIXME: should be removed in autoconf 3.0.
533if test "x$host_alias" != x; then
534  if test "x$build_alias" = x; then
535    cross_compiling=maybe
536    echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
537    If a cross compiler is detected then cross compile mode will be used." >&2
538  elif test "x$build_alias" != "x$host_alias"; then
539    cross_compiling=yes
540  fi
541fi
542
543ac_tool_prefix=
544test -n "$host_alias" && ac_tool_prefix=$host_alias-
545
546test "$silent" = yes && exec 6>/dev/null
547
548# Find the source files, if location was not specified.
549if test -z "$srcdir"; then
550  ac_srcdir_defaulted=yes
551  # Try the directory containing this script, then its parent.
552  ac_prog=$0
553  ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
554  test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
555  srcdir=$ac_confdir
556  if test ! -r $srcdir/$ac_unique_file; then
557    srcdir=..
558  fi
559else
560  ac_srcdir_defaulted=no
561fi
562if test ! -r $srcdir/$ac_unique_file; then
563  if test "$ac_srcdir_defaulted" = yes; then
564    { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
565   { (exit 1); exit 1; }; }
566  else
567    { echo "$as_me: error: cannot find sources in $srcdir" >&2
568   { (exit 1); exit 1; }; }
569  fi
570fi
571srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
572ac_env_build_alias_set=${build_alias+set}
573ac_env_build_alias_value=$build_alias
574ac_cv_env_build_alias_set=${build_alias+set}
575ac_cv_env_build_alias_value=$build_alias
576ac_env_host_alias_set=${host_alias+set}
577ac_env_host_alias_value=$host_alias
578ac_cv_env_host_alias_set=${host_alias+set}
579ac_cv_env_host_alias_value=$host_alias
580ac_env_target_alias_set=${target_alias+set}
581ac_env_target_alias_value=$target_alias
582ac_cv_env_target_alias_set=${target_alias+set}
583ac_cv_env_target_alias_value=$target_alias
584ac_env_CC_set=${CC+set}
585ac_env_CC_value=$CC
586ac_cv_env_CC_set=${CC+set}
587ac_cv_env_CC_value=$CC
588ac_env_CFLAGS_set=${CFLAGS+set}
589ac_env_CFLAGS_value=$CFLAGS
590ac_cv_env_CFLAGS_set=${CFLAGS+set}
591ac_cv_env_CFLAGS_value=$CFLAGS
592ac_env_LDFLAGS_set=${LDFLAGS+set}
593ac_env_LDFLAGS_value=$LDFLAGS
594ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
595ac_cv_env_LDFLAGS_value=$LDFLAGS
596ac_env_CPPFLAGS_set=${CPPFLAGS+set}
597ac_env_CPPFLAGS_value=$CPPFLAGS
598ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
599ac_cv_env_CPPFLAGS_value=$CPPFLAGS
600ac_env_CPP_set=${CPP+set}
601ac_env_CPP_value=$CPP
602ac_cv_env_CPP_set=${CPP+set}
603ac_cv_env_CPP_value=$CPP
604
605#
606# Report the --help message.
607#
608if test "$ac_init_help" = "long"; then
609  # Omit some internal or obsolete options to make the list less imposing.
610  # This message is too long to be a string in the A/UX 3.1 sh.
611  cat <<EOF
612\`configure' configures this package to adapt to many kinds of systems.
613
614Usage: $0 [OPTION]... [VAR=VALUE]...
615
616To assign environment variables (e.g., CC, CFLAGS...), specify them as
617VAR=VALUE.  See below for descriptions of some of the useful variables.
618
619Defaults for the options are specified in brackets.
620
621Configuration:
622  -h, --help              display this help and exit
623      --help=short        display options specific to this package
624      --help=recursive    display the short help of all the included packages
625  -V, --version           display version information and exit
626  -q, --quiet, --silent   do not print \`checking...' messages
627      --cache-file=FILE   cache test results in FILE [disabled]
628  -C, --config-cache      alias for \`--cache-file=config.cache'
629  -n, --no-create         do not create output files
630      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
631
632EOF
633
634  cat <<EOF
635Installation directories:
636  --prefix=PREFIX         install architecture-independent files in PREFIX
637                          [$ac_default_prefix]
638  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
639                          [PREFIX]
640
641By default, \`make install' will install all the files in
642\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
643an installation prefix other than \`$ac_default_prefix' using \`--prefix',
644for instance \`--prefix=\$HOME'.
645
646For better control, use the options below.
647
648Fine tuning of the installation directories:
649  --bindir=DIR            user executables [EPREFIX/bin]
650  --sbindir=DIR           system admin executables [EPREFIX/sbin]
651  --libexecdir=DIR        program executables [EPREFIX/libexec]
652  --datarootdir=DIR       read-only architecture-independent data [PREFIX/share]
653  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
654  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
655  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
656  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
657  --libdir=DIR            object code libraries [EPREFIX/lib]
658  --includedir=DIR        C header files [PREFIX/include]
659  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
660  --infodir=DIR           info documentation [DATAROOTDIR/info]
661  --mandir=DIR            man documentation [DATAROOTDIR/man]
662EOF
663
664  cat <<\EOF
665
666Program names:
667  --program-prefix=PREFIX            prepend PREFIX to installed program names
668  --program-suffix=SUFFIX            append SUFFIX to installed program names
669  --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
670
671X features:
672  --x-includes=DIR    X include files are in DIR
673  --x-libraries=DIR   X library files are in DIR
674
675System types:
676  --build=BUILD           configure for building on BUILD [guessed]
677  --host=HOST       build programs to run on HOST [BUILD]
678EOF
679fi
680
681if test -n "$ac_init_help"; then
682
683  cat <<\EOF
684
685Optional Features:
686  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
687  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
688
689Optional Packages:
690  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
691  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
692
693Compile/Install Options:
694  --disable-full-tgetent  disable check for full tgetent function
695  --with-app-class=XXX    override X applications class (default XTerm)
696  --with-app-defaults=DIR directory in which to install resource files (EPREFIX/lib/X11/app-defaults)
697  --with-icon-name=XXXX   override icon name (default: xterm-color)
698  --with-icon-symlink=XXX make symbolic link for icon name (default: xterm)
699  --with-pixmapdir=DIR    directory in which to install pixmaps (DATADIR/pixmaps)
700  --with-icondir=DIR      directory in which to install icons for desktop
701  --with-icon-theme=XXX   install icons into desktop theme (hicolor)
702  --disable-desktop       disable install of xterm desktop files
703  --with-desktop-category=XXX  one or more desktop catgories or auto
704  --with-reference=XXX    program to use as permissions-reference
705  --with-xterm-symlink=XXX make symbolic link to installed xterm
706  --disable-openpty       disable openpty, prefer other interfaces
707  --disable-setuid        disable setuid in xterm, do not install setuid/setgid
708  --disable-setgid        disable setgid in xterm, do not install setuid/setgid
709  --with-setuid=XXX       use the given setuid user
710  --with-utmp-setgid=XXX  use setgid to match utmp/utmpx file
711  --with-utempter         use utempter library for access to utmp
712  --with-tty-group=XXX    use XXX for the tty-group
713  --with-x                use the X Window System
714  --with-pkg-config{=path} enable/disable use of pkg-config
715  --with-xpm=DIR          use Xpm library for colored icon, may specify path
716  --with-Xaw3d            link with Xaw 3d library
717  --with-neXtaw           link with neXT Athena library
718  --with-XawPlus          link with Athena-Plus library
719  --enable-narrowproto    enable narrow prototypes for X libraries
720  --disable-imake         disable use of imake for definitions
721Terminal Configuration:
722  --with-terminal-id=V    set default decTerminalID (default: vt420)
723  --with-terminal-type=T  set default $TERM (default: xterm)
724  --enable-backarrow-key  set default backarrowKey resource (default: true)
725  --enable-backarrow-is-erase set default backarrowKeyIsErase resource (default: false)
726  --enable-delete-is-del  set default deleteIsDEL resource (default: maybe)
727  --enable-alt-sends-esc  set default altSendsEscape resource (default: no)
728  --enable-meta-sends-esc set default metaSendsEscape resource (default: no)
729  --with-own-terminfo=P   set default $TERMINFO (default: from environment)
730Optional Features:
731  --disable-active-icon   disable X11R6.3 active-icon feature
732  --disable-ansi-color    disable ANSI color
733  --disable-16-color      disable 16-color support
734  --enable-256-color      enable 256-color support
735  --enable-88-color       enable 88-color support
736  --disable-blink-cursor  disable support for blinking cursor
737  --enable-broken-osc     allow broken Linux OSC-strings
738  --disable-broken-st     disallow broken string-terminators
739  --disable-c1-print      disallow -k8 option for printable 128-159
740  --disable-bold-color    disable PC-style mapping of bold colors
741  --disable-color-class   disable separate color class resources
742  --disable-color-mode    disable default colorMode resource
743  --disable-highlighting  disable support for color highlighting
744  --disable-doublechars   disable support for double-size chars
745  --disable-boxchars      disable fallback-support for box chars
746  --enable-exec-xterm     enable "spawn-new-terminal" action
747  --enable-double-buffer  enable double-buffering
748  --disable-freetype      disable freetype library-support
749  --with-freetype-config  configure script to use for FreeType
750  --with-freetype-cflags  -D/-I options for compiling with FreeType
751  --with-freetype-libs    -L/-l options to link FreeType
752  --enable-hp-fkeys       enable support for HP-style function keys
753  --enable-sco-fkeys      enable support for SCO-style function keys
754  --disable-sun-fkeys     disable support for Sun-style function keys
755  --disable-fifo-lines    disable FIFO-storage for saved-lines
756  --disable-i18n          disable internationalization
757  --disable-initial-erase disable setup for stty erase
758  --disable-input-method  disable input-method
759  --enable-load-vt-fonts  enable load-vt-fonts() action
760  --enable-logging        enable logging
761  --enable-logfile-exec   enable exec'd logfile filter
762  --disable-maximize      disable actions for iconify/deiconify/maximize/restore
763  --disable-num-lock      disable NumLock keypad support
764  --disable-paste64       disable get/set base64 selection data
765  --disable-pty-handshake disable pty-handshake support
766  --enable-readline-mouse enable support for mouse in readline applications
767  --disable-regex         disable regular-expression selections
768  --with-pcre             use PCRE for regular-expressions
769  --disable-rightbar      disable right-scrollbar support
770  --disable-samename      disable check for redundant name-change
771  --disable-selection-ops disable selection-action operations
772  --disable-session-mgt   disable support for session management
773  --disable-tcap-fkeys    disable termcap function-keys support
774  --disable-tcap-query    disable compiled-in termcap-query support
775  --disable-tek4014       disable tek4014 emulation
776  --enable-toolbar        compile-in toolbar for pulldown menus
777  --disable-vt52          disable VT52 emulation
778  --enable-mini-luit      enable mini-luit (built-in Latin9 support)
779  --enable-luit           enable luit filter (Unicode translation)
780  --enable-wide-chars     enable wide-character support
781  --enable-16bit-chars    enable 16-bit character support
782  --enable-dabbrev        enable dynamic-abbreviation support
783  --enable-dec-locator    enable DECterm Locator support
784  --disable-rectangles    disable VT420 rectangle support
785  --disable-ziconbeep     disable -ziconbeep option
786Testing/development Options:
787  --enable-trace          test: set to enable debugging traces
788  --with-dmalloc          test: use Gray Watson's dmalloc library
789  --with-dbmalloc         test: use Conor Cahill's dbmalloc library
790  --with-valgrind         test: use valgrind
791  --disable-leaks         test: free permanent memory, analyze leaks
792  --disable-echo          do not display "compiling" commands
793  --enable-xmc-glitch     test: enable xmc magic-cookie emulation
794  --enable-warnings       test: turn on GCC compiler warnings
795  --disable-rpath-hack    don't add rpath options for additional libraries
796
797Some influential environment variables:
798  CC          C compiler command
799  CFLAGS      C compiler flags
800  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
801              nonstandard directory <lib dir>
802  CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
803              headers in a nonstandard directory <include dir>
804  CPP         C preprocessor
805
806Use these variables to override the choices made by `configure' or to help
807it to find libraries and programs with nonstandard names/locations.
808
809EOF
810fi
811
812if test "$ac_init_help" = "recursive"; then
813  # If there are subdirs, report their specific --help.
814  ac_popdir=`pwd`
815  for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
816    cd $ac_subdir
817    # A "../" for each directory in /$ac_subdir.
818    ac_dots=`echo $ac_subdir |
819             sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
820
821    case $srcdir in
822    .) # No --srcdir option.  We are building in place.
823      ac_sub_srcdir=$srcdir ;;
824    [\\/]* | ?:[\\/]* ) # Absolute path.
825      ac_sub_srcdir=$srcdir/$ac_subdir ;;
826    *) # Relative path.
827      ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
828    esac
829
830    # Check for guested configure; otherwise get Cygnus style configure.
831    if test -f $ac_sub_srcdir/configure.gnu; then
832      echo
833      $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
834    elif test -f $ac_sub_srcdir/configure; then
835      echo
836      $SHELL $ac_sub_srcdir/configure  --help=recursive
837    elif test -f $ac_sub_srcdir/configure.ac ||
838           test -f $ac_sub_srcdir/configure.in; then
839      echo
840      $ac_configure --help
841    else
842      echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
843    fi
844    cd $ac_popdir
845  done
846fi
847
848test -n "$ac_init_help" && exit 0
849if $ac_init_version; then
850  cat <<\EOF
851
852Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
853Free Software Foundation, Inc.
854This configure script is free software; the Free Software Foundation
855gives unlimited permission to copy, distribute and modify it.
856EOF
857  exit 0
858fi
859exec 5>config.log
860cat >&5 <<EOF
861This file contains any messages produced by compilers while
862running configure, to aid debugging if configure makes a mistake.
863
864It was created by $as_me, which was
865generated by GNU Autoconf 2.52.20121002.  Invocation command line was
866
867  $ $0 $@
868
869EOF
870{
871cat <<_ASUNAME
872## ---------- ##
873## Platform.  ##
874## ---------- ##
875
876hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
877uname -m = `(uname -m) 2>/dev/null || echo unknown`
878uname -r = `(uname -r) 2>/dev/null || echo unknown`
879uname -s = `(uname -s) 2>/dev/null || echo unknown`
880uname -v = `(uname -v) 2>/dev/null || echo unknown`
881
882/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
883/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
884
885/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
886/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
887/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
888hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
889/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
890/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
891/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
892
893PATH = $PATH
894
895_ASUNAME
896} >&5
897
898cat >&5 <<EOF
899## ------------ ##
900## Core tests.  ##
901## ------------ ##
902
903EOF
904
905# Keep a trace of the command line.
906# Strip out --no-create and --no-recursion so they do not pile up.
907# Also quote any args containing shell meta-characters.
908ac_configure_args=
909ac_sep=
910for ac_arg
911do
912  case $ac_arg in
913  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
914  | --no-cr | --no-c) ;;
915  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
916  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
917  *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
918    ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
919    ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
920    ac_sep=" " ;;
921  *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
922     ac_sep=" " ;;
923  esac
924  # Get rid of the leading space.
925done
926
927# When interrupted or exit'd, cleanup temporary files, and complete
928# config.log.  We remove comments because anyway the quotes in there
929# would cause problems or look ugly.
930trap 'exit_status=$?
931  # Save into config.log some information that might help in debugging.
932  echo >&5
933  echo "## ----------------- ##" >&5
934  echo "## Cache variables.  ##" >&5
935  echo "## ----------------- ##" >&5
936  echo >&5
937  # The following way of writing the cache mishandles newlines in values,
938{
939  (set) 2>&1 |
940    case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
941    *ac_space=\ *)
942      sed -n \
943        "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
944    	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
945      ;;
946    *)
947      sed -n \
948        "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
949      ;;
950    esac;
951} >&5
952  sed "/^$/d" confdefs.h >conftest.log
953  if test -s conftest.log; then
954    echo >&5
955    echo "## ------------ ##" >&5
956    echo "## confdefs.h.  ##" >&5
957    echo "## ------------ ##" >&5
958    echo >&5
959    cat conftest.log >&5
960  fi
961  (echo; echo) >&5
962  test "$ac_signal" != 0 &&
963    echo "$as_me: caught signal $ac_signal" >&5
964  echo "$as_me: exit $exit_status" >&5
965  rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
966    exit $exit_status
967     ' 0
968for ac_signal in 1 2 13 15; do
969  trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
970done
971ac_signal=0
972
973# confdefs.h avoids OS command line length limits that DEFS can exceed.
974rm -rf conftest* confdefs.h
975# AIX cpp loses on an empty file, so make sure it contains at least a newline.
976echo >confdefs.h
977
978# Let the site file select an alternate cache file if it wants to.
979# Prefer explicitly selected file to automatically selected ones.
980if test -z "$CONFIG_SITE"; then
981  if test "x$prefix" != xNONE; then
982    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
983  else
984    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
985  fi
986fi
987for ac_site_file in $CONFIG_SITE; do
988  if test -r "$ac_site_file"; then
989    { echo "$as_me:989: loading site script $ac_site_file" >&5
990echo "$as_me: loading site script $ac_site_file" >&6;}
991    cat "$ac_site_file" >&5
992    . "$ac_site_file"
993  fi
994done
995
996if test -r "$cache_file"; then
997  # Some versions of bash will fail to source /dev/null (special
998  # files actually), so we avoid doing that.
999  if test -f "$cache_file"; then
1000    { echo "$as_me:1000: loading cache $cache_file" >&5
1001echo "$as_me: loading cache $cache_file" >&6;}
1002    case $cache_file in
1003      [\\/]* | ?:[\\/]* ) . $cache_file;;
1004      *)                      . ./$cache_file;;
1005    esac
1006  fi
1007else
1008  { echo "$as_me:1008: creating cache $cache_file" >&5
1009echo "$as_me: creating cache $cache_file" >&6;}
1010  >$cache_file
1011fi
1012
1013# Check that the precious variables saved in the cache have kept the same
1014# value.
1015ac_cache_corrupted=false
1016for ac_var in `(set) 2>&1 |
1017               sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1018  eval ac_old_set=\$ac_cv_env_${ac_var}_set
1019  eval ac_new_set=\$ac_env_${ac_var}_set
1020  eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1021  eval ac_new_val="\$ac_env_${ac_var}_value"
1022  case $ac_old_set,$ac_new_set in
1023    set,)
1024      { echo "$as_me:1024: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1025echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1026      ac_cache_corrupted=: ;;
1027    ,set)
1028      { echo "$as_me:1028: error: \`$ac_var' was not set in the previous run" >&5
1029echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1030      ac_cache_corrupted=: ;;
1031    ,);;
1032    *)
1033      if test "x$ac_old_val" != "x$ac_new_val"; then
1034        { echo "$as_me:1034: error: \`$ac_var' has changed since the previous run:" >&5
1035echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1036        { echo "$as_me:1036:   former value:  $ac_old_val" >&5
1037echo "$as_me:   former value:  $ac_old_val" >&2;}
1038        { echo "$as_me:1038:   current value: $ac_new_val" >&5
1039echo "$as_me:   current value: $ac_new_val" >&2;}
1040        ac_cache_corrupted=:
1041      fi;;
1042  esac
1043  # Pass precious variables to config.status.  It doesn't matter if
1044  # we pass some twice (in addition to the command line arguments).
1045  if test "$ac_new_set" = set; then
1046    case $ac_new_val in
1047    *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1048      ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1049      ac_configure_args="$ac_configure_args '$ac_arg'"
1050      ;;
1051    *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1052       ;;
1053    esac
1054  fi
1055done
1056if $ac_cache_corrupted; then
1057  { echo "$as_me:1057: error: changes in the environment can compromise the build" >&5
1058echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1059  { { echo "$as_me:1059: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1060echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1061   { (exit 1); exit 1; }; }
1062fi
1063
1064ac_ext=c
1065ac_cpp='$CPP $CPPFLAGS'
1066ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1067ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1068ac_compiler_gnu=$ac_cv_c_compiler_gnu
1069ac_main_return=return
1070
1071case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
1072  *c*,-n*) ECHO_N= ECHO_C='
1073' ECHO_T='	' ;;
1074  *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
1075  *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
1076esac
1077echo "#! $SHELL" >conftest.sh
1078echo  "exit 0"   >>conftest.sh
1079chmod +x conftest.sh
1080if { (echo "$as_me:1080: PATH=\".;.\"; conftest.sh") >&5
1081  (PATH=".;."; conftest.sh) 2>&5
1082  ac_status=$?
1083  echo "$as_me:1083: \$? = $ac_status" >&5
1084  (exit $ac_status); }; then
1085  ac_path_separator=';'
1086else
1087  ac_path_separator=:
1088fi
1089PATH_SEPARATOR="$ac_path_separator"
1090rm -f conftest.sh
1091
1092ac_config_headers="$ac_config_headers xtermcfg.h:xtermcfg.hin"
1093
1094ac_aux_dir=
1095for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1096  if test -f $ac_dir/install-sh; then
1097    ac_aux_dir=$ac_dir
1098    ac_install_sh="$ac_aux_dir/install-sh -c"
1099    break
1100  elif test -f $ac_dir/install.sh; then
1101    ac_aux_dir=$ac_dir
1102    ac_install_sh="$ac_aux_dir/install.sh -c"
1103    break
1104  elif test -f $ac_dir/shtool; then
1105    ac_aux_dir=$ac_dir
1106    ac_install_sh="$ac_aux_dir/shtool install -c"
1107    break
1108  fi
1109done
1110if test -z "$ac_aux_dir"; then
1111  { { echo "$as_me:1111: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1112echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1113   { (exit 1); exit 1; }; }
1114fi
1115ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1116ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1117ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1118
1119# Make sure we can run config.sub.
1120$ac_config_sub sun4 >/dev/null 2>&1 ||
1121  { { echo "$as_me:1121: error: cannot run $ac_config_sub" >&5
1122echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1123   { (exit 1); exit 1; }; }
1124
1125echo "$as_me:1125: checking build system type" >&5
1126echo $ECHO_N "checking build system type... $ECHO_C" >&6
1127if test "${ac_cv_build+set}" = set; then
1128  echo $ECHO_N "(cached) $ECHO_C" >&6
1129else
1130  ac_cv_build_alias=$build_alias
1131test -z "$ac_cv_build_alias" &&
1132  ac_cv_build_alias=`$ac_config_guess`
1133test -z "$ac_cv_build_alias" &&
1134  { { echo "$as_me:1134: error: cannot guess build type; you must specify one" >&5
1135echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1136   { (exit 1); exit 1; }; }
1137ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1138  { { echo "$as_me:1138: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1139echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1140   { (exit 1); exit 1; }; }
1141
1142fi
1143echo "$as_me:1143: result: $ac_cv_build" >&5
1144echo "${ECHO_T}$ac_cv_build" >&6
1145build=$ac_cv_build
1146build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1147build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1148build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1149
1150if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1151	echo "$as_me:1151: checking host system type" >&5
1152echo $ECHO_N "checking host system type... $ECHO_C" >&6
1153if test "${ac_cv_host+set}" = set; then
1154  echo $ECHO_N "(cached) $ECHO_C" >&6
1155else
1156  ac_cv_host_alias=$host_alias
1157test -z "$ac_cv_host_alias" &&
1158  ac_cv_host_alias=$ac_cv_build_alias
1159ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1160  { { echo "$as_me:1160: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1161echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1162   { (exit 1); exit 1; }; }
1163
1164fi
1165echo "$as_me:1165: result: $ac_cv_host" >&5
1166echo "${ECHO_T}$ac_cv_host" >&6
1167host=$ac_cv_host
1168host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1169host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1170host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1171
1172	system_name="$host_os"
1173else
1174	system_name="`(uname -s -r) 2>/dev/null`"
1175	if test -z "$system_name" ; then
1176		system_name="`(hostname) 2>/dev/null`"
1177	fi
1178fi
1179test -n "$system_name" &&
1180cat >>confdefs.h <<EOF
1181#define SYSTEM_NAME "$system_name"
1182EOF
1183
1184if test "${cf_cv_system_name+set}" = set; then
1185  echo $ECHO_N "(cached) $ECHO_C" >&6
1186else
1187  cf_cv_system_name="$system_name"
1188fi
1189
1190test -z "$system_name" && system_name="$cf_cv_system_name"
1191test -n "$cf_cv_system_name" && echo "$as_me:1191: result: Configuring for $cf_cv_system_name" >&5
1192echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1193
1194if test ".$system_name" != ".$cf_cv_system_name" ; then
1195	echo "$as_me:1195: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1196echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1197	{ { echo "$as_me:1197: error: \"Please remove config.cache and try again.\"" >&5
1198echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1199   { (exit 1); exit 1; }; }
1200fi
1201
1202###	checks for alternative programs
1203
1204case "$host_os" in
1205openedition)	: ${CFLAGS="-O2 -Wc,dll -Wl,EDIT=NO"}
1206		: ${CPPFLAGS="-D_ALL_SOURCE"}
1207		: ${LIBS="/usr/lib/Xaw.x /usr/lib/SM.x /usr/lib/ICE.x /usr/lib/X11.x"}
1208		: ${CC=c89};;
1209darwin*)
1210		: ${LDFLAGS}="${LDFLAGS} -Wl,-bind_at_load";;
1211esac
1212
1213ac_ext=c
1214ac_cpp='$CPP $CPPFLAGS'
1215ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1216ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1217ac_compiler_gnu=$ac_cv_c_compiler_gnu
1218ac_main_return=return
1219if test -n "$ac_tool_prefix"; then
1220  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1221set dummy ${ac_tool_prefix}gcc; ac_word=$2
1222echo "$as_me:1222: checking for $ac_word" >&5
1223echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1224if test "${ac_cv_prog_CC+set}" = set; then
1225  echo $ECHO_N "(cached) $ECHO_C" >&6
1226else
1227  if test -n "$CC"; then
1228  ac_cv_prog_CC="$CC" # Let the user override the test.
1229else
1230  ac_save_IFS=$IFS; IFS=$ac_path_separator
1231ac_dummy="$PATH"
1232for ac_dir in $ac_dummy; do
1233  IFS=$ac_save_IFS
1234  test -z "$ac_dir" && ac_dir=.
1235  $as_executable_p "$ac_dir/$ac_word" || continue
1236ac_cv_prog_CC="${ac_tool_prefix}gcc"
1237echo "$as_me:1237: found $ac_dir/$ac_word" >&5
1238break
1239done
1240
1241fi
1242fi
1243CC=$ac_cv_prog_CC
1244if test -n "$CC"; then
1245  echo "$as_me:1245: result: $CC" >&5
1246echo "${ECHO_T}$CC" >&6
1247else
1248  echo "$as_me:1248: result: no" >&5
1249echo "${ECHO_T}no" >&6
1250fi
1251
1252fi
1253if test -z "$ac_cv_prog_CC"; then
1254  ac_ct_CC=$CC
1255  # Extract the first word of "gcc", so it can be a program name with args.
1256set dummy gcc; ac_word=$2
1257echo "$as_me:1257: checking for $ac_word" >&5
1258echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1259if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1260  echo $ECHO_N "(cached) $ECHO_C" >&6
1261else
1262  if test -n "$ac_ct_CC"; then
1263  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1264else
1265  ac_save_IFS=$IFS; IFS=$ac_path_separator
1266ac_dummy="$PATH"
1267for ac_dir in $ac_dummy; do
1268  IFS=$ac_save_IFS
1269  test -z "$ac_dir" && ac_dir=.
1270  $as_executable_p "$ac_dir/$ac_word" || continue
1271ac_cv_prog_ac_ct_CC="gcc"
1272echo "$as_me:1272: found $ac_dir/$ac_word" >&5
1273break
1274done
1275
1276fi
1277fi
1278ac_ct_CC=$ac_cv_prog_ac_ct_CC
1279if test -n "$ac_ct_CC"; then
1280  echo "$as_me:1280: result: $ac_ct_CC" >&5
1281echo "${ECHO_T}$ac_ct_CC" >&6
1282else
1283  echo "$as_me:1283: result: no" >&5
1284echo "${ECHO_T}no" >&6
1285fi
1286
1287  CC=$ac_ct_CC
1288else
1289  CC="$ac_cv_prog_CC"
1290fi
1291
1292if test -z "$CC"; then
1293  if test -n "$ac_tool_prefix"; then
1294  # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1295set dummy ${ac_tool_prefix}cc; ac_word=$2
1296echo "$as_me:1296: checking for $ac_word" >&5
1297echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1298if test "${ac_cv_prog_CC+set}" = set; then
1299  echo $ECHO_N "(cached) $ECHO_C" >&6
1300else
1301  if test -n "$CC"; then
1302  ac_cv_prog_CC="$CC" # Let the user override the test.
1303else
1304  ac_save_IFS=$IFS; IFS=$ac_path_separator
1305ac_dummy="$PATH"
1306for ac_dir in $ac_dummy; do
1307  IFS=$ac_save_IFS
1308  test -z "$ac_dir" && ac_dir=.
1309  $as_executable_p "$ac_dir/$ac_word" || continue
1310ac_cv_prog_CC="${ac_tool_prefix}cc"
1311echo "$as_me:1311: found $ac_dir/$ac_word" >&5
1312break
1313done
1314
1315fi
1316fi
1317CC=$ac_cv_prog_CC
1318if test -n "$CC"; then
1319  echo "$as_me:1319: result: $CC" >&5
1320echo "${ECHO_T}$CC" >&6
1321else
1322  echo "$as_me:1322: result: no" >&5
1323echo "${ECHO_T}no" >&6
1324fi
1325
1326fi
1327if test -z "$ac_cv_prog_CC"; then
1328  ac_ct_CC=$CC
1329  # Extract the first word of "cc", so it can be a program name with args.
1330set dummy cc; ac_word=$2
1331echo "$as_me:1331: checking for $ac_word" >&5
1332echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1333if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1334  echo $ECHO_N "(cached) $ECHO_C" >&6
1335else
1336  if test -n "$ac_ct_CC"; then
1337  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1338else
1339  ac_save_IFS=$IFS; IFS=$ac_path_separator
1340ac_dummy="$PATH"
1341for ac_dir in $ac_dummy; do
1342  IFS=$ac_save_IFS
1343  test -z "$ac_dir" && ac_dir=.
1344  $as_executable_p "$ac_dir/$ac_word" || continue
1345ac_cv_prog_ac_ct_CC="cc"
1346echo "$as_me:1346: found $ac_dir/$ac_word" >&5
1347break
1348done
1349
1350fi
1351fi
1352ac_ct_CC=$ac_cv_prog_ac_ct_CC
1353if test -n "$ac_ct_CC"; then
1354  echo "$as_me:1354: result: $ac_ct_CC" >&5
1355echo "${ECHO_T}$ac_ct_CC" >&6
1356else
1357  echo "$as_me:1357: result: no" >&5
1358echo "${ECHO_T}no" >&6
1359fi
1360
1361  CC=$ac_ct_CC
1362else
1363  CC="$ac_cv_prog_CC"
1364fi
1365
1366fi
1367if test -z "$CC"; then
1368  # Extract the first word of "cc", so it can be a program name with args.
1369set dummy cc; ac_word=$2
1370echo "$as_me:1370: checking for $ac_word" >&5
1371echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1372if test "${ac_cv_prog_CC+set}" = set; then
1373  echo $ECHO_N "(cached) $ECHO_C" >&6
1374else
1375  if test -n "$CC"; then
1376  ac_cv_prog_CC="$CC" # Let the user override the test.
1377else
1378  ac_prog_rejected=no
1379  ac_save_IFS=$IFS; IFS=$ac_path_separator
1380ac_dummy="$PATH"
1381for ac_dir in $ac_dummy; do
1382  IFS=$ac_save_IFS
1383  test -z "$ac_dir" && ac_dir=.
1384  $as_executable_p "$ac_dir/$ac_word" || continue
1385if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1386  ac_prog_rejected=yes
1387  continue
1388fi
1389ac_cv_prog_CC="cc"
1390echo "$as_me:1390: found $ac_dir/$ac_word" >&5
1391break
1392done
1393
1394if test $ac_prog_rejected = yes; then
1395  # We found a bogon in the path, so make sure we never use it.
1396  set dummy $ac_cv_prog_CC
1397  shift
1398  if test $# != 0; then
1399    # We chose a different compiler from the bogus one.
1400    # However, it has the same basename, so the bogon will be chosen
1401    # first if we set CC to just the basename; use the full file name.
1402    shift
1403    set dummy "$ac_dir/$ac_word" ${1+"$@"}
1404    shift
1405    ac_cv_prog_CC="$@"
1406  fi
1407fi
1408fi
1409fi
1410CC=$ac_cv_prog_CC
1411if test -n "$CC"; then
1412  echo "$as_me:1412: result: $CC" >&5
1413echo "${ECHO_T}$CC" >&6
1414else
1415  echo "$as_me:1415: result: no" >&5
1416echo "${ECHO_T}no" >&6
1417fi
1418
1419fi
1420if test -z "$CC"; then
1421  if test -n "$ac_tool_prefix"; then
1422  for ac_prog in cl
1423  do
1424    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1425set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1426echo "$as_me:1426: checking for $ac_word" >&5
1427echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1428if test "${ac_cv_prog_CC+set}" = set; then
1429  echo $ECHO_N "(cached) $ECHO_C" >&6
1430else
1431  if test -n "$CC"; then
1432  ac_cv_prog_CC="$CC" # Let the user override the test.
1433else
1434  ac_save_IFS=$IFS; IFS=$ac_path_separator
1435ac_dummy="$PATH"
1436for ac_dir in $ac_dummy; do
1437  IFS=$ac_save_IFS
1438  test -z "$ac_dir" && ac_dir=.
1439  $as_executable_p "$ac_dir/$ac_word" || continue
1440ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1441echo "$as_me:1441: found $ac_dir/$ac_word" >&5
1442break
1443done
1444
1445fi
1446fi
1447CC=$ac_cv_prog_CC
1448if test -n "$CC"; then
1449  echo "$as_me:1449: result: $CC" >&5
1450echo "${ECHO_T}$CC" >&6
1451else
1452  echo "$as_me:1452: result: no" >&5
1453echo "${ECHO_T}no" >&6
1454fi
1455
1456    test -n "$CC" && break
1457  done
1458fi
1459if test -z "$CC"; then
1460  ac_ct_CC=$CC
1461  for ac_prog in cl
1462do
1463  # Extract the first word of "$ac_prog", so it can be a program name with args.
1464set dummy $ac_prog; ac_word=$2
1465echo "$as_me:1465: checking for $ac_word" >&5
1466echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1467if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1468  echo $ECHO_N "(cached) $ECHO_C" >&6
1469else
1470  if test -n "$ac_ct_CC"; then
1471  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1472else
1473  ac_save_IFS=$IFS; IFS=$ac_path_separator
1474ac_dummy="$PATH"
1475for ac_dir in $ac_dummy; do
1476  IFS=$ac_save_IFS
1477  test -z "$ac_dir" && ac_dir=.
1478  $as_executable_p "$ac_dir/$ac_word" || continue
1479ac_cv_prog_ac_ct_CC="$ac_prog"
1480echo "$as_me:1480: found $ac_dir/$ac_word" >&5
1481break
1482done
1483
1484fi
1485fi
1486ac_ct_CC=$ac_cv_prog_ac_ct_CC
1487if test -n "$ac_ct_CC"; then
1488  echo "$as_me:1488: result: $ac_ct_CC" >&5
1489echo "${ECHO_T}$ac_ct_CC" >&6
1490else
1491  echo "$as_me:1491: result: no" >&5
1492echo "${ECHO_T}no" >&6
1493fi
1494
1495  test -n "$ac_ct_CC" && break
1496done
1497
1498  CC=$ac_ct_CC
1499fi
1500
1501fi
1502
1503test -z "$CC" && { { echo "$as_me:1503: error: no acceptable cc found in \$PATH" >&5
1504echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1505   { (exit 1); exit 1; }; }
1506
1507# Provide some information about the compiler.
1508echo "$as_me:1508:" \
1509     "checking for C compiler version" >&5
1510ac_compiler=`set X $ac_compile; echo $2`
1511{ (eval echo "$as_me:1511: \"$ac_compiler --version </dev/null >&5\"") >&5
1512  (eval $ac_compiler --version </dev/null >&5) 2>&5
1513  ac_status=$?
1514  echo "$as_me:1514: \$? = $ac_status" >&5
1515  (exit $ac_status); }
1516{ (eval echo "$as_me:1516: \"$ac_compiler -v </dev/null >&5\"") >&5
1517  (eval $ac_compiler -v </dev/null >&5) 2>&5
1518  ac_status=$?
1519  echo "$as_me:1519: \$? = $ac_status" >&5
1520  (exit $ac_status); }
1521{ (eval echo "$as_me:1521: \"$ac_compiler -V </dev/null >&5\"") >&5
1522  (eval $ac_compiler -V </dev/null >&5) 2>&5
1523  ac_status=$?
1524  echo "$as_me:1524: \$? = $ac_status" >&5
1525  (exit $ac_status); }
1526
1527cat >conftest.$ac_ext <<_ACEOF
1528#line 1528 "configure"
1529#include "confdefs.h"
1530
1531int
1532main ()
1533{
1534
1535  ;
1536  return 0;
1537}
1538_ACEOF
1539ac_clean_files_save=$ac_clean_files
1540ac_clean_files="$ac_clean_files a.out a.exe"
1541# Try to create an executable without -o first, disregard a.out.
1542# It will help us diagnose broken compilers, and finding out an intuition
1543# of exeext.
1544echo "$as_me:1544: checking for C compiler default output" >&5
1545echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1546ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1547if { (eval echo "$as_me:1547: \"$ac_link_default\"") >&5
1548  (eval $ac_link_default) 2>&5
1549  ac_status=$?
1550  echo "$as_me:1550: \$? = $ac_status" >&5
1551  (exit $ac_status); }; then
1552  # Find the output, starting from the most likely.  This scheme is
1553# not robust to junk in `.', hence go to wildcards (a.*) only as a last
1554# resort.
1555for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1556                ls a.out conftest 2>/dev/null;
1557                ls a.* conftest.* 2>/dev/null`; do
1558  case $ac_file in
1559    *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1560    a.out ) # We found the default executable, but exeext='' is most
1561            # certainly right.
1562            break;;
1563    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1564          # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1565          export ac_cv_exeext
1566          break;;
1567    * ) break;;
1568  esac
1569done
1570else
1571  echo "$as_me: failed program was:" >&5
1572cat conftest.$ac_ext >&5
1573{ { echo "$as_me:1573: error: C compiler cannot create executables" >&5
1574echo "$as_me: error: C compiler cannot create executables" >&2;}
1575   { (exit 77); exit 77; }; }
1576fi
1577
1578ac_exeext=$ac_cv_exeext
1579echo "$as_me:1579: result: $ac_file" >&5
1580echo "${ECHO_T}$ac_file" >&6
1581
1582# Check the compiler produces executables we can run.  If not, either
1583# the compiler is broken, or we cross compile.
1584echo "$as_me:1584: checking whether the C compiler works" >&5
1585echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1586# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1587# If not cross compiling, check that we can run a simple program.
1588if test "$cross_compiling" != yes; then
1589  if { ac_try='./$ac_file'
1590  { (eval echo "$as_me:1590: \"$ac_try\"") >&5
1591  (eval $ac_try) 2>&5
1592  ac_status=$?
1593  echo "$as_me:1593: \$? = $ac_status" >&5
1594  (exit $ac_status); }; }; then
1595    cross_compiling=no
1596  else
1597    if test "$cross_compiling" = maybe; then
1598	cross_compiling=yes
1599    else
1600	{ { echo "$as_me:1600: error: cannot run C compiled programs.
1601If you meant to cross compile, use \`--host'." >&5
1602echo "$as_me: error: cannot run C compiled programs.
1603If you meant to cross compile, use \`--host'." >&2;}
1604   { (exit 1); exit 1; }; }
1605    fi
1606  fi
1607fi
1608echo "$as_me:1608: result: yes" >&5
1609echo "${ECHO_T}yes" >&6
1610
1611rm -f a.out a.exe conftest$ac_cv_exeext
1612ac_clean_files=$ac_clean_files_save
1613# Check the compiler produces executables we can run.  If not, either
1614# the compiler is broken, or we cross compile.
1615echo "$as_me:1615: checking whether we are cross compiling" >&5
1616echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1617echo "$as_me:1617: result: $cross_compiling" >&5
1618echo "${ECHO_T}$cross_compiling" >&6
1619
1620echo "$as_me:1620: checking for executable suffix" >&5
1621echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1622if { (eval echo "$as_me:1622: \"$ac_link\"") >&5
1623  (eval $ac_link) 2>&5
1624  ac_status=$?
1625  echo "$as_me:1625: \$? = $ac_status" >&5
1626  (exit $ac_status); }; then
1627  # If both `conftest.exe' and `conftest' are `present' (well, observable)
1628# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1629# work properly (i.e., refer to `conftest.exe'), while it won't with
1630# `rm'.
1631for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1632  case $ac_file in
1633    *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1634    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1635          export ac_cv_exeext
1636          break;;
1637    * ) break;;
1638  esac
1639done
1640else
1641  { { echo "$as_me:1641: error: cannot compute EXEEXT: cannot compile and link" >&5
1642echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1643   { (exit 1); exit 1; }; }
1644fi
1645
1646rm -f conftest$ac_cv_exeext
1647echo "$as_me:1647: result: $ac_cv_exeext" >&5
1648echo "${ECHO_T}$ac_cv_exeext" >&6
1649
1650rm -f conftest.$ac_ext
1651EXEEXT=$ac_cv_exeext
1652ac_exeext=$EXEEXT
1653echo "$as_me:1653: checking for object suffix" >&5
1654echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1655if test "${ac_cv_objext+set}" = set; then
1656  echo $ECHO_N "(cached) $ECHO_C" >&6
1657else
1658  cat >conftest.$ac_ext <<_ACEOF
1659#line 1659 "configure"
1660#include "confdefs.h"
1661
1662int
1663main ()
1664{
1665
1666  ;
1667  return 0;
1668}
1669_ACEOF
1670rm -f conftest.o conftest.obj
1671if { (eval echo "$as_me:1671: \"$ac_compile\"") >&5
1672  (eval $ac_compile) 2>&5
1673  ac_status=$?
1674  echo "$as_me:1674: \$? = $ac_status" >&5
1675  (exit $ac_status); }; then
1676  for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1677  case $ac_file in
1678    *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1679    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1680       break;;
1681  esac
1682done
1683else
1684  echo "$as_me: failed program was:" >&5
1685cat conftest.$ac_ext >&5
1686{ { echo "$as_me:1686: error: cannot compute OBJEXT: cannot compile" >&5
1687echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1688   { (exit 1); exit 1; }; }
1689fi
1690
1691rm -f conftest.$ac_cv_objext conftest.$ac_ext
1692fi
1693echo "$as_me:1693: result: $ac_cv_objext" >&5
1694echo "${ECHO_T}$ac_cv_objext" >&6
1695OBJEXT=$ac_cv_objext
1696ac_objext=$OBJEXT
1697echo "$as_me:1697: checking whether we are using the GNU C compiler" >&5
1698echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1699if test "${ac_cv_c_compiler_gnu+set}" = set; then
1700  echo $ECHO_N "(cached) $ECHO_C" >&6
1701else
1702  cat >conftest.$ac_ext <<_ACEOF
1703#line 1703 "configure"
1704#include "confdefs.h"
1705
1706int
1707main ()
1708{
1709#ifndef __GNUC__
1710       choke me
1711#endif
1712
1713  ;
1714  return 0;
1715}
1716_ACEOF
1717rm -f conftest.$ac_objext
1718if { (eval echo "$as_me:1718: \"$ac_compile\"") >&5
1719  (eval $ac_compile) 2>&5
1720  ac_status=$?
1721  echo "$as_me:1721: \$? = $ac_status" >&5
1722  (exit $ac_status); } &&
1723         { ac_try='test -s conftest.$ac_objext'
1724  { (eval echo "$as_me:1724: \"$ac_try\"") >&5
1725  (eval $ac_try) 2>&5
1726  ac_status=$?
1727  echo "$as_me:1727: \$? = $ac_status" >&5
1728  (exit $ac_status); }; }; then
1729  ac_compiler_gnu=yes
1730else
1731  echo "$as_me: failed program was:" >&5
1732cat conftest.$ac_ext >&5
1733ac_compiler_gnu=no
1734fi
1735rm -f conftest.$ac_objext conftest.$ac_ext
1736ac_cv_c_compiler_gnu=$ac_compiler_gnu
1737
1738fi
1739echo "$as_me:1739: result: $ac_cv_c_compiler_gnu" >&5
1740echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1741GCC=`test $ac_compiler_gnu = yes && echo yes`
1742ac_test_CFLAGS=${CFLAGS+set}
1743ac_save_CFLAGS=$CFLAGS
1744CFLAGS="-g"
1745echo "$as_me:1745: checking whether $CC accepts -g" >&5
1746echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1747if test "${ac_cv_prog_cc_g+set}" = set; then
1748  echo $ECHO_N "(cached) $ECHO_C" >&6
1749else
1750  cat >conftest.$ac_ext <<_ACEOF
1751#line 1751 "configure"
1752#include "confdefs.h"
1753
1754int
1755main ()
1756{
1757
1758  ;
1759  return 0;
1760}
1761_ACEOF
1762rm -f conftest.$ac_objext
1763if { (eval echo "$as_me:1763: \"$ac_compile\"") >&5
1764  (eval $ac_compile) 2>&5
1765  ac_status=$?
1766  echo "$as_me:1766: \$? = $ac_status" >&5
1767  (exit $ac_status); } &&
1768         { ac_try='test -s conftest.$ac_objext'
1769  { (eval echo "$as_me:1769: \"$ac_try\"") >&5
1770  (eval $ac_try) 2>&5
1771  ac_status=$?
1772  echo "$as_me:1772: \$? = $ac_status" >&5
1773  (exit $ac_status); }; }; then
1774  ac_cv_prog_cc_g=yes
1775else
1776  echo "$as_me: failed program was:" >&5
1777cat conftest.$ac_ext >&5
1778ac_cv_prog_cc_g=no
1779fi
1780rm -f conftest.$ac_objext conftest.$ac_ext
1781fi
1782echo "$as_me:1782: result: $ac_cv_prog_cc_g" >&5
1783echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1784if test "$ac_test_CFLAGS" = set; then
1785  CFLAGS=$ac_save_CFLAGS
1786elif test $ac_cv_prog_cc_g = yes; then
1787  if test "$GCC" = yes; then
1788    CFLAGS="-g -O2"
1789  else
1790    CFLAGS="-g"
1791  fi
1792else
1793  if test "$GCC" = yes; then
1794    CFLAGS="-O2"
1795  else
1796    CFLAGS=
1797  fi
1798fi
1799# Some people use a C++ compiler to compile C.  Since we use `exit',
1800# in C++ we need to declare it.  In case someone uses the same compiler
1801# for both compiling C and C++ we need to have the C++ compiler decide
1802# the declaration of exit, since it's the most demanding environment.
1803cat >conftest.$ac_ext <<_ACEOF
1804#ifndef __cplusplus
1805  choke me
1806#endif
1807_ACEOF
1808rm -f conftest.$ac_objext
1809if { (eval echo "$as_me:1809: \"$ac_compile\"") >&5
1810  (eval $ac_compile) 2>&5
1811  ac_status=$?
1812  echo "$as_me:1812: \$? = $ac_status" >&5
1813  (exit $ac_status); } &&
1814         { ac_try='test -s conftest.$ac_objext'
1815  { (eval echo "$as_me:1815: \"$ac_try\"") >&5
1816  (eval $ac_try) 2>&5
1817  ac_status=$?
1818  echo "$as_me:1818: \$? = $ac_status" >&5
1819  (exit $ac_status); }; }; then
1820  for ac_declaration in \
1821   ''\
1822   '#include <stdlib.h>' \
1823   'extern "C" void std::exit (int) throw (); using std::exit;' \
1824   'extern "C" void std::exit (int); using std::exit;' \
1825   'extern "C" void exit (int) throw ();' \
1826   'extern "C" void exit (int);' \
1827   'void exit (int);'
1828do
1829  cat >conftest.$ac_ext <<_ACEOF
1830#line 1830 "configure"
1831#include "confdefs.h"
1832#include <stdlib.h>
1833$ac_declaration
1834int
1835main ()
1836{
1837exit (42);
1838  ;
1839  return 0;
1840}
1841_ACEOF
1842rm -f conftest.$ac_objext
1843if { (eval echo "$as_me:1843: \"$ac_compile\"") >&5
1844  (eval $ac_compile) 2>&5
1845  ac_status=$?
1846  echo "$as_me:1846: \$? = $ac_status" >&5
1847  (exit $ac_status); } &&
1848         { ac_try='test -s conftest.$ac_objext'
1849  { (eval echo "$as_me:1849: \"$ac_try\"") >&5
1850  (eval $ac_try) 2>&5
1851  ac_status=$?
1852  echo "$as_me:1852: \$? = $ac_status" >&5
1853  (exit $ac_status); }; }; then
1854  :
1855else
1856  echo "$as_me: failed program was:" >&5
1857cat conftest.$ac_ext >&5
1858continue
1859fi
1860rm -f conftest.$ac_objext conftest.$ac_ext
1861  cat >conftest.$ac_ext <<_ACEOF
1862#line 1862 "configure"
1863#include "confdefs.h"
1864$ac_declaration
1865int
1866main ()
1867{
1868exit (42);
1869  ;
1870  return 0;
1871}
1872_ACEOF
1873rm -f conftest.$ac_objext
1874if { (eval echo "$as_me:1874: \"$ac_compile\"") >&5
1875  (eval $ac_compile) 2>&5
1876  ac_status=$?
1877  echo "$as_me:1877: \$? = $ac_status" >&5
1878  (exit $ac_status); } &&
1879         { ac_try='test -s conftest.$ac_objext'
1880  { (eval echo "$as_me:1880: \"$ac_try\"") >&5
1881  (eval $ac_try) 2>&5
1882  ac_status=$?
1883  echo "$as_me:1883: \$? = $ac_status" >&5
1884  (exit $ac_status); }; }; then
1885  break
1886else
1887  echo "$as_me: failed program was:" >&5
1888cat conftest.$ac_ext >&5
1889fi
1890rm -f conftest.$ac_objext conftest.$ac_ext
1891done
1892rm -rf conftest*
1893if test -n "$ac_declaration"; then
1894  echo '#ifdef __cplusplus' >>confdefs.h
1895  echo $ac_declaration      >>confdefs.h
1896  echo '#endif'             >>confdefs.h
1897fi
1898
1899else
1900  echo "$as_me: failed program was:" >&5
1901cat conftest.$ac_ext >&5
1902fi
1903rm -f conftest.$ac_objext conftest.$ac_ext
1904ac_ext=c
1905ac_cpp='$CPP $CPPFLAGS'
1906ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1907ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1908ac_compiler_gnu=$ac_cv_c_compiler_gnu
1909ac_main_return=return
1910
1911GCC_VERSION=none
1912if test "$GCC" = yes ; then
1913	echo "$as_me:1913: checking version of $CC" >&5
1914echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
1915	GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(GCC[^)]*) //' -e 's/^.*(Debian[^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
1916	test -z "$GCC_VERSION" && GCC_VERSION=unknown
1917	echo "$as_me:1917: result: $GCC_VERSION" >&5
1918echo "${ECHO_T}$GCC_VERSION" >&6
1919fi
1920
1921echo "$as_me:1921: checking for $CC option to accept ANSI C" >&5
1922echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
1923if test "${ac_cv_prog_cc_stdc+set}" = set; then
1924  echo $ECHO_N "(cached) $ECHO_C" >&6
1925else
1926  ac_cv_prog_cc_stdc=no
1927ac_save_CC=$CC
1928cat >conftest.$ac_ext <<_ACEOF
1929#line 1929 "configure"
1930#include "confdefs.h"
1931#include <stdarg.h>
1932#include <stdio.h>
1933#include <sys/types.h>
1934#include <sys/stat.h>
1935/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
1936struct buf { int x; };
1937FILE * (*rcsopen) (struct buf *, struct stat *, int);
1938static char *e (p, i)
1939     char **p;
1940     int i;
1941{
1942  return p[i];
1943}
1944static char *f (char * (*g) (char **, int), char **p, ...)
1945{
1946  char *s;
1947  va_list v;
1948  va_start (v,p);
1949  s = g (p, va_arg (v,int));
1950  va_end (v);
1951  return s;
1952}
1953int test (int i, double x);
1954struct s1 {int (*f) (int a);};
1955struct s2 {int (*f) (double a);};
1956int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
1957int argc;
1958char **argv;
1959int
1960main ()
1961{
1962return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
1963  ;
1964  return 0;
1965}
1966_ACEOF
1967# Don't try gcc -ansi; that turns off useful extensions and
1968# breaks some systems' header files.
1969# AIX			-qlanglvl=ansi
1970# Ultrix and OSF/1	-std1
1971# HP-UX 10.20 and later	-Ae
1972# HP-UX older versions	-Aa -D_HPUX_SOURCE
1973# SVR4			-Xc -D__EXTENSIONS__
1974for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
1975do
1976  CC="$ac_save_CC $ac_arg"
1977  rm -f conftest.$ac_objext
1978if { (eval echo "$as_me:1978: \"$ac_compile\"") >&5
1979  (eval $ac_compile) 2>&5
1980  ac_status=$?
1981  echo "$as_me:1981: \$? = $ac_status" >&5
1982  (exit $ac_status); } &&
1983         { ac_try='test -s conftest.$ac_objext'
1984  { (eval echo "$as_me:1984: \"$ac_try\"") >&5
1985  (eval $ac_try) 2>&5
1986  ac_status=$?
1987  echo "$as_me:1987: \$? = $ac_status" >&5
1988  (exit $ac_status); }; }; then
1989  ac_cv_prog_cc_stdc=$ac_arg
1990break
1991else
1992  echo "$as_me: failed program was:" >&5
1993cat conftest.$ac_ext >&5
1994fi
1995rm -f conftest.$ac_objext
1996done
1997rm -f conftest.$ac_ext conftest.$ac_objext
1998CC=$ac_save_CC
1999
2000fi
2001
2002case "x$ac_cv_prog_cc_stdc" in
2003  x|xno)
2004    echo "$as_me:2004: result: none needed" >&5
2005echo "${ECHO_T}none needed" >&6 ;;
2006  *)
2007    echo "$as_me:2007: result: $ac_cv_prog_cc_stdc" >&5
2008echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2009    CC="$CC $ac_cv_prog_cc_stdc" ;;
2010esac
2011
2012# This should have been defined by AC_PROG_CC
2013: ${CC:=cc}
2014
2015echo "$as_me:2015: checking \$CC variable" >&5
2016echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2017case "$CC" in #(vi
2018*[\ \	]-[IUD]*)
2019	echo "$as_me:2019: result: broken" >&5
2020echo "${ECHO_T}broken" >&6
2021	{ echo "$as_me:2021: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2022echo "$as_me: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2023	# humor him...
2024	cf_flags=`echo "$CC" | sed -e 's/^[^ 	]*[ 	]//'`
2025	CC=`echo "$CC" | sed -e 's/[ 	].*//'`
2026
2027cf_fix_cppflags=no
2028cf_new_cflags=
2029cf_new_cppflags=
2030cf_new_extra_cppflags=
2031
2032for cf_add_cflags in $cf_flags
2033do
2034case $cf_fix_cppflags in
2035no)
2036	case $cf_add_cflags in #(vi
2037	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2038		case $cf_add_cflags in
2039		-D*)
2040			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2041
2042			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2043				&& test -z "${cf_tst_cflags}" \
2044				&& cf_fix_cppflags=yes
2045
2046			if test $cf_fix_cppflags = yes ; then
2047				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2048				continue
2049			elif test "${cf_tst_cflags}" = "\"'" ; then
2050				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2051				continue
2052			fi
2053			;;
2054		esac
2055		case "$CPPFLAGS" in
2056		*$cf_add_cflags) #(vi
2057			;;
2058		*) #(vi
2059			case $cf_add_cflags in #(vi
2060			-D*)
2061				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2062
2063CPPFLAGS=`echo "$CPPFLAGS" | \
2064	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
2065		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
2066
2067				;;
2068			esac
2069			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2070			;;
2071		esac
2072		;;
2073	*)
2074		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2075		;;
2076	esac
2077	;;
2078yes)
2079	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2080
2081	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2082
2083	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2084		&& test -z "${cf_tst_cflags}" \
2085		&& cf_fix_cppflags=no
2086	;;
2087esac
2088done
2089
2090if test -n "$cf_new_cflags" ; then
2091
2092	CFLAGS="$CFLAGS $cf_new_cflags"
2093fi
2094
2095if test -n "$cf_new_cppflags" ; then
2096
2097	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2098fi
2099
2100if test -n "$cf_new_extra_cppflags" ; then
2101
2102	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2103fi
2104
2105	;;
2106*)
2107	echo "$as_me:2107: result: ok" >&5
2108echo "${ECHO_T}ok" >&6
2109	;;
2110esac
2111
2112ac_ext=c
2113ac_cpp='$CPP $CPPFLAGS'
2114ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2115ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2116ac_compiler_gnu=$ac_cv_c_compiler_gnu
2117ac_main_return=return
2118echo "$as_me:2118: checking how to run the C preprocessor" >&5
2119echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2120# On Suns, sometimes $CPP names a directory.
2121if test -n "$CPP" && test -d "$CPP"; then
2122  CPP=
2123fi
2124if test -z "$CPP"; then
2125  if test "${ac_cv_prog_CPP+set}" = set; then
2126  echo $ECHO_N "(cached) $ECHO_C" >&6
2127else
2128      # Double quotes because CPP needs to be expanded
2129    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2130    do
2131      ac_preproc_ok=false
2132for ac_c_preproc_warn_flag in '' yes
2133do
2134  # Use a header file that comes with gcc, so configuring glibc
2135  # with a fresh cross-compiler works.
2136  # On the NeXT, cc -E runs the code through the compiler's parser,
2137  # not just through cpp. "Syntax error" is here to catch this case.
2138  cat >conftest.$ac_ext <<_ACEOF
2139#line 2139 "configure"
2140#include "confdefs.h"
2141#include <assert.h>
2142                     Syntax error
2143_ACEOF
2144if { (eval echo "$as_me:2144: \"$ac_cpp conftest.$ac_ext\"") >&5
2145  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2146  ac_status=$?
2147  egrep -v '^ *\+' conftest.er1 >conftest.err
2148  rm -f conftest.er1
2149  cat conftest.err >&5
2150  echo "$as_me:2150: \$? = $ac_status" >&5
2151  (exit $ac_status); } >/dev/null; then
2152  if test -s conftest.err; then
2153    ac_cpp_err=$ac_c_preproc_warn_flag
2154  else
2155    ac_cpp_err=
2156  fi
2157else
2158  ac_cpp_err=yes
2159fi
2160if test -z "$ac_cpp_err"; then
2161  :
2162else
2163  echo "$as_me: failed program was:" >&5
2164  cat conftest.$ac_ext >&5
2165  # Broken: fails on valid input.
2166continue
2167fi
2168rm -f conftest.err conftest.$ac_ext
2169
2170  # OK, works on sane cases.  Now check whether non-existent headers
2171  # can be detected and how.
2172  cat >conftest.$ac_ext <<_ACEOF
2173#line 2173 "configure"
2174#include "confdefs.h"
2175#include <ac_nonexistent.h>
2176_ACEOF
2177if { (eval echo "$as_me:2177: \"$ac_cpp conftest.$ac_ext\"") >&5
2178  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2179  ac_status=$?
2180  egrep -v '^ *\+' conftest.er1 >conftest.err
2181  rm -f conftest.er1
2182  cat conftest.err >&5
2183  echo "$as_me:2183: \$? = $ac_status" >&5
2184  (exit $ac_status); } >/dev/null; then
2185  if test -s conftest.err; then
2186    ac_cpp_err=$ac_c_preproc_warn_flag
2187  else
2188    ac_cpp_err=
2189  fi
2190else
2191  ac_cpp_err=yes
2192fi
2193if test -z "$ac_cpp_err"; then
2194  # Broken: success on invalid input.
2195continue
2196else
2197  echo "$as_me: failed program was:" >&5
2198  cat conftest.$ac_ext >&5
2199  # Passes both tests.
2200ac_preproc_ok=:
2201break
2202fi
2203rm -f conftest.err conftest.$ac_ext
2204
2205done
2206# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2207rm -f conftest.err conftest.$ac_ext
2208if $ac_preproc_ok; then
2209  break
2210fi
2211
2212    done
2213    ac_cv_prog_CPP=$CPP
2214
2215fi
2216  CPP=$ac_cv_prog_CPP
2217else
2218  ac_cv_prog_CPP=$CPP
2219fi
2220echo "$as_me:2220: result: $CPP" >&5
2221echo "${ECHO_T}$CPP" >&6
2222ac_preproc_ok=false
2223for ac_c_preproc_warn_flag in '' yes
2224do
2225  # Use a header file that comes with gcc, so configuring glibc
2226  # with a fresh cross-compiler works.
2227  # On the NeXT, cc -E runs the code through the compiler's parser,
2228  # not just through cpp. "Syntax error" is here to catch this case.
2229  cat >conftest.$ac_ext <<_ACEOF
2230#line 2230 "configure"
2231#include "confdefs.h"
2232#include <assert.h>
2233                     Syntax error
2234_ACEOF
2235if { (eval echo "$as_me:2235: \"$ac_cpp conftest.$ac_ext\"") >&5
2236  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2237  ac_status=$?
2238  egrep -v '^ *\+' conftest.er1 >conftest.err
2239  rm -f conftest.er1
2240  cat conftest.err >&5
2241  echo "$as_me:2241: \$? = $ac_status" >&5
2242  (exit $ac_status); } >/dev/null; then
2243  if test -s conftest.err; then
2244    ac_cpp_err=$ac_c_preproc_warn_flag
2245  else
2246    ac_cpp_err=
2247  fi
2248else
2249  ac_cpp_err=yes
2250fi
2251if test -z "$ac_cpp_err"; then
2252  :
2253else
2254  echo "$as_me: failed program was:" >&5
2255  cat conftest.$ac_ext >&5
2256  # Broken: fails on valid input.
2257continue
2258fi
2259rm -f conftest.err conftest.$ac_ext
2260
2261  # OK, works on sane cases.  Now check whether non-existent headers
2262  # can be detected and how.
2263  cat >conftest.$ac_ext <<_ACEOF
2264#line 2264 "configure"
2265#include "confdefs.h"
2266#include <ac_nonexistent.h>
2267_ACEOF
2268if { (eval echo "$as_me:2268: \"$ac_cpp conftest.$ac_ext\"") >&5
2269  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2270  ac_status=$?
2271  egrep -v '^ *\+' conftest.er1 >conftest.err
2272  rm -f conftest.er1
2273  cat conftest.err >&5
2274  echo "$as_me:2274: \$? = $ac_status" >&5
2275  (exit $ac_status); } >/dev/null; then
2276  if test -s conftest.err; then
2277    ac_cpp_err=$ac_c_preproc_warn_flag
2278  else
2279    ac_cpp_err=
2280  fi
2281else
2282  ac_cpp_err=yes
2283fi
2284if test -z "$ac_cpp_err"; then
2285  # Broken: success on invalid input.
2286continue
2287else
2288  echo "$as_me: failed program was:" >&5
2289  cat conftest.$ac_ext >&5
2290  # Passes both tests.
2291ac_preproc_ok=:
2292break
2293fi
2294rm -f conftest.err conftest.$ac_ext
2295
2296done
2297# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2298rm -f conftest.err conftest.$ac_ext
2299if $ac_preproc_ok; then
2300  :
2301else
2302  { { echo "$as_me:2302: error: C preprocessor \"$CPP\" fails sanity check" >&5
2303echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2304   { (exit 1); exit 1; }; }
2305fi
2306
2307ac_ext=c
2308ac_cpp='$CPP $CPPFLAGS'
2309ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2310ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2311ac_compiler_gnu=$ac_cv_c_compiler_gnu
2312ac_main_return=return
2313
2314for ac_prog in mawk gawk nawk awk
2315do
2316  # Extract the first word of "$ac_prog", so it can be a program name with args.
2317set dummy $ac_prog; ac_word=$2
2318echo "$as_me:2318: checking for $ac_word" >&5
2319echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2320if test "${ac_cv_prog_AWK+set}" = set; then
2321  echo $ECHO_N "(cached) $ECHO_C" >&6
2322else
2323  if test -n "$AWK"; then
2324  ac_cv_prog_AWK="$AWK" # Let the user override the test.
2325else
2326  ac_save_IFS=$IFS; IFS=$ac_path_separator
2327ac_dummy="$PATH"
2328for ac_dir in $ac_dummy; do
2329  IFS=$ac_save_IFS
2330  test -z "$ac_dir" && ac_dir=.
2331  $as_executable_p "$ac_dir/$ac_word" || continue
2332ac_cv_prog_AWK="$ac_prog"
2333echo "$as_me:2333: found $ac_dir/$ac_word" >&5
2334break
2335done
2336
2337fi
2338fi
2339AWK=$ac_cv_prog_AWK
2340if test -n "$AWK"; then
2341  echo "$as_me:2341: result: $AWK" >&5
2342echo "${ECHO_T}$AWK" >&6
2343else
2344  echo "$as_me:2344: result: no" >&5
2345echo "${ECHO_T}no" >&6
2346fi
2347
2348  test -n "$AWK" && break
2349done
2350
2351# Extract the first word of "groff", so it can be a program name with args.
2352set dummy groff; ac_word=$2
2353echo "$as_me:2353: checking for $ac_word" >&5
2354echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2355if test "${ac_cv_path_GROFF_PATH+set}" = set; then
2356  echo $ECHO_N "(cached) $ECHO_C" >&6
2357else
2358  case $GROFF_PATH in
2359  [\\/]* | ?:[\\/]*)
2360  ac_cv_path_GROFF_PATH="$GROFF_PATH" # Let the user override the test with a path.
2361  ;;
2362  *)
2363  ac_save_IFS=$IFS; IFS=$ac_path_separator
2364ac_dummy="$PATH"
2365for ac_dir in $ac_dummy; do
2366  IFS=$ac_save_IFS
2367  test -z "$ac_dir" && ac_dir=.
2368  if $as_executable_p "$ac_dir/$ac_word"; then
2369   ac_cv_path_GROFF_PATH="$ac_dir/$ac_word"
2370   echo "$as_me:2370: found $ac_dir/$ac_word" >&5
2371   break
2372fi
2373done
2374
2375  test -z "$ac_cv_path_GROFF_PATH" && ac_cv_path_GROFF_PATH="no"
2376  ;;
2377esac
2378fi
2379GROFF_PATH=$ac_cv_path_GROFF_PATH
2380
2381if test -n "$GROFF_PATH"; then
2382  echo "$as_me:2382: result: $GROFF_PATH" >&5
2383echo "${ECHO_T}$GROFF_PATH" >&6
2384else
2385  echo "$as_me:2385: result: no" >&5
2386echo "${ECHO_T}no" >&6
2387fi
2388
2389if test "x$GROFF_PATH" = xno
2390then
2391	NROFF_NOTE=
2392	GROFF_NOTE="#"
2393else
2394	NROFF_NOTE="#"
2395	GROFF_NOTE=
2396fi
2397
2398# Find a good install program.  We prefer a C program (faster),
2399# so one script is as good as another.  But avoid the broken or
2400# incompatible versions:
2401# SysV /etc/install, /usr/sbin/install
2402# SunOS /usr/etc/install
2403# IRIX /sbin/install
2404# AIX /bin/install
2405# AmigaOS /C/install, which installs bootblocks on floppy discs
2406# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2407# AFS /usr/afsws/bin/install, which mishandles nonexistent args
2408# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2409# ./install, which can be erroneously created by make from ./install.sh.
2410echo "$as_me:2410: checking for a BSD compatible install" >&5
2411echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
2412if test -z "$INSTALL"; then
2413if test "${ac_cv_path_install+set}" = set; then
2414  echo $ECHO_N "(cached) $ECHO_C" >&6
2415else
2416    ac_save_IFS=$IFS; IFS=$ac_path_separator
2417  for ac_dir in $PATH; do
2418    IFS=$ac_save_IFS
2419    # Account for people who put trailing slashes in PATH elements.
2420    case $ac_dir/ in
2421    / | ./ | .// | /cC/* \
2422    | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
2423    | /usr/ucb/* ) ;;
2424    *)
2425      # OSF1 and SCO ODT 3.0 have their own names for install.
2426      # Don't use installbsd from OSF since it installs stuff as root
2427      # by default.
2428      for ac_prog in ginstall scoinst install; do
2429        if $as_executable_p "$ac_dir/$ac_prog"; then
2430	  if test $ac_prog = install &&
2431            grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2432	    # AIX install.  It has an incompatible calling convention.
2433	    :
2434	  elif test $ac_prog = install &&
2435	    grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2436	    # program-specific install script used by HP pwplus--don't use.
2437	    :
2438	  else
2439	    ac_cv_path_install="$ac_dir/$ac_prog -c"
2440	    break 2
2441	  fi
2442	fi
2443      done
2444      ;;
2445    esac
2446  done
2447
2448fi
2449  if test "${ac_cv_path_install+set}" = set; then
2450    INSTALL=$ac_cv_path_install
2451  else
2452    # As a last resort, use the slow shell script.  We don't cache a
2453    # path for INSTALL within a source directory, because that will
2454    # break other packages using the cache if that directory is
2455    # removed, or if the path is relative.
2456    INSTALL=$ac_install_sh
2457  fi
2458fi
2459echo "$as_me:2459: result: $INSTALL" >&5
2460echo "${ECHO_T}$INSTALL" >&6
2461
2462# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2463# It thinks the first close brace ends the variable substitution.
2464test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2465
2466test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2467
2468test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2469
2470echo "$as_me:2470: checking whether ln -s works" >&5
2471echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
2472LN_S=$as_ln_s
2473if test "$LN_S" = "ln -s"; then
2474  echo "$as_me:2474: result: yes" >&5
2475echo "${ECHO_T}yes" >&6
2476else
2477  echo "$as_me:2477: result: no, using $LN_S" >&5
2478echo "${ECHO_T}no, using $LN_S" >&6
2479fi
2480
2481test "$program_prefix" != NONE &&
2482  program_transform_name="s,^,$program_prefix,;$program_transform_name"
2483# Use a double $ so make ignores it.
2484test "$program_suffix" != NONE &&
2485  program_transform_name="s,\$,$program_suffix,;$program_transform_name"
2486# Double any \ or $.  echo might interpret backslashes.
2487# By default was `s,x,x', remove it if useless.
2488cat <<\_ACEOF >conftest.sed
2489s/[\\$]/&&/g;s/;s,x,x,$//
2490_ACEOF
2491program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
2492rm conftest.sed
2493
2494for ac_prog in tdlint lint alint
2495do
2496  # Extract the first word of "$ac_prog", so it can be a program name with args.
2497set dummy $ac_prog; ac_word=$2
2498echo "$as_me:2498: checking for $ac_word" >&5
2499echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2500if test "${ac_cv_prog_LINT+set}" = set; then
2501  echo $ECHO_N "(cached) $ECHO_C" >&6
2502else
2503  if test -n "$LINT"; then
2504  ac_cv_prog_LINT="$LINT" # Let the user override the test.
2505else
2506  ac_save_IFS=$IFS; IFS=$ac_path_separator
2507ac_dummy="$PATH"
2508for ac_dir in $ac_dummy; do
2509  IFS=$ac_save_IFS
2510  test -z "$ac_dir" && ac_dir=.
2511  $as_executable_p "$ac_dir/$ac_word" || continue
2512ac_cv_prog_LINT="$ac_prog"
2513echo "$as_me:2513: found $ac_dir/$ac_word" >&5
2514break
2515done
2516
2517fi
2518fi
2519LINT=$ac_cv_prog_LINT
2520if test -n "$LINT"; then
2521  echo "$as_me:2521: result: $LINT" >&5
2522echo "${ECHO_T}$LINT" >&6
2523else
2524  echo "$as_me:2524: result: no" >&5
2525echo "${ECHO_T}no" >&6
2526fi
2527
2528  test -n "$LINT" && break
2529done
2530
2531###	checks for compiler characteristics
2532
2533cf_XOPEN_SOURCE=500
2534cf_POSIX_C_SOURCE=199506L
2535cf_xopen_source=
2536
2537case $host_os in #(vi
2538aix[4-7]*) #(vi
2539	cf_xopen_source="-D_ALL_SOURCE"
2540	;;
2541cygwin) #(vi
2542	cf_XOPEN_SOURCE=600
2543	;;
2544darwin[0-8].*) #(vi
2545	cf_xopen_source="-D_APPLE_C_SOURCE"
2546	;;
2547darwin*) #(vi
2548	cf_xopen_source="-D_DARWIN_C_SOURCE"
2549	cf_XOPEN_SOURCE=
2550	;;
2551freebsd*|dragonfly*) #(vi
2552	# 5.x headers associate
2553	#	_XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
2554	#	_XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
2555	cf_POSIX_C_SOURCE=200112L
2556	cf_XOPEN_SOURCE=600
2557	cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
2558	;;
2559hpux11*) #(vi
2560	cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
2561	;;
2562hpux*) #(vi
2563	cf_xopen_source="-D_HPUX_SOURCE"
2564	;;
2565irix[56].*) #(vi
2566	cf_xopen_source="-D_SGI_SOURCE"
2567	cf_XOPEN_SOURCE=
2568	;;
2569linux*|gnu*|mint*|k*bsd*-gnu) #(vi
2570
2571echo "$as_me:2571: checking if we must define _GNU_SOURCE" >&5
2572echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
2573if test "${cf_cv_gnu_source+set}" = set; then
2574  echo $ECHO_N "(cached) $ECHO_C" >&6
2575else
2576
2577cat >conftest.$ac_ext <<_ACEOF
2578#line 2578 "configure"
2579#include "confdefs.h"
2580#include <sys/types.h>
2581int
2582main ()
2583{
2584
2585#ifndef _XOPEN_SOURCE
2586make an error
2587#endif
2588  ;
2589  return 0;
2590}
2591_ACEOF
2592rm -f conftest.$ac_objext
2593if { (eval echo "$as_me:2593: \"$ac_compile\"") >&5
2594  (eval $ac_compile) 2>&5
2595  ac_status=$?
2596  echo "$as_me:2596: \$? = $ac_status" >&5
2597  (exit $ac_status); } &&
2598         { ac_try='test -s conftest.$ac_objext'
2599  { (eval echo "$as_me:2599: \"$ac_try\"") >&5
2600  (eval $ac_try) 2>&5
2601  ac_status=$?
2602  echo "$as_me:2602: \$? = $ac_status" >&5
2603  (exit $ac_status); }; }; then
2604  cf_cv_gnu_source=no
2605else
2606  echo "$as_me: failed program was:" >&5
2607cat conftest.$ac_ext >&5
2608cf_save="$CPPFLAGS"
2609	 CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
2610	 cat >conftest.$ac_ext <<_ACEOF
2611#line 2611 "configure"
2612#include "confdefs.h"
2613#include <sys/types.h>
2614int
2615main ()
2616{
2617
2618#ifdef _XOPEN_SOURCE
2619make an error
2620#endif
2621  ;
2622  return 0;
2623}
2624_ACEOF
2625rm -f conftest.$ac_objext
2626if { (eval echo "$as_me:2626: \"$ac_compile\"") >&5
2627  (eval $ac_compile) 2>&5
2628  ac_status=$?
2629  echo "$as_me:2629: \$? = $ac_status" >&5
2630  (exit $ac_status); } &&
2631         { ac_try='test -s conftest.$ac_objext'
2632  { (eval echo "$as_me:2632: \"$ac_try\"") >&5
2633  (eval $ac_try) 2>&5
2634  ac_status=$?
2635  echo "$as_me:2635: \$? = $ac_status" >&5
2636  (exit $ac_status); }; }; then
2637  cf_cv_gnu_source=no
2638else
2639  echo "$as_me: failed program was:" >&5
2640cat conftest.$ac_ext >&5
2641cf_cv_gnu_source=yes
2642fi
2643rm -f conftest.$ac_objext conftest.$ac_ext
2644	CPPFLAGS="$cf_save"
2645
2646fi
2647rm -f conftest.$ac_objext conftest.$ac_ext
2648
2649fi
2650echo "$as_me:2650: result: $cf_cv_gnu_source" >&5
2651echo "${ECHO_T}$cf_cv_gnu_source" >&6
2652test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
2653
2654	;;
2655mirbsd*) #(vi
2656	# setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
2657	cf_XOPEN_SOURCE=
2658
2659cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
2660
2661cf_save_CFLAGS="$CFLAGS"
2662cf_save_CPPFLAGS="$CPPFLAGS"
2663
2664cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
2665	sed	-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
2666		-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?$//g'`
2667
2668cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
2669	sed	-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
2670		-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?$//g'`
2671
2672echo "$as_me:2672: checking if we should define _POSIX_C_SOURCE" >&5
2673echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
2674if test "${cf_cv_posix_c_source+set}" = set; then
2675  echo $ECHO_N "(cached) $ECHO_C" >&6
2676else
2677
2678echo "${as_me:-configure}:2678: testing if the symbol is already defined go no further ..." 1>&5
2679
2680	cat >conftest.$ac_ext <<_ACEOF
2681#line 2681 "configure"
2682#include "confdefs.h"
2683#include <sys/types.h>
2684int
2685main ()
2686{
2687
2688#ifndef _POSIX_C_SOURCE
2689make an error
2690#endif
2691  ;
2692  return 0;
2693}
2694_ACEOF
2695rm -f conftest.$ac_objext
2696if { (eval echo "$as_me:2696: \"$ac_compile\"") >&5
2697  (eval $ac_compile) 2>&5
2698  ac_status=$?
2699  echo "$as_me:2699: \$? = $ac_status" >&5
2700  (exit $ac_status); } &&
2701         { ac_try='test -s conftest.$ac_objext'
2702  { (eval echo "$as_me:2702: \"$ac_try\"") >&5
2703  (eval $ac_try) 2>&5
2704  ac_status=$?
2705  echo "$as_me:2705: \$? = $ac_status" >&5
2706  (exit $ac_status); }; }; then
2707  cf_cv_posix_c_source=no
2708else
2709  echo "$as_me: failed program was:" >&5
2710cat conftest.$ac_ext >&5
2711cf_want_posix_source=no
2712	 case .$cf_POSIX_C_SOURCE in #(vi
2713	 .[12]??*) #(vi
2714		cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
2715		;;
2716	 .2) #(vi
2717		cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
2718		cf_want_posix_source=yes
2719		;;
2720	 .*)
2721		cf_want_posix_source=yes
2722		;;
2723	 esac
2724	 if test "$cf_want_posix_source" = yes ; then
2725		cat >conftest.$ac_ext <<_ACEOF
2726#line 2726 "configure"
2727#include "confdefs.h"
2728#include <sys/types.h>
2729int
2730main ()
2731{
2732
2733#ifdef _POSIX_SOURCE
2734make an error
2735#endif
2736  ;
2737  return 0;
2738}
2739_ACEOF
2740rm -f conftest.$ac_objext
2741if { (eval echo "$as_me:2741: \"$ac_compile\"") >&5
2742  (eval $ac_compile) 2>&5
2743  ac_status=$?
2744  echo "$as_me:2744: \$? = $ac_status" >&5
2745  (exit $ac_status); } &&
2746         { ac_try='test -s conftest.$ac_objext'
2747  { (eval echo "$as_me:2747: \"$ac_try\"") >&5
2748  (eval $ac_try) 2>&5
2749  ac_status=$?
2750  echo "$as_me:2750: \$? = $ac_status" >&5
2751  (exit $ac_status); }; }; then
2752  :
2753else
2754  echo "$as_me: failed program was:" >&5
2755cat conftest.$ac_ext >&5
2756cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
2757fi
2758rm -f conftest.$ac_objext conftest.$ac_ext
2759	 fi
2760
2761echo "${as_me:-configure}:2761: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
2762
2763	 CFLAGS="$cf_trim_CFLAGS"
2764	 CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
2765
2766echo "${as_me:-configure}:2766: testing if the second compile does not leave our definition intact error ..." 1>&5
2767
2768	 cat >conftest.$ac_ext <<_ACEOF
2769#line 2769 "configure"
2770#include "confdefs.h"
2771#include <sys/types.h>
2772int
2773main ()
2774{
2775
2776#ifndef _POSIX_C_SOURCE
2777make an error
2778#endif
2779  ;
2780  return 0;
2781}
2782_ACEOF
2783rm -f conftest.$ac_objext
2784if { (eval echo "$as_me:2784: \"$ac_compile\"") >&5
2785  (eval $ac_compile) 2>&5
2786  ac_status=$?
2787  echo "$as_me:2787: \$? = $ac_status" >&5
2788  (exit $ac_status); } &&
2789         { ac_try='test -s conftest.$ac_objext'
2790  { (eval echo "$as_me:2790: \"$ac_try\"") >&5
2791  (eval $ac_try) 2>&5
2792  ac_status=$?
2793  echo "$as_me:2793: \$? = $ac_status" >&5
2794  (exit $ac_status); }; }; then
2795  :
2796else
2797  echo "$as_me: failed program was:" >&5
2798cat conftest.$ac_ext >&5
2799cf_cv_posix_c_source=no
2800fi
2801rm -f conftest.$ac_objext conftest.$ac_ext
2802	 CFLAGS="$cf_save_CFLAGS"
2803	 CPPFLAGS="$cf_save_CPPFLAGS"
2804
2805fi
2806rm -f conftest.$ac_objext conftest.$ac_ext
2807
2808fi
2809echo "$as_me:2809: result: $cf_cv_posix_c_source" >&5
2810echo "${ECHO_T}$cf_cv_posix_c_source" >&6
2811
2812if test "$cf_cv_posix_c_source" != no ; then
2813	CFLAGS="$cf_trim_CFLAGS"
2814	CPPFLAGS="$cf_trim_CPPFLAGS"
2815
2816cf_fix_cppflags=no
2817cf_new_cflags=
2818cf_new_cppflags=
2819cf_new_extra_cppflags=
2820
2821for cf_add_cflags in $cf_cv_posix_c_source
2822do
2823case $cf_fix_cppflags in
2824no)
2825	case $cf_add_cflags in #(vi
2826	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2827		case $cf_add_cflags in
2828		-D*)
2829			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2830
2831			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2832				&& test -z "${cf_tst_cflags}" \
2833				&& cf_fix_cppflags=yes
2834
2835			if test $cf_fix_cppflags = yes ; then
2836				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2837				continue
2838			elif test "${cf_tst_cflags}" = "\"'" ; then
2839				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2840				continue
2841			fi
2842			;;
2843		esac
2844		case "$CPPFLAGS" in
2845		*$cf_add_cflags) #(vi
2846			;;
2847		*) #(vi
2848			case $cf_add_cflags in #(vi
2849			-D*)
2850				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2851
2852CPPFLAGS=`echo "$CPPFLAGS" | \
2853	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
2854		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
2855
2856				;;
2857			esac
2858			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2859			;;
2860		esac
2861		;;
2862	*)
2863		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2864		;;
2865	esac
2866	;;
2867yes)
2868	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2869
2870	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2871
2872	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2873		&& test -z "${cf_tst_cflags}" \
2874		&& cf_fix_cppflags=no
2875	;;
2876esac
2877done
2878
2879if test -n "$cf_new_cflags" ; then
2880
2881	CFLAGS="$CFLAGS $cf_new_cflags"
2882fi
2883
2884if test -n "$cf_new_cppflags" ; then
2885
2886	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2887fi
2888
2889if test -n "$cf_new_extra_cppflags" ; then
2890
2891	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2892fi
2893
2894fi
2895
2896	;;
2897netbsd*) #(vi
2898	cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
2899	;;
2900openbsd[4-9]*) #(vi
2901	# setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
2902	cf_xopen_source="-D_BSD_SOURCE"
2903	cf_XOPEN_SOURCE=600
2904	;;
2905openbsd*) #(vi
2906	# setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
2907	;;
2908osf[45]*) #(vi
2909	cf_xopen_source="-D_OSF_SOURCE"
2910	;;
2911nto-qnx*) #(vi
2912	cf_xopen_source="-D_QNX_SOURCE"
2913	;;
2914sco*) #(vi
2915	# setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
2916	;;
2917solaris2.*) #(vi
2918	cf_xopen_source="-D__EXTENSIONS__"
2919	;;
2920*)
2921
2922echo "$as_me:2922: checking if we should define _XOPEN_SOURCE" >&5
2923echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
2924if test "${cf_cv_xopen_source+set}" = set; then
2925  echo $ECHO_N "(cached) $ECHO_C" >&6
2926else
2927
2928	cat >conftest.$ac_ext <<_ACEOF
2929#line 2929 "configure"
2930#include "confdefs.h"
2931
2932#include <stdlib.h>
2933#include <string.h>
2934#include <sys/types.h>
2935
2936int
2937main ()
2938{
2939
2940#ifndef _XOPEN_SOURCE
2941make an error
2942#endif
2943  ;
2944  return 0;
2945}
2946_ACEOF
2947rm -f conftest.$ac_objext
2948if { (eval echo "$as_me:2948: \"$ac_compile\"") >&5
2949  (eval $ac_compile) 2>&5
2950  ac_status=$?
2951  echo "$as_me:2951: \$? = $ac_status" >&5
2952  (exit $ac_status); } &&
2953         { ac_try='test -s conftest.$ac_objext'
2954  { (eval echo "$as_me:2954: \"$ac_try\"") >&5
2955  (eval $ac_try) 2>&5
2956  ac_status=$?
2957  echo "$as_me:2957: \$? = $ac_status" >&5
2958  (exit $ac_status); }; }; then
2959  cf_cv_xopen_source=no
2960else
2961  echo "$as_me: failed program was:" >&5
2962cat conftest.$ac_ext >&5
2963cf_save="$CPPFLAGS"
2964	 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
2965	 cat >conftest.$ac_ext <<_ACEOF
2966#line 2966 "configure"
2967#include "confdefs.h"
2968
2969#include <stdlib.h>
2970#include <string.h>
2971#include <sys/types.h>
2972
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_xopen_source=no
2997else
2998  echo "$as_me: failed program was:" >&5
2999cat conftest.$ac_ext >&5
3000cf_cv_xopen_source=$cf_XOPEN_SOURCE
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_xopen_source" >&5
3010echo "${ECHO_T}$cf_cv_xopen_source" >&6
3011
3012if test "$cf_cv_xopen_source" != no ; then
3013
3014CFLAGS=`echo "$CFLAGS" | \
3015	sed	-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
3016		-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?$//g'`
3017
3018CPPFLAGS=`echo "$CPPFLAGS" | \
3019	sed	-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
3020		-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?$//g'`
3021
3022	cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
3023
3024cf_fix_cppflags=no
3025cf_new_cflags=
3026cf_new_cppflags=
3027cf_new_extra_cppflags=
3028
3029for cf_add_cflags in $cf_temp_xopen_source
3030do
3031case $cf_fix_cppflags in
3032no)
3033	case $cf_add_cflags in #(vi
3034	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
3035		case $cf_add_cflags in
3036		-D*)
3037			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3038
3039			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
3040				&& test -z "${cf_tst_cflags}" \
3041				&& cf_fix_cppflags=yes
3042
3043			if test $cf_fix_cppflags = yes ; then
3044				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3045				continue
3046			elif test "${cf_tst_cflags}" = "\"'" ; then
3047				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3048				continue
3049			fi
3050			;;
3051		esac
3052		case "$CPPFLAGS" in
3053		*$cf_add_cflags) #(vi
3054			;;
3055		*) #(vi
3056			case $cf_add_cflags in #(vi
3057			-D*)
3058				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3059
3060CPPFLAGS=`echo "$CPPFLAGS" | \
3061	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
3062		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
3063
3064				;;
3065			esac
3066			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
3067			;;
3068		esac
3069		;;
3070	*)
3071		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
3072		;;
3073	esac
3074	;;
3075yes)
3076	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3077
3078	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3079
3080	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
3081		&& test -z "${cf_tst_cflags}" \
3082		&& cf_fix_cppflags=no
3083	;;
3084esac
3085done
3086
3087if test -n "$cf_new_cflags" ; then
3088
3089	CFLAGS="$CFLAGS $cf_new_cflags"
3090fi
3091
3092if test -n "$cf_new_cppflags" ; then
3093
3094	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
3095fi
3096
3097if test -n "$cf_new_extra_cppflags" ; then
3098
3099	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
3100fi
3101
3102fi
3103
3104cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
3105
3106cf_save_CFLAGS="$CFLAGS"
3107cf_save_CPPFLAGS="$CPPFLAGS"
3108
3109cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
3110	sed	-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
3111		-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?$//g'`
3112
3113cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
3114	sed	-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
3115		-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?$//g'`
3116
3117echo "$as_me:3117: checking if we should define _POSIX_C_SOURCE" >&5
3118echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
3119if test "${cf_cv_posix_c_source+set}" = set; then
3120  echo $ECHO_N "(cached) $ECHO_C" >&6
3121else
3122
3123echo "${as_me:-configure}:3123: testing if the symbol is already defined go no further ..." 1>&5
3124
3125	cat >conftest.$ac_ext <<_ACEOF
3126#line 3126 "configure"
3127#include "confdefs.h"
3128#include <sys/types.h>
3129int
3130main ()
3131{
3132
3133#ifndef _POSIX_C_SOURCE
3134make an error
3135#endif
3136  ;
3137  return 0;
3138}
3139_ACEOF
3140rm -f conftest.$ac_objext
3141if { (eval echo "$as_me:3141: \"$ac_compile\"") >&5
3142  (eval $ac_compile) 2>&5
3143  ac_status=$?
3144  echo "$as_me:3144: \$? = $ac_status" >&5
3145  (exit $ac_status); } &&
3146         { ac_try='test -s conftest.$ac_objext'
3147  { (eval echo "$as_me:3147: \"$ac_try\"") >&5
3148  (eval $ac_try) 2>&5
3149  ac_status=$?
3150  echo "$as_me:3150: \$? = $ac_status" >&5
3151  (exit $ac_status); }; }; then
3152  cf_cv_posix_c_source=no
3153else
3154  echo "$as_me: failed program was:" >&5
3155cat conftest.$ac_ext >&5
3156cf_want_posix_source=no
3157	 case .$cf_POSIX_C_SOURCE in #(vi
3158	 .[12]??*) #(vi
3159		cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
3160		;;
3161	 .2) #(vi
3162		cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
3163		cf_want_posix_source=yes
3164		;;
3165	 .*)
3166		cf_want_posix_source=yes
3167		;;
3168	 esac
3169	 if test "$cf_want_posix_source" = yes ; then
3170		cat >conftest.$ac_ext <<_ACEOF
3171#line 3171 "configure"
3172#include "confdefs.h"
3173#include <sys/types.h>
3174int
3175main ()
3176{
3177
3178#ifdef _POSIX_SOURCE
3179make an error
3180#endif
3181  ;
3182  return 0;
3183}
3184_ACEOF
3185rm -f conftest.$ac_objext
3186if { (eval echo "$as_me:3186: \"$ac_compile\"") >&5
3187  (eval $ac_compile) 2>&5
3188  ac_status=$?
3189  echo "$as_me:3189: \$? = $ac_status" >&5
3190  (exit $ac_status); } &&
3191         { ac_try='test -s conftest.$ac_objext'
3192  { (eval echo "$as_me:3192: \"$ac_try\"") >&5
3193  (eval $ac_try) 2>&5
3194  ac_status=$?
3195  echo "$as_me:3195: \$? = $ac_status" >&5
3196  (exit $ac_status); }; }; then
3197  :
3198else
3199  echo "$as_me: failed program was:" >&5
3200cat conftest.$ac_ext >&5
3201cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
3202fi
3203rm -f conftest.$ac_objext conftest.$ac_ext
3204	 fi
3205
3206echo "${as_me:-configure}:3206: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
3207
3208	 CFLAGS="$cf_trim_CFLAGS"
3209	 CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
3210
3211echo "${as_me:-configure}:3211: testing if the second compile does not leave our definition intact error ..." 1>&5
3212
3213	 cat >conftest.$ac_ext <<_ACEOF
3214#line 3214 "configure"
3215#include "confdefs.h"
3216#include <sys/types.h>
3217int
3218main ()
3219{
3220
3221#ifndef _POSIX_C_SOURCE
3222make an error
3223#endif
3224  ;
3225  return 0;
3226}
3227_ACEOF
3228rm -f conftest.$ac_objext
3229if { (eval echo "$as_me:3229: \"$ac_compile\"") >&5
3230  (eval $ac_compile) 2>&5
3231  ac_status=$?
3232  echo "$as_me:3232: \$? = $ac_status" >&5
3233  (exit $ac_status); } &&
3234         { ac_try='test -s conftest.$ac_objext'
3235  { (eval echo "$as_me:3235: \"$ac_try\"") >&5
3236  (eval $ac_try) 2>&5
3237  ac_status=$?
3238  echo "$as_me:3238: \$? = $ac_status" >&5
3239  (exit $ac_status); }; }; then
3240  :
3241else
3242  echo "$as_me: failed program was:" >&5
3243cat conftest.$ac_ext >&5
3244cf_cv_posix_c_source=no
3245fi
3246rm -f conftest.$ac_objext conftest.$ac_ext
3247	 CFLAGS="$cf_save_CFLAGS"
3248	 CPPFLAGS="$cf_save_CPPFLAGS"
3249
3250fi
3251rm -f conftest.$ac_objext conftest.$ac_ext
3252
3253fi
3254echo "$as_me:3254: result: $cf_cv_posix_c_source" >&5
3255echo "${ECHO_T}$cf_cv_posix_c_source" >&6
3256
3257if test "$cf_cv_posix_c_source" != no ; then
3258	CFLAGS="$cf_trim_CFLAGS"
3259	CPPFLAGS="$cf_trim_CPPFLAGS"
3260
3261cf_fix_cppflags=no
3262cf_new_cflags=
3263cf_new_cppflags=
3264cf_new_extra_cppflags=
3265
3266for cf_add_cflags in $cf_cv_posix_c_source
3267do
3268case $cf_fix_cppflags in
3269no)
3270	case $cf_add_cflags in #(vi
3271	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
3272		case $cf_add_cflags in
3273		-D*)
3274			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3275
3276			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
3277				&& test -z "${cf_tst_cflags}" \
3278				&& cf_fix_cppflags=yes
3279
3280			if test $cf_fix_cppflags = yes ; then
3281				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3282				continue
3283			elif test "${cf_tst_cflags}" = "\"'" ; then
3284				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3285				continue
3286			fi
3287			;;
3288		esac
3289		case "$CPPFLAGS" in
3290		*$cf_add_cflags) #(vi
3291			;;
3292		*) #(vi
3293			case $cf_add_cflags in #(vi
3294			-D*)
3295				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3296
3297CPPFLAGS=`echo "$CPPFLAGS" | \
3298	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
3299		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
3300
3301				;;
3302			esac
3303			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
3304			;;
3305		esac
3306		;;
3307	*)
3308		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
3309		;;
3310	esac
3311	;;
3312yes)
3313	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3314
3315	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3316
3317	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
3318		&& test -z "${cf_tst_cflags}" \
3319		&& cf_fix_cppflags=no
3320	;;
3321esac
3322done
3323
3324if test -n "$cf_new_cflags" ; then
3325
3326	CFLAGS="$CFLAGS $cf_new_cflags"
3327fi
3328
3329if test -n "$cf_new_cppflags" ; then
3330
3331	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
3332fi
3333
3334if test -n "$cf_new_extra_cppflags" ; then
3335
3336	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
3337fi
3338
3339fi
3340
3341	;;
3342esac
3343
3344if test -n "$cf_xopen_source" ; then
3345
3346cf_fix_cppflags=no
3347cf_new_cflags=
3348cf_new_cppflags=
3349cf_new_extra_cppflags=
3350
3351for cf_add_cflags in $cf_xopen_source
3352do
3353case $cf_fix_cppflags in
3354no)
3355	case $cf_add_cflags in #(vi
3356	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
3357		case $cf_add_cflags in
3358		-D*)
3359			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3360
3361			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
3362				&& test -z "${cf_tst_cflags}" \
3363				&& cf_fix_cppflags=yes
3364
3365			if test $cf_fix_cppflags = yes ; then
3366				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3367				continue
3368			elif test "${cf_tst_cflags}" = "\"'" ; then
3369				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3370				continue
3371			fi
3372			;;
3373		esac
3374		case "$CPPFLAGS" in
3375		*$cf_add_cflags) #(vi
3376			;;
3377		*) #(vi
3378			case $cf_add_cflags in #(vi
3379			-D*)
3380				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3381
3382CPPFLAGS=`echo "$CPPFLAGS" | \
3383	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
3384		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
3385
3386				;;
3387			esac
3388			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
3389			;;
3390		esac
3391		;;
3392	*)
3393		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
3394		;;
3395	esac
3396	;;
3397yes)
3398	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3399
3400	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3401
3402	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
3403		&& test -z "${cf_tst_cflags}" \
3404		&& cf_fix_cppflags=no
3405	;;
3406esac
3407done
3408
3409if test -n "$cf_new_cflags" ; then
3410
3411	CFLAGS="$CFLAGS $cf_new_cflags"
3412fi
3413
3414if test -n "$cf_new_cppflags" ; then
3415
3416	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
3417fi
3418
3419if test -n "$cf_new_extra_cppflags" ; then
3420
3421	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
3422fi
3423
3424fi
3425
3426if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
3427	echo "$as_me:3427: checking if _XOPEN_SOURCE really is set" >&5
3428echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
3429	cat >conftest.$ac_ext <<_ACEOF
3430#line 3430 "configure"
3431#include "confdefs.h"
3432#include <stdlib.h>
3433int
3434main ()
3435{
3436
3437#ifndef _XOPEN_SOURCE
3438make an error
3439#endif
3440  ;
3441  return 0;
3442}
3443_ACEOF
3444rm -f conftest.$ac_objext
3445if { (eval echo "$as_me:3445: \"$ac_compile\"") >&5
3446  (eval $ac_compile) 2>&5
3447  ac_status=$?
3448  echo "$as_me:3448: \$? = $ac_status" >&5
3449  (exit $ac_status); } &&
3450         { ac_try='test -s conftest.$ac_objext'
3451  { (eval echo "$as_me:3451: \"$ac_try\"") >&5
3452  (eval $ac_try) 2>&5
3453  ac_status=$?
3454  echo "$as_me:3454: \$? = $ac_status" >&5
3455  (exit $ac_status); }; }; then
3456  cf_XOPEN_SOURCE_set=yes
3457else
3458  echo "$as_me: failed program was:" >&5
3459cat conftest.$ac_ext >&5
3460cf_XOPEN_SOURCE_set=no
3461fi
3462rm -f conftest.$ac_objext conftest.$ac_ext
3463	echo "$as_me:3463: result: $cf_XOPEN_SOURCE_set" >&5
3464echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
3465	if test $cf_XOPEN_SOURCE_set = yes
3466	then
3467		cat >conftest.$ac_ext <<_ACEOF
3468#line 3468 "configure"
3469#include "confdefs.h"
3470#include <stdlib.h>
3471int
3472main ()
3473{
3474
3475#if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
3476make an error
3477#endif
3478  ;
3479  return 0;
3480}
3481_ACEOF
3482rm -f conftest.$ac_objext
3483if { (eval echo "$as_me:3483: \"$ac_compile\"") >&5
3484  (eval $ac_compile) 2>&5
3485  ac_status=$?
3486  echo "$as_me:3486: \$? = $ac_status" >&5
3487  (exit $ac_status); } &&
3488         { ac_try='test -s conftest.$ac_objext'
3489  { (eval echo "$as_me:3489: \"$ac_try\"") >&5
3490  (eval $ac_try) 2>&5
3491  ac_status=$?
3492  echo "$as_me:3492: \$? = $ac_status" >&5
3493  (exit $ac_status); }; }; then
3494  cf_XOPEN_SOURCE_set_ok=yes
3495else
3496  echo "$as_me: failed program was:" >&5
3497cat conftest.$ac_ext >&5
3498cf_XOPEN_SOURCE_set_ok=no
3499fi
3500rm -f conftest.$ac_objext conftest.$ac_ext
3501		if test $cf_XOPEN_SOURCE_set_ok = no
3502		then
3503			{ echo "$as_me:3503: WARNING: _XOPEN_SOURCE is lower than requested" >&5
3504echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
3505		fi
3506	else
3507
3508echo "$as_me:3508: checking if we should define _XOPEN_SOURCE" >&5
3509echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
3510if test "${cf_cv_xopen_source+set}" = set; then
3511  echo $ECHO_N "(cached) $ECHO_C" >&6
3512else
3513
3514	cat >conftest.$ac_ext <<_ACEOF
3515#line 3515 "configure"
3516#include "confdefs.h"
3517
3518#include <stdlib.h>
3519#include <string.h>
3520#include <sys/types.h>
3521
3522int
3523main ()
3524{
3525
3526#ifndef _XOPEN_SOURCE
3527make an error
3528#endif
3529  ;
3530  return 0;
3531}
3532_ACEOF
3533rm -f conftest.$ac_objext
3534if { (eval echo "$as_me:3534: \"$ac_compile\"") >&5
3535  (eval $ac_compile) 2>&5
3536  ac_status=$?
3537  echo "$as_me:3537: \$? = $ac_status" >&5
3538  (exit $ac_status); } &&
3539         { ac_try='test -s conftest.$ac_objext'
3540  { (eval echo "$as_me:3540: \"$ac_try\"") >&5
3541  (eval $ac_try) 2>&5
3542  ac_status=$?
3543  echo "$as_me:3543: \$? = $ac_status" >&5
3544  (exit $ac_status); }; }; then
3545  cf_cv_xopen_source=no
3546else
3547  echo "$as_me: failed program was:" >&5
3548cat conftest.$ac_ext >&5
3549cf_save="$CPPFLAGS"
3550	 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
3551	 cat >conftest.$ac_ext <<_ACEOF
3552#line 3552 "configure"
3553#include "confdefs.h"
3554
3555#include <stdlib.h>
3556#include <string.h>
3557#include <sys/types.h>
3558
3559int
3560main ()
3561{
3562
3563#ifdef _XOPEN_SOURCE
3564make an error
3565#endif
3566  ;
3567  return 0;
3568}
3569_ACEOF
3570rm -f conftest.$ac_objext
3571if { (eval echo "$as_me:3571: \"$ac_compile\"") >&5
3572  (eval $ac_compile) 2>&5
3573  ac_status=$?
3574  echo "$as_me:3574: \$? = $ac_status" >&5
3575  (exit $ac_status); } &&
3576         { ac_try='test -s conftest.$ac_objext'
3577  { (eval echo "$as_me:3577: \"$ac_try\"") >&5
3578  (eval $ac_try) 2>&5
3579  ac_status=$?
3580  echo "$as_me:3580: \$? = $ac_status" >&5
3581  (exit $ac_status); }; }; then
3582  cf_cv_xopen_source=no
3583else
3584  echo "$as_me: failed program was:" >&5
3585cat conftest.$ac_ext >&5
3586cf_cv_xopen_source=$cf_XOPEN_SOURCE
3587fi
3588rm -f conftest.$ac_objext conftest.$ac_ext
3589	CPPFLAGS="$cf_save"
3590
3591fi
3592rm -f conftest.$ac_objext conftest.$ac_ext
3593
3594fi
3595echo "$as_me:3595: result: $cf_cv_xopen_source" >&5
3596echo "${ECHO_T}$cf_cv_xopen_source" >&6
3597
3598if test "$cf_cv_xopen_source" != no ; then
3599
3600CFLAGS=`echo "$CFLAGS" | \
3601	sed	-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
3602		-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?$//g'`
3603
3604CPPFLAGS=`echo "$CPPFLAGS" | \
3605	sed	-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
3606		-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?$//g'`
3607
3608	cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
3609
3610cf_fix_cppflags=no
3611cf_new_cflags=
3612cf_new_cppflags=
3613cf_new_extra_cppflags=
3614
3615for cf_add_cflags in $cf_temp_xopen_source
3616do
3617case $cf_fix_cppflags in
3618no)
3619	case $cf_add_cflags in #(vi
3620	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
3621		case $cf_add_cflags in
3622		-D*)
3623			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3624
3625			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
3626				&& test -z "${cf_tst_cflags}" \
3627				&& cf_fix_cppflags=yes
3628
3629			if test $cf_fix_cppflags = yes ; then
3630				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3631				continue
3632			elif test "${cf_tst_cflags}" = "\"'" ; then
3633				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3634				continue
3635			fi
3636			;;
3637		esac
3638		case "$CPPFLAGS" in
3639		*$cf_add_cflags) #(vi
3640			;;
3641		*) #(vi
3642			case $cf_add_cflags in #(vi
3643			-D*)
3644				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3645
3646CPPFLAGS=`echo "$CPPFLAGS" | \
3647	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
3648		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
3649
3650				;;
3651			esac
3652			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
3653			;;
3654		esac
3655		;;
3656	*)
3657		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
3658		;;
3659	esac
3660	;;
3661yes)
3662	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3663
3664	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3665
3666	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
3667		&& test -z "${cf_tst_cflags}" \
3668		&& cf_fix_cppflags=no
3669	;;
3670esac
3671done
3672
3673if test -n "$cf_new_cflags" ; then
3674
3675	CFLAGS="$CFLAGS $cf_new_cflags"
3676fi
3677
3678if test -n "$cf_new_cppflags" ; then
3679
3680	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
3681fi
3682
3683if test -n "$cf_new_extra_cppflags" ; then
3684
3685	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
3686fi
3687
3688fi
3689
3690	fi
3691fi
3692
3693echo "$as_me:3693: checking if SIGWINCH is defined" >&5
3694echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
3695if test "${cf_cv_define_sigwinch+set}" = set; then
3696  echo $ECHO_N "(cached) $ECHO_C" >&6
3697else
3698
3699	cat >conftest.$ac_ext <<_ACEOF
3700#line 3700 "configure"
3701#include "confdefs.h"
3702
3703#include <sys/types.h>
3704#include <sys/signal.h>
3705
3706int
3707main ()
3708{
3709int x = SIGWINCH
3710  ;
3711  return 0;
3712}
3713_ACEOF
3714rm -f conftest.$ac_objext
3715if { (eval echo "$as_me:3715: \"$ac_compile\"") >&5
3716  (eval $ac_compile) 2>&5
3717  ac_status=$?
3718  echo "$as_me:3718: \$? = $ac_status" >&5
3719  (exit $ac_status); } &&
3720         { ac_try='test -s conftest.$ac_objext'
3721  { (eval echo "$as_me:3721: \"$ac_try\"") >&5
3722  (eval $ac_try) 2>&5
3723  ac_status=$?
3724  echo "$as_me:3724: \$? = $ac_status" >&5
3725  (exit $ac_status); }; }; then
3726  cf_cv_define_sigwinch=yes
3727else
3728  echo "$as_me: failed program was:" >&5
3729cat conftest.$ac_ext >&5
3730cat >conftest.$ac_ext <<_ACEOF
3731#line 3731 "configure"
3732#include "confdefs.h"
3733
3734#undef _XOPEN_SOURCE
3735#undef _POSIX_SOURCE
3736#undef _POSIX_C_SOURCE
3737#include <sys/types.h>
3738#include <sys/signal.h>
3739
3740int
3741main ()
3742{
3743int x = SIGWINCH
3744  ;
3745  return 0;
3746}
3747_ACEOF
3748rm -f conftest.$ac_objext
3749if { (eval echo "$as_me:3749: \"$ac_compile\"") >&5
3750  (eval $ac_compile) 2>&5
3751  ac_status=$?
3752  echo "$as_me:3752: \$? = $ac_status" >&5
3753  (exit $ac_status); } &&
3754         { ac_try='test -s conftest.$ac_objext'
3755  { (eval echo "$as_me:3755: \"$ac_try\"") >&5
3756  (eval $ac_try) 2>&5
3757  ac_status=$?
3758  echo "$as_me:3758: \$? = $ac_status" >&5
3759  (exit $ac_status); }; }; then
3760  cf_cv_define_sigwinch=maybe
3761else
3762  echo "$as_me: failed program was:" >&5
3763cat conftest.$ac_ext >&5
3764cf_cv_define_sigwinch=no
3765fi
3766rm -f conftest.$ac_objext conftest.$ac_ext
3767
3768fi
3769rm -f conftest.$ac_objext conftest.$ac_ext
3770
3771fi
3772echo "$as_me:3772: result: $cf_cv_define_sigwinch" >&5
3773echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
3774
3775if test "$cf_cv_define_sigwinch" = maybe ; then
3776echo "$as_me:3776: checking for actual SIGWINCH definition" >&5
3777echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
3778if test "${cf_cv_fixup_sigwinch+set}" = set; then
3779  echo $ECHO_N "(cached) $ECHO_C" >&6
3780else
3781
3782cf_cv_fixup_sigwinch=unknown
3783cf_sigwinch=32
3784while test $cf_sigwinch != 1
3785do
3786	cat >conftest.$ac_ext <<_ACEOF
3787#line 3787 "configure"
3788#include "confdefs.h"
3789
3790#undef _XOPEN_SOURCE
3791#undef _POSIX_SOURCE
3792#undef _POSIX_C_SOURCE
3793#include <sys/types.h>
3794#include <sys/signal.h>
3795
3796int
3797main ()
3798{
3799
3800#if SIGWINCH != $cf_sigwinch
3801make an error
3802#endif
3803int x = SIGWINCH
3804  ;
3805  return 0;
3806}
3807_ACEOF
3808rm -f conftest.$ac_objext
3809if { (eval echo "$as_me:3809: \"$ac_compile\"") >&5
3810  (eval $ac_compile) 2>&5
3811  ac_status=$?
3812  echo "$as_me:3812: \$? = $ac_status" >&5
3813  (exit $ac_status); } &&
3814         { ac_try='test -s conftest.$ac_objext'
3815  { (eval echo "$as_me:3815: \"$ac_try\"") >&5
3816  (eval $ac_try) 2>&5
3817  ac_status=$?
3818  echo "$as_me:3818: \$? = $ac_status" >&5
3819  (exit $ac_status); }; }; then
3820  cf_cv_fixup_sigwinch=$cf_sigwinch
3821	 break
3822else
3823  echo "$as_me: failed program was:" >&5
3824cat conftest.$ac_ext >&5
3825fi
3826rm -f conftest.$ac_objext conftest.$ac_ext
3827
3828cf_sigwinch=`expr $cf_sigwinch - 1`
3829done
3830
3831fi
3832echo "$as_me:3832: result: $cf_cv_fixup_sigwinch" >&5
3833echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
3834
3835	if test "$cf_cv_fixup_sigwinch" != unknown ; then
3836		CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
3837	fi
3838fi
3839
3840###	checks for header files
3841
3842for ac_header in \
3843ncurses/curses.h \
3844ncurses/term.h \
3845stdlib.h \
3846sys/ptem.h sys/ttydefaults.h \
3847term.h \
3848termios.h \
3849unistd.h \
3850wchar.h \
3851
3852do
3853as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3854echo "$as_me:3854: checking for $ac_header" >&5
3855echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3856if eval "test \"\${$as_ac_Header+set}\" = set"; then
3857  echo $ECHO_N "(cached) $ECHO_C" >&6
3858else
3859  cat >conftest.$ac_ext <<_ACEOF
3860#line 3860 "configure"
3861#include "confdefs.h"
3862#include <$ac_header>
3863_ACEOF
3864if { (eval echo "$as_me:3864: \"$ac_cpp conftest.$ac_ext\"") >&5
3865  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3866  ac_status=$?
3867  egrep -v '^ *\+' conftest.er1 >conftest.err
3868  rm -f conftest.er1
3869  cat conftest.err >&5
3870  echo "$as_me:3870: \$? = $ac_status" >&5
3871  (exit $ac_status); } >/dev/null; then
3872  if test -s conftest.err; then
3873    ac_cpp_err=$ac_c_preproc_warn_flag
3874  else
3875    ac_cpp_err=
3876  fi
3877else
3878  ac_cpp_err=yes
3879fi
3880if test -z "$ac_cpp_err"; then
3881  eval "$as_ac_Header=yes"
3882else
3883  echo "$as_me: failed program was:" >&5
3884  cat conftest.$ac_ext >&5
3885  eval "$as_ac_Header=no"
3886fi
3887rm -f conftest.err conftest.$ac_ext
3888fi
3889echo "$as_me:3889: result: `eval echo '${'$as_ac_Header'}'`" >&5
3890echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3891if test `eval echo '${'$as_ac_Header'}'` = yes; then
3892  cat >>confdefs.h <<EOF
3893#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
3894EOF
3895
3896fi
3897done
3898
3899echo "$as_me:3899: checking whether time.h and sys/time.h may both be included" >&5
3900echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
3901if test "${ac_cv_header_time+set}" = set; then
3902  echo $ECHO_N "(cached) $ECHO_C" >&6
3903else
3904  cat >conftest.$ac_ext <<_ACEOF
3905#line 3905 "configure"
3906#include "confdefs.h"
3907#include <sys/types.h>
3908#include <sys/time.h>
3909#include <time.h>
3910
3911int
3912main ()
3913{
3914if ((struct tm *) 0)
3915return 0;
3916  ;
3917  return 0;
3918}
3919_ACEOF
3920rm -f conftest.$ac_objext
3921if { (eval echo "$as_me:3921: \"$ac_compile\"") >&5
3922  (eval $ac_compile) 2>&5
3923  ac_status=$?
3924  echo "$as_me:3924: \$? = $ac_status" >&5
3925  (exit $ac_status); } &&
3926         { ac_try='test -s conftest.$ac_objext'
3927  { (eval echo "$as_me:3927: \"$ac_try\"") >&5
3928  (eval $ac_try) 2>&5
3929  ac_status=$?
3930  echo "$as_me:3930: \$? = $ac_status" >&5
3931  (exit $ac_status); }; }; then
3932  ac_cv_header_time=yes
3933else
3934  echo "$as_me: failed program was:" >&5
3935cat conftest.$ac_ext >&5
3936ac_cv_header_time=no
3937fi
3938rm -f conftest.$ac_objext conftest.$ac_ext
3939fi
3940echo "$as_me:3940: result: $ac_cv_header_time" >&5
3941echo "${ECHO_T}$ac_cv_header_time" >&6
3942if test $ac_cv_header_time = yes; then
3943
3944cat >>confdefs.h <<\EOF
3945#define TIME_WITH_SYS_TIME 1
3946EOF
3947
3948fi
3949
3950  echo "$as_me:3950: checking for nl_langinfo and CODESET" >&5
3951echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
3952if test "${am_cv_langinfo_codeset+set}" = set; then
3953  echo $ECHO_N "(cached) $ECHO_C" >&6
3954else
3955  cat >conftest.$ac_ext <<_ACEOF
3956#line 3956 "configure"
3957#include "confdefs.h"
3958#include <langinfo.h>
3959int
3960main ()
3961{
3962char* cs = nl_langinfo(CODESET);
3963  ;
3964  return 0;
3965}
3966_ACEOF
3967rm -f conftest.$ac_objext conftest$ac_exeext
3968if { (eval echo "$as_me:3968: \"$ac_link\"") >&5
3969  (eval $ac_link) 2>&5
3970  ac_status=$?
3971  echo "$as_me:3971: \$? = $ac_status" >&5
3972  (exit $ac_status); } &&
3973         { ac_try='test -s conftest$ac_exeext'
3974  { (eval echo "$as_me:3974: \"$ac_try\"") >&5
3975  (eval $ac_try) 2>&5
3976  ac_status=$?
3977  echo "$as_me:3977: \$? = $ac_status" >&5
3978  (exit $ac_status); }; }; then
3979  am_cv_langinfo_codeset=yes
3980else
3981  echo "$as_me: failed program was:" >&5
3982cat conftest.$ac_ext >&5
3983am_cv_langinfo_codeset=no
3984fi
3985rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3986
3987fi
3988echo "$as_me:3988: result: $am_cv_langinfo_codeset" >&5
3989echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
3990  if test $am_cv_langinfo_codeset = yes; then
3991
3992cat >>confdefs.h <<\EOF
3993#define HAVE_LANGINFO_CODESET 1
3994EOF
3995
3996  fi
3997
3998###	checks for typedefs
3999
4000echo "$as_me:4000: checking for signal global datatype" >&5
4001echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
4002if test "${cf_cv_sig_atomic_t+set}" = set; then
4003  echo $ECHO_N "(cached) $ECHO_C" >&6
4004else
4005
4006	for cf_type in \
4007		"volatile sig_atomic_t" \
4008		"sig_atomic_t" \
4009		"int"
4010	do
4011	cat >conftest.$ac_ext <<_ACEOF
4012#line 4012 "configure"
4013#include "confdefs.h"
4014
4015#include <sys/types.h>
4016#include <signal.h>
4017#include <stdio.h>
4018
4019extern $cf_type x;
4020$cf_type x;
4021static void handler(int sig)
4022{
4023	x = 5;
4024}
4025int
4026main ()
4027{
4028signal(SIGINT, handler);
4029		 x = 1
4030  ;
4031  return 0;
4032}
4033_ACEOF
4034rm -f conftest.$ac_objext
4035if { (eval echo "$as_me:4035: \"$ac_compile\"") >&5
4036  (eval $ac_compile) 2>&5
4037  ac_status=$?
4038  echo "$as_me:4038: \$? = $ac_status" >&5
4039  (exit $ac_status); } &&
4040         { ac_try='test -s conftest.$ac_objext'
4041  { (eval echo "$as_me:4041: \"$ac_try\"") >&5
4042  (eval $ac_try) 2>&5
4043  ac_status=$?
4044  echo "$as_me:4044: \$? = $ac_status" >&5
4045  (exit $ac_status); }; }; then
4046  cf_cv_sig_atomic_t=$cf_type
4047else
4048  echo "$as_me: failed program was:" >&5
4049cat conftest.$ac_ext >&5
4050cf_cv_sig_atomic_t=no
4051fi
4052rm -f conftest.$ac_objext conftest.$ac_ext
4053		test "$cf_cv_sig_atomic_t" != no && break
4054	done
4055
4056fi
4057
4058echo "$as_me:4058: result: $cf_cv_sig_atomic_t" >&5
4059echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
4060test "$cf_cv_sig_atomic_t" != no &&
4061cat >>confdefs.h <<EOF
4062#define SIG_ATOMIC_T $cf_cv_sig_atomic_t
4063EOF
4064
4065echo "$as_me:4065: checking for ANSI C header files" >&5
4066echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
4067if test "${ac_cv_header_stdc+set}" = set; then
4068  echo $ECHO_N "(cached) $ECHO_C" >&6
4069else
4070  cat >conftest.$ac_ext <<_ACEOF
4071#line 4071 "configure"
4072#include "confdefs.h"
4073#include <stdlib.h>
4074#include <stdarg.h>
4075#include <string.h>
4076#include <float.h>
4077
4078_ACEOF
4079if { (eval echo "$as_me:4079: \"$ac_cpp conftest.$ac_ext\"") >&5
4080  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4081  ac_status=$?
4082  egrep -v '^ *\+' conftest.er1 >conftest.err
4083  rm -f conftest.er1
4084  cat conftest.err >&5
4085  echo "$as_me:4085: \$? = $ac_status" >&5
4086  (exit $ac_status); } >/dev/null; then
4087  if test -s conftest.err; then
4088    ac_cpp_err=$ac_c_preproc_warn_flag
4089  else
4090    ac_cpp_err=
4091  fi
4092else
4093  ac_cpp_err=yes
4094fi
4095if test -z "$ac_cpp_err"; then
4096  ac_cv_header_stdc=yes
4097else
4098  echo "$as_me: failed program was:" >&5
4099  cat conftest.$ac_ext >&5
4100  ac_cv_header_stdc=no
4101fi
4102rm -f conftest.err conftest.$ac_ext
4103
4104if test $ac_cv_header_stdc = yes; then
4105  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4106  cat >conftest.$ac_ext <<_ACEOF
4107#line 4107 "configure"
4108#include "confdefs.h"
4109#include <string.h>
4110
4111_ACEOF
4112if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4113  egrep "memchr" >/dev/null 2>&1; then
4114  :
4115else
4116  ac_cv_header_stdc=no
4117fi
4118rm -rf conftest*
4119
4120fi
4121
4122if test $ac_cv_header_stdc = yes; then
4123  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4124  cat >conftest.$ac_ext <<_ACEOF
4125#line 4125 "configure"
4126#include "confdefs.h"
4127#include <stdlib.h>
4128
4129_ACEOF
4130if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4131  egrep "free" >/dev/null 2>&1; then
4132  :
4133else
4134  ac_cv_header_stdc=no
4135fi
4136rm -rf conftest*
4137
4138fi
4139
4140if test $ac_cv_header_stdc = yes; then
4141  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4142  if test "$cross_compiling" = yes; then
4143  :
4144else
4145  cat >conftest.$ac_ext <<_ACEOF
4146#line 4146 "configure"
4147#include "confdefs.h"
4148#include <ctype.h>
4149#if ((' ' & 0x0FF) == 0x020)
4150# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4151# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4152#else
4153# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
4154                     || ('j' <= (c) && (c) <= 'r') \
4155                     || ('s' <= (c) && (c) <= 'z'))
4156# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4157#endif
4158
4159#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4160int
4161main ()
4162{
4163  int i;
4164  for (i = 0; i < 256; i++)
4165    if (XOR (islower (i), ISLOWER (i))
4166        || toupper (i) != TOUPPER (i))
4167      $ac_main_return(2);
4168  $ac_main_return (0);
4169}
4170_ACEOF
4171rm -f conftest$ac_exeext
4172if { (eval echo "$as_me:4172: \"$ac_link\"") >&5
4173  (eval $ac_link) 2>&5
4174  ac_status=$?
4175  echo "$as_me:4175: \$? = $ac_status" >&5
4176  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4177  { (eval echo "$as_me:4177: \"$ac_try\"") >&5
4178  (eval $ac_try) 2>&5
4179  ac_status=$?
4180  echo "$as_me:4180: \$? = $ac_status" >&5
4181  (exit $ac_status); }; }; then
4182  :
4183else
4184  echo "$as_me: program exited with status $ac_status" >&5
4185echo "$as_me: failed program was:" >&5
4186cat conftest.$ac_ext >&5
4187ac_cv_header_stdc=no
4188fi
4189rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4190fi
4191fi
4192fi
4193echo "$as_me:4193: result: $ac_cv_header_stdc" >&5
4194echo "${ECHO_T}$ac_cv_header_stdc" >&6
4195if test $ac_cv_header_stdc = yes; then
4196
4197cat >>confdefs.h <<\EOF
4198#define STDC_HEADERS 1
4199EOF
4200
4201fi
4202
4203# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4204
4205for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4206                  inttypes.h stdint.h unistd.h
4207do
4208as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4209echo "$as_me:4209: checking for $ac_header" >&5
4210echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4211if eval "test \"\${$as_ac_Header+set}\" = set"; then
4212  echo $ECHO_N "(cached) $ECHO_C" >&6
4213else
4214  cat >conftest.$ac_ext <<_ACEOF
4215#line 4215 "configure"
4216#include "confdefs.h"
4217$ac_includes_default
4218#include <$ac_header>
4219_ACEOF
4220rm -f conftest.$ac_objext
4221if { (eval echo "$as_me:4221: \"$ac_compile\"") >&5
4222  (eval $ac_compile) 2>&5
4223  ac_status=$?
4224  echo "$as_me:4224: \$? = $ac_status" >&5
4225  (exit $ac_status); } &&
4226         { ac_try='test -s conftest.$ac_objext'
4227  { (eval echo "$as_me:4227: \"$ac_try\"") >&5
4228  (eval $ac_try) 2>&5
4229  ac_status=$?
4230  echo "$as_me:4230: \$? = $ac_status" >&5
4231  (exit $ac_status); }; }; then
4232  eval "$as_ac_Header=yes"
4233else
4234  echo "$as_me: failed program was:" >&5
4235cat conftest.$ac_ext >&5
4236eval "$as_ac_Header=no"
4237fi
4238rm -f conftest.$ac_objext conftest.$ac_ext
4239fi
4240echo "$as_me:4240: result: `eval echo '${'$as_ac_Header'}'`" >&5
4241echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4242if test `eval echo '${'$as_ac_Header'}'` = yes; then
4243  cat >>confdefs.h <<EOF
4244#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4245EOF
4246
4247fi
4248done
4249
4250echo "$as_me:4250: checking for time_t" >&5
4251echo $ECHO_N "checking for time_t... $ECHO_C" >&6
4252if test "${ac_cv_type_time_t+set}" = set; then
4253  echo $ECHO_N "(cached) $ECHO_C" >&6
4254else
4255  cat >conftest.$ac_ext <<_ACEOF
4256#line 4256 "configure"
4257#include "confdefs.h"
4258$ac_includes_default
4259int
4260main ()
4261{
4262if ((time_t *) 0)
4263  return 0;
4264if (sizeof (time_t))
4265  return 0;
4266  ;
4267  return 0;
4268}
4269_ACEOF
4270rm -f conftest.$ac_objext
4271if { (eval echo "$as_me:4271: \"$ac_compile\"") >&5
4272  (eval $ac_compile) 2>&5
4273  ac_status=$?
4274  echo "$as_me:4274: \$? = $ac_status" >&5
4275  (exit $ac_status); } &&
4276         { ac_try='test -s conftest.$ac_objext'
4277  { (eval echo "$as_me:4277: \"$ac_try\"") >&5
4278  (eval $ac_try) 2>&5
4279  ac_status=$?
4280  echo "$as_me:4280: \$? = $ac_status" >&5
4281  (exit $ac_status); }; }; then
4282  ac_cv_type_time_t=yes
4283else
4284  echo "$as_me: failed program was:" >&5
4285cat conftest.$ac_ext >&5
4286ac_cv_type_time_t=no
4287fi
4288rm -f conftest.$ac_objext conftest.$ac_ext
4289fi
4290echo "$as_me:4290: result: $ac_cv_type_time_t" >&5
4291echo "${ECHO_T}$ac_cv_type_time_t" >&6
4292if test $ac_cv_type_time_t = yes; then
4293  :
4294else
4295
4296cat >>confdefs.h <<EOF
4297#define time_t long
4298EOF
4299
4300fi
4301
4302echo "$as_me:4302: checking for cc_t in <termios.h> or <termio.h>" >&5
4303echo $ECHO_N "checking for cc_t in <termios.h> or <termio.h>... $ECHO_C" >&6
4304if test "${cf_cv_type_cc_t+set}" = set; then
4305  echo $ECHO_N "(cached) $ECHO_C" >&6
4306else
4307
4308	cat >conftest.$ac_ext <<_ACEOF
4309#line 4309 "configure"
4310#include "confdefs.h"
4311
4312#include <sys/types.h>
4313#if defined(HAVE_TERMIOS_H)
4314#include <termios.h>
4315#else
4316#include <termio.h>
4317#include <sys/ioctl.h>
4318#endif
4319
4320int
4321main ()
4322{
4323cc_t x
4324  ;
4325  return 0;
4326}
4327_ACEOF
4328rm -f conftest.$ac_objext
4329if { (eval echo "$as_me:4329: \"$ac_compile\"") >&5
4330  (eval $ac_compile) 2>&5
4331  ac_status=$?
4332  echo "$as_me:4332: \$? = $ac_status" >&5
4333  (exit $ac_status); } &&
4334         { ac_try='test -s conftest.$ac_objext'
4335  { (eval echo "$as_me:4335: \"$ac_try\"") >&5
4336  (eval $ac_try) 2>&5
4337  ac_status=$?
4338  echo "$as_me:4338: \$? = $ac_status" >&5
4339  (exit $ac_status); }; }; then
4340  cf_cv_type_cc_t=yes
4341else
4342  echo "$as_me: failed program was:" >&5
4343cat conftest.$ac_ext >&5
4344cf_cv_type_cc_t=no
4345fi
4346rm -f conftest.$ac_objext conftest.$ac_ext
4347
4348fi
4349
4350echo "$as_me:4350: result: $cf_cv_type_cc_t" >&5
4351echo "${ECHO_T}$cf_cv_type_cc_t" >&6
4352test $cf_cv_type_cc_t = no &&
4353cat >>confdefs.h <<\EOF
4354#define cc_t unsigned char
4355EOF
4356
4357echo "$as_me:4357: checking for mode_t" >&5
4358echo $ECHO_N "checking for mode_t... $ECHO_C" >&6
4359if test "${ac_cv_type_mode_t+set}" = set; then
4360  echo $ECHO_N "(cached) $ECHO_C" >&6
4361else
4362  cat >conftest.$ac_ext <<_ACEOF
4363#line 4363 "configure"
4364#include "confdefs.h"
4365$ac_includes_default
4366int
4367main ()
4368{
4369if ((mode_t *) 0)
4370  return 0;
4371if (sizeof (mode_t))
4372  return 0;
4373  ;
4374  return 0;
4375}
4376_ACEOF
4377rm -f conftest.$ac_objext
4378if { (eval echo "$as_me:4378: \"$ac_compile\"") >&5
4379  (eval $ac_compile) 2>&5
4380  ac_status=$?
4381  echo "$as_me:4381: \$? = $ac_status" >&5
4382  (exit $ac_status); } &&
4383         { ac_try='test -s conftest.$ac_objext'
4384  { (eval echo "$as_me:4384: \"$ac_try\"") >&5
4385  (eval $ac_try) 2>&5
4386  ac_status=$?
4387  echo "$as_me:4387: \$? = $ac_status" >&5
4388  (exit $ac_status); }; }; then
4389  ac_cv_type_mode_t=yes
4390else
4391  echo "$as_me: failed program was:" >&5
4392cat conftest.$ac_ext >&5
4393ac_cv_type_mode_t=no
4394fi
4395rm -f conftest.$ac_objext conftest.$ac_ext
4396fi
4397echo "$as_me:4397: result: $ac_cv_type_mode_t" >&5
4398echo "${ECHO_T}$ac_cv_type_mode_t" >&6
4399if test $ac_cv_type_mode_t = yes; then
4400  :
4401else
4402
4403cat >>confdefs.h <<EOF
4404#define mode_t int
4405EOF
4406
4407fi
4408
4409echo "$as_me:4409: checking for pid_t" >&5
4410echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
4411if test "${ac_cv_type_pid_t+set}" = set; then
4412  echo $ECHO_N "(cached) $ECHO_C" >&6
4413else
4414  cat >conftest.$ac_ext <<_ACEOF
4415#line 4415 "configure"
4416#include "confdefs.h"
4417$ac_includes_default
4418int
4419main ()
4420{
4421if ((pid_t *) 0)
4422  return 0;
4423if (sizeof (pid_t))
4424  return 0;
4425  ;
4426  return 0;
4427}
4428_ACEOF
4429rm -f conftest.$ac_objext
4430if { (eval echo "$as_me:4430: \"$ac_compile\"") >&5
4431  (eval $ac_compile) 2>&5
4432  ac_status=$?
4433  echo "$as_me:4433: \$? = $ac_status" >&5
4434  (exit $ac_status); } &&
4435         { ac_try='test -s conftest.$ac_objext'
4436  { (eval echo "$as_me:4436: \"$ac_try\"") >&5
4437  (eval $ac_try) 2>&5
4438  ac_status=$?
4439  echo "$as_me:4439: \$? = $ac_status" >&5
4440  (exit $ac_status); }; }; then
4441  ac_cv_type_pid_t=yes
4442else
4443  echo "$as_me: failed program was:" >&5
4444cat conftest.$ac_ext >&5
4445ac_cv_type_pid_t=no
4446fi
4447rm -f conftest.$ac_objext conftest.$ac_ext
4448fi
4449echo "$as_me:4449: result: $ac_cv_type_pid_t" >&5
4450echo "${ECHO_T}$ac_cv_type_pid_t" >&6
4451if test $ac_cv_type_pid_t = yes; then
4452  :
4453else
4454
4455cat >>confdefs.h <<EOF
4456#define pid_t int
4457EOF
4458
4459fi
4460
4461echo "$as_me:4461: checking for uid_t in sys/types.h" >&5
4462echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
4463if test "${ac_cv_type_uid_t+set}" = set; then
4464  echo $ECHO_N "(cached) $ECHO_C" >&6
4465else
4466  cat >conftest.$ac_ext <<_ACEOF
4467#line 4467 "configure"
4468#include "confdefs.h"
4469#include <sys/types.h>
4470
4471_ACEOF
4472if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4473  egrep "uid_t" >/dev/null 2>&1; then
4474  ac_cv_type_uid_t=yes
4475else
4476  ac_cv_type_uid_t=no
4477fi
4478rm -rf conftest*
4479
4480fi
4481echo "$as_me:4481: result: $ac_cv_type_uid_t" >&5
4482echo "${ECHO_T}$ac_cv_type_uid_t" >&6
4483if test $ac_cv_type_uid_t = no; then
4484
4485cat >>confdefs.h <<\EOF
4486#define uid_t int
4487EOF
4488
4489cat >>confdefs.h <<\EOF
4490#define gid_t int
4491EOF
4492
4493fi
4494
4495echo "$as_me:4495: checking for off_t" >&5
4496echo $ECHO_N "checking for off_t... $ECHO_C" >&6
4497if test "${ac_cv_type_off_t+set}" = set; then
4498  echo $ECHO_N "(cached) $ECHO_C" >&6
4499else
4500  cat >conftest.$ac_ext <<_ACEOF
4501#line 4501 "configure"
4502#include "confdefs.h"
4503$ac_includes_default
4504int
4505main ()
4506{
4507if ((off_t *) 0)
4508  return 0;
4509if (sizeof (off_t))
4510  return 0;
4511  ;
4512  return 0;
4513}
4514_ACEOF
4515rm -f conftest.$ac_objext
4516if { (eval echo "$as_me:4516: \"$ac_compile\"") >&5
4517  (eval $ac_compile) 2>&5
4518  ac_status=$?
4519  echo "$as_me:4519: \$? = $ac_status" >&5
4520  (exit $ac_status); } &&
4521         { ac_try='test -s conftest.$ac_objext'
4522  { (eval echo "$as_me:4522: \"$ac_try\"") >&5
4523  (eval $ac_try) 2>&5
4524  ac_status=$?
4525  echo "$as_me:4525: \$? = $ac_status" >&5
4526  (exit $ac_status); }; }; then
4527  ac_cv_type_off_t=yes
4528else
4529  echo "$as_me: failed program was:" >&5
4530cat conftest.$ac_ext >&5
4531ac_cv_type_off_t=no
4532fi
4533rm -f conftest.$ac_objext conftest.$ac_ext
4534fi
4535echo "$as_me:4535: result: $ac_cv_type_off_t" >&5
4536echo "${ECHO_T}$ac_cv_type_off_t" >&6
4537if test $ac_cv_type_off_t = yes; then
4538  :
4539else
4540
4541cat >>confdefs.h <<EOF
4542#define off_t long
4543EOF
4544
4545fi
4546
4547###	checks for library functions
4548
4549for ac_func in \
4550	gethostname \
4551	getlogin \
4552	putenv \
4553	unsetenv \
4554	sched_yield \
4555	setpgid \
4556	strftime \
4557	tcgetattr \
4558	waitpid \
4559	wcswidth \
4560	wcwidth
4561do
4562as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
4563echo "$as_me:4563: checking for $ac_func" >&5
4564echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
4565if eval "test \"\${$as_ac_var+set}\" = set"; then
4566  echo $ECHO_N "(cached) $ECHO_C" >&6
4567else
4568  cat >conftest.$ac_ext <<_ACEOF
4569#line 4569 "configure"
4570#include "confdefs.h"
4571/* System header to define __stub macros and hopefully few prototypes,
4572    which can conflict with char $ac_func (); below.  */
4573#include <assert.h>
4574/* Override any gcc2 internal prototype to avoid an error.  */
4575#ifdef __cplusplus
4576extern "C"
4577#endif
4578/* We use char because int might match the return type of a gcc2
4579   builtin and then its argument prototype would still apply.  */
4580char $ac_func ();
4581char (*f) ();
4582
4583int
4584main ()
4585{
4586/* The GNU C library defines this for functions which it implements
4587    to always fail with ENOSYS.  Some functions are actually named
4588    something starting with __ and the normal name is an alias.  */
4589#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4590choke me
4591#else
4592f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
4593#endif
4594
4595  ;
4596  return 0;
4597}
4598_ACEOF
4599rm -f conftest.$ac_objext conftest$ac_exeext
4600if { (eval echo "$as_me:4600: \"$ac_link\"") >&5
4601  (eval $ac_link) 2>&5
4602  ac_status=$?
4603  echo "$as_me:4603: \$? = $ac_status" >&5
4604  (exit $ac_status); } &&
4605         { ac_try='test -s conftest$ac_exeext'
4606  { (eval echo "$as_me:4606: \"$ac_try\"") >&5
4607  (eval $ac_try) 2>&5
4608  ac_status=$?
4609  echo "$as_me:4609: \$? = $ac_status" >&5
4610  (exit $ac_status); }; }; then
4611  eval "$as_ac_var=yes"
4612else
4613  echo "$as_me: failed program was:" >&5
4614cat conftest.$ac_ext >&5
4615eval "$as_ac_var=no"
4616fi
4617rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4618fi
4619echo "$as_me:4619: result: `eval echo '${'$as_ac_var'}'`" >&5
4620echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
4621if test `eval echo '${'$as_ac_var'}'` = yes; then
4622  cat >>confdefs.h <<EOF
4623#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
4624EOF
4625
4626fi
4627done
4628
4629for ac_header in lastlog.h paths.h
4630do
4631as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4632echo "$as_me:4632: checking for $ac_header" >&5
4633echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4634if eval "test \"\${$as_ac_Header+set}\" = set"; then
4635  echo $ECHO_N "(cached) $ECHO_C" >&6
4636else
4637  cat >conftest.$ac_ext <<_ACEOF
4638#line 4638 "configure"
4639#include "confdefs.h"
4640#include <$ac_header>
4641_ACEOF
4642if { (eval echo "$as_me:4642: \"$ac_cpp conftest.$ac_ext\"") >&5
4643  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4644  ac_status=$?
4645  egrep -v '^ *\+' conftest.er1 >conftest.err
4646  rm -f conftest.er1
4647  cat conftest.err >&5
4648  echo "$as_me:4648: \$? = $ac_status" >&5
4649  (exit $ac_status); } >/dev/null; then
4650  if test -s conftest.err; then
4651    ac_cpp_err=$ac_c_preproc_warn_flag
4652  else
4653    ac_cpp_err=
4654  fi
4655else
4656  ac_cpp_err=yes
4657fi
4658if test -z "$ac_cpp_err"; then
4659  eval "$as_ac_Header=yes"
4660else
4661  echo "$as_me: failed program was:" >&5
4662  cat conftest.$ac_ext >&5
4663  eval "$as_ac_Header=no"
4664fi
4665rm -f conftest.err conftest.$ac_ext
4666fi
4667echo "$as_me:4667: result: `eval echo '${'$as_ac_Header'}'`" >&5
4668echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4669if test `eval echo '${'$as_ac_Header'}'` = yes; then
4670  cat >>confdefs.h <<EOF
4671#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4672EOF
4673
4674fi
4675done
4676
4677echo "$as_me:4677: checking for lastlog path" >&5
4678echo $ECHO_N "checking for lastlog path... $ECHO_C" >&6
4679if test "${cf_cv_path_lastlog+set}" = set; then
4680  echo $ECHO_N "(cached) $ECHO_C" >&6
4681else
4682
4683cat >conftest.$ac_ext <<_ACEOF
4684#line 4684 "configure"
4685#include "confdefs.h"
4686
4687#include <sys/types.h>
4688#ifdef HAVE_LASTLOG_H
4689#include <lastlog.h>
4690#else
4691#ifdef HAVE_PATHS_H
4692#include <paths.h>
4693#endif
4694#endif
4695int
4696main ()
4697{
4698char *path = _PATH_LASTLOG
4699  ;
4700  return 0;
4701}
4702_ACEOF
4703rm -f conftest.$ac_objext
4704if { (eval echo "$as_me:4704: \"$ac_compile\"") >&5
4705  (eval $ac_compile) 2>&5
4706  ac_status=$?
4707  echo "$as_me:4707: \$? = $ac_status" >&5
4708  (exit $ac_status); } &&
4709         { ac_try='test -s conftest.$ac_objext'
4710  { (eval echo "$as_me:4710: \"$ac_try\"") >&5
4711  (eval $ac_try) 2>&5
4712  ac_status=$?
4713  echo "$as_me:4713: \$? = $ac_status" >&5
4714  (exit $ac_status); }; }; then
4715  cf_cv_path_lastlog="_PATH_LASTLOG"
4716else
4717  echo "$as_me: failed program was:" >&5
4718cat conftest.$ac_ext >&5
4719if test -f /usr/adm/lastlog ; then
4720	 	cf_cv_path_lastlog=/usr/adm/lastlog
4721	else
4722		cf_cv_path_lastlog=no
4723	fi
4724fi
4725rm -f conftest.$ac_objext conftest.$ac_ext
4726
4727fi
4728echo "$as_me:4728: result: $cf_cv_path_lastlog" >&5
4729echo "${ECHO_T}$cf_cv_path_lastlog" >&6
4730test $cf_cv_path_lastlog != no &&
4731cat >>confdefs.h <<\EOF
4732#define USE_LASTLOG 1
4733EOF
4734
4735echo "$as_me:4735: checking for utmp implementation" >&5
4736echo $ECHO_N "checking for utmp implementation... $ECHO_C" >&6
4737if test "${cf_cv_have_utmp+set}" = set; then
4738  echo $ECHO_N "(cached) $ECHO_C" >&6
4739else
4740
4741	cf_cv_have_utmp=no
4742for cf_header in utmpx utmp ; do
4743cf_utmp_includes="
4744#include <sys/types.h>
4745#include <${cf_header}.h>
4746#define getutent getutxent
4747#ifdef USE_LASTLOG
4748#include <lastlog.h>	/* may conflict with utmpx.h on Linux */
4749#endif
4750"
4751	cat >conftest.$ac_ext <<_ACEOF
4752#line 4752 "configure"
4753#include "confdefs.h"
4754$cf_utmp_includes
4755int
4756main ()
4757{
4758struct $cf_header x;
4759	 char *name = x.ut_name; /* utmp.h and compatible definitions */
4760
4761  ;
4762  return 0;
4763}
4764_ACEOF
4765rm -f conftest.$ac_objext
4766if { (eval echo "$as_me:4766: \"$ac_compile\"") >&5
4767  (eval $ac_compile) 2>&5
4768  ac_status=$?
4769  echo "$as_me:4769: \$? = $ac_status" >&5
4770  (exit $ac_status); } &&
4771         { ac_try='test -s conftest.$ac_objext'
4772  { (eval echo "$as_me:4772: \"$ac_try\"") >&5
4773  (eval $ac_try) 2>&5
4774  ac_status=$?
4775  echo "$as_me:4775: \$? = $ac_status" >&5
4776  (exit $ac_status); }; }; then
4777  cf_cv_have_utmp=$cf_header
4778	 break
4779else
4780  echo "$as_me: failed program was:" >&5
4781cat conftest.$ac_ext >&5
4782
4783	cat >conftest.$ac_ext <<_ACEOF
4784#line 4784 "configure"
4785#include "confdefs.h"
4786$cf_utmp_includes
4787int
4788main ()
4789{
4790struct $cf_header x;
4791	 char *name = x.ut_user; /* utmpx.h must declare this */
4792
4793  ;
4794  return 0;
4795}
4796_ACEOF
4797rm -f conftest.$ac_objext
4798if { (eval echo "$as_me:4798: \"$ac_compile\"") >&5
4799  (eval $ac_compile) 2>&5
4800  ac_status=$?
4801  echo "$as_me:4801: \$? = $ac_status" >&5
4802  (exit $ac_status); } &&
4803         { ac_try='test -s conftest.$ac_objext'
4804  { (eval echo "$as_me:4804: \"$ac_try\"") >&5
4805  (eval $ac_try) 2>&5
4806  ac_status=$?
4807  echo "$as_me:4807: \$? = $ac_status" >&5
4808  (exit $ac_status); }; }; then
4809  cf_cv_have_utmp=$cf_header
4810	 break
4811
4812else
4813  echo "$as_me: failed program was:" >&5
4814cat conftest.$ac_ext >&5
4815fi
4816rm -f conftest.$ac_objext conftest.$ac_ext
4817fi
4818rm -f conftest.$ac_objext conftest.$ac_ext
4819done
4820
4821fi
4822echo "$as_me:4822: result: $cf_cv_have_utmp" >&5
4823echo "${ECHO_T}$cf_cv_have_utmp" >&6
4824
4825if test $cf_cv_have_utmp != no ; then
4826
4827cat >>confdefs.h <<\EOF
4828#define HAVE_UTMP 1
4829EOF
4830
4831	test $cf_cv_have_utmp = utmpx &&
4832cat >>confdefs.h <<\EOF
4833#define UTMPX_FOR_UTMP 1
4834EOF
4835
4836if test $cf_cv_have_utmp != no ; then
4837echo "$as_me:4837: checking if ${cf_cv_have_utmp}.ut_host is declared" >&5
4838echo $ECHO_N "checking if ${cf_cv_have_utmp}.ut_host is declared... $ECHO_C" >&6
4839if test "${cf_cv_have_utmp_ut_host+set}" = set; then
4840  echo $ECHO_N "(cached) $ECHO_C" >&6
4841else
4842
4843	cat >conftest.$ac_ext <<_ACEOF
4844#line 4844 "configure"
4845#include "confdefs.h"
4846
4847#include <sys/types.h>
4848#include <${cf_cv_have_utmp}.h>
4849int
4850main ()
4851{
4852struct $cf_cv_have_utmp x; char *y = &x.ut_host[0]
4853  ;
4854  return 0;
4855}
4856_ACEOF
4857rm -f conftest.$ac_objext
4858if { (eval echo "$as_me:4858: \"$ac_compile\"") >&5
4859  (eval $ac_compile) 2>&5
4860  ac_status=$?
4861  echo "$as_me:4861: \$? = $ac_status" >&5
4862  (exit $ac_status); } &&
4863         { ac_try='test -s conftest.$ac_objext'
4864  { (eval echo "$as_me:4864: \"$ac_try\"") >&5
4865  (eval $ac_try) 2>&5
4866  ac_status=$?
4867  echo "$as_me:4867: \$? = $ac_status" >&5
4868  (exit $ac_status); }; }; then
4869  cf_cv_have_utmp_ut_host=yes
4870else
4871  echo "$as_me: failed program was:" >&5
4872cat conftest.$ac_ext >&5
4873cf_cv_have_utmp_ut_host=no
4874fi
4875rm -f conftest.$ac_objext conftest.$ac_ext
4876
4877fi
4878
4879echo "$as_me:4879: result: $cf_cv_have_utmp_ut_host" >&5
4880echo "${ECHO_T}$cf_cv_have_utmp_ut_host" >&6
4881test $cf_cv_have_utmp_ut_host != no &&
4882cat >>confdefs.h <<\EOF
4883#define HAVE_UTMP_UT_HOST 1
4884EOF
4885
4886fi
4887
4888if test $cf_cv_have_utmp != no ; then
4889echo "$as_me:4889: checking if ${cf_cv_have_utmp}.ut_syslen is declared" >&5
4890echo $ECHO_N "checking if ${cf_cv_have_utmp}.ut_syslen is declared... $ECHO_C" >&6
4891if test "${cf_cv_have_utmp_ut_syslen+set}" = set; then
4892  echo $ECHO_N "(cached) $ECHO_C" >&6
4893else
4894
4895	cat >conftest.$ac_ext <<_ACEOF
4896#line 4896 "configure"
4897#include "confdefs.h"
4898
4899#include <sys/types.h>
4900#include <${cf_cv_have_utmp}.h>
4901int
4902main ()
4903{
4904struct $cf_cv_have_utmp x; int y = x.ut_syslen
4905  ;
4906  return 0;
4907}
4908_ACEOF
4909rm -f conftest.$ac_objext
4910if { (eval echo "$as_me:4910: \"$ac_compile\"") >&5
4911  (eval $ac_compile) 2>&5
4912  ac_status=$?
4913  echo "$as_me:4913: \$? = $ac_status" >&5
4914  (exit $ac_status); } &&
4915         { ac_try='test -s conftest.$ac_objext'
4916  { (eval echo "$as_me:4916: \"$ac_try\"") >&5
4917  (eval $ac_try) 2>&5
4918  ac_status=$?
4919  echo "$as_me:4919: \$? = $ac_status" >&5
4920  (exit $ac_status); }; }; then
4921  cf_cv_have_utmp_ut_syslen=yes
4922else
4923  echo "$as_me: failed program was:" >&5
4924cat conftest.$ac_ext >&5
4925cf_cv_have_utmp_ut_syslen=no
4926fi
4927rm -f conftest.$ac_objext conftest.$ac_ext
4928
4929fi
4930
4931echo "$as_me:4931: result: $cf_cv_have_utmp_ut_syslen" >&5
4932echo "${ECHO_T}$cf_cv_have_utmp_ut_syslen" >&6
4933test $cf_cv_have_utmp_ut_syslen != no &&
4934cat >>confdefs.h <<\EOF
4935#define HAVE_UTMP_UT_SYSLEN 1
4936EOF
4937
4938fi
4939
4940if test $cf_cv_have_utmp != no ; then
4941echo "$as_me:4941: checking if ${cf_cv_have_utmp}.ut_name is declared" >&5
4942echo $ECHO_N "checking if ${cf_cv_have_utmp}.ut_name is declared... $ECHO_C" >&6
4943if test "${cf_cv_have_utmp_ut_name+set}" = set; then
4944  echo $ECHO_N "(cached) $ECHO_C" >&6
4945else
4946
4947	cf_cv_have_utmp_ut_name=no
4948cf_utmp_includes="
4949#include <sys/types.h>
4950#include <${cf_cv_have_utmp}.h>
4951#define getutent getutxent
4952#ifdef USE_LASTLOG
4953#include <lastlog.h>		/* may conflict with utmpx.h on Linux */
4954#endif
4955"
4956for cf_header in ut_name ut_user ; do
4957	cat >conftest.$ac_ext <<_ACEOF
4958#line 4958 "configure"
4959#include "confdefs.h"
4960$cf_utmp_includes
4961int
4962main ()
4963{
4964struct $cf_cv_have_utmp x;
4965	 char *name = x.$cf_header;
4966
4967  ;
4968  return 0;
4969}
4970_ACEOF
4971rm -f conftest.$ac_objext
4972if { (eval echo "$as_me:4972: \"$ac_compile\"") >&5
4973  (eval $ac_compile) 2>&5
4974  ac_status=$?
4975  echo "$as_me:4975: \$? = $ac_status" >&5
4976  (exit $ac_status); } &&
4977         { ac_try='test -s conftest.$ac_objext'
4978  { (eval echo "$as_me:4978: \"$ac_try\"") >&5
4979  (eval $ac_try) 2>&5
4980  ac_status=$?
4981  echo "$as_me:4981: \$? = $ac_status" >&5
4982  (exit $ac_status); }; }; then
4983  cf_cv_have_utmp_ut_name=$cf_header
4984	 break
4985else
4986  echo "$as_me: failed program was:" >&5
4987cat conftest.$ac_ext >&5
4988fi
4989rm -f conftest.$ac_objext conftest.$ac_ext
4990done
4991
4992fi
4993echo "$as_me:4993: result: $cf_cv_have_utmp_ut_name" >&5
4994echo "${ECHO_T}$cf_cv_have_utmp_ut_name" >&6
4995
4996case $cf_cv_have_utmp_ut_name in #(vi
4997no) #(vi
4998	{ { echo "$as_me:4998: error: Cannot find declaration for ut.ut_name" >&5
4999echo "$as_me: error: Cannot find declaration for ut.ut_name" >&2;}
5000   { (exit 1); exit 1; }; }
5001	;;
5002ut_user)
5003
5004cat >>confdefs.h <<\EOF
5005#define ut_name ut_user
5006EOF
5007
5008	;;
5009esac
5010fi
5011
5012if test $cf_cv_have_utmp != no ; then
5013echo "$as_me:5013: checking for exit-status in $cf_cv_have_utmp" >&5
5014echo $ECHO_N "checking for exit-status in $cf_cv_have_utmp... $ECHO_C" >&6
5015if test "${cf_cv_have_utmp_ut_xstatus+set}" = set; then
5016  echo $ECHO_N "(cached) $ECHO_C" >&6
5017else
5018
5019for cf_result in \
5020	ut_exit.__e_exit \
5021	ut_exit.e_exit \
5022	ut_exit.ut_e_exit \
5023	ut_exit.ut_exit
5024do
5025cat >conftest.$ac_ext <<_ACEOF
5026#line 5026 "configure"
5027#include "confdefs.h"
5028
5029#include <sys/types.h>
5030#include <${cf_cv_have_utmp}.h>
5031int
5032main ()
5033{
5034struct $cf_cv_have_utmp x; long y = x.$cf_result = 0
5035  ;
5036  return 0;
5037}
5038_ACEOF
5039rm -f conftest.$ac_objext
5040if { (eval echo "$as_me:5040: \"$ac_compile\"") >&5
5041  (eval $ac_compile) 2>&5
5042  ac_status=$?
5043  echo "$as_me:5043: \$? = $ac_status" >&5
5044  (exit $ac_status); } &&
5045         { ac_try='test -s conftest.$ac_objext'
5046  { (eval echo "$as_me:5046: \"$ac_try\"") >&5
5047  (eval $ac_try) 2>&5
5048  ac_status=$?
5049  echo "$as_me:5049: \$? = $ac_status" >&5
5050  (exit $ac_status); }; }; then
5051  cf_cv_have_utmp_ut_xstatus=$cf_result
5052	 break
5053else
5054  echo "$as_me: failed program was:" >&5
5055cat conftest.$ac_ext >&5
5056cf_cv_have_utmp_ut_xstatus=no
5057fi
5058rm -f conftest.$ac_objext conftest.$ac_ext
5059done
5060
5061fi
5062echo "$as_me:5062: result: $cf_cv_have_utmp_ut_xstatus" >&5
5063echo "${ECHO_T}$cf_cv_have_utmp_ut_xstatus" >&6
5064if test $cf_cv_have_utmp_ut_xstatus != no ; then
5065
5066cat >>confdefs.h <<\EOF
5067#define HAVE_UTMP_UT_XSTATUS 1
5068EOF
5069
5070cat >>confdefs.h <<EOF
5071#define ut_xstatus $cf_cv_have_utmp_ut_xstatus
5072EOF
5073
5074fi
5075fi
5076
5077if test $cf_cv_have_utmp != no ; then
5078echo "$as_me:5078: checking if ${cf_cv_have_utmp}.ut_xtime is declared" >&5
5079echo $ECHO_N "checking if ${cf_cv_have_utmp}.ut_xtime is declared... $ECHO_C" >&6
5080if test "${cf_cv_have_utmp_ut_xtime+set}" = set; then
5081  echo $ECHO_N "(cached) $ECHO_C" >&6
5082else
5083
5084	cat >conftest.$ac_ext <<_ACEOF
5085#line 5085 "configure"
5086#include "confdefs.h"
5087
5088#include <sys/types.h>
5089#include <${cf_cv_have_utmp}.h>
5090int
5091main ()
5092{
5093struct $cf_cv_have_utmp x; long y = x.ut_xtime = 0
5094  ;
5095  return 0;
5096}
5097_ACEOF
5098rm -f conftest.$ac_objext
5099if { (eval echo "$as_me:5099: \"$ac_compile\"") >&5
5100  (eval $ac_compile) 2>&5
5101  ac_status=$?
5102  echo "$as_me:5102: \$? = $ac_status" >&5
5103  (exit $ac_status); } &&
5104         { ac_try='test -s conftest.$ac_objext'
5105  { (eval echo "$as_me:5105: \"$ac_try\"") >&5
5106  (eval $ac_try) 2>&5
5107  ac_status=$?
5108  echo "$as_me:5108: \$? = $ac_status" >&5
5109  (exit $ac_status); }; }; then
5110  cf_cv_have_utmp_ut_xtime=yes
5111else
5112  echo "$as_me: failed program was:" >&5
5113cat conftest.$ac_ext >&5
5114cat >conftest.$ac_ext <<_ACEOF
5115#line 5115 "configure"
5116#include "confdefs.h"
5117
5118#include <sys/types.h>
5119#include <${cf_cv_have_utmp}.h>
5120int
5121main ()
5122{
5123struct $cf_cv_have_utmp x; long y = x.ut_tv.tv_sec
5124  ;
5125  return 0;
5126}
5127_ACEOF
5128rm -f conftest.$ac_objext
5129if { (eval echo "$as_me:5129: \"$ac_compile\"") >&5
5130  (eval $ac_compile) 2>&5
5131  ac_status=$?
5132  echo "$as_me:5132: \$? = $ac_status" >&5
5133  (exit $ac_status); } &&
5134         { ac_try='test -s conftest.$ac_objext'
5135  { (eval echo "$as_me:5135: \"$ac_try\"") >&5
5136  (eval $ac_try) 2>&5
5137  ac_status=$?
5138  echo "$as_me:5138: \$? = $ac_status" >&5
5139  (exit $ac_status); }; }; then
5140  cf_cv_have_utmp_ut_xtime=define
5141else
5142  echo "$as_me: failed program was:" >&5
5143cat conftest.$ac_ext >&5
5144cf_cv_have_utmp_ut_xtime=no
5145fi
5146rm -f conftest.$ac_objext conftest.$ac_ext
5147
5148fi
5149rm -f conftest.$ac_objext conftest.$ac_ext
5150
5151fi
5152echo "$as_me:5152: result: $cf_cv_have_utmp_ut_xtime" >&5
5153echo "${ECHO_T}$cf_cv_have_utmp_ut_xtime" >&6
5154if test $cf_cv_have_utmp_ut_xtime != no ; then
5155
5156cat >>confdefs.h <<\EOF
5157#define HAVE_UTMP_UT_XTIME 1
5158EOF
5159
5160	if test $cf_cv_have_utmp_ut_xtime = define ; then
5161
5162cat >>confdefs.h <<\EOF
5163#define ut_xtime ut_tv.tv_sec
5164EOF
5165
5166	fi
5167fi
5168fi
5169
5170if test $cf_cv_have_utmp != no ; then
5171echo "$as_me:5171: checking if ${cf_cv_have_utmp}.ut_session is declared" >&5
5172echo $ECHO_N "checking if ${cf_cv_have_utmp}.ut_session is declared... $ECHO_C" >&6
5173if test "${cf_cv_have_utmp_ut_session+set}" = set; then
5174  echo $ECHO_N "(cached) $ECHO_C" >&6
5175else
5176
5177	cat >conftest.$ac_ext <<_ACEOF
5178#line 5178 "configure"
5179#include "confdefs.h"
5180
5181#include <sys/types.h>
5182#include <${cf_cv_have_utmp}.h>
5183int
5184main ()
5185{
5186struct $cf_cv_have_utmp x; long y = x.ut_session
5187  ;
5188  return 0;
5189}
5190_ACEOF
5191rm -f conftest.$ac_objext
5192if { (eval echo "$as_me:5192: \"$ac_compile\"") >&5
5193  (eval $ac_compile) 2>&5
5194  ac_status=$?
5195  echo "$as_me:5195: \$? = $ac_status" >&5
5196  (exit $ac_status); } &&
5197         { ac_try='test -s conftest.$ac_objext'
5198  { (eval echo "$as_me:5198: \"$ac_try\"") >&5
5199  (eval $ac_try) 2>&5
5200  ac_status=$?
5201  echo "$as_me:5201: \$? = $ac_status" >&5
5202  (exit $ac_status); }; }; then
5203  cf_cv_have_utmp_ut_session=yes
5204else
5205  echo "$as_me: failed program was:" >&5
5206cat conftest.$ac_ext >&5
5207cf_cv_have_utmp_ut_session=no
5208fi
5209rm -f conftest.$ac_objext conftest.$ac_ext
5210
5211fi
5212echo "$as_me:5212: result: $cf_cv_have_utmp_ut_session" >&5
5213echo "${ECHO_T}$cf_cv_have_utmp_ut_session" >&6
5214if test $cf_cv_have_utmp_ut_session != no ; then
5215
5216cat >>confdefs.h <<\EOF
5217#define HAVE_UTMP_UT_SESSION 1
5218EOF
5219
5220fi
5221fi
5222
5223echo "$as_me:5223: checking if $cf_cv_have_utmp is SYSV flavor" >&5
5224echo $ECHO_N "checking if $cf_cv_have_utmp is SYSV flavor... $ECHO_C" >&6
5225if test "${cf_cv_sysv_utmp+set}" = set; then
5226  echo $ECHO_N "(cached) $ECHO_C" >&6
5227else
5228
5229test "$cf_cv_have_utmp" = "utmp" && cf_prefix="ut" || cf_prefix="utx"
5230cat >conftest.$ac_ext <<_ACEOF
5231#line 5231 "configure"
5232#include "confdefs.h"
5233
5234#include <sys/types.h>
5235#include <${cf_cv_have_utmp}.h>
5236int
5237main ()
5238{
5239
5240struct $cf_cv_have_utmp x;
5241	set${cf_prefix}ent ();
5242	get${cf_prefix}id(&x);
5243	put${cf_prefix}line(&x);
5244	end${cf_prefix}ent();
5245  ;
5246  return 0;
5247}
5248_ACEOF
5249rm -f conftest.$ac_objext conftest$ac_exeext
5250if { (eval echo "$as_me:5250: \"$ac_link\"") >&5
5251  (eval $ac_link) 2>&5
5252  ac_status=$?
5253  echo "$as_me:5253: \$? = $ac_status" >&5
5254  (exit $ac_status); } &&
5255         { ac_try='test -s conftest$ac_exeext'
5256  { (eval echo "$as_me:5256: \"$ac_try\"") >&5
5257  (eval $ac_try) 2>&5
5258  ac_status=$?
5259  echo "$as_me:5259: \$? = $ac_status" >&5
5260  (exit $ac_status); }; }; then
5261  cf_cv_sysv_utmp=yes
5262else
5263  echo "$as_me: failed program was:" >&5
5264cat conftest.$ac_ext >&5
5265cf_cv_sysv_utmp=no
5266fi
5267rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5268
5269fi
5270echo "$as_me:5270: result: $cf_cv_sysv_utmp" >&5
5271echo "${ECHO_T}$cf_cv_sysv_utmp" >&6
5272test $cf_cv_sysv_utmp = yes &&
5273cat >>confdefs.h <<\EOF
5274#define USE_SYSV_UTMP 1
5275EOF
5276
5277fi
5278
5279for ac_header in lastlog.h
5280do
5281as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5282echo "$as_me:5282: checking for $ac_header" >&5
5283echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5284if eval "test \"\${$as_ac_Header+set}\" = set"; then
5285  echo $ECHO_N "(cached) $ECHO_C" >&6
5286else
5287  cat >conftest.$ac_ext <<_ACEOF
5288#line 5288 "configure"
5289#include "confdefs.h"
5290#include <$ac_header>
5291_ACEOF
5292if { (eval echo "$as_me:5292: \"$ac_cpp conftest.$ac_ext\"") >&5
5293  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5294  ac_status=$?
5295  egrep -v '^ *\+' conftest.er1 >conftest.err
5296  rm -f conftest.er1
5297  cat conftest.err >&5
5298  echo "$as_me:5298: \$? = $ac_status" >&5
5299  (exit $ac_status); } >/dev/null; then
5300  if test -s conftest.err; then
5301    ac_cpp_err=$ac_c_preproc_warn_flag
5302  else
5303    ac_cpp_err=
5304  fi
5305else
5306  ac_cpp_err=yes
5307fi
5308if test -z "$ac_cpp_err"; then
5309  eval "$as_ac_Header=yes"
5310else
5311  echo "$as_me: failed program was:" >&5
5312  cat conftest.$ac_ext >&5
5313  eval "$as_ac_Header=no"
5314fi
5315rm -f conftest.err conftest.$ac_ext
5316fi
5317echo "$as_me:5317: result: `eval echo '${'$as_ac_Header'}'`" >&5
5318echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5319if test `eval echo '${'$as_ac_Header'}'` = yes; then
5320  cat >>confdefs.h <<EOF
5321#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5322EOF
5323
5324fi
5325done
5326
5327echo "$as_me:5327: checking for struct lastlog" >&5
5328echo $ECHO_N "checking for struct lastlog... $ECHO_C" >&6
5329if test "${cf_cv_struct_lastlog+set}" = set; then
5330  echo $ECHO_N "(cached) $ECHO_C" >&6
5331else
5332
5333if test "$cross_compiling" = yes; then
5334
5335cf_cv_struct_lastlog=unknown
5336else
5337  cat >conftest.$ac_ext <<_ACEOF
5338#line 5338 "configure"
5339#include "confdefs.h"
5340
5341#include <sys/types.h>
5342#include <time.h>
5343#include <lastlog.h>
5344
5345int main()
5346{
5347	struct lastlog data;
5348	return (sizeof(data.ll_time) != sizeof(time_t));
5349}
5350_ACEOF
5351rm -f conftest$ac_exeext
5352if { (eval echo "$as_me:5352: \"$ac_link\"") >&5
5353  (eval $ac_link) 2>&5
5354  ac_status=$?
5355  echo "$as_me:5355: \$? = $ac_status" >&5
5356  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5357  { (eval echo "$as_me:5357: \"$ac_try\"") >&5
5358  (eval $ac_try) 2>&5
5359  ac_status=$?
5360  echo "$as_me:5360: \$? = $ac_status" >&5
5361  (exit $ac_status); }; }; then
5362
5363cf_cv_struct_lastlog=yes
5364else
5365  echo "$as_me: program exited with status $ac_status" >&5
5366echo "$as_me: failed program was:" >&5
5367cat conftest.$ac_ext >&5
5368
5369cf_cv_struct_lastlog=no
5370fi
5371rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5372fi
5373fi
5374echo "$as_me:5374: result: $cf_cv_struct_lastlog" >&5
5375echo "${ECHO_T}$cf_cv_struct_lastlog" >&6
5376
5377test $cf_cv_struct_lastlog != no &&
5378cat >>confdefs.h <<\EOF
5379#define USE_STRUCT_LASTLOG 1
5380EOF
5381
5382for ac_header in \
5383sys/param.h \
5384
5385do
5386as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5387echo "$as_me:5387: checking for $ac_header" >&5
5388echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5389if eval "test \"\${$as_ac_Header+set}\" = set"; then
5390  echo $ECHO_N "(cached) $ECHO_C" >&6
5391else
5392  cat >conftest.$ac_ext <<_ACEOF
5393#line 5393 "configure"
5394#include "confdefs.h"
5395#include <$ac_header>
5396_ACEOF
5397if { (eval echo "$as_me:5397: \"$ac_cpp conftest.$ac_ext\"") >&5
5398  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5399  ac_status=$?
5400  egrep -v '^ *\+' conftest.er1 >conftest.err
5401  rm -f conftest.er1
5402  cat conftest.err >&5
5403  echo "$as_me:5403: \$? = $ac_status" >&5
5404  (exit $ac_status); } >/dev/null; then
5405  if test -s conftest.err; then
5406    ac_cpp_err=$ac_c_preproc_warn_flag
5407  else
5408    ac_cpp_err=
5409  fi
5410else
5411  ac_cpp_err=yes
5412fi
5413if test -z "$ac_cpp_err"; then
5414  eval "$as_ac_Header=yes"
5415else
5416  echo "$as_me: failed program was:" >&5
5417  cat conftest.$ac_ext >&5
5418  eval "$as_ac_Header=no"
5419fi
5420rm -f conftest.err conftest.$ac_ext
5421fi
5422echo "$as_me:5422: result: `eval echo '${'$as_ac_Header'}'`" >&5
5423echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5424if test `eval echo '${'$as_ac_Header'}'` = yes; then
5425  cat >>confdefs.h <<EOF
5426#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5427EOF
5428
5429fi
5430done
5431
5432echo "$as_me:5432: checking if POSIX saved-ids are supported" >&5
5433echo $ECHO_N "checking if POSIX saved-ids are supported... $ECHO_C" >&6
5434if test "${cf_cv_posix_saved_ids+set}" = set; then
5435  echo $ECHO_N "(cached) $ECHO_C" >&6
5436else
5437
5438cat >conftest.$ac_ext <<_ACEOF
5439#line 5439 "configure"
5440#include "confdefs.h"
5441
5442#include <unistd.h>
5443#ifdef HAVE_SYS_PARAM_H
5444#include <sys/param.h>		/* this may define "BSD" */
5445#endif
5446
5447int
5448main ()
5449{
5450
5451#if defined(_POSIX_SAVED_IDS) && (_POSIX_SAVED_IDS > 0)
5452	void *p = (void *) seteuid;
5453	int x = seteuid(geteuid());
5454#elif defined(BSD) && (BSD >= 199103)
5455/* The BSD's may implement the runtime check - and it fails.
5456 * However, saved-ids work almost like POSIX (close enough for most uses).
5457 */
5458#else
5459make an error
5460#endif
5461
5462  ;
5463  return 0;
5464}
5465_ACEOF
5466rm -f conftest.$ac_objext conftest$ac_exeext
5467if { (eval echo "$as_me:5467: \"$ac_link\"") >&5
5468  (eval $ac_link) 2>&5
5469  ac_status=$?
5470  echo "$as_me:5470: \$? = $ac_status" >&5
5471  (exit $ac_status); } &&
5472         { ac_try='test -s conftest$ac_exeext'
5473  { (eval echo "$as_me:5473: \"$ac_try\"") >&5
5474  (eval $ac_try) 2>&5
5475  ac_status=$?
5476  echo "$as_me:5476: \$? = $ac_status" >&5
5477  (exit $ac_status); }; }; then
5478  cf_cv_posix_saved_ids=yes
5479
5480else
5481  echo "$as_me: failed program was:" >&5
5482cat conftest.$ac_ext >&5
5483
5484if test "$cross_compiling" = yes; then
5485  cf_cv_posix_saved_ids=unknown
5486else
5487  cat >conftest.$ac_ext <<_ACEOF
5488#line 5488 "configure"
5489#include "confdefs.h"
5490
5491#ifdef HAVE_STDLIB_H
5492#include <stdlib.h>
5493#endif
5494#include <unistd.h>
5495int main()
5496{
5497	void *p = (void *) seteuid;
5498	long code = sysconf(_SC_SAVED_IDS);
5499	${cf_cv_main_return:-return}  ((code > 0) ? 0 : 1);
5500}
5501_ACEOF
5502rm -f conftest$ac_exeext
5503if { (eval echo "$as_me:5503: \"$ac_link\"") >&5
5504  (eval $ac_link) 2>&5
5505  ac_status=$?
5506  echo "$as_me:5506: \$? = $ac_status" >&5
5507  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5508  { (eval echo "$as_me:5508: \"$ac_try\"") >&5
5509  (eval $ac_try) 2>&5
5510  ac_status=$?
5511  echo "$as_me:5511: \$? = $ac_status" >&5
5512  (exit $ac_status); }; }; then
5513  cf_cv_posix_saved_ids=yes
5514else
5515  echo "$as_me: program exited with status $ac_status" >&5
5516echo "$as_me: failed program was:" >&5
5517cat conftest.$ac_ext >&5
5518cf_cv_posix_saved_ids=no
5519fi
5520rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5521fi
5522
5523fi
5524rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5525
5526fi
5527echo "$as_me:5527: result: $cf_cv_posix_saved_ids" >&5
5528echo "${ECHO_T}$cf_cv_posix_saved_ids" >&6
5529
5530test "$cf_cv_posix_saved_ids" = yes &&
5531cat >>confdefs.h <<\EOF
5532#define HAVE_POSIX_SAVED_IDS 1
5533EOF
5534
5535# compute a reasonable value for $TERM to give tgetent(), since we may be
5536# running in 'screen', which sets $TERMCAP to a specific entry that is not
5537# necessarily in /etc/termcap - unsetenv is not portable, so we cannot simply
5538# discard $TERMCAP.
5539cf_TERMVAR=vt100
5540if test -n "$TERMCAP"
5541then
5542	cf_TERMCAP=`echo "$TERMCAP" | tr '\n' ' ' | sed -e 's/^..|//' -e 's/|.*//'`
5543	case "$cf_TERMCAP" in #(vi
5544	screen*.*) #(vi
5545		;;
5546	*)
5547		cf_TERMVAR="$cf_TERMCAP"
5548		;;
5549	esac
5550fi
5551test -z "$cf_TERMVAR" && cf_TERMVAR=vt100
5552
5553echo "$as_me:5553: checking if we want full tgetent function" >&5
5554echo $ECHO_N "checking if we want full tgetent function... $ECHO_C" >&6
5555
5556# Check whether --enable-full-tgetent or --disable-full-tgetent was given.
5557if test "${enable_full_tgetent+set}" = set; then
5558  enableval="$enable_full_tgetent"
5559  test "$enableval" != no && enableval=yes
5560  if test "$enableval" != "yes" ; then
5561    cf_full_tgetent=no
5562  else
5563    cf_full_tgetent=yes
5564  fi
5565else
5566  enableval=yes
5567  cf_full_tgetent=yes
5568
5569fi;
5570echo "$as_me:5570: result: $cf_full_tgetent" >&5
5571echo "${ECHO_T}$cf_full_tgetent" >&6
5572
5573if test "$cf_full_tgetent" = yes ; then
5574	cf_test_message="full tgetent"
5575else
5576	cf_test_message="tgetent"
5577fi
5578
5579echo "$as_me:5579: checking for $cf_test_message function" >&5
5580echo $ECHO_N "checking for $cf_test_message function... $ECHO_C" >&6
5581if test "${cf_cv_lib_tgetent+set}" = set; then
5582  echo $ECHO_N "(cached) $ECHO_C" >&6
5583else
5584
5585cf_save_LIBS="$LIBS"
5586cf_cv_lib_tgetent=no
5587if test "$cf_full_tgetent" = yes ; then
5588	cf_TERMLIB="otermcap termcap termlib ncurses curses"
5589	cf_TERMTST="buffer[0] == 0"
5590else
5591	cf_TERMLIB="termlib ncurses curses"
5592	cf_TERMTST="0"
5593fi
5594for cf_termlib in '' $cf_TERMLIB ; do
5595	LIBS="$cf_save_LIBS"
5596	test -n "$cf_termlib" && LIBS="-l$cf_termlib $LIBS"
5597	if test "$cross_compiling" = yes; then
5598  echo "cross-compiling, cannot verify if a termcap/tgetent is present in $cf_termlib" 1>&5
5599else
5600  cat >conftest.$ac_ext <<_ACEOF
5601#line 5601 "configure"
5602#include "confdefs.h"
5603
5604/* terminfo implementations ignore the buffer argument, making it useless for
5605 * the xterm application, which uses this information to make a new TERMCAP
5606 * environment variable.
5607 */
5608int main()
5609{
5610	char buffer[1024];
5611	buffer[0] = 0;
5612	tgetent(buffer, "$cf_TERMVAR");
5613	${cf_cv_main_return:-return} ($cf_TERMTST); }
5614_ACEOF
5615rm -f conftest$ac_exeext
5616if { (eval echo "$as_me:5616: \"$ac_link\"") >&5
5617  (eval $ac_link) 2>&5
5618  ac_status=$?
5619  echo "$as_me:5619: \$? = $ac_status" >&5
5620  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5621  { (eval echo "$as_me:5621: \"$ac_try\"") >&5
5622  (eval $ac_try) 2>&5
5623  ac_status=$?
5624  echo "$as_me:5624: \$? = $ac_status" >&5
5625  (exit $ac_status); }; }; then
5626  echo "yes, there is a termcap/tgetent in $cf_termlib" 1>&5
5627	 if test -n "$cf_termlib" ; then
5628	 	cf_cv_lib_tgetent="-l$cf_termlib"
5629	 else
5630	 	cf_cv_lib_tgetent=yes
5631	 fi
5632	 break
5633else
5634  echo "$as_me: program exited with status $ac_status" >&5
5635echo "$as_me: failed program was:" >&5
5636cat conftest.$ac_ext >&5
5637echo "no, there is no termcap/tgetent in $cf_termlib" 1>&5
5638fi
5639rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5640fi
5641done
5642LIBS="$cf_save_LIBS"
5643
5644fi
5645echo "$as_me:5645: result: $cf_cv_lib_tgetent" >&5
5646echo "${ECHO_T}$cf_cv_lib_tgetent" >&6
5647
5648# If we found a working tgetent(), set LIBS and check for termcap.h.
5649# (LIBS cannot be set inside AC_CACHE_CHECK; the commands there should
5650# not have side effects other than setting the cache variable, because
5651# they are not executed when a cached value exists.)
5652if test "x$cf_cv_lib_tgetent" != xno ; then
5653	test "x$cf_cv_lib_tgetent" != xyes && LIBS="$cf_cv_lib_tgetent $LIBS"
5654
5655cat >>confdefs.h <<\EOF
5656#define USE_TERMCAP 1
5657EOF
5658
5659	if test "$cf_full_tgetent" = no ; then
5660		cat >conftest.$ac_ext <<_ACEOF
5661#line 5661 "configure"
5662#include "confdefs.h"
5663
5664#include <termcap.h>
5665int
5666main ()
5667{
5668
5669#ifdef NCURSES_VERSION
5670make an error
5671#endif
5672  ;
5673  return 0;
5674}
5675_ACEOF
5676rm -f conftest.$ac_objext
5677if { (eval echo "$as_me:5677: \"$ac_compile\"") >&5
5678  (eval $ac_compile) 2>&5
5679  ac_status=$?
5680  echo "$as_me:5680: \$? = $ac_status" >&5
5681  (exit $ac_status); } &&
5682         { ac_try='test -s conftest.$ac_objext'
5683  { (eval echo "$as_me:5683: \"$ac_try\"") >&5
5684  (eval $ac_try) 2>&5
5685  ac_status=$?
5686  echo "$as_me:5686: \$? = $ac_status" >&5
5687  (exit $ac_status); }; }; then
5688  cat >>confdefs.h <<\EOF
5689#define HAVE_TERMCAP_H 1
5690EOF
5691
5692else
5693  echo "$as_me: failed program was:" >&5
5694cat conftest.$ac_ext >&5
5695fi
5696rm -f conftest.$ac_objext conftest.$ac_ext
5697	else
5698
5699for ac_header in termcap.h
5700do
5701as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5702echo "$as_me:5702: checking for $ac_header" >&5
5703echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5704if eval "test \"\${$as_ac_Header+set}\" = set"; then
5705  echo $ECHO_N "(cached) $ECHO_C" >&6
5706else
5707  cat >conftest.$ac_ext <<_ACEOF
5708#line 5708 "configure"
5709#include "confdefs.h"
5710#include <$ac_header>
5711_ACEOF
5712if { (eval echo "$as_me:5712: \"$ac_cpp conftest.$ac_ext\"") >&5
5713  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5714  ac_status=$?
5715  egrep -v '^ *\+' conftest.er1 >conftest.err
5716  rm -f conftest.er1
5717  cat conftest.err >&5
5718  echo "$as_me:5718: \$? = $ac_status" >&5
5719  (exit $ac_status); } >/dev/null; then
5720  if test -s conftest.err; then
5721    ac_cpp_err=$ac_c_preproc_warn_flag
5722  else
5723    ac_cpp_err=
5724  fi
5725else
5726  ac_cpp_err=yes
5727fi
5728if test -z "$ac_cpp_err"; then
5729  eval "$as_ac_Header=yes"
5730else
5731  echo "$as_me: failed program was:" >&5
5732  cat conftest.$ac_ext >&5
5733  eval "$as_ac_Header=no"
5734fi
5735rm -f conftest.err conftest.$ac_ext
5736fi
5737echo "$as_me:5737: result: `eval echo '${'$as_ac_Header'}'`" >&5
5738echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5739if test `eval echo '${'$as_ac_Header'}'` = yes; then
5740  cat >>confdefs.h <<EOF
5741#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5742EOF
5743
5744fi
5745done
5746
5747	fi
5748else
5749        # If we didn't find a tgetent() that supports the buffer
5750        # argument, look again to see whether we can find even
5751        # a crippled one.  A crippled tgetent() is still useful to
5752        # validate values for the TERM environment variable given to
5753        # child processes.
5754	echo "$as_me:5754: checking for partial tgetent function" >&5
5755echo $ECHO_N "checking for partial tgetent function... $ECHO_C" >&6
5756if test "${cf_cv_lib_part_tgetent+set}" = set; then
5757  echo $ECHO_N "(cached) $ECHO_C" >&6
5758else
5759
5760	cf_cv_lib_part_tgetent=no
5761	for cf_termlib in $cf_TERMLIB ; do
5762		LIBS="$cf_save_LIBS -l$cf_termlib"
5763		cat >conftest.$ac_ext <<_ACEOF
5764#line 5764 "configure"
5765#include "confdefs.h"
5766
5767int
5768main ()
5769{
5770tgetent(0, "$cf_TERMVAR")
5771  ;
5772  return 0;
5773}
5774_ACEOF
5775rm -f conftest.$ac_objext conftest$ac_exeext
5776if { (eval echo "$as_me:5776: \"$ac_link\"") >&5
5777  (eval $ac_link) 2>&5
5778  ac_status=$?
5779  echo "$as_me:5779: \$? = $ac_status" >&5
5780  (exit $ac_status); } &&
5781         { ac_try='test -s conftest$ac_exeext'
5782  { (eval echo "$as_me:5782: \"$ac_try\"") >&5
5783  (eval $ac_try) 2>&5
5784  ac_status=$?
5785  echo "$as_me:5785: \$? = $ac_status" >&5
5786  (exit $ac_status); }; }; then
5787  echo "there is a terminfo/tgetent in $cf_termlib" 1>&5
5788			 cf_cv_lib_part_tgetent="-l$cf_termlib"
5789			 break
5790else
5791  echo "$as_me: failed program was:" >&5
5792cat conftest.$ac_ext >&5
5793fi
5794rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5795	done
5796	LIBS="$cf_save_LIBS"
5797
5798fi
5799echo "$as_me:5799: result: $cf_cv_lib_part_tgetent" >&5
5800echo "${ECHO_T}$cf_cv_lib_part_tgetent" >&6
5801
5802	if test "$cf_cv_lib_part_tgetent" != no ; then
5803		LIBS="$cf_cv_lib_part_tgetent $LIBS"
5804
5805for ac_header in termcap.h
5806do
5807as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5808echo "$as_me:5808: checking for $ac_header" >&5
5809echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5810if eval "test \"\${$as_ac_Header+set}\" = set"; then
5811  echo $ECHO_N "(cached) $ECHO_C" >&6
5812else
5813  cat >conftest.$ac_ext <<_ACEOF
5814#line 5814 "configure"
5815#include "confdefs.h"
5816#include <$ac_header>
5817_ACEOF
5818if { (eval echo "$as_me:5818: \"$ac_cpp conftest.$ac_ext\"") >&5
5819  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5820  ac_status=$?
5821  egrep -v '^ *\+' conftest.er1 >conftest.err
5822  rm -f conftest.er1
5823  cat conftest.err >&5
5824  echo "$as_me:5824: \$? = $ac_status" >&5
5825  (exit $ac_status); } >/dev/null; then
5826  if test -s conftest.err; then
5827    ac_cpp_err=$ac_c_preproc_warn_flag
5828  else
5829    ac_cpp_err=
5830  fi
5831else
5832  ac_cpp_err=yes
5833fi
5834if test -z "$ac_cpp_err"; then
5835  eval "$as_ac_Header=yes"
5836else
5837  echo "$as_me: failed program was:" >&5
5838  cat conftest.$ac_ext >&5
5839  eval "$as_ac_Header=no"
5840fi
5841rm -f conftest.err conftest.$ac_ext
5842fi
5843echo "$as_me:5843: result: `eval echo '${'$as_ac_Header'}'`" >&5
5844echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5845if test `eval echo '${'$as_ac_Header'}'` = yes; then
5846  cat >>confdefs.h <<EOF
5847#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5848EOF
5849
5850fi
5851done
5852
5853                # If this is linking against ncurses, we'll trigger the
5854                # ifdef in resize.c that turns the termcap stuff back off.
5855
5856cat >>confdefs.h <<\EOF
5857#define USE_TERMINFO 1
5858EOF
5859
5860	fi
5861fi
5862
5863echo "$as_me:5863: checking for X applications class" >&5
5864echo $ECHO_N "checking for X applications class... $ECHO_C" >&6
5865
5866# Check whether --with-app-class or --without-app-class was given.
5867if test "${with_app_class+set}" = set; then
5868  withval="$with_app_class"
5869  APP_CLASS=$withval
5870else
5871  APP_CLASS=XTerm
5872fi;
5873
5874case x$APP_CLASS in #(vi
5875*[/@,%]*) #(vi
5876	{ echo "$as_me:5876: WARNING: X applications class cannot contain punctuation" >&5
5877echo "$as_me: WARNING: X applications class cannot contain punctuation" >&2;}
5878	APP_CLASS=XTerm
5879	;;
5880x[A-Z]*) #(vi
5881	;;
5882*)
5883	{ echo "$as_me:5883: WARNING: X applications class must start with capital, ignoring $APP_CLASS" >&5
5884echo "$as_me: WARNING: X applications class must start with capital, ignoring $APP_CLASS" >&2;}
5885	APP_CLASS=XTerm
5886	;;
5887esac
5888
5889echo "$as_me:5889: result: $APP_CLASS" >&5
5890echo "${ECHO_T}$APP_CLASS" >&6
5891
5892echo "$as_me:5892: checking for directory to install resource files" >&5
5893echo $ECHO_N "checking for directory to install resource files... $ECHO_C" >&6
5894
5895# Check whether --with-app-defaults or --without-app-defaults was given.
5896if test "${with_app_defaults+set}" = set; then
5897  withval="$with_app_defaults"
5898  APPSDIR=$withval
5899else
5900  APPSDIR='${exec_prefix}/lib/X11/app-defaults'
5901fi;
5902
5903if test "x$APPSDIR" = xauto
5904then
5905	APPSDIR='${exec_prefix}/lib/X11/app-defaults'
5906	for cf_path in \
5907		/usr/share/X11/app-defaults \
5908		/usr/X11/share/X11/app-defaults \
5909		/usr/X11/lib/X11/app-defaults \
5910		/usr/lib/X11/app-defaults \
5911		/etc/X11/app-defaults \
5912		/usr/pkg/lib/X11/app-defaults \
5913		/usr/X11R7/lib/X11/app-defaults \
5914		/usr/X11R6/lib/X11/app-defaults \
5915		/usr/X11R5/lib/X11/app-defaults \
5916		/usr/X11R4/lib/X11/app-defaults \
5917		/usr/local/lib/X11/app-defaults \
5918		/usr/local/share/X11/app-defaults \
5919		/usr/lib64/X11/app-defaults
5920	do
5921		if test -d "$cf_path" ; then
5922			APPSDIR="$cf_path"
5923			break
5924		fi
5925	done
5926else
5927	cf_path=$APPSDIR
5928
5929if test "x$prefix" != xNONE; then
5930  cf_path_syntax="$prefix"
5931else
5932  cf_path_syntax="$ac_default_prefix"
5933fi
5934
5935case ".$cf_path" in #(vi
5936.\$\(*\)*|.\'*\'*) #(vi
5937  ;;
5938..|./*|.\\*) #(vi
5939  ;;
5940.[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
5941  ;;
5942.\${*prefix}*|.\${*dir}*) #(vi
5943  eval cf_path="$cf_path"
5944  case ".$cf_path" in #(vi
5945  .NONE/*)
5946    cf_path=`echo $cf_path | sed -e s%NONE%$cf_path_syntax%`
5947    ;;
5948  esac
5949  ;; #(vi
5950.no|.NONE/*)
5951  cf_path=`echo $cf_path | sed -e s%NONE%$cf_path_syntax%`
5952  ;;
5953*)
5954  { { echo "$as_me:5954: error: expected a pathname, not \"$cf_path\"" >&5
5955echo "$as_me: error: expected a pathname, not \"$cf_path\"" >&2;}
5956   { (exit 1); exit 1; }; }
5957  ;;
5958esac
5959
5960fi
5961
5962echo "$as_me:5962: result: $APPSDIR" >&5
5963echo "${ECHO_T}$APPSDIR" >&6
5964
5965no_appsdir=
5966if test "$APPSDIR" = no
5967then
5968	no_appsdir="#"
5969else
5970	EXTRA_INSTALL_DIRS="$EXTRA_INSTALL_DIRS \$(APPSDIR)"
5971fi
5972
5973echo "$as_me:5973: checking for the icon name" >&5
5974echo $ECHO_N "checking for the icon name... $ECHO_C" >&6
5975
5976# Check whether --with-icon-name or --without-icon-name was given.
5977if test "${with_icon_name+set}" = set; then
5978  withval="$with_icon_name"
5979  ICON_NAME="$withval"
5980else
5981  ICON_NAME=xterm-color
5982fi;
5983case "x$ICON_NAME" in
5984xyes|xno|x)
5985	ICON_NAME=xterm-color
5986	;;
5987esac
5988
5989echo "$as_me:5989: result: $ICON_NAME" >&5
5990echo "${ECHO_T}$ICON_NAME" >&6
5991
5992echo "$as_me:5992: checking for icon symlink to use" >&5
5993echo $ECHO_N "checking for icon symlink to use... $ECHO_C" >&6
5994
5995# Check whether --with-icon-symlink or --without-icon-symlink was given.
5996if test "${with_icon_symlink+set}" = set; then
5997  withval="$with_icon_symlink"
5998  ICON_SYMLINK="$withval"
5999else
6000  ICON_SYMLINK=NONE
6001fi;
6002case "x$ICON_SYMLINK" in
6003xyes)
6004	ICON_SYMLINK=xterm
6005	;;
6006xno|x)
6007	ICON_SYMLINK=NONE
6008	;;
6009esac
6010
6011echo "$as_me:6011: result: $ICON_SYMLINK" >&5
6012echo "${ECHO_T}$ICON_SYMLINK" >&6
6013
6014echo "$as_me:6014: checking for directory to install pixmaps" >&5
6015echo $ECHO_N "checking for directory to install pixmaps... $ECHO_C" >&6
6016
6017# Check whether --with-pixmapdir or --without-pixmapdir was given.
6018if test "${with_pixmapdir+set}" = set; then
6019  withval="$with_pixmapdir"
6020  PIXMAPDIR=$withval
6021else
6022  test -z "$PIXMAPDIR" && PIXMAPDIR='${datadir}/pixmaps'
6023fi;
6024
6025if test "x$PIXMAPDIR" = xauto
6026then
6027	PIXMAPDIR='${datadir}/pixmaps'
6028	for cf_path in \
6029		/usr/share/pixmaps \
6030		/usr/X11R6/share/pixmaps
6031	do
6032		if test -d "$cf_path" ; then
6033			PIXMAPDIR="$cf_path"
6034			break
6035		fi
6036	done
6037else
6038	cf_path=$PIXMAPDIR
6039
6040if test "x$prefix" != xNONE; then
6041  cf_path_syntax="$prefix"
6042else
6043  cf_path_syntax="$ac_default_prefix"
6044fi
6045
6046case ".$cf_path" in #(vi
6047.\$\(*\)*|.\'*\'*) #(vi
6048  ;;
6049..|./*|.\\*) #(vi
6050  ;;
6051.[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6052  ;;
6053.\${*prefix}*|.\${*dir}*) #(vi
6054  eval cf_path="$cf_path"
6055  case ".$cf_path" in #(vi
6056  .NONE/*)
6057    cf_path=`echo $cf_path | sed -e s%NONE%$cf_path_syntax%`
6058    ;;
6059  esac
6060  ;; #(vi
6061.no|.NONE/*)
6062  cf_path=`echo $cf_path | sed -e s%NONE%$cf_path_syntax%`
6063  ;;
6064*)
6065  { { echo "$as_me:6065: error: expected a pathname, not \"$cf_path\"" >&5
6066echo "$as_me: error: expected a pathname, not \"$cf_path\"" >&2;}
6067   { (exit 1); exit 1; }; }
6068  ;;
6069esac
6070
6071fi
6072echo "$as_me:6072: result: $PIXMAPDIR" >&5
6073echo "${ECHO_T}$PIXMAPDIR" >&6
6074
6075no_pixmapdir=
6076if test "$PIXMAPDIR" = no
6077then
6078	no_pixmapdir="#"
6079else
6080	EXTRA_INSTALL_DIRS="$EXTRA_INSTALL_DIRS \$(PIXMAPDIR)"
6081fi
6082
6083echo "$as_me:6083: checking for directory to install icons" >&5
6084echo $ECHO_N "checking for directory to install icons... $ECHO_C" >&6
6085
6086# Check whether --with-icondir or --without-icondir was given.
6087if test "${with_icondir+set}" = set; then
6088  withval="$with_icondir"
6089  ICONDIR=$withval
6090else
6091  test -z "$ICONDIR" && ICONDIR=no
6092fi;
6093
6094if test "x$ICONDIR" = xauto
6095then
6096	ICONDIR='${datadir}/icons'
6097	for cf_path in \
6098		/usr/share/icons \
6099		/usr/X11R6/share/icons
6100	do
6101		if test -d "$cf_path" ; then
6102			ICONDIR="$cf_path"
6103			break
6104		fi
6105	done
6106else
6107	cf_path=$ICONDIR
6108
6109if test "x$prefix" != xNONE; then
6110  cf_path_syntax="$prefix"
6111else
6112  cf_path_syntax="$ac_default_prefix"
6113fi
6114
6115case ".$cf_path" in #(vi
6116.\$\(*\)*|.\'*\'*) #(vi
6117  ;;
6118..|./*|.\\*) #(vi
6119  ;;
6120.[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6121  ;;
6122.\${*prefix}*|.\${*dir}*) #(vi
6123  eval cf_path="$cf_path"
6124  case ".$cf_path" in #(vi
6125  .NONE/*)
6126    cf_path=`echo $cf_path | sed -e s%NONE%$cf_path_syntax%`
6127    ;;
6128  esac
6129  ;; #(vi
6130.no|.NONE/*)
6131  cf_path=`echo $cf_path | sed -e s%NONE%$cf_path_syntax%`
6132  ;;
6133*)
6134  { { echo "$as_me:6134: error: expected a pathname, not \"$cf_path\"" >&5
6135echo "$as_me: error: expected a pathname, not \"$cf_path\"" >&2;}
6136   { (exit 1); exit 1; }; }
6137  ;;
6138esac
6139
6140fi
6141echo "$as_me:6141: result: $ICONDIR" >&5
6142echo "${ECHO_T}$ICONDIR" >&6
6143
6144no_icondir=
6145if test "$ICONDIR" = no
6146then
6147	no_icondir="#"
6148else
6149	EXTRA_INSTALL_DIRS="$EXTRA_INSTALL_DIRS \$(ICONDIR)"
6150fi
6151
6152echo "$as_me:6152: checking if icon theme should be used" >&5
6153echo $ECHO_N "checking if icon theme should be used... $ECHO_C" >&6
6154
6155# Check whether --with-icon-theme or --without-icon-theme was given.
6156if test "${with_icon_theme+set}" = set; then
6157  withval="$with_icon_theme"
6158  ICON_THEME=$withval
6159else
6160  ICON_THEME=no
6161fi;
6162
6163case "x$ICON_THEME" in #(vi
6164xno) #(vi
6165	;;
6166x|xyes)
6167	ICON_THEME=hicolor
6168	;;
6169esac
6170echo "$as_me:6170: result: $ICON_THEME" >&5
6171echo "${ECHO_T}$ICON_THEME" >&6
6172
6173if test "x$ICON_THEME" = xno
6174then
6175	if test "x$ICONDIR" != xno
6176	then
6177		test -n "$verbose" && echo "	ignoring icondir without theme" 1>&6
6178
6179echo "${as_me:-configure}:6179: testing ignoring icondir without theme ..." 1>&5
6180
6181		no_icondir="#"
6182	fi
6183else
6184	if test "x$ICONDIR" = xno
6185	then
6186		{ { echo "$as_me:6186: error: icondir must be set for icon theme" >&5
6187echo "$as_me: error: icondir must be set for icon theme" >&2;}
6188   { (exit 1); exit 1; }; }
6189	fi
6190fi
6191
6192: ${ICON_FORMAT:=".svg .png .xpm"}
6193
6194# ICON_NAME=
6195ICON_LIST=
6196
6197if test "x$ICON_THEME" != xno
6198then
6199	cf_icon_list="icons/$ICON_NAME icons/${ICON_NAME}_48x48"
6200else
6201	cf_icon_list="icons/${ICON_NAME}_48x48"
6202fi
6203
6204echo "$as_me:6204: checking for icon(s) to install" >&5
6205echo $ECHO_N "checking for icon(s) to install... $ECHO_C" >&6
6206for cf_name in $cf_icon_list
6207do
6208	test -n "$verbose" && echo "	using $ICON_FORMAT" 1>&6
6209
6210echo "${as_me:-configure}:6210: testing using $ICON_FORMAT ..." 1>&5
6211
6212	for cf_suffix in $ICON_FORMAT
6213	do
6214		cf_icon="${cf_name}${cf_suffix}"
6215		cf_left=`echo "$cf_icon" | sed -e 's/:.*//'`
6216		if test ! -f "${cf_left}"
6217		then
6218			if test "x$srcdir" != "x."
6219			then
6220				cf_icon="${srcdir}/${cf_left}"
6221				cf_left=`echo "$cf_icon" | sed -e 's/:.*//'`
6222				if test ! -f "${cf_left}"
6223				then
6224					continue
6225				fi
6226			else
6227				continue
6228			fi
6229		fi
6230		if test "x$ICON_THEME" != xno
6231		then
6232			cf_base=`basename $cf_left`
6233			cf_trim=`echo "$cf_base" | sed -e 's/_[0-9][0-9]x[0-9][0-9]\././'`
6234			case "x${cf_base}" in #(vi
6235			*:*) #(vi
6236				cf_next=$cf_base
6237				# user-defined mapping
6238				;;
6239			*.png) #(vi
6240				cf_size=`file "$cf_left"|sed -e 's/^[^:]*://' -e 's/^.*[^0-9]\([0-9][0-9]* x [0-9][0-9]*\)[^0-9].*$/\1/' -e 's/ //g'`
6241				if test -z "$cf_size"
6242				then
6243					{ echo "$as_me:6243: WARNING: cannot determine size of $cf_left" >&5
6244echo "$as_me: WARNING: cannot determine size of $cf_left" >&2;}
6245					continue
6246				fi
6247				cf_next="$cf_size/apps/$cf_trim"
6248				;;
6249			*.svg) #(vi
6250				cf_next="scalable/apps/$cf_trim"
6251				;;
6252			*.xpm)
6253				test -n "$verbose" && echo "	ignored XPM file in icon theme" 1>&6
6254
6255echo "${as_me:-configure}:6255: testing ignored XPM file in icon theme ..." 1>&5
6256
6257				continue
6258				;;
6259			*_[0-9][0-9]*x[0-9][0-9]*.*) #(vi
6260				cf_size=`echo "$cf_left"|sed -e 's/^.*_\([0-9][0-9]*x[0-9][0-9]*\)\..*$/\1/'`
6261				cf_left=`echo "$cf_left"|sed -e 's/^\(.*\)_\([0-9][0-9]*x[0-9][0-9]*\)\(\..*\)$/\1\3/'`
6262				cf_next="$cf_size/apps/$cf_base"
6263				;;
6264			esac
6265			test -n "$verbose" && echo "	adding $cf_next" 1>&6
6266
6267echo "${as_me:-configure}:6267: testing adding $cf_next ..." 1>&5
6268
6269			cf_icon="${cf_icon}:${cf_next}"
6270		fi
6271		test -n "$ICON_LIST" && ICON_LIST="$ICON_LIST "
6272		ICON_LIST="$ICON_LIST${cf_icon}"
6273		if test -z "$ICON_NAME"
6274		then
6275			ICON_NAME=`basename $cf_icon | sed -e 's/[.:].*//'`
6276		fi
6277	done
6278done
6279
6280if test -n "$verbose"
6281then
6282	echo "$as_me:6282: checking result" >&5
6283echo $ECHO_N "checking result... $ECHO_C" >&6
6284fi
6285echo "$as_me:6285: result: $ICON_LIST" >&5
6286echo "${ECHO_T}$ICON_LIST" >&6
6287
6288if test -z "$ICON_LIST"
6289then
6290	{ { echo "$as_me:6290: error: no icons found" >&5
6291echo "$as_me: error: no icons found" >&2;}
6292   { (exit 1); exit 1; }; }
6293fi
6294
6295echo "$as_me:6295: checking for icon name" >&5
6296echo $ECHO_N "checking for icon name... $ECHO_C" >&6
6297echo "$as_me:6297: result: $ICON_NAME" >&5
6298echo "${ECHO_T}$ICON_NAME" >&6
6299
6300# Comment-out the install-desktop rule if the desktop-utils are not found.
6301echo "$as_me:6301: checking if you want to install desktop files" >&5
6302echo $ECHO_N "checking if you want to install desktop files... $ECHO_C" >&6
6303
6304# Check whether --enable-desktop or --disable-desktop was given.
6305if test "${enable_desktop+set}" = set; then
6306  enableval="$enable_desktop"
6307  test "$enableval" != no && enableval=yes
6308  if test "$enableval" != "yes" ; then
6309    enable_desktop=$enableval
6310  else
6311    enable_desktop=$enableval
6312  fi
6313else
6314  enableval=yes
6315  enable_desktop=$enableval
6316
6317fi;
6318echo "$as_me:6318: result: $enable_desktop" >&5
6319echo "${ECHO_T}$enable_desktop" >&6
6320
6321desktop_utils=
6322if test "$enable_desktop" = yes ; then
6323# Extract the first word of "desktop-file-install", so it can be a program name with args.
6324set dummy desktop-file-install; ac_word=$2
6325echo "$as_me:6325: checking for $ac_word" >&5
6326echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6327if test "${ac_cv_prog_desktop_utils+set}" = set; then
6328  echo $ECHO_N "(cached) $ECHO_C" >&6
6329else
6330  if test -n "$desktop_utils"; then
6331  ac_cv_prog_desktop_utils="$desktop_utils" # Let the user override the test.
6332else
6333  ac_save_IFS=$IFS; IFS=$ac_path_separator
6334ac_dummy="$PATH"
6335for ac_dir in $ac_dummy; do
6336  IFS=$ac_save_IFS
6337  test -z "$ac_dir" && ac_dir=.
6338  $as_executable_p "$ac_dir/$ac_word" || continue
6339ac_cv_prog_desktop_utils="yes"
6340echo "$as_me:6340: found $ac_dir/$ac_word" >&5
6341break
6342done
6343
6344  test -z "$ac_cv_prog_desktop_utils" && ac_cv_prog_desktop_utils="no"
6345fi
6346fi
6347desktop_utils=$ac_cv_prog_desktop_utils
6348if test -n "$desktop_utils"; then
6349  echo "$as_me:6349: result: $desktop_utils" >&5
6350echo "${ECHO_T}$desktop_utils" >&6
6351else
6352  echo "$as_me:6352: result: no" >&5
6353echo "${ECHO_T}no" >&6
6354fi
6355
6356fi
6357
6358test "$desktop_utils" = yes && desktop_utils= || desktop_utils="#"
6359
6360if test -z "$desktop_utils"
6361then
6362	echo "$as_me:6362: checking for requested desktop-category" >&5
6363echo $ECHO_N "checking for requested desktop-category... $ECHO_C" >&6
6364
6365# Check whether --with-desktop-category or --without-desktop-category was given.
6366if test "${with_desktop_category+set}" = set; then
6367  withval="$with_desktop_category"
6368  cf_desktop_want=$withval
6369else
6370  cf_desktop_want=auto
6371fi;
6372	echo "$as_me:6372: result: $cf_desktop_want" >&5
6373echo "${ECHO_T}$cf_desktop_want" >&6
6374
6375	if test "$cf_desktop_want" = auto
6376	then
6377		rm -rf conftest*
6378		cf_desktop_also=
6379		for cf_desktop_dir in  \
6380			/usr/share/app-install \
6381			/usr/share/applications
6382		do
6383			if test -d $cf_desktop_dir
6384			then
6385				find $cf_desktop_dir -name '*.desktop' | \
6386				while true
6387				do
6388					read cf_desktop_path
6389					test -z "$cf_desktop_path" && break
6390					cf_desktop_name=`basename $cf_desktop_path .desktop`
6391					case $cf_desktop_name in #(vi
6392					xterm|*-xterm|*rxvt*|konsole|*-terminal)
6393						test -n "$verbose" && echo "	inspect $cf_desktop_path" 1>&6
6394
6395echo "${as_me:-configure}:6395: testing inspect $cf_desktop_path ..." 1>&5
6396
6397						egrep '^Categories=' $cf_desktop_path | \
6398							tr ';' '\n' | \
6399							sed -e 's%^.*=%%' -e '/^$/d' >>conftest.1
6400						;;
6401					esac
6402				done
6403			fi
6404		done
6405		if test -s conftest.1
6406		then
6407			cf_desktop_last=
6408			sort conftest.1 | \
6409			while true
6410			do
6411				read cf_desktop_this
6412				test -z "$cf_desktop_this" && break
6413				case $cf_desktop_this in #(vi
6414				Qt*|GTK*|KDE*|GNOME*|*XFCE*|*Xfce*) #(vi
6415					;;
6416				System|TerminalEmulator|Utility|*)
6417					test "x$cf_desktop_last" != "x$cf_desktop_this" && echo $cf_desktop_this >>conftest.2
6418					;;
6419				esac
6420				cf_desktop_last=$cf_desktop_this
6421			done
6422			cf_desktop_want=`cat conftest.2 | tr '\n' ';'`
6423		fi
6424		if test -n "$cf_desktop_want"
6425		then
6426			if test "$cf_desktop_want" = auto
6427			then
6428				cf_desktop_want=
6429			else
6430				# do a sanity check on the semicolon-separated list, ignore on failure
6431				cf_desktop_test=`echo "$cf_desktop_want" | sed -e 's/[^;]//g'`
6432				test -z "$cf_desktop_test" && cf_desktop_want=
6433				cf_desktop_test=`echo "$cf_desktop_want" | sed -e 's/^.*;$/./g'`
6434				test -z "$cf_desktop_test" && cf_desktop_want=
6435			fi
6436		fi
6437		if test -z "$cf_desktop_want"
6438		then
6439			cf_desktop_want="`echo "System|TerminalEmulator|Utility|*" | sed -e 's/\*//g' -e 's/|/;/g' -e 's/;*$/;/g'`"
6440			test -n "$verbose" && echo "	no usable value found for desktop category" 1>&6
6441
6442echo "${as_me:-configure}:6442: testing no usable value found for desktop category ..." 1>&5
6443
6444		fi
6445	fi
6446	DESKTOP_CATEGORY=`echo "$cf_desktop_want" | sed -e 's/[ ,]/;/g'`
6447	test -n "$verbose" && echo "	will use Categories=$DESKTOP_CATEGORY" 1>&6
6448
6449echo "${as_me:-configure}:6449: testing will use Categories=$DESKTOP_CATEGORY ..." 1>&5
6450
6451fi
6452
6453echo "$as_me:6453: checking for install-permissions reference" >&5
6454echo $ECHO_N "checking for install-permissions reference... $ECHO_C" >&6
6455
6456# Check whether --with-reference or --without-reference was given.
6457if test "${with_reference+set}" = set; then
6458  withval="$with_reference"
6459  with_reference=$withval
6460else
6461  with_reference=xterm
6462fi;
6463echo "$as_me:6463: result: $with_reference" >&5
6464echo "${ECHO_T}$with_reference" >&6
6465
6466with_full_paths=yes
6467
6468	echo "$as_me:6468: checking for PATH separator" >&5
6469echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
6470	case $cf_cv_system_name in
6471	os2*)	PATH_SEPARATOR=';'  ;;
6472	*)	${PATH_SEPARATOR:=':'}  ;;
6473	esac
6474
6475	echo "$as_me:6475: result: $PATH_SEPARATOR" >&5
6476echo "${ECHO_T}$PATH_SEPARATOR" >&6
6477
6478test -z "$XTERM_PATH" && XTERM_PATH=$with_reference
6479for ac_prog in $XTERM_PATH $with_reference
6480do
6481  # Extract the first word of "$ac_prog", so it can be a program name with args.
6482set dummy $ac_prog; ac_word=$2
6483echo "$as_me:6483: checking for $ac_word" >&5
6484echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6485if test "${ac_cv_path_XTERM_PATH+set}" = set; then
6486  echo $ECHO_N "(cached) $ECHO_C" >&6
6487else
6488  case $XTERM_PATH in
6489  [\\/]* | ?:[\\/]*)
6490  ac_cv_path_XTERM_PATH="$XTERM_PATH" # Let the user override the test with a path.
6491  ;;
6492  *)
6493  ac_save_IFS=$IFS; IFS=$ac_path_separator
6494ac_dummy="$PATH"
6495for ac_dir in $ac_dummy; do
6496  IFS=$ac_save_IFS
6497  test -z "$ac_dir" && ac_dir=.
6498  if $as_executable_p "$ac_dir/$ac_word"; then
6499   ac_cv_path_XTERM_PATH="$ac_dir/$ac_word"
6500   echo "$as_me:6500: found $ac_dir/$ac_word" >&5
6501   break
6502fi
6503done
6504
6505  ;;
6506esac
6507fi
6508XTERM_PATH=$ac_cv_path_XTERM_PATH
6509
6510if test -n "$XTERM_PATH"; then
6511  echo "$as_me:6511: result: $XTERM_PATH" >&5
6512echo "${ECHO_T}$XTERM_PATH" >&6
6513else
6514  echo "$as_me:6514: result: no" >&5
6515echo "${ECHO_T}no" >&6
6516fi
6517
6518  test -n "$XTERM_PATH" && break
6519done
6520test -n "$XTERM_PATH" || XTERM_PATH="$XTERM_PATH"
6521
6522cf_path_prog=""
6523cf_path_args=""
6524IFS="${IFS:- 	}"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
6525for cf_temp in $ac_cv_path_XTERM_PATH
6526do
6527	if test -z "$cf_path_prog" ; then
6528		if test "$with_full_paths" = yes ; then
6529
6530if test "x$prefix" != xNONE; then
6531  cf_path_syntax="$prefix"
6532else
6533  cf_path_syntax="$ac_default_prefix"
6534fi
6535
6536case ".$cf_temp" in #(vi
6537.\$\(*\)*|.\'*\'*) #(vi
6538  ;;
6539..|./*|.\\*) #(vi
6540  ;;
6541.[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6542  ;;
6543.\${*prefix}*|.\${*dir}*) #(vi
6544  eval cf_temp="$cf_temp"
6545  case ".$cf_temp" in #(vi
6546  .NONE/*)
6547    cf_temp=`echo $cf_temp | sed -e s%NONE%$cf_path_syntax%`
6548    ;;
6549  esac
6550  ;; #(vi
6551.no|.NONE/*)
6552  cf_temp=`echo $cf_temp | sed -e s%NONE%$cf_path_syntax%`
6553  ;;
6554*)
6555  break
6556  ;;
6557esac
6558
6559			cf_path_prog="$cf_temp"
6560		else
6561			cf_path_prog="`basename $cf_temp`"
6562		fi
6563	elif test -z "$cf_path_args" ; then
6564		cf_path_args="$cf_temp"
6565	else
6566		cf_path_args="$cf_path_args $cf_temp"
6567	fi
6568done
6569IFS="$cf_save_ifs"
6570
6571if test -n "$cf_path_prog" ; then
6572
6573echo "${as_me:-configure}:6573: testing defining path for ${cf_path_prog} ..." 1>&5
6574
6575cat >>confdefs.h <<EOF
6576#define XTERM_PATH_PATH "$cf_path_prog"
6577EOF
6578
6579	test -n "$cf_path_args" &&
6580cat >>confdefs.h <<EOF
6581#define XTERM_PATH_ARGS "$cf_path_args"
6582EOF
6583
6584fi
6585
6586# If any of --program-prefix, --program-suffix or --program-transform-name is
6587# given, accept an option tell the makefile to create a symbolic link, e.g.,
6588# to "xterm" on install.
6589XTERM_SYMLINK=NONE
6590
6591if test "$program_transform_name" != "'s,,,'" ; then
6592cf_name=`echo "$program_transform_name" | sed -e 's,\\$\\$,$,g'`
6593cf_name=`echo xterm |sed -e "$cf_name"`
6594echo "$as_me:6594: checking for symbolic link to create to $cf_name" >&5
6595echo $ECHO_N "checking for symbolic link to create to $cf_name... $ECHO_C" >&6
6596
6597# Check whether --with-xterm-symlink or --without-xterm-symlink was given.
6598if test "${with_xterm_symlink+set}" = set; then
6599  withval="$with_xterm_symlink"
6600  with_symlink=$withval
6601else
6602  with_symlink=xterm
6603fi;
6604echo "$as_me:6604: result: $with_symlink" >&5
6605echo "${ECHO_T}$with_symlink" >&6
6606test "$with_symlink" = yes && with_symlink=xterm
6607test -n "$with_symlink" && \
6608	test "$with_symlink" != no && \
6609	test "$with_symlink" != $cf_name && \
6610	XTERM_SYMLINK="$with_symlink"
6611fi
6612
6613echo "$as_me:6613: checking if you want to disable openpty" >&5
6614echo $ECHO_N "checking if you want to disable openpty... $ECHO_C" >&6
6615
6616# Check whether --enable-openpty or --disable-openpty was given.
6617if test "${enable_openpty+set}" = set; then
6618  enableval="$enable_openpty"
6619  test "$enableval" != no && enableval=yes
6620  if test "$enableval" != "yes" ; then
6621    disable_openpty=yes
6622  else
6623    disable_openpty=no
6624  fi
6625else
6626  enableval=yes
6627  disable_openpty=no
6628
6629fi;
6630echo "$as_me:6630: result: $disable_openpty" >&5
6631echo "${ECHO_T}$disable_openpty" >&6
6632
6633echo "$as_me:6633: checking if you want to disable setuid" >&5
6634echo $ECHO_N "checking if you want to disable setuid... $ECHO_C" >&6
6635
6636# Check whether --enable-setuid or --disable-setuid was given.
6637if test "${enable_setuid+set}" = set; then
6638  enableval="$enable_setuid"
6639  test "$enableval" != no && enableval=yes
6640  if test "$enableval" != "yes" ; then
6641    disable_setuid=yes
6642  else
6643    disable_setuid=no
6644  fi
6645else
6646  enableval=yes
6647  disable_setuid=no
6648
6649fi;
6650echo "$as_me:6650: result: $disable_setuid" >&5
6651echo "${ECHO_T}$disable_setuid" >&6
6652
6653echo "$as_me:6653: checking if you want to disable setgid" >&5
6654echo $ECHO_N "checking if you want to disable setgid... $ECHO_C" >&6
6655
6656# Check whether --enable-setgid or --disable-setgid was given.
6657if test "${enable_setgid+set}" = set; then
6658  enableval="$enable_setgid"
6659  test "$enableval" != no && enableval=yes
6660  if test "$enableval" != "yes" ; then
6661    disable_setgid=yes
6662  else
6663    disable_setgid=no
6664  fi
6665else
6666  enableval=yes
6667  disable_setgid=no
6668
6669fi;
6670echo "$as_me:6670: result: $disable_setgid" >&5
6671echo "${ECHO_T}$disable_setgid" >&6
6672
6673echo "$as_me:6673: checking if you want to run xterm setuid to a given user" >&5
6674echo $ECHO_N "checking if you want to run xterm setuid to a given user... $ECHO_C" >&6
6675
6676# Check whether --with-setuid or --without-setuid was given.
6677if test "${with_setuid+set}" = set; then
6678  withval="$with_setuid"
6679  use_given_setuid=$withval
6680else
6681  use_given_setuid=no
6682fi;
6683echo "$as_me:6683: result: $use_given_setuid" >&5
6684echo "${ECHO_T}$use_given_setuid" >&6
6685
6686if test "$use_given_setuid" != no ; then
6687	if test "$use_given_setuid" = yes ; then
6688		cf_cv_given_setuid=root
6689	else
6690		cf_cv_given_setuid=$use_given_setuid
6691	fi
6692	# inherit SINSTALL_OPTS from environment to allow packager to customize it.
6693	SINSTALL_OPTS="$SINSTALL_OPTS u+s -u $cf_cv_given_setuid"
6694fi
6695
6696echo "$as_me:6696: checking if you want to run xterm setgid to match utmp/utmpx file" >&5
6697echo $ECHO_N "checking if you want to run xterm setgid to match utmp/utmpx file... $ECHO_C" >&6
6698
6699# Check whether --with-utmp-setgid or --without-utmp-setgid was given.
6700if test "${with_utmp_setgid+set}" = set; then
6701  withval="$with_utmp_setgid"
6702  use_utmp_setgid=$withval
6703else
6704  use_utmp_setgid=no
6705fi;
6706echo "$as_me:6706: result: $use_utmp_setgid" >&5
6707echo "${ECHO_T}$use_utmp_setgid" >&6
6708
6709if test "$use_utmp_setgid" != no ; then
6710	if test "$use_utmp_setgid" = yes ; then
6711
6712if test $cf_cv_have_utmp != no ; then
6713echo "$as_me:6713: checking for utmp/utmpx group" >&5
6714echo $ECHO_N "checking for utmp/utmpx group... $ECHO_C" >&6
6715if test "${cf_cv_utmp_group+set}" = set; then
6716  echo $ECHO_N "(cached) $ECHO_C" >&6
6717else
6718
6719for cf_utmp_path in /var/adm /var/run
6720do
6721	for cf_utmp_file in utmpx utmp
6722	do
6723		if test -f $cf_utmp_path/$cf_utmp_file
6724		then
6725			cf_cv_utmp_group=root
6726
6727			cf_option="-l -L"
6728
6729			# Expect listing to have fields like this:
6730			#-r--r--r--   1 user      group       34293 Jul 18 16:29 pathname
6731			ls $cf_option $cf_utmp_path/$cf_utmp_file >conftest
6732			read cf_mode cf_links cf_usr cf_grp cf_size cf_date1 cf_date2 cf_date3 cf_rest <conftest
6733			if test -z "$cf_rest" ; then
6734				cf_option="$cf_option -g"
6735				ls $cf_option $cf_utmp_path/$cf_utmp_file >conftest
6736				read cf_mode cf_links cf_usr cf_grp cf_size cf_date1 cf_date2 cf_date3 cf_rest <conftest
6737			fi
6738			rm -f conftest
6739
6740			# If we have a pathname, and the date fields look right, assume we've
6741			# captured the group as well.
6742			if test -n "$cf_rest" ; then
6743				cf_test=`echo "${cf_date2}${cf_date3}" | sed -e 's/[0-9:]//g'`
6744				if test -z "$cf_test" ; then
6745					cf_cv_utmp_group=$cf_grp;
6746				fi
6747			fi
6748			break
6749		fi
6750	done
6751	test -n "$cf_cv_utmp_group" && break
6752done
6753
6754fi
6755echo "$as_me:6755: result: $cf_cv_utmp_group" >&5
6756echo "${ECHO_T}$cf_cv_utmp_group" >&6
6757else
6758	{ { echo "$as_me:6758: error: cannot find utmp group" >&5
6759echo "$as_me: error: cannot find utmp group" >&2;}
6760   { (exit 1); exit 1; }; }
6761fi
6762
6763	else
6764		cf_cv_utmp_group=$use_utmp_setgid
6765	fi
6766	if test "$cf_cv_posix_saved_ids" != yes ; then
6767		{ { echo "$as_me:6767: error: Your system does not support POSIX saved-ids" >&5
6768echo "$as_me: error: Your system does not support POSIX saved-ids" >&2;}
6769   { (exit 1); exit 1; }; }
6770	fi
6771
6772cat >>confdefs.h <<\EOF
6773#define USE_UTMP_SETGID 1
6774EOF
6775
6776	SINSTALL_OPTS="$SINSTALL_OPTS g+s -g $cf_cv_utmp_group"
6777fi
6778
6779echo "$as_me:6779: checking if you want to link with utempter" >&5
6780echo $ECHO_N "checking if you want to link with utempter... $ECHO_C" >&6
6781
6782# Check whether --with-utempter or --without-utempter was given.
6783if test "${with_utempter+set}" = set; then
6784  withval="$with_utempter"
6785  use_utempter=$withval
6786else
6787  use_utempter=no
6788fi;
6789echo "$as_me:6789: result: $use_utempter" >&5
6790echo "${ECHO_T}$use_utempter" >&6
6791
6792if test "$use_utempter" = yes ; then
6793
6794echo "$as_me:6794: checking if we can link with utempter library" >&5
6795echo $ECHO_N "checking if we can link with utempter library... $ECHO_C" >&6
6796if test "${cf_cv_have_utempter+set}" = set; then
6797  echo $ECHO_N "(cached) $ECHO_C" >&6
6798else
6799
6800cf_save_LIBS="$LIBS"
6801LIBS="-lutempter $LIBS"
6802cat >conftest.$ac_ext <<_ACEOF
6803#line 6803 "configure"
6804#include "confdefs.h"
6805
6806#include <utempter.h>
6807
6808int
6809main ()
6810{
6811
6812	addToUtmp("/dev/tty", 0, 1);
6813	removeFromUtmp();
6814
6815  ;
6816  return 0;
6817}
6818_ACEOF
6819rm -f conftest.$ac_objext conftest$ac_exeext
6820if { (eval echo "$as_me:6820: \"$ac_link\"") >&5
6821  (eval $ac_link) 2>&5
6822  ac_status=$?
6823  echo "$as_me:6823: \$? = $ac_status" >&5
6824  (exit $ac_status); } &&
6825         { ac_try='test -s conftest$ac_exeext'
6826  { (eval echo "$as_me:6826: \"$ac_try\"") >&5
6827  (eval $ac_try) 2>&5
6828  ac_status=$?
6829  echo "$as_me:6829: \$? = $ac_status" >&5
6830  (exit $ac_status); }; }; then
6831
6832	cf_cv_have_utempter=yes
6833else
6834  echo "$as_me: failed program was:" >&5
6835cat conftest.$ac_ext >&5
6836
6837	cf_cv_have_utempter=no
6838fi
6839rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6840LIBS="$cf_save_LIBS"
6841
6842fi
6843echo "$as_me:6843: result: $cf_cv_have_utempter" >&5
6844echo "${ECHO_T}$cf_cv_have_utempter" >&6
6845if test "$cf_cv_have_utempter" = yes ; then
6846
6847cat >>confdefs.h <<\EOF
6848#define USE_UTEMPTER 1
6849EOF
6850
6851	LIBS="-lutempter $LIBS"
6852fi
6853
6854	test "$cf_cv_have_utempter" != yes && use_utempter=no
6855else
6856	use_utempter=no
6857fi
6858
6859# Some configurations permit (or require) either setuid or setgid mode.
6860# Let the user decide.
6861if test "$use_utempter" = yes ; then
6862	if test "${enable_setuid+set}" != set ; then
6863		disable_setuid=yes
6864		test -n "$verbose" && echo "	No --disable-setuid option given, force to yes" 1>&6
6865
6866echo "${as_me:-configure}:6866: testing No --disable-setuid option given, force to yes ..." 1>&5
6867
6868	fi
6869fi
6870
6871###	checks for external data
6872
6873echo "$as_me:6873: checking if external errno is declared" >&5
6874echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
6875if test "${cf_cv_dcl_errno+set}" = set; then
6876  echo $ECHO_N "(cached) $ECHO_C" >&6
6877else
6878
6879    cat >conftest.$ac_ext <<_ACEOF
6880#line 6880 "configure"
6881#include "confdefs.h"
6882
6883#ifdef HAVE_STDLIB_H
6884#include <stdlib.h>
6885#endif
6886#include <stdio.h>
6887#include <sys/types.h>
6888#include <errno.h>
6889int
6890main ()
6891{
6892int x = (int) errno
6893  ;
6894  return 0;
6895}
6896_ACEOF
6897rm -f conftest.$ac_objext
6898if { (eval echo "$as_me:6898: \"$ac_compile\"") >&5
6899  (eval $ac_compile) 2>&5
6900  ac_status=$?
6901  echo "$as_me:6901: \$? = $ac_status" >&5
6902  (exit $ac_status); } &&
6903         { ac_try='test -s conftest.$ac_objext'
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_dcl_errno=yes
6910else
6911  echo "$as_me: failed program was:" >&5
6912cat conftest.$ac_ext >&5
6913cf_cv_dcl_errno=no
6914fi
6915rm -f conftest.$ac_objext conftest.$ac_ext
6916
6917fi
6918echo "$as_me:6918: result: $cf_cv_dcl_errno" >&5
6919echo "${ECHO_T}$cf_cv_dcl_errno" >&6
6920
6921if test "$cf_cv_dcl_errno" = no ; then
6922
6923cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
6924
6925    cat >>confdefs.h <<EOF
6926#define $cf_result 1
6927EOF
6928
6929fi
6930
6931# It's possible (for near-UNIX clones) that the data doesn't exist
6932
6933echo "$as_me:6933: checking if external errno exists" >&5
6934echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
6935if test "${cf_cv_have_errno+set}" = set; then
6936  echo $ECHO_N "(cached) $ECHO_C" >&6
6937else
6938
6939    cat >conftest.$ac_ext <<_ACEOF
6940#line 6940 "configure"
6941#include "confdefs.h"
6942
6943#undef errno
6944extern int errno;
6945
6946int
6947main ()
6948{
6949errno = 2
6950  ;
6951  return 0;
6952}
6953_ACEOF
6954rm -f conftest.$ac_objext conftest$ac_exeext
6955if { (eval echo "$as_me:6955: \"$ac_link\"") >&5
6956  (eval $ac_link) 2>&5
6957  ac_status=$?
6958  echo "$as_me:6958: \$? = $ac_status" >&5
6959  (exit $ac_status); } &&
6960         { ac_try='test -s conftest$ac_exeext'
6961  { (eval echo "$as_me:6961: \"$ac_try\"") >&5
6962  (eval $ac_try) 2>&5
6963  ac_status=$?
6964  echo "$as_me:6964: \$? = $ac_status" >&5
6965  (exit $ac_status); }; }; then
6966  cf_cv_have_errno=yes
6967else
6968  echo "$as_me: failed program was:" >&5
6969cat conftest.$ac_ext >&5
6970cf_cv_have_errno=no
6971fi
6972rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6973
6974fi
6975echo "$as_me:6975: result: $cf_cv_have_errno" >&5
6976echo "${ECHO_T}$cf_cv_have_errno" >&6
6977
6978if test "$cf_cv_have_errno" = yes ; then
6979
6980cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
6981
6982    cat >>confdefs.h <<EOF
6983#define $cf_result 1
6984EOF
6985
6986fi
6987
6988echo "$as_me:6988: checking for explicit tty group name" >&5
6989echo $ECHO_N "checking for explicit tty group name... $ECHO_C" >&6
6990
6991# Check whether --with-tty-group or --without-tty-group was given.
6992if test "${with_tty_group+set}" = set; then
6993  withval="$with_tty_group"
6994  cf_tty_group=$withval
6995else
6996  cf_tty_group=auto...
6997fi;
6998test -z "$cf_tty_group"    && cf_tty_group=auto...
6999test "$cf_tty_group" = yes && cf_tty_group=auto...
7000echo "$as_me:7000: result: $cf_tty_group" >&5
7001echo "${ECHO_T}$cf_tty_group" >&6
7002
7003if test "$cf_tty_group" = "auto..." ; then
7004echo "$as_me:7004: checking for tty group name" >&5
7005echo $ECHO_N "checking for tty group name... $ECHO_C" >&6
7006if test "${cf_cv_tty_group_name+set}" = set; then
7007  echo $ECHO_N "(cached) $ECHO_C" >&6
7008else
7009
7010# If we are configuring as root, it is hard to get a clue about the tty group.
7011# But we'll guess based on how our connection is set up - assuming it is done
7012# properly.
7013
7014cf_uid=`id | sed -e 's/^^=*=//' -e 's/(.*$//'`
7015# )vi
7016if test "$cf_uid" != 0 ; then
7017cf_cv_tty_group_name=
7018cf_tty_name=`tty`
7019test "$cf_tty_name" = "not a tty" && cf_tty_name=/dev/tty
7020test -z "$cf_tty_name" && cf_tty_name=/dev/tty
7021if test -c "$cf_tty_name"
7022then
7023	cf_option="-l -L"
7024
7025	# Expect listing to have fields like this:
7026	#-rwxrwxrwx   1 user      group       34293 Jul 18 16:29 pathname
7027	ls $cf_option $cf_tty_name >conftest.out
7028	read cf_mode cf_links cf_usr cf_grp cf_size cf_date1 cf_date2 cf_date3 cf_rest <conftest.out
7029	if test -z "$cf_rest" ; then
7030		cf_option="$cf_option -g"
7031		ls $cf_option $cf_tty_name >conftest.out
7032		read cf_mode cf_links cf_usr cf_grp cf_size cf_date1 cf_date2 cf_date3 cf_rest <conftest.out
7033	fi
7034	rm -f conftest.out
7035	cf_cv_tty_group_name=$cf_grp
7036fi
7037fi
7038
7039# If we cannot deduce the tty group, fall back on hardcoded cases
7040
7041if test -z "$cf_cv_tty_group_name"
7042then
7043case $host_os in #(vi
7044osf*) #(vi
7045	cf_cv_tty_group_name="terminal"
7046	;;
7047*)
7048	cf_cv_tty_group_name="unknown"
7049	if ( egrep '^tty:' /etc/group 2>/dev/null 1>/dev/null ) then
7050		cf_cv_tty_group_name="tty"
7051	fi
7052	;;
7053esac
7054fi
7055
7056fi
7057echo "$as_me:7057: result: $cf_cv_tty_group_name" >&5
7058echo "${ECHO_T}$cf_cv_tty_group_name" >&6
7059cf_tty_group="$cf_cv_tty_group_name"
7060else
7061	# if configure option, always do this
7062
7063cat >>confdefs.h <<\EOF
7064#define USE_TTY_GROUP 1
7065EOF
7066
7067fi
7068
7069cat >>confdefs.h <<EOF
7070#define TTY_GROUP_NAME "$cf_tty_group"
7071EOF
7072
7073# This is only a double-check that the group-name we obtained above really
7074# does apply to the device.  We cannot perform this test if we are in batch
7075# mode, or if we are cross-compiling.
7076
7077echo "$as_me:7077: checking if we may use the $cf_tty_group group" >&5
7078echo $ECHO_N "checking if we may use the $cf_tty_group group... $ECHO_C" >&6
7079if test "${cf_cv_tty_group+set}" = set; then
7080  echo $ECHO_N "(cached) $ECHO_C" >&6
7081else
7082
7083cf_tty_name=`tty`
7084if test "$cf_tty_name" != "not a tty"
7085then
7086if test "$cross_compiling" = yes; then
7087  cf_cv_tty_group=unknown
7088else
7089  cat >conftest.$ac_ext <<_ACEOF
7090#line 7090 "configure"
7091#include "confdefs.h"
7092
7093#include <unistd.h>
7094#include <sys/types.h>
7095#include <sys/stat.h>
7096#include <grp.h>
7097int main()
7098{
7099	struct stat sb;
7100	struct group *ttygrp = getgrnam(TTY_GROUP_NAME);
7101	char *name = ttyname(0);
7102
7103	endgrent();
7104	if (ttygrp != 0
7105	 && name != 0
7106	 && stat(name, &sb) == 0
7107	 && sb.st_gid != getgid()
7108	 && sb.st_gid == ttygrp->gr_gid) {
7109		${cf_cv_main_return:-return} (0);
7110	}
7111	${cf_cv_main_return:-return} (1);
7112}
7113
7114_ACEOF
7115rm -f conftest$ac_exeext
7116if { (eval echo "$as_me:7116: \"$ac_link\"") >&5
7117  (eval $ac_link) 2>&5
7118  ac_status=$?
7119  echo "$as_me:7119: \$? = $ac_status" >&5
7120  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7121  { (eval echo "$as_me:7121: \"$ac_try\"") >&5
7122  (eval $ac_try) 2>&5
7123  ac_status=$?
7124  echo "$as_me:7124: \$? = $ac_status" >&5
7125  (exit $ac_status); }; }; then
7126  cf_cv_tty_group=yes
7127else
7128  echo "$as_me: program exited with status $ac_status" >&5
7129echo "$as_me: failed program was:" >&5
7130cat conftest.$ac_ext >&5
7131cf_cv_tty_group=no
7132fi
7133rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7134fi
7135elif test "$cross_compiling" = yes; then
7136	cf_cv_tty_group=unknown
7137else
7138	cf_cv_tty_group=yes
7139fi
7140
7141fi
7142echo "$as_me:7142: result: $cf_cv_tty_group" >&5
7143echo "${ECHO_T}$cf_cv_tty_group" >&6
7144
7145if test $cf_cv_tty_group = no ; then
7146	{ echo "$as_me:7146: WARNING: Cannot use $cf_tty_group group" >&5
7147echo "$as_me: WARNING: Cannot use $cf_tty_group group" >&2;}
7148else
7149	cat >>confdefs.h <<\EOF
7150#define USE_TTY_GROUP 1
7151EOF
7152
7153fi
7154
7155###	checks for system services and user specified options
7156
7157echo "$as_me:7157: checking for sys/wait.h that is POSIX.1 compatible" >&5
7158echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6
7159if test "${ac_cv_header_sys_wait_h+set}" = set; then
7160  echo $ECHO_N "(cached) $ECHO_C" >&6
7161else
7162  cat >conftest.$ac_ext <<_ACEOF
7163#line 7163 "configure"
7164#include "confdefs.h"
7165#include <sys/types.h>
7166#include <sys/wait.h>
7167#ifndef WEXITSTATUS
7168# define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
7169#endif
7170#ifndef WIFEXITED
7171# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
7172#endif
7173
7174int
7175main ()
7176{
7177  int s;
7178  wait (&s);
7179  s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
7180  ;
7181  return 0;
7182}
7183_ACEOF
7184rm -f conftest.$ac_objext
7185if { (eval echo "$as_me:7185: \"$ac_compile\"") >&5
7186  (eval $ac_compile) 2>&5
7187  ac_status=$?
7188  echo "$as_me:7188: \$? = $ac_status" >&5
7189  (exit $ac_status); } &&
7190         { ac_try='test -s conftest.$ac_objext'
7191  { (eval echo "$as_me:7191: \"$ac_try\"") >&5
7192  (eval $ac_try) 2>&5
7193  ac_status=$?
7194  echo "$as_me:7194: \$? = $ac_status" >&5
7195  (exit $ac_status); }; }; then
7196  ac_cv_header_sys_wait_h=yes
7197else
7198  echo "$as_me: failed program was:" >&5
7199cat conftest.$ac_ext >&5
7200ac_cv_header_sys_wait_h=no
7201fi
7202rm -f conftest.$ac_objext conftest.$ac_ext
7203fi
7204echo "$as_me:7204: result: $ac_cv_header_sys_wait_h" >&5
7205echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6
7206if test $ac_cv_header_sys_wait_h = yes; then
7207
7208cat >>confdefs.h <<\EOF
7209#define HAVE_SYS_WAIT_H 1
7210EOF
7211
7212fi
7213
7214echo "$as_me:7214: checking for POSIX wait functions" >&5
7215echo $ECHO_N "checking for POSIX wait functions... $ECHO_C" >&6
7216if test "${cf_cv_posix_wait+set}" = set; then
7217  echo $ECHO_N "(cached) $ECHO_C" >&6
7218else
7219
7220cat >conftest.$ac_ext <<_ACEOF
7221#line 7221 "configure"
7222#include "confdefs.h"
7223
7224#include <stdlib.h>
7225#include <stdio.h>
7226#include <sys/types.h>
7227#ifdef HAVE_SYS_WAIT_H
7228#include <sys/wait.h>
7229#endif
7230
7231int
7232main ()
7233{
7234
7235	int stat_loc;
7236	pid_t pid = waitpid(-1, &stat_loc, WNOHANG|WUNTRACED);
7237	pid_t pid2 = wait(&stat_loc);
7238
7239  ;
7240  return 0;
7241}
7242_ACEOF
7243rm -f conftest.$ac_objext conftest$ac_exeext
7244if { (eval echo "$as_me:7244: \"$ac_link\"") >&5
7245  (eval $ac_link) 2>&5
7246  ac_status=$?
7247  echo "$as_me:7247: \$? = $ac_status" >&5
7248  (exit $ac_status); } &&
7249         { ac_try='test -s conftest$ac_exeext'
7250  { (eval echo "$as_me:7250: \"$ac_try\"") >&5
7251  (eval $ac_try) 2>&5
7252  ac_status=$?
7253  echo "$as_me:7253: \$? = $ac_status" >&5
7254  (exit $ac_status); }; }; then
7255  cf_cv_posix_wait=yes
7256else
7257  echo "$as_me: failed program was:" >&5
7258cat conftest.$ac_ext >&5
7259cf_cv_posix_wait=no
7260fi
7261rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7262
7263fi
7264echo "$as_me:7264: result: $cf_cv_posix_wait" >&5
7265echo "${ECHO_T}$cf_cv_posix_wait" >&6
7266test "$cf_cv_posix_wait" = yes &&
7267cat >>confdefs.h <<\EOF
7268#define USE_POSIX_WAIT 1
7269EOF
7270
7271echo "$as_me:7271: checking if external sys_nerr is declared" >&5
7272echo $ECHO_N "checking if external sys_nerr is declared... $ECHO_C" >&6
7273if test "${cf_cv_dcl_sys_nerr+set}" = set; then
7274  echo $ECHO_N "(cached) $ECHO_C" >&6
7275else
7276
7277    cat >conftest.$ac_ext <<_ACEOF
7278#line 7278 "configure"
7279#include "confdefs.h"
7280
7281#ifdef HAVE_STDLIB_H
7282#include <stdlib.h>
7283#endif
7284#include <stdio.h>
7285#include <sys/types.h>
7286#include <errno.h>
7287int
7288main ()
7289{
7290int x = (int) sys_nerr
7291  ;
7292  return 0;
7293}
7294_ACEOF
7295rm -f conftest.$ac_objext
7296if { (eval echo "$as_me:7296: \"$ac_compile\"") >&5
7297  (eval $ac_compile) 2>&5
7298  ac_status=$?
7299  echo "$as_me:7299: \$? = $ac_status" >&5
7300  (exit $ac_status); } &&
7301         { ac_try='test -s conftest.$ac_objext'
7302  { (eval echo "$as_me:7302: \"$ac_try\"") >&5
7303  (eval $ac_try) 2>&5
7304  ac_status=$?
7305  echo "$as_me:7305: \$? = $ac_status" >&5
7306  (exit $ac_status); }; }; then
7307  cf_cv_dcl_sys_nerr=yes
7308else
7309  echo "$as_me: failed program was:" >&5
7310cat conftest.$ac_ext >&5
7311cf_cv_dcl_sys_nerr=no
7312fi
7313rm -f conftest.$ac_objext conftest.$ac_ext
7314
7315fi
7316echo "$as_me:7316: result: $cf_cv_dcl_sys_nerr" >&5
7317echo "${ECHO_T}$cf_cv_dcl_sys_nerr" >&6
7318
7319if test "$cf_cv_dcl_sys_nerr" = no ; then
7320
7321cf_result=`echo "decl_sys_nerr" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
7322
7323    cat >>confdefs.h <<EOF
7324#define $cf_result 1
7325EOF
7326
7327fi
7328
7329# It's possible (for near-UNIX clones) that the data doesn't exist
7330
7331echo "$as_me:7331: checking if external sys_nerr exists" >&5
7332echo $ECHO_N "checking if external sys_nerr exists... $ECHO_C" >&6
7333if test "${cf_cv_have_sys_nerr+set}" = set; then
7334  echo $ECHO_N "(cached) $ECHO_C" >&6
7335else
7336
7337    cat >conftest.$ac_ext <<_ACEOF
7338#line 7338 "configure"
7339#include "confdefs.h"
7340
7341#undef sys_nerr
7342extern int sys_nerr;
7343
7344int
7345main ()
7346{
7347sys_nerr = 2
7348  ;
7349  return 0;
7350}
7351_ACEOF
7352rm -f conftest.$ac_objext conftest$ac_exeext
7353if { (eval echo "$as_me:7353: \"$ac_link\"") >&5
7354  (eval $ac_link) 2>&5
7355  ac_status=$?
7356  echo "$as_me:7356: \$? = $ac_status" >&5
7357  (exit $ac_status); } &&
7358         { ac_try='test -s conftest$ac_exeext'
7359  { (eval echo "$as_me:7359: \"$ac_try\"") >&5
7360  (eval $ac_try) 2>&5
7361  ac_status=$?
7362  echo "$as_me:7362: \$? = $ac_status" >&5
7363  (exit $ac_status); }; }; then
7364  cf_cv_have_sys_nerr=yes
7365else
7366  echo "$as_me: failed program was:" >&5
7367cat conftest.$ac_ext >&5
7368cf_cv_have_sys_nerr=no
7369fi
7370rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7371
7372fi
7373echo "$as_me:7373: result: $cf_cv_have_sys_nerr" >&5
7374echo "${ECHO_T}$cf_cv_have_sys_nerr" >&6
7375
7376if test "$cf_cv_have_sys_nerr" = yes ; then
7377
7378cf_result=`echo "have_sys_nerr" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
7379
7380    cat >>confdefs.h <<EOF
7381#define $cf_result 1
7382EOF
7383
7384fi
7385
7386echo "$as_me:7386: checking if external sys_errlist is declared" >&5
7387echo $ECHO_N "checking if external sys_errlist is declared... $ECHO_C" >&6
7388if test "${cf_cv_dcl_sys_errlist+set}" = set; then
7389  echo $ECHO_N "(cached) $ECHO_C" >&6
7390else
7391
7392    cat >conftest.$ac_ext <<_ACEOF
7393#line 7393 "configure"
7394#include "confdefs.h"
7395
7396#ifdef HAVE_STDLIB_H
7397#include <stdlib.h>
7398#endif
7399#include <stdio.h>
7400#include <sys/types.h>
7401#include <errno.h>
7402int
7403main ()
7404{
7405int x = (int) sys_errlist
7406  ;
7407  return 0;
7408}
7409_ACEOF
7410rm -f conftest.$ac_objext
7411if { (eval echo "$as_me:7411: \"$ac_compile\"") >&5
7412  (eval $ac_compile) 2>&5
7413  ac_status=$?
7414  echo "$as_me:7414: \$? = $ac_status" >&5
7415  (exit $ac_status); } &&
7416         { ac_try='test -s conftest.$ac_objext'
7417  { (eval echo "$as_me:7417: \"$ac_try\"") >&5
7418  (eval $ac_try) 2>&5
7419  ac_status=$?
7420  echo "$as_me:7420: \$? = $ac_status" >&5
7421  (exit $ac_status); }; }; then
7422  cf_cv_dcl_sys_errlist=yes
7423else
7424  echo "$as_me: failed program was:" >&5
7425cat conftest.$ac_ext >&5
7426cf_cv_dcl_sys_errlist=no
7427fi
7428rm -f conftest.$ac_objext conftest.$ac_ext
7429
7430fi
7431echo "$as_me:7431: result: $cf_cv_dcl_sys_errlist" >&5
7432echo "${ECHO_T}$cf_cv_dcl_sys_errlist" >&6
7433
7434if test "$cf_cv_dcl_sys_errlist" = no ; then
7435
7436cf_result=`echo "decl_sys_errlist" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
7437
7438    cat >>confdefs.h <<EOF
7439#define $cf_result 1
7440EOF
7441
7442fi
7443
7444# It's possible (for near-UNIX clones) that the data doesn't exist
7445
7446echo "$as_me:7446: checking if external sys_errlist exists" >&5
7447echo $ECHO_N "checking if external sys_errlist exists... $ECHO_C" >&6
7448if test "${cf_cv_have_sys_errlist+set}" = set; then
7449  echo $ECHO_N "(cached) $ECHO_C" >&6
7450else
7451
7452    cat >conftest.$ac_ext <<_ACEOF
7453#line 7453 "configure"
7454#include "confdefs.h"
7455
7456#undef sys_errlist
7457extern int sys_errlist;
7458
7459int
7460main ()
7461{
7462sys_errlist = 2
7463  ;
7464  return 0;
7465}
7466_ACEOF
7467rm -f conftest.$ac_objext conftest$ac_exeext
7468if { (eval echo "$as_me:7468: \"$ac_link\"") >&5
7469  (eval $ac_link) 2>&5
7470  ac_status=$?
7471  echo "$as_me:7471: \$? = $ac_status" >&5
7472  (exit $ac_status); } &&
7473         { ac_try='test -s conftest$ac_exeext'
7474  { (eval echo "$as_me:7474: \"$ac_try\"") >&5
7475  (eval $ac_try) 2>&5
7476  ac_status=$?
7477  echo "$as_me:7477: \$? = $ac_status" >&5
7478  (exit $ac_status); }; }; then
7479  cf_cv_have_sys_errlist=yes
7480else
7481  echo "$as_me: failed program was:" >&5
7482cat conftest.$ac_ext >&5
7483cf_cv_have_sys_errlist=no
7484fi
7485rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7486
7487fi
7488echo "$as_me:7488: result: $cf_cv_have_sys_errlist" >&5
7489echo "${ECHO_T}$cf_cv_have_sys_errlist" >&6
7490
7491if test "$cf_cv_have_sys_errlist" = yes ; then
7492
7493cf_result=`echo "have_sys_errlist" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
7494
7495    cat >>confdefs.h <<EOF
7496#define $cf_result 1
7497EOF
7498
7499fi
7500
7501for ac_header in \
7502termios.h \
7503stdlib.h \
7504X11/Intrinsic.h \
7505
7506do
7507as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7508echo "$as_me:7508: checking for $ac_header" >&5
7509echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7510if eval "test \"\${$as_ac_Header+set}\" = set"; then
7511  echo $ECHO_N "(cached) $ECHO_C" >&6
7512else
7513  cat >conftest.$ac_ext <<_ACEOF
7514#line 7514 "configure"
7515#include "confdefs.h"
7516#include <$ac_header>
7517_ACEOF
7518if { (eval echo "$as_me:7518: \"$ac_cpp conftest.$ac_ext\"") >&5
7519  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7520  ac_status=$?
7521  egrep -v '^ *\+' conftest.er1 >conftest.err
7522  rm -f conftest.er1
7523  cat conftest.err >&5
7524  echo "$as_me:7524: \$? = $ac_status" >&5
7525  (exit $ac_status); } >/dev/null; then
7526  if test -s conftest.err; then
7527    ac_cpp_err=$ac_c_preproc_warn_flag
7528  else
7529    ac_cpp_err=
7530  fi
7531else
7532  ac_cpp_err=yes
7533fi
7534if test -z "$ac_cpp_err"; then
7535  eval "$as_ac_Header=yes"
7536else
7537  echo "$as_me: failed program was:" >&5
7538  cat conftest.$ac_ext >&5
7539  eval "$as_ac_Header=no"
7540fi
7541rm -f conftest.err conftest.$ac_ext
7542fi
7543echo "$as_me:7543: result: `eval echo '${'$as_ac_Header'}'`" >&5
7544echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7545if test `eval echo '${'$as_ac_Header'}'` = yes; then
7546  cat >>confdefs.h <<EOF
7547#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7548EOF
7549
7550fi
7551done
7552
7553echo "$as_me:7553: checking if we should define SYSV" >&5
7554echo $ECHO_N "checking if we should define SYSV... $ECHO_C" >&6
7555if test "${cf_cv_sysv+set}" = set; then
7556  echo $ECHO_N "(cached) $ECHO_C" >&6
7557else
7558
7559cat >conftest.$ac_ext <<_ACEOF
7560#line 7560 "configure"
7561#include "confdefs.h"
7562
7563#undef  SYSV
7564#define SYSV 1			/* get Xos.h to declare sys_errlist[] */
7565#ifdef HAVE_STDLIB_H
7566#include <stdlib.h>		/* look for wchar_t */
7567#endif
7568#ifdef HAVE_X11_INTRINSIC_H
7569#include <X11/Intrinsic.h>	/* Intrinsic.h has other traps... */
7570#endif
7571#ifdef HAVE_TERMIOS_H		/* needed for HPUX 10.20 */
7572#include <termios.h>
7573#define STRUCT_TERMIOS struct termios
7574#else
7575#define STRUCT_TERMIOS struct termio
7576#endif
7577#include <curses.h>
7578#include <term.h>		/* eliminate most BSD hacks */
7579#include <errno.h>		/* declare sys_errlist on older systems */
7580#include <sys/termio.h>		/* eliminate most of the remaining ones */
7581
7582int
7583main ()
7584{
7585
7586static STRUCT_TERMIOS d_tio;
7587	d_tio.c_cc[VINTR] = 0;
7588	d_tio.c_cc[VQUIT] = 0;
7589	d_tio.c_cc[VERASE] = 0;
7590	d_tio.c_cc[VKILL] = 0;
7591	d_tio.c_cc[VEOF] = 0;
7592	d_tio.c_cc[VEOL] = 0;
7593	d_tio.c_cc[VMIN] = 0;
7594	d_tio.c_cc[VTIME] = 0;
7595#if defined(HAVE_SYS_ERRLIST) && !defined(DECL_SYS_ERRLIST)
7596sys_errlist[0] = "";		/* Cygwin mis-declares this */
7597#endif
7598
7599  ;
7600  return 0;
7601}
7602_ACEOF
7603rm -f conftest.$ac_objext
7604if { (eval echo "$as_me:7604: \"$ac_compile\"") >&5
7605  (eval $ac_compile) 2>&5
7606  ac_status=$?
7607  echo "$as_me:7607: \$? = $ac_status" >&5
7608  (exit $ac_status); } &&
7609         { ac_try='test -s conftest.$ac_objext'
7610  { (eval echo "$as_me:7610: \"$ac_try\"") >&5
7611  (eval $ac_try) 2>&5
7612  ac_status=$?
7613  echo "$as_me:7613: \$? = $ac_status" >&5
7614  (exit $ac_status); }; }; then
7615  cf_cv_sysv=yes
7616else
7617  echo "$as_me: failed program was:" >&5
7618cat conftest.$ac_ext >&5
7619cf_cv_sysv=no
7620fi
7621rm -f conftest.$ac_objext conftest.$ac_ext
7622
7623fi
7624echo "$as_me:7624: result: $cf_cv_sysv" >&5
7625echo "${ECHO_T}$cf_cv_sysv" >&6
7626test "$cf_cv_sysv" = yes &&
7627cat >>confdefs.h <<\EOF
7628#define SYSV 1
7629EOF
7630
7631echo "$as_me:7631: checking for elf_begin in -lelf" >&5
7632echo $ECHO_N "checking for elf_begin in -lelf... $ECHO_C" >&6
7633if test "${ac_cv_lib_elf_elf_begin+set}" = set; then
7634  echo $ECHO_N "(cached) $ECHO_C" >&6
7635else
7636  ac_check_lib_save_LIBS=$LIBS
7637LIBS="-lelf  $LIBS"
7638cat >conftest.$ac_ext <<_ACEOF
7639#line 7639 "configure"
7640#include "confdefs.h"
7641
7642/* Override any gcc2 internal prototype to avoid an error.  */
7643#ifdef __cplusplus
7644extern "C"
7645#endif
7646/* We use char because int might match the return type of a gcc2
7647   builtin and then its argument prototype would still apply.  */
7648char elf_begin ();
7649int
7650main ()
7651{
7652elf_begin ();
7653  ;
7654  return 0;
7655}
7656_ACEOF
7657rm -f conftest.$ac_objext conftest$ac_exeext
7658if { (eval echo "$as_me:7658: \"$ac_link\"") >&5
7659  (eval $ac_link) 2>&5
7660  ac_status=$?
7661  echo "$as_me:7661: \$? = $ac_status" >&5
7662  (exit $ac_status); } &&
7663         { ac_try='test -s conftest$ac_exeext'
7664  { (eval echo "$as_me:7664: \"$ac_try\"") >&5
7665  (eval $ac_try) 2>&5
7666  ac_status=$?
7667  echo "$as_me:7667: \$? = $ac_status" >&5
7668  (exit $ac_status); }; }; then
7669  ac_cv_lib_elf_elf_begin=yes
7670else
7671  echo "$as_me: failed program was:" >&5
7672cat conftest.$ac_ext >&5
7673ac_cv_lib_elf_elf_begin=no
7674fi
7675rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7676LIBS=$ac_check_lib_save_LIBS
7677fi
7678echo "$as_me:7678: result: $ac_cv_lib_elf_elf_begin" >&5
7679echo "${ECHO_T}$ac_cv_lib_elf_elf_begin" >&6
7680if test $ac_cv_lib_elf_elf_begin = yes; then
7681
7682echo "$as_me:7682: checking if this is an SVR4 system" >&5
7683echo $ECHO_N "checking if this is an SVR4 system... $ECHO_C" >&6
7684if test "${cf_cv_svr4+set}" = set; then
7685  echo $ECHO_N "(cached) $ECHO_C" >&6
7686else
7687
7688cat >conftest.$ac_ext <<_ACEOF
7689#line 7689 "configure"
7690#include "confdefs.h"
7691
7692#if defined(__CYGWIN__)
7693make an error
7694#endif
7695#include <elf.h>
7696#include <sys/termio.h>
7697
7698int
7699main ()
7700{
7701
7702static struct termio d_tio;
7703	d_tio.c_cc[VINTR] = 0;
7704	d_tio.c_cc[VQUIT] = 0;
7705	d_tio.c_cc[VERASE] = 0;
7706	d_tio.c_cc[VKILL] = 0;
7707	d_tio.c_cc[VEOF] = 0;
7708	d_tio.c_cc[VEOL] = 0;
7709	d_tio.c_cc[VMIN] = 0;
7710	d_tio.c_cc[VTIME] = 0;
7711	d_tio.c_cc[VLNEXT] = 0;
7712
7713  ;
7714  return 0;
7715}
7716_ACEOF
7717rm -f conftest.$ac_objext
7718if { (eval echo "$as_me:7718: \"$ac_compile\"") >&5
7719  (eval $ac_compile) 2>&5
7720  ac_status=$?
7721  echo "$as_me:7721: \$? = $ac_status" >&5
7722  (exit $ac_status); } &&
7723         { ac_try='test -s conftest.$ac_objext'
7724  { (eval echo "$as_me:7724: \"$ac_try\"") >&5
7725  (eval $ac_try) 2>&5
7726  ac_status=$?
7727  echo "$as_me:7727: \$? = $ac_status" >&5
7728  (exit $ac_status); }; }; then
7729  cf_cv_svr4=yes
7730else
7731  echo "$as_me: failed program was:" >&5
7732cat conftest.$ac_ext >&5
7733cf_cv_svr4=no
7734fi
7735rm -f conftest.$ac_objext conftest.$ac_ext
7736
7737fi
7738echo "$as_me:7738: result: $cf_cv_svr4" >&5
7739echo "${ECHO_T}$cf_cv_svr4" >&6
7740
7741fi
7742
7743test "$cf_cv_svr4" = yes &&
7744cat >>confdefs.h <<\EOF
7745#define SVR4 1
7746EOF
7747
7748echo "$as_me:7748: checking for X" >&5
7749echo $ECHO_N "checking for X... $ECHO_C" >&6
7750
7751# Check whether --with-x or --without-x was given.
7752if test "${with_x+set}" = set; then
7753  withval="$with_x"
7754
7755fi;
7756# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
7757if test "x$with_x" = xno; then
7758  # The user explicitly disabled X.
7759  have_x=disabled
7760else
7761  if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
7762    # Both variables are already set.
7763    have_x=yes
7764  else
7765    if test "${ac_cv_have_x+set}" = set; then
7766  echo $ECHO_N "(cached) $ECHO_C" >&6
7767else
7768  # One or both of the vars are not set, and there is no cached value.
7769ac_x_includes=no ac_x_libraries=no
7770rm -fr conftest.dir
7771if mkdir conftest.dir; then
7772  cd conftest.dir
7773  # Make sure to not put "make" in the Imakefile rules, since we grep it out.
7774  cat >Imakefile <<'EOF'
7775acfindx:
7776	@echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
7777EOF
7778  if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
7779    # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
7780    eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
7781    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
7782    for ac_extension in a so sl dylib dll; do
7783      if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
7784         test -f $ac_im_libdir/libX11.$ac_extension; then
7785        ac_im_usrlibdir=$ac_im_libdir; break
7786      fi
7787    done
7788    # Screen out bogus values from the imake configuration.  They are
7789    # bogus both because they are the default anyway, and because
7790    # using them would break gcc on systems where it needs fixed includes.
7791    case $ac_im_incroot in
7792	/usr/include) ;;
7793	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
7794    esac
7795    case $ac_im_usrlibdir in
7796	/usr/lib | /lib) ;;
7797	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
7798    esac
7799  fi
7800  cd ..
7801  rm -fr conftest.dir
7802fi
7803
7804# Standard set of common directories for X headers.
7805# Check X11 before X11Rn because it is often a symlink to the current release.
7806ac_x_header_dirs='
7807/usr/X11/include
7808/usr/X11R6/include
7809/usr/X11R5/include
7810/usr/X11R4/include
7811
7812/usr/include/X11
7813/usr/include/X11R6
7814/usr/include/X11R5
7815/usr/include/X11R4
7816
7817/usr/local/X11/include
7818/usr/local/X11R6/include
7819/usr/local/X11R5/include
7820/usr/local/X11R4/include
7821
7822/usr/local/include/X11
7823/usr/local/include/X11R6
7824/usr/local/include/X11R5
7825/usr/local/include/X11R4
7826
7827/usr/X386/include
7828/usr/x386/include
7829/usr/XFree86/include/X11
7830
7831/usr/include
7832/usr/local/include
7833/usr/unsupported/include
7834/usr/athena/include
7835/usr/local/x11r5/include
7836/usr/lpp/Xamples/include
7837
7838/usr/openwin/include
7839/usr/openwin/share/include'
7840
7841if test "$ac_x_includes" = no; then
7842  # Guess where to find include files, by looking for Intrinsic.h.
7843  # First, try using that file with no special directory specified.
7844  cat >conftest.$ac_ext <<_ACEOF
7845#line 7845 "configure"
7846#include "confdefs.h"
7847#include <X11/Intrinsic.h>
7848_ACEOF
7849if { (eval echo "$as_me:7849: \"$ac_cpp conftest.$ac_ext\"") >&5
7850  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7851  ac_status=$?
7852  egrep -v '^ *\+' conftest.er1 >conftest.err
7853  rm -f conftest.er1
7854  cat conftest.err >&5
7855  echo "$as_me:7855: \$? = $ac_status" >&5
7856  (exit $ac_status); } >/dev/null; then
7857  if test -s conftest.err; then
7858    ac_cpp_err=$ac_c_preproc_warn_flag
7859  else
7860    ac_cpp_err=
7861  fi
7862else
7863  ac_cpp_err=yes
7864fi
7865if test -z "$ac_cpp_err"; then
7866  # We can compile using X headers with no special include directory.
7867ac_x_includes=
7868else
7869  echo "$as_me: failed program was:" >&5
7870  cat conftest.$ac_ext >&5
7871  for ac_dir in $ac_x_header_dirs; do
7872  if test -r "$ac_dir/X11/Intrinsic.h"; then
7873    ac_x_includes=$ac_dir
7874    break
7875  fi
7876done
7877fi
7878rm -f conftest.err conftest.$ac_ext
7879fi # $ac_x_includes = no
7880
7881if test "$ac_x_libraries" = no; then
7882  # Check for the libraries.
7883  # See if we find them without any special options.
7884  # Don't add to $LIBS permanently.
7885  ac_save_LIBS=$LIBS
7886  LIBS="-lXt $LIBS"
7887  cat >conftest.$ac_ext <<_ACEOF
7888#line 7888 "configure"
7889#include "confdefs.h"
7890#include <X11/Intrinsic.h>
7891int
7892main ()
7893{
7894XtMalloc (0)
7895  ;
7896  return 0;
7897}
7898_ACEOF
7899rm -f conftest.$ac_objext conftest$ac_exeext
7900if { (eval echo "$as_me:7900: \"$ac_link\"") >&5
7901  (eval $ac_link) 2>&5
7902  ac_status=$?
7903  echo "$as_me:7903: \$? = $ac_status" >&5
7904  (exit $ac_status); } &&
7905         { ac_try='test -s conftest$ac_exeext'
7906  { (eval echo "$as_me:7906: \"$ac_try\"") >&5
7907  (eval $ac_try) 2>&5
7908  ac_status=$?
7909  echo "$as_me:7909: \$? = $ac_status" >&5
7910  (exit $ac_status); }; }; then
7911  LIBS=$ac_save_LIBS
7912# We can link X programs with no special library path.
7913ac_x_libraries=
7914else
7915  echo "$as_me: failed program was:" >&5
7916cat conftest.$ac_ext >&5
7917LIBS=$ac_save_LIBS
7918for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
7919do
7920  # Don't even attempt the hair of trying to link an X program!
7921  for ac_extension in a so sl dylib dll; do
7922    if test -r $ac_dir/libXt.$ac_extension; then
7923      ac_x_libraries=$ac_dir
7924      break 2
7925    fi
7926  done
7927done
7928fi
7929rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7930fi # $ac_x_libraries = no
7931
7932if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
7933  # Didn't find X anywhere.  Cache the known absence of X.
7934  ac_cv_have_x="have_x=no"
7935else
7936  # Record where we found X for the cache.
7937  ac_cv_have_x="have_x=yes \
7938	        ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
7939fi
7940fi
7941
7942  fi
7943  eval "$ac_cv_have_x"
7944fi # $with_x != no
7945
7946if test "$have_x" != yes; then
7947  echo "$as_me:7947: result: $have_x" >&5
7948echo "${ECHO_T}$have_x" >&6
7949  no_x=yes
7950else
7951  # If each of the values was on the command line, it overrides each guess.
7952  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
7953  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
7954  # Update the cache value to reflect the command line values.
7955  ac_cv_have_x="have_x=yes \
7956		ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
7957  echo "$as_me:7957: result: libraries $x_libraries, headers $x_includes" >&5
7958echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6
7959fi
7960
7961if test "$no_x" = yes; then
7962  # Not all programs may use this symbol, but it does not hurt to define it.
7963
7964cat >>confdefs.h <<\EOF
7965#define X_DISPLAY_MISSING 1
7966EOF
7967
7968  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
7969else
7970  if test -n "$x_includes"; then
7971    X_CFLAGS="$X_CFLAGS -I$x_includes"
7972  fi
7973
7974  # It would also be nice to do this for all -L options, not just this one.
7975  if test -n "$x_libraries"; then
7976    X_LIBS="$X_LIBS -L$x_libraries"
7977    # For Solaris; some versions of Sun CC require a space after -R and
7978    # others require no space.  Words are not sufficient . . . .
7979    case `(uname -sr) 2>/dev/null` in
7980    "SunOS 5"*)
7981      echo "$as_me:7981: checking whether -R must be followed by a space" >&5
7982echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6
7983      ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
7984      cat >conftest.$ac_ext <<_ACEOF
7985#line 7985 "configure"
7986#include "confdefs.h"
7987
7988int
7989main ()
7990{
7991
7992  ;
7993  return 0;
7994}
7995_ACEOF
7996rm -f conftest.$ac_objext conftest$ac_exeext
7997if { (eval echo "$as_me:7997: \"$ac_link\"") >&5
7998  (eval $ac_link) 2>&5
7999  ac_status=$?
8000  echo "$as_me:8000: \$? = $ac_status" >&5
8001  (exit $ac_status); } &&
8002         { ac_try='test -s conftest$ac_exeext'
8003  { (eval echo "$as_me:8003: \"$ac_try\"") >&5
8004  (eval $ac_try) 2>&5
8005  ac_status=$?
8006  echo "$as_me:8006: \$? = $ac_status" >&5
8007  (exit $ac_status); }; }; then
8008  ac_R_nospace=yes
8009else
8010  echo "$as_me: failed program was:" >&5
8011cat conftest.$ac_ext >&5
8012ac_R_nospace=no
8013fi
8014rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8015      if test $ac_R_nospace = yes; then
8016	echo "$as_me:8016: result: no" >&5
8017echo "${ECHO_T}no" >&6
8018	X_LIBS="$X_LIBS -R$x_libraries"
8019      else
8020	LIBS="$ac_xsave_LIBS -R $x_libraries"
8021	cat >conftest.$ac_ext <<_ACEOF
8022#line 8022 "configure"
8023#include "confdefs.h"
8024
8025int
8026main ()
8027{
8028
8029  ;
8030  return 0;
8031}
8032_ACEOF
8033rm -f conftest.$ac_objext conftest$ac_exeext
8034if { (eval echo "$as_me:8034: \"$ac_link\"") >&5
8035  (eval $ac_link) 2>&5
8036  ac_status=$?
8037  echo "$as_me:8037: \$? = $ac_status" >&5
8038  (exit $ac_status); } &&
8039         { ac_try='test -s conftest$ac_exeext'
8040  { (eval echo "$as_me:8040: \"$ac_try\"") >&5
8041  (eval $ac_try) 2>&5
8042  ac_status=$?
8043  echo "$as_me:8043: \$? = $ac_status" >&5
8044  (exit $ac_status); }; }; then
8045  ac_R_space=yes
8046else
8047  echo "$as_me: failed program was:" >&5
8048cat conftest.$ac_ext >&5
8049ac_R_space=no
8050fi
8051rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8052	if test $ac_R_space = yes; then
8053	  echo "$as_me:8053: result: yes" >&5
8054echo "${ECHO_T}yes" >&6
8055	  X_LIBS="$X_LIBS -R $x_libraries"
8056	else
8057	  echo "$as_me:8057: result: neither works" >&5
8058echo "${ECHO_T}neither works" >&6
8059	fi
8060      fi
8061      LIBS=$ac_xsave_LIBS
8062    esac
8063  fi
8064
8065  # Check for system-dependent libraries X programs must link with.
8066  # Do this before checking for the system-independent R6 libraries
8067  # (-lICE), since we may need -lsocket or whatever for X linking.
8068
8069  if test "$ISC" = yes; then
8070    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
8071  else
8072    # Martyn Johnson says this is needed for Ultrix, if the X
8073    # libraries were built with DECnet support.  And Karl Berry says
8074    # the Alpha needs dnet_stub (dnet does not exist).
8075    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
8076    cat >conftest.$ac_ext <<_ACEOF
8077#line 8077 "configure"
8078#include "confdefs.h"
8079
8080/* Override any gcc2 internal prototype to avoid an error.  */
8081#ifdef __cplusplus
8082extern "C"
8083#endif
8084/* We use char because int might match the return type of a gcc2
8085   builtin and then its argument prototype would still apply.  */
8086char XOpenDisplay ();
8087int
8088main ()
8089{
8090XOpenDisplay ();
8091  ;
8092  return 0;
8093}
8094_ACEOF
8095rm -f conftest.$ac_objext conftest$ac_exeext
8096if { (eval echo "$as_me:8096: \"$ac_link\"") >&5
8097  (eval $ac_link) 2>&5
8098  ac_status=$?
8099  echo "$as_me:8099: \$? = $ac_status" >&5
8100  (exit $ac_status); } &&
8101         { ac_try='test -s conftest$ac_exeext'
8102  { (eval echo "$as_me:8102: \"$ac_try\"") >&5
8103  (eval $ac_try) 2>&5
8104  ac_status=$?
8105  echo "$as_me:8105: \$? = $ac_status" >&5
8106  (exit $ac_status); }; }; then
8107  :
8108else
8109  echo "$as_me: failed program was:" >&5
8110cat conftest.$ac_ext >&5
8111echo "$as_me:8111: checking for dnet_ntoa in -ldnet" >&5
8112echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6
8113if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
8114  echo $ECHO_N "(cached) $ECHO_C" >&6
8115else
8116  ac_check_lib_save_LIBS=$LIBS
8117LIBS="-ldnet  $LIBS"
8118cat >conftest.$ac_ext <<_ACEOF
8119#line 8119 "configure"
8120#include "confdefs.h"
8121
8122/* Override any gcc2 internal prototype to avoid an error.  */
8123#ifdef __cplusplus
8124extern "C"
8125#endif
8126/* We use char because int might match the return type of a gcc2
8127   builtin and then its argument prototype would still apply.  */
8128char dnet_ntoa ();
8129int
8130main ()
8131{
8132dnet_ntoa ();
8133  ;
8134  return 0;
8135}
8136_ACEOF
8137rm -f conftest.$ac_objext conftest$ac_exeext
8138if { (eval echo "$as_me:8138: \"$ac_link\"") >&5
8139  (eval $ac_link) 2>&5
8140  ac_status=$?
8141  echo "$as_me:8141: \$? = $ac_status" >&5
8142  (exit $ac_status); } &&
8143         { ac_try='test -s conftest$ac_exeext'
8144  { (eval echo "$as_me:8144: \"$ac_try\"") >&5
8145  (eval $ac_try) 2>&5
8146  ac_status=$?
8147  echo "$as_me:8147: \$? = $ac_status" >&5
8148  (exit $ac_status); }; }; then
8149  ac_cv_lib_dnet_dnet_ntoa=yes
8150else
8151  echo "$as_me: failed program was:" >&5
8152cat conftest.$ac_ext >&5
8153ac_cv_lib_dnet_dnet_ntoa=no
8154fi
8155rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8156LIBS=$ac_check_lib_save_LIBS
8157fi
8158echo "$as_me:8158: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
8159echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6
8160if test $ac_cv_lib_dnet_dnet_ntoa = yes; then
8161  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
8162fi
8163
8164    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
8165      echo "$as_me:8165: checking for dnet_ntoa in -ldnet_stub" >&5
8166echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6
8167if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then
8168  echo $ECHO_N "(cached) $ECHO_C" >&6
8169else
8170  ac_check_lib_save_LIBS=$LIBS
8171LIBS="-ldnet_stub  $LIBS"
8172cat >conftest.$ac_ext <<_ACEOF
8173#line 8173 "configure"
8174#include "confdefs.h"
8175
8176/* Override any gcc2 internal prototype to avoid an error.  */
8177#ifdef __cplusplus
8178extern "C"
8179#endif
8180/* We use char because int might match the return type of a gcc2
8181   builtin and then its argument prototype would still apply.  */
8182char dnet_ntoa ();
8183int
8184main ()
8185{
8186dnet_ntoa ();
8187  ;
8188  return 0;
8189}
8190_ACEOF
8191rm -f conftest.$ac_objext conftest$ac_exeext
8192if { (eval echo "$as_me:8192: \"$ac_link\"") >&5
8193  (eval $ac_link) 2>&5
8194  ac_status=$?
8195  echo "$as_me:8195: \$? = $ac_status" >&5
8196  (exit $ac_status); } &&
8197         { ac_try='test -s conftest$ac_exeext'
8198  { (eval echo "$as_me:8198: \"$ac_try\"") >&5
8199  (eval $ac_try) 2>&5
8200  ac_status=$?
8201  echo "$as_me:8201: \$? = $ac_status" >&5
8202  (exit $ac_status); }; }; then
8203  ac_cv_lib_dnet_stub_dnet_ntoa=yes
8204else
8205  echo "$as_me: failed program was:" >&5
8206cat conftest.$ac_ext >&5
8207ac_cv_lib_dnet_stub_dnet_ntoa=no
8208fi
8209rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8210LIBS=$ac_check_lib_save_LIBS
8211fi
8212echo "$as_me:8212: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
8213echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6
8214if test $ac_cv_lib_dnet_stub_dnet_ntoa = yes; then
8215  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
8216fi
8217
8218    fi
8219fi
8220rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8221    LIBS="$ac_xsave_LIBS"
8222
8223    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
8224    # to get the SysV transport functions.
8225    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
8226    # needs -lnsl.
8227    # The nsl library prevents programs from opening the X display
8228    # on Irix 5.2, according to T.E. Dickey.
8229    # The functions gethostbyname, getservbyname, and inet_addr are
8230    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
8231    echo "$as_me:8231: checking for gethostbyname" >&5
8232echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6
8233if test "${ac_cv_func_gethostbyname+set}" = set; then
8234  echo $ECHO_N "(cached) $ECHO_C" >&6
8235else
8236  cat >conftest.$ac_ext <<_ACEOF
8237#line 8237 "configure"
8238#include "confdefs.h"
8239/* System header to define __stub macros and hopefully few prototypes,
8240    which can conflict with char gethostbyname (); below.  */
8241#include <assert.h>
8242/* Override any gcc2 internal prototype to avoid an error.  */
8243#ifdef __cplusplus
8244extern "C"
8245#endif
8246/* We use char because int might match the return type of a gcc2
8247   builtin and then its argument prototype would still apply.  */
8248char gethostbyname ();
8249char (*f) ();
8250
8251int
8252main ()
8253{
8254/* The GNU C library defines this for functions which it implements
8255    to always fail with ENOSYS.  Some functions are actually named
8256    something starting with __ and the normal name is an alias.  */
8257#if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
8258choke me
8259#else
8260f = gethostbyname; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
8261#endif
8262
8263  ;
8264  return 0;
8265}
8266_ACEOF
8267rm -f conftest.$ac_objext conftest$ac_exeext
8268if { (eval echo "$as_me:8268: \"$ac_link\"") >&5
8269  (eval $ac_link) 2>&5
8270  ac_status=$?
8271  echo "$as_me:8271: \$? = $ac_status" >&5
8272  (exit $ac_status); } &&
8273         { ac_try='test -s conftest$ac_exeext'
8274  { (eval echo "$as_me:8274: \"$ac_try\"") >&5
8275  (eval $ac_try) 2>&5
8276  ac_status=$?
8277  echo "$as_me:8277: \$? = $ac_status" >&5
8278  (exit $ac_status); }; }; then
8279  ac_cv_func_gethostbyname=yes
8280else
8281  echo "$as_me: failed program was:" >&5
8282cat conftest.$ac_ext >&5
8283ac_cv_func_gethostbyname=no
8284fi
8285rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8286fi
8287echo "$as_me:8287: result: $ac_cv_func_gethostbyname" >&5
8288echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6
8289
8290    if test $ac_cv_func_gethostbyname = no; then
8291      echo "$as_me:8291: checking for gethostbyname in -lnsl" >&5
8292echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6
8293if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
8294  echo $ECHO_N "(cached) $ECHO_C" >&6
8295else
8296  ac_check_lib_save_LIBS=$LIBS
8297LIBS="-lnsl  $LIBS"
8298cat >conftest.$ac_ext <<_ACEOF
8299#line 8299 "configure"
8300#include "confdefs.h"
8301
8302/* Override any gcc2 internal prototype to avoid an error.  */
8303#ifdef __cplusplus
8304extern "C"
8305#endif
8306/* We use char because int might match the return type of a gcc2
8307   builtin and then its argument prototype would still apply.  */
8308char gethostbyname ();
8309int
8310main ()
8311{
8312gethostbyname ();
8313  ;
8314  return 0;
8315}
8316_ACEOF
8317rm -f conftest.$ac_objext conftest$ac_exeext
8318if { (eval echo "$as_me:8318: \"$ac_link\"") >&5
8319  (eval $ac_link) 2>&5
8320  ac_status=$?
8321  echo "$as_me:8321: \$? = $ac_status" >&5
8322  (exit $ac_status); } &&
8323         { ac_try='test -s conftest$ac_exeext'
8324  { (eval echo "$as_me:8324: \"$ac_try\"") >&5
8325  (eval $ac_try) 2>&5
8326  ac_status=$?
8327  echo "$as_me:8327: \$? = $ac_status" >&5
8328  (exit $ac_status); }; }; then
8329  ac_cv_lib_nsl_gethostbyname=yes
8330else
8331  echo "$as_me: failed program was:" >&5
8332cat conftest.$ac_ext >&5
8333ac_cv_lib_nsl_gethostbyname=no
8334fi
8335rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8336LIBS=$ac_check_lib_save_LIBS
8337fi
8338echo "$as_me:8338: result: $ac_cv_lib_nsl_gethostbyname" >&5
8339echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6
8340if test $ac_cv_lib_nsl_gethostbyname = yes; then
8341  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
8342fi
8343
8344      if test $ac_cv_lib_nsl_gethostbyname = no; then
8345        echo "$as_me:8345: checking for gethostbyname in -lbsd" >&5
8346echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6
8347if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then
8348  echo $ECHO_N "(cached) $ECHO_C" >&6
8349else
8350  ac_check_lib_save_LIBS=$LIBS
8351LIBS="-lbsd  $LIBS"
8352cat >conftest.$ac_ext <<_ACEOF
8353#line 8353 "configure"
8354#include "confdefs.h"
8355
8356/* Override any gcc2 internal prototype to avoid an error.  */
8357#ifdef __cplusplus
8358extern "C"
8359#endif
8360/* We use char because int might match the return type of a gcc2
8361   builtin and then its argument prototype would still apply.  */
8362char gethostbyname ();
8363int
8364main ()
8365{
8366gethostbyname ();
8367  ;
8368  return 0;
8369}
8370_ACEOF
8371rm -f conftest.$ac_objext conftest$ac_exeext
8372if { (eval echo "$as_me:8372: \"$ac_link\"") >&5
8373  (eval $ac_link) 2>&5
8374  ac_status=$?
8375  echo "$as_me:8375: \$? = $ac_status" >&5
8376  (exit $ac_status); } &&
8377         { ac_try='test -s conftest$ac_exeext'
8378  { (eval echo "$as_me:8378: \"$ac_try\"") >&5
8379  (eval $ac_try) 2>&5
8380  ac_status=$?
8381  echo "$as_me:8381: \$? = $ac_status" >&5
8382  (exit $ac_status); }; }; then
8383  ac_cv_lib_bsd_gethostbyname=yes
8384else
8385  echo "$as_me: failed program was:" >&5
8386cat conftest.$ac_ext >&5
8387ac_cv_lib_bsd_gethostbyname=no
8388fi
8389rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8390LIBS=$ac_check_lib_save_LIBS
8391fi
8392echo "$as_me:8392: result: $ac_cv_lib_bsd_gethostbyname" >&5
8393echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6
8394if test $ac_cv_lib_bsd_gethostbyname = yes; then
8395  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
8396fi
8397
8398      fi
8399    fi
8400
8401    # lieder@skyler.mavd.honeywell.com says without -lsocket,
8402    # socket/setsockopt and other routines are undefined under SCO ODT
8403    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
8404    # on later versions), says Simon Leinen: it contains gethostby*
8405    # variants that don't use the nameserver (or something).  -lsocket
8406    # must be given before -lnsl if both are needed.  We assume that
8407    # if connect needs -lnsl, so does gethostbyname.
8408    echo "$as_me:8408: checking for connect" >&5
8409echo $ECHO_N "checking for connect... $ECHO_C" >&6
8410if test "${ac_cv_func_connect+set}" = set; then
8411  echo $ECHO_N "(cached) $ECHO_C" >&6
8412else
8413  cat >conftest.$ac_ext <<_ACEOF
8414#line 8414 "configure"
8415#include "confdefs.h"
8416/* System header to define __stub macros and hopefully few prototypes,
8417    which can conflict with char connect (); below.  */
8418#include <assert.h>
8419/* Override any gcc2 internal prototype to avoid an error.  */
8420#ifdef __cplusplus
8421extern "C"
8422#endif
8423/* We use char because int might match the return type of a gcc2
8424   builtin and then its argument prototype would still apply.  */
8425char connect ();
8426char (*f) ();
8427
8428int
8429main ()
8430{
8431/* The GNU C library defines this for functions which it implements
8432    to always fail with ENOSYS.  Some functions are actually named
8433    something starting with __ and the normal name is an alias.  */
8434#if defined (__stub_connect) || defined (__stub___connect)
8435choke me
8436#else
8437f = connect; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
8438#endif
8439
8440  ;
8441  return 0;
8442}
8443_ACEOF
8444rm -f conftest.$ac_objext conftest$ac_exeext
8445if { (eval echo "$as_me:8445: \"$ac_link\"") >&5
8446  (eval $ac_link) 2>&5
8447  ac_status=$?
8448  echo "$as_me:8448: \$? = $ac_status" >&5
8449  (exit $ac_status); } &&
8450         { ac_try='test -s conftest$ac_exeext'
8451  { (eval echo "$as_me:8451: \"$ac_try\"") >&5
8452  (eval $ac_try) 2>&5
8453  ac_status=$?
8454  echo "$as_me:8454: \$? = $ac_status" >&5
8455  (exit $ac_status); }; }; then
8456  ac_cv_func_connect=yes
8457else
8458  echo "$as_me: failed program was:" >&5
8459cat conftest.$ac_ext >&5
8460ac_cv_func_connect=no
8461fi
8462rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8463fi
8464echo "$as_me:8464: result: $ac_cv_func_connect" >&5
8465echo "${ECHO_T}$ac_cv_func_connect" >&6
8466
8467    if test $ac_cv_func_connect = no; then
8468      echo "$as_me:8468: checking for connect in -lsocket" >&5
8469echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6
8470if test "${ac_cv_lib_socket_connect+set}" = set; then
8471  echo $ECHO_N "(cached) $ECHO_C" >&6
8472else
8473  ac_check_lib_save_LIBS=$LIBS
8474LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
8475cat >conftest.$ac_ext <<_ACEOF
8476#line 8476 "configure"
8477#include "confdefs.h"
8478
8479/* Override any gcc2 internal prototype to avoid an error.  */
8480#ifdef __cplusplus
8481extern "C"
8482#endif
8483/* We use char because int might match the return type of a gcc2
8484   builtin and then its argument prototype would still apply.  */
8485char connect ();
8486int
8487main ()
8488{
8489connect ();
8490  ;
8491  return 0;
8492}
8493_ACEOF
8494rm -f conftest.$ac_objext conftest$ac_exeext
8495if { (eval echo "$as_me:8495: \"$ac_link\"") >&5
8496  (eval $ac_link) 2>&5
8497  ac_status=$?
8498  echo "$as_me:8498: \$? = $ac_status" >&5
8499  (exit $ac_status); } &&
8500         { ac_try='test -s conftest$ac_exeext'
8501  { (eval echo "$as_me:8501: \"$ac_try\"") >&5
8502  (eval $ac_try) 2>&5
8503  ac_status=$?
8504  echo "$as_me:8504: \$? = $ac_status" >&5
8505  (exit $ac_status); }; }; then
8506  ac_cv_lib_socket_connect=yes
8507else
8508  echo "$as_me: failed program was:" >&5
8509cat conftest.$ac_ext >&5
8510ac_cv_lib_socket_connect=no
8511fi
8512rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8513LIBS=$ac_check_lib_save_LIBS
8514fi
8515echo "$as_me:8515: result: $ac_cv_lib_socket_connect" >&5
8516echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6
8517if test $ac_cv_lib_socket_connect = yes; then
8518  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
8519fi
8520
8521    fi
8522
8523    # Guillermo Gomez says -lposix is necessary on A/UX.
8524    echo "$as_me:8524: checking for remove" >&5
8525echo $ECHO_N "checking for remove... $ECHO_C" >&6
8526if test "${ac_cv_func_remove+set}" = set; then
8527  echo $ECHO_N "(cached) $ECHO_C" >&6
8528else
8529  cat >conftest.$ac_ext <<_ACEOF
8530#line 8530 "configure"
8531#include "confdefs.h"
8532/* System header to define __stub macros and hopefully few prototypes,
8533    which can conflict with char remove (); below.  */
8534#include <assert.h>
8535/* Override any gcc2 internal prototype to avoid an error.  */
8536#ifdef __cplusplus
8537extern "C"
8538#endif
8539/* We use char because int might match the return type of a gcc2
8540   builtin and then its argument prototype would still apply.  */
8541char remove ();
8542char (*f) ();
8543
8544int
8545main ()
8546{
8547/* The GNU C library defines this for functions which it implements
8548    to always fail with ENOSYS.  Some functions are actually named
8549    something starting with __ and the normal name is an alias.  */
8550#if defined (__stub_remove) || defined (__stub___remove)
8551choke me
8552#else
8553f = remove; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
8554#endif
8555
8556  ;
8557  return 0;
8558}
8559_ACEOF
8560rm -f conftest.$ac_objext conftest$ac_exeext
8561if { (eval echo "$as_me:8561: \"$ac_link\"") >&5
8562  (eval $ac_link) 2>&5
8563  ac_status=$?
8564  echo "$as_me:8564: \$? = $ac_status" >&5
8565  (exit $ac_status); } &&
8566         { ac_try='test -s conftest$ac_exeext'
8567  { (eval echo "$as_me:8567: \"$ac_try\"") >&5
8568  (eval $ac_try) 2>&5
8569  ac_status=$?
8570  echo "$as_me:8570: \$? = $ac_status" >&5
8571  (exit $ac_status); }; }; then
8572  ac_cv_func_remove=yes
8573else
8574  echo "$as_me: failed program was:" >&5
8575cat conftest.$ac_ext >&5
8576ac_cv_func_remove=no
8577fi
8578rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8579fi
8580echo "$as_me:8580: result: $ac_cv_func_remove" >&5
8581echo "${ECHO_T}$ac_cv_func_remove" >&6
8582
8583    if test $ac_cv_func_remove = no; then
8584      echo "$as_me:8584: checking for remove in -lposix" >&5
8585echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6
8586if test "${ac_cv_lib_posix_remove+set}" = set; then
8587  echo $ECHO_N "(cached) $ECHO_C" >&6
8588else
8589  ac_check_lib_save_LIBS=$LIBS
8590LIBS="-lposix  $LIBS"
8591cat >conftest.$ac_ext <<_ACEOF
8592#line 8592 "configure"
8593#include "confdefs.h"
8594
8595/* Override any gcc2 internal prototype to avoid an error.  */
8596#ifdef __cplusplus
8597extern "C"
8598#endif
8599/* We use char because int might match the return type of a gcc2
8600   builtin and then its argument prototype would still apply.  */
8601char remove ();
8602int
8603main ()
8604{
8605remove ();
8606  ;
8607  return 0;
8608}
8609_ACEOF
8610rm -f conftest.$ac_objext conftest$ac_exeext
8611if { (eval echo "$as_me:8611: \"$ac_link\"") >&5
8612  (eval $ac_link) 2>&5
8613  ac_status=$?
8614  echo "$as_me:8614: \$? = $ac_status" >&5
8615  (exit $ac_status); } &&
8616         { ac_try='test -s conftest$ac_exeext'
8617  { (eval echo "$as_me:8617: \"$ac_try\"") >&5
8618  (eval $ac_try) 2>&5
8619  ac_status=$?
8620  echo "$as_me:8620: \$? = $ac_status" >&5
8621  (exit $ac_status); }; }; then
8622  ac_cv_lib_posix_remove=yes
8623else
8624  echo "$as_me: failed program was:" >&5
8625cat conftest.$ac_ext >&5
8626ac_cv_lib_posix_remove=no
8627fi
8628rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8629LIBS=$ac_check_lib_save_LIBS
8630fi
8631echo "$as_me:8631: result: $ac_cv_lib_posix_remove" >&5
8632echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6
8633if test $ac_cv_lib_posix_remove = yes; then
8634  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
8635fi
8636
8637    fi
8638
8639    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
8640    echo "$as_me:8640: checking for shmat" >&5
8641echo $ECHO_N "checking for shmat... $ECHO_C" >&6
8642if test "${ac_cv_func_shmat+set}" = set; then
8643  echo $ECHO_N "(cached) $ECHO_C" >&6
8644else
8645  cat >conftest.$ac_ext <<_ACEOF
8646#line 8646 "configure"
8647#include "confdefs.h"
8648/* System header to define __stub macros and hopefully few prototypes,
8649    which can conflict with char shmat (); below.  */
8650#include <assert.h>
8651/* Override any gcc2 internal prototype to avoid an error.  */
8652#ifdef __cplusplus
8653extern "C"
8654#endif
8655/* We use char because int might match the return type of a gcc2
8656   builtin and then its argument prototype would still apply.  */
8657char shmat ();
8658char (*f) ();
8659
8660int
8661main ()
8662{
8663/* The GNU C library defines this for functions which it implements
8664    to always fail with ENOSYS.  Some functions are actually named
8665    something starting with __ and the normal name is an alias.  */
8666#if defined (__stub_shmat) || defined (__stub___shmat)
8667choke me
8668#else
8669f = shmat; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
8670#endif
8671
8672  ;
8673  return 0;
8674}
8675_ACEOF
8676rm -f conftest.$ac_objext conftest$ac_exeext
8677if { (eval echo "$as_me:8677: \"$ac_link\"") >&5
8678  (eval $ac_link) 2>&5
8679  ac_status=$?
8680  echo "$as_me:8680: \$? = $ac_status" >&5
8681  (exit $ac_status); } &&
8682         { ac_try='test -s conftest$ac_exeext'
8683  { (eval echo "$as_me:8683: \"$ac_try\"") >&5
8684  (eval $ac_try) 2>&5
8685  ac_status=$?
8686  echo "$as_me:8686: \$? = $ac_status" >&5
8687  (exit $ac_status); }; }; then
8688  ac_cv_func_shmat=yes
8689else
8690  echo "$as_me: failed program was:" >&5
8691cat conftest.$ac_ext >&5
8692ac_cv_func_shmat=no
8693fi
8694rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8695fi
8696echo "$as_me:8696: result: $ac_cv_func_shmat" >&5
8697echo "${ECHO_T}$ac_cv_func_shmat" >&6
8698
8699    if test $ac_cv_func_shmat = no; then
8700      echo "$as_me:8700: checking for shmat in -lipc" >&5
8701echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6
8702if test "${ac_cv_lib_ipc_shmat+set}" = set; then
8703  echo $ECHO_N "(cached) $ECHO_C" >&6
8704else
8705  ac_check_lib_save_LIBS=$LIBS
8706LIBS="-lipc  $LIBS"
8707cat >conftest.$ac_ext <<_ACEOF
8708#line 8708 "configure"
8709#include "confdefs.h"
8710
8711/* Override any gcc2 internal prototype to avoid an error.  */
8712#ifdef __cplusplus
8713extern "C"
8714#endif
8715/* We use char because int might match the return type of a gcc2
8716   builtin and then its argument prototype would still apply.  */
8717char shmat ();
8718int
8719main ()
8720{
8721shmat ();
8722  ;
8723  return 0;
8724}
8725_ACEOF
8726rm -f conftest.$ac_objext conftest$ac_exeext
8727if { (eval echo "$as_me:8727: \"$ac_link\"") >&5
8728  (eval $ac_link) 2>&5
8729  ac_status=$?
8730  echo "$as_me:8730: \$? = $ac_status" >&5
8731  (exit $ac_status); } &&
8732         { ac_try='test -s conftest$ac_exeext'
8733  { (eval echo "$as_me:8733: \"$ac_try\"") >&5
8734  (eval $ac_try) 2>&5
8735  ac_status=$?
8736  echo "$as_me:8736: \$? = $ac_status" >&5
8737  (exit $ac_status); }; }; then
8738  ac_cv_lib_ipc_shmat=yes
8739else
8740  echo "$as_me: failed program was:" >&5
8741cat conftest.$ac_ext >&5
8742ac_cv_lib_ipc_shmat=no
8743fi
8744rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8745LIBS=$ac_check_lib_save_LIBS
8746fi
8747echo "$as_me:8747: result: $ac_cv_lib_ipc_shmat" >&5
8748echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6
8749if test $ac_cv_lib_ipc_shmat = yes; then
8750  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
8751fi
8752
8753    fi
8754  fi
8755
8756  # Check for libraries that X11R6 Xt/Xaw programs need.
8757  ac_save_LDFLAGS=$LDFLAGS
8758  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
8759  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
8760  # check for ICE first), but we must link in the order -lSM -lICE or
8761  # we get undefined symbols.  So assume we have SM if we have ICE.
8762  # These have to be linked with before -lX11, unlike the other
8763  # libraries we check for below, so use a different variable.
8764  # John Interrante, Karl Berry
8765  echo "$as_me:8765: checking for IceConnectionNumber in -lICE" >&5
8766echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6
8767if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then
8768  echo $ECHO_N "(cached) $ECHO_C" >&6
8769else
8770  ac_check_lib_save_LIBS=$LIBS
8771LIBS="-lICE $X_EXTRA_LIBS $LIBS"
8772cat >conftest.$ac_ext <<_ACEOF
8773#line 8773 "configure"
8774#include "confdefs.h"
8775
8776/* Override any gcc2 internal prototype to avoid an error.  */
8777#ifdef __cplusplus
8778extern "C"
8779#endif
8780/* We use char because int might match the return type of a gcc2
8781   builtin and then its argument prototype would still apply.  */
8782char IceConnectionNumber ();
8783int
8784main ()
8785{
8786IceConnectionNumber ();
8787  ;
8788  return 0;
8789}
8790_ACEOF
8791rm -f conftest.$ac_objext conftest$ac_exeext
8792if { (eval echo "$as_me:8792: \"$ac_link\"") >&5
8793  (eval $ac_link) 2>&5
8794  ac_status=$?
8795  echo "$as_me:8795: \$? = $ac_status" >&5
8796  (exit $ac_status); } &&
8797         { ac_try='test -s conftest$ac_exeext'
8798  { (eval echo "$as_me:8798: \"$ac_try\"") >&5
8799  (eval $ac_try) 2>&5
8800  ac_status=$?
8801  echo "$as_me:8801: \$? = $ac_status" >&5
8802  (exit $ac_status); }; }; then
8803  ac_cv_lib_ICE_IceConnectionNumber=yes
8804else
8805  echo "$as_me: failed program was:" >&5
8806cat conftest.$ac_ext >&5
8807ac_cv_lib_ICE_IceConnectionNumber=no
8808fi
8809rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8810LIBS=$ac_check_lib_save_LIBS
8811fi
8812echo "$as_me:8812: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
8813echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6
8814if test $ac_cv_lib_ICE_IceConnectionNumber = yes; then
8815  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
8816fi
8817
8818  LDFLAGS=$ac_save_LDFLAGS
8819
8820fi
8821
8822echo "$as_me:8822: checking if you want to use pkg-config" >&5
8823echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
8824
8825# Check whether --with-pkg-config or --without-pkg-config was given.
8826if test "${with_pkg_config+set}" = set; then
8827  withval="$with_pkg_config"
8828  cf_pkg_config=$withval
8829else
8830  cf_pkg_config=yes
8831fi;
8832echo "$as_me:8832: result: $cf_pkg_config" >&5
8833echo "${ECHO_T}$cf_pkg_config" >&6
8834
8835case $cf_pkg_config in #(vi
8836no) #(vi
8837	PKG_CONFIG=none
8838	;;
8839yes) #(vi
8840
8841if test -n "$ac_tool_prefix"; then
8842  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
8843set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
8844echo "$as_me:8844: checking for $ac_word" >&5
8845echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8846if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
8847  echo $ECHO_N "(cached) $ECHO_C" >&6
8848else
8849  case $PKG_CONFIG in
8850  [\\/]* | ?:[\\/]*)
8851  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8852  ;;
8853  *)
8854  ac_save_IFS=$IFS; IFS=$ac_path_separator
8855ac_dummy="$PATH"
8856for ac_dir in $ac_dummy; do
8857  IFS=$ac_save_IFS
8858  test -z "$ac_dir" && ac_dir=.
8859  if $as_executable_p "$ac_dir/$ac_word"; then
8860   ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
8861   echo "$as_me:8861: found $ac_dir/$ac_word" >&5
8862   break
8863fi
8864done
8865
8866  ;;
8867esac
8868fi
8869PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8870
8871if test -n "$PKG_CONFIG"; then
8872  echo "$as_me:8872: result: $PKG_CONFIG" >&5
8873echo "${ECHO_T}$PKG_CONFIG" >&6
8874else
8875  echo "$as_me:8875: result: no" >&5
8876echo "${ECHO_T}no" >&6
8877fi
8878
8879fi
8880if test -z "$ac_cv_path_PKG_CONFIG"; then
8881  ac_pt_PKG_CONFIG=$PKG_CONFIG
8882  # Extract the first word of "pkg-config", so it can be a program name with args.
8883set dummy pkg-config; ac_word=$2
8884echo "$as_me:8884: checking for $ac_word" >&5
8885echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8886if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
8887  echo $ECHO_N "(cached) $ECHO_C" >&6
8888else
8889  case $ac_pt_PKG_CONFIG in
8890  [\\/]* | ?:[\\/]*)
8891  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
8892  ;;
8893  *)
8894  ac_save_IFS=$IFS; IFS=$ac_path_separator
8895ac_dummy="$PATH"
8896for ac_dir in $ac_dummy; do
8897  IFS=$ac_save_IFS
8898  test -z "$ac_dir" && ac_dir=.
8899  if $as_executable_p "$ac_dir/$ac_word"; then
8900   ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
8901   echo "$as_me:8901: found $ac_dir/$ac_word" >&5
8902   break
8903fi
8904done
8905
8906  test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
8907  ;;
8908esac
8909fi
8910ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
8911
8912if test -n "$ac_pt_PKG_CONFIG"; then
8913  echo "$as_me:8913: result: $ac_pt_PKG_CONFIG" >&5
8914echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
8915else
8916  echo "$as_me:8916: result: no" >&5
8917echo "${ECHO_T}no" >&6
8918fi
8919
8920  PKG_CONFIG=$ac_pt_PKG_CONFIG
8921else
8922  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
8923fi
8924
8925	;;
8926*)
8927	PKG_CONFIG=$withval
8928	;;
8929esac
8930
8931test -z "$PKG_CONFIG" && PKG_CONFIG=none
8932if test "$PKG_CONFIG" != none ; then
8933
8934if test "x$prefix" != xNONE; then
8935  cf_path_syntax="$prefix"
8936else
8937  cf_path_syntax="$ac_default_prefix"
8938fi
8939
8940case ".$PKG_CONFIG" in #(vi
8941.\$\(*\)*|.\'*\'*) #(vi
8942  ;;
8943..|./*|.\\*) #(vi
8944  ;;
8945.[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
8946  ;;
8947.\${*prefix}*|.\${*dir}*) #(vi
8948  eval PKG_CONFIG="$PKG_CONFIG"
8949  case ".$PKG_CONFIG" in #(vi
8950  .NONE/*)
8951    PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
8952    ;;
8953  esac
8954  ;; #(vi
8955.no|.NONE/*)
8956  PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
8957  ;;
8958*)
8959  { { echo "$as_me:8959: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
8960echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
8961   { (exit 1); exit 1; }; }
8962  ;;
8963esac
8964
8965fi
8966
8967cf_have_X_LIBS=no
8968
8969if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xt; then
8970	test -n "$verbose" && echo "	found package xt" 1>&6
8971
8972echo "${as_me:-configure}:8972: testing found package xt ..." 1>&5
8973
8974	cf_pkgconfig_incs="`$PKG_CONFIG --cflags xt 2>/dev/null`"
8975	cf_pkgconfig_libs="`$PKG_CONFIG --libs   xt 2>/dev/null`"
8976	test -n "$verbose" && echo "	package xt CFLAGS: $cf_pkgconfig_incs" 1>&6
8977
8978echo "${as_me:-configure}:8978: testing package xt CFLAGS: $cf_pkgconfig_incs ..." 1>&5
8979
8980	test -n "$verbose" && echo "	package xt LIBS: $cf_pkgconfig_libs" 1>&6
8981
8982echo "${as_me:-configure}:8982: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5
8983
8984cf_fix_cppflags=no
8985cf_new_cflags=
8986cf_new_cppflags=
8987cf_new_extra_cppflags=
8988
8989for cf_add_cflags in $cf_pkgconfig_incs
8990do
8991case $cf_fix_cppflags in
8992no)
8993	case $cf_add_cflags in #(vi
8994	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8995		case $cf_add_cflags in
8996		-D*)
8997			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8998
8999			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
9000				&& test -z "${cf_tst_cflags}" \
9001				&& cf_fix_cppflags=yes
9002
9003			if test $cf_fix_cppflags = yes ; then
9004				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9005				continue
9006			elif test "${cf_tst_cflags}" = "\"'" ; then
9007				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9008				continue
9009			fi
9010			;;
9011		esac
9012		case "$CPPFLAGS" in
9013		*$cf_add_cflags) #(vi
9014			;;
9015		*) #(vi
9016			case $cf_add_cflags in #(vi
9017			-D*)
9018				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9019
9020CPPFLAGS=`echo "$CPPFLAGS" | \
9021	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
9022		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
9023
9024				;;
9025			esac
9026			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
9027			;;
9028		esac
9029		;;
9030	*)
9031		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
9032		;;
9033	esac
9034	;;
9035yes)
9036	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9037
9038	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9039
9040	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
9041		&& test -z "${cf_tst_cflags}" \
9042		&& cf_fix_cppflags=no
9043	;;
9044esac
9045done
9046
9047if test -n "$cf_new_cflags" ; then
9048
9049	CFLAGS="$CFLAGS $cf_new_cflags"
9050fi
9051
9052if test -n "$cf_new_cppflags" ; then
9053
9054	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
9055fi
9056
9057if test -n "$cf_new_extra_cppflags" ; then
9058
9059	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
9060fi
9061
9062	LIBS="$cf_pkgconfig_libs $LIBS"
9063
9064	case "x$LIBS" in #(vi
9065	*-lX11*) #(vi
9066		;;
9067	*)
9068# we have an "xt" package, but it may omit Xt's dependency on X11
9069echo "$as_me:9069: checking for usable X dependency" >&5
9070echo $ECHO_N "checking for usable X dependency... $ECHO_C" >&6
9071if test "${cf_cv_xt_x11_compat+set}" = set; then
9072  echo $ECHO_N "(cached) $ECHO_C" >&6
9073else
9074
9075cat >conftest.$ac_ext <<_ACEOF
9076#line 9076 "configure"
9077#include "confdefs.h"
9078
9079#include <X11/Xlib.h>
9080
9081int
9082main ()
9083{
9084
9085	int rc1 = XDrawLine((Display*) 0, (Drawable) 0, (GC) 0, 0, 0, 0, 0);
9086	int rc2 = XClearWindow((Display*) 0, (Window) 0);
9087	int rc3 = XMoveWindow((Display*) 0, (Window) 0, 0, 0);
9088	int rc4 = XMoveResizeWindow((Display*)0, (Window)0, 0, 0, 0, 0);
9089
9090  ;
9091  return 0;
9092}
9093_ACEOF
9094rm -f conftest.$ac_objext conftest$ac_exeext
9095if { (eval echo "$as_me:9095: \"$ac_link\"") >&5
9096  (eval $ac_link) 2>&5
9097  ac_status=$?
9098  echo "$as_me:9098: \$? = $ac_status" >&5
9099  (exit $ac_status); } &&
9100         { ac_try='test -s conftest$ac_exeext'
9101  { (eval echo "$as_me:9101: \"$ac_try\"") >&5
9102  (eval $ac_try) 2>&5
9103  ac_status=$?
9104  echo "$as_me:9104: \$? = $ac_status" >&5
9105  (exit $ac_status); }; }; then
9106  cf_cv_xt_x11_compat=yes
9107else
9108  echo "$as_me: failed program was:" >&5
9109cat conftest.$ac_ext >&5
9110cf_cv_xt_x11_compat=no
9111fi
9112rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9113fi
9114echo "$as_me:9114: result: $cf_cv_xt_x11_compat" >&5
9115echo "${ECHO_T}$cf_cv_xt_x11_compat" >&6
9116		if test "$cf_cv_xt_x11_compat" = no
9117		then
9118			test -n "$verbose" && echo "	work around broken X11 dependency" 1>&6
9119
9120echo "${as_me:-configure}:9120: testing work around broken X11 dependency ..." 1>&5
9121
9122			# 2010/11/19 - good enough until a working Xt on Xcb is delivered.
9123
9124if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists x11; then
9125	test -n "$verbose" && echo "	found package x11" 1>&6
9126
9127echo "${as_me:-configure}:9127: testing found package x11 ..." 1>&5
9128
9129	cf_pkgconfig_incs="`$PKG_CONFIG --cflags x11 2>/dev/null`"
9130	cf_pkgconfig_libs="`$PKG_CONFIG --libs   x11 2>/dev/null`"
9131	test -n "$verbose" && echo "	package x11 CFLAGS: $cf_pkgconfig_incs" 1>&6
9132
9133echo "${as_me:-configure}:9133: testing package x11 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
9134
9135	test -n "$verbose" && echo "	package x11 LIBS: $cf_pkgconfig_libs" 1>&6
9136
9137echo "${as_me:-configure}:9137: testing package x11 LIBS: $cf_pkgconfig_libs ..." 1>&5
9138
9139cf_fix_cppflags=no
9140cf_new_cflags=
9141cf_new_cppflags=
9142cf_new_extra_cppflags=
9143
9144for cf_add_cflags in $cf_pkgconfig_incs
9145do
9146case $cf_fix_cppflags in
9147no)
9148	case $cf_add_cflags in #(vi
9149	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
9150		case $cf_add_cflags in
9151		-D*)
9152			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9153
9154			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
9155				&& test -z "${cf_tst_cflags}" \
9156				&& cf_fix_cppflags=yes
9157
9158			if test $cf_fix_cppflags = yes ; then
9159				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9160				continue
9161			elif test "${cf_tst_cflags}" = "\"'" ; then
9162				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9163				continue
9164			fi
9165			;;
9166		esac
9167		case "$CPPFLAGS" in
9168		*$cf_add_cflags) #(vi
9169			;;
9170		*) #(vi
9171			case $cf_add_cflags in #(vi
9172			-D*)
9173				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9174
9175CPPFLAGS=`echo "$CPPFLAGS" | \
9176	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
9177		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
9178
9179				;;
9180			esac
9181			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
9182			;;
9183		esac
9184		;;
9185	*)
9186		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
9187		;;
9188	esac
9189	;;
9190yes)
9191	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9192
9193	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9194
9195	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
9196		&& test -z "${cf_tst_cflags}" \
9197		&& cf_fix_cppflags=no
9198	;;
9199esac
9200done
9201
9202if test -n "$cf_new_cflags" ; then
9203
9204	CFLAGS="$CFLAGS $cf_new_cflags"
9205fi
9206
9207if test -n "$cf_new_cppflags" ; then
9208
9209	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
9210fi
9211
9212if test -n "$cf_new_extra_cppflags" ; then
9213
9214	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
9215fi
9216
9217	LIBS="$cf_pkgconfig_libs $LIBS"
9218	:
9219else
9220
9221test -n "$verbose" && echo "	...before $LIBS" 1>&6
9222
9223echo "${as_me:-configure}:9223: testing ...before $LIBS ..." 1>&5
9224
9225LIBS=`echo "$LIBS" | sed -e "s/[ 	][ 	]*/ /g" -e "s,-lXt ,-lXt -lX11 ," -e 's/  / /g'`
9226test -n "$verbose" && echo "	...after  $LIBS" 1>&6
9227
9228echo "${as_me:-configure}:9228: testing ...after  $LIBS ..." 1>&5
9229
9230fi
9231
9232		fi
9233		;;
9234	esac
9235
9236echo "$as_me:9236: checking for usable X Toolkit package" >&5
9237echo $ECHO_N "checking for usable X Toolkit package... $ECHO_C" >&6
9238if test "${cf_cv_xt_ice_compat+set}" = set; then
9239  echo $ECHO_N "(cached) $ECHO_C" >&6
9240else
9241
9242cat >conftest.$ac_ext <<_ACEOF
9243#line 9243 "configure"
9244#include "confdefs.h"
9245
9246#include <X11/Shell.h>
9247
9248int
9249main ()
9250{
9251int num = IceConnectionNumber(0)
9252
9253  ;
9254  return 0;
9255}
9256_ACEOF
9257rm -f conftest.$ac_objext conftest$ac_exeext
9258if { (eval echo "$as_me:9258: \"$ac_link\"") >&5
9259  (eval $ac_link) 2>&5
9260  ac_status=$?
9261  echo "$as_me:9261: \$? = $ac_status" >&5
9262  (exit $ac_status); } &&
9263         { ac_try='test -s conftest$ac_exeext'
9264  { (eval echo "$as_me:9264: \"$ac_try\"") >&5
9265  (eval $ac_try) 2>&5
9266  ac_status=$?
9267  echo "$as_me:9267: \$? = $ac_status" >&5
9268  (exit $ac_status); }; }; then
9269  cf_cv_xt_ice_compat=yes
9270else
9271  echo "$as_me: failed program was:" >&5
9272cat conftest.$ac_ext >&5
9273cf_cv_xt_ice_compat=no
9274fi
9275rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9276fi
9277echo "$as_me:9277: result: $cf_cv_xt_ice_compat" >&5
9278echo "${ECHO_T}$cf_cv_xt_ice_compat" >&6
9279
9280	if test "$cf_cv_xt_ice_compat" = no
9281	then
9282		# workaround for broken ".pc" files used for X Toolkit.
9283		case "x$X_PRE_LIBS" in #(vi
9284		*-lICE*)
9285			case "x$LIBS" in #(vi
9286			*-lICE*) #(vi
9287				;;
9288			*)
9289				test -n "$verbose" && echo "	work around broken ICE dependency" 1>&6
9290
9291echo "${as_me:-configure}:9291: testing work around broken ICE dependency ..." 1>&5
9292
9293if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists ice; then
9294	test -n "$verbose" && echo "	found package ice" 1>&6
9295
9296echo "${as_me:-configure}:9296: testing found package ice ..." 1>&5
9297
9298	cf_pkgconfig_incs="`$PKG_CONFIG --cflags ice 2>/dev/null`"
9299	cf_pkgconfig_libs="`$PKG_CONFIG --libs   ice 2>/dev/null`"
9300	test -n "$verbose" && echo "	package ice CFLAGS: $cf_pkgconfig_incs" 1>&6
9301
9302echo "${as_me:-configure}:9302: testing package ice CFLAGS: $cf_pkgconfig_incs ..." 1>&5
9303
9304	test -n "$verbose" && echo "	package ice LIBS: $cf_pkgconfig_libs" 1>&6
9305
9306echo "${as_me:-configure}:9306: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5
9307
9308cf_fix_cppflags=no
9309cf_new_cflags=
9310cf_new_cppflags=
9311cf_new_extra_cppflags=
9312
9313for cf_add_cflags in $cf_pkgconfig_incs
9314do
9315case $cf_fix_cppflags in
9316no)
9317	case $cf_add_cflags in #(vi
9318	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
9319		case $cf_add_cflags in
9320		-D*)
9321			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9322
9323			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
9324				&& test -z "${cf_tst_cflags}" \
9325				&& cf_fix_cppflags=yes
9326
9327			if test $cf_fix_cppflags = yes ; then
9328				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9329				continue
9330			elif test "${cf_tst_cflags}" = "\"'" ; then
9331				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9332				continue
9333			fi
9334			;;
9335		esac
9336		case "$CPPFLAGS" in
9337		*$cf_add_cflags) #(vi
9338			;;
9339		*) #(vi
9340			case $cf_add_cflags in #(vi
9341			-D*)
9342				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9343
9344CPPFLAGS=`echo "$CPPFLAGS" | \
9345	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
9346		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
9347
9348				;;
9349			esac
9350			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
9351			;;
9352		esac
9353		;;
9354	*)
9355		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
9356		;;
9357	esac
9358	;;
9359yes)
9360	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9361
9362	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9363
9364	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
9365		&& test -z "${cf_tst_cflags}" \
9366		&& cf_fix_cppflags=no
9367	;;
9368esac
9369done
9370
9371if test -n "$cf_new_cflags" ; then
9372
9373	CFLAGS="$CFLAGS $cf_new_cflags"
9374fi
9375
9376if test -n "$cf_new_cppflags" ; then
9377
9378	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
9379fi
9380
9381if test -n "$cf_new_extra_cppflags" ; then
9382
9383	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
9384fi
9385
9386	LIBS="$cf_pkgconfig_libs $LIBS"
9387
9388if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists sm; then
9389	test -n "$verbose" && echo "	found package sm" 1>&6
9390
9391echo "${as_me:-configure}:9391: testing found package sm ..." 1>&5
9392
9393	cf_pkgconfig_incs="`$PKG_CONFIG --cflags sm 2>/dev/null`"
9394	cf_pkgconfig_libs="`$PKG_CONFIG --libs   sm 2>/dev/null`"
9395	test -n "$verbose" && echo "	package sm CFLAGS: $cf_pkgconfig_incs" 1>&6
9396
9397echo "${as_me:-configure}:9397: testing package sm CFLAGS: $cf_pkgconfig_incs ..." 1>&5
9398
9399	test -n "$verbose" && echo "	package sm LIBS: $cf_pkgconfig_libs" 1>&6
9400
9401echo "${as_me:-configure}:9401: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5
9402
9403cf_fix_cppflags=no
9404cf_new_cflags=
9405cf_new_cppflags=
9406cf_new_extra_cppflags=
9407
9408for cf_add_cflags in $cf_pkgconfig_incs
9409do
9410case $cf_fix_cppflags in
9411no)
9412	case $cf_add_cflags in #(vi
9413	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
9414		case $cf_add_cflags in
9415		-D*)
9416			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9417
9418			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
9419				&& test -z "${cf_tst_cflags}" \
9420				&& cf_fix_cppflags=yes
9421
9422			if test $cf_fix_cppflags = yes ; then
9423				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9424				continue
9425			elif test "${cf_tst_cflags}" = "\"'" ; then
9426				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9427				continue
9428			fi
9429			;;
9430		esac
9431		case "$CPPFLAGS" in
9432		*$cf_add_cflags) #(vi
9433			;;
9434		*) #(vi
9435			case $cf_add_cflags in #(vi
9436			-D*)
9437				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9438
9439CPPFLAGS=`echo "$CPPFLAGS" | \
9440	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
9441		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
9442
9443				;;
9444			esac
9445			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
9446			;;
9447		esac
9448		;;
9449	*)
9450		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
9451		;;
9452	esac
9453	;;
9454yes)
9455	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9456
9457	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9458
9459	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
9460		&& test -z "${cf_tst_cflags}" \
9461		&& cf_fix_cppflags=no
9462	;;
9463esac
9464done
9465
9466if test -n "$cf_new_cflags" ; then
9467
9468	CFLAGS="$CFLAGS $cf_new_cflags"
9469fi
9470
9471if test -n "$cf_new_cppflags" ; then
9472
9473	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
9474fi
9475
9476if test -n "$cf_new_extra_cppflags" ; then
9477
9478	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
9479fi
9480
9481	LIBS="$cf_pkgconfig_libs $LIBS"
9482	:
9483else
9484	:
9485fi
9486
9487else
9488
9489test -n "$verbose" && echo "	...before $LIBS" 1>&6
9490
9491echo "${as_me:-configure}:9491: testing ...before $LIBS ..." 1>&5
9492
9493LIBS=`echo "$LIBS" | sed -e "s/[ 	][ 	]*/ /g" -e "s,-lXt ,-lXt $X_PRE_LIBS ," -e 's/  / /g'`
9494test -n "$verbose" && echo "	...after  $LIBS" 1>&6
9495
9496echo "${as_me:-configure}:9496: testing ...after  $LIBS ..." 1>&5
9497
9498fi
9499
9500				;;
9501			esac
9502			;;
9503		esac
9504	fi
9505
9506	cf_have_X_LIBS=yes
9507
9508else
9509
9510	LDFLAGS="$X_LIBS $LDFLAGS"
9511
9512test -n "$verbose" && echo "	checking additions to CFLAGS" 1>&6
9513
9514echo "${as_me:-configure}:9514: testing checking additions to CFLAGS ..." 1>&5
9515
9516cf_check_cflags="$CFLAGS"
9517cf_check_cppflags="$CPPFLAGS"
9518
9519cf_fix_cppflags=no
9520cf_new_cflags=
9521cf_new_cppflags=
9522cf_new_extra_cppflags=
9523
9524for cf_add_cflags in $X_CFLAGS
9525do
9526case $cf_fix_cppflags in
9527no)
9528	case $cf_add_cflags in #(vi
9529	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
9530		case $cf_add_cflags in
9531		-D*)
9532			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9533
9534			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
9535				&& test -z "${cf_tst_cflags}" \
9536				&& cf_fix_cppflags=yes
9537
9538			if test $cf_fix_cppflags = yes ; then
9539				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9540				continue
9541			elif test "${cf_tst_cflags}" = "\"'" ; then
9542				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9543				continue
9544			fi
9545			;;
9546		esac
9547		case "$CPPFLAGS" in
9548		*$cf_add_cflags) #(vi
9549			;;
9550		*) #(vi
9551			case $cf_add_cflags in #(vi
9552			-D*)
9553				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9554
9555CPPFLAGS=`echo "$CPPFLAGS" | \
9556	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
9557		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
9558
9559				;;
9560			esac
9561			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
9562			;;
9563		esac
9564		;;
9565	*)
9566		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
9567		;;
9568	esac
9569	;;
9570yes)
9571	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9572
9573	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9574
9575	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
9576		&& test -z "${cf_tst_cflags}" \
9577		&& cf_fix_cppflags=no
9578	;;
9579esac
9580done
9581
9582if test -n "$cf_new_cflags" ; then
9583	test -n "$verbose" && echo "	add to \$CFLAGS $cf_new_cflags" 1>&6
9584
9585echo "${as_me:-configure}:9585: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
9586
9587	CFLAGS="$CFLAGS $cf_new_cflags"
9588fi
9589
9590if test -n "$cf_new_cppflags" ; then
9591	test -n "$verbose" && echo "	add to \$CPPFLAGS $cf_new_cppflags" 1>&6
9592
9593echo "${as_me:-configure}:9593: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
9594
9595	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
9596fi
9597
9598if test -n "$cf_new_extra_cppflags" ; then
9599	test -n "$verbose" && echo "	add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
9600
9601echo "${as_me:-configure}:9601: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
9602
9603	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
9604fi
9605
9606if test "$cf_check_cflags" != "$CFLAGS" ; then
9607cat >conftest.$ac_ext <<_ACEOF
9608#line 9608 "configure"
9609#include "confdefs.h"
9610#include <stdio.h>
9611int
9612main ()
9613{
9614printf("Hello world");
9615  ;
9616  return 0;
9617}
9618_ACEOF
9619rm -f conftest.$ac_objext conftest$ac_exeext
9620if { (eval echo "$as_me:9620: \"$ac_link\"") >&5
9621  (eval $ac_link) 2>&5
9622  ac_status=$?
9623  echo "$as_me:9623: \$? = $ac_status" >&5
9624  (exit $ac_status); } &&
9625         { ac_try='test -s conftest$ac_exeext'
9626  { (eval echo "$as_me:9626: \"$ac_try\"") >&5
9627  (eval $ac_try) 2>&5
9628  ac_status=$?
9629  echo "$as_me:9629: \$? = $ac_status" >&5
9630  (exit $ac_status); }; }; then
9631  :
9632else
9633  echo "$as_me: failed program was:" >&5
9634cat conftest.$ac_ext >&5
9635test -n "$verbose" && echo "	test-compile failed.  Undoing change to \$CFLAGS" 1>&6
9636
9637echo "${as_me:-configure}:9637: testing test-compile failed.  Undoing change to \$CFLAGS ..." 1>&5
9638
9639	 if test "$cf_check_cppflags" != "$CPPFLAGS" ; then
9640		 test -n "$verbose" && echo "	but keeping change to \$CPPFLAGS" 1>&6
9641
9642echo "${as_me:-configure}:9642: testing but keeping change to \$CPPFLAGS ..." 1>&5
9643
9644	 fi
9645	 CFLAGS="$cf_check_flags"
9646fi
9647rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9648fi
9649
9650	echo "$as_me:9650: checking for XOpenDisplay" >&5
9651echo $ECHO_N "checking for XOpenDisplay... $ECHO_C" >&6
9652if test "${ac_cv_func_XOpenDisplay+set}" = set; then
9653  echo $ECHO_N "(cached) $ECHO_C" >&6
9654else
9655  cat >conftest.$ac_ext <<_ACEOF
9656#line 9656 "configure"
9657#include "confdefs.h"
9658/* System header to define __stub macros and hopefully few prototypes,
9659    which can conflict with char XOpenDisplay (); below.  */
9660#include <assert.h>
9661/* Override any gcc2 internal prototype to avoid an error.  */
9662#ifdef __cplusplus
9663extern "C"
9664#endif
9665/* We use char because int might match the return type of a gcc2
9666   builtin and then its argument prototype would still apply.  */
9667char XOpenDisplay ();
9668char (*f) ();
9669
9670int
9671main ()
9672{
9673/* The GNU C library defines this for functions which it implements
9674    to always fail with ENOSYS.  Some functions are actually named
9675    something starting with __ and the normal name is an alias.  */
9676#if defined (__stub_XOpenDisplay) || defined (__stub___XOpenDisplay)
9677choke me
9678#else
9679f = XOpenDisplay; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
9680#endif
9681
9682  ;
9683  return 0;
9684}
9685_ACEOF
9686rm -f conftest.$ac_objext conftest$ac_exeext
9687if { (eval echo "$as_me:9687: \"$ac_link\"") >&5
9688  (eval $ac_link) 2>&5
9689  ac_status=$?
9690  echo "$as_me:9690: \$? = $ac_status" >&5
9691  (exit $ac_status); } &&
9692         { ac_try='test -s conftest$ac_exeext'
9693  { (eval echo "$as_me:9693: \"$ac_try\"") >&5
9694  (eval $ac_try) 2>&5
9695  ac_status=$?
9696  echo "$as_me:9696: \$? = $ac_status" >&5
9697  (exit $ac_status); }; }; then
9698  ac_cv_func_XOpenDisplay=yes
9699else
9700  echo "$as_me: failed program was:" >&5
9701cat conftest.$ac_ext >&5
9702ac_cv_func_XOpenDisplay=no
9703fi
9704rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9705fi
9706echo "$as_me:9706: result: $ac_cv_func_XOpenDisplay" >&5
9707echo "${ECHO_T}$ac_cv_func_XOpenDisplay" >&6
9708if test $ac_cv_func_XOpenDisplay = yes; then
9709  :
9710else
9711
9712	echo "$as_me:9712: checking for XOpenDisplay in -lX11" >&5
9713echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6
9714if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then
9715  echo $ECHO_N "(cached) $ECHO_C" >&6
9716else
9717  ac_check_lib_save_LIBS=$LIBS
9718LIBS="-lX11 $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
9719cat >conftest.$ac_ext <<_ACEOF
9720#line 9720 "configure"
9721#include "confdefs.h"
9722
9723/* Override any gcc2 internal prototype to avoid an error.  */
9724#ifdef __cplusplus
9725extern "C"
9726#endif
9727/* We use char because int might match the return type of a gcc2
9728   builtin and then its argument prototype would still apply.  */
9729char XOpenDisplay ();
9730int
9731main ()
9732{
9733XOpenDisplay ();
9734  ;
9735  return 0;
9736}
9737_ACEOF
9738rm -f conftest.$ac_objext conftest$ac_exeext
9739if { (eval echo "$as_me:9739: \"$ac_link\"") >&5
9740  (eval $ac_link) 2>&5
9741  ac_status=$?
9742  echo "$as_me:9742: \$? = $ac_status" >&5
9743  (exit $ac_status); } &&
9744         { ac_try='test -s conftest$ac_exeext'
9745  { (eval echo "$as_me:9745: \"$ac_try\"") >&5
9746  (eval $ac_try) 2>&5
9747  ac_status=$?
9748  echo "$as_me:9748: \$? = $ac_status" >&5
9749  (exit $ac_status); }; }; then
9750  ac_cv_lib_X11_XOpenDisplay=yes
9751else
9752  echo "$as_me: failed program was:" >&5
9753cat conftest.$ac_ext >&5
9754ac_cv_lib_X11_XOpenDisplay=no
9755fi
9756rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9757LIBS=$ac_check_lib_save_LIBS
9758fi
9759echo "$as_me:9759: result: $ac_cv_lib_X11_XOpenDisplay" >&5
9760echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6
9761if test $ac_cv_lib_X11_XOpenDisplay = yes; then
9762  LIBS="-lX11 $LIBS"
9763fi
9764
9765fi
9766
9767	echo "$as_me:9767: checking for XtAppInitialize" >&5
9768echo $ECHO_N "checking for XtAppInitialize... $ECHO_C" >&6
9769if test "${ac_cv_func_XtAppInitialize+set}" = set; then
9770  echo $ECHO_N "(cached) $ECHO_C" >&6
9771else
9772  cat >conftest.$ac_ext <<_ACEOF
9773#line 9773 "configure"
9774#include "confdefs.h"
9775/* System header to define __stub macros and hopefully few prototypes,
9776    which can conflict with char XtAppInitialize (); below.  */
9777#include <assert.h>
9778/* Override any gcc2 internal prototype to avoid an error.  */
9779#ifdef __cplusplus
9780extern "C"
9781#endif
9782/* We use char because int might match the return type of a gcc2
9783   builtin and then its argument prototype would still apply.  */
9784char XtAppInitialize ();
9785char (*f) ();
9786
9787int
9788main ()
9789{
9790/* The GNU C library defines this for functions which it implements
9791    to always fail with ENOSYS.  Some functions are actually named
9792    something starting with __ and the normal name is an alias.  */
9793#if defined (__stub_XtAppInitialize) || defined (__stub___XtAppInitialize)
9794choke me
9795#else
9796f = XtAppInitialize; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
9797#endif
9798
9799  ;
9800  return 0;
9801}
9802_ACEOF
9803rm -f conftest.$ac_objext conftest$ac_exeext
9804if { (eval echo "$as_me:9804: \"$ac_link\"") >&5
9805  (eval $ac_link) 2>&5
9806  ac_status=$?
9807  echo "$as_me:9807: \$? = $ac_status" >&5
9808  (exit $ac_status); } &&
9809         { ac_try='test -s conftest$ac_exeext'
9810  { (eval echo "$as_me:9810: \"$ac_try\"") >&5
9811  (eval $ac_try) 2>&5
9812  ac_status=$?
9813  echo "$as_me:9813: \$? = $ac_status" >&5
9814  (exit $ac_status); }; }; then
9815  ac_cv_func_XtAppInitialize=yes
9816else
9817  echo "$as_me: failed program was:" >&5
9818cat conftest.$ac_ext >&5
9819ac_cv_func_XtAppInitialize=no
9820fi
9821rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9822fi
9823echo "$as_me:9823: result: $ac_cv_func_XtAppInitialize" >&5
9824echo "${ECHO_T}$ac_cv_func_XtAppInitialize" >&6
9825if test $ac_cv_func_XtAppInitialize = yes; then
9826  :
9827else
9828
9829	echo "$as_me:9829: checking for XtAppInitialize in -lXt" >&5
9830echo $ECHO_N "checking for XtAppInitialize in -lXt... $ECHO_C" >&6
9831if test "${ac_cv_lib_Xt_XtAppInitialize+set}" = set; then
9832  echo $ECHO_N "(cached) $ECHO_C" >&6
9833else
9834  ac_check_lib_save_LIBS=$LIBS
9835LIBS="-lXt $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
9836cat >conftest.$ac_ext <<_ACEOF
9837#line 9837 "configure"
9838#include "confdefs.h"
9839
9840/* Override any gcc2 internal prototype to avoid an error.  */
9841#ifdef __cplusplus
9842extern "C"
9843#endif
9844/* We use char because int might match the return type of a gcc2
9845   builtin and then its argument prototype would still apply.  */
9846char XtAppInitialize ();
9847int
9848main ()
9849{
9850XtAppInitialize ();
9851  ;
9852  return 0;
9853}
9854_ACEOF
9855rm -f conftest.$ac_objext conftest$ac_exeext
9856if { (eval echo "$as_me:9856: \"$ac_link\"") >&5
9857  (eval $ac_link) 2>&5
9858  ac_status=$?
9859  echo "$as_me:9859: \$? = $ac_status" >&5
9860  (exit $ac_status); } &&
9861         { ac_try='test -s conftest$ac_exeext'
9862  { (eval echo "$as_me:9862: \"$ac_try\"") >&5
9863  (eval $ac_try) 2>&5
9864  ac_status=$?
9865  echo "$as_me:9865: \$? = $ac_status" >&5
9866  (exit $ac_status); }; }; then
9867  ac_cv_lib_Xt_XtAppInitialize=yes
9868else
9869  echo "$as_me: failed program was:" >&5
9870cat conftest.$ac_ext >&5
9871ac_cv_lib_Xt_XtAppInitialize=no
9872fi
9873rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9874LIBS=$ac_check_lib_save_LIBS
9875fi
9876echo "$as_me:9876: result: $ac_cv_lib_Xt_XtAppInitialize" >&5
9877echo "${ECHO_T}$ac_cv_lib_Xt_XtAppInitialize" >&6
9878if test $ac_cv_lib_Xt_XtAppInitialize = yes; then
9879
9880cat >>confdefs.h <<\EOF
9881#define HAVE_LIBXT 1
9882EOF
9883
9884		 cf_have_X_LIBS=Xt
9885		 LIBS="-lXt $X_PRE_LIBS $LIBS $X_EXTRA_LIBS"
9886fi
9887
9888fi
9889
9890fi
9891
9892if test $cf_have_X_LIBS = no ; then
9893	{ echo "$as_me:9893: WARNING: Unable to successfully link X Toolkit library (-lXt) with
9894test program.  You will have to check and add the proper libraries by hand
9895to makefile." >&5
9896echo "$as_me: WARNING: Unable to successfully link X Toolkit library (-lXt) with
9897test program.  You will have to check and add the proper libraries by hand
9898to makefile." >&2;}
9899fi
9900
9901for ac_header in \
9902	X11/DECkeysym.h \
9903	X11/Sunkeysym.h \
9904	X11/XF86keysym.h \
9905	X11/XKBlib.h \
9906	X11/Xpoll.h \
9907	X11/extensions/XKB.h \
9908
9909do
9910as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9911echo "$as_me:9911: checking for $ac_header" >&5
9912echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9913if eval "test \"\${$as_ac_Header+set}\" = set"; then
9914  echo $ECHO_N "(cached) $ECHO_C" >&6
9915else
9916  cat >conftest.$ac_ext <<_ACEOF
9917#line 9917 "configure"
9918#include "confdefs.h"
9919#include <$ac_header>
9920_ACEOF
9921if { (eval echo "$as_me:9921: \"$ac_cpp conftest.$ac_ext\"") >&5
9922  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9923  ac_status=$?
9924  egrep -v '^ *\+' conftest.er1 >conftest.err
9925  rm -f conftest.er1
9926  cat conftest.err >&5
9927  echo "$as_me:9927: \$? = $ac_status" >&5
9928  (exit $ac_status); } >/dev/null; then
9929  if test -s conftest.err; then
9930    ac_cpp_err=$ac_c_preproc_warn_flag
9931  else
9932    ac_cpp_err=
9933  fi
9934else
9935  ac_cpp_err=yes
9936fi
9937if test -z "$ac_cpp_err"; then
9938  eval "$as_ac_Header=yes"
9939else
9940  echo "$as_me: failed program was:" >&5
9941  cat conftest.$ac_ext >&5
9942  eval "$as_ac_Header=no"
9943fi
9944rm -f conftest.err conftest.$ac_ext
9945fi
9946echo "$as_me:9946: result: `eval echo '${'$as_ac_Header'}'`" >&5
9947echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9948if test `eval echo '${'$as_ac_Header'}'` = yes; then
9949  cat >>confdefs.h <<EOF
9950#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9951EOF
9952
9953fi
9954done
9955
9956ICON_SUFFIX=.xbm
9957
9958cf_save_cppflags="${CPPFLAGS}"
9959cf_save_ldflags="${LDFLAGS}"
9960
9961echo "$as_me:9961: checking if you want to use the Xpm library for colored icon" >&5
9962echo $ECHO_N "checking if you want to use the Xpm library for colored icon... $ECHO_C" >&6
9963
9964# Check whether --with-xpm or --without-xpm was given.
9965if test "${with_xpm+set}" = set; then
9966  withval="$with_xpm"
9967  cf_Xpm_library="$withval"
9968else
9969  cf_Xpm_library=yes
9970fi;
9971echo "$as_me:9971: result: $cf_Xpm_library" >&5
9972echo "${ECHO_T}$cf_Xpm_library" >&6
9973
9974if test "$cf_Xpm_library" != no ; then
9975    if test "$cf_Xpm_library" != yes ; then
9976	CPPFLAGS="$CPPFLAGS -I$withval/include"
9977	LDFLAGS="$LDFLAGS -L$withval/lib"
9978    fi
9979    echo "$as_me:9979: checking for X11/xpm.h" >&5
9980echo $ECHO_N "checking for X11/xpm.h... $ECHO_C" >&6
9981if test "${ac_cv_header_X11_xpm_h+set}" = set; then
9982  echo $ECHO_N "(cached) $ECHO_C" >&6
9983else
9984  cat >conftest.$ac_ext <<_ACEOF
9985#line 9985 "configure"
9986#include "confdefs.h"
9987#include <X11/xpm.h>
9988_ACEOF
9989if { (eval echo "$as_me:9989: \"$ac_cpp conftest.$ac_ext\"") >&5
9990  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9991  ac_status=$?
9992  egrep -v '^ *\+' conftest.er1 >conftest.err
9993  rm -f conftest.er1
9994  cat conftest.err >&5
9995  echo "$as_me:9995: \$? = $ac_status" >&5
9996  (exit $ac_status); } >/dev/null; then
9997  if test -s conftest.err; then
9998    ac_cpp_err=$ac_c_preproc_warn_flag
9999  else
10000    ac_cpp_err=
10001  fi
10002else
10003  ac_cpp_err=yes
10004fi
10005if test -z "$ac_cpp_err"; then
10006  ac_cv_header_X11_xpm_h=yes
10007else
10008  echo "$as_me: failed program was:" >&5
10009  cat conftest.$ac_ext >&5
10010  ac_cv_header_X11_xpm_h=no
10011fi
10012rm -f conftest.err conftest.$ac_ext
10013fi
10014echo "$as_me:10014: result: $ac_cv_header_X11_xpm_h" >&5
10015echo "${ECHO_T}$ac_cv_header_X11_xpm_h" >&6
10016if test $ac_cv_header_X11_xpm_h = yes; then
10017
10018	echo "$as_me:10018: checking for XpmCreatePixmapFromData in -lXpm" >&5
10019echo $ECHO_N "checking for XpmCreatePixmapFromData in -lXpm... $ECHO_C" >&6
10020if test "${ac_cv_lib_Xpm_XpmCreatePixmapFromData+set}" = set; then
10021  echo $ECHO_N "(cached) $ECHO_C" >&6
10022else
10023  ac_check_lib_save_LIBS=$LIBS
10024LIBS="-lXpm -lX11 $X_LIBS $LIBS"
10025cat >conftest.$ac_ext <<_ACEOF
10026#line 10026 "configure"
10027#include "confdefs.h"
10028
10029/* Override any gcc2 internal prototype to avoid an error.  */
10030#ifdef __cplusplus
10031extern "C"
10032#endif
10033/* We use char because int might match the return type of a gcc2
10034   builtin and then its argument prototype would still apply.  */
10035char XpmCreatePixmapFromData ();
10036int
10037main ()
10038{
10039XpmCreatePixmapFromData ();
10040  ;
10041  return 0;
10042}
10043_ACEOF
10044rm -f conftest.$ac_objext conftest$ac_exeext
10045if { (eval echo "$as_me:10045: \"$ac_link\"") >&5
10046  (eval $ac_link) 2>&5
10047  ac_status=$?
10048  echo "$as_me:10048: \$? = $ac_status" >&5
10049  (exit $ac_status); } &&
10050         { ac_try='test -s conftest$ac_exeext'
10051  { (eval echo "$as_me:10051: \"$ac_try\"") >&5
10052  (eval $ac_try) 2>&5
10053  ac_status=$?
10054  echo "$as_me:10054: \$? = $ac_status" >&5
10055  (exit $ac_status); }; }; then
10056  ac_cv_lib_Xpm_XpmCreatePixmapFromData=yes
10057else
10058  echo "$as_me: failed program was:" >&5
10059cat conftest.$ac_ext >&5
10060ac_cv_lib_Xpm_XpmCreatePixmapFromData=no
10061fi
10062rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10063LIBS=$ac_check_lib_save_LIBS
10064fi
10065echo "$as_me:10065: result: $ac_cv_lib_Xpm_XpmCreatePixmapFromData" >&5
10066echo "${ECHO_T}$ac_cv_lib_Xpm_XpmCreatePixmapFromData" >&6
10067if test $ac_cv_lib_Xpm_XpmCreatePixmapFromData = yes; then
10068
10069cat >>confdefs.h <<\EOF
10070#define HAVE_LIBXPM 1
10071EOF
10072
10073	    ICON_SUFFIX=.xpm
10074	    LIBS="-lXpm $LIBS"
10075else
10076  CPPFLAGS="${cf_save_cppflags}" LDFLAGS="${cf_save_ldflags}"
10077fi
10078
10079else
10080  CPPFLAGS="${cf_save_cppflags}" LDFLAGS="${cf_save_ldflags}"
10081fi
10082
10083fi
10084
10085cf_x_athena=${cf_x_athena:-Xaw}
10086
10087echo "$as_me:10087: checking if you want to link with Xaw 3d library" >&5
10088echo $ECHO_N "checking if you want to link with Xaw 3d library... $ECHO_C" >&6
10089withval=
10090
10091# Check whether --with-Xaw3d or --without-Xaw3d was given.
10092if test "${with_Xaw3d+set}" = set; then
10093  withval="$with_Xaw3d"
10094
10095fi;
10096if test "$withval" = yes ; then
10097	cf_x_athena=Xaw3d
10098	echo "$as_me:10098: result: yes" >&5
10099echo "${ECHO_T}yes" >&6
10100else
10101	echo "$as_me:10101: result: no" >&5
10102echo "${ECHO_T}no" >&6
10103fi
10104
10105echo "$as_me:10105: checking if you want to link with neXT Athena library" >&5
10106echo $ECHO_N "checking if you want to link with neXT Athena library... $ECHO_C" >&6
10107withval=
10108
10109# Check whether --with-neXtaw or --without-neXtaw was given.
10110if test "${with_neXtaw+set}" = set; then
10111  withval="$with_neXtaw"
10112
10113fi;
10114if test "$withval" = yes ; then
10115	cf_x_athena=neXtaw
10116	echo "$as_me:10116: result: yes" >&5
10117echo "${ECHO_T}yes" >&6
10118else
10119	echo "$as_me:10119: result: no" >&5
10120echo "${ECHO_T}no" >&6
10121fi
10122
10123echo "$as_me:10123: checking if you want to link with Athena-Plus library" >&5
10124echo $ECHO_N "checking if you want to link with Athena-Plus library... $ECHO_C" >&6
10125withval=
10126
10127# Check whether --with-XawPlus or --without-XawPlus was given.
10128if test "${with_XawPlus+set}" = set; then
10129  withval="$with_XawPlus"
10130
10131fi;
10132if test "$withval" = yes ; then
10133	cf_x_athena=XawPlus
10134	echo "$as_me:10134: result: yes" >&5
10135echo "${ECHO_T}yes" >&6
10136else
10137	echo "$as_me:10137: result: no" >&5
10138echo "${ECHO_T}no" >&6
10139fi
10140
10141cf_x_athena_lib=""
10142
10143if test "$PKG_CONFIG" != none ; then
10144	cf_athena_list=
10145	test "$cf_x_athena" = Xaw && cf_athena_list="xaw8 xaw7 xaw6"
10146	for cf_athena_pkg in \
10147		$cf_athena_list \
10148		${cf_x_athena} \
10149		${cf_x_athena}-devel \
10150		lib${cf_x_athena} \
10151		lib${cf_x_athena}-devel
10152	do
10153
10154if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists $cf_athena_pkg; then
10155	test -n "$verbose" && echo "	found package $cf_athena_pkg" 1>&6
10156
10157echo "${as_me:-configure}:10157: testing found package $cf_athena_pkg ..." 1>&5
10158
10159	cf_pkgconfig_incs="`$PKG_CONFIG --cflags $cf_athena_pkg 2>/dev/null`"
10160	cf_pkgconfig_libs="`$PKG_CONFIG --libs   $cf_athena_pkg 2>/dev/null`"
10161	test -n "$verbose" && echo "	package $cf_athena_pkg CFLAGS: $cf_pkgconfig_incs" 1>&6
10162
10163echo "${as_me:-configure}:10163: testing package $cf_athena_pkg CFLAGS: $cf_pkgconfig_incs ..." 1>&5
10164
10165	test -n "$verbose" && echo "	package $cf_athena_pkg LIBS: $cf_pkgconfig_libs" 1>&6
10166
10167echo "${as_me:-configure}:10167: testing package $cf_athena_pkg LIBS: $cf_pkgconfig_libs ..." 1>&5
10168
10169cf_fix_cppflags=no
10170cf_new_cflags=
10171cf_new_cppflags=
10172cf_new_extra_cppflags=
10173
10174for cf_add_cflags in $cf_pkgconfig_incs
10175do
10176case $cf_fix_cppflags in
10177no)
10178	case $cf_add_cflags in #(vi
10179	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
10180		case $cf_add_cflags in
10181		-D*)
10182			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10183
10184			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10185				&& test -z "${cf_tst_cflags}" \
10186				&& cf_fix_cppflags=yes
10187
10188			if test $cf_fix_cppflags = yes ; then
10189				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10190				continue
10191			elif test "${cf_tst_cflags}" = "\"'" ; then
10192				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10193				continue
10194			fi
10195			;;
10196		esac
10197		case "$CPPFLAGS" in
10198		*$cf_add_cflags) #(vi
10199			;;
10200		*) #(vi
10201			case $cf_add_cflags in #(vi
10202			-D*)
10203				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10204
10205CPPFLAGS=`echo "$CPPFLAGS" | \
10206	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
10207		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
10208
10209				;;
10210			esac
10211			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10212			;;
10213		esac
10214		;;
10215	*)
10216		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10217		;;
10218	esac
10219	;;
10220yes)
10221	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10222
10223	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10224
10225	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10226		&& test -z "${cf_tst_cflags}" \
10227		&& cf_fix_cppflags=no
10228	;;
10229esac
10230done
10231
10232if test -n "$cf_new_cflags" ; then
10233
10234	CFLAGS="$CFLAGS $cf_new_cflags"
10235fi
10236
10237if test -n "$cf_new_cppflags" ; then
10238
10239	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
10240fi
10241
10242if test -n "$cf_new_extra_cppflags" ; then
10243
10244	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10245fi
10246
10247	LIBS="$cf_pkgconfig_libs $LIBS"
10248
10249			cf_x_athena_lib="$cf_pkgconfig_libs"
10250
10251cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
10252
10253			cat >>confdefs.h <<EOF
10254#define $cf_x_athena_LIBS 1
10255EOF
10256
10257echo "$as_me:10257: checking for usable $cf_x_athena/Xmu package" >&5
10258echo $ECHO_N "checking for usable $cf_x_athena/Xmu package... $ECHO_C" >&6
10259if test "${cf_cv_xaw_compat+set}" = set; then
10260  echo $ECHO_N "(cached) $ECHO_C" >&6
10261else
10262
10263cat >conftest.$ac_ext <<_ACEOF
10264#line 10264 "configure"
10265#include "confdefs.h"
10266
10267#include <X11/Xmu/CharSet.h>
10268
10269int
10270main ()
10271{
10272
10273int check = XmuCompareISOLatin1("big", "small")
10274
10275  ;
10276  return 0;
10277}
10278_ACEOF
10279rm -f conftest.$ac_objext conftest$ac_exeext
10280if { (eval echo "$as_me:10280: \"$ac_link\"") >&5
10281  (eval $ac_link) 2>&5
10282  ac_status=$?
10283  echo "$as_me:10283: \$? = $ac_status" >&5
10284  (exit $ac_status); } &&
10285         { ac_try='test -s conftest$ac_exeext'
10286  { (eval echo "$as_me:10286: \"$ac_try\"") >&5
10287  (eval $ac_try) 2>&5
10288  ac_status=$?
10289  echo "$as_me:10289: \$? = $ac_status" >&5
10290  (exit $ac_status); }; }; then
10291  cf_cv_xaw_compat=yes
10292else
10293  echo "$as_me: failed program was:" >&5
10294cat conftest.$ac_ext >&5
10295cf_cv_xaw_compat=no
10296fi
10297rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10298fi
10299echo "$as_me:10299: result: $cf_cv_xaw_compat" >&5
10300echo "${ECHO_T}$cf_cv_xaw_compat" >&6
10301
10302			if test "$cf_cv_xaw_compat" = no
10303			then
10304				# workaround for broken ".pc" files...
10305				case "$cf_x_athena_lib" in #(vi
10306				*-lXmu*) #(vi
10307					;;
10308				*)
10309					test -n "$verbose" && echo "	work around broken package" 1>&6
10310
10311echo "${as_me:-configure}:10311: testing work around broken package ..." 1>&5
10312
10313if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xmu; then
10314	test -n "$verbose" && echo "	found package xmu" 1>&6
10315
10316echo "${as_me:-configure}:10316: testing found package xmu ..." 1>&5
10317
10318	cf_pkgconfig_incs="`$PKG_CONFIG --cflags xmu 2>/dev/null`"
10319	cf_pkgconfig_libs="`$PKG_CONFIG --libs   xmu 2>/dev/null`"
10320	test -n "$verbose" && echo "	package xmu CFLAGS: $cf_pkgconfig_incs" 1>&6
10321
10322echo "${as_me:-configure}:10322: testing package xmu CFLAGS: $cf_pkgconfig_incs ..." 1>&5
10323
10324	test -n "$verbose" && echo "	package xmu LIBS: $cf_pkgconfig_libs" 1>&6
10325
10326echo "${as_me:-configure}:10326: testing package xmu LIBS: $cf_pkgconfig_libs ..." 1>&5
10327
10328cf_fix_cppflags=no
10329cf_new_cflags=
10330cf_new_cppflags=
10331cf_new_extra_cppflags=
10332
10333for cf_add_cflags in $cf_pkgconfig_incs
10334do
10335case $cf_fix_cppflags in
10336no)
10337	case $cf_add_cflags in #(vi
10338	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
10339		case $cf_add_cflags in
10340		-D*)
10341			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10342
10343			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10344				&& test -z "${cf_tst_cflags}" \
10345				&& cf_fix_cppflags=yes
10346
10347			if test $cf_fix_cppflags = yes ; then
10348				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10349				continue
10350			elif test "${cf_tst_cflags}" = "\"'" ; then
10351				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10352				continue
10353			fi
10354			;;
10355		esac
10356		case "$CPPFLAGS" in
10357		*$cf_add_cflags) #(vi
10358			;;
10359		*) #(vi
10360			case $cf_add_cflags in #(vi
10361			-D*)
10362				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10363
10364CPPFLAGS=`echo "$CPPFLAGS" | \
10365	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
10366		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
10367
10368				;;
10369			esac
10370			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10371			;;
10372		esac
10373		;;
10374	*)
10375		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10376		;;
10377	esac
10378	;;
10379yes)
10380	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10381
10382	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10383
10384	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10385		&& test -z "${cf_tst_cflags}" \
10386		&& cf_fix_cppflags=no
10387	;;
10388esac
10389done
10390
10391if test -n "$cf_new_cflags" ; then
10392
10393	CFLAGS="$CFLAGS $cf_new_cflags"
10394fi
10395
10396if test -n "$cf_new_cppflags" ; then
10397
10398	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
10399fi
10400
10401if test -n "$cf_new_extra_cppflags" ; then
10402
10403	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10404fi
10405
10406	LIBS="$cf_pkgconfig_libs $LIBS"
10407	:
10408else
10409
10410test -n "$verbose" && echo "	...before $LIBS" 1>&6
10411
10412echo "${as_me:-configure}:10412: testing ...before $LIBS ..." 1>&5
10413
10414LIBS=`echo "$LIBS" | sed -e "s/[ 	][ 	]*/ /g" -e "s,-lXt ,-lXt -lXmu ," -e 's/  / /g'`
10415test -n "$verbose" && echo "	...after  $LIBS" 1>&6
10416
10417echo "${as_me:-configure}:10417: testing ...after  $LIBS ..." 1>&5
10418
10419fi
10420
10421					;;
10422				esac
10423			fi
10424
10425			break
10426else
10427	:
10428fi
10429
10430	done
10431fi
10432
10433if test -z "$cf_x_athena_lib" ; then
10434
10435if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists Xext; then
10436	test -n "$verbose" && echo "	found package Xext" 1>&6
10437
10438echo "${as_me:-configure}:10438: testing found package Xext ..." 1>&5
10439
10440	cf_pkgconfig_incs="`$PKG_CONFIG --cflags Xext 2>/dev/null`"
10441	cf_pkgconfig_libs="`$PKG_CONFIG --libs   Xext 2>/dev/null`"
10442	test -n "$verbose" && echo "	package Xext CFLAGS: $cf_pkgconfig_incs" 1>&6
10443
10444echo "${as_me:-configure}:10444: testing package Xext CFLAGS: $cf_pkgconfig_incs ..." 1>&5
10445
10446	test -n "$verbose" && echo "	package Xext LIBS: $cf_pkgconfig_libs" 1>&6
10447
10448echo "${as_me:-configure}:10448: testing package Xext LIBS: $cf_pkgconfig_libs ..." 1>&5
10449
10450cf_fix_cppflags=no
10451cf_new_cflags=
10452cf_new_cppflags=
10453cf_new_extra_cppflags=
10454
10455for cf_add_cflags in $cf_pkgconfig_incs
10456do
10457case $cf_fix_cppflags in
10458no)
10459	case $cf_add_cflags in #(vi
10460	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
10461		case $cf_add_cflags in
10462		-D*)
10463			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10464
10465			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10466				&& test -z "${cf_tst_cflags}" \
10467				&& cf_fix_cppflags=yes
10468
10469			if test $cf_fix_cppflags = yes ; then
10470				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10471				continue
10472			elif test "${cf_tst_cflags}" = "\"'" ; then
10473				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10474				continue
10475			fi
10476			;;
10477		esac
10478		case "$CPPFLAGS" in
10479		*$cf_add_cflags) #(vi
10480			;;
10481		*) #(vi
10482			case $cf_add_cflags in #(vi
10483			-D*)
10484				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10485
10486CPPFLAGS=`echo "$CPPFLAGS" | \
10487	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
10488		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
10489
10490				;;
10491			esac
10492			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10493			;;
10494		esac
10495		;;
10496	*)
10497		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10498		;;
10499	esac
10500	;;
10501yes)
10502	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10503
10504	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10505
10506	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10507		&& test -z "${cf_tst_cflags}" \
10508		&& cf_fix_cppflags=no
10509	;;
10510esac
10511done
10512
10513if test -n "$cf_new_cflags" ; then
10514
10515	CFLAGS="$CFLAGS $cf_new_cflags"
10516fi
10517
10518if test -n "$cf_new_cppflags" ; then
10519
10520	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
10521fi
10522
10523if test -n "$cf_new_extra_cppflags" ; then
10524
10525	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10526fi
10527
10528	LIBS="$cf_pkgconfig_libs $LIBS"
10529	:
10530else
10531
10532	echo "$as_me:10532: checking for XextCreateExtension in -lXext" >&5
10533echo $ECHO_N "checking for XextCreateExtension in -lXext... $ECHO_C" >&6
10534if test "${ac_cv_lib_Xext_XextCreateExtension+set}" = set; then
10535  echo $ECHO_N "(cached) $ECHO_C" >&6
10536else
10537  ac_check_lib_save_LIBS=$LIBS
10538LIBS="-lXext  $LIBS"
10539cat >conftest.$ac_ext <<_ACEOF
10540#line 10540 "configure"
10541#include "confdefs.h"
10542
10543/* Override any gcc2 internal prototype to avoid an error.  */
10544#ifdef __cplusplus
10545extern "C"
10546#endif
10547/* We use char because int might match the return type of a gcc2
10548   builtin and then its argument prototype would still apply.  */
10549char XextCreateExtension ();
10550int
10551main ()
10552{
10553XextCreateExtension ();
10554  ;
10555  return 0;
10556}
10557_ACEOF
10558rm -f conftest.$ac_objext conftest$ac_exeext
10559if { (eval echo "$as_me:10559: \"$ac_link\"") >&5
10560  (eval $ac_link) 2>&5
10561  ac_status=$?
10562  echo "$as_me:10562: \$? = $ac_status" >&5
10563  (exit $ac_status); } &&
10564         { ac_try='test -s conftest$ac_exeext'
10565  { (eval echo "$as_me:10565: \"$ac_try\"") >&5
10566  (eval $ac_try) 2>&5
10567  ac_status=$?
10568  echo "$as_me:10568: \$? = $ac_status" >&5
10569  (exit $ac_status); }; }; then
10570  ac_cv_lib_Xext_XextCreateExtension=yes
10571else
10572  echo "$as_me: failed program was:" >&5
10573cat conftest.$ac_ext >&5
10574ac_cv_lib_Xext_XextCreateExtension=no
10575fi
10576rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10577LIBS=$ac_check_lib_save_LIBS
10578fi
10579echo "$as_me:10579: result: $ac_cv_lib_Xext_XextCreateExtension" >&5
10580echo "${ECHO_T}$ac_cv_lib_Xext_XextCreateExtension" >&6
10581if test $ac_cv_lib_Xext_XextCreateExtension = yes; then
10582  LIBS="-lXext $LIBS"
10583fi
10584
10585fi
10586
10587cf_have_X_LIBS=no
10588
10589if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xt; then
10590	test -n "$verbose" && echo "	found package xt" 1>&6
10591
10592echo "${as_me:-configure}:10592: testing found package xt ..." 1>&5
10593
10594	cf_pkgconfig_incs="`$PKG_CONFIG --cflags xt 2>/dev/null`"
10595	cf_pkgconfig_libs="`$PKG_CONFIG --libs   xt 2>/dev/null`"
10596	test -n "$verbose" && echo "	package xt CFLAGS: $cf_pkgconfig_incs" 1>&6
10597
10598echo "${as_me:-configure}:10598: testing package xt CFLAGS: $cf_pkgconfig_incs ..." 1>&5
10599
10600	test -n "$verbose" && echo "	package xt LIBS: $cf_pkgconfig_libs" 1>&6
10601
10602echo "${as_me:-configure}:10602: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5
10603
10604cf_fix_cppflags=no
10605cf_new_cflags=
10606cf_new_cppflags=
10607cf_new_extra_cppflags=
10608
10609for cf_add_cflags in $cf_pkgconfig_incs
10610do
10611case $cf_fix_cppflags in
10612no)
10613	case $cf_add_cflags in #(vi
10614	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
10615		case $cf_add_cflags in
10616		-D*)
10617			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10618
10619			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10620				&& test -z "${cf_tst_cflags}" \
10621				&& cf_fix_cppflags=yes
10622
10623			if test $cf_fix_cppflags = yes ; then
10624				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10625				continue
10626			elif test "${cf_tst_cflags}" = "\"'" ; then
10627				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10628				continue
10629			fi
10630			;;
10631		esac
10632		case "$CPPFLAGS" in
10633		*$cf_add_cflags) #(vi
10634			;;
10635		*) #(vi
10636			case $cf_add_cflags in #(vi
10637			-D*)
10638				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10639
10640CPPFLAGS=`echo "$CPPFLAGS" | \
10641	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
10642		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
10643
10644				;;
10645			esac
10646			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10647			;;
10648		esac
10649		;;
10650	*)
10651		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10652		;;
10653	esac
10654	;;
10655yes)
10656	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10657
10658	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10659
10660	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10661		&& test -z "${cf_tst_cflags}" \
10662		&& cf_fix_cppflags=no
10663	;;
10664esac
10665done
10666
10667if test -n "$cf_new_cflags" ; then
10668
10669	CFLAGS="$CFLAGS $cf_new_cflags"
10670fi
10671
10672if test -n "$cf_new_cppflags" ; then
10673
10674	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
10675fi
10676
10677if test -n "$cf_new_extra_cppflags" ; then
10678
10679	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10680fi
10681
10682	LIBS="$cf_pkgconfig_libs $LIBS"
10683
10684	case "x$LIBS" in #(vi
10685	*-lX11*) #(vi
10686		;;
10687	*)
10688# we have an "xt" package, but it may omit Xt's dependency on X11
10689echo "$as_me:10689: checking for usable X dependency" >&5
10690echo $ECHO_N "checking for usable X dependency... $ECHO_C" >&6
10691if test "${cf_cv_xt_x11_compat+set}" = set; then
10692  echo $ECHO_N "(cached) $ECHO_C" >&6
10693else
10694
10695cat >conftest.$ac_ext <<_ACEOF
10696#line 10696 "configure"
10697#include "confdefs.h"
10698
10699#include <X11/Xlib.h>
10700
10701int
10702main ()
10703{
10704
10705	int rc1 = XDrawLine((Display*) 0, (Drawable) 0, (GC) 0, 0, 0, 0, 0);
10706	int rc2 = XClearWindow((Display*) 0, (Window) 0);
10707	int rc3 = XMoveWindow((Display*) 0, (Window) 0, 0, 0);
10708	int rc4 = XMoveResizeWindow((Display*)0, (Window)0, 0, 0, 0, 0);
10709
10710  ;
10711  return 0;
10712}
10713_ACEOF
10714rm -f conftest.$ac_objext conftest$ac_exeext
10715if { (eval echo "$as_me:10715: \"$ac_link\"") >&5
10716  (eval $ac_link) 2>&5
10717  ac_status=$?
10718  echo "$as_me:10718: \$? = $ac_status" >&5
10719  (exit $ac_status); } &&
10720         { ac_try='test -s conftest$ac_exeext'
10721  { (eval echo "$as_me:10721: \"$ac_try\"") >&5
10722  (eval $ac_try) 2>&5
10723  ac_status=$?
10724  echo "$as_me:10724: \$? = $ac_status" >&5
10725  (exit $ac_status); }; }; then
10726  cf_cv_xt_x11_compat=yes
10727else
10728  echo "$as_me: failed program was:" >&5
10729cat conftest.$ac_ext >&5
10730cf_cv_xt_x11_compat=no
10731fi
10732rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10733fi
10734echo "$as_me:10734: result: $cf_cv_xt_x11_compat" >&5
10735echo "${ECHO_T}$cf_cv_xt_x11_compat" >&6
10736		if test "$cf_cv_xt_x11_compat" = no
10737		then
10738			test -n "$verbose" && echo "	work around broken X11 dependency" 1>&6
10739
10740echo "${as_me:-configure}:10740: testing work around broken X11 dependency ..." 1>&5
10741
10742			# 2010/11/19 - good enough until a working Xt on Xcb is delivered.
10743
10744if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists x11; then
10745	test -n "$verbose" && echo "	found package x11" 1>&6
10746
10747echo "${as_me:-configure}:10747: testing found package x11 ..." 1>&5
10748
10749	cf_pkgconfig_incs="`$PKG_CONFIG --cflags x11 2>/dev/null`"
10750	cf_pkgconfig_libs="`$PKG_CONFIG --libs   x11 2>/dev/null`"
10751	test -n "$verbose" && echo "	package x11 CFLAGS: $cf_pkgconfig_incs" 1>&6
10752
10753echo "${as_me:-configure}:10753: testing package x11 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
10754
10755	test -n "$verbose" && echo "	package x11 LIBS: $cf_pkgconfig_libs" 1>&6
10756
10757echo "${as_me:-configure}:10757: testing package x11 LIBS: $cf_pkgconfig_libs ..." 1>&5
10758
10759cf_fix_cppflags=no
10760cf_new_cflags=
10761cf_new_cppflags=
10762cf_new_extra_cppflags=
10763
10764for cf_add_cflags in $cf_pkgconfig_incs
10765do
10766case $cf_fix_cppflags in
10767no)
10768	case $cf_add_cflags in #(vi
10769	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
10770		case $cf_add_cflags in
10771		-D*)
10772			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10773
10774			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10775				&& test -z "${cf_tst_cflags}" \
10776				&& cf_fix_cppflags=yes
10777
10778			if test $cf_fix_cppflags = yes ; then
10779				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10780				continue
10781			elif test "${cf_tst_cflags}" = "\"'" ; then
10782				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10783				continue
10784			fi
10785			;;
10786		esac
10787		case "$CPPFLAGS" in
10788		*$cf_add_cflags) #(vi
10789			;;
10790		*) #(vi
10791			case $cf_add_cflags in #(vi
10792			-D*)
10793				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10794
10795CPPFLAGS=`echo "$CPPFLAGS" | \
10796	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
10797		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
10798
10799				;;
10800			esac
10801			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10802			;;
10803		esac
10804		;;
10805	*)
10806		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10807		;;
10808	esac
10809	;;
10810yes)
10811	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10812
10813	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10814
10815	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10816		&& test -z "${cf_tst_cflags}" \
10817		&& cf_fix_cppflags=no
10818	;;
10819esac
10820done
10821
10822if test -n "$cf_new_cflags" ; then
10823
10824	CFLAGS="$CFLAGS $cf_new_cflags"
10825fi
10826
10827if test -n "$cf_new_cppflags" ; then
10828
10829	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
10830fi
10831
10832if test -n "$cf_new_extra_cppflags" ; then
10833
10834	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10835fi
10836
10837	LIBS="$cf_pkgconfig_libs $LIBS"
10838	:
10839else
10840
10841test -n "$verbose" && echo "	...before $LIBS" 1>&6
10842
10843echo "${as_me:-configure}:10843: testing ...before $LIBS ..." 1>&5
10844
10845LIBS=`echo "$LIBS" | sed -e "s/[ 	][ 	]*/ /g" -e "s,-lXt ,-lXt -lX11 ," -e 's/  / /g'`
10846test -n "$verbose" && echo "	...after  $LIBS" 1>&6
10847
10848echo "${as_me:-configure}:10848: testing ...after  $LIBS ..." 1>&5
10849
10850fi
10851
10852		fi
10853		;;
10854	esac
10855
10856echo "$as_me:10856: checking for usable X Toolkit package" >&5
10857echo $ECHO_N "checking for usable X Toolkit package... $ECHO_C" >&6
10858if test "${cf_cv_xt_ice_compat+set}" = set; then
10859  echo $ECHO_N "(cached) $ECHO_C" >&6
10860else
10861
10862cat >conftest.$ac_ext <<_ACEOF
10863#line 10863 "configure"
10864#include "confdefs.h"
10865
10866#include <X11/Shell.h>
10867
10868int
10869main ()
10870{
10871int num = IceConnectionNumber(0)
10872
10873  ;
10874  return 0;
10875}
10876_ACEOF
10877rm -f conftest.$ac_objext conftest$ac_exeext
10878if { (eval echo "$as_me:10878: \"$ac_link\"") >&5
10879  (eval $ac_link) 2>&5
10880  ac_status=$?
10881  echo "$as_me:10881: \$? = $ac_status" >&5
10882  (exit $ac_status); } &&
10883         { ac_try='test -s conftest$ac_exeext'
10884  { (eval echo "$as_me:10884: \"$ac_try\"") >&5
10885  (eval $ac_try) 2>&5
10886  ac_status=$?
10887  echo "$as_me:10887: \$? = $ac_status" >&5
10888  (exit $ac_status); }; }; then
10889  cf_cv_xt_ice_compat=yes
10890else
10891  echo "$as_me: failed program was:" >&5
10892cat conftest.$ac_ext >&5
10893cf_cv_xt_ice_compat=no
10894fi
10895rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10896fi
10897echo "$as_me:10897: result: $cf_cv_xt_ice_compat" >&5
10898echo "${ECHO_T}$cf_cv_xt_ice_compat" >&6
10899
10900	if test "$cf_cv_xt_ice_compat" = no
10901	then
10902		# workaround for broken ".pc" files used for X Toolkit.
10903		case "x$X_PRE_LIBS" in #(vi
10904		*-lICE*)
10905			case "x$LIBS" in #(vi
10906			*-lICE*) #(vi
10907				;;
10908			*)
10909				test -n "$verbose" && echo "	work around broken ICE dependency" 1>&6
10910
10911echo "${as_me:-configure}:10911: testing work around broken ICE dependency ..." 1>&5
10912
10913if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists ice; then
10914	test -n "$verbose" && echo "	found package ice" 1>&6
10915
10916echo "${as_me:-configure}:10916: testing found package ice ..." 1>&5
10917
10918	cf_pkgconfig_incs="`$PKG_CONFIG --cflags ice 2>/dev/null`"
10919	cf_pkgconfig_libs="`$PKG_CONFIG --libs   ice 2>/dev/null`"
10920	test -n "$verbose" && echo "	package ice CFLAGS: $cf_pkgconfig_incs" 1>&6
10921
10922echo "${as_me:-configure}:10922: testing package ice CFLAGS: $cf_pkgconfig_incs ..." 1>&5
10923
10924	test -n "$verbose" && echo "	package ice LIBS: $cf_pkgconfig_libs" 1>&6
10925
10926echo "${as_me:-configure}:10926: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5
10927
10928cf_fix_cppflags=no
10929cf_new_cflags=
10930cf_new_cppflags=
10931cf_new_extra_cppflags=
10932
10933for cf_add_cflags in $cf_pkgconfig_incs
10934do
10935case $cf_fix_cppflags in
10936no)
10937	case $cf_add_cflags in #(vi
10938	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
10939		case $cf_add_cflags in
10940		-D*)
10941			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10942
10943			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10944				&& test -z "${cf_tst_cflags}" \
10945				&& cf_fix_cppflags=yes
10946
10947			if test $cf_fix_cppflags = yes ; then
10948				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10949				continue
10950			elif test "${cf_tst_cflags}" = "\"'" ; then
10951				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10952				continue
10953			fi
10954			;;
10955		esac
10956		case "$CPPFLAGS" in
10957		*$cf_add_cflags) #(vi
10958			;;
10959		*) #(vi
10960			case $cf_add_cflags in #(vi
10961			-D*)
10962				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10963
10964CPPFLAGS=`echo "$CPPFLAGS" | \
10965	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
10966		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
10967
10968				;;
10969			esac
10970			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10971			;;
10972		esac
10973		;;
10974	*)
10975		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10976		;;
10977	esac
10978	;;
10979yes)
10980	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10981
10982	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10983
10984	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10985		&& test -z "${cf_tst_cflags}" \
10986		&& cf_fix_cppflags=no
10987	;;
10988esac
10989done
10990
10991if test -n "$cf_new_cflags" ; then
10992
10993	CFLAGS="$CFLAGS $cf_new_cflags"
10994fi
10995
10996if test -n "$cf_new_cppflags" ; then
10997
10998	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
10999fi
11000
11001if test -n "$cf_new_extra_cppflags" ; then
11002
11003	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11004fi
11005
11006	LIBS="$cf_pkgconfig_libs $LIBS"
11007
11008if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists sm; then
11009	test -n "$verbose" && echo "	found package sm" 1>&6
11010
11011echo "${as_me:-configure}:11011: testing found package sm ..." 1>&5
11012
11013	cf_pkgconfig_incs="`$PKG_CONFIG --cflags sm 2>/dev/null`"
11014	cf_pkgconfig_libs="`$PKG_CONFIG --libs   sm 2>/dev/null`"
11015	test -n "$verbose" && echo "	package sm CFLAGS: $cf_pkgconfig_incs" 1>&6
11016
11017echo "${as_me:-configure}:11017: testing package sm CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11018
11019	test -n "$verbose" && echo "	package sm LIBS: $cf_pkgconfig_libs" 1>&6
11020
11021echo "${as_me:-configure}:11021: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5
11022
11023cf_fix_cppflags=no
11024cf_new_cflags=
11025cf_new_cppflags=
11026cf_new_extra_cppflags=
11027
11028for cf_add_cflags in $cf_pkgconfig_incs
11029do
11030case $cf_fix_cppflags in
11031no)
11032	case $cf_add_cflags in #(vi
11033	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11034		case $cf_add_cflags in
11035		-D*)
11036			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11037
11038			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11039				&& test -z "${cf_tst_cflags}" \
11040				&& cf_fix_cppflags=yes
11041
11042			if test $cf_fix_cppflags = yes ; then
11043				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11044				continue
11045			elif test "${cf_tst_cflags}" = "\"'" ; then
11046				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11047				continue
11048			fi
11049			;;
11050		esac
11051		case "$CPPFLAGS" in
11052		*$cf_add_cflags) #(vi
11053			;;
11054		*) #(vi
11055			case $cf_add_cflags in #(vi
11056			-D*)
11057				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11058
11059CPPFLAGS=`echo "$CPPFLAGS" | \
11060	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
11061		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
11062
11063				;;
11064			esac
11065			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11066			;;
11067		esac
11068		;;
11069	*)
11070		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11071		;;
11072	esac
11073	;;
11074yes)
11075	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11076
11077	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11078
11079	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11080		&& test -z "${cf_tst_cflags}" \
11081		&& cf_fix_cppflags=no
11082	;;
11083esac
11084done
11085
11086if test -n "$cf_new_cflags" ; then
11087
11088	CFLAGS="$CFLAGS $cf_new_cflags"
11089fi
11090
11091if test -n "$cf_new_cppflags" ; then
11092
11093	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11094fi
11095
11096if test -n "$cf_new_extra_cppflags" ; then
11097
11098	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11099fi
11100
11101	LIBS="$cf_pkgconfig_libs $LIBS"
11102	:
11103else
11104	:
11105fi
11106
11107else
11108
11109test -n "$verbose" && echo "	...before $LIBS" 1>&6
11110
11111echo "${as_me:-configure}:11111: testing ...before $LIBS ..." 1>&5
11112
11113LIBS=`echo "$LIBS" | sed -e "s/[ 	][ 	]*/ /g" -e "s,-lXt ,-lXt $X_PRE_LIBS ," -e 's/  / /g'`
11114test -n "$verbose" && echo "	...after  $LIBS" 1>&6
11115
11116echo "${as_me:-configure}:11116: testing ...after  $LIBS ..." 1>&5
11117
11118fi
11119
11120				;;
11121			esac
11122			;;
11123		esac
11124	fi
11125
11126	cf_have_X_LIBS=yes
11127
11128else
11129
11130	LDFLAGS="$X_LIBS $LDFLAGS"
11131
11132test -n "$verbose" && echo "	checking additions to CFLAGS" 1>&6
11133
11134echo "${as_me:-configure}:11134: testing checking additions to CFLAGS ..." 1>&5
11135
11136cf_check_cflags="$CFLAGS"
11137cf_check_cppflags="$CPPFLAGS"
11138
11139cf_fix_cppflags=no
11140cf_new_cflags=
11141cf_new_cppflags=
11142cf_new_extra_cppflags=
11143
11144for cf_add_cflags in $X_CFLAGS
11145do
11146case $cf_fix_cppflags in
11147no)
11148	case $cf_add_cflags in #(vi
11149	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11150		case $cf_add_cflags in
11151		-D*)
11152			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11153
11154			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11155				&& test -z "${cf_tst_cflags}" \
11156				&& cf_fix_cppflags=yes
11157
11158			if test $cf_fix_cppflags = yes ; then
11159				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11160				continue
11161			elif test "${cf_tst_cflags}" = "\"'" ; then
11162				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11163				continue
11164			fi
11165			;;
11166		esac
11167		case "$CPPFLAGS" in
11168		*$cf_add_cflags) #(vi
11169			;;
11170		*) #(vi
11171			case $cf_add_cflags in #(vi
11172			-D*)
11173				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11174
11175CPPFLAGS=`echo "$CPPFLAGS" | \
11176	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
11177		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
11178
11179				;;
11180			esac
11181			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11182			;;
11183		esac
11184		;;
11185	*)
11186		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11187		;;
11188	esac
11189	;;
11190yes)
11191	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11192
11193	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11194
11195	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11196		&& test -z "${cf_tst_cflags}" \
11197		&& cf_fix_cppflags=no
11198	;;
11199esac
11200done
11201
11202if test -n "$cf_new_cflags" ; then
11203	test -n "$verbose" && echo "	add to \$CFLAGS $cf_new_cflags" 1>&6
11204
11205echo "${as_me:-configure}:11205: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
11206
11207	CFLAGS="$CFLAGS $cf_new_cflags"
11208fi
11209
11210if test -n "$cf_new_cppflags" ; then
11211	test -n "$verbose" && echo "	add to \$CPPFLAGS $cf_new_cppflags" 1>&6
11212
11213echo "${as_me:-configure}:11213: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
11214
11215	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11216fi
11217
11218if test -n "$cf_new_extra_cppflags" ; then
11219	test -n "$verbose" && echo "	add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
11220
11221echo "${as_me:-configure}:11221: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
11222
11223	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11224fi
11225
11226if test "$cf_check_cflags" != "$CFLAGS" ; then
11227cat >conftest.$ac_ext <<_ACEOF
11228#line 11228 "configure"
11229#include "confdefs.h"
11230#include <stdio.h>
11231int
11232main ()
11233{
11234printf("Hello world");
11235  ;
11236  return 0;
11237}
11238_ACEOF
11239rm -f conftest.$ac_objext conftest$ac_exeext
11240if { (eval echo "$as_me:11240: \"$ac_link\"") >&5
11241  (eval $ac_link) 2>&5
11242  ac_status=$?
11243  echo "$as_me:11243: \$? = $ac_status" >&5
11244  (exit $ac_status); } &&
11245         { ac_try='test -s conftest$ac_exeext'
11246  { (eval echo "$as_me:11246: \"$ac_try\"") >&5
11247  (eval $ac_try) 2>&5
11248  ac_status=$?
11249  echo "$as_me:11249: \$? = $ac_status" >&5
11250  (exit $ac_status); }; }; then
11251  :
11252else
11253  echo "$as_me: failed program was:" >&5
11254cat conftest.$ac_ext >&5
11255test -n "$verbose" && echo "	test-compile failed.  Undoing change to \$CFLAGS" 1>&6
11256
11257echo "${as_me:-configure}:11257: testing test-compile failed.  Undoing change to \$CFLAGS ..." 1>&5
11258
11259	 if test "$cf_check_cppflags" != "$CPPFLAGS" ; then
11260		 test -n "$verbose" && echo "	but keeping change to \$CPPFLAGS" 1>&6
11261
11262echo "${as_me:-configure}:11262: testing but keeping change to \$CPPFLAGS ..." 1>&5
11263
11264	 fi
11265	 CFLAGS="$cf_check_flags"
11266fi
11267rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11268fi
11269
11270	echo "$as_me:11270: checking for XOpenDisplay" >&5
11271echo $ECHO_N "checking for XOpenDisplay... $ECHO_C" >&6
11272if test "${ac_cv_func_XOpenDisplay+set}" = set; then
11273  echo $ECHO_N "(cached) $ECHO_C" >&6
11274else
11275  cat >conftest.$ac_ext <<_ACEOF
11276#line 11276 "configure"
11277#include "confdefs.h"
11278/* System header to define __stub macros and hopefully few prototypes,
11279    which can conflict with char XOpenDisplay (); below.  */
11280#include <assert.h>
11281/* Override any gcc2 internal prototype to avoid an error.  */
11282#ifdef __cplusplus
11283extern "C"
11284#endif
11285/* We use char because int might match the return type of a gcc2
11286   builtin and then its argument prototype would still apply.  */
11287char XOpenDisplay ();
11288char (*f) ();
11289
11290int
11291main ()
11292{
11293/* The GNU C library defines this for functions which it implements
11294    to always fail with ENOSYS.  Some functions are actually named
11295    something starting with __ and the normal name is an alias.  */
11296#if defined (__stub_XOpenDisplay) || defined (__stub___XOpenDisplay)
11297choke me
11298#else
11299f = XOpenDisplay; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
11300#endif
11301
11302  ;
11303  return 0;
11304}
11305_ACEOF
11306rm -f conftest.$ac_objext conftest$ac_exeext
11307if { (eval echo "$as_me:11307: \"$ac_link\"") >&5
11308  (eval $ac_link) 2>&5
11309  ac_status=$?
11310  echo "$as_me:11310: \$? = $ac_status" >&5
11311  (exit $ac_status); } &&
11312         { ac_try='test -s conftest$ac_exeext'
11313  { (eval echo "$as_me:11313: \"$ac_try\"") >&5
11314  (eval $ac_try) 2>&5
11315  ac_status=$?
11316  echo "$as_me:11316: \$? = $ac_status" >&5
11317  (exit $ac_status); }; }; then
11318  ac_cv_func_XOpenDisplay=yes
11319else
11320  echo "$as_me: failed program was:" >&5
11321cat conftest.$ac_ext >&5
11322ac_cv_func_XOpenDisplay=no
11323fi
11324rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11325fi
11326echo "$as_me:11326: result: $ac_cv_func_XOpenDisplay" >&5
11327echo "${ECHO_T}$ac_cv_func_XOpenDisplay" >&6
11328if test $ac_cv_func_XOpenDisplay = yes; then
11329  :
11330else
11331
11332	echo "$as_me:11332: checking for XOpenDisplay in -lX11" >&5
11333echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6
11334if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then
11335  echo $ECHO_N "(cached) $ECHO_C" >&6
11336else
11337  ac_check_lib_save_LIBS=$LIBS
11338LIBS="-lX11 $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
11339cat >conftest.$ac_ext <<_ACEOF
11340#line 11340 "configure"
11341#include "confdefs.h"
11342
11343/* Override any gcc2 internal prototype to avoid an error.  */
11344#ifdef __cplusplus
11345extern "C"
11346#endif
11347/* We use char because int might match the return type of a gcc2
11348   builtin and then its argument prototype would still apply.  */
11349char XOpenDisplay ();
11350int
11351main ()
11352{
11353XOpenDisplay ();
11354  ;
11355  return 0;
11356}
11357_ACEOF
11358rm -f conftest.$ac_objext conftest$ac_exeext
11359if { (eval echo "$as_me:11359: \"$ac_link\"") >&5
11360  (eval $ac_link) 2>&5
11361  ac_status=$?
11362  echo "$as_me:11362: \$? = $ac_status" >&5
11363  (exit $ac_status); } &&
11364         { ac_try='test -s conftest$ac_exeext'
11365  { (eval echo "$as_me:11365: \"$ac_try\"") >&5
11366  (eval $ac_try) 2>&5
11367  ac_status=$?
11368  echo "$as_me:11368: \$? = $ac_status" >&5
11369  (exit $ac_status); }; }; then
11370  ac_cv_lib_X11_XOpenDisplay=yes
11371else
11372  echo "$as_me: failed program was:" >&5
11373cat conftest.$ac_ext >&5
11374ac_cv_lib_X11_XOpenDisplay=no
11375fi
11376rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11377LIBS=$ac_check_lib_save_LIBS
11378fi
11379echo "$as_me:11379: result: $ac_cv_lib_X11_XOpenDisplay" >&5
11380echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6
11381if test $ac_cv_lib_X11_XOpenDisplay = yes; then
11382  LIBS="-lX11 $LIBS"
11383fi
11384
11385fi
11386
11387	echo "$as_me:11387: checking for XtAppInitialize" >&5
11388echo $ECHO_N "checking for XtAppInitialize... $ECHO_C" >&6
11389if test "${ac_cv_func_XtAppInitialize+set}" = set; then
11390  echo $ECHO_N "(cached) $ECHO_C" >&6
11391else
11392  cat >conftest.$ac_ext <<_ACEOF
11393#line 11393 "configure"
11394#include "confdefs.h"
11395/* System header to define __stub macros and hopefully few prototypes,
11396    which can conflict with char XtAppInitialize (); below.  */
11397#include <assert.h>
11398/* Override any gcc2 internal prototype to avoid an error.  */
11399#ifdef __cplusplus
11400extern "C"
11401#endif
11402/* We use char because int might match the return type of a gcc2
11403   builtin and then its argument prototype would still apply.  */
11404char XtAppInitialize ();
11405char (*f) ();
11406
11407int
11408main ()
11409{
11410/* The GNU C library defines this for functions which it implements
11411    to always fail with ENOSYS.  Some functions are actually named
11412    something starting with __ and the normal name is an alias.  */
11413#if defined (__stub_XtAppInitialize) || defined (__stub___XtAppInitialize)
11414choke me
11415#else
11416f = XtAppInitialize; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
11417#endif
11418
11419  ;
11420  return 0;
11421}
11422_ACEOF
11423rm -f conftest.$ac_objext conftest$ac_exeext
11424if { (eval echo "$as_me:11424: \"$ac_link\"") >&5
11425  (eval $ac_link) 2>&5
11426  ac_status=$?
11427  echo "$as_me:11427: \$? = $ac_status" >&5
11428  (exit $ac_status); } &&
11429         { ac_try='test -s conftest$ac_exeext'
11430  { (eval echo "$as_me:11430: \"$ac_try\"") >&5
11431  (eval $ac_try) 2>&5
11432  ac_status=$?
11433  echo "$as_me:11433: \$? = $ac_status" >&5
11434  (exit $ac_status); }; }; then
11435  ac_cv_func_XtAppInitialize=yes
11436else
11437  echo "$as_me: failed program was:" >&5
11438cat conftest.$ac_ext >&5
11439ac_cv_func_XtAppInitialize=no
11440fi
11441rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11442fi
11443echo "$as_me:11443: result: $ac_cv_func_XtAppInitialize" >&5
11444echo "${ECHO_T}$ac_cv_func_XtAppInitialize" >&6
11445if test $ac_cv_func_XtAppInitialize = yes; then
11446  :
11447else
11448
11449	echo "$as_me:11449: checking for XtAppInitialize in -lXt" >&5
11450echo $ECHO_N "checking for XtAppInitialize in -lXt... $ECHO_C" >&6
11451if test "${ac_cv_lib_Xt_XtAppInitialize+set}" = set; then
11452  echo $ECHO_N "(cached) $ECHO_C" >&6
11453else
11454  ac_check_lib_save_LIBS=$LIBS
11455LIBS="-lXt $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
11456cat >conftest.$ac_ext <<_ACEOF
11457#line 11457 "configure"
11458#include "confdefs.h"
11459
11460/* Override any gcc2 internal prototype to avoid an error.  */
11461#ifdef __cplusplus
11462extern "C"
11463#endif
11464/* We use char because int might match the return type of a gcc2
11465   builtin and then its argument prototype would still apply.  */
11466char XtAppInitialize ();
11467int
11468main ()
11469{
11470XtAppInitialize ();
11471  ;
11472  return 0;
11473}
11474_ACEOF
11475rm -f conftest.$ac_objext conftest$ac_exeext
11476if { (eval echo "$as_me:11476: \"$ac_link\"") >&5
11477  (eval $ac_link) 2>&5
11478  ac_status=$?
11479  echo "$as_me:11479: \$? = $ac_status" >&5
11480  (exit $ac_status); } &&
11481         { ac_try='test -s conftest$ac_exeext'
11482  { (eval echo "$as_me:11482: \"$ac_try\"") >&5
11483  (eval $ac_try) 2>&5
11484  ac_status=$?
11485  echo "$as_me:11485: \$? = $ac_status" >&5
11486  (exit $ac_status); }; }; then
11487  ac_cv_lib_Xt_XtAppInitialize=yes
11488else
11489  echo "$as_me: failed program was:" >&5
11490cat conftest.$ac_ext >&5
11491ac_cv_lib_Xt_XtAppInitialize=no
11492fi
11493rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11494LIBS=$ac_check_lib_save_LIBS
11495fi
11496echo "$as_me:11496: result: $ac_cv_lib_Xt_XtAppInitialize" >&5
11497echo "${ECHO_T}$ac_cv_lib_Xt_XtAppInitialize" >&6
11498if test $ac_cv_lib_Xt_XtAppInitialize = yes; then
11499
11500cat >>confdefs.h <<\EOF
11501#define HAVE_LIBXT 1
11502EOF
11503
11504		 cf_have_X_LIBS=Xt
11505		 LIBS="-lXt $X_PRE_LIBS $LIBS $X_EXTRA_LIBS"
11506fi
11507
11508fi
11509
11510fi
11511
11512if test $cf_have_X_LIBS = no ; then
11513	{ echo "$as_me:11513: WARNING: Unable to successfully link X Toolkit library (-lXt) with
11514test program.  You will have to check and add the proper libraries by hand
11515to makefile." >&5
11516echo "$as_me: WARNING: Unable to successfully link X Toolkit library (-lXt) with
11517test program.  You will have to check and add the proper libraries by hand
11518to makefile." >&2;}
11519fi
11520
11521cf_x_athena_root=$cf_x_athena
11522cf_x_athena_inc=""
11523
11524for cf_path in default \
11525	/usr/contrib/X11R6 \
11526	/usr/contrib/X11R5 \
11527	/usr/lib/X11R5 \
11528	/usr/local
11529do
11530	if test -z "$cf_x_athena_inc" ; then
11531		cf_save="$CPPFLAGS"
11532		cf_test=X11/$cf_x_athena_root/SimpleMenu.h
11533		if test $cf_path != default ; then
11534			CPPFLAGS="$cf_save -I$cf_path/include"
11535			echo "$as_me:11535: checking for $cf_test in $cf_path" >&5
11536echo $ECHO_N "checking for $cf_test in $cf_path... $ECHO_C" >&6
11537		else
11538			echo "$as_me:11538: checking for $cf_test" >&5
11539echo $ECHO_N "checking for $cf_test... $ECHO_C" >&6
11540		fi
11541		cat >conftest.$ac_ext <<_ACEOF
11542#line 11542 "configure"
11543#include "confdefs.h"
11544
11545#include <X11/Intrinsic.h>
11546#include <$cf_test>
11547int
11548main ()
11549{
11550
11551  ;
11552  return 0;
11553}
11554_ACEOF
11555rm -f conftest.$ac_objext
11556if { (eval echo "$as_me:11556: \"$ac_compile\"") >&5
11557  (eval $ac_compile) 2>&5
11558  ac_status=$?
11559  echo "$as_me:11559: \$? = $ac_status" >&5
11560  (exit $ac_status); } &&
11561         { ac_try='test -s conftest.$ac_objext'
11562  { (eval echo "$as_me:11562: \"$ac_try\"") >&5
11563  (eval $ac_try) 2>&5
11564  ac_status=$?
11565  echo "$as_me:11565: \$? = $ac_status" >&5
11566  (exit $ac_status); }; }; then
11567  cf_result=yes
11568else
11569  echo "$as_me: failed program was:" >&5
11570cat conftest.$ac_ext >&5
11571cf_result=no
11572fi
11573rm -f conftest.$ac_objext conftest.$ac_ext
11574		echo "$as_me:11574: result: $cf_result" >&5
11575echo "${ECHO_T}$cf_result" >&6
11576		if test "$cf_result" = yes ; then
11577			cf_x_athena_inc=$cf_path
11578			break
11579		else
11580			CPPFLAGS="$cf_save"
11581		fi
11582	fi
11583done
11584
11585if test -z "$cf_x_athena_inc" ; then
11586	{ echo "$as_me:11586: WARNING: Unable to successfully find Athena header files with test program" >&5
11587echo "$as_me: WARNING: Unable to successfully find Athena header files with test program" >&2;}
11588elif test "$cf_x_athena_inc" != default ; then
11589	CPPFLAGS="$CPPFLAGS -I$cf_x_athena_inc"
11590fi
11591
11592cf_x_athena_root=$cf_x_athena
11593cf_x_athena_lib=""
11594
11595for cf_path in default \
11596	/usr/contrib/X11R6 \
11597	/usr/contrib/X11R5 \
11598	/usr/lib/X11R5 \
11599	/usr/local
11600do
11601	for cf_lib in \
11602		${cf_x_athena_root} \
11603		${cf_x_athena_root}7 \
11604		${cf_x_athena_root}6
11605	do
11606	for cf_libs in \
11607		"-l$cf_lib -lXmu" \
11608		"-l$cf_lib -lXpm -lXmu" \
11609		"-l${cf_lib}_s -lXmu_s"
11610	do
11611		if test -z "$cf_x_athena_lib" ; then
11612			cf_save="$LIBS"
11613			cf_test=XawSimpleMenuAddGlobalActions
11614			if test $cf_path != default ; then
11615				LIBS="-L$cf_path/lib $cf_libs $LIBS"
11616				echo "$as_me:11616: checking for $cf_libs in $cf_path" >&5
11617echo $ECHO_N "checking for $cf_libs in $cf_path... $ECHO_C" >&6
11618			else
11619				LIBS="$cf_libs $LIBS"
11620				echo "$as_me:11620: checking for $cf_test in $cf_libs" >&5
11621echo $ECHO_N "checking for $cf_test in $cf_libs... $ECHO_C" >&6
11622			fi
11623			cat >conftest.$ac_ext <<_ACEOF
11624#line 11624 "configure"
11625#include "confdefs.h"
11626
11627#include <X11/Intrinsic.h>
11628#include <X11/$cf_x_athena_root/SimpleMenu.h>
11629
11630int
11631main ()
11632{
11633
11634$cf_test((XtAppContext) 0)
11635  ;
11636  return 0;
11637}
11638_ACEOF
11639rm -f conftest.$ac_objext conftest$ac_exeext
11640if { (eval echo "$as_me:11640: \"$ac_link\"") >&5
11641  (eval $ac_link) 2>&5
11642  ac_status=$?
11643  echo "$as_me:11643: \$? = $ac_status" >&5
11644  (exit $ac_status); } &&
11645         { ac_try='test -s conftest$ac_exeext'
11646  { (eval echo "$as_me:11646: \"$ac_try\"") >&5
11647  (eval $ac_try) 2>&5
11648  ac_status=$?
11649  echo "$as_me:11649: \$? = $ac_status" >&5
11650  (exit $ac_status); }; }; then
11651  cf_result=yes
11652else
11653  echo "$as_me: failed program was:" >&5
11654cat conftest.$ac_ext >&5
11655cf_result=no
11656fi
11657rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11658			echo "$as_me:11658: result: $cf_result" >&5
11659echo "${ECHO_T}$cf_result" >&6
11660			if test "$cf_result" = yes ; then
11661				cf_x_athena_lib="$cf_libs"
11662				break
11663			fi
11664			LIBS="$cf_save"
11665		fi
11666	done # cf_libs
11667		test -n "$cf_x_athena_lib" && break
11668	done # cf_lib
11669done
11670
11671if test -z "$cf_x_athena_lib" ; then
11672	{ { echo "$as_me:11672: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&5
11673echo "$as_me: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&2;}
11674   { (exit 1); exit 1; }; }
11675fi
11676
11677cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
11678
11679cat >>confdefs.h <<EOF
11680#define $cf_x_athena_LIBS 1
11681EOF
11682
11683fi
11684
11685for ac_header in X11/Xpoll.h
11686do
11687as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11688echo "$as_me:11688: checking for $ac_header" >&5
11689echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11690if eval "test \"\${$as_ac_Header+set}\" = set"; then
11691  echo $ECHO_N "(cached) $ECHO_C" >&6
11692else
11693  cat >conftest.$ac_ext <<_ACEOF
11694#line 11694 "configure"
11695#include "confdefs.h"
11696#include <$ac_header>
11697_ACEOF
11698if { (eval echo "$as_me:11698: \"$ac_cpp conftest.$ac_ext\"") >&5
11699  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11700  ac_status=$?
11701  egrep -v '^ *\+' conftest.er1 >conftest.err
11702  rm -f conftest.er1
11703  cat conftest.err >&5
11704  echo "$as_me:11704: \$? = $ac_status" >&5
11705  (exit $ac_status); } >/dev/null; then
11706  if test -s conftest.err; then
11707    ac_cpp_err=$ac_c_preproc_warn_flag
11708  else
11709    ac_cpp_err=
11710  fi
11711else
11712  ac_cpp_err=yes
11713fi
11714if test -z "$ac_cpp_err"; then
11715  eval "$as_ac_Header=yes"
11716else
11717  echo "$as_me: failed program was:" >&5
11718  cat conftest.$ac_ext >&5
11719  eval "$as_ac_Header=no"
11720fi
11721rm -f conftest.err conftest.$ac_ext
11722fi
11723echo "$as_me:11723: result: `eval echo '${'$as_ac_Header'}'`" >&5
11724echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11725if test `eval echo '${'$as_ac_Header'}'` = yes; then
11726  cat >>confdefs.h <<EOF
11727#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11728EOF
11729
11730fi
11731done
11732
11733echo "$as_me:11733: checking for declaration of fd_set" >&5
11734echo $ECHO_N "checking for declaration of fd_set... $ECHO_C" >&6
11735if test "${cf_cv_type_fd_set+set}" = set; then
11736  echo $ECHO_N "(cached) $ECHO_C" >&6
11737else
11738
11739echo "${as_me:-configure}:11739: testing sys/types alone ..." 1>&5
11740
11741cat >conftest.$ac_ext <<_ACEOF
11742#line 11742 "configure"
11743#include "confdefs.h"
11744
11745#include <sys/types.h>
11746int
11747main ()
11748{
11749fd_set x
11750  ;
11751  return 0;
11752}
11753_ACEOF
11754rm -f conftest.$ac_objext
11755if { (eval echo "$as_me:11755: \"$ac_compile\"") >&5
11756  (eval $ac_compile) 2>&5
11757  ac_status=$?
11758  echo "$as_me:11758: \$? = $ac_status" >&5
11759  (exit $ac_status); } &&
11760         { ac_try='test -s conftest.$ac_objext'
11761  { (eval echo "$as_me:11761: \"$ac_try\"") >&5
11762  (eval $ac_try) 2>&5
11763  ac_status=$?
11764  echo "$as_me:11764: \$? = $ac_status" >&5
11765  (exit $ac_status); }; }; then
11766  cf_cv_type_fd_set=sys/types.h
11767else
11768  echo "$as_me: failed program was:" >&5
11769cat conftest.$ac_ext >&5
11770
11771echo "${as_me:-configure}:11771: testing X11/Xpoll.h ..." 1>&5
11772
11773cat >conftest.$ac_ext <<_ACEOF
11774#line 11774 "configure"
11775#include "confdefs.h"
11776
11777#ifdef HAVE_X11_XPOLL_H
11778#include <X11/Xpoll.h>
11779#endif
11780int
11781main ()
11782{
11783fd_set x
11784  ;
11785  return 0;
11786}
11787_ACEOF
11788rm -f conftest.$ac_objext
11789if { (eval echo "$as_me:11789: \"$ac_compile\"") >&5
11790  (eval $ac_compile) 2>&5
11791  ac_status=$?
11792  echo "$as_me:11792: \$? = $ac_status" >&5
11793  (exit $ac_status); } &&
11794         { ac_try='test -s conftest.$ac_objext'
11795  { (eval echo "$as_me:11795: \"$ac_try\"") >&5
11796  (eval $ac_try) 2>&5
11797  ac_status=$?
11798  echo "$as_me:11798: \$? = $ac_status" >&5
11799  (exit $ac_status); }; }; then
11800  cf_cv_type_fd_set=X11/Xpoll.h
11801else
11802  echo "$as_me: failed program was:" >&5
11803cat conftest.$ac_ext >&5
11804
11805echo "${as_me:-configure}:11805: testing sys/select.h ..." 1>&5
11806
11807cat >conftest.$ac_ext <<_ACEOF
11808#line 11808 "configure"
11809#include "confdefs.h"
11810
11811#include <sys/types.h>
11812#include <sys/select.h>
11813int
11814main ()
11815{
11816fd_set x
11817  ;
11818  return 0;
11819}
11820_ACEOF
11821rm -f conftest.$ac_objext
11822if { (eval echo "$as_me:11822: \"$ac_compile\"") >&5
11823  (eval $ac_compile) 2>&5
11824  ac_status=$?
11825  echo "$as_me:11825: \$? = $ac_status" >&5
11826  (exit $ac_status); } &&
11827         { ac_try='test -s conftest.$ac_objext'
11828  { (eval echo "$as_me:11828: \"$ac_try\"") >&5
11829  (eval $ac_try) 2>&5
11830  ac_status=$?
11831  echo "$as_me:11831: \$? = $ac_status" >&5
11832  (exit $ac_status); }; }; then
11833  cf_cv_type_fd_set=sys/select.h
11834else
11835  echo "$as_me: failed program was:" >&5
11836cat conftest.$ac_ext >&5
11837cf_cv_type_fd_set=unknown
11838fi
11839rm -f conftest.$ac_objext conftest.$ac_ext
11840fi
11841rm -f conftest.$ac_objext conftest.$ac_ext
11842fi
11843rm -f conftest.$ac_objext conftest.$ac_ext
11844fi
11845echo "$as_me:11845: result: $cf_cv_type_fd_set" >&5
11846echo "${ECHO_T}$cf_cv_type_fd_set" >&6
11847if test $cf_cv_type_fd_set = sys/select.h ; then
11848
11849cat >>confdefs.h <<\EOF
11850#define USE_SYS_SELECT_H 1
11851EOF
11852
11853fi
11854
11855echo "$as_me:11855: checking for declaration of fd_mask" >&5
11856echo $ECHO_N "checking for declaration of fd_mask... $ECHO_C" >&6
11857if test "${cf_cv_type_fd_mask+set}" = set; then
11858  echo $ECHO_N "(cached) $ECHO_C" >&6
11859else
11860
11861    if test x$cf_cv_type_fd_set = xX11/Xpoll.h ; then
11862        cat >conftest.$ac_ext <<_ACEOF
11863#line 11863 "configure"
11864#include "confdefs.h"
11865
11866#include <X11/Xpoll.h>
11867int
11868main ()
11869{
11870fd_mask x
11871  ;
11872  return 0;
11873}
11874_ACEOF
11875rm -f conftest.$ac_objext
11876if { (eval echo "$as_me:11876: \"$ac_compile\"") >&5
11877  (eval $ac_compile) 2>&5
11878  ac_status=$?
11879  echo "$as_me:11879: \$? = $ac_status" >&5
11880  (exit $ac_status); } &&
11881         { ac_try='test -s conftest.$ac_objext'
11882  { (eval echo "$as_me:11882: \"$ac_try\"") >&5
11883  (eval $ac_try) 2>&5
11884  ac_status=$?
11885  echo "$as_me:11885: \$? = $ac_status" >&5
11886  (exit $ac_status); }; }; then
11887  :
11888else
11889  echo "$as_me: failed program was:" >&5
11890cat conftest.$ac_ext >&5
11891
11892echo "${as_me:-configure}:11892: testing if we must define CSRG_BASED ..." 1>&5
11893
11894# Xosdefs.h on Mac OS X may not define this (but it should).
11895            cat >conftest.$ac_ext <<_ACEOF
11896#line 11896 "configure"
11897#include "confdefs.h"
11898
11899#define CSRG_BASED
11900#include <X11/Xpoll.h>
11901int
11902main ()
11903{
11904fd_mask x
11905  ;
11906  return 0;
11907}
11908_ACEOF
11909rm -f conftest.$ac_objext
11910if { (eval echo "$as_me:11910: \"$ac_compile\"") >&5
11911  (eval $ac_compile) 2>&5
11912  ac_status=$?
11913  echo "$as_me:11913: \$? = $ac_status" >&5
11914  (exit $ac_status); } &&
11915         { ac_try='test -s conftest.$ac_objext'
11916  { (eval echo "$as_me:11916: \"$ac_try\"") >&5
11917  (eval $ac_try) 2>&5
11918  ac_status=$?
11919  echo "$as_me:11919: \$? = $ac_status" >&5
11920  (exit $ac_status); }; }; then
11921  cf_cv_type_fd_mask=CSRG_BASED
11922else
11923  echo "$as_me: failed program was:" >&5
11924cat conftest.$ac_ext >&5
11925fi
11926rm -f conftest.$ac_objext conftest.$ac_ext
11927fi
11928rm -f conftest.$ac_objext conftest.$ac_ext
11929    else
11930        cf_cv_type_fd_mask=$cf_cv_type_fd_set
11931    fi
11932
11933fi
11934echo "$as_me:11934: result: $cf_cv_type_fd_mask" >&5
11935echo "${ECHO_T}$cf_cv_type_fd_mask" >&6
11936if test x$cf_cv_type_fd_mask = xCSRG_BASED ; then
11937
11938cat >>confdefs.h <<\EOF
11939#define CSRG_BASED 1
11940EOF
11941
11942fi
11943
11944echo "$as_me:11944: checking for IRIX 6.5 baud-rate redefinitions" >&5
11945echo $ECHO_N "checking for IRIX 6.5 baud-rate redefinitions... $ECHO_C" >&6
11946if test "${cf_cv_termio_c_ispeed+set}" = set; then
11947  echo $ECHO_N "(cached) $ECHO_C" >&6
11948else
11949
11950cat >conftest.$ac_ext <<_ACEOF
11951#line 11951 "configure"
11952#include "confdefs.h"
11953
11954#include <sys/types.h>
11955#include <sys/termio.h>
11956int
11957main ()
11958{
11959
11960struct termio foo;
11961foo.c_ispeed = B38400;
11962foo.c_ospeed = B9600;
11963
11964  ;
11965  return 0;
11966}
11967_ACEOF
11968rm -f conftest.$ac_objext
11969if { (eval echo "$as_me:11969: \"$ac_compile\"") >&5
11970  (eval $ac_compile) 2>&5
11971  ac_status=$?
11972  echo "$as_me:11972: \$? = $ac_status" >&5
11973  (exit $ac_status); } &&
11974         { ac_try='test -s conftest.$ac_objext'
11975  { (eval echo "$as_me:11975: \"$ac_try\"") >&5
11976  (eval $ac_try) 2>&5
11977  ac_status=$?
11978  echo "$as_me:11978: \$? = $ac_status" >&5
11979  (exit $ac_status); }; }; then
11980  cf_cv_termio_c_ispeed=yes
11981
11982else
11983  echo "$as_me: failed program was:" >&5
11984cat conftest.$ac_ext >&5
11985cf_cv_termio_c_ispeed=no
11986fi
11987rm -f conftest.$ac_objext conftest.$ac_ext
11988
11989fi
11990echo "$as_me:11990: result: $cf_cv_termio_c_ispeed" >&5
11991echo "${ECHO_T}$cf_cv_termio_c_ispeed" >&6
11992test "$cf_cv_termio_c_ispeed" = yes &&
11993cat >>confdefs.h <<\EOF
11994#define HAVE_TERMIO_C_ISPEED 1
11995EOF
11996
11997LIBS="$LIBS $X_EXTRA_LIBS"
11998
11999for ac_header in \
12000stropts.h \
12001
12002do
12003as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12004echo "$as_me:12004: checking for $ac_header" >&5
12005echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12006if eval "test \"\${$as_ac_Header+set}\" = set"; then
12007  echo $ECHO_N "(cached) $ECHO_C" >&6
12008else
12009  cat >conftest.$ac_ext <<_ACEOF
12010#line 12010 "configure"
12011#include "confdefs.h"
12012#include <$ac_header>
12013_ACEOF
12014if { (eval echo "$as_me:12014: \"$ac_cpp conftest.$ac_ext\"") >&5
12015  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12016  ac_status=$?
12017  egrep -v '^ *\+' conftest.er1 >conftest.err
12018  rm -f conftest.er1
12019  cat conftest.err >&5
12020  echo "$as_me:12020: \$? = $ac_status" >&5
12021  (exit $ac_status); } >/dev/null; then
12022  if test -s conftest.err; then
12023    ac_cpp_err=$ac_c_preproc_warn_flag
12024  else
12025    ac_cpp_err=
12026  fi
12027else
12028  ac_cpp_err=yes
12029fi
12030if test -z "$ac_cpp_err"; then
12031  eval "$as_ac_Header=yes"
12032else
12033  echo "$as_me: failed program was:" >&5
12034  cat conftest.$ac_ext >&5
12035  eval "$as_ac_Header=no"
12036fi
12037rm -f conftest.err conftest.$ac_ext
12038fi
12039echo "$as_me:12039: result: `eval echo '${'$as_ac_Header'}'`" >&5
12040echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12041if test `eval echo '${'$as_ac_Header'}'` = yes; then
12042  cat >>confdefs.h <<EOF
12043#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12044EOF
12045
12046fi
12047done
12048
12049cf_func_grantpt="grantpt ptsname"
12050case $host_os in #(vi
12051darwin[0-9].*) #(vi
12052	;;
12053*)
12054	cf_func_grantpt="$cf_func_grantpt posix_openpt"
12055	;;
12056esac
12057
12058for ac_func in $cf_func_grantpt
12059do
12060as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12061echo "$as_me:12061: checking for $ac_func" >&5
12062echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12063if eval "test \"\${$as_ac_var+set}\" = set"; then
12064  echo $ECHO_N "(cached) $ECHO_C" >&6
12065else
12066  cat >conftest.$ac_ext <<_ACEOF
12067#line 12067 "configure"
12068#include "confdefs.h"
12069/* System header to define __stub macros and hopefully few prototypes,
12070    which can conflict with char $ac_func (); below.  */
12071#include <assert.h>
12072/* Override any gcc2 internal prototype to avoid an error.  */
12073#ifdef __cplusplus
12074extern "C"
12075#endif
12076/* We use char because int might match the return type of a gcc2
12077   builtin and then its argument prototype would still apply.  */
12078char $ac_func ();
12079char (*f) ();
12080
12081int
12082main ()
12083{
12084/* The GNU C library defines this for functions which it implements
12085    to always fail with ENOSYS.  Some functions are actually named
12086    something starting with __ and the normal name is an alias.  */
12087#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12088choke me
12089#else
12090f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
12091#endif
12092
12093  ;
12094  return 0;
12095}
12096_ACEOF
12097rm -f conftest.$ac_objext conftest$ac_exeext
12098if { (eval echo "$as_me:12098: \"$ac_link\"") >&5
12099  (eval $ac_link) 2>&5
12100  ac_status=$?
12101  echo "$as_me:12101: \$? = $ac_status" >&5
12102  (exit $ac_status); } &&
12103         { ac_try='test -s conftest$ac_exeext'
12104  { (eval echo "$as_me:12104: \"$ac_try\"") >&5
12105  (eval $ac_try) 2>&5
12106  ac_status=$?
12107  echo "$as_me:12107: \$? = $ac_status" >&5
12108  (exit $ac_status); }; }; then
12109  eval "$as_ac_var=yes"
12110else
12111  echo "$as_me: failed program was:" >&5
12112cat conftest.$ac_ext >&5
12113eval "$as_ac_var=no"
12114fi
12115rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12116fi
12117echo "$as_me:12117: result: `eval echo '${'$as_ac_var'}'`" >&5
12118echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12119if test `eval echo '${'$as_ac_var'}'` = yes; then
12120  cat >>confdefs.h <<EOF
12121#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12122EOF
12123
12124fi
12125done
12126
12127cf_grantpt_opts=
12128if test "x$ac_cv_func_grantpt" = "xyes" ; then
12129	echo "$as_me:12129: checking if grantpt really works" >&5
12130echo $ECHO_N "checking if grantpt really works... $ECHO_C" >&6
12131	cat >conftest.$ac_ext <<_ACEOF
12132#line 12132 "configure"
12133#include "confdefs.h"
12134
12135#include <stdlib.h>
12136#include <termios.h>
12137#include <unistd.h>
12138#include <signal.h>
12139#include <fcntl.h>
12140#include <errno.h>
12141
12142#ifndef HAVE_POSIX_OPENPT
12143#undef posix_openpt
12144#define posix_openpt(mode) open("/dev/ptmx", mode)
12145#endif
12146
12147#ifdef HAVE_STROPTS_H
12148#include <stropts.h>
12149#endif
12150
12151static void failed(int code)
12152{
12153	perror("conftest");
12154	exit(code);
12155}
12156
12157static void my_timeout(int sig)
12158{
12159	exit(99);
12160}
12161
12162int
12163main ()
12164{
12165
12166	int code = 0;
12167	int rc;
12168	int pty;
12169	int tty;
12170	char *slave;
12171	struct termios tio;
12172
12173	signal(SIGALRM, my_timeout);
12174
12175	if (alarm(2) == 9)
12176		failed(9);
12177	else if ((pty = posix_openpt(O_RDWR)) < 0)
12178		failed(1);
12179	else if ((rc = grantpt(pty)) < 0)
12180		failed(2);
12181	else if ((rc = unlockpt(pty)) < 0)
12182		failed(3);
12183	else if ((slave = ptsname(pty)) == 0)
12184		failed(4);
12185#if (CONFTEST == 3) || defined(CONFTEST_isatty)
12186	else if (!isatty(pty))
12187		failed(4);
12188#endif
12189#if CONFTEST >= 4
12190    else if ((rc = tcgetattr(pty, &tio)) < 0)
12191		failed(20);
12192    else if ((rc = tcsetattr(pty, TCSAFLUSH, &tio)) < 0)
12193		failed(21);
12194#endif
12195	/* BSD posix_openpt does not treat pty as a terminal until slave is opened.
12196	 * Linux does treat it that way.
12197	 */
12198	else if ((tty = open(slave, O_RDWR)) < 0)
12199		failed(5);
12200#ifdef CONFTEST
12201#ifdef I_PUSH
12202#if (CONFTEST == 0) || defined(CONFTEST_ptem)
12203    else if ((rc = ioctl(tty, I_PUSH, "ptem")) < 0)
12204		failed(10);
12205#endif
12206#if (CONFTEST == 1) || defined(CONFTEST_ldterm)
12207    else if ((rc = ioctl(tty, I_PUSH, "ldterm")) < 0)
12208		failed(11);
12209#endif
12210#if (CONFTEST == 2) || defined(CONFTEST_ttcompat)
12211    else if ((rc = ioctl(tty, I_PUSH, "ttcompat")) < 0)
12212		failed(12);
12213#endif
12214#endif /* I_PUSH */
12215#if CONFTEST >= 5
12216    else if ((rc = tcgetattr(tty, &tio)) < 0)
12217		failed(30);
12218    else if ((rc = tcsetattr(tty, TCSAFLUSH, &tio)) < 0)
12219		failed(31);
12220#endif
12221#endif /* CONFTEST */
12222
12223	${cf_cv_main_return:-return}(code);
12224
12225  ;
12226  return 0;
12227}
12228_ACEOF
12229rm -f conftest.$ac_objext conftest$ac_exeext
12230if { (eval echo "$as_me:12230: \"$ac_link\"") >&5
12231  (eval $ac_link) 2>&5
12232  ac_status=$?
12233  echo "$as_me:12233: \$? = $ac_status" >&5
12234  (exit $ac_status); } &&
12235         { ac_try='test -s conftest$ac_exeext'
12236  { (eval echo "$as_me:12236: \"$ac_try\"") >&5
12237  (eval $ac_try) 2>&5
12238  ac_status=$?
12239  echo "$as_me:12239: \$? = $ac_status" >&5
12240  (exit $ac_status); }; }; then
12241
12242	if test "$cross_compiling" = yes; then
12243  ac_cv_func_grantpt=maybe
12244else
12245  cat >conftest.$ac_ext <<_ACEOF
12246#line 12246 "configure"
12247#include "confdefs.h"
12248
12249#include <stdlib.h>
12250#include <termios.h>
12251#include <unistd.h>
12252#include <signal.h>
12253#include <fcntl.h>
12254#include <errno.h>
12255
12256#ifndef HAVE_POSIX_OPENPT
12257#undef posix_openpt
12258#define posix_openpt(mode) open("/dev/ptmx", mode)
12259#endif
12260
12261#ifdef HAVE_STROPTS_H
12262#include <stropts.h>
12263#endif
12264
12265static void failed(int code)
12266{
12267	perror("conftest");
12268	exit(code);
12269}
12270
12271static void my_timeout(int sig)
12272{
12273	exit(99);
12274}
12275
12276int main(void)
12277{
12278
12279	int code = 0;
12280	int rc;
12281	int pty;
12282	int tty;
12283	char *slave;
12284	struct termios tio;
12285
12286	signal(SIGALRM, my_timeout);
12287
12288	if (alarm(2) == 9)
12289		failed(9);
12290	else if ((pty = posix_openpt(O_RDWR)) < 0)
12291		failed(1);
12292	else if ((rc = grantpt(pty)) < 0)
12293		failed(2);
12294	else if ((rc = unlockpt(pty)) < 0)
12295		failed(3);
12296	else if ((slave = ptsname(pty)) == 0)
12297		failed(4);
12298#if (CONFTEST == 3) || defined(CONFTEST_isatty)
12299	else if (!isatty(pty))
12300		failed(4);
12301#endif
12302#if CONFTEST >= 4
12303    else if ((rc = tcgetattr(pty, &tio)) < 0)
12304		failed(20);
12305    else if ((rc = tcsetattr(pty, TCSAFLUSH, &tio)) < 0)
12306		failed(21);
12307#endif
12308	/* BSD posix_openpt does not treat pty as a terminal until slave is opened.
12309	 * Linux does treat it that way.
12310	 */
12311	else if ((tty = open(slave, O_RDWR)) < 0)
12312		failed(5);
12313#ifdef CONFTEST
12314#ifdef I_PUSH
12315#if (CONFTEST == 0) || defined(CONFTEST_ptem)
12316    else if ((rc = ioctl(tty, I_PUSH, "ptem")) < 0)
12317		failed(10);
12318#endif
12319#if (CONFTEST == 1) || defined(CONFTEST_ldterm)
12320    else if ((rc = ioctl(tty, I_PUSH, "ldterm")) < 0)
12321		failed(11);
12322#endif
12323#if (CONFTEST == 2) || defined(CONFTEST_ttcompat)
12324    else if ((rc = ioctl(tty, I_PUSH, "ttcompat")) < 0)
12325		failed(12);
12326#endif
12327#endif /* I_PUSH */
12328#if CONFTEST >= 5
12329    else if ((rc = tcgetattr(tty, &tio)) < 0)
12330		failed(30);
12331    else if ((rc = tcsetattr(tty, TCSAFLUSH, &tio)) < 0)
12332		failed(31);
12333#endif
12334#endif /* CONFTEST */
12335
12336	${cf_cv_main_return:-return}(code);
12337
12338}
12339
12340_ACEOF
12341rm -f conftest$ac_exeext
12342if { (eval echo "$as_me:12342: \"$ac_link\"") >&5
12343  (eval $ac_link) 2>&5
12344  ac_status=$?
12345  echo "$as_me:12345: \$? = $ac_status" >&5
12346  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12347  { (eval echo "$as_me:12347: \"$ac_try\"") >&5
12348  (eval $ac_try) 2>&5
12349  ac_status=$?
12350  echo "$as_me:12350: \$? = $ac_status" >&5
12351  (exit $ac_status); }; }; then
12352  :
12353else
12354  echo "$as_me: program exited with status $ac_status" >&5
12355echo "$as_me: failed program was:" >&5
12356cat conftest.$ac_ext >&5
12357ac_cv_func_grantpt=no
12358
12359fi
12360rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12361fi
12362
12363else
12364  echo "$as_me: failed program was:" >&5
12365cat conftest.$ac_ext >&5
12366ac_cv_func_grantpt=no
12367fi
12368rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12369	echo "$as_me:12369: result: $ac_cv_func_grantpt" >&5
12370echo "${ECHO_T}$ac_cv_func_grantpt" >&6
12371
12372	if test "x$ac_cv_func_grantpt" != "xno" ; then
12373
12374		if test "x$ac_cv_func_grantpt" = "xyes" ; then
12375			echo "$as_me:12375: checking for pty features" >&5
12376echo $ECHO_N "checking for pty features... $ECHO_C" >&6
12377			if test "x$ac_cv_header_stropts_h" = xyes
12378			then
12379				cf_pty_this=0
12380			else
12381				cf_pty_this=3
12382			fi
12383
12384			cf_pty_defines=
12385			while test $cf_pty_this != 6
12386			do
12387
12388				cf_pty_feature=
12389				cf_pty_next=`expr $cf_pty_this + 1`
12390
12391echo "${as_me:-configure}:12391: testing pty feature test $cf_pty_next:5 ..." 1>&5
12392
12393				if test "$cross_compiling" = yes; then
12394  { { echo "$as_me:12394: error: cannot run test program while cross compiling" >&5
12395echo "$as_me: error: cannot run test program while cross compiling" >&2;}
12396   { (exit 1); exit 1; }; }
12397else
12398  cat >conftest.$ac_ext <<_ACEOF
12399#line 12399 "configure"
12400#include "confdefs.h"
12401#define CONFTEST $cf_pty_this
12402$cf_pty_defines
12403
12404#include <stdlib.h>
12405#include <termios.h>
12406#include <unistd.h>
12407#include <signal.h>
12408#include <fcntl.h>
12409#include <errno.h>
12410
12411#ifndef HAVE_POSIX_OPENPT
12412#undef posix_openpt
12413#define posix_openpt(mode) open("/dev/ptmx", mode)
12414#endif
12415
12416#ifdef HAVE_STROPTS_H
12417#include <stropts.h>
12418#endif
12419
12420static void failed(int code)
12421{
12422	perror("conftest");
12423	exit(code);
12424}
12425
12426static void my_timeout(int sig)
12427{
12428	exit(99);
12429}
12430
12431int main(void)
12432{
12433
12434	int code = 0;
12435	int rc;
12436	int pty;
12437	int tty;
12438	char *slave;
12439	struct termios tio;
12440
12441	signal(SIGALRM, my_timeout);
12442
12443	if (alarm(2) == 9)
12444		failed(9);
12445	else if ((pty = posix_openpt(O_RDWR)) < 0)
12446		failed(1);
12447	else if ((rc = grantpt(pty)) < 0)
12448		failed(2);
12449	else if ((rc = unlockpt(pty)) < 0)
12450		failed(3);
12451	else if ((slave = ptsname(pty)) == 0)
12452		failed(4);
12453#if (CONFTEST == 3) || defined(CONFTEST_isatty)
12454	else if (!isatty(pty))
12455		failed(4);
12456#endif
12457#if CONFTEST >= 4
12458    else if ((rc = tcgetattr(pty, &tio)) < 0)
12459		failed(20);
12460    else if ((rc = tcsetattr(pty, TCSAFLUSH, &tio)) < 0)
12461		failed(21);
12462#endif
12463	/* BSD posix_openpt does not treat pty as a terminal until slave is opened.
12464	 * Linux does treat it that way.
12465	 */
12466	else if ((tty = open(slave, O_RDWR)) < 0)
12467		failed(5);
12468#ifdef CONFTEST
12469#ifdef I_PUSH
12470#if (CONFTEST == 0) || defined(CONFTEST_ptem)
12471    else if ((rc = ioctl(tty, I_PUSH, "ptem")) < 0)
12472		failed(10);
12473#endif
12474#if (CONFTEST == 1) || defined(CONFTEST_ldterm)
12475    else if ((rc = ioctl(tty, I_PUSH, "ldterm")) < 0)
12476		failed(11);
12477#endif
12478#if (CONFTEST == 2) || defined(CONFTEST_ttcompat)
12479    else if ((rc = ioctl(tty, I_PUSH, "ttcompat")) < 0)
12480		failed(12);
12481#endif
12482#endif /* I_PUSH */
12483#if CONFTEST >= 5
12484    else if ((rc = tcgetattr(tty, &tio)) < 0)
12485		failed(30);
12486    else if ((rc = tcsetattr(tty, TCSAFLUSH, &tio)) < 0)
12487		failed(31);
12488#endif
12489#endif /* CONFTEST */
12490
12491	${cf_cv_main_return:-return}(code);
12492
12493}
12494
12495_ACEOF
12496rm -f conftest$ac_exeext
12497if { (eval echo "$as_me:12497: \"$ac_link\"") >&5
12498  (eval $ac_link) 2>&5
12499  ac_status=$?
12500  echo "$as_me:12500: \$? = $ac_status" >&5
12501  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12502  { (eval echo "$as_me:12502: \"$ac_try\"") >&5
12503  (eval $ac_try) 2>&5
12504  ac_status=$?
12505  echo "$as_me:12505: \$? = $ac_status" >&5
12506  (exit $ac_status); }; }; then
12507
12508				case $cf_pty_next in #(vi
12509				1) #(vi - streams
12510					cf_pty_feature=ptem
12511					;;
12512				2) #(vi - streams
12513					cf_pty_feature=ldterm
12514					;;
12515				3) #(vi - streams
12516					cf_pty_feature=ttcompat
12517					;;
12518				4) #(vi
12519					cf_pty_feature=pty_isatty
12520					;;
12521				5) #(vi
12522					cf_pty_feature=pty_tcsetattr
12523					;;
12524				6) #(vi
12525					cf_pty_feature=tty_tcsetattr
12526					;;
12527				esac
12528
12529else
12530  echo "$as_me: program exited with status $ac_status" >&5
12531echo "$as_me: failed program was:" >&5
12532cat conftest.$ac_ext >&5
12533
12534				case $cf_pty_next in #(vi
12535				1|2|3)
12536
12537echo "${as_me:-configure}:12537: testing skipping remaining streams features $cf_pty_this..2 ..." 1>&5
12538
12539					cf_pty_next=3
12540					;;
12541				esac
12542
12543fi
12544rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12545fi
12546				if test -n "$cf_pty_feature"
12547				then
12548					cf_pty_defines="$cf_pty_defines
12549#define CONFTEST_$cf_pty_feature 1
12550"
12551					cf_grantpt_opts="$cf_grantpt_opts $cf_pty_feature"
12552				fi
12553
12554				cf_pty_this=$cf_pty_next
12555			done
12556			echo "$as_me:12556: result: $cf_grantpt_opts" >&5
12557echo "${ECHO_T}$cf_grantpt_opts" >&6
12558			cf_grantpt_opts=`echo "$cf_grantpt_opts" | sed -e 's/ isatty//'`
12559		fi
12560	fi
12561fi
12562
12563if test "x$disable_openpty" != "xyes" || test -z "$cf_grantpt_opts" ; then
12564	echo "$as_me:12564: checking for openpty in -lutil" >&5
12565echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
12566if test "${ac_cv_lib_util_openpty+set}" = set; then
12567  echo $ECHO_N "(cached) $ECHO_C" >&6
12568else
12569  ac_check_lib_save_LIBS=$LIBS
12570LIBS="-lutil  $LIBS"
12571cat >conftest.$ac_ext <<_ACEOF
12572#line 12572 "configure"
12573#include "confdefs.h"
12574
12575/* Override any gcc2 internal prototype to avoid an error.  */
12576#ifdef __cplusplus
12577extern "C"
12578#endif
12579/* We use char because int might match the return type of a gcc2
12580   builtin and then its argument prototype would still apply.  */
12581char openpty ();
12582int
12583main ()
12584{
12585openpty ();
12586  ;
12587  return 0;
12588}
12589_ACEOF
12590rm -f conftest.$ac_objext conftest$ac_exeext
12591if { (eval echo "$as_me:12591: \"$ac_link\"") >&5
12592  (eval $ac_link) 2>&5
12593  ac_status=$?
12594  echo "$as_me:12594: \$? = $ac_status" >&5
12595  (exit $ac_status); } &&
12596         { ac_try='test -s conftest$ac_exeext'
12597  { (eval echo "$as_me:12597: \"$ac_try\"") >&5
12598  (eval $ac_try) 2>&5
12599  ac_status=$?
12600  echo "$as_me:12600: \$? = $ac_status" >&5
12601  (exit $ac_status); }; }; then
12602  ac_cv_lib_util_openpty=yes
12603else
12604  echo "$as_me: failed program was:" >&5
12605cat conftest.$ac_ext >&5
12606ac_cv_lib_util_openpty=no
12607fi
12608rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12609LIBS=$ac_check_lib_save_LIBS
12610fi
12611echo "$as_me:12611: result: $ac_cv_lib_util_openpty" >&5
12612echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
12613if test $ac_cv_lib_util_openpty = yes; then
12614  cf_have_openpty=yes
12615else
12616  cf_have_openpty=no
12617fi
12618
12619	if test "$cf_have_openpty" = yes ; then
12620		ac_cv_func_grantpt=no
12621		LIBS="-lutil $LIBS"
12622
12623cat >>confdefs.h <<\EOF
12624#define HAVE_OPENPTY 1
12625EOF
12626
12627for ac_header in \
12628			util.h \
12629			libutil.h \
12630			pty.h \
12631
12632do
12633as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12634echo "$as_me:12634: checking for $ac_header" >&5
12635echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12636if eval "test \"\${$as_ac_Header+set}\" = set"; then
12637  echo $ECHO_N "(cached) $ECHO_C" >&6
12638else
12639  cat >conftest.$ac_ext <<_ACEOF
12640#line 12640 "configure"
12641#include "confdefs.h"
12642#include <$ac_header>
12643_ACEOF
12644if { (eval echo "$as_me:12644: \"$ac_cpp conftest.$ac_ext\"") >&5
12645  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12646  ac_status=$?
12647  egrep -v '^ *\+' conftest.er1 >conftest.err
12648  rm -f conftest.er1
12649  cat conftest.err >&5
12650  echo "$as_me:12650: \$? = $ac_status" >&5
12651  (exit $ac_status); } >/dev/null; then
12652  if test -s conftest.err; then
12653    ac_cpp_err=$ac_c_preproc_warn_flag
12654  else
12655    ac_cpp_err=
12656  fi
12657else
12658  ac_cpp_err=yes
12659fi
12660if test -z "$ac_cpp_err"; then
12661  eval "$as_ac_Header=yes"
12662else
12663  echo "$as_me: failed program was:" >&5
12664  cat conftest.$ac_ext >&5
12665  eval "$as_ac_Header=no"
12666fi
12667rm -f conftest.err conftest.$ac_ext
12668fi
12669echo "$as_me:12669: result: `eval echo '${'$as_ac_Header'}'`" >&5
12670echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12671if test `eval echo '${'$as_ac_Header'}'` = yes; then
12672  cat >>confdefs.h <<EOF
12673#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12674EOF
12675
12676fi
12677done
12678
12679	fi
12680fi
12681
12682if test "x$ac_cv_func_grantpt" != xno
12683then
12684	test -n "$verbose" && echo "	will rely upon grantpt" 1>&6
12685
12686echo "${as_me:-configure}:12686: testing will rely upon grantpt ..." 1>&5
12687
12688cat >>confdefs.h <<\EOF
12689#define HAVE_WORKING_GRANTPT 1
12690EOF
12691
12692	for cf_feature in $cf_grantpt_opts
12693	do
12694		cf_feature=`echo "$cf_feature" | sed -e 's/ //g'`
12695
12696cf_FEATURE=`echo "$cf_feature" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
12697
12698		cat >>confdefs.h <<EOF
12699#define HAVE_GRANTPT_$cf_FEATURE 1
12700EOF
12701
12702	done
12703elif test "x$cf_have_openpty" = xno
12704then
12705	test -n "$verbose" && echo "	will rely upon BSD-pseudoterminals" 1>&6
12706
12707echo "${as_me:-configure}:12707: testing will rely upon BSD-pseudoterminals ..." 1>&5
12708
12709else
12710	test -n "$verbose" && echo "	will rely upon openpty" 1>&6
12711
12712echo "${as_me:-configure}:12712: testing will rely upon openpty ..." 1>&5
12713
12714fi
12715
12716echo "$as_me:12716: checking if we can use XkbQueryExtension" >&5
12717echo $ECHO_N "checking if we can use XkbQueryExtension... $ECHO_C" >&6
12718if test "${cf_cv_xkb_query_extension+set}" = set; then
12719  echo $ECHO_N "(cached) $ECHO_C" >&6
12720else
12721
12722cat >conftest.$ac_ext <<_ACEOF
12723#line 12723 "configure"
12724#include "confdefs.h"
12725
12726#include <X11/Xlib.h>
12727#include <X11/extensions/XKB.h>
12728#include <X11/XKBlib.h>
12729
12730int
12731main ()
12732{
12733
12734	int xkbmajor = XkbMajorVersion;
12735	int xkbminor = XkbMinorVersion;
12736	int xkbopcode, xkbevent, xkberror;
12737
12738	if (XkbLibraryVersion(&xkbmajor, &xkbminor)
12739	    && XkbQueryExtension((Display *)0,
12740				 &xkbopcode,
12741				 &xkbevent,
12742				 &xkberror,
12743				 &xkbmajor,
12744				 &xkbminor))
12745		 return 0;
12746
12747  ;
12748  return 0;
12749}
12750_ACEOF
12751rm -f conftest.$ac_objext
12752if { (eval echo "$as_me:12752: \"$ac_compile\"") >&5
12753  (eval $ac_compile) 2>&5
12754  ac_status=$?
12755  echo "$as_me:12755: \$? = $ac_status" >&5
12756  (exit $ac_status); } &&
12757         { ac_try='test -s conftest.$ac_objext'
12758  { (eval echo "$as_me:12758: \"$ac_try\"") >&5
12759  (eval $ac_try) 2>&5
12760  ac_status=$?
12761  echo "$as_me:12761: \$? = $ac_status" >&5
12762  (exit $ac_status); }; }; then
12763
12764cf_cv_xkb_query_extension=yes
12765
12766else
12767  echo "$as_me: failed program was:" >&5
12768cat conftest.$ac_ext >&5
12769
12770cf_cv_xkb_query_extension=no
12771
12772fi
12773rm -f conftest.$ac_objext conftest.$ac_ext
12774
12775fi
12776echo "$as_me:12776: result: $cf_cv_xkb_query_extension" >&5
12777echo "${ECHO_T}$cf_cv_xkb_query_extension" >&6
12778
12779if test $cf_cv_xkb_query_extension = yes
12780then
12781
12782for ac_func in XkbQueryExtension
12783do
12784as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12785echo "$as_me:12785: checking for $ac_func" >&5
12786echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12787if eval "test \"\${$as_ac_var+set}\" = set"; then
12788  echo $ECHO_N "(cached) $ECHO_C" >&6
12789else
12790  cat >conftest.$ac_ext <<_ACEOF
12791#line 12791 "configure"
12792#include "confdefs.h"
12793/* System header to define __stub macros and hopefully few prototypes,
12794    which can conflict with char $ac_func (); below.  */
12795#include <assert.h>
12796/* Override any gcc2 internal prototype to avoid an error.  */
12797#ifdef __cplusplus
12798extern "C"
12799#endif
12800/* We use char because int might match the return type of a gcc2
12801   builtin and then its argument prototype would still apply.  */
12802char $ac_func ();
12803char (*f) ();
12804
12805int
12806main ()
12807{
12808/* The GNU C library defines this for functions which it implements
12809    to always fail with ENOSYS.  Some functions are actually named
12810    something starting with __ and the normal name is an alias.  */
12811#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12812choke me
12813#else
12814f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
12815#endif
12816
12817  ;
12818  return 0;
12819}
12820_ACEOF
12821rm -f conftest.$ac_objext conftest$ac_exeext
12822if { (eval echo "$as_me:12822: \"$ac_link\"") >&5
12823  (eval $ac_link) 2>&5
12824  ac_status=$?
12825  echo "$as_me:12825: \$? = $ac_status" >&5
12826  (exit $ac_status); } &&
12827         { ac_try='test -s conftest$ac_exeext'
12828  { (eval echo "$as_me:12828: \"$ac_try\"") >&5
12829  (eval $ac_try) 2>&5
12830  ac_status=$?
12831  echo "$as_me:12831: \$? = $ac_status" >&5
12832  (exit $ac_status); }; }; then
12833  eval "$as_ac_var=yes"
12834else
12835  echo "$as_me: failed program was:" >&5
12836cat conftest.$ac_ext >&5
12837eval "$as_ac_var=no"
12838fi
12839rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12840fi
12841echo "$as_me:12841: result: `eval echo '${'$as_ac_var'}'`" >&5
12842echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12843if test `eval echo '${'$as_ac_var'}'` = yes; then
12844  cat >>confdefs.h <<EOF
12845#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12846EOF
12847
12848fi
12849done
12850
12851fi
12852
12853echo "$as_me:12853: checking if we can use XkbKeycodeToKeysym" >&5
12854echo $ECHO_N "checking if we can use XkbKeycodeToKeysym... $ECHO_C" >&6
12855if test "${cf_cv_xkb_keycode_to_keysym+set}" = set; then
12856  echo $ECHO_N "(cached) $ECHO_C" >&6
12857else
12858
12859cat >conftest.$ac_ext <<_ACEOF
12860#line 12860 "configure"
12861#include "confdefs.h"
12862
12863#include <X11/Xlib.h>
12864#include <X11/XKBlib.h>
12865
12866int
12867main ()
12868{
12869
12870    KeySym keysym = XkbKeycodeToKeysym((Display *)0, 0, 0, 0);
12871
12872  ;
12873  return 0;
12874}
12875_ACEOF
12876rm -f conftest.$ac_objext
12877if { (eval echo "$as_me:12877: \"$ac_compile\"") >&5
12878  (eval $ac_compile) 2>&5
12879  ac_status=$?
12880  echo "$as_me:12880: \$? = $ac_status" >&5
12881  (exit $ac_status); } &&
12882         { ac_try='test -s conftest.$ac_objext'
12883  { (eval echo "$as_me:12883: \"$ac_try\"") >&5
12884  (eval $ac_try) 2>&5
12885  ac_status=$?
12886  echo "$as_me:12886: \$? = $ac_status" >&5
12887  (exit $ac_status); }; }; then
12888
12889cf_cv_xkb_keycode_to_keysym=yes
12890
12891else
12892  echo "$as_me: failed program was:" >&5
12893cat conftest.$ac_ext >&5
12894
12895cf_cv_xkb_keycode_to_keysym=no
12896
12897fi
12898rm -f conftest.$ac_objext conftest.$ac_ext
12899
12900fi
12901echo "$as_me:12901: result: $cf_cv_xkb_keycode_to_keysym" >&5
12902echo "${ECHO_T}$cf_cv_xkb_keycode_to_keysym" >&6
12903
12904if test $cf_cv_xkb_keycode_to_keysym = yes
12905then
12906
12907for ac_func in XkbKeycodeToKeysym
12908do
12909as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12910echo "$as_me:12910: checking for $ac_func" >&5
12911echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12912if eval "test \"\${$as_ac_var+set}\" = set"; then
12913  echo $ECHO_N "(cached) $ECHO_C" >&6
12914else
12915  cat >conftest.$ac_ext <<_ACEOF
12916#line 12916 "configure"
12917#include "confdefs.h"
12918/* System header to define __stub macros and hopefully few prototypes,
12919    which can conflict with char $ac_func (); below.  */
12920#include <assert.h>
12921/* Override any gcc2 internal prototype to avoid an error.  */
12922#ifdef __cplusplus
12923extern "C"
12924#endif
12925/* We use char because int might match the return type of a gcc2
12926   builtin and then its argument prototype would still apply.  */
12927char $ac_func ();
12928char (*f) ();
12929
12930int
12931main ()
12932{
12933/* The GNU C library defines this for functions which it implements
12934    to always fail with ENOSYS.  Some functions are actually named
12935    something starting with __ and the normal name is an alias.  */
12936#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12937choke me
12938#else
12939f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
12940#endif
12941
12942  ;
12943  return 0;
12944}
12945_ACEOF
12946rm -f conftest.$ac_objext conftest$ac_exeext
12947if { (eval echo "$as_me:12947: \"$ac_link\"") >&5
12948  (eval $ac_link) 2>&5
12949  ac_status=$?
12950  echo "$as_me:12950: \$? = $ac_status" >&5
12951  (exit $ac_status); } &&
12952         { ac_try='test -s conftest$ac_exeext'
12953  { (eval echo "$as_me:12953: \"$ac_try\"") >&5
12954  (eval $ac_try) 2>&5
12955  ac_status=$?
12956  echo "$as_me:12956: \$? = $ac_status" >&5
12957  (exit $ac_status); }; }; then
12958  eval "$as_ac_var=yes"
12959else
12960  echo "$as_me: failed program was:" >&5
12961cat conftest.$ac_ext >&5
12962eval "$as_ac_var=no"
12963fi
12964rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12965fi
12966echo "$as_me:12966: result: `eval echo '${'$as_ac_var'}'`" >&5
12967echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12968if test `eval echo '${'$as_ac_var'}'` = yes; then
12969  cat >>confdefs.h <<EOF
12970#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12971EOF
12972
12973fi
12974done
12975
12976fi
12977
12978echo "$as_me:12978: checking for XKB Bell extension" >&5
12979echo $ECHO_N "checking for XKB Bell extension... $ECHO_C" >&6
12980if test "${cf_cv_xkb_bell_ext+set}" = set; then
12981  echo $ECHO_N "(cached) $ECHO_C" >&6
12982else
12983
12984cat >conftest.$ac_ext <<_ACEOF
12985#line 12985 "configure"
12986#include "confdefs.h"
12987
12988#include <X11/Intrinsic.h>
12989#include <X11/XKBlib.h>		/* has the prototype */
12990#include <X11/extensions/XKBbells.h>	/* has the XkbBI_xxx definitions */
12991
12992int
12993main ()
12994{
12995
12996	int x = (XkbBI_Info |XkbBI_MinorError |XkbBI_MajorError |XkbBI_TerminalBell |XkbBI_MarginBell);
12997	Atom y;
12998	XkbBell((Display *)0, (Widget)0, 0, y);
12999
13000  ;
13001  return 0;
13002}
13003_ACEOF
13004rm -f conftest.$ac_objext conftest$ac_exeext
13005if { (eval echo "$as_me:13005: \"$ac_link\"") >&5
13006  (eval $ac_link) 2>&5
13007  ac_status=$?
13008  echo "$as_me:13008: \$? = $ac_status" >&5
13009  (exit $ac_status); } &&
13010         { ac_try='test -s conftest$ac_exeext'
13011  { (eval echo "$as_me:13011: \"$ac_try\"") >&5
13012  (eval $ac_try) 2>&5
13013  ac_status=$?
13014  echo "$as_me:13014: \$? = $ac_status" >&5
13015  (exit $ac_status); }; }; then
13016  cf_cv_xkb_bell_ext=yes
13017else
13018  echo "$as_me: failed program was:" >&5
13019cat conftest.$ac_ext >&5
13020cf_cv_xkb_bell_ext=no
13021fi
13022rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13023
13024fi
13025echo "$as_me:13025: result: $cf_cv_xkb_bell_ext" >&5
13026echo "${ECHO_T}$cf_cv_xkb_bell_ext" >&6
13027test "$cf_cv_xkb_bell_ext" = yes &&
13028cat >>confdefs.h <<\EOF
13029#define HAVE_XKB_BELL_EXT 1
13030EOF
13031
13032for ac_func in Xutf8LookupString
13033do
13034as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13035echo "$as_me:13035: checking for $ac_func" >&5
13036echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13037if eval "test \"\${$as_ac_var+set}\" = set"; then
13038  echo $ECHO_N "(cached) $ECHO_C" >&6
13039else
13040  cat >conftest.$ac_ext <<_ACEOF
13041#line 13041 "configure"
13042#include "confdefs.h"
13043/* System header to define __stub macros and hopefully few prototypes,
13044    which can conflict with char $ac_func (); below.  */
13045#include <assert.h>
13046/* Override any gcc2 internal prototype to avoid an error.  */
13047#ifdef __cplusplus
13048extern "C"
13049#endif
13050/* We use char because int might match the return type of a gcc2
13051   builtin and then its argument prototype would still apply.  */
13052char $ac_func ();
13053char (*f) ();
13054
13055int
13056main ()
13057{
13058/* The GNU C library defines this for functions which it implements
13059    to always fail with ENOSYS.  Some functions are actually named
13060    something starting with __ and the normal name is an alias.  */
13061#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13062choke me
13063#else
13064f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
13065#endif
13066
13067  ;
13068  return 0;
13069}
13070_ACEOF
13071rm -f conftest.$ac_objext conftest$ac_exeext
13072if { (eval echo "$as_me:13072: \"$ac_link\"") >&5
13073  (eval $ac_link) 2>&5
13074  ac_status=$?
13075  echo "$as_me:13075: \$? = $ac_status" >&5
13076  (exit $ac_status); } &&
13077         { ac_try='test -s conftest$ac_exeext'
13078  { (eval echo "$as_me:13078: \"$ac_try\"") >&5
13079  (eval $ac_try) 2>&5
13080  ac_status=$?
13081  echo "$as_me:13081: \$? = $ac_status" >&5
13082  (exit $ac_status); }; }; then
13083  eval "$as_ac_var=yes"
13084else
13085  echo "$as_me: failed program was:" >&5
13086cat conftest.$ac_ext >&5
13087eval "$as_ac_var=no"
13088fi
13089rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13090fi
13091echo "$as_me:13091: result: `eval echo '${'$as_ac_var'}'`" >&5
13092echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13093if test `eval echo '${'$as_ac_var'}'` = yes; then
13094  cat >>confdefs.h <<EOF
13095#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13096EOF
13097
13098else
13099
13100	EXTRAHDRS="$EXTRAHDRS xutf8.h"
13101	EXTRASRCS="$EXTRASRCS xutf8.c"
13102	EXTRAOBJS="$EXTRAOBJS xutf8.o"
13103
13104fi
13105done
13106
13107echo "$as_me:13107: checking if you want narrow prototypes for X libraries" >&5
13108echo $ECHO_N "checking if you want narrow prototypes for X libraries... $ECHO_C" >&6
13109
13110case `$ac_config_guess` in #(vi
13111*cygwin*|*freebsd*|*gnu*|*irix5*|*irix6*|*linux-gnu*|*netbsd*|*openbsd*|*qnx*|*sco*|*sgi*) #(vi
13112	cf_default_narrowproto=yes
13113	;;
13114*)
13115	cf_default_narrowproto=no
13116	;;
13117esac
13118
13119# Check whether --enable-narrowproto or --disable-narrowproto was given.
13120if test "${enable_narrowproto+set}" = set; then
13121  enableval="$enable_narrowproto"
13122  test "$enableval" != no && enableval=yes
13123  if test "$enableval" != "$cf_default_narrowproto" ; then
13124    enable_narrowproto=$enableval
13125  else
13126    enable_narrowproto=$cf_default_narrowproto
13127  fi
13128else
13129  enableval=$cf_default_narrowproto
13130  enable_narrowproto=$cf_default_narrowproto
13131
13132fi;
13133echo "$as_me:13133: result: $enable_narrowproto" >&5
13134echo "${ECHO_T}$enable_narrowproto" >&6
13135
13136echo "$as_me:13136: checking if we should use imake to help" >&5
13137echo $ECHO_N "checking if we should use imake to help... $ECHO_C" >&6
13138
13139# Check whether --enable-imake or --disable-imake was given.
13140if test "${enable_imake+set}" = set; then
13141  enableval="$enable_imake"
13142  test "$enableval" != no && enableval=yes
13143  if test "$enableval" != "yes" ; then
13144    enable_imake=no
13145  else
13146    enable_imake=yes
13147  fi
13148else
13149  enableval=yes
13150  enable_imake=yes
13151
13152fi;
13153echo "$as_me:13153: result: $enable_imake" >&5
13154echo "${ECHO_T}$enable_imake" >&6
13155
13156if test "$enable_imake" = yes ; then
13157
13158for ac_prog in xmkmf imake
13159do
13160  # Extract the first word of "$ac_prog", so it can be a program name with args.
13161set dummy $ac_prog; ac_word=$2
13162echo "$as_me:13162: checking for $ac_word" >&5
13163echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
13164if test "${ac_cv_path_IMAKE+set}" = set; then
13165  echo $ECHO_N "(cached) $ECHO_C" >&6
13166else
13167  case $IMAKE in
13168  [\\/]* | ?:[\\/]*)
13169  ac_cv_path_IMAKE="$IMAKE" # Let the user override the test with a path.
13170  ;;
13171  *)
13172  ac_save_IFS=$IFS; IFS=$ac_path_separator
13173ac_dummy="$PATH"
13174for ac_dir in $ac_dummy; do
13175  IFS=$ac_save_IFS
13176  test -z "$ac_dir" && ac_dir=.
13177  if $as_executable_p "$ac_dir/$ac_word"; then
13178   ac_cv_path_IMAKE="$ac_dir/$ac_word"
13179   echo "$as_me:13179: found $ac_dir/$ac_word" >&5
13180   break
13181fi
13182done
13183
13184  ;;
13185esac
13186fi
13187IMAKE=$ac_cv_path_IMAKE
13188
13189if test -n "$IMAKE"; then
13190  echo "$as_me:13190: result: $IMAKE" >&5
13191echo "${ECHO_T}$IMAKE" >&6
13192else
13193  echo "$as_me:13193: result: no" >&5
13194echo "${ECHO_T}no" >&6
13195fi
13196
13197  test -n "$IMAKE" && break
13198done
13199
13200if test -n "$IMAKE" ; then
13201
13202case $IMAKE in # (vi
13203*/imake)
13204	cf_imake_opts="-DUseInstalled=YES" # (vi
13205	;;
13206*/util/xmkmf)
13207	# A single parameter tells xmkmf where the config-files are:
13208	cf_imake_opts="`echo $IMAKE|sed -e s,/config/util/xmkmf,,`" # (vi
13209	;;
13210*)
13211	cf_imake_opts=
13212	;;
13213esac
13214
13215# If it's installed properly, imake (or its wrapper, xmkmf) will point to the
13216# config directory.
13217if mkdir conftestdir; then
13218	CDPATH=; export CDPATH
13219	cf_makefile=`cd $srcdir;pwd`/Imakefile
13220	cd conftestdir
13221
13222	cat >fix_cflags.sed <<'CF_EOF'
13223s/\\//g
13224s/[ 	][ 	]*/ /g
13225s/"//g
13226:pack
13227s/\(=[^ ][^ ]*\) \([^-]\)/\1	\2/g
13228t pack
13229s/\(-D[a-zA-Z0-9_][a-zA-Z0-9_]*\)=\([^\'0-9 ][^ ]*\)/\1='\\"\2\\"'/g
13230s/^IMAKE[ ]/IMAKE_CFLAGS="/
13231s/	/ /g
13232s/$/"/
13233CF_EOF
13234
13235	cat >fix_lflags.sed <<'CF_EOF'
13236s/^IMAKE[ 	]*/IMAKE_LOADFLAGS="/
13237s/$/"/
13238CF_EOF
13239
13240	echo >./Imakefile
13241	test -f $cf_makefile && cat $cf_makefile >>./Imakefile
13242
13243	cat >> ./Imakefile <<'CF_EOF'
13244findstddefs:
13245	@echo IMAKE ${ALLDEFINES} $(MAIN_DEFINES) $(VENDORMANDEFS)       | sed -f fix_cflags.sed
13246	@echo IMAKE ${EXTRA_LOAD_FLAGS} | sed -f fix_lflags.sed
13247CF_EOF
13248
13249	if ( $IMAKE $cf_imake_opts 1>/dev/null 2>&5 && test -f Makefile)
13250	then
13251		test -n "$verbose" && echo "	Using $IMAKE $cf_imake_opts" 1>&6
13252
13253echo "${as_me:-configure}:13253: testing Using $IMAKE $cf_imake_opts ..." 1>&5
13254
13255	else
13256		# sometimes imake doesn't have the config path compiled in.  Find it.
13257		cf_config=
13258		for cf_libpath in $X_LIBS $LIBS ; do
13259			case $cf_libpath in # (vi
13260			-L*)
13261				cf_libpath=`echo .$cf_libpath | sed -e 's/^...//'`
13262				cf_libpath=$cf_libpath/X11/config
13263				if test -d $cf_libpath ; then
13264					cf_config=$cf_libpath
13265					break
13266				fi
13267				;;
13268			esac
13269		done
13270		if test -z "$cf_config" ; then
13271			{ echo "$as_me:13271: WARNING: Could not find imake config-directory" >&5
13272echo "$as_me: WARNING: Could not find imake config-directory" >&2;}
13273		else
13274			cf_imake_opts="$cf_imake_opts -I$cf_config"
13275			if ( $IMAKE -v $cf_imake_opts 2>&5)
13276			then
13277				test -n "$verbose" && echo "	Using $IMAKE $cf_config" 1>&6
13278
13279echo "${as_me:-configure}:13279: testing Using $IMAKE $cf_config ..." 1>&5
13280
13281			else
13282				{ echo "$as_me:13282: WARNING: Cannot run $IMAKE" >&5
13283echo "$as_me: WARNING: Cannot run $IMAKE" >&2;}
13284			fi
13285		fi
13286	fi
13287
13288	# GNU make sometimes prints "make[1]: Entering...", which
13289	# would confuse us.
13290	eval `make findstddefs 2>/dev/null | grep -v make`
13291
13292	cd ..
13293	rm -rf conftestdir
13294
13295	# We use ${ALLDEFINES} rather than ${STD_DEFINES} because the former
13296	# declares XTFUNCPROTO there.  However, some vendors (e.g., SGI) have
13297	# modified it to support site.cf, adding a kludge for the /usr/include
13298	# directory.  Try to filter that out, otherwise gcc won't find its
13299	# headers.
13300	if test -n "$GCC" ; then
13301	    if test -n "$IMAKE_CFLAGS" ; then
13302		cf_nostdinc=""
13303		cf_std_incl=""
13304		cf_cpp_opts=""
13305		for cf_opt in $IMAKE_CFLAGS
13306		do
13307		    case "$cf_opt" in
13308		    -nostdinc) #(vi
13309			cf_nostdinc="$cf_opt"
13310			;;
13311		    -I/usr/include) #(vi
13312			cf_std_incl="$cf_opt"
13313			;;
13314		    *) #(vi
13315			cf_cpp_opts="$cf_cpp_opts $cf_opt"
13316			;;
13317		    esac
13318		done
13319		if test -z "$cf_nostdinc" ; then
13320		    IMAKE_CFLAGS="$cf_cpp_opts $cf_std_incl"
13321		elif test -z "$cf_std_incl" ; then
13322		    IMAKE_CFLAGS="$cf_cpp_opts $cf_nostdinc"
13323		else
13324		    test -n "$verbose" && echo "	suppressed \"$cf_nostdinc\" and \"$cf_std_incl\"" 1>&6
13325
13326echo "${as_me:-configure}:13326: testing suppressed \"$cf_nostdinc\" and \"$cf_std_incl\" ..." 1>&5
13327
13328		    IMAKE_CFLAGS="$cf_cpp_opts"
13329		fi
13330	    fi
13331	fi
13332fi
13333
13334# Some imake configurations define PROJECTROOT with an empty value.  Remove
13335# the empty definition.
13336case $IMAKE_CFLAGS in
13337*-DPROJECTROOT=/*)
13338	;;
13339*)
13340	IMAKE_CFLAGS=`echo "$IMAKE_CFLAGS" |sed -e "s,-DPROJECTROOT=[ 	], ,"`
13341	;;
13342esac
13343
13344fi
13345
13346test -n "$verbose" && echo "	IMAKE_CFLAGS $IMAKE_CFLAGS" 1>&6
13347
13348echo "${as_me:-configure}:13348: testing IMAKE_CFLAGS $IMAKE_CFLAGS ..." 1>&5
13349
13350test -n "$verbose" && echo "	IMAKE_LOADFLAGS $IMAKE_LOADFLAGS" 1>&6
13351
13352echo "${as_me:-configure}:13352: testing IMAKE_LOADFLAGS $IMAKE_LOADFLAGS ..." 1>&5
13353
13354fi
13355
13356if test -n "$IMAKE" && test -n "$IMAKE_CFLAGS" ; then
13357
13358cf_fix_cppflags=no
13359cf_new_cflags=
13360cf_new_cppflags=
13361cf_new_extra_cppflags=
13362
13363for cf_add_cflags in $IMAKE_CFLAGS
13364do
13365case $cf_fix_cppflags in
13366no)
13367	case $cf_add_cflags in #(vi
13368	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
13369		case $cf_add_cflags in
13370		-D*)
13371			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13372
13373			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13374				&& test -z "${cf_tst_cflags}" \
13375				&& cf_fix_cppflags=yes
13376
13377			if test $cf_fix_cppflags = yes ; then
13378				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13379				continue
13380			elif test "${cf_tst_cflags}" = "\"'" ; then
13381				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13382				continue
13383			fi
13384			;;
13385		esac
13386		case "$CPPFLAGS" in
13387		*$cf_add_cflags) #(vi
13388			;;
13389		*) #(vi
13390			case $cf_add_cflags in #(vi
13391			-D*)
13392				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13393
13394CPPFLAGS=`echo "$CPPFLAGS" | \
13395	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
13396		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
13397
13398				;;
13399			esac
13400			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13401			;;
13402		esac
13403		;;
13404	*)
13405		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13406		;;
13407	esac
13408	;;
13409yes)
13410	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13411
13412	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13413
13414	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13415		&& test -z "${cf_tst_cflags}" \
13416		&& cf_fix_cppflags=no
13417	;;
13418esac
13419done
13420
13421if test -n "$cf_new_cflags" ; then
13422
13423	CFLAGS="$CFLAGS $cf_new_cflags"
13424fi
13425
13426if test -n "$cf_new_cppflags" ; then
13427
13428	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13429fi
13430
13431if test -n "$cf_new_extra_cppflags" ; then
13432
13433	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13434fi
13435
13436else
13437	IMAKE_CFLAGS=
13438	IMAKE_LOADFLAGS=
13439	test -n "$verbose" && echo "	make fallback definitions" 1>&6
13440
13441echo "${as_me:-configure}:13441: testing make fallback definitions ..." 1>&5
13442
13443	# We prefer config.guess' values when we can get them, to avoid
13444	# inconsistent results with uname (AIX for instance).  However,
13445	# config.guess is not always consistent either.
13446	case $host_os in
13447	*[0-9].[0-9]*)
13448		UNAME_RELEASE="$host_os"
13449		;;
13450	*)
13451		UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
13452		;;
13453	esac
13454
13455	case .$UNAME_RELEASE in
13456	*[0-9].[0-9]*)
13457		OSMAJORVERSION=`echo "$UNAME_RELEASE" |sed -e 's/^[^0-9]*//' -e 's/\..*//'`
13458		OSMINORVERSION=`echo "$UNAME_RELEASE" |sed -e 's/^[^0-9]*//' -e 's/^[^.]*\.//' -e 's/\..*//' -e 's/[^0-9].*//' `
13459		test -z "$OSMAJORVERSION" && OSMAJORVERSION=1
13460		test -z "$OSMINORVERSION" && OSMINORVERSION=0
13461		IMAKE_CFLAGS="-DOSMAJORVERSION=$OSMAJORVERSION -DOSMINORVERSION=$OSMINORVERSION $IMAKE_CFLAGS"
13462		;;
13463	esac
13464
13465	# FUNCPROTO is standard with X11R6, but XFree86 drops it, leaving some
13466	# fallback/fragments for NeedPrototypes, etc.
13467	IMAKE_CFLAGS="-DFUNCPROTO=15 $IMAKE_CFLAGS"
13468
13469	# If this is not set properly, Xaw's scrollbars will not work
13470	if test "$enable_narrowproto" = yes ; then
13471		IMAKE_CFLAGS="-DNARROWPROTO=1 $IMAKE_CFLAGS"
13472	fi
13473
13474	# Other special definitions:
13475	case $host_os in
13476	aix*)
13477		# imake on AIX 5.1 defines AIXV3.  really.
13478		IMAKE_CFLAGS="-DAIXV3 -DAIXV4 $IMAKE_CFLAGS"
13479		;;
13480	irix[56].*) #(vi
13481		# these are needed to make SIGWINCH work in xterm
13482		IMAKE_CFLAGS="-DSYSV -DSVR4 $IMAKE_CFLAGS"
13483		;;
13484	esac
13485
13486cf_fix_cppflags=no
13487cf_new_cflags=
13488cf_new_cppflags=
13489cf_new_extra_cppflags=
13490
13491for cf_add_cflags in $IMAKE_CFLAGS
13492do
13493case $cf_fix_cppflags in
13494no)
13495	case $cf_add_cflags in #(vi
13496	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
13497		case $cf_add_cflags in
13498		-D*)
13499			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13500
13501			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13502				&& test -z "${cf_tst_cflags}" \
13503				&& cf_fix_cppflags=yes
13504
13505			if test $cf_fix_cppflags = yes ; then
13506				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13507				continue
13508			elif test "${cf_tst_cflags}" = "\"'" ; then
13509				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13510				continue
13511			fi
13512			;;
13513		esac
13514		case "$CPPFLAGS" in
13515		*$cf_add_cflags) #(vi
13516			;;
13517		*) #(vi
13518			case $cf_add_cflags in #(vi
13519			-D*)
13520				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13521
13522CPPFLAGS=`echo "$CPPFLAGS" | \
13523	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
13524		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
13525
13526				;;
13527			esac
13528			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13529			;;
13530		esac
13531		;;
13532	*)
13533		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13534		;;
13535	esac
13536	;;
13537yes)
13538	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13539
13540	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13541
13542	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13543		&& test -z "${cf_tst_cflags}" \
13544		&& cf_fix_cppflags=no
13545	;;
13546esac
13547done
13548
13549if test -n "$cf_new_cflags" ; then
13550
13551	CFLAGS="$CFLAGS $cf_new_cflags"
13552fi
13553
13554if test -n "$cf_new_cppflags" ; then
13555
13556	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13557fi
13558
13559if test -n "$cf_new_extra_cppflags" ; then
13560
13561	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13562fi
13563
13564fi
13565
13566# If we have already established that there is a full termcap implementation,
13567# suppress the definitions for terminfo that we make have imported from the
13568# imake-file.
13569if test "x$cf_cv_lib_tgetent" != xno || test "x$cf_cv_lib_part_tgetent" != xno ; then
13570	case "$IMAKE_CFLAGS" in
13571	*-DUSE_TERMINFO\ -DHAVE_TIGETSTR*)
13572
13573	test -n "$verbose" && echo "	removing terminfo flags from IMAKE_CFLAGS" 1>&6
13574
13575echo "${as_me:-configure}:13575: testing removing terminfo flags from IMAKE_CFLAGS ..." 1>&5
13576
13577	IMAKE_CFLAGS=`echo "$IMAKE_CFLAGS" | sed -e 's/-DUSE_TERMINFO[ 	]*-DHAVE_TIGETSTR[ 	]*//'`
13578	test -n "$verbose" && echo "	...result $IMAKE_CFLAGS" 1>&6
13579
13580echo "${as_me:-configure}:13580: testing ...result $IMAKE_CFLAGS ..." 1>&5
13581
13582	test -n "$verbose" && echo "	removing terminfo flags from CPPFLAGS" 1>&6
13583
13584echo "${as_me:-configure}:13584: testing removing terminfo flags from CPPFLAGS ..." 1>&5
13585
13586	CPPFLAGS=`echo "$CPPFLAGS" | sed -e 's/-DUSE_TERMINFO[ 	]*-DHAVE_TIGETSTR[ 	]*//'`
13587	test -n "$verbose" && echo "	...result $CPPFLAGS" 1>&6
13588
13589echo "${as_me:-configure}:13589: testing ...result $CPPFLAGS ..." 1>&5
13590
13591		;;
13592	esac
13593fi
13594
13595echo "$as_me:13595: checking for default terminal-id" >&5
13596echo $ECHO_N "checking for default terminal-id... $ECHO_C" >&6
13597
13598# Check whether --with-terminal-id or --without-terminal-id was given.
13599if test "${with_terminal_id+set}" = set; then
13600  withval="$with_terminal_id"
13601  default_termid=$withval
13602else
13603  default_termid=vt420
13604fi;
13605echo "$as_me:13605: result: $default_termid" >&5
13606echo "${ECHO_T}$default_termid" >&6
13607case $default_termid in
13608vt*)	default_termid=`echo $default_termid | sed -e 's/^..//'`
13609	;;
13610esac
13611
13612cat >>confdefs.h <<EOF
13613#define DFT_DECID "$default_termid"
13614EOF
13615
13616echo "$as_me:13616: checking for default terminal-type" >&5
13617echo $ECHO_N "checking for default terminal-type... $ECHO_C" >&6
13618
13619# Check whether --with-terminal-type or --without-terminal-type was given.
13620if test "${with_terminal_type+set}" = set; then
13621  withval="$with_terminal_type"
13622  default_TERM=$withval
13623else
13624  default_TERM=xterm
13625fi;
13626echo "$as_me:13626: result: $default_TERM" >&5
13627echo "${ECHO_T}$default_TERM" >&6
13628
13629cat >>confdefs.h <<EOF
13630#define DFT_TERMTYPE "$default_TERM"
13631EOF
13632
13633###############################################################################
13634echo "$as_me:13634: checking if backarrow-key should be BS" >&5
13635echo $ECHO_N "checking if backarrow-key should be BS... $ECHO_C" >&6
13636
13637# Check whether --enable-backarrow-key or --disable-backarrow-key was given.
13638if test "${enable_backarrow_key+set}" = set; then
13639  enableval="$enable_backarrow_key"
13640  test "$enableval" != no && enableval=yes
13641  if test "$enableval" != "yes" ; then
13642    backarrow_is_bs=$enableval
13643  else
13644    backarrow_is_bs=yes
13645  fi
13646else
13647  enableval=yes
13648  backarrow_is_bs=yes
13649
13650fi;
13651
13652echo "$as_me:13652: result: $backarrow_is_bs" >&5
13653echo "${ECHO_T}$backarrow_is_bs" >&6
13654case $backarrow_is_bs in #(vi
13655yes) #(vi
13656	backarrow_is_bs=true
13657	;;
13658no) #(vi
13659	backarrow_is_bs=false
13660	;;
13661esac
13662cf_xbool1=`echo "$backarrow_is_bs"|sed -e 's/^\(.\).*/\1/'`
13663
13664cf_xbool1=`echo "$cf_xbool1" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
13665
13666cf_xbool2=`echo "$backarrow_is_bs"|sed -e 's/^.//'`
13667backarrow_is_bs=${cf_xbool1}${cf_xbool2}
13668
13669cat >>confdefs.h <<EOF
13670#define DEF_BACKARO_BS $backarrow_is_bs
13671EOF
13672
13673echo "$as_me:13673: checking if backarrow-key should be treated as erase" >&5
13674echo $ECHO_N "checking if backarrow-key should be treated as erase... $ECHO_C" >&6
13675
13676# Check whether --enable-backarrow-is-erase or --disable-backarrow-is-erase was given.
13677if test "${enable_backarrow_is_erase+set}" = set; then
13678  enableval="$enable_backarrow_is_erase"
13679  test "$enableval" != yes && enableval=no
13680  if test "$enableval" != "no" ; then
13681    backarrow_is_erase=$enableval
13682  else
13683    backarrow_is_erase=no
13684  fi
13685else
13686  enableval=no
13687  backarrow_is_erase=no
13688
13689fi;
13690
13691echo "$as_me:13691: result: $backarrow_is_erase" >&5
13692echo "${ECHO_T}$backarrow_is_erase" >&6
13693case $backarrow_is_erase in #(vi
13694yes) #(vi
13695	backarrow_is_erase=true
13696	;;
13697no) #(vi
13698	backarrow_is_erase=false
13699	;;
13700esac
13701cf_xbool1=`echo "$backarrow_is_erase"|sed -e 's/^\(.\).*/\1/'`
13702
13703cf_xbool1=`echo "$cf_xbool1" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
13704
13705cf_xbool2=`echo "$backarrow_is_erase"|sed -e 's/^.//'`
13706backarrow_is_erase=${cf_xbool1}${cf_xbool2}
13707
13708cat >>confdefs.h <<EOF
13709#define DEF_BACKARO_ERASE $backarrow_is_erase
13710EOF
13711
13712echo "$as_me:13712: checking for default backspace/DEL setting" >&5
13713echo $ECHO_N "checking for default backspace/DEL setting... $ECHO_C" >&6
13714
13715# Check whether --enable-delete-is-del or --disable-delete-is-del was given.
13716if test "${enable_delete_is_del+set}" = set; then
13717  enableval="$enable_delete_is_del"
13718  delete_is_del=$enableval
13719else
13720  delete_is_del=maybe
13721fi;
13722
13723echo "$as_me:13723: result: $delete_is_del" >&5
13724echo "${ECHO_T}$delete_is_del" >&6
13725case $delete_is_del in #(vi
13726yes) #(vi
13727	delete_is_del=true
13728	;;
13729no) #(vi
13730	delete_is_del=false
13731	;;
13732esac
13733cf_xbool1=`echo "$delete_is_del"|sed -e 's/^\(.\).*/\1/'`
13734
13735cf_xbool1=`echo "$cf_xbool1" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
13736
13737cf_xbool2=`echo "$delete_is_del"|sed -e 's/^.//'`
13738delete_is_del=${cf_xbool1}${cf_xbool2}
13739
13740cat >>confdefs.h <<EOF
13741#define DEFDELETE_DEL $delete_is_del
13742EOF
13743
13744echo "$as_me:13744: checking if alt should send ESC" >&5
13745echo $ECHO_N "checking if alt should send ESC... $ECHO_C" >&6
13746
13747# Check whether --enable-alt-sends-esc or --disable-alt-sends-esc was given.
13748if test "${enable_alt_sends_esc+set}" = set; then
13749  enableval="$enable_alt_sends_esc"
13750  test "$enableval" != yes && enableval=no
13751  if test "$enableval" != "no" ; then
13752    alt_sends_esc=$enableval
13753  else
13754    alt_sends_esc=no
13755  fi
13756else
13757  enableval=no
13758  alt_sends_esc=no
13759
13760fi;
13761
13762echo "$as_me:13762: result: $alt_sends_esc" >&5
13763echo "${ECHO_T}$alt_sends_esc" >&6
13764case $alt_sends_esc in #(vi
13765yes) #(vi
13766	alt_sends_esc=true
13767	;;
13768no) #(vi
13769	alt_sends_esc=false
13770	;;
13771esac
13772cf_xbool1=`echo "$alt_sends_esc"|sed -e 's/^\(.\).*/\1/'`
13773
13774cf_xbool1=`echo "$cf_xbool1" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
13775
13776cf_xbool2=`echo "$alt_sends_esc"|sed -e 's/^.//'`
13777alt_sends_esc=${cf_xbool1}${cf_xbool2}
13778
13779cat >>confdefs.h <<EOF
13780#define DEF_ALT_SENDS_ESC $alt_sends_esc
13781EOF
13782
13783echo "$as_me:13783: checking if meta should send ESC" >&5
13784echo $ECHO_N "checking if meta should send ESC... $ECHO_C" >&6
13785
13786# Check whether --enable-meta-sends-esc or --disable-meta-sends-esc was given.
13787if test "${enable_meta_sends_esc+set}" = set; then
13788  enableval="$enable_meta_sends_esc"
13789  test "$enableval" != yes && enableval=no
13790  if test "$enableval" != "no" ; then
13791    meta_sends_esc=$enableval
13792  else
13793    meta_sends_esc=no
13794  fi
13795else
13796  enableval=no
13797  meta_sends_esc=no
13798
13799fi;
13800
13801echo "$as_me:13801: result: $meta_sends_esc" >&5
13802echo "${ECHO_T}$meta_sends_esc" >&6
13803case $meta_sends_esc in #(vi
13804yes) #(vi
13805	meta_sends_esc=true
13806	;;
13807no) #(vi
13808	meta_sends_esc=false
13809	;;
13810esac
13811cf_xbool1=`echo "$meta_sends_esc"|sed -e 's/^\(.\).*/\1/'`
13812
13813cf_xbool1=`echo "$cf_xbool1" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
13814
13815cf_xbool2=`echo "$meta_sends_esc"|sed -e 's/^.//'`
13816meta_sends_esc=${cf_xbool1}${cf_xbool2}
13817
13818cat >>confdefs.h <<EOF
13819#define DEF_META_SENDS_ESC $meta_sends_esc
13820EOF
13821
13822###############################################################################
13823# Extract the first word of "tic", so it can be a program name with args.
13824set dummy tic; ac_word=$2
13825echo "$as_me:13825: checking for $ac_word" >&5
13826echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
13827if test "${ac_cv_prog_cf_tic_prog+set}" = set; then
13828  echo $ECHO_N "(cached) $ECHO_C" >&6
13829else
13830  if test -n "$cf_tic_prog"; then
13831  ac_cv_prog_cf_tic_prog="$cf_tic_prog" # Let the user override the test.
13832else
13833  ac_save_IFS=$IFS; IFS=$ac_path_separator
13834ac_dummy="$PATH"
13835for ac_dir in $ac_dummy; do
13836  IFS=$ac_save_IFS
13837  test -z "$ac_dir" && ac_dir=.
13838  $as_executable_p "$ac_dir/$ac_word" || continue
13839ac_cv_prog_cf_tic_prog="yes"
13840echo "$as_me:13840: found $ac_dir/$ac_word" >&5
13841break
13842done
13843
13844  test -z "$ac_cv_prog_cf_tic_prog" && ac_cv_prog_cf_tic_prog="no"
13845fi
13846fi
13847cf_tic_prog=$ac_cv_prog_cf_tic_prog
13848if test -n "$cf_tic_prog"; then
13849  echo "$as_me:13849: result: $cf_tic_prog" >&5
13850echo "${ECHO_T}$cf_tic_prog" >&6
13851else
13852  echo "$as_me:13852: result: no" >&5
13853echo "${ECHO_T}no" >&6
13854fi
13855
13856if test "$cf_tic_prog" = yes ; then
13857	echo "$as_me:13857: checking for private terminfo-directory" >&5
13858echo $ECHO_N "checking for private terminfo-directory... $ECHO_C" >&6
13859
13860# Check whether --with-own-terminfo or --without-own-terminfo was given.
13861if test "${with_own_terminfo+set}" = set; then
13862  withval="$with_own_terminfo"
13863  TERMINFO_DIR=$withval
13864else
13865  TERMINFO_DIR=${TERMINFO-none}
13866fi;
13867	echo "$as_me:13867: result: $TERMINFO_DIR" >&5
13868echo "${ECHO_T}$TERMINFO_DIR" >&6
13869	if test "$TERMINFO_DIR" = yes ; then
13870		{ echo "$as_me:13870: WARNING: no value given" >&5
13871echo "$as_me: WARNING: no value given" >&2;}
13872	elif test "$TERMINFO_DIR" != none ; then
13873		if test -d $TERMINFO_DIR ; then
13874
13875cat >>confdefs.h <<EOF
13876#define OWN_TERMINFO_DIR "$TERMINFO_DIR"
13877EOF
13878
13879		else
13880			{ echo "$as_me:13880: WARNING: not a directory" >&5
13881echo "$as_me: WARNING: not a directory" >&2;}
13882		fi
13883	elif test "$prefix" != NONE ; then
13884		TERMINFO_DIR='${prefix}/lib/terminfo'
13885	elif test -d /usr/lib/terminfo ; then
13886		TERMINFO_DIR=/usr/lib/terminfo
13887	else
13888		TERMINFO_DIR=
13889	fi
13890	SET_TERMINFO=
13891	if test -n "$TERMINFO_DIR" ; then
13892		TERMINFO_DIR='$(DESTDIR)'$TERMINFO_DIR
13893		SET_TERMINFO='TERMINFO=$(TERMINFO_DIR)'
13894	fi
13895	no_ticprog=
13896else
13897	no_ticprog="#"
13898	TERMINFO_DIR=
13899	SET_TERMINFO=
13900fi
13901
13902###############################################################################
13903
13904echo "$as_me:13904: checking if you want active-icons" >&5
13905echo $ECHO_N "checking if you want active-icons... $ECHO_C" >&6
13906
13907# Check whether --enable-active-icon or --disable-active-icon was given.
13908if test "${enable_active_icon+set}" = set; then
13909  enableval="$enable_active_icon"
13910  test "$enableval" != no && enableval=yes
13911  if test "$enableval" != "yes" ; then
13912    enable_active_icon=no
13913  else
13914    enable_active_icon=yes
13915  fi
13916else
13917  enableval=yes
13918  enable_active_icon=yes
13919
13920fi;
13921echo "$as_me:13921: result: $enable_active_icon" >&5
13922echo "${ECHO_T}$enable_active_icon" >&6
13923if test "$enable_active_icon" = no ; then
13924
13925cat >>confdefs.h <<\EOF
13926#define NO_ACTIVE_ICON 1
13927EOF
13928
13929fi
13930
13931echo "$as_me:13931: checking if you want ANSI color" >&5
13932echo $ECHO_N "checking if you want ANSI color... $ECHO_C" >&6
13933
13934# Check whether --enable-ansi-color or --disable-ansi-color was given.
13935if test "${enable_ansi_color+set}" = set; then
13936  enableval="$enable_ansi_color"
13937  test "$enableval" != no && enableval=yes
13938  if test "$enableval" != "yes" ; then
13939    enable_ansi_color=no
13940  else
13941    enable_ansi_color=yes
13942  fi
13943else
13944  enableval=yes
13945  enable_ansi_color=yes
13946
13947fi;
13948echo "$as_me:13948: result: $enable_ansi_color" >&5
13949echo "${ECHO_T}$enable_ansi_color" >&6
13950test "$enable_ansi_color" = no &&
13951cat >>confdefs.h <<\EOF
13952#define OPT_ISO_COLORS 0
13953EOF
13954
13955if test "$enable_ansi_color" = yes ; then
13956
13957	echo "$as_me:13957: checking if you want 16 colors like aixterm" >&5
13958echo $ECHO_N "checking if you want 16 colors like aixterm... $ECHO_C" >&6
13959
13960# Check whether --enable-16-color or --disable-16-color was given.
13961if test "${enable_16_color+set}" = set; then
13962  enableval="$enable_16_color"
13963  test "$enableval" != no && enableval=yes
13964  if test "$enableval" != "yes" ; then
13965    enable_16_color=no
13966  else
13967    enable_16_color=yes
13968  fi
13969else
13970  enableval=yes
13971  enable_16_color=yes
13972
13973fi;
13974	echo "$as_me:13974: result: $enable_16_color" >&5
13975echo "${ECHO_T}$enable_16_color" >&6
13976	test "$enable_16_color" = no &&
13977cat >>confdefs.h <<\EOF
13978#define OPT_AIX_COLORS 0
13979EOF
13980
13981	echo "$as_me:13981: checking if you want 256 colors" >&5
13982echo $ECHO_N "checking if you want 256 colors... $ECHO_C" >&6
13983
13984# Check whether --enable-256-color or --disable-256-color was given.
13985if test "${enable_256_color+set}" = set; then
13986  enableval="$enable_256_color"
13987  test "$enableval" != yes && enableval=no
13988  if test "$enableval" != "no" ; then
13989    enable_256_color=yes
13990  else
13991    enable_256_color=no
13992  fi
13993else
13994  enableval=no
13995  enable_256_color=no
13996
13997fi;
13998	echo "$as_me:13998: result: $enable_256_color" >&5
13999echo "${ECHO_T}$enable_256_color" >&6
14000	if test "$enable_256_color" = yes ; then
14001		CHARPROC_DEPS="$CHARPROC_DEPS 256colres.h"
14002		EXTRAHDRS="$EXTRAHDRS 256colres.h"
14003
14004cat >>confdefs.h <<\EOF
14005#define OPT_256_COLORS 1
14006EOF
14007
14008	else
14009	echo "$as_me:14009: checking if you want 88 colors" >&5
14010echo $ECHO_N "checking if you want 88 colors... $ECHO_C" >&6
14011
14012# Check whether --enable-88-color or --disable-88-color was given.
14013if test "${enable_88_color+set}" = set; then
14014  enableval="$enable_88_color"
14015  test "$enableval" != yes && enableval=no
14016  if test "$enableval" != "no" ; then
14017    enable_88_color=yes
14018  else
14019    enable_88_color=no
14020  fi
14021else
14022  enableval=no
14023  enable_88_color=no
14024
14025fi;
14026	echo "$as_me:14026: result: $enable_88_color" >&5
14027echo "${ECHO_T}$enable_88_color" >&6
14028	if test "$enable_88_color" = yes ; then
14029		CHARPROC_DEPS="$CHARPROC_DEPS 88colres.h"
14030		EXTRAHDRS="$EXTRAHDRS 88colres.h"
14031
14032cat >>confdefs.h <<\EOF
14033#define OPT_88_COLORS 1
14034EOF
14035
14036	fi
14037	fi
14038
14039fi
14040
14041echo "$as_me:14041: checking if you want blinking cursor" >&5
14042echo $ECHO_N "checking if you want blinking cursor... $ECHO_C" >&6
14043
14044# Check whether --enable-blink-cursor or --disable-blink-cursor was given.
14045if test "${enable_blink_cursor+set}" = set; then
14046  enableval="$enable_blink_cursor"
14047  test "$enableval" != no && enableval=yes
14048  if test "$enableval" != "yes" ; then
14049    enable_blink_curs=no
14050  else
14051    enable_blink_curs=yes
14052  fi
14053else
14054  enableval=yes
14055  enable_blink_curs=yes
14056
14057fi;
14058echo "$as_me:14058: result: $enable_blink_curs" >&5
14059echo "${ECHO_T}$enable_blink_curs" >&6
14060test "$enable_blink_curs" = no &&
14061cat >>confdefs.h <<\EOF
14062#define OPT_BLINK_CURS 0
14063EOF
14064
14065echo "$as_me:14065: checking if you want to ignore Linux's broken palette-strings" >&5
14066echo $ECHO_N "checking if you want to ignore Linux's broken palette-strings... $ECHO_C" >&6
14067
14068case $host_os in #(vi
14069linux*)
14070	assume_broken_osc=yes ;; #(vi
14071*)
14072	assume_broken_osc=no ;;
14073esac
14074
14075# Check whether --enable-broken-osc or --disable-broken-osc was given.
14076if test "${enable_broken_osc+set}" = set; then
14077  enableval="$enable_broken_osc"
14078  test "$enableval" != no && enableval=yes
14079  if test "$enableval" != "$assume_broken_osc" ; then
14080    enable_broken_osc=$enableval
14081  else
14082    enable_broken_osc=$enableval
14083  fi
14084else
14085  enableval=$assume_broken_osc
14086  enable_broken_osc=$enableval
14087
14088fi;
14089echo "$as_me:14089: result: $enable_broken_osc" >&5
14090echo "${ECHO_T}$enable_broken_osc" >&6
14091if test "$enable_broken_osc" = yes ; then
14092
14093cat >>confdefs.h <<\EOF
14094#define OPT_BROKEN_OSC 1
14095EOF
14096
14097else
14098
14099cat >>confdefs.h <<\EOF
14100#define OPT_BROKEN_OSC 0
14101EOF
14102
14103fi
14104
14105echo "$as_me:14105: checking if you want to allow broken string-terminators" >&5
14106echo $ECHO_N "checking if you want to allow broken string-terminators... $ECHO_C" >&6
14107
14108# Check whether --enable-broken-st or --disable-broken-st was given.
14109if test "${enable_broken_st+set}" = set; then
14110  enableval="$enable_broken_st"
14111  test "$enableval" != yes && enableval=no
14112  if test "$enableval" != "no" ; then
14113    enable_broken_st=no
14114  else
14115    enable_broken_st=yes
14116  fi
14117else
14118  enableval=no
14119  enable_broken_st=yes
14120
14121fi;
14122echo "$as_me:14122: result: $enable_broken_st" >&5
14123echo "${ECHO_T}$enable_broken_st" >&6
14124test "$enable_broken_st" = no &&
14125cat >>confdefs.h <<\EOF
14126#define OPT_BROKEN_ST 0
14127EOF
14128
14129echo "$as_me:14129: checking if you want printable 128-159" >&5
14130echo $ECHO_N "checking if you want printable 128-159... $ECHO_C" >&6
14131
14132# Check whether --enable-c1-print or --disable-c1-print was given.
14133if test "${enable_c1_print+set}" = set; then
14134  enableval="$enable_c1_print"
14135  test "$enableval" != no && enableval=yes
14136  if test "$enableval" != "yes" ; then
14137    enable_c1_print=no
14138  else
14139    enable_c1_print=yes
14140  fi
14141else
14142  enableval=yes
14143  enable_c1_print=yes
14144
14145fi;
14146echo "$as_me:14146: result: $enable_c1_print" >&5
14147echo "${ECHO_T}$enable_c1_print" >&6
14148test "$enable_c1_print" = no &&
14149cat >>confdefs.h <<\EOF
14150#define OPT_C1_PRINT 0
14151EOF
14152
14153if test "$enable_ansi_color" = yes ; then
14154
14155	echo "$as_me:14155: checking if you want bold colors mapped like IBM PC" >&5
14156echo $ECHO_N "checking if you want bold colors mapped like IBM PC... $ECHO_C" >&6
14157
14158# Check whether --enable-bold-color or --disable-bold-color was given.
14159if test "${enable_bold_color+set}" = set; then
14160  enableval="$enable_bold_color"
14161  test "$enableval" != no && enableval=yes
14162  if test "$enableval" != "yes" ; then
14163    enable_pc_color=no
14164  else
14165    enable_pc_color=yes
14166  fi
14167else
14168  enableval=yes
14169  enable_pc_color=yes
14170
14171fi;
14172	echo "$as_me:14172: result: $enable_pc_color" >&5
14173echo "${ECHO_T}$enable_pc_color" >&6
14174	test "$enable_pc_color" = no &&
14175cat >>confdefs.h <<\EOF
14176#define OPT_PC_COLORS 0
14177EOF
14178
14179	echo "$as_me:14179: checking if you want separate color-classes" >&5
14180echo $ECHO_N "checking if you want separate color-classes... $ECHO_C" >&6
14181
14182# Check whether --enable-color-class or --disable-color-class was given.
14183if test "${enable_color_class+set}" = set; then
14184  enableval="$enable_color_class"
14185  test "$enableval" != no && enableval=yes
14186  if test "$enableval" != "yes" ; then
14187    enable_color_class=no
14188  else
14189    enable_color_class=yes
14190  fi
14191else
14192  enableval=yes
14193  enable_color_class=yes
14194
14195fi;
14196	echo "$as_me:14196: result: $enable_color_class" >&5
14197echo "${ECHO_T}$enable_color_class" >&6
14198	test "$enable_color_class" = no &&
14199cat >>confdefs.h <<\EOF
14200#define OPT_COLOR_CLASS 0
14201EOF
14202
14203	echo "$as_me:14203: checking if you want color-mode enabled by default" >&5
14204echo $ECHO_N "checking if you want color-mode enabled by default... $ECHO_C" >&6
14205
14206# Check whether --enable-color-mode or --disable-color-mode was given.
14207if test "${enable_color_mode+set}" = set; then
14208  enableval="$enable_color_mode"
14209  test "$enableval" != no && enableval=yes
14210  if test "$enableval" != "yes" ; then
14211    default_colormode=no
14212  else
14213    default_colormode=yes
14214  fi
14215else
14216  enableval=yes
14217  default_colormode=yes
14218
14219fi;
14220	echo "$as_me:14220: result: $default_colormode" >&5
14221echo "${ECHO_T}$default_colormode" >&6
14222	test "$default_colormode" = no &&
14223cat >>confdefs.h <<\EOF
14224#define DFT_COLORMODE 0
14225EOF
14226
14227fi
14228
14229echo "$as_me:14229: checking if you want support for color highlighting" >&5
14230echo $ECHO_N "checking if you want support for color highlighting... $ECHO_C" >&6
14231
14232# Check whether --enable-highlighting or --disable-highlighting was given.
14233if test "${enable_highlighting+set}" = set; then
14234  enableval="$enable_highlighting"
14235  test "$enableval" != no && enableval=yes
14236  if test "$enableval" != "yes" ; then
14237    default_highlight=no
14238  else
14239    default_highlight=yes
14240  fi
14241else
14242  enableval=yes
14243  default_highlight=yes
14244
14245fi;
14246echo "$as_me:14246: result: $default_highlight" >&5
14247echo "${ECHO_T}$default_highlight" >&6
14248test "$default_highlight" = no &&
14249cat >>confdefs.h <<\EOF
14250#define OPT_HIGHLIGHT_COLOR 0
14251EOF
14252
14253echo "$as_me:14253: checking if you want support for doublesize characters" >&5
14254echo $ECHO_N "checking if you want support for doublesize characters... $ECHO_C" >&6
14255
14256# Check whether --enable-doublechars or --disable-doublechars was given.
14257if test "${enable_doublechars+set}" = set; then
14258  enableval="$enable_doublechars"
14259  test "$enableval" != no && enableval=yes
14260  if test "$enableval" != "yes" ; then
14261    enable_doublechars=no
14262  else
14263    enable_doublechars=yes
14264  fi
14265else
14266  enableval=yes
14267  enable_doublechars=yes
14268
14269fi;
14270echo "$as_me:14270: result: $enable_doublechars" >&5
14271echo "${ECHO_T}$enable_doublechars" >&6
14272test "$enable_doublechars" = no &&
14273cat >>confdefs.h <<\EOF
14274#define OPT_DEC_CHRSET 0
14275EOF
14276
14277echo "$as_me:14277: checking if you want fallback-support for box characters" >&5
14278echo $ECHO_N "checking if you want fallback-support for box characters... $ECHO_C" >&6
14279
14280# Check whether --enable-boxchars or --disable-boxchars was given.
14281if test "${enable_boxchars+set}" = set; then
14282  enableval="$enable_boxchars"
14283  test "$enableval" != no && enableval=yes
14284  if test "$enableval" != "yes" ; then
14285    enable_boxchars=no
14286  else
14287    enable_boxchars=yes
14288  fi
14289else
14290  enableval=yes
14291  enable_boxchars=yes
14292
14293fi;
14294echo "$as_me:14294: result: $enable_boxchars" >&5
14295echo "${ECHO_T}$enable_boxchars" >&6
14296test "$enable_boxchars" = no &&
14297cat >>confdefs.h <<\EOF
14298#define OPT_BOX_CHARS 0
14299EOF
14300
14301echo "$as_me:14301: checking if you want to allow spawning new xterms" >&5
14302echo $ECHO_N "checking if you want to allow spawning new xterms... $ECHO_C" >&6
14303
14304# Check whether --enable-exec-xterm or --disable-exec-xterm was given.
14305if test "${enable_exec_xterm+set}" = set; then
14306  enableval="$enable_exec_xterm"
14307  test "$enableval" != yes && enableval=no
14308  if test "$enableval" != "no" ; then
14309    enable_exec_xterm=yes
14310  else
14311    enable_exec_xterm=no
14312  fi
14313else
14314  enableval=no
14315  enable_exec_xterm=no
14316
14317fi;
14318echo "$as_me:14318: result: $enable_exec_xterm" >&5
14319echo "${ECHO_T}$enable_exec_xterm" >&6
14320if test "$enable_exec_xterm" = yes ; then
14321
14322echo "$as_me:14322: checking for proc tree with cwd-support" >&5
14323echo $ECHO_N "checking for proc tree with cwd-support... $ECHO_C" >&6
14324if test "${cf_cv_procfs_cwd+set}" = set; then
14325  echo $ECHO_N "(cached) $ECHO_C" >&6
14326else
14327
14328cf_cv_procfs_cwd=no
14329for cf_path in /proc /compat/linux/proc /usr/compat/linux/proc
14330do
14331	if test -d $cf_path && \
14332	   test -d $cf_path/$$ && \
14333	   ( test -d $cf_path/$$/cwd || \
14334	     test -L $cf_path/$$/cwd ); then
14335		cf_cv_procfs_cwd=$cf_path
14336		break
14337	fi
14338done
14339
14340fi
14341echo "$as_me:14341: result: $cf_cv_procfs_cwd" >&5
14342echo "${ECHO_T}$cf_cv_procfs_cwd" >&6
14343
14344	if test "$cf_cv_procfs_cwd" = no ; then
14345		{ echo "$as_me:14345: WARNING: no suitable proc filesystem found" >&5
14346echo "$as_me: WARNING: no suitable proc filesystem found" >&2;}
14347	else
14348
14349cat >>confdefs.h <<EOF
14350#define PROCFS_ROOT "$cf_cv_procfs_cwd"
14351EOF
14352
14353cat >>confdefs.h <<\EOF
14354#define OPT_EXEC_XTERM 1
14355EOF
14356
14357	fi
14358fi
14359
14360echo "$as_me:14360: checking if you want to use double-buffering" >&5
14361echo $ECHO_N "checking if you want to use double-buffering... $ECHO_C" >&6
14362
14363# Check whether --enable-double-buffer or --disable-double-buffer was given.
14364if test "${enable_double_buffer+set}" = set; then
14365  enableval="$enable_double_buffer"
14366  test "$enableval" != yes && enableval=no
14367  if test "$enableval" != "no" ; then
14368    enable_double_bfr=yes
14369  else
14370    enable_double_bfr=no
14371  fi
14372else
14373  enableval=no
14374  enable_double_bfr=no
14375
14376fi;
14377echo "$as_me:14377: result: $enable_double_bfr" >&5
14378echo "${ECHO_T}$enable_double_bfr" >&6
14379if test "$enable_double_bfr" = yes ; then
14380	case "x$LIBS" in
14381	*Xext*)
14382		;;
14383	*)
14384
14385if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists Xext; then
14386	test -n "$verbose" && echo "	found package Xext" 1>&6
14387
14388echo "${as_me:-configure}:14388: testing found package Xext ..." 1>&5
14389
14390	cf_pkgconfig_incs="`$PKG_CONFIG --cflags Xext 2>/dev/null`"
14391	cf_pkgconfig_libs="`$PKG_CONFIG --libs   Xext 2>/dev/null`"
14392	test -n "$verbose" && echo "	package Xext CFLAGS: $cf_pkgconfig_incs" 1>&6
14393
14394echo "${as_me:-configure}:14394: testing package Xext CFLAGS: $cf_pkgconfig_incs ..." 1>&5
14395
14396	test -n "$verbose" && echo "	package Xext LIBS: $cf_pkgconfig_libs" 1>&6
14397
14398echo "${as_me:-configure}:14398: testing package Xext LIBS: $cf_pkgconfig_libs ..." 1>&5
14399
14400cf_fix_cppflags=no
14401cf_new_cflags=
14402cf_new_cppflags=
14403cf_new_extra_cppflags=
14404
14405for cf_add_cflags in $cf_pkgconfig_incs
14406do
14407case $cf_fix_cppflags in
14408no)
14409	case $cf_add_cflags in #(vi
14410	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
14411		case $cf_add_cflags in
14412		-D*)
14413			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14414
14415			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
14416				&& test -z "${cf_tst_cflags}" \
14417				&& cf_fix_cppflags=yes
14418
14419			if test $cf_fix_cppflags = yes ; then
14420				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14421				continue
14422			elif test "${cf_tst_cflags}" = "\"'" ; then
14423				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14424				continue
14425			fi
14426			;;
14427		esac
14428		case "$CPPFLAGS" in
14429		*$cf_add_cflags) #(vi
14430			;;
14431		*) #(vi
14432			case $cf_add_cflags in #(vi
14433			-D*)
14434				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14435
14436CPPFLAGS=`echo "$CPPFLAGS" | \
14437	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
14438		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
14439
14440				;;
14441			esac
14442			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
14443			;;
14444		esac
14445		;;
14446	*)
14447		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
14448		;;
14449	esac
14450	;;
14451yes)
14452	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14453
14454	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14455
14456	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
14457		&& test -z "${cf_tst_cflags}" \
14458		&& cf_fix_cppflags=no
14459	;;
14460esac
14461done
14462
14463if test -n "$cf_new_cflags" ; then
14464
14465	CFLAGS="$CFLAGS $cf_new_cflags"
14466fi
14467
14468if test -n "$cf_new_cppflags" ; then
14469
14470	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
14471fi
14472
14473if test -n "$cf_new_extra_cppflags" ; then
14474
14475	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
14476fi
14477
14478	LIBS="$cf_pkgconfig_libs $LIBS"
14479	:
14480else
14481
14482	echo "$as_me:14482: checking for XextCreateExtension in -lXext" >&5
14483echo $ECHO_N "checking for XextCreateExtension in -lXext... $ECHO_C" >&6
14484if test "${ac_cv_lib_Xext_XextCreateExtension+set}" = set; then
14485  echo $ECHO_N "(cached) $ECHO_C" >&6
14486else
14487  ac_check_lib_save_LIBS=$LIBS
14488LIBS="-lXext  $LIBS"
14489cat >conftest.$ac_ext <<_ACEOF
14490#line 14490 "configure"
14491#include "confdefs.h"
14492
14493/* Override any gcc2 internal prototype to avoid an error.  */
14494#ifdef __cplusplus
14495extern "C"
14496#endif
14497/* We use char because int might match the return type of a gcc2
14498   builtin and then its argument prototype would still apply.  */
14499char XextCreateExtension ();
14500int
14501main ()
14502{
14503XextCreateExtension ();
14504  ;
14505  return 0;
14506}
14507_ACEOF
14508rm -f conftest.$ac_objext conftest$ac_exeext
14509if { (eval echo "$as_me:14509: \"$ac_link\"") >&5
14510  (eval $ac_link) 2>&5
14511  ac_status=$?
14512  echo "$as_me:14512: \$? = $ac_status" >&5
14513  (exit $ac_status); } &&
14514         { ac_try='test -s conftest$ac_exeext'
14515  { (eval echo "$as_me:14515: \"$ac_try\"") >&5
14516  (eval $ac_try) 2>&5
14517  ac_status=$?
14518  echo "$as_me:14518: \$? = $ac_status" >&5
14519  (exit $ac_status); }; }; then
14520  ac_cv_lib_Xext_XextCreateExtension=yes
14521else
14522  echo "$as_me: failed program was:" >&5
14523cat conftest.$ac_ext >&5
14524ac_cv_lib_Xext_XextCreateExtension=no
14525fi
14526rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14527LIBS=$ac_check_lib_save_LIBS
14528fi
14529echo "$as_me:14529: result: $ac_cv_lib_Xext_XextCreateExtension" >&5
14530echo "${ECHO_T}$ac_cv_lib_Xext_XextCreateExtension" >&6
14531if test $ac_cv_lib_Xext_XextCreateExtension = yes; then
14532  LIBS="-lXext $LIBS"
14533fi
14534
14535fi
14536
14537		;;
14538	esac
14539
14540cat >>confdefs.h <<\EOF
14541#define OPT_DOUBLE_BUFFER 1
14542EOF
14543
14544fi
14545
14546echo "$as_me:14546: checking if you want to use FreeType library" >&5
14547echo $ECHO_N "checking if you want to use FreeType library... $ECHO_C" >&6
14548
14549# Check whether --enable-freetype or --disable-freetype was given.
14550if test "${enable_freetype+set}" = set; then
14551  enableval="$enable_freetype"
14552  test "$enableval" != no && enableval=yes
14553  if test "$enableval" != "yes" ; then
14554    enable_freetype=no
14555  else
14556    enable_freetype=yes
14557  fi
14558else
14559  enableval=yes
14560  enable_freetype=yes
14561
14562fi;
14563echo "$as_me:14563: result: $enable_freetype" >&5
14564echo "${ECHO_T}$enable_freetype" >&6
14565if test "$enable_freetype" = yes ; then
14566
14567cf_cv_x_freetype_incs=no
14568cf_cv_x_freetype_libs=no
14569cf_extra_freetype_libs=
14570FREETYPE_CONFIG=none
14571FREETYPE_PARAMS=
14572
14573echo "$as_me:14573: checking for FreeType configuration script" >&5
14574echo $ECHO_N "checking for FreeType configuration script... $ECHO_C" >&6
14575
14576# Check whether --with-freetype-config or --without-freetype-config was given.
14577if test "${with_freetype_config+set}" = set; then
14578  withval="$with_freetype_config"
14579  cf_cv_x_freetype_cfgs="$withval"
14580else
14581  cf_cv_x_freetype_cfgs=auto
14582fi;
14583test -z $cf_cv_x_freetype_cfgs && cf_cv_x_freetype_cfgs=auto
14584test $cf_cv_x_freetype_cfgs = no && cf_cv_x_freetype_cfgs=none
14585echo "$as_me:14585: result: $cf_cv_x_freetype_cfgs" >&5
14586echo "${ECHO_T}$cf_cv_x_freetype_cfgs" >&6
14587
14588case $cf_cv_x_freetype_cfgs in
14589none) #(vi
14590	echo "$as_me:14590: checking if you specified -D/-I options for FreeType" >&5
14591echo $ECHO_N "checking if you specified -D/-I options for FreeType... $ECHO_C" >&6
14592
14593# Check whether --with-freetype-cflags or --without-freetype-cflags was given.
14594if test "${with_freetype_cflags+set}" = set; then
14595  withval="$with_freetype_cflags"
14596  cf_cv_x_freetype_incs="$with_freetype_cflags"
14597else
14598  cf_cv_x_freetype_incs=no
14599fi;
14600	echo "$as_me:14600: result: $cf_cv_x_freetype_incs" >&5
14601echo "${ECHO_T}$cf_cv_x_freetype_incs" >&6
14602
14603	echo "$as_me:14603: checking if you specified -L/-l options for FreeType" >&5
14604echo $ECHO_N "checking if you specified -L/-l options for FreeType... $ECHO_C" >&6
14605
14606# Check whether --with-freetype-libs or --without-freetype-libs was given.
14607if test "${with_freetype_libs+set}" = set; then
14608  withval="$with_freetype_libs"
14609  cf_cv_x_freetype_libs="$with_freetype_libs"
14610else
14611  cf_cv_x_freetype_libs=no
14612fi;
14613	echo "$as_me:14613: result: $cf_cv_x_freetype_libs" >&5
14614echo "${ECHO_T}$cf_cv_x_freetype_libs" >&6
14615	;;
14616auto) #(vi
14617	if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xft; then
14618		FREETYPE_CONFIG=$PKG_CONFIG
14619		FREETYPE_PARAMS=xft
14620	else
14621		# Extract the first word of "freetype-config", so it can be a program name with args.
14622set dummy freetype-config; ac_word=$2
14623echo "$as_me:14623: checking for $ac_word" >&5
14624echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
14625if test "${ac_cv_path_FREETYPE_CONFIG+set}" = set; then
14626  echo $ECHO_N "(cached) $ECHO_C" >&6
14627else
14628  case $FREETYPE_CONFIG in
14629  [\\/]* | ?:[\\/]*)
14630  ac_cv_path_FREETYPE_CONFIG="$FREETYPE_CONFIG" # Let the user override the test with a path.
14631  ;;
14632  *)
14633  ac_save_IFS=$IFS; IFS=$ac_path_separator
14634ac_dummy="$PATH"
14635for ac_dir in $ac_dummy; do
14636  IFS=$ac_save_IFS
14637  test -z "$ac_dir" && ac_dir=.
14638  if $as_executable_p "$ac_dir/$ac_word"; then
14639   ac_cv_path_FREETYPE_CONFIG="$ac_dir/$ac_word"
14640   echo "$as_me:14640: found $ac_dir/$ac_word" >&5
14641   break
14642fi
14643done
14644
14645  test -z "$ac_cv_path_FREETYPE_CONFIG" && ac_cv_path_FREETYPE_CONFIG="none"
14646  ;;
14647esac
14648fi
14649FREETYPE_CONFIG=$ac_cv_path_FREETYPE_CONFIG
14650
14651if test -n "$FREETYPE_CONFIG"; then
14652  echo "$as_me:14652: result: $FREETYPE_CONFIG" >&5
14653echo "${ECHO_T}$FREETYPE_CONFIG" >&6
14654else
14655  echo "$as_me:14655: result: no" >&5
14656echo "${ECHO_T}no" >&6
14657fi
14658
14659		if test "$FREETYPE_CONFIG" != none; then
14660			FREETYPE_CONFIG=$FREETYPE_CONFIG
14661			cf_extra_freetype_libs="-lXft"
14662		else
14663			# Extract the first word of "xft-config", so it can be a program name with args.
14664set dummy xft-config; ac_word=$2
14665echo "$as_me:14665: checking for $ac_word" >&5
14666echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
14667if test "${ac_cv_path_FREETYPE_OLD_CONFIG+set}" = set; then
14668  echo $ECHO_N "(cached) $ECHO_C" >&6
14669else
14670  case $FREETYPE_OLD_CONFIG in
14671  [\\/]* | ?:[\\/]*)
14672  ac_cv_path_FREETYPE_OLD_CONFIG="$FREETYPE_OLD_CONFIG" # Let the user override the test with a path.
14673  ;;
14674  *)
14675  ac_save_IFS=$IFS; IFS=$ac_path_separator
14676ac_dummy="$PATH"
14677for ac_dir in $ac_dummy; do
14678  IFS=$ac_save_IFS
14679  test -z "$ac_dir" && ac_dir=.
14680  if $as_executable_p "$ac_dir/$ac_word"; then
14681   ac_cv_path_FREETYPE_OLD_CONFIG="$ac_dir/$ac_word"
14682   echo "$as_me:14682: found $ac_dir/$ac_word" >&5
14683   break
14684fi
14685done
14686
14687  test -z "$ac_cv_path_FREETYPE_OLD_CONFIG" && ac_cv_path_FREETYPE_OLD_CONFIG="none"
14688  ;;
14689esac
14690fi
14691FREETYPE_OLD_CONFIG=$ac_cv_path_FREETYPE_OLD_CONFIG
14692
14693if test -n "$FREETYPE_OLD_CONFIG"; then
14694  echo "$as_me:14694: result: $FREETYPE_OLD_CONFIG" >&5
14695echo "${ECHO_T}$FREETYPE_OLD_CONFIG" >&6
14696else
14697  echo "$as_me:14697: result: no" >&5
14698echo "${ECHO_T}no" >&6
14699fi
14700
14701			if test "$FREETYPE_OLD_CONFIG" != none; then
14702				FREETYPE_CONFIG=$FREETYPE_OLD_CONFIG
14703			fi
14704		fi
14705	fi
14706	;;
14707pkg*) #(vi
14708	if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xft; then
14709		FREETYPE_CONFIG=$cf_cv_x_freetype_cfgs
14710		FREETYPE_PARAMS=xft
14711	else
14712		{ echo "$as_me:14712: WARNING: cannot find pkg-config for Xft" >&5
14713echo "$as_me: WARNING: cannot find pkg-config for Xft" >&2;}
14714	fi
14715	;;
14716*) #(vi
14717	# Extract the first word of "$cf_cv_x_freetype_cfgs", so it can be a program name with args.
14718set dummy $cf_cv_x_freetype_cfgs; ac_word=$2
14719echo "$as_me:14719: checking for $ac_word" >&5
14720echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
14721if test "${ac_cv_path_FREETYPE_XFT_CONFIG+set}" = set; then
14722  echo $ECHO_N "(cached) $ECHO_C" >&6
14723else
14724  case $FREETYPE_XFT_CONFIG in
14725  [\\/]* | ?:[\\/]*)
14726  ac_cv_path_FREETYPE_XFT_CONFIG="$FREETYPE_XFT_CONFIG" # Let the user override the test with a path.
14727  ;;
14728  *)
14729  ac_save_IFS=$IFS; IFS=$ac_path_separator
14730ac_dummy="$PATH"
14731for ac_dir in $ac_dummy; do
14732  IFS=$ac_save_IFS
14733  test -z "$ac_dir" && ac_dir=.
14734  if $as_executable_p "$ac_dir/$ac_word"; then
14735   ac_cv_path_FREETYPE_XFT_CONFIG="$ac_dir/$ac_word"
14736   echo "$as_me:14736: found $ac_dir/$ac_word" >&5
14737   break
14738fi
14739done
14740
14741  test -z "$ac_cv_path_FREETYPE_XFT_CONFIG" && ac_cv_path_FREETYPE_XFT_CONFIG="none"
14742  ;;
14743esac
14744fi
14745FREETYPE_XFT_CONFIG=$ac_cv_path_FREETYPE_XFT_CONFIG
14746
14747if test -n "$FREETYPE_XFT_CONFIG"; then
14748  echo "$as_me:14748: result: $FREETYPE_XFT_CONFIG" >&5
14749echo "${ECHO_T}$FREETYPE_XFT_CONFIG" >&6
14750else
14751  echo "$as_me:14751: result: no" >&5
14752echo "${ECHO_T}no" >&6
14753fi
14754
14755	if test "$FREETYPE_XFT_CONFIG" != none; then
14756		FREETYPE_CONFIG=$FREETYPE_XFT_CONFIG
14757	else
14758		{ echo "$as_me:14758: WARNING: cannot find config script for Xft" >&5
14759echo "$as_me: WARNING: cannot find config script for Xft" >&2;}
14760	fi
14761	;;
14762esac
14763
14764if test "$FREETYPE_CONFIG" != none ; then
14765	echo "$as_me:14765: checking for FreeType config" >&5
14766echo $ECHO_N "checking for FreeType config... $ECHO_C" >&6
14767	echo "$as_me:14767: result: $FREETYPE_CONFIG $FREETYPE_PARAMS" >&5
14768echo "${ECHO_T}$FREETYPE_CONFIG $FREETYPE_PARAMS" >&6
14769
14770	if test "$cf_cv_x_freetype_incs" = no ; then
14771		echo "$as_me:14771: checking for $FREETYPE_CONFIG cflags" >&5
14772echo $ECHO_N "checking for $FREETYPE_CONFIG cflags... $ECHO_C" >&6
14773		cf_cv_x_freetype_incs="`$FREETYPE_CONFIG $FREETYPE_PARAMS --cflags 2>/dev/null`"
14774		echo "$as_me:14774: result: $cf_cv_x_freetype_incs" >&5
14775echo "${ECHO_T}$cf_cv_x_freetype_incs" >&6
14776	fi
14777
14778	if test "$cf_cv_x_freetype_libs" = no ; then
14779		echo "$as_me:14779: checking for $FREETYPE_CONFIG libs" >&5
14780echo $ECHO_N "checking for $FREETYPE_CONFIG libs... $ECHO_C" >&6
14781		cf_cv_x_freetype_libs="$cf_extra_freetype_libs `$FREETYPE_CONFIG $FREETYPE_PARAMS --libs 2>/dev/null`"
14782		echo "$as_me:14782: result: $cf_cv_x_freetype_libs" >&5
14783echo "${ECHO_T}$cf_cv_x_freetype_libs" >&6
14784	fi
14785fi
14786
14787if test "$cf_cv_x_freetype_incs" = no ; then
14788	cf_cv_x_freetype_incs=
14789fi
14790
14791if test "$cf_cv_x_freetype_libs" = no ; then
14792	cf_cv_x_freetype_libs=-lXft
14793fi
14794
14795echo "$as_me:14795: checking if we can link with FreeType libraries" >&5
14796echo $ECHO_N "checking if we can link with FreeType libraries... $ECHO_C" >&6
14797
14798cf_save_LIBS="$LIBS"
14799cf_save_INCS="$CPPFLAGS"
14800
14801LIBS="$cf_cv_x_freetype_libs $LIBS"
14802CPPFLAGS="$CPPFLAGS $cf_cv_x_freetype_incs"
14803
14804cat >conftest.$ac_ext <<_ACEOF
14805#line 14805 "configure"
14806#include "confdefs.h"
14807
14808#include <X11/Xlib.h>
14809#include <X11/extensions/Xrender.h>
14810#include <X11/Xft/Xft.h>
14811int
14812main ()
14813{
14814
14815	XftPattern  *pat = XftNameParse ("name");
14816  ;
14817  return 0;
14818}
14819_ACEOF
14820rm -f conftest.$ac_objext conftest$ac_exeext
14821if { (eval echo "$as_me:14821: \"$ac_link\"") >&5
14822  (eval $ac_link) 2>&5
14823  ac_status=$?
14824  echo "$as_me:14824: \$? = $ac_status" >&5
14825  (exit $ac_status); } &&
14826         { ac_try='test -s conftest$ac_exeext'
14827  { (eval echo "$as_me:14827: \"$ac_try\"") >&5
14828  (eval $ac_try) 2>&5
14829  ac_status=$?
14830  echo "$as_me:14830: \$? = $ac_status" >&5
14831  (exit $ac_status); }; }; then
14832  cf_cv_found_freetype=yes
14833else
14834  echo "$as_me: failed program was:" >&5
14835cat conftest.$ac_ext >&5
14836cf_cv_found_freetype=no
14837fi
14838rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14839echo "$as_me:14839: result: $cf_cv_found_freetype" >&5
14840echo "${ECHO_T}$cf_cv_found_freetype" >&6
14841
14842LIBS="$cf_save_LIBS"
14843CPPFLAGS="$cf_save_INCS"
14844
14845if test "$cf_cv_found_freetype" = yes ; then
14846	LIBS="$cf_cv_x_freetype_libs $LIBS"
14847
14848cf_fix_cppflags=no
14849cf_new_cflags=
14850cf_new_cppflags=
14851cf_new_extra_cppflags=
14852
14853for cf_add_cflags in $cf_cv_x_freetype_incs
14854do
14855case $cf_fix_cppflags in
14856no)
14857	case $cf_add_cflags in #(vi
14858	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
14859		case $cf_add_cflags in
14860		-D*)
14861			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14862
14863			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
14864				&& test -z "${cf_tst_cflags}" \
14865				&& cf_fix_cppflags=yes
14866
14867			if test $cf_fix_cppflags = yes ; then
14868				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14869				continue
14870			elif test "${cf_tst_cflags}" = "\"'" ; then
14871				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14872				continue
14873			fi
14874			;;
14875		esac
14876		case "$CPPFLAGS" in
14877		*$cf_add_cflags) #(vi
14878			;;
14879		*) #(vi
14880			case $cf_add_cflags in #(vi
14881			-D*)
14882				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14883
14884CPPFLAGS=`echo "$CPPFLAGS" | \
14885	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
14886		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
14887
14888				;;
14889			esac
14890			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
14891			;;
14892		esac
14893		;;
14894	*)
14895		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
14896		;;
14897	esac
14898	;;
14899yes)
14900	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14901
14902	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14903
14904	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
14905		&& test -z "${cf_tst_cflags}" \
14906		&& cf_fix_cppflags=no
14907	;;
14908esac
14909done
14910
14911if test -n "$cf_new_cflags" ; then
14912
14913	CFLAGS="$CFLAGS $cf_new_cflags"
14914fi
14915
14916if test -n "$cf_new_cppflags" ; then
14917
14918	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
14919fi
14920
14921if test -n "$cf_new_extra_cppflags" ; then
14922
14923	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
14924fi
14925
14926cat >>confdefs.h <<\EOF
14927#define XRENDERFONT 1
14928EOF
14929
14930for ac_func in \
14931	XftDrawCharSpec \
14932	XftDrawSetClip \
14933	XftDrawSetClipRectangles \
14934
14935do
14936as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14937echo "$as_me:14937: checking for $ac_func" >&5
14938echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14939if eval "test \"\${$as_ac_var+set}\" = set"; then
14940  echo $ECHO_N "(cached) $ECHO_C" >&6
14941else
14942  cat >conftest.$ac_ext <<_ACEOF
14943#line 14943 "configure"
14944#include "confdefs.h"
14945/* System header to define __stub macros and hopefully few prototypes,
14946    which can conflict with char $ac_func (); below.  */
14947#include <assert.h>
14948/* Override any gcc2 internal prototype to avoid an error.  */
14949#ifdef __cplusplus
14950extern "C"
14951#endif
14952/* We use char because int might match the return type of a gcc2
14953   builtin and then its argument prototype would still apply.  */
14954char $ac_func ();
14955char (*f) ();
14956
14957int
14958main ()
14959{
14960/* The GNU C library defines this for functions which it implements
14961    to always fail with ENOSYS.  Some functions are actually named
14962    something starting with __ and the normal name is an alias.  */
14963#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14964choke me
14965#else
14966f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
14967#endif
14968
14969  ;
14970  return 0;
14971}
14972_ACEOF
14973rm -f conftest.$ac_objext conftest$ac_exeext
14974if { (eval echo "$as_me:14974: \"$ac_link\"") >&5
14975  (eval $ac_link) 2>&5
14976  ac_status=$?
14977  echo "$as_me:14977: \$? = $ac_status" >&5
14978  (exit $ac_status); } &&
14979         { ac_try='test -s conftest$ac_exeext'
14980  { (eval echo "$as_me:14980: \"$ac_try\"") >&5
14981  (eval $ac_try) 2>&5
14982  ac_status=$?
14983  echo "$as_me:14983: \$? = $ac_status" >&5
14984  (exit $ac_status); }; }; then
14985  eval "$as_ac_var=yes"
14986else
14987  echo "$as_me: failed program was:" >&5
14988cat conftest.$ac_ext >&5
14989eval "$as_ac_var=no"
14990fi
14991rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14992fi
14993echo "$as_me:14993: result: `eval echo '${'$as_ac_var'}'`" >&5
14994echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14995if test `eval echo '${'$as_ac_var'}'` = yes; then
14996  cat >>confdefs.h <<EOF
14997#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14998EOF
14999
15000fi
15001done
15002
15003else
15004	{ echo "$as_me:15004: WARNING: No libraries found for FreeType" >&5
15005echo "$as_me: WARNING: No libraries found for FreeType" >&2;}
15006	CPPFLAGS=`echo "$CPPFLAGS" | sed -e s/-DXRENDERFONT//`
15007fi
15008
15009# FIXME: revisit this if needed
15010
15011if test "$cf_cv_found_freetype" = yes ; then
15012echo "$as_me:15012: checking for usable Xft/fontconfig package" >&5
15013echo $ECHO_N "checking for usable Xft/fontconfig package... $ECHO_C" >&6
15014if test "${cf_cv_xft_compat+set}" = set; then
15015  echo $ECHO_N "(cached) $ECHO_C" >&6
15016else
15017
15018cat >conftest.$ac_ext <<_ACEOF
15019#line 15019 "configure"
15020#include "confdefs.h"
15021
15022#include <X11/Xft/Xft.h>
15023
15024int
15025main ()
15026{
15027
15028	XftPattern *pat;
15029	XftPatternBuild(pat,
15030					XFT_FAMILY, XftTypeString, "mono",
15031					(void *) 0);
15032
15033  ;
15034  return 0;
15035}
15036_ACEOF
15037rm -f conftest.$ac_objext conftest$ac_exeext
15038if { (eval echo "$as_me:15038: \"$ac_link\"") >&5
15039  (eval $ac_link) 2>&5
15040  ac_status=$?
15041  echo "$as_me:15041: \$? = $ac_status" >&5
15042  (exit $ac_status); } &&
15043         { ac_try='test -s conftest$ac_exeext'
15044  { (eval echo "$as_me:15044: \"$ac_try\"") >&5
15045  (eval $ac_try) 2>&5
15046  ac_status=$?
15047  echo "$as_me:15047: \$? = $ac_status" >&5
15048  (exit $ac_status); }; }; then
15049  cf_cv_xft_compat=yes
15050else
15051  echo "$as_me: failed program was:" >&5
15052cat conftest.$ac_ext >&5
15053cf_cv_xft_compat=no
15054fi
15055rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15056
15057fi
15058echo "$as_me:15058: result: $cf_cv_xft_compat" >&5
15059echo "${ECHO_T}$cf_cv_xft_compat" >&6
15060
15061if test "$cf_cv_xft_compat" = no
15062then
15063	# workaround for broken ".pc" files used for Xft.
15064	case "$cf_cv_x_freetype_libs" in #(vi
15065	*-lfontconfig*) #(vi
15066		;;
15067	*)
15068		test -n "$verbose" && echo "	work around broken package" 1>&6
15069
15070echo "${as_me:-configure}:15070: testing work around broken package ..." 1>&5
15071
15072if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists fontconfig; then
15073	test -n "$verbose" && echo "	found package fontconfig" 1>&6
15074
15075echo "${as_me:-configure}:15075: testing found package fontconfig ..." 1>&5
15076
15077	cf_pkgconfig_incs="`$PKG_CONFIG --cflags fontconfig 2>/dev/null`"
15078	cf_pkgconfig_libs="`$PKG_CONFIG --libs   fontconfig 2>/dev/null`"
15079	test -n "$verbose" && echo "	package fontconfig CFLAGS: $cf_pkgconfig_incs" 1>&6
15080
15081echo "${as_me:-configure}:15081: testing package fontconfig CFLAGS: $cf_pkgconfig_incs ..." 1>&5
15082
15083	test -n "$verbose" && echo "	package fontconfig LIBS: $cf_pkgconfig_libs" 1>&6
15084
15085echo "${as_me:-configure}:15085: testing package fontconfig LIBS: $cf_pkgconfig_libs ..." 1>&5
15086
15087cf_fix_cppflags=no
15088cf_new_cflags=
15089cf_new_cppflags=
15090cf_new_extra_cppflags=
15091
15092for cf_add_cflags in $cf_pkgconfig_incs
15093do
15094case $cf_fix_cppflags in
15095no)
15096	case $cf_add_cflags in #(vi
15097	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
15098		case $cf_add_cflags in
15099		-D*)
15100			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15101
15102			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
15103				&& test -z "${cf_tst_cflags}" \
15104				&& cf_fix_cppflags=yes
15105
15106			if test $cf_fix_cppflags = yes ; then
15107				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
15108				continue
15109			elif test "${cf_tst_cflags}" = "\"'" ; then
15110				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
15111				continue
15112			fi
15113			;;
15114		esac
15115		case "$CPPFLAGS" in
15116		*$cf_add_cflags) #(vi
15117			;;
15118		*) #(vi
15119			case $cf_add_cflags in #(vi
15120			-D*)
15121				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15122
15123CPPFLAGS=`echo "$CPPFLAGS" | \
15124	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
15125		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
15126
15127				;;
15128			esac
15129			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
15130			;;
15131		esac
15132		;;
15133	*)
15134		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
15135		;;
15136	esac
15137	;;
15138yes)
15139	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
15140
15141	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
15142
15143	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
15144		&& test -z "${cf_tst_cflags}" \
15145		&& cf_fix_cppflags=no
15146	;;
15147esac
15148done
15149
15150if test -n "$cf_new_cflags" ; then
15151
15152	CFLAGS="$CFLAGS $cf_new_cflags"
15153fi
15154
15155if test -n "$cf_new_cppflags" ; then
15156
15157	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
15158fi
15159
15160if test -n "$cf_new_extra_cppflags" ; then
15161
15162	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
15163fi
15164
15165	LIBS="$cf_pkgconfig_libs $LIBS"
15166	:
15167else
15168
15169test -n "$verbose" && echo "	...before $LIBS" 1>&6
15170
15171echo "${as_me:-configure}:15171: testing ...before $LIBS ..." 1>&5
15172
15173LIBS=`echo "$LIBS" | sed -e "s/[ 	][ 	]*/ /g" -e "s,-lXft ,-lXft -lfontconfig ," -e 's/  / /g'`
15174test -n "$verbose" && echo "	...after  $LIBS" 1>&6
15175
15176echo "${as_me:-configure}:15176: testing ...after  $LIBS ..." 1>&5
15177
15178fi
15179
15180		;;
15181	esac
15182fi
15183fi
15184
15185else
15186	CPPFLAGS=`echo "$CPPFLAGS" | sed -e s/-DXRENDERFONT//`
15187fi
15188
15189echo "$as_me:15189: checking if you want support for HP-style function keys" >&5
15190echo $ECHO_N "checking if you want support for HP-style function keys... $ECHO_C" >&6
15191
15192# Check whether --enable-hp-fkeys or --disable-hp-fkeys was given.
15193if test "${enable_hp_fkeys+set}" = set; then
15194  enableval="$enable_hp_fkeys"
15195  test "$enableval" != yes && enableval=no
15196  if test "$enableval" != "no" ; then
15197    enable_hp_fkeys=yes
15198  else
15199    enable_hp_fkeys=no
15200  fi
15201else
15202  enableval=no
15203  enable_hp_fkeys=no
15204
15205fi;
15206echo "$as_me:15206: result: $enable_hp_fkeys" >&5
15207echo "${ECHO_T}$enable_hp_fkeys" >&6
15208if test "$enable_hp_fkeys" = yes ; then
15209
15210cat >>confdefs.h <<\EOF
15211#define OPT_HP_FUNC_KEYS 1
15212EOF
15213
15214fi
15215
15216echo "$as_me:15216: checking if you want support for SCO-style function keys" >&5
15217echo $ECHO_N "checking if you want support for SCO-style function keys... $ECHO_C" >&6
15218
15219# Check whether --enable-sco-fkeys or --disable-sco-fkeys was given.
15220if test "${enable_sco_fkeys+set}" = set; then
15221  enableval="$enable_sco_fkeys"
15222  test "$enableval" != yes && enableval=no
15223  if test "$enableval" != "no" ; then
15224    enable_sco_fkeys=yes
15225  else
15226    enable_sco_fkeys=no
15227  fi
15228else
15229  enableval=no
15230  enable_sco_fkeys=no
15231
15232fi;
15233echo "$as_me:15233: result: $enable_sco_fkeys" >&5
15234echo "${ECHO_T}$enable_sco_fkeys" >&6
15235if test "$enable_sco_fkeys" = yes ; then
15236
15237cat >>confdefs.h <<\EOF
15238#define OPT_SCO_FUNC_KEYS 1
15239EOF
15240
15241fi
15242
15243echo "$as_me:15243: checking if you want support for Sun-style function keys" >&5
15244echo $ECHO_N "checking if you want support for Sun-style function keys... $ECHO_C" >&6
15245
15246# Check whether --enable-sun-fkeys or --disable-sun-fkeys was given.
15247if test "${enable_sun_fkeys+set}" = set; then
15248  enableval="$enable_sun_fkeys"
15249  test "$enableval" != no && enableval=yes
15250  if test "$enableval" != "yes" ; then
15251    enable_sun_fkeys=no
15252  else
15253    enable_sun_fkeys=yes
15254  fi
15255else
15256  enableval=yes
15257  enable_sun_fkeys=yes
15258
15259fi;
15260echo "$as_me:15260: result: $enable_sun_fkeys" >&5
15261echo "${ECHO_T}$enable_sun_fkeys" >&6
15262if test "$enable_sun_fkeys" = no ; then
15263
15264cat >>confdefs.h <<\EOF
15265#define OPT_SUN_FUNC_KEYS 0
15266EOF
15267
15268fi
15269
15270echo "$as_me:15270: checking if you want saved-lines stored as a FIFO" >&5
15271echo $ECHO_N "checking if you want saved-lines stored as a FIFO... $ECHO_C" >&6
15272
15273# Check whether --enable-fifo-lines or --disable-fifo-lines was given.
15274if test "${enable_fifo_lines+set}" = set; then
15275  enableval="$enable_fifo_lines"
15276  test "$enableval" != no && enableval=yes
15277  if test "$enableval" != "yes" ; then
15278    enable_fifo_lines=no
15279  else
15280    enable_fifo_lines=yes
15281  fi
15282else
15283  enableval=yes
15284  enable_fifo_lines=yes
15285
15286fi;
15287echo "$as_me:15287: result: $enable_fifo_lines" >&5
15288echo "${ECHO_T}$enable_fifo_lines" >&6
15289if test "$enable_fifo_lines" = yes ; then
15290
15291cat >>confdefs.h <<\EOF
15292#define OPT_FIFO_LINES 1
15293EOF
15294
15295fi
15296
15297echo "$as_me:15297: checking if you want support for internationalization" >&5
15298echo $ECHO_N "checking if you want support for internationalization... $ECHO_C" >&6
15299
15300# Check whether --enable-i18n or --disable-i18n was given.
15301if test "${enable_i18n+set}" = set; then
15302  enableval="$enable_i18n"
15303  test "$enableval" != no && enableval=yes
15304  if test "$enableval" != "yes" ; then
15305    enable_i18n=no
15306  else
15307    enable_i18n=yes
15308  fi
15309else
15310  enableval=yes
15311  enable_i18n=yes
15312
15313fi;
15314echo "$as_me:15314: result: $enable_i18n" >&5
15315echo "${ECHO_T}$enable_i18n" >&6
15316if test "$enable_i18n" = no ; then
15317
15318cat >>confdefs.h <<\EOF
15319#define OPT_I18N_SUPPORT 0
15320EOF
15321
15322fi
15323
15324echo "$as_me:15324: checking if you want support for initial-erase setup" >&5
15325echo $ECHO_N "checking if you want support for initial-erase setup... $ECHO_C" >&6
15326
15327# Check whether --enable-initial-erase or --disable-initial-erase was given.
15328if test "${enable_initial_erase+set}" = set; then
15329  enableval="$enable_initial_erase"
15330  test "$enableval" != no && enableval=yes
15331  if test "$enableval" != "yes" ; then
15332    enable_ie=no
15333  else
15334    enable_ie=yes
15335  fi
15336else
15337  enableval=yes
15338  enable_ie=yes
15339
15340fi;
15341echo "$as_me:15341: result: $enable_ie" >&5
15342echo "${ECHO_T}$enable_ie" >&6
15343if test "$enable_ie" = no ; then
15344
15345cat >>confdefs.h <<\EOF
15346#define OPT_INITIAL_ERASE 0
15347EOF
15348
15349fi
15350
15351echo "$as_me:15351: checking if you want support for input-method" >&5
15352echo $ECHO_N "checking if you want support for input-method... $ECHO_C" >&6
15353
15354# Check whether --enable-input-method or --disable-input-method was given.
15355if test "${enable_input_method+set}" = set; then
15356  enableval="$enable_input_method"
15357  test "$enableval" != no && enableval=yes
15358  if test "$enableval" != "yes" ; then
15359    enable_ximp=no
15360  else
15361    enable_ximp=yes
15362  fi
15363else
15364  enableval=yes
15365  enable_ximp=yes
15366
15367fi;
15368echo "$as_me:15368: result: $enable_ximp" >&5
15369echo "${ECHO_T}$enable_ximp" >&6
15370
15371echo "$as_me:15371: checking if X libraries support input-method" >&5
15372echo $ECHO_N "checking if X libraries support input-method... $ECHO_C" >&6
15373if test "${cf_cv_input_method+set}" = set; then
15374  echo $ECHO_N "(cached) $ECHO_C" >&6
15375else
15376
15377cat >conftest.$ac_ext <<_ACEOF
15378#line 15378 "configure"
15379#include "confdefs.h"
15380
15381#include <X11/IntrinsicP.h>
15382#include <X11/Xatom.h>
15383#include <X11/Xutil.h>
15384#include <X11/Xmu/Atoms.h>
15385#include <X11/Xmu/Converters.h>
15386#include <X11/Xaw/XawImP.h>
15387
15388int
15389main ()
15390{
15391
15392{
15393	XIM xim;
15394	XIMStyles *xim_styles = 0;
15395	XIMStyle input_style;
15396	Widget w = 0;
15397
15398	XSetLocaleModifiers("@im=none");
15399	xim = XOpenIM(XtDisplay(w), NULL, NULL, NULL);
15400	XGetIMValues(xim, XNQueryInputStyle, &xim_styles, NULL);
15401	XCloseIM(xim);
15402	input_style = (XIMPreeditNothing | XIMStatusNothing);
15403}
15404
15405  ;
15406  return 0;
15407}
15408_ACEOF
15409rm -f conftest.$ac_objext conftest$ac_exeext
15410if { (eval echo "$as_me:15410: \"$ac_link\"") >&5
15411  (eval $ac_link) 2>&5
15412  ac_status=$?
15413  echo "$as_me:15413: \$? = $ac_status" >&5
15414  (exit $ac_status); } &&
15415         { ac_try='test -s conftest$ac_exeext'
15416  { (eval echo "$as_me:15416: \"$ac_try\"") >&5
15417  (eval $ac_try) 2>&5
15418  ac_status=$?
15419  echo "$as_me:15419: \$? = $ac_status" >&5
15420  (exit $ac_status); }; }; then
15421  cf_cv_input_method=yes
15422else
15423  echo "$as_me: failed program was:" >&5
15424cat conftest.$ac_ext >&5
15425cf_cv_input_method=no
15426fi
15427rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15428fi
15429echo "$as_me:15429: result: $cf_cv_input_method" >&5
15430echo "${ECHO_T}$cf_cv_input_method" >&6
15431
15432test "$cf_cv_input_method" = no && enable_ximp=no
15433if test "$enable_ximp" = no ; then
15434
15435cat >>confdefs.h <<\EOF
15436#define OPT_INPUT_METHOD 0
15437EOF
15438
15439fi
15440
15441echo "$as_me:15441: checking if you want support for load-vt-fonts" >&5
15442echo $ECHO_N "checking if you want support for load-vt-fonts... $ECHO_C" >&6
15443
15444# Check whether --enable-load-vt-fonts or --disable-load-vt-fonts was given.
15445if test "${enable_load_vt_fonts+set}" = set; then
15446  enableval="$enable_load_vt_fonts"
15447  test "$enableval" != yes && enableval=no
15448  if test "$enableval" != "no" ; then
15449    enable_load_vt_fonts=yes
15450  else
15451    enable_load_vt_fonts=no
15452  fi
15453else
15454  enableval=no
15455  enable_load_vt_fonts=no
15456
15457fi;
15458echo "$as_me:15458: result: $enable_load_vt_fonts" >&5
15459echo "${ECHO_T}$enable_load_vt_fonts" >&6
15460if test "$enable_load_vt_fonts" = yes ; then
15461
15462cat >>confdefs.h <<\EOF
15463#define OPT_LOAD_VTFONTS 1
15464EOF
15465
15466fi
15467
15468echo "$as_me:15468: checking if you want support for logging" >&5
15469echo $ECHO_N "checking if you want support for logging... $ECHO_C" >&6
15470
15471# Check whether --enable-logging or --disable-logging was given.
15472if test "${enable_logging+set}" = set; then
15473  enableval="$enable_logging"
15474  test "$enableval" != yes && enableval=no
15475  if test "$enableval" != "no" ; then
15476    enable_logging=yes
15477  else
15478    enable_logging=no
15479  fi
15480else
15481  enableval=no
15482  enable_logging=no
15483
15484fi;
15485echo "$as_me:15485: result: $enable_logging" >&5
15486echo "${ECHO_T}$enable_logging" >&6
15487if test "$enable_logging" = yes ; then
15488
15489cat >>confdefs.h <<\EOF
15490#define ALLOWLOGGING 1
15491EOF
15492
15493	echo "$as_me:15493: checking if you want to allow logging via a pipe" >&5
15494echo $ECHO_N "checking if you want to allow logging via a pipe... $ECHO_C" >&6
15495
15496# Check whether --enable-logfile-exec or --disable-logfile-exec was given.
15497if test "${enable_logfile_exec+set}" = set; then
15498  enableval="$enable_logfile_exec"
15499  test "$enableval" != yes && enableval=no
15500  if test "$enableval" != "no" ; then
15501    enable_log_exec=yes
15502  else
15503    enable_log_exec=no
15504  fi
15505else
15506  enableval=no
15507  enable_log_exec=no
15508
15509fi;
15510	echo "$as_me:15510: result: $enable_log_exec" >&5
15511echo "${ECHO_T}$enable_log_exec" >&6
15512	if test "$enable_log_exec" = yes ; then
15513
15514cat >>confdefs.h <<\EOF
15515#define ALLOWLOGFILEEXEC 1
15516EOF
15517
15518	fi
15519fi
15520
15521echo "$as_me:15521: checking if you want support for iconify/maximize translations" >&5
15522echo $ECHO_N "checking if you want support for iconify/maximize translations... $ECHO_C" >&6
15523
15524# Check whether --enable-maximize or --disable-maximize was given.
15525if test "${enable_maximize+set}" = set; then
15526  enableval="$enable_maximize"
15527  test "$enableval" != no && enableval=yes
15528  if test "$enableval" != "yes" ; then
15529    enable_maximize=no
15530  else
15531    enable_maximize=yes
15532  fi
15533else
15534  enableval=yes
15535  enable_maximize=yes
15536
15537fi;
15538echo "$as_me:15538: result: $enable_maximize" >&5
15539echo "${ECHO_T}$enable_maximize" >&6
15540test "$enable_maximize" = no &&
15541cat >>confdefs.h <<\EOF
15542#define OPT_MAXIMIZE 0
15543EOF
15544
15545echo "$as_me:15545: checking if you want NumLock to override keyboard tables" >&5
15546echo $ECHO_N "checking if you want NumLock to override keyboard tables... $ECHO_C" >&6
15547
15548# Check whether --enable-num-lock or --disable-num-lock was given.
15549if test "${enable_num_lock+set}" = set; then
15550  enableval="$enable_num_lock"
15551  test "$enableval" != no && enableval=yes
15552  if test "$enableval" != "yes" ; then
15553    enable_numlock=no
15554  else
15555    enable_numlock=yes
15556  fi
15557else
15558  enableval=yes
15559  enable_numlock=yes
15560
15561fi;
15562echo "$as_me:15562: result: $enable_numlock" >&5
15563echo "${ECHO_T}$enable_numlock" >&6
15564test "$enable_numlock" = no &&
15565cat >>confdefs.h <<\EOF
15566#define OPT_NUM_LOCK 0
15567EOF
15568
15569echo "$as_me:15569: checking if you want support for get/set of base64 selection data" >&5
15570echo $ECHO_N "checking if you want support for get/set of base64 selection data... $ECHO_C" >&6
15571
15572# Check whether --enable-paste64 or --disable-paste64 was given.
15573if test "${enable_paste64+set}" = set; then
15574  enableval="$enable_paste64"
15575  test "$enableval" != no && enableval=yes
15576  if test "$enableval" != "yes" ; then
15577    enable_paste64=no
15578  else
15579    enable_paste64=yes
15580  fi
15581else
15582  enableval=yes
15583  enable_paste64=yes
15584
15585fi;
15586echo "$as_me:15586: result: $enable_paste64" >&5
15587echo "${ECHO_T}$enable_paste64" >&6
15588if test "$enable_paste64" = yes ; then
15589
15590cat >>confdefs.h <<\EOF
15591#define OPT_PASTE64 1
15592EOF
15593
15594else
15595
15596cat >>confdefs.h <<\EOF
15597#define OPT_PASTE64 0
15598EOF
15599
15600fi
15601
15602echo "$as_me:15602: checking if you want support for pty-handshaking" >&5
15603echo $ECHO_N "checking if you want support for pty-handshaking... $ECHO_C" >&6
15604
15605# Check whether --enable-pty-handshake or --disable-pty-handshake was given.
15606if test "${enable_pty_handshake+set}" = set; then
15607  enableval="$enable_pty_handshake"
15608  test "$enableval" != no && enableval=yes
15609  if test "$enableval" != "yes" ; then
15610    enable_pty_handshake=no
15611  else
15612    enable_pty_handshake=yes
15613  fi
15614else
15615  enableval=yes
15616  enable_pty_handshake=yes
15617
15618fi;
15619echo "$as_me:15619: result: $enable_pty_handshake" >&5
15620echo "${ECHO_T}$enable_pty_handshake" >&6
15621if test "$enable_pty_handshake" = yes ; then
15622
15623cat >>confdefs.h <<\EOF
15624#define OPT_PTY_HANDSHAKE 1
15625EOF
15626
15627else
15628
15629cat >>confdefs.h <<\EOF
15630#define OPT_PTY_HANDSHAKE 0
15631EOF
15632
15633fi
15634
15635echo "$as_me:15635: checking if you want support for mouse in readline applications" >&5
15636echo $ECHO_N "checking if you want support for mouse in readline applications... $ECHO_C" >&6
15637
15638# Check whether --enable-readline-mouse or --disable-readline-mouse was given.
15639if test "${enable_readline_mouse+set}" = set; then
15640  enableval="$enable_readline_mouse"
15641  test "$enableval" != yes && enableval=no
15642  if test "$enableval" != "no" ; then
15643    enable_readline_mouse=yes
15644  else
15645    enable_readline_mouse=no
15646  fi
15647else
15648  enableval=no
15649  enable_readline_mouse=no
15650
15651fi;
15652echo "$as_me:15652: result: $enable_readline_mouse" >&5
15653echo "${ECHO_T}$enable_readline_mouse" >&6
15654if test "$enable_readline_mouse" = yes ; then
15655
15656cat >>confdefs.h <<\EOF
15657#define OPT_READLINE 1
15658EOF
15659
15660fi
15661
15662echo "$as_me:15662: checking if you want support for regular-expression selections" >&5
15663echo $ECHO_N "checking if you want support for regular-expression selections... $ECHO_C" >&6
15664
15665# Check whether --enable-regex or --disable-regex was given.
15666if test "${enable_regex+set}" = set; then
15667  enableval="$enable_regex"
15668  test "$enableval" != no && enableval=yes
15669  if test "$enableval" != "yes" ; then
15670    enable_regex=no
15671  else
15672    enable_regex=yes
15673  fi
15674else
15675  enableval=yes
15676  enable_regex=yes
15677
15678fi;
15679echo "$as_me:15679: result: $enable_regex" >&5
15680echo "${ECHO_T}$enable_regex" >&6
15681if test "$enable_regex" = yes ; then
15682
15683echo "$as_me:15683: checking if you want to use PCRE for regular-expressions" >&5
15684echo $ECHO_N "checking if you want to use PCRE for regular-expressions... $ECHO_C" >&6
15685
15686# Check whether --with-pcre or --without-pcre was given.
15687if test "${with_pcre+set}" = set; then
15688  withval="$with_pcre"
15689
15690fi;
15691test -z "$with_pcre" && with_pcre=no
15692echo "$as_me:15692: result: $with_pcre" >&5
15693echo "${ECHO_T}$with_pcre" >&6
15694
15695if test "$with_pcre" != no ; then
15696
15697if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists libpcre; then
15698	test -n "$verbose" && echo "	found package libpcre" 1>&6
15699
15700echo "${as_me:-configure}:15700: testing found package libpcre ..." 1>&5
15701
15702	cf_pkgconfig_incs="`$PKG_CONFIG --cflags libpcre 2>/dev/null`"
15703	cf_pkgconfig_libs="`$PKG_CONFIG --libs   libpcre 2>/dev/null`"
15704	test -n "$verbose" && echo "	package libpcre CFLAGS: $cf_pkgconfig_incs" 1>&6
15705
15706echo "${as_me:-configure}:15706: testing package libpcre CFLAGS: $cf_pkgconfig_incs ..." 1>&5
15707
15708	test -n "$verbose" && echo "	package libpcre LIBS: $cf_pkgconfig_libs" 1>&6
15709
15710echo "${as_me:-configure}:15710: testing package libpcre LIBS: $cf_pkgconfig_libs ..." 1>&5
15711
15712cf_fix_cppflags=no
15713cf_new_cflags=
15714cf_new_cppflags=
15715cf_new_extra_cppflags=
15716
15717for cf_add_cflags in $cf_pkgconfig_incs
15718do
15719case $cf_fix_cppflags in
15720no)
15721	case $cf_add_cflags in #(vi
15722	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
15723		case $cf_add_cflags in
15724		-D*)
15725			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15726
15727			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
15728				&& test -z "${cf_tst_cflags}" \
15729				&& cf_fix_cppflags=yes
15730
15731			if test $cf_fix_cppflags = yes ; then
15732				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
15733				continue
15734			elif test "${cf_tst_cflags}" = "\"'" ; then
15735				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
15736				continue
15737			fi
15738			;;
15739		esac
15740		case "$CPPFLAGS" in
15741		*$cf_add_cflags) #(vi
15742			;;
15743		*) #(vi
15744			case $cf_add_cflags in #(vi
15745			-D*)
15746				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15747
15748CPPFLAGS=`echo "$CPPFLAGS" | \
15749	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
15750		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
15751
15752				;;
15753			esac
15754			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
15755			;;
15756		esac
15757		;;
15758	*)
15759		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
15760		;;
15761	esac
15762	;;
15763yes)
15764	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
15765
15766	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
15767
15768	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
15769		&& test -z "${cf_tst_cflags}" \
15770		&& cf_fix_cppflags=no
15771	;;
15772esac
15773done
15774
15775if test -n "$cf_new_cflags" ; then
15776
15777	CFLAGS="$CFLAGS $cf_new_cflags"
15778fi
15779
15780if test -n "$cf_new_cppflags" ; then
15781
15782	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
15783fi
15784
15785if test -n "$cf_new_extra_cppflags" ; then
15786
15787	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
15788fi
15789
15790	LIBS="$cf_pkgconfig_libs $LIBS"
15791	:
15792else
15793
15794echo "$as_me:15794: checking for pcre_compile in -lpcre" >&5
15795echo $ECHO_N "checking for pcre_compile in -lpcre... $ECHO_C" >&6
15796if test "${ac_cv_lib_pcre_pcre_compile+set}" = set; then
15797  echo $ECHO_N "(cached) $ECHO_C" >&6
15798else
15799  ac_check_lib_save_LIBS=$LIBS
15800LIBS="-lpcre  $LIBS"
15801cat >conftest.$ac_ext <<_ACEOF
15802#line 15802 "configure"
15803#include "confdefs.h"
15804
15805/* Override any gcc2 internal prototype to avoid an error.  */
15806#ifdef __cplusplus
15807extern "C"
15808#endif
15809/* We use char because int might match the return type of a gcc2
15810   builtin and then its argument prototype would still apply.  */
15811char pcre_compile ();
15812int
15813main ()
15814{
15815pcre_compile ();
15816  ;
15817  return 0;
15818}
15819_ACEOF
15820rm -f conftest.$ac_objext conftest$ac_exeext
15821if { (eval echo "$as_me:15821: \"$ac_link\"") >&5
15822  (eval $ac_link) 2>&5
15823  ac_status=$?
15824  echo "$as_me:15824: \$? = $ac_status" >&5
15825  (exit $ac_status); } &&
15826         { ac_try='test -s conftest$ac_exeext'
15827  { (eval echo "$as_me:15827: \"$ac_try\"") >&5
15828  (eval $ac_try) 2>&5
15829  ac_status=$?
15830  echo "$as_me:15830: \$? = $ac_status" >&5
15831  (exit $ac_status); }; }; then
15832  ac_cv_lib_pcre_pcre_compile=yes
15833else
15834  echo "$as_me: failed program was:" >&5
15835cat conftest.$ac_ext >&5
15836ac_cv_lib_pcre_pcre_compile=no
15837fi
15838rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15839LIBS=$ac_check_lib_save_LIBS
15840fi
15841echo "$as_me:15841: result: $ac_cv_lib_pcre_pcre_compile" >&5
15842echo "${ECHO_T}$ac_cv_lib_pcre_pcre_compile" >&6
15843if test $ac_cv_lib_pcre_pcre_compile = yes; then
15844  cat >>confdefs.h <<EOF
15845#define HAVE_LIBPCRE 1
15846EOF
15847
15848  LIBS="-lpcre $LIBS"
15849
15850else
15851  { { echo "$as_me:15851: error: Cannot find PCRE library" >&5
15852echo "$as_me: error: Cannot find PCRE library" >&2;}
15853   { (exit 1); exit 1; }; }
15854fi
15855
15856fi
15857
15858cat >>confdefs.h <<\EOF
15859#define HAVE_LIB_PCRE 1
15860EOF
15861
15862		case $LIBS in #(vi
15863		*pcreposix*) #(vi
15864			;;
15865		*)
15866			echo "$as_me:15866: checking for pcreposix_regcomp in -lpcreposix" >&5
15867echo $ECHO_N "checking for pcreposix_regcomp in -lpcreposix... $ECHO_C" >&6
15868if test "${ac_cv_lib_pcreposix_pcreposix_regcomp+set}" = set; then
15869  echo $ECHO_N "(cached) $ECHO_C" >&6
15870else
15871  ac_check_lib_save_LIBS=$LIBS
15872LIBS="-lpcreposix  $LIBS"
15873cat >conftest.$ac_ext <<_ACEOF
15874#line 15874 "configure"
15875#include "confdefs.h"
15876
15877/* Override any gcc2 internal prototype to avoid an error.  */
15878#ifdef __cplusplus
15879extern "C"
15880#endif
15881/* We use char because int might match the return type of a gcc2
15882   builtin and then its argument prototype would still apply.  */
15883char pcreposix_regcomp ();
15884int
15885main ()
15886{
15887pcreposix_regcomp ();
15888  ;
15889  return 0;
15890}
15891_ACEOF
15892rm -f conftest.$ac_objext conftest$ac_exeext
15893if { (eval echo "$as_me:15893: \"$ac_link\"") >&5
15894  (eval $ac_link) 2>&5
15895  ac_status=$?
15896  echo "$as_me:15896: \$? = $ac_status" >&5
15897  (exit $ac_status); } &&
15898         { ac_try='test -s conftest$ac_exeext'
15899  { (eval echo "$as_me:15899: \"$ac_try\"") >&5
15900  (eval $ac_try) 2>&5
15901  ac_status=$?
15902  echo "$as_me:15902: \$? = $ac_status" >&5
15903  (exit $ac_status); }; }; then
15904  ac_cv_lib_pcreposix_pcreposix_regcomp=yes
15905else
15906  echo "$as_me: failed program was:" >&5
15907cat conftest.$ac_ext >&5
15908ac_cv_lib_pcreposix_pcreposix_regcomp=no
15909fi
15910rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15911LIBS=$ac_check_lib_save_LIBS
15912fi
15913echo "$as_me:15913: result: $ac_cv_lib_pcreposix_pcreposix_regcomp" >&5
15914echo "${ECHO_T}$ac_cv_lib_pcreposix_pcreposix_regcomp" >&6
15915if test $ac_cv_lib_pcreposix_pcreposix_regcomp = yes; then
15916
15917cat >>confdefs.h <<\EOF
15918#define HAVE_PCREPOSIX_H 1
15919EOF
15920
15921				 LIBS="-lpcreposix $LIBS"
15922else
15923  echo "$as_me:15923: checking for regcomp in -lpcreposix" >&5
15924echo $ECHO_N "checking for regcomp in -lpcreposix... $ECHO_C" >&6
15925if test "${ac_cv_lib_pcreposix_regcomp+set}" = set; then
15926  echo $ECHO_N "(cached) $ECHO_C" >&6
15927else
15928  ac_check_lib_save_LIBS=$LIBS
15929LIBS="-lpcreposix  $LIBS"
15930cat >conftest.$ac_ext <<_ACEOF
15931#line 15931 "configure"
15932#include "confdefs.h"
15933
15934/* Override any gcc2 internal prototype to avoid an error.  */
15935#ifdef __cplusplus
15936extern "C"
15937#endif
15938/* We use char because int might match the return type of a gcc2
15939   builtin and then its argument prototype would still apply.  */
15940char regcomp ();
15941int
15942main ()
15943{
15944regcomp ();
15945  ;
15946  return 0;
15947}
15948_ACEOF
15949rm -f conftest.$ac_objext conftest$ac_exeext
15950if { (eval echo "$as_me:15950: \"$ac_link\"") >&5
15951  (eval $ac_link) 2>&5
15952  ac_status=$?
15953  echo "$as_me:15953: \$? = $ac_status" >&5
15954  (exit $ac_status); } &&
15955         { ac_try='test -s conftest$ac_exeext'
15956  { (eval echo "$as_me:15956: \"$ac_try\"") >&5
15957  (eval $ac_try) 2>&5
15958  ac_status=$?
15959  echo "$as_me:15959: \$? = $ac_status" >&5
15960  (exit $ac_status); }; }; then
15961  ac_cv_lib_pcreposix_regcomp=yes
15962else
15963  echo "$as_me: failed program was:" >&5
15964cat conftest.$ac_ext >&5
15965ac_cv_lib_pcreposix_regcomp=no
15966fi
15967rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15968LIBS=$ac_check_lib_save_LIBS
15969fi
15970echo "$as_me:15970: result: $ac_cv_lib_pcreposix_regcomp" >&5
15971echo "${ECHO_T}$ac_cv_lib_pcreposix_regcomp" >&6
15972if test $ac_cv_lib_pcreposix_regcomp = yes; then
15973
15974cat >>confdefs.h <<\EOF
15975#define HAVE_PCREPOSIX_H 1
15976EOF
15977
15978					LIBS="-lpcreposix $LIBS"
15979else
15980  { { echo "$as_me:15980: error: Cannot find PCRE POSIX library" >&5
15981echo "$as_me: error: Cannot find PCRE POSIX library" >&2;}
15982   { (exit 1); exit 1; }; }
15983fi
15984
15985fi
15986
15987			;;
15988		esac
15989fi
15990
15991	if test "$with_pcre" = no ; then
15992
15993cf_regex_func=no
15994
15995cf_regex_libs="regex re"
15996case $host_os in #(vi
15997mingw*)
15998	cf_regex_libs="gnurx $cf_regex_libs"
15999	;;
16000esac
16001
16002echo "$as_me:16002: checking for regcomp" >&5
16003echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
16004if test "${ac_cv_func_regcomp+set}" = set; then
16005  echo $ECHO_N "(cached) $ECHO_C" >&6
16006else
16007  cat >conftest.$ac_ext <<_ACEOF
16008#line 16008 "configure"
16009#include "confdefs.h"
16010/* System header to define __stub macros and hopefully few prototypes,
16011    which can conflict with char regcomp (); below.  */
16012#include <assert.h>
16013/* Override any gcc2 internal prototype to avoid an error.  */
16014#ifdef __cplusplus
16015extern "C"
16016#endif
16017/* We use char because int might match the return type of a gcc2
16018   builtin and then its argument prototype would still apply.  */
16019char regcomp ();
16020char (*f) ();
16021
16022int
16023main ()
16024{
16025/* The GNU C library defines this for functions which it implements
16026    to always fail with ENOSYS.  Some functions are actually named
16027    something starting with __ and the normal name is an alias.  */
16028#if defined (__stub_regcomp) || defined (__stub___regcomp)
16029choke me
16030#else
16031f = regcomp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
16032#endif
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  ac_cv_func_regcomp=yes
16051else
16052  echo "$as_me: failed program was:" >&5
16053cat conftest.$ac_ext >&5
16054ac_cv_func_regcomp=no
16055fi
16056rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16057fi
16058echo "$as_me:16058: result: $ac_cv_func_regcomp" >&5
16059echo "${ECHO_T}$ac_cv_func_regcomp" >&6
16060if test $ac_cv_func_regcomp = yes; then
16061  cf_regex_func=regcomp
16062else
16063
16064	for cf_regex_lib in $cf_regex_libs
16065	do
16066		as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
16067echo "$as_me:16067: checking for regcomp in -l$cf_regex_lib" >&5
16068echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
16069if eval "test \"\${$as_ac_Lib+set}\" = set"; then
16070  echo $ECHO_N "(cached) $ECHO_C" >&6
16071else
16072  ac_check_lib_save_LIBS=$LIBS
16073LIBS="-l$cf_regex_lib  $LIBS"
16074cat >conftest.$ac_ext <<_ACEOF
16075#line 16075 "configure"
16076#include "confdefs.h"
16077
16078/* Override any gcc2 internal prototype to avoid an error.  */
16079#ifdef __cplusplus
16080extern "C"
16081#endif
16082/* We use char because int might match the return type of a gcc2
16083   builtin and then its argument prototype would still apply.  */
16084char regcomp ();
16085int
16086main ()
16087{
16088regcomp ();
16089  ;
16090  return 0;
16091}
16092_ACEOF
16093rm -f conftest.$ac_objext conftest$ac_exeext
16094if { (eval echo "$as_me:16094: \"$ac_link\"") >&5
16095  (eval $ac_link) 2>&5
16096  ac_status=$?
16097  echo "$as_me:16097: \$? = $ac_status" >&5
16098  (exit $ac_status); } &&
16099         { ac_try='test -s conftest$ac_exeext'
16100  { (eval echo "$as_me:16100: \"$ac_try\"") >&5
16101  (eval $ac_try) 2>&5
16102  ac_status=$?
16103  echo "$as_me:16103: \$? = $ac_status" >&5
16104  (exit $ac_status); }; }; then
16105  eval "$as_ac_Lib=yes"
16106else
16107  echo "$as_me: failed program was:" >&5
16108cat conftest.$ac_ext >&5
16109eval "$as_ac_Lib=no"
16110fi
16111rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16112LIBS=$ac_check_lib_save_LIBS
16113fi
16114echo "$as_me:16114: result: `eval echo '${'$as_ac_Lib'}'`" >&5
16115echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
16116if test `eval echo '${'$as_ac_Lib'}'` = yes; then
16117
16118				LIBS="-l$cf_regex_lib $LIBS"
16119				cf_regex_func=regcomp
16120				break
16121fi
16122
16123	done
16124
16125fi
16126
16127if test "$cf_regex_func" = no ; then
16128	echo "$as_me:16128: checking for compile" >&5
16129echo $ECHO_N "checking for compile... $ECHO_C" >&6
16130if test "${ac_cv_func_compile+set}" = set; then
16131  echo $ECHO_N "(cached) $ECHO_C" >&6
16132else
16133  cat >conftest.$ac_ext <<_ACEOF
16134#line 16134 "configure"
16135#include "confdefs.h"
16136/* System header to define __stub macros and hopefully few prototypes,
16137    which can conflict with char compile (); below.  */
16138#include <assert.h>
16139/* Override any gcc2 internal prototype to avoid an error.  */
16140#ifdef __cplusplus
16141extern "C"
16142#endif
16143/* We use char because int might match the return type of a gcc2
16144   builtin and then its argument prototype would still apply.  */
16145char compile ();
16146char (*f) ();
16147
16148int
16149main ()
16150{
16151/* The GNU C library defines this for functions which it implements
16152    to always fail with ENOSYS.  Some functions are actually named
16153    something starting with __ and the normal name is an alias.  */
16154#if defined (__stub_compile) || defined (__stub___compile)
16155choke me
16156#else
16157f = compile; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
16158#endif
16159
16160  ;
16161  return 0;
16162}
16163_ACEOF
16164rm -f conftest.$ac_objext conftest$ac_exeext
16165if { (eval echo "$as_me:16165: \"$ac_link\"") >&5
16166  (eval $ac_link) 2>&5
16167  ac_status=$?
16168  echo "$as_me:16168: \$? = $ac_status" >&5
16169  (exit $ac_status); } &&
16170         { ac_try='test -s conftest$ac_exeext'
16171  { (eval echo "$as_me:16171: \"$ac_try\"") >&5
16172  (eval $ac_try) 2>&5
16173  ac_status=$?
16174  echo "$as_me:16174: \$? = $ac_status" >&5
16175  (exit $ac_status); }; }; then
16176  ac_cv_func_compile=yes
16177else
16178  echo "$as_me: failed program was:" >&5
16179cat conftest.$ac_ext >&5
16180ac_cv_func_compile=no
16181fi
16182rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16183fi
16184echo "$as_me:16184: result: $ac_cv_func_compile" >&5
16185echo "${ECHO_T}$ac_cv_func_compile" >&6
16186if test $ac_cv_func_compile = yes; then
16187  cf_regex_func=compile
16188else
16189
16190		echo "$as_me:16190: checking for compile in -lgen" >&5
16191echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
16192if test "${ac_cv_lib_gen_compile+set}" = set; then
16193  echo $ECHO_N "(cached) $ECHO_C" >&6
16194else
16195  ac_check_lib_save_LIBS=$LIBS
16196LIBS="-lgen  $LIBS"
16197cat >conftest.$ac_ext <<_ACEOF
16198#line 16198 "configure"
16199#include "confdefs.h"
16200
16201/* Override any gcc2 internal prototype to avoid an error.  */
16202#ifdef __cplusplus
16203extern "C"
16204#endif
16205/* We use char because int might match the return type of a gcc2
16206   builtin and then its argument prototype would still apply.  */
16207char compile ();
16208int
16209main ()
16210{
16211compile ();
16212  ;
16213  return 0;
16214}
16215_ACEOF
16216rm -f conftest.$ac_objext conftest$ac_exeext
16217if { (eval echo "$as_me:16217: \"$ac_link\"") >&5
16218  (eval $ac_link) 2>&5
16219  ac_status=$?
16220  echo "$as_me:16220: \$? = $ac_status" >&5
16221  (exit $ac_status); } &&
16222         { ac_try='test -s conftest$ac_exeext'
16223  { (eval echo "$as_me:16223: \"$ac_try\"") >&5
16224  (eval $ac_try) 2>&5
16225  ac_status=$?
16226  echo "$as_me:16226: \$? = $ac_status" >&5
16227  (exit $ac_status); }; }; then
16228  ac_cv_lib_gen_compile=yes
16229else
16230  echo "$as_me: failed program was:" >&5
16231cat conftest.$ac_ext >&5
16232ac_cv_lib_gen_compile=no
16233fi
16234rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16235LIBS=$ac_check_lib_save_LIBS
16236fi
16237echo "$as_me:16237: result: $ac_cv_lib_gen_compile" >&5
16238echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
16239if test $ac_cv_lib_gen_compile = yes; then
16240
16241				LIBS="-lgen $LIBS"
16242				cf_regex_func=compile
16243fi
16244
16245fi
16246
16247fi
16248
16249if test "$cf_regex_func" = no ; then
16250	{ echo "$as_me:16250: WARNING: cannot find regular expression library" >&5
16251echo "$as_me: WARNING: cannot find regular expression library" >&2;}
16252fi
16253
16254echo "$as_me:16254: checking for regular-expression headers" >&5
16255echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
16256if test "${cf_cv_regex_hdrs+set}" = set; then
16257  echo $ECHO_N "(cached) $ECHO_C" >&6
16258else
16259
16260cf_cv_regex_hdrs=no
16261case $cf_regex_func in #(vi
16262compile) #(vi
16263	for cf_regex_hdr in regexp.h regexpr.h
16264	do
16265		cat >conftest.$ac_ext <<_ACEOF
16266#line 16266 "configure"
16267#include "confdefs.h"
16268#include <$cf_regex_hdr>
16269int
16270main ()
16271{
16272
16273			char *p = compile("", "", "", 0);
16274			int x = step("", "");
16275
16276  ;
16277  return 0;
16278}
16279_ACEOF
16280rm -f conftest.$ac_objext conftest$ac_exeext
16281if { (eval echo "$as_me:16281: \"$ac_link\"") >&5
16282  (eval $ac_link) 2>&5
16283  ac_status=$?
16284  echo "$as_me:16284: \$? = $ac_status" >&5
16285  (exit $ac_status); } &&
16286         { ac_try='test -s conftest$ac_exeext'
16287  { (eval echo "$as_me:16287: \"$ac_try\"") >&5
16288  (eval $ac_try) 2>&5
16289  ac_status=$?
16290  echo "$as_me:16290: \$? = $ac_status" >&5
16291  (exit $ac_status); }; }; then
16292
16293			cf_cv_regex_hdrs=$cf_regex_hdr
16294			break
16295
16296else
16297  echo "$as_me: failed program was:" >&5
16298cat conftest.$ac_ext >&5
16299fi
16300rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16301	done
16302	;;
16303*)
16304	for cf_regex_hdr in regex.h
16305	do
16306		cat >conftest.$ac_ext <<_ACEOF
16307#line 16307 "configure"
16308#include "confdefs.h"
16309#include <sys/types.h>
16310#include <$cf_regex_hdr>
16311int
16312main ()
16313{
16314
16315			regex_t *p;
16316			int x = regcomp(p, "", 0);
16317			int y = regexec(p, "", 0, 0, 0);
16318			regfree(p);
16319
16320  ;
16321  return 0;
16322}
16323_ACEOF
16324rm -f conftest.$ac_objext conftest$ac_exeext
16325if { (eval echo "$as_me:16325: \"$ac_link\"") >&5
16326  (eval $ac_link) 2>&5
16327  ac_status=$?
16328  echo "$as_me:16328: \$? = $ac_status" >&5
16329  (exit $ac_status); } &&
16330         { ac_try='test -s conftest$ac_exeext'
16331  { (eval echo "$as_me:16331: \"$ac_try\"") >&5
16332  (eval $ac_try) 2>&5
16333  ac_status=$?
16334  echo "$as_me:16334: \$? = $ac_status" >&5
16335  (exit $ac_status); }; }; then
16336
16337			cf_cv_regex_hdrs=$cf_regex_hdr
16338			break
16339
16340else
16341  echo "$as_me: failed program was:" >&5
16342cat conftest.$ac_ext >&5
16343fi
16344rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16345	done
16346	;;
16347esac
16348
16349fi
16350echo "$as_me:16350: result: $cf_cv_regex_hdrs" >&5
16351echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
16352
16353case $cf_cv_regex_hdrs in #(vi
16354    no)	       { echo "$as_me:16354: WARNING: no regular expression header found" >&5
16355echo "$as_me: WARNING: no regular expression header found" >&2;} ;; #(vi
16356    regex.h)
16357cat >>confdefs.h <<\EOF
16358#define HAVE_REGEX_H_FUNCS 1
16359EOF
16360 ;; #(vi
16361    regexp.h)
16362cat >>confdefs.h <<\EOF
16363#define HAVE_REGEXP_H_FUNCS 1
16364EOF
16365 ;; #(vi
16366    regexpr.h)
16367cat >>confdefs.h <<\EOF
16368#define HAVE_REGEXPR_H_FUNCS 1
16369EOF
16370 ;;
16371esac
16372
16373		if test "X$cf_cv_regex_hdrs" != "Xregex.h" ; then
16374			{ { echo "$as_me:16374: error: Only POSIX or PCRE regular expressions are supported" >&5
16375echo "$as_me: error: Only POSIX or PCRE regular expressions are supported" >&2;}
16376   { (exit 1); exit 1; }; }
16377		fi
16378	fi
16379
16380cat >>confdefs.h <<\EOF
16381#define OPT_SELECT_REGEX 1
16382EOF
16383
16384fi
16385
16386echo "$as_me:16386: checking if you want support for right-scrollbar" >&5
16387echo $ECHO_N "checking if you want support for right-scrollbar... $ECHO_C" >&6
16388
16389# Check whether --enable-rightbar or --disable-rightbar was given.
16390if test "${enable_rightbar+set}" = set; then
16391  enableval="$enable_rightbar"
16392  test "$enableval" != no && enableval=yes
16393  if test "$enableval" != "yes" ; then
16394    enable_rightbar=no
16395  else
16396    enable_rightbar=yes
16397  fi
16398else
16399  enableval=yes
16400  enable_rightbar=yes
16401
16402fi;
16403echo "$as_me:16403: result: $enable_rightbar" >&5
16404echo "${ECHO_T}$enable_rightbar" >&6
16405if test "$enable_rightbar" = yes ; then
16406
16407cat >>confdefs.h <<\EOF
16408#define SCROLLBAR_RIGHT 1
16409EOF
16410
16411fi
16412
16413echo "$as_me:16413: checking if you want check for redundant name-change" >&5
16414echo $ECHO_N "checking if you want check for redundant name-change... $ECHO_C" >&6
16415
16416# Check whether --enable-samename or --disable-samename was given.
16417if test "${enable_samename+set}" = set; then
16418  enableval="$enable_samename"
16419  test "$enableval" != no && enableval=yes
16420  if test "$enableval" != "yes" ; then
16421    enable_samename=no
16422  else
16423    enable_samename=yes
16424  fi
16425else
16426  enableval=yes
16427  enable_samename=yes
16428
16429fi;
16430echo "$as_me:16430: result: $enable_samename" >&5
16431echo "${ECHO_T}$enable_samename" >&6
16432test "$enable_samename" = no &&
16433cat >>confdefs.h <<\EOF
16434#define OPT_SAME_NAME 0
16435EOF
16436
16437echo "$as_me:16437: checking if you want support for selection-actions" >&5
16438echo $ECHO_N "checking if you want support for selection-actions... $ECHO_C" >&6
16439
16440# Check whether --enable-selection-ops or --disable-selection-ops was given.
16441if test "${enable_selection_ops+set}" = set; then
16442  enableval="$enable_selection_ops"
16443  test "$enableval" != no && enableval=yes
16444  if test "$enableval" != "yes" ; then
16445    enable_selection_ops=no
16446  else
16447    enable_selection_ops=yes
16448  fi
16449else
16450  enableval=yes
16451  enable_selection_ops=yes
16452
16453fi;
16454echo "$as_me:16454: result: $enable_selection_ops" >&5
16455echo "${ECHO_T}$enable_selection_ops" >&6
16456test "$enable_selection_ops" = no &&
16457cat >>confdefs.h <<\EOF
16458#define OPT_SELECTION_OPS 0
16459EOF
16460
16461echo "$as_me:16461: checking if you want support for session management" >&5
16462echo $ECHO_N "checking if you want support for session management... $ECHO_C" >&6
16463
16464# Check whether --enable-session-mgt or --disable-session-mgt was given.
16465if test "${enable_session_mgt+set}" = set; then
16466  enableval="$enable_session_mgt"
16467  test "$enableval" != no && enableval=yes
16468  if test "$enableval" != "yes" ; then
16469    enable_session_mgt=no
16470  else
16471    enable_session_mgt=yes
16472  fi
16473else
16474  enableval=yes
16475  enable_session_mgt=yes
16476
16477fi;
16478echo "$as_me:16478: result: $enable_session_mgt" >&5
16479echo "${ECHO_T}$enable_session_mgt" >&6
16480test "$enable_session_mgt" = no &&
16481cat >>confdefs.h <<\EOF
16482#define OPT_SESSION_MGT 0
16483EOF
16484
16485echo "$as_me:16485: checking if you want to use termcap function-keys" >&5
16486echo $ECHO_N "checking if you want to use termcap function-keys... $ECHO_C" >&6
16487
16488# Check whether --enable-tcap-fkeys or --disable-tcap-fkeys was given.
16489if test "${enable_tcap_fkeys+set}" = set; then
16490  enableval="$enable_tcap_fkeys"
16491  test "$enableval" != no && enableval=yes
16492  if test "$enableval" != "yes" ; then
16493    enable_tcap_fkeys=no
16494  else
16495    enable_tcap_fkeys=yes
16496  fi
16497else
16498  enableval=yes
16499  enable_tcap_fkeys=yes
16500
16501fi;
16502echo "$as_me:16502: result: $enable_tcap_fkeys" >&5
16503echo "${ECHO_T}$enable_tcap_fkeys" >&6
16504test "$enable_tcap_fkeys" = yes &&
16505cat >>confdefs.h <<\EOF
16506#define OPT_TCAP_FKEYS 1
16507EOF
16508
16509echo "$as_me:16509: checking if you want to use termcap-query/report" >&5
16510echo $ECHO_N "checking if you want to use termcap-query/report... $ECHO_C" >&6
16511
16512# Check whether --enable-tcap-query or --disable-tcap-query was given.
16513if test "${enable_tcap_query+set}" = set; then
16514  enableval="$enable_tcap_query"
16515  test "$enableval" != no && enableval=yes
16516  if test "$enableval" != "yes" ; then
16517    enable_tcap_query=no
16518  else
16519    enable_tcap_query=yes
16520  fi
16521else
16522  enableval=yes
16523  enable_tcap_query=yes
16524
16525fi;
16526echo "$as_me:16526: result: $enable_tcap_query" >&5
16527echo "${ECHO_T}$enable_tcap_query" >&6
16528test "$enable_tcap_query" = yes &&
16529cat >>confdefs.h <<\EOF
16530#define OPT_TCAP_QUERY 1
16531EOF
16532
16533echo "$as_me:16533: checking if you want support for tek4014" >&5
16534echo $ECHO_N "checking if you want support for tek4014... $ECHO_C" >&6
16535
16536# Check whether --enable-tek4014 or --disable-tek4014 was given.
16537if test "${enable_tek4014+set}" = set; then
16538  enableval="$enable_tek4014"
16539  test "$enableval" != no && enableval=yes
16540  if test "$enableval" != "yes" ; then
16541    enable_tek4014=no
16542  else
16543    enable_tek4014=yes
16544  fi
16545else
16546  enableval=yes
16547  enable_tek4014=yes
16548
16549fi;
16550echo "$as_me:16550: result: $enable_tek4014" >&5
16551echo "${ECHO_T}$enable_tek4014" >&6
16552if test "$enable_tek4014" = no ; then
16553
16554cat >>confdefs.h <<\EOF
16555#define OPT_TEK4014 0
16556EOF
16557
16558else
16559	EXTRAHDRS="$EXTRAHDRS Tekparse.h"
16560	EXTRASRCS="$EXTRASRCS TekPrsTbl.c Tekproc.c"
16561	EXTRAOBJS="$EXTRAOBJS TekPrsTbl.o Tekproc.o"
16562fi
16563
16564echo "$as_me:16564: checking if you want pulldown menus with a toolbar" >&5
16565echo $ECHO_N "checking if you want pulldown menus with a toolbar... $ECHO_C" >&6
16566
16567# Check whether --enable-toolbar or --disable-toolbar was given.
16568if test "${enable_toolbar+set}" = set; then
16569  enableval="$enable_toolbar"
16570  test "$enableval" != yes && enableval=no
16571  if test "$enableval" != "no" ; then
16572    enable_toolbar=yes
16573  else
16574    enable_toolbar=no
16575  fi
16576else
16577  enableval=no
16578  enable_toolbar=no
16579
16580fi;
16581echo "$as_me:16581: result: $enable_toolbar" >&5
16582echo "${ECHO_T}$enable_toolbar" >&6
16583if test "$enable_toolbar" = yes ; then
16584
16585cat >>confdefs.h <<\EOF
16586#define OPT_TOOLBAR 1
16587EOF
16588
16589fi
16590
16591echo "$as_me:16591: checking if you want VT52 emulation" >&5
16592echo $ECHO_N "checking if you want VT52 emulation... $ECHO_C" >&6
16593
16594# Check whether --enable-vt52 or --disable-vt52 was given.
16595if test "${enable_vt52+set}" = set; then
16596  enableval="$enable_vt52"
16597  test "$enableval" != no && enableval=yes
16598  if test "$enableval" != "yes" ; then
16599    enable_vt52=no
16600  else
16601    enable_vt52=yes
16602  fi
16603else
16604  enableval=yes
16605  enable_vt52=yes
16606
16607fi;
16608echo "$as_me:16608: result: $enable_vt52" >&5
16609echo "${ECHO_T}$enable_vt52" >&6
16610test "$enable_vt52" = no &&
16611cat >>confdefs.h <<\EOF
16612#define OPT_VT52_MODE 0
16613EOF
16614
16615echo "$as_me:16615: checking if you want to use mini-luit/Latin9 built-in support" >&5
16616echo $ECHO_N "checking if you want to use mini-luit/Latin9 built-in support... $ECHO_C" >&6
16617
16618# Check whether --enable-mini-luit or --disable-mini-luit was given.
16619if test "${enable_mini_luit+set}" = set; then
16620  enableval="$enable_mini_luit"
16621  test "$enableval" != yes && enableval=no
16622  if test "$enableval" != "no" ; then
16623    enable_mini_luit=yes
16624  else
16625    enable_mini_luit=no
16626  fi
16627else
16628  enableval=no
16629  enable_mini_luit=no
16630
16631fi;
16632echo "$as_me:16632: result: $enable_mini_luit" >&5
16633echo "${ECHO_T}$enable_mini_luit" >&6
16634if test "$enable_mini_luit" = yes ; then
16635
16636cat >>confdefs.h <<\EOF
16637#define OPT_MINI_LUIT 1
16638EOF
16639
16640fi
16641
16642echo "$as_me:16642: checking if you want to use luit" >&5
16643echo $ECHO_N "checking if you want to use luit... $ECHO_C" >&6
16644
16645# Check whether --enable-luit or --disable-luit was given.
16646if test "${enable_luit+set}" = set; then
16647  enableval="$enable_luit"
16648  test "$enableval" != yes && enableval=no
16649  if test "$enableval" != "no" ; then
16650    enable_luit=yes
16651  else
16652    enable_luit=$enable_mini_luit
16653  fi
16654else
16655  enableval=no
16656  enable_luit=$enable_mini_luit
16657
16658fi;
16659echo "$as_me:16659: result: $enable_luit" >&5
16660echo "${ECHO_T}$enable_luit" >&6
16661if test "$enable_luit" = yes ; then
16662
16663cat >>confdefs.h <<\EOF
16664#define OPT_LUIT_PROG 1
16665EOF
16666
16667test -z "$LUIT" && LUIT=xterm-filter
16668for ac_prog in $LUIT xterm-filter bluit luit
16669do
16670  # Extract the first word of "$ac_prog", so it can be a program name with args.
16671set dummy $ac_prog; ac_word=$2
16672echo "$as_me:16672: checking for $ac_word" >&5
16673echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
16674if test "${ac_cv_path_LUIT+set}" = set; then
16675  echo $ECHO_N "(cached) $ECHO_C" >&6
16676else
16677  case $LUIT in
16678  [\\/]* | ?:[\\/]*)
16679  ac_cv_path_LUIT="$LUIT" # Let the user override the test with a path.
16680  ;;
16681  *)
16682  ac_save_IFS=$IFS; IFS=$ac_path_separator
16683ac_dummy="$PATH"
16684for ac_dir in $ac_dummy; do
16685  IFS=$ac_save_IFS
16686  test -z "$ac_dir" && ac_dir=.
16687  if $as_executable_p "$ac_dir/$ac_word"; then
16688   ac_cv_path_LUIT="$ac_dir/$ac_word"
16689   echo "$as_me:16689: found $ac_dir/$ac_word" >&5
16690   break
16691fi
16692done
16693
16694  ;;
16695esac
16696fi
16697LUIT=$ac_cv_path_LUIT
16698
16699if test -n "$LUIT"; then
16700  echo "$as_me:16700: result: $LUIT" >&5
16701echo "${ECHO_T}$LUIT" >&6
16702else
16703  echo "$as_me:16703: result: no" >&5
16704echo "${ECHO_T}no" >&6
16705fi
16706
16707  test -n "$LUIT" && break
16708done
16709test -n "$LUIT" || LUIT="$LUIT"
16710
16711cf_path_prog=""
16712cf_path_args=""
16713IFS="${IFS:- 	}"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
16714for cf_temp in $ac_cv_path_LUIT
16715do
16716	if test -z "$cf_path_prog" ; then
16717		if test "$with_full_paths" = yes ; then
16718
16719if test "x$prefix" != xNONE; then
16720  cf_path_syntax="$prefix"
16721else
16722  cf_path_syntax="$ac_default_prefix"
16723fi
16724
16725case ".$cf_temp" in #(vi
16726.\$\(*\)*|.\'*\'*) #(vi
16727  ;;
16728..|./*|.\\*) #(vi
16729  ;;
16730.[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
16731  ;;
16732.\${*prefix}*|.\${*dir}*) #(vi
16733  eval cf_temp="$cf_temp"
16734  case ".$cf_temp" in #(vi
16735  .NONE/*)
16736    cf_temp=`echo $cf_temp | sed -e s%NONE%$cf_path_syntax%`
16737    ;;
16738  esac
16739  ;; #(vi
16740.no|.NONE/*)
16741  cf_temp=`echo $cf_temp | sed -e s%NONE%$cf_path_syntax%`
16742  ;;
16743*)
16744  break
16745  ;;
16746esac
16747
16748			cf_path_prog="$cf_temp"
16749		else
16750			cf_path_prog="`basename $cf_temp`"
16751		fi
16752	elif test -z "$cf_path_args" ; then
16753		cf_path_args="$cf_temp"
16754	else
16755		cf_path_args="$cf_path_args $cf_temp"
16756	fi
16757done
16758IFS="$cf_save_ifs"
16759
16760if test -n "$cf_path_prog" ; then
16761
16762echo "${as_me:-configure}:16762: testing defining path for ${cf_path_prog} ..." 1>&5
16763
16764cat >>confdefs.h <<EOF
16765#define LUIT_PATH "$cf_path_prog"
16766EOF
16767
16768	test -n "$cf_path_args" &&
16769cat >>confdefs.h <<EOF
16770#define LUIT_ARGS "$cf_path_args"
16771EOF
16772
16773fi
16774
16775fi
16776
16777echo "$as_me:16777: checking if you want wide-character support" >&5
16778echo $ECHO_N "checking if you want wide-character support... $ECHO_C" >&6
16779
16780# Check whether --enable-wide-chars or --disable-wide-chars was given.
16781if test "${enable_wide_chars+set}" = set; then
16782  enableval="$enable_wide_chars"
16783  test "$enableval" != no && enableval=yes
16784  if test "$enableval" != "$enable_luit" ; then
16785    enable_wchar=yes
16786  else
16787    enable_wchar=$enable_luit
16788  fi
16789else
16790  enableval=$enable_luit
16791  enable_wchar=$enable_luit
16792
16793fi;
16794echo "$as_me:16794: result: $enable_wchar" >&5
16795echo "${ECHO_T}$enable_wchar" >&6
16796
16797echo "$as_me:16797: checking if you want only 16-bit character support" >&5
16798echo $ECHO_N "checking if you want only 16-bit character support... $ECHO_C" >&6
16799
16800# Check whether --enable-16bit-chars or --disable-16bit-chars was given.
16801if test "${enable_16bit_chars+set}" = set; then
16802  enableval="$enable_16bit_chars"
16803  test "$enableval" != yes && enableval=no
16804  if test "$enableval" != "no" ; then
16805    enable_16bit_chars=yes
16806  else
16807    enable_16bit_chars=no
16808  fi
16809else
16810  enableval=no
16811  enable_16bit_chars=no
16812
16813fi;
16814echo "$as_me:16814: result: $enable_16bit_chars" >&5
16815echo "${ECHO_T}$enable_16bit_chars" >&6
16816
16817if test "$enable_16bit_chars" = yes ; then
16818
16819cat >>confdefs.h <<\EOF
16820#define OPT_WIDER_ICHAR 0
16821EOF
16822
16823	enable_wchar=yes
16824fi
16825
16826if test "$enable_wchar" = yes ; then
16827
16828cat >>confdefs.h <<\EOF
16829#define OPT_WIDE_CHARS 1
16830EOF
16831
16832	EXTRAHDRS="$EXTRAHDRS charclass.h precompose.h wcwidth.h"
16833	EXTRASRCS="$EXTRASRCS charclass.c precompose.c wcwidth.c"
16834	EXTRAOBJS="$EXTRAOBJS charclass.o precompose.o wcwidth.o"
16835fi
16836
16837echo "$as_me:16837: checking if you want dynamic-abbreviation support" >&5
16838echo $ECHO_N "checking if you want dynamic-abbreviation support... $ECHO_C" >&6
16839
16840# Check whether --enable-dabbrev or --disable-dabbrev was given.
16841if test "${enable_dabbrev+set}" = set; then
16842  enableval="$enable_dabbrev"
16843  test "$enableval" != yes && enableval=no
16844  if test "$enableval" != "no" ; then
16845    enable_dabbrev=yes
16846  else
16847    enable_dabbrev=no
16848  fi
16849else
16850  enableval=no
16851  enable_dabbrev=no
16852
16853fi;
16854echo "$as_me:16854: result: $enable_dabbrev" >&5
16855echo "${ECHO_T}$enable_dabbrev" >&6
16856if test "$enable_dabbrev" = yes ; then
16857
16858cat >>confdefs.h <<\EOF
16859#define OPT_DABBREV 1
16860EOF
16861
16862fi
16863
16864echo "$as_me:16864: checking if you want DECterm Locator support" >&5
16865echo $ECHO_N "checking if you want DECterm Locator support... $ECHO_C" >&6
16866
16867# Check whether --enable-dec-locator or --disable-dec-locator was given.
16868if test "${enable_dec_locator+set}" = set; then
16869  enableval="$enable_dec_locator"
16870  test "$enableval" != yes && enableval=no
16871  if test "$enableval" != "no" ; then
16872    enable_dec_locator=yes
16873  else
16874    enable_dec_locator=no
16875  fi
16876else
16877  enableval=no
16878  enable_dec_locator=no
16879
16880fi;
16881echo "$as_me:16881: result: $enable_dec_locator" >&5
16882echo "${ECHO_T}$enable_dec_locator" >&6
16883if test "$enable_dec_locator" = yes ; then
16884
16885cat >>confdefs.h <<\EOF
16886#define OPT_DEC_LOCATOR 1
16887EOF
16888
16889fi
16890
16891echo "$as_me:16891: checking if you want VT420 rectangle support" >&5
16892echo $ECHO_N "checking if you want VT420 rectangle support... $ECHO_C" >&6
16893
16894# Check whether --enable-rectangles or --disable-rectangles was given.
16895if test "${enable_rectangles+set}" = set; then
16896  enableval="$enable_rectangles"
16897  test "$enableval" != no && enableval=yes
16898  if test "$enableval" != "yes" ; then
16899    enable_rectangles=no
16900  else
16901    enable_rectangles=yes
16902  fi
16903else
16904  enableval=yes
16905  enable_rectangles=yes
16906
16907fi;
16908echo "$as_me:16908: result: $enable_rectangles" >&5
16909echo "${ECHO_T}$enable_rectangles" >&6
16910if test "$enable_rectangles" = yes ; then
16911
16912cat >>confdefs.h <<\EOF
16913#define OPT_DEC_RECTOPS 1
16914EOF
16915
16916fi
16917
16918echo "$as_me:16918: checking if you want -ziconbeep option" >&5
16919echo $ECHO_N "checking if you want -ziconbeep option... $ECHO_C" >&6
16920
16921# Check whether --enable-ziconbeep or --disable-ziconbeep was given.
16922if test "${enable_ziconbeep+set}" = set; then
16923  enableval="$enable_ziconbeep"
16924  test "$enableval" != no && enableval=yes
16925  if test "$enableval" != "yes" ; then
16926    enable_ziconbeep=no
16927  else
16928    enable_ziconbeep=yes
16929  fi
16930else
16931  enableval=yes
16932  enable_ziconbeep=yes
16933
16934fi;
16935echo "$as_me:16935: result: $enable_ziconbeep" >&5
16936echo "${ECHO_T}$enable_ziconbeep" >&6
16937test "$enable_ziconbeep" = no &&
16938cat >>confdefs.h <<\EOF
16939#define OPT_ZICONBEEP 0
16940EOF
16941
16942###############################################################################
16943
16944echo "$as_me:16944: checking if you want debugging traces" >&5
16945echo $ECHO_N "checking if you want debugging traces... $ECHO_C" >&6
16946
16947# Check whether --enable-trace or --disable-trace was given.
16948if test "${enable_trace+set}" = set; then
16949  enableval="$enable_trace"
16950  test "$enableval" != yes && enableval=no
16951  if test "$enableval" != "no" ; then
16952    enable_trace=yes
16953  else
16954    enable_trace=no
16955  fi
16956else
16957  enableval=no
16958  enable_trace=no
16959
16960fi;
16961echo "$as_me:16961: result: $enable_trace" >&5
16962echo "${ECHO_T}$enable_trace" >&6
16963if test "$enable_trace" = yes ; then
16964
16965cat >>confdefs.h <<\EOF
16966#define OPT_TRACE 1
16967EOF
16968
16969	EXTRASRCS="$EXTRASRCS trace.c"
16970	EXTRAOBJS="$EXTRAOBJS trace.o"
16971fi
16972
16973echo "$as_me:16973: checking if you want to use dmalloc for testing" >&5
16974echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
16975
16976# Check whether --with-dmalloc or --without-dmalloc was given.
16977if test "${with_dmalloc+set}" = set; then
16978  withval="$with_dmalloc"
16979
16980cat >>confdefs.h <<EOF
16981#define USE_DMALLOC 1
16982EOF
16983
16984	: ${with_cflags:=-g}
16985	: ${with_no_leaks:=yes}
16986	 with_dmalloc=yes
16987else
16988  with_dmalloc=
16989fi;
16990echo "$as_me:16990: result: ${with_dmalloc:-no}" >&5
16991echo "${ECHO_T}${with_dmalloc:-no}" >&6
16992
16993case .$with_cflags in #(vi
16994.*-g*)
16995	case .$CFLAGS in #(vi
16996	.*-g*) #(vi
16997		;;
16998	*)
16999
17000cf_fix_cppflags=no
17001cf_new_cflags=
17002cf_new_cppflags=
17003cf_new_extra_cppflags=
17004
17005for cf_add_cflags in -g
17006do
17007case $cf_fix_cppflags in
17008no)
17009	case $cf_add_cflags in #(vi
17010	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
17011		case $cf_add_cflags in
17012		-D*)
17013			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17014
17015			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
17016				&& test -z "${cf_tst_cflags}" \
17017				&& cf_fix_cppflags=yes
17018
17019			if test $cf_fix_cppflags = yes ; then
17020				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
17021				continue
17022			elif test "${cf_tst_cflags}" = "\"'" ; then
17023				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
17024				continue
17025			fi
17026			;;
17027		esac
17028		case "$CPPFLAGS" in
17029		*$cf_add_cflags) #(vi
17030			;;
17031		*) #(vi
17032			case $cf_add_cflags in #(vi
17033			-D*)
17034				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17035
17036CPPFLAGS=`echo "$CPPFLAGS" | \
17037	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
17038		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
17039
17040				;;
17041			esac
17042			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
17043			;;
17044		esac
17045		;;
17046	*)
17047		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
17048		;;
17049	esac
17050	;;
17051yes)
17052	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
17053
17054	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
17055
17056	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
17057		&& test -z "${cf_tst_cflags}" \
17058		&& cf_fix_cppflags=no
17059	;;
17060esac
17061done
17062
17063if test -n "$cf_new_cflags" ; then
17064
17065	CFLAGS="$CFLAGS $cf_new_cflags"
17066fi
17067
17068if test -n "$cf_new_cppflags" ; then
17069
17070	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
17071fi
17072
17073if test -n "$cf_new_extra_cppflags" ; then
17074
17075	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
17076fi
17077
17078		;;
17079	esac
17080	;;
17081esac
17082
17083if test "$with_dmalloc" = yes ; then
17084	echo "$as_me:17084: checking for dmalloc.h" >&5
17085echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
17086if test "${ac_cv_header_dmalloc_h+set}" = set; then
17087  echo $ECHO_N "(cached) $ECHO_C" >&6
17088else
17089  cat >conftest.$ac_ext <<_ACEOF
17090#line 17090 "configure"
17091#include "confdefs.h"
17092#include <dmalloc.h>
17093_ACEOF
17094if { (eval echo "$as_me:17094: \"$ac_cpp conftest.$ac_ext\"") >&5
17095  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17096  ac_status=$?
17097  egrep -v '^ *\+' conftest.er1 >conftest.err
17098  rm -f conftest.er1
17099  cat conftest.err >&5
17100  echo "$as_me:17100: \$? = $ac_status" >&5
17101  (exit $ac_status); } >/dev/null; then
17102  if test -s conftest.err; then
17103    ac_cpp_err=$ac_c_preproc_warn_flag
17104  else
17105    ac_cpp_err=
17106  fi
17107else
17108  ac_cpp_err=yes
17109fi
17110if test -z "$ac_cpp_err"; then
17111  ac_cv_header_dmalloc_h=yes
17112else
17113  echo "$as_me: failed program was:" >&5
17114  cat conftest.$ac_ext >&5
17115  ac_cv_header_dmalloc_h=no
17116fi
17117rm -f conftest.err conftest.$ac_ext
17118fi
17119echo "$as_me:17119: result: $ac_cv_header_dmalloc_h" >&5
17120echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
17121if test $ac_cv_header_dmalloc_h = yes; then
17122
17123echo "$as_me:17123: checking for dmalloc_debug in -ldmalloc" >&5
17124echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
17125if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
17126  echo $ECHO_N "(cached) $ECHO_C" >&6
17127else
17128  ac_check_lib_save_LIBS=$LIBS
17129LIBS="-ldmalloc  $LIBS"
17130cat >conftest.$ac_ext <<_ACEOF
17131#line 17131 "configure"
17132#include "confdefs.h"
17133
17134/* Override any gcc2 internal prototype to avoid an error.  */
17135#ifdef __cplusplus
17136extern "C"
17137#endif
17138/* We use char because int might match the return type of a gcc2
17139   builtin and then its argument prototype would still apply.  */
17140char dmalloc_debug ();
17141int
17142main ()
17143{
17144dmalloc_debug ();
17145  ;
17146  return 0;
17147}
17148_ACEOF
17149rm -f conftest.$ac_objext conftest$ac_exeext
17150if { (eval echo "$as_me:17150: \"$ac_link\"") >&5
17151  (eval $ac_link) 2>&5
17152  ac_status=$?
17153  echo "$as_me:17153: \$? = $ac_status" >&5
17154  (exit $ac_status); } &&
17155         { ac_try='test -s conftest$ac_exeext'
17156  { (eval echo "$as_me:17156: \"$ac_try\"") >&5
17157  (eval $ac_try) 2>&5
17158  ac_status=$?
17159  echo "$as_me:17159: \$? = $ac_status" >&5
17160  (exit $ac_status); }; }; then
17161  ac_cv_lib_dmalloc_dmalloc_debug=yes
17162else
17163  echo "$as_me: failed program was:" >&5
17164cat conftest.$ac_ext >&5
17165ac_cv_lib_dmalloc_dmalloc_debug=no
17166fi
17167rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17168LIBS=$ac_check_lib_save_LIBS
17169fi
17170echo "$as_me:17170: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
17171echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
17172if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
17173  cat >>confdefs.h <<EOF
17174#define HAVE_LIBDMALLOC 1
17175EOF
17176
17177  LIBS="-ldmalloc $LIBS"
17178
17179fi
17180
17181fi
17182
17183fi
17184
17185echo "$as_me:17185: checking if you want to use dbmalloc for testing" >&5
17186echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
17187
17188# Check whether --with-dbmalloc or --without-dbmalloc was given.
17189if test "${with_dbmalloc+set}" = set; then
17190  withval="$with_dbmalloc"
17191
17192cat >>confdefs.h <<EOF
17193#define USE_DBMALLOC 1
17194EOF
17195
17196	: ${with_cflags:=-g}
17197	: ${with_no_leaks:=yes}
17198	 with_dbmalloc=yes
17199else
17200  with_dbmalloc=
17201fi;
17202echo "$as_me:17202: result: ${with_dbmalloc:-no}" >&5
17203echo "${ECHO_T}${with_dbmalloc:-no}" >&6
17204
17205case .$with_cflags in #(vi
17206.*-g*)
17207	case .$CFLAGS in #(vi
17208	.*-g*) #(vi
17209		;;
17210	*)
17211
17212cf_fix_cppflags=no
17213cf_new_cflags=
17214cf_new_cppflags=
17215cf_new_extra_cppflags=
17216
17217for cf_add_cflags in -g
17218do
17219case $cf_fix_cppflags in
17220no)
17221	case $cf_add_cflags in #(vi
17222	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
17223		case $cf_add_cflags in
17224		-D*)
17225			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17226
17227			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
17228				&& test -z "${cf_tst_cflags}" \
17229				&& cf_fix_cppflags=yes
17230
17231			if test $cf_fix_cppflags = yes ; then
17232				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
17233				continue
17234			elif test "${cf_tst_cflags}" = "\"'" ; then
17235				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
17236				continue
17237			fi
17238			;;
17239		esac
17240		case "$CPPFLAGS" in
17241		*$cf_add_cflags) #(vi
17242			;;
17243		*) #(vi
17244			case $cf_add_cflags in #(vi
17245			-D*)
17246				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17247
17248CPPFLAGS=`echo "$CPPFLAGS" | \
17249	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
17250		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
17251
17252				;;
17253			esac
17254			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
17255			;;
17256		esac
17257		;;
17258	*)
17259		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
17260		;;
17261	esac
17262	;;
17263yes)
17264	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
17265
17266	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
17267
17268	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
17269		&& test -z "${cf_tst_cflags}" \
17270		&& cf_fix_cppflags=no
17271	;;
17272esac
17273done
17274
17275if test -n "$cf_new_cflags" ; then
17276
17277	CFLAGS="$CFLAGS $cf_new_cflags"
17278fi
17279
17280if test -n "$cf_new_cppflags" ; then
17281
17282	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
17283fi
17284
17285if test -n "$cf_new_extra_cppflags" ; then
17286
17287	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
17288fi
17289
17290		;;
17291	esac
17292	;;
17293esac
17294
17295if test "$with_dbmalloc" = yes ; then
17296	echo "$as_me:17296: checking for dbmalloc.h" >&5
17297echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
17298if test "${ac_cv_header_dbmalloc_h+set}" = set; then
17299  echo $ECHO_N "(cached) $ECHO_C" >&6
17300else
17301  cat >conftest.$ac_ext <<_ACEOF
17302#line 17302 "configure"
17303#include "confdefs.h"
17304#include <dbmalloc.h>
17305_ACEOF
17306if { (eval echo "$as_me:17306: \"$ac_cpp conftest.$ac_ext\"") >&5
17307  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17308  ac_status=$?
17309  egrep -v '^ *\+' conftest.er1 >conftest.err
17310  rm -f conftest.er1
17311  cat conftest.err >&5
17312  echo "$as_me:17312: \$? = $ac_status" >&5
17313  (exit $ac_status); } >/dev/null; then
17314  if test -s conftest.err; then
17315    ac_cpp_err=$ac_c_preproc_warn_flag
17316  else
17317    ac_cpp_err=
17318  fi
17319else
17320  ac_cpp_err=yes
17321fi
17322if test -z "$ac_cpp_err"; then
17323  ac_cv_header_dbmalloc_h=yes
17324else
17325  echo "$as_me: failed program was:" >&5
17326  cat conftest.$ac_ext >&5
17327  ac_cv_header_dbmalloc_h=no
17328fi
17329rm -f conftest.err conftest.$ac_ext
17330fi
17331echo "$as_me:17331: result: $ac_cv_header_dbmalloc_h" >&5
17332echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
17333if test $ac_cv_header_dbmalloc_h = yes; then
17334
17335echo "$as_me:17335: checking for debug_malloc in -ldbmalloc" >&5
17336echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
17337if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
17338  echo $ECHO_N "(cached) $ECHO_C" >&6
17339else
17340  ac_check_lib_save_LIBS=$LIBS
17341LIBS="-ldbmalloc  $LIBS"
17342cat >conftest.$ac_ext <<_ACEOF
17343#line 17343 "configure"
17344#include "confdefs.h"
17345
17346/* Override any gcc2 internal prototype to avoid an error.  */
17347#ifdef __cplusplus
17348extern "C"
17349#endif
17350/* We use char because int might match the return type of a gcc2
17351   builtin and then its argument prototype would still apply.  */
17352char debug_malloc ();
17353int
17354main ()
17355{
17356debug_malloc ();
17357  ;
17358  return 0;
17359}
17360_ACEOF
17361rm -f conftest.$ac_objext conftest$ac_exeext
17362if { (eval echo "$as_me:17362: \"$ac_link\"") >&5
17363  (eval $ac_link) 2>&5
17364  ac_status=$?
17365  echo "$as_me:17365: \$? = $ac_status" >&5
17366  (exit $ac_status); } &&
17367         { ac_try='test -s conftest$ac_exeext'
17368  { (eval echo "$as_me:17368: \"$ac_try\"") >&5
17369  (eval $ac_try) 2>&5
17370  ac_status=$?
17371  echo "$as_me:17371: \$? = $ac_status" >&5
17372  (exit $ac_status); }; }; then
17373  ac_cv_lib_dbmalloc_debug_malloc=yes
17374else
17375  echo "$as_me: failed program was:" >&5
17376cat conftest.$ac_ext >&5
17377ac_cv_lib_dbmalloc_debug_malloc=no
17378fi
17379rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17380LIBS=$ac_check_lib_save_LIBS
17381fi
17382echo "$as_me:17382: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
17383echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
17384if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
17385  cat >>confdefs.h <<EOF
17386#define HAVE_LIBDBMALLOC 1
17387EOF
17388
17389  LIBS="-ldbmalloc $LIBS"
17390
17391fi
17392
17393fi
17394
17395fi
17396
17397echo "$as_me:17397: checking if you want to use valgrind for testing" >&5
17398echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
17399
17400# Check whether --with-valgrind or --without-valgrind was given.
17401if test "${with_valgrind+set}" = set; then
17402  withval="$with_valgrind"
17403
17404cat >>confdefs.h <<EOF
17405#define USE_VALGRIND 1
17406EOF
17407
17408	: ${with_cflags:=-g}
17409	: ${with_no_leaks:=yes}
17410	 with_valgrind=yes
17411else
17412  with_valgrind=
17413fi;
17414echo "$as_me:17414: result: ${with_valgrind:-no}" >&5
17415echo "${ECHO_T}${with_valgrind:-no}" >&6
17416
17417case .$with_cflags in #(vi
17418.*-g*)
17419	case .$CFLAGS in #(vi
17420	.*-g*) #(vi
17421		;;
17422	*)
17423
17424cf_fix_cppflags=no
17425cf_new_cflags=
17426cf_new_cppflags=
17427cf_new_extra_cppflags=
17428
17429for cf_add_cflags in -g
17430do
17431case $cf_fix_cppflags in
17432no)
17433	case $cf_add_cflags in #(vi
17434	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
17435		case $cf_add_cflags in
17436		-D*)
17437			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17438
17439			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
17440				&& test -z "${cf_tst_cflags}" \
17441				&& cf_fix_cppflags=yes
17442
17443			if test $cf_fix_cppflags = yes ; then
17444				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
17445				continue
17446			elif test "${cf_tst_cflags}" = "\"'" ; then
17447				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
17448				continue
17449			fi
17450			;;
17451		esac
17452		case "$CPPFLAGS" in
17453		*$cf_add_cflags) #(vi
17454			;;
17455		*) #(vi
17456			case $cf_add_cflags in #(vi
17457			-D*)
17458				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17459
17460CPPFLAGS=`echo "$CPPFLAGS" | \
17461	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
17462		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
17463
17464				;;
17465			esac
17466			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
17467			;;
17468		esac
17469		;;
17470	*)
17471		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
17472		;;
17473	esac
17474	;;
17475yes)
17476	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
17477
17478	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
17479
17480	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
17481		&& test -z "${cf_tst_cflags}" \
17482		&& cf_fix_cppflags=no
17483	;;
17484esac
17485done
17486
17487if test -n "$cf_new_cflags" ; then
17488
17489	CFLAGS="$CFLAGS $cf_new_cflags"
17490fi
17491
17492if test -n "$cf_new_cppflags" ; then
17493
17494	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
17495fi
17496
17497if test -n "$cf_new_extra_cppflags" ; then
17498
17499	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
17500fi
17501
17502		;;
17503	esac
17504	;;
17505esac
17506
17507echo "$as_me:17507: checking if you want to perform memory-leak testing" >&5
17508echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
17509
17510# Check whether --enable-leaks or --disable-leaks was given.
17511if test "${enable_leaks+set}" = set; then
17512  enableval="$enable_leaks"
17513  if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
17514else
17515  : ${with_no_leaks:=no}
17516fi;
17517echo "$as_me:17517: result: $with_no_leaks" >&5
17518echo "${ECHO_T}$with_no_leaks" >&6
17519
17520if test "$with_no_leaks" = yes ; then
17521
17522cat >>confdefs.h <<\EOF
17523#define NO_LEAKS 1
17524EOF
17525
17526cat >>confdefs.h <<\EOF
17527#define YY_NO_LEAKS 1
17528EOF
17529
17530fi
17531
17532echo "$as_me:17532: checking if you want to see long compiling messages" >&5
17533echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
17534
17535# Check whether --enable-echo or --disable-echo was given.
17536if test "${enable_echo+set}" = set; then
17537  enableval="$enable_echo"
17538  test "$enableval" != no && enableval=yes
17539  if test "$enableval" != "yes" ; then
17540
17541    ECHO_LT='--silent'
17542    ECHO_LD='@echo linking $@;'
17543    RULE_CC='@echo compiling $<'
17544    SHOW_CC='@echo compiling $@'
17545    ECHO_CC='@'
17546
17547  else
17548
17549    ECHO_LT=''
17550    ECHO_LD=''
17551    RULE_CC=''
17552    SHOW_CC=''
17553    ECHO_CC=''
17554
17555  fi
17556else
17557  enableval=yes
17558
17559    ECHO_LT=''
17560    ECHO_LD=''
17561    RULE_CC=''
17562    SHOW_CC=''
17563    ECHO_CC=''
17564
17565fi;
17566echo "$as_me:17566: result: $enableval" >&5
17567echo "${ECHO_T}$enableval" >&6
17568
17569echo "$as_me:17569: checking if you want magic cookie emulation" >&5
17570echo $ECHO_N "checking if you want magic cookie emulation... $ECHO_C" >&6
17571
17572# Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
17573if test "${enable_xmc_glitch+set}" = set; then
17574  enableval="$enable_xmc_glitch"
17575  test "$enableval" != yes && enableval=no
17576  if test "$enableval" != "no" ; then
17577    enable_xmc=yes
17578  else
17579    enable_xmc=no
17580  fi
17581else
17582  enableval=no
17583  enable_xmc=no
17584
17585fi;
17586echo "$as_me:17586: result: $enable_xmc" >&5
17587echo "${ECHO_T}$enable_xmc" >&6
17588if test "$enable_xmc" = yes ; then
17589
17590cat >>confdefs.h <<\EOF
17591#define OPT_XMC_GLITCH 1
17592EOF
17593
17594	EXTRASRCS="$EXTRASRCS testxmc.c"
17595	EXTRAOBJS="$EXTRAOBJS testxmc.o"
17596fi
17597
17598for ac_func in tigetstr
17599do
17600as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17601echo "$as_me:17601: checking for $ac_func" >&5
17602echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17603if eval "test \"\${$as_ac_var+set}\" = set"; then
17604  echo $ECHO_N "(cached) $ECHO_C" >&6
17605else
17606  cat >conftest.$ac_ext <<_ACEOF
17607#line 17607 "configure"
17608#include "confdefs.h"
17609/* System header to define __stub macros and hopefully few prototypes,
17610    which can conflict with char $ac_func (); below.  */
17611#include <assert.h>
17612/* Override any gcc2 internal prototype to avoid an error.  */
17613#ifdef __cplusplus
17614extern "C"
17615#endif
17616/* We use char because int might match the return type of a gcc2
17617   builtin and then its argument prototype would still apply.  */
17618char $ac_func ();
17619char (*f) ();
17620
17621int
17622main ()
17623{
17624/* The GNU C library defines this for functions which it implements
17625    to always fail with ENOSYS.  Some functions are actually named
17626    something starting with __ and the normal name is an alias.  */
17627#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17628choke me
17629#else
17630f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
17631#endif
17632
17633  ;
17634  return 0;
17635}
17636_ACEOF
17637rm -f conftest.$ac_objext conftest$ac_exeext
17638if { (eval echo "$as_me:17638: \"$ac_link\"") >&5
17639  (eval $ac_link) 2>&5
17640  ac_status=$?
17641  echo "$as_me:17641: \$? = $ac_status" >&5
17642  (exit $ac_status); } &&
17643         { ac_try='test -s conftest$ac_exeext'
17644  { (eval echo "$as_me:17644: \"$ac_try\"") >&5
17645  (eval $ac_try) 2>&5
17646  ac_status=$?
17647  echo "$as_me:17647: \$? = $ac_status" >&5
17648  (exit $ac_status); }; }; then
17649  eval "$as_ac_var=yes"
17650else
17651  echo "$as_me: failed program was:" >&5
17652cat conftest.$ac_ext >&5
17653eval "$as_ac_var=no"
17654fi
17655rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17656fi
17657echo "$as_me:17657: result: `eval echo '${'$as_ac_var'}'`" >&5
17658echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
17659if test `eval echo '${'$as_ac_var'}'` = yes; then
17660  cat >>confdefs.h <<EOF
17661#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17662EOF
17663
17664fi
17665done
17666
17667if test -n "$cf_cv_lib_part_tgetent"; then
17668
17669for ac_func in use_extended_names
17670do
17671as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17672echo "$as_me:17672: checking for $ac_func" >&5
17673echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17674if eval "test \"\${$as_ac_var+set}\" = set"; then
17675  echo $ECHO_N "(cached) $ECHO_C" >&6
17676else
17677  cat >conftest.$ac_ext <<_ACEOF
17678#line 17678 "configure"
17679#include "confdefs.h"
17680/* System header to define __stub macros and hopefully few prototypes,
17681    which can conflict with char $ac_func (); below.  */
17682#include <assert.h>
17683/* Override any gcc2 internal prototype to avoid an error.  */
17684#ifdef __cplusplus
17685extern "C"
17686#endif
17687/* We use char because int might match the return type of a gcc2
17688   builtin and then its argument prototype would still apply.  */
17689char $ac_func ();
17690char (*f) ();
17691
17692int
17693main ()
17694{
17695/* The GNU C library defines this for functions which it implements
17696    to always fail with ENOSYS.  Some functions are actually named
17697    something starting with __ and the normal name is an alias.  */
17698#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17699choke me
17700#else
17701f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
17702#endif
17703
17704  ;
17705  return 0;
17706}
17707_ACEOF
17708rm -f conftest.$ac_objext conftest$ac_exeext
17709if { (eval echo "$as_me:17709: \"$ac_link\"") >&5
17710  (eval $ac_link) 2>&5
17711  ac_status=$?
17712  echo "$as_me:17712: \$? = $ac_status" >&5
17713  (exit $ac_status); } &&
17714         { ac_try='test -s conftest$ac_exeext'
17715  { (eval echo "$as_me:17715: \"$ac_try\"") >&5
17716  (eval $ac_try) 2>&5
17717  ac_status=$?
17718  echo "$as_me:17718: \$? = $ac_status" >&5
17719  (exit $ac_status); }; }; then
17720  eval "$as_ac_var=yes"
17721else
17722  echo "$as_me: failed program was:" >&5
17723cat conftest.$ac_ext >&5
17724eval "$as_ac_var=no"
17725fi
17726rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17727fi
17728echo "$as_me:17728: result: `eval echo '${'$as_ac_var'}'`" >&5
17729echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
17730if test `eval echo '${'$as_ac_var'}'` = yes; then
17731  cat >>confdefs.h <<EOF
17732#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17733EOF
17734
17735fi
17736done
17737
17738fi
17739
17740if test -n "$GCC" ; then
17741echo "$as_me:17741: checking if you want to turn on gcc warnings" >&5
17742echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6
17743
17744# Check whether --enable-warnings or --disable-warnings was given.
17745if test "${enable_warnings+set}" = set; then
17746  enableval="$enable_warnings"
17747  test "$enableval" != yes && enableval=no
17748  if test "$enableval" != "no" ; then
17749    with_warnings=yes
17750  else
17751    with_warnings=no
17752  fi
17753else
17754  enableval=no
17755  with_warnings=no
17756
17757fi;
17758echo "$as_me:17758: result: $with_warnings" >&5
17759echo "${ECHO_T}$with_warnings" >&6
17760if test "$with_warnings" = yes
17761then
17762
17763if test "$GCC" = yes
17764then
17765cat > conftest.i <<EOF
17766#ifndef GCC_PRINTF
17767#define GCC_PRINTF 0
17768#endif
17769#ifndef GCC_SCANF
17770#define GCC_SCANF 0
17771#endif
17772#ifndef GCC_NORETURN
17773#define GCC_NORETURN /* nothing */
17774#endif
17775#ifndef GCC_UNUSED
17776#define GCC_UNUSED /* nothing */
17777#endif
17778EOF
17779if test "$GCC" = yes
17780then
17781	{ echo "$as_me:17781: checking for $CC __attribute__ directives..." >&5
17782echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
17783cat > conftest.$ac_ext <<EOF
17784#line 17784 "${as_me:-configure}"
17785#include "confdefs.h"
17786#include "conftest.h"
17787#include "conftest.i"
17788#if	GCC_PRINTF
17789#define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
17790#else
17791#define GCC_PRINTFLIKE(fmt,var) /*nothing*/
17792#endif
17793#if	GCC_SCANF
17794#define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
17795#else
17796#define GCC_SCANFLIKE(fmt,var)  /*nothing*/
17797#endif
17798extern void wow(char *,...) GCC_SCANFLIKE(1,2);
17799extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
17800extern void foo(void) GCC_NORETURN;
17801int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
17802EOF
17803	cf_printf_attribute=no
17804	cf_scanf_attribute=no
17805	for cf_attribute in scanf printf unused noreturn
17806	do
17807
17808cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17809
17810		cf_directive="__attribute__(($cf_attribute))"
17811		echo "checking for $CC $cf_directive" 1>&5
17812
17813		case $cf_attribute in #(vi
17814		printf) #(vi
17815			cf_printf_attribute=yes
17816			cat >conftest.h <<EOF
17817#define GCC_$cf_ATTRIBUTE 1
17818EOF
17819			;;
17820		scanf) #(vi
17821			cf_scanf_attribute=yes
17822			cat >conftest.h <<EOF
17823#define GCC_$cf_ATTRIBUTE 1
17824EOF
17825			;;
17826		*) #(vi
17827			cat >conftest.h <<EOF
17828#define GCC_$cf_ATTRIBUTE $cf_directive
17829EOF
17830			;;
17831		esac
17832
17833		if { (eval echo "$as_me:17833: \"$ac_compile\"") >&5
17834  (eval $ac_compile) 2>&5
17835  ac_status=$?
17836  echo "$as_me:17836: \$? = $ac_status" >&5
17837  (exit $ac_status); }; then
17838			test -n "$verbose" && echo "$as_me:17838: result: ... $cf_attribute" >&5
17839echo "${ECHO_T}... $cf_attribute" >&6
17840			cat conftest.h >>confdefs.h
17841			case $cf_attribute in #(vi
17842			noreturn) #(vi
17843
17844cat >>confdefs.h <<EOF
17845#define GCC_NORETURN $cf_directive
17846EOF
17847
17848				;;
17849			printf) #(vi
17850				cf_value='/* nothing */'
17851				if test "$cf_printf_attribute" != no ; then
17852					cf_value='__attribute__((format(printf,fmt,var)))'
17853
17854cat >>confdefs.h <<\EOF
17855#define GCC_PRINTF 1
17856EOF
17857
17858				fi
17859
17860cat >>confdefs.h <<EOF
17861#define GCC_PRINTFLIKE(fmt,var) $cf_value
17862EOF
17863
17864				;;
17865			scanf) #(vi
17866				cf_value='/* nothing */'
17867				if test "$cf_scanf_attribute" != no ; then
17868					cf_value='__attribute__((format(scanf,fmt,var)))'
17869
17870cat >>confdefs.h <<\EOF
17871#define GCC_SCANF 1
17872EOF
17873
17874				fi
17875
17876cat >>confdefs.h <<EOF
17877#define GCC_SCANFLIKE(fmt,var) $cf_value
17878EOF
17879
17880				;;
17881			unused) #(vi
17882
17883cat >>confdefs.h <<EOF
17884#define GCC_UNUSED $cf_directive
17885EOF
17886
17887				;;
17888			esac
17889		fi
17890	done
17891else
17892	fgrep define conftest.i >>confdefs.h
17893fi
17894rm -rf conftest*
17895fi
17896
17897INTEL_COMPILER=no
17898
17899if test "$GCC" = yes ; then
17900	case $host_os in
17901	linux*|gnu*)
17902		echo "$as_me:17902: checking if this is really Intel C compiler" >&5
17903echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
17904		cf_save_CFLAGS="$CFLAGS"
17905		CFLAGS="$CFLAGS -no-gcc"
17906		cat >conftest.$ac_ext <<_ACEOF
17907#line 17907 "configure"
17908#include "confdefs.h"
17909
17910int
17911main ()
17912{
17913
17914#ifdef __INTEL_COMPILER
17915#else
17916make an error
17917#endif
17918
17919  ;
17920  return 0;
17921}
17922_ACEOF
17923rm -f conftest.$ac_objext
17924if { (eval echo "$as_me:17924: \"$ac_compile\"") >&5
17925  (eval $ac_compile) 2>&5
17926  ac_status=$?
17927  echo "$as_me:17927: \$? = $ac_status" >&5
17928  (exit $ac_status); } &&
17929         { ac_try='test -s conftest.$ac_objext'
17930  { (eval echo "$as_me:17930: \"$ac_try\"") >&5
17931  (eval $ac_try) 2>&5
17932  ac_status=$?
17933  echo "$as_me:17933: \$? = $ac_status" >&5
17934  (exit $ac_status); }; }; then
17935  INTEL_COMPILER=yes
17936cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
17937
17938else
17939  echo "$as_me: failed program was:" >&5
17940cat conftest.$ac_ext >&5
17941fi
17942rm -f conftest.$ac_objext conftest.$ac_ext
17943		CFLAGS="$cf_save_CFLAGS"
17944		echo "$as_me:17944: result: $INTEL_COMPILER" >&5
17945echo "${ECHO_T}$INTEL_COMPILER" >&6
17946		;;
17947	esac
17948fi
17949
17950CLANG_COMPILER=no
17951
17952if test "$GCC" = yes ; then
17953	echo "$as_me:17953: checking if this is really Clang C compiler" >&5
17954echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
17955	cf_save_CFLAGS="$CFLAGS"
17956	CFLAGS="$CFLAGS -Qunused-arguments"
17957	cat >conftest.$ac_ext <<_ACEOF
17958#line 17958 "configure"
17959#include "confdefs.h"
17960
17961int
17962main ()
17963{
17964
17965#ifdef __clang__
17966#else
17967make an error
17968#endif
17969
17970  ;
17971  return 0;
17972}
17973_ACEOF
17974rm -f conftest.$ac_objext
17975if { (eval echo "$as_me:17975: \"$ac_compile\"") >&5
17976  (eval $ac_compile) 2>&5
17977  ac_status=$?
17978  echo "$as_me:17978: \$? = $ac_status" >&5
17979  (exit $ac_status); } &&
17980         { ac_try='test -s conftest.$ac_objext'
17981  { (eval echo "$as_me:17981: \"$ac_try\"") >&5
17982  (eval $ac_try) 2>&5
17983  ac_status=$?
17984  echo "$as_me:17984: \$? = $ac_status" >&5
17985  (exit $ac_status); }; }; then
17986  CLANG_COMPILER=yes
17987cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
17988
17989else
17990  echo "$as_me: failed program was:" >&5
17991cat conftest.$ac_ext >&5
17992fi
17993rm -f conftest.$ac_objext conftest.$ac_ext
17994	CFLAGS="$cf_save_CFLAGS"
17995	echo "$as_me:17995: result: $CLANG_COMPILER" >&5
17996echo "${ECHO_T}$CLANG_COMPILER" >&6
17997fi
17998
17999cat > conftest.$ac_ext <<EOF
18000#line 18000 "${as_me:-configure}"
18001int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
18002EOF
18003
18004if test "$INTEL_COMPILER" = yes
18005then
18006# The "-wdXXX" options suppress warnings:
18007# remark #1419: external declaration in primary source file
18008# remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
18009# remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
18010# remark #193: zero used for undefined preprocessing identifier
18011# remark #593: variable "curs_sb_left_arrow" was set but never used
18012# remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
18013# remark #869: parameter "tw" was never referenced
18014# remark #981: operands are evaluated in unspecified order
18015# warning #279: controlling expression is constant
18016
18017	{ echo "$as_me:18017: checking for $CC warning options..." >&5
18018echo "$as_me: checking for $CC warning options..." >&6;}
18019	cf_save_CFLAGS="$CFLAGS"
18020	EXTRA_CFLAGS="-Wall"
18021	for cf_opt in \
18022		wd1419 \
18023		wd1683 \
18024		wd1684 \
18025		wd193 \
18026		wd593 \
18027		wd279 \
18028		wd810 \
18029		wd869 \
18030		wd981
18031	do
18032		CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
18033		if { (eval echo "$as_me:18033: \"$ac_compile\"") >&5
18034  (eval $ac_compile) 2>&5
18035  ac_status=$?
18036  echo "$as_me:18036: \$? = $ac_status" >&5
18037  (exit $ac_status); }; then
18038			test -n "$verbose" && echo "$as_me:18038: result: ... -$cf_opt" >&5
18039echo "${ECHO_T}... -$cf_opt" >&6
18040			EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
18041		fi
18042	done
18043	CFLAGS="$cf_save_CFLAGS"
18044
18045elif test "$GCC" = yes
18046then
18047	{ echo "$as_me:18047: checking for $CC warning options..." >&5
18048echo "$as_me: checking for $CC warning options..." >&6;}
18049	cf_save_CFLAGS="$CFLAGS"
18050	EXTRA_CFLAGS=
18051	cf_warn_CONST=""
18052	test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
18053	for cf_opt in W Wall \
18054		Wbad-function-cast \
18055		Wcast-align \
18056		Wcast-qual \
18057		Winline \
18058		Wmissing-declarations \
18059		Wmissing-prototypes \
18060		Wnested-externs \
18061		Wpointer-arith \
18062		Wshadow \
18063		Wstrict-prototypes \
18064		Wundef $cf_warn_CONST Wdeclaration-after-statement Wextra Wno-unknown-pragmas Wswitch-enum
18065	do
18066		CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
18067		if { (eval echo "$as_me:18067: \"$ac_compile\"") >&5
18068  (eval $ac_compile) 2>&5
18069  ac_status=$?
18070  echo "$as_me:18070: \$? = $ac_status" >&5
18071  (exit $ac_status); }; then
18072			test -n "$verbose" && echo "$as_me:18072: result: ... -$cf_opt" >&5
18073echo "${ECHO_T}... -$cf_opt" >&6
18074			case $cf_opt in #(vi
18075			Wcast-qual) #(vi
18076				CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
18077				;;
18078			Winline) #(vi
18079				case $GCC_VERSION in
18080				[34].*)
18081					test -n "$verbose" && echo "	feature is broken in gcc $GCC_VERSION" 1>&6
18082
18083echo "${as_me:-configure}:18083: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
18084
18085					continue;;
18086				esac
18087				;;
18088			Wpointer-arith) #(vi
18089				case $GCC_VERSION in
18090				[12].*)
18091					test -n "$verbose" && echo "	feature is broken in gcc $GCC_VERSION" 1>&6
18092
18093echo "${as_me:-configure}:18093: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
18094
18095					continue;;
18096				esac
18097				;;
18098			esac
18099			EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
18100		fi
18101	done
18102	CFLAGS="$cf_save_CFLAGS"
18103fi
18104rm -rf conftest*
18105
18106fi
18107fi
18108
18109test "$disable_setuid" = yes &&
18110cat >>confdefs.h <<\EOF
18111#define DISABLE_SETUID 1
18112EOF
18113
18114test "$disable_setgid" = yes &&
18115cat >>confdefs.h <<\EOF
18116#define DISABLE_SETGID 1
18117EOF
18118
18119if test $disable_setuid = yes ; then
18120	MAY_SETUID="#"
18121	NOT_SETUID=
18122elif test $disable_setgid = yes ; then
18123	MAY_SETUID="#"
18124	NOT_SETUID=
18125else
18126	MAY_SETUID=
18127	NOT_SETUID="#"
18128fi
18129
18130###	remove from CPPFLAGS the optional features we define in xtermcfg.h
18131###	or other conflicting symbols that may be defined via imake:
18132for cf_def in \
18133	__STDC__ \
18134	ALLOWLOGGING \
18135	ALLOWLOGFILEEXEC \
18136	OPT_LUIT_PROG \
18137	OPT_WIDE_CHARS \
18138	SCROLLBAR_RIGHT \
18139	USE_TTY_GROUP \
18140	USE_UTEMPTER \
18141	XRENDERFONT
18142do
18143	CPPFLAGS=`echo "$CPPFLAGS" | sed -e s/-D$cf_def//`
18144done
18145
18146echo "$as_me:18146: checking if filesystem supports mixed-case filenames" >&5
18147echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
18148if test "${cf_cv_mixedcase+set}" = set; then
18149  echo $ECHO_N "(cached) $ECHO_C" >&6
18150else
18151
18152if test "$cross_compiling" = yes ; then
18153	case $target_alias in #(vi
18154	*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-mingw32*|*-uwin*) #(vi
18155		cf_cv_mixedcase=no
18156		;;
18157	*)
18158		cf_cv_mixedcase=yes
18159		;;
18160	esac
18161else
18162	rm -f conftest CONFTEST
18163	echo test >conftest
18164	if test -f CONFTEST ; then
18165		cf_cv_mixedcase=no
18166	else
18167		cf_cv_mixedcase=yes
18168	fi
18169	rm -f conftest CONFTEST
18170fi
18171
18172fi
18173echo "$as_me:18173: result: $cf_cv_mixedcase" >&5
18174echo "${ECHO_T}$cf_cv_mixedcase" >&6
18175test "$cf_cv_mixedcase" = yes &&
18176cat >>confdefs.h <<\EOF
18177#define MIXEDCASE_FILENAMES 1
18178EOF
18179
18180for ac_prog in exctags ctags
18181do
18182  # Extract the first word of "$ac_prog", so it can be a program name with args.
18183set dummy $ac_prog; ac_word=$2
18184echo "$as_me:18184: checking for $ac_word" >&5
18185echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
18186if test "${ac_cv_prog_CTAGS+set}" = set; then
18187  echo $ECHO_N "(cached) $ECHO_C" >&6
18188else
18189  if test -n "$CTAGS"; then
18190  ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
18191else
18192  ac_save_IFS=$IFS; IFS=$ac_path_separator
18193ac_dummy="$PATH"
18194for ac_dir in $ac_dummy; do
18195  IFS=$ac_save_IFS
18196  test -z "$ac_dir" && ac_dir=.
18197  $as_executable_p "$ac_dir/$ac_word" || continue
18198ac_cv_prog_CTAGS="$ac_prog"
18199echo "$as_me:18199: found $ac_dir/$ac_word" >&5
18200break
18201done
18202
18203fi
18204fi
18205CTAGS=$ac_cv_prog_CTAGS
18206if test -n "$CTAGS"; then
18207  echo "$as_me:18207: result: $CTAGS" >&5
18208echo "${ECHO_T}$CTAGS" >&6
18209else
18210  echo "$as_me:18210: result: no" >&5
18211echo "${ECHO_T}no" >&6
18212fi
18213
18214  test -n "$CTAGS" && break
18215done
18216
18217for ac_prog in exetags etags
18218do
18219  # Extract the first word of "$ac_prog", so it can be a program name with args.
18220set dummy $ac_prog; ac_word=$2
18221echo "$as_me:18221: checking for $ac_word" >&5
18222echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
18223if test "${ac_cv_prog_ETAGS+set}" = set; then
18224  echo $ECHO_N "(cached) $ECHO_C" >&6
18225else
18226  if test -n "$ETAGS"; then
18227  ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
18228else
18229  ac_save_IFS=$IFS; IFS=$ac_path_separator
18230ac_dummy="$PATH"
18231for ac_dir in $ac_dummy; do
18232  IFS=$ac_save_IFS
18233  test -z "$ac_dir" && ac_dir=.
18234  $as_executable_p "$ac_dir/$ac_word" || continue
18235ac_cv_prog_ETAGS="$ac_prog"
18236echo "$as_me:18236: found $ac_dir/$ac_word" >&5
18237break
18238done
18239
18240fi
18241fi
18242ETAGS=$ac_cv_prog_ETAGS
18243if test -n "$ETAGS"; then
18244  echo "$as_me:18244: result: $ETAGS" >&5
18245echo "${ECHO_T}$ETAGS" >&6
18246else
18247  echo "$as_me:18247: result: no" >&5
18248echo "${ECHO_T}no" >&6
18249fi
18250
18251  test -n "$ETAGS" && break
18252done
18253
18254# Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
18255set dummy ${CTAGS:-ctags}; ac_word=$2
18256echo "$as_me:18256: checking for $ac_word" >&5
18257echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
18258if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
18259  echo $ECHO_N "(cached) $ECHO_C" >&6
18260else
18261  if test -n "$MAKE_LOWER_TAGS"; then
18262  ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
18263else
18264  ac_save_IFS=$IFS; IFS=$ac_path_separator
18265ac_dummy="$PATH"
18266for ac_dir in $ac_dummy; do
18267  IFS=$ac_save_IFS
18268  test -z "$ac_dir" && ac_dir=.
18269  $as_executable_p "$ac_dir/$ac_word" || continue
18270ac_cv_prog_MAKE_LOWER_TAGS="yes"
18271echo "$as_me:18271: found $ac_dir/$ac_word" >&5
18272break
18273done
18274
18275  test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
18276fi
18277fi
18278MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
18279if test -n "$MAKE_LOWER_TAGS"; then
18280  echo "$as_me:18280: result: $MAKE_LOWER_TAGS" >&5
18281echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
18282else
18283  echo "$as_me:18283: result: no" >&5
18284echo "${ECHO_T}no" >&6
18285fi
18286
18287if test "$cf_cv_mixedcase" = yes ; then
18288	# Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
18289set dummy ${ETAGS:-etags}; ac_word=$2
18290echo "$as_me:18290: checking for $ac_word" >&5
18291echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
18292if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
18293  echo $ECHO_N "(cached) $ECHO_C" >&6
18294else
18295  if test -n "$MAKE_UPPER_TAGS"; then
18296  ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
18297else
18298  ac_save_IFS=$IFS; IFS=$ac_path_separator
18299ac_dummy="$PATH"
18300for ac_dir in $ac_dummy; do
18301  IFS=$ac_save_IFS
18302  test -z "$ac_dir" && ac_dir=.
18303  $as_executable_p "$ac_dir/$ac_word" || continue
18304ac_cv_prog_MAKE_UPPER_TAGS="yes"
18305echo "$as_me:18305: found $ac_dir/$ac_word" >&5
18306break
18307done
18308
18309  test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
18310fi
18311fi
18312MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
18313if test -n "$MAKE_UPPER_TAGS"; then
18314  echo "$as_me:18314: result: $MAKE_UPPER_TAGS" >&5
18315echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
18316else
18317  echo "$as_me:18317: result: no" >&5
18318echo "${ECHO_T}no" >&6
18319fi
18320
18321else
18322	MAKE_UPPER_TAGS=no
18323fi
18324
18325if test "$MAKE_UPPER_TAGS" = yes ; then
18326	MAKE_UPPER_TAGS=
18327else
18328	MAKE_UPPER_TAGS="#"
18329fi
18330
18331if test "$MAKE_LOWER_TAGS" = yes ; then
18332	MAKE_LOWER_TAGS=
18333else
18334	MAKE_LOWER_TAGS="#"
18335fi
18336
18337LD_RPATH_OPT=
18338echo "$as_me:18338: checking for an rpath option" >&5
18339echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
18340case $cf_cv_system_name in #(vi
18341irix*) #(vi
18342	if test "$GCC" = yes; then
18343		LD_RPATH_OPT="-Wl,-rpath,"
18344	else
18345		LD_RPATH_OPT="-rpath "
18346	fi
18347	;;
18348linux*|gnu*|k*bsd*-gnu) #(vi
18349	LD_RPATH_OPT="-Wl,-rpath,"
18350	;;
18351openbsd[2-9].*|mirbsd*) #(vi
18352	LD_RPATH_OPT="-Wl,-rpath,"
18353	;;
18354dragonfly*|freebsd*) #(vi
18355	LD_RPATH_OPT="-rpath "
18356	;;
18357netbsd*) #(vi
18358	LD_RPATH_OPT="-Wl,-rpath,"
18359	;;
18360osf*|mls+*) #(vi
18361	LD_RPATH_OPT="-rpath "
18362	;;
18363solaris2*) #(vi
18364	LD_RPATH_OPT="-R"
18365	;;
18366*)
18367	;;
18368esac
18369echo "$as_me:18369: result: $LD_RPATH_OPT" >&5
18370echo "${ECHO_T}$LD_RPATH_OPT" >&6
18371
18372case "x$LD_RPATH_OPT" in #(vi
18373x-R*)
18374	echo "$as_me:18374: checking if we need a space after rpath option" >&5
18375echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
18376	cf_save_LIBS="$LIBS"
18377	LIBS="${LD_RPATH_OPT}$libdir $LIBS"
18378	cat >conftest.$ac_ext <<_ACEOF
18379#line 18379 "configure"
18380#include "confdefs.h"
18381
18382int
18383main ()
18384{
18385
18386  ;
18387  return 0;
18388}
18389_ACEOF
18390rm -f conftest.$ac_objext conftest$ac_exeext
18391if { (eval echo "$as_me:18391: \"$ac_link\"") >&5
18392  (eval $ac_link) 2>&5
18393  ac_status=$?
18394  echo "$as_me:18394: \$? = $ac_status" >&5
18395  (exit $ac_status); } &&
18396         { ac_try='test -s conftest$ac_exeext'
18397  { (eval echo "$as_me:18397: \"$ac_try\"") >&5
18398  (eval $ac_try) 2>&5
18399  ac_status=$?
18400  echo "$as_me:18400: \$? = $ac_status" >&5
18401  (exit $ac_status); }; }; then
18402  cf_rpath_space=no
18403else
18404  echo "$as_me: failed program was:" >&5
18405cat conftest.$ac_ext >&5
18406cf_rpath_space=yes
18407fi
18408rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18409	LIBS="$cf_save_LIBS"
18410	echo "$as_me:18410: result: $cf_rpath_space" >&5
18411echo "${ECHO_T}$cf_rpath_space" >&6
18412	test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
18413	;;
18414esac
18415
18416echo "$as_me:18416: checking if rpath-hack should be disabled" >&5
18417echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
18418
18419# Check whether --enable-rpath-hack or --disable-rpath-hack was given.
18420if test "${enable_rpath_hack+set}" = set; then
18421  enableval="$enable_rpath_hack"
18422  test "$enableval" != no && enableval=yes
18423  if test "$enableval" != "yes" ; then
18424    cf_disable_rpath_hack=yes
18425  else
18426    cf_disable_rpath_hack=no
18427  fi
18428else
18429  enableval=yes
18430  cf_disable_rpath_hack=no
18431
18432fi;
18433echo "$as_me:18433: result: $cf_disable_rpath_hack" >&5
18434echo "${ECHO_T}$cf_disable_rpath_hack" >&6
18435if test "$cf_disable_rpath_hack" = no ; then
18436
18437echo "$as_me:18437: checking for updated LDFLAGS" >&5
18438echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
18439if test -n "$LD_RPATH_OPT" ; then
18440	echo "$as_me:18440: result: maybe" >&5
18441echo "${ECHO_T}maybe" >&6
18442
18443	for ac_prog in ldd
18444do
18445  # Extract the first word of "$ac_prog", so it can be a program name with args.
18446set dummy $ac_prog; ac_word=$2
18447echo "$as_me:18447: checking for $ac_word" >&5
18448echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
18449if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
18450  echo $ECHO_N "(cached) $ECHO_C" >&6
18451else
18452  if test -n "$cf_ldd_prog"; then
18453  ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
18454else
18455  ac_save_IFS=$IFS; IFS=$ac_path_separator
18456ac_dummy="$PATH"
18457for ac_dir in $ac_dummy; do
18458  IFS=$ac_save_IFS
18459  test -z "$ac_dir" && ac_dir=.
18460  $as_executable_p "$ac_dir/$ac_word" || continue
18461ac_cv_prog_cf_ldd_prog="$ac_prog"
18462echo "$as_me:18462: found $ac_dir/$ac_word" >&5
18463break
18464done
18465
18466fi
18467fi
18468cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
18469if test -n "$cf_ldd_prog"; then
18470  echo "$as_me:18470: result: $cf_ldd_prog" >&5
18471echo "${ECHO_T}$cf_ldd_prog" >&6
18472else
18473  echo "$as_me:18473: result: no" >&5
18474echo "${ECHO_T}no" >&6
18475fi
18476
18477  test -n "$cf_ldd_prog" && break
18478done
18479test -n "$cf_ldd_prog" || cf_ldd_prog="no"
18480
18481	cf_rpath_list="/usr/lib /lib"
18482	if test "$cf_ldd_prog" != no
18483	then
18484		cf_rpath_oops=
18485
18486cat >conftest.$ac_ext <<_ACEOF
18487#line 18487 "configure"
18488#include "confdefs.h"
18489#include <stdio.h>
18490int
18491main ()
18492{
18493printf("Hello");
18494  ;
18495  return 0;
18496}
18497_ACEOF
18498rm -f conftest.$ac_objext conftest$ac_exeext
18499if { (eval echo "$as_me:18499: \"$ac_link\"") >&5
18500  (eval $ac_link) 2>&5
18501  ac_status=$?
18502  echo "$as_me:18502: \$? = $ac_status" >&5
18503  (exit $ac_status); } &&
18504         { ac_try='test -s conftest$ac_exeext'
18505  { (eval echo "$as_me:18505: \"$ac_try\"") >&5
18506  (eval $ac_try) 2>&5
18507  ac_status=$?
18508  echo "$as_me:18508: \$? = $ac_status" >&5
18509  (exit $ac_status); }; }; then
18510  cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort -u`
18511		 cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[ 	]/%/%' -e 's%/[^/][^/]*$%%' |sort -u`
18512else
18513  echo "$as_me: failed program was:" >&5
18514cat conftest.$ac_ext >&5
18515fi
18516rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18517
18518		# If we passed the link-test, but get a "not found" on a given library,
18519		# this could be due to inept reconfiguration of gcc to make it only
18520		# partly honor /usr/local/lib (or whatever).  Sometimes this behavior
18521		# is intentional, e.g., installing gcc in /usr/bin and suppressing the
18522		# /usr/local libraries.
18523		if test -n "$cf_rpath_oops"
18524		then
18525			for cf_rpath_src in $cf_rpath_oops
18526			do
18527				for cf_rpath_dir in \
18528					/usr/local \
18529					/usr/pkg \
18530					/opt/sfw
18531				do
18532					if test -f $cf_rpath_dir/lib/$cf_rpath_src
18533					then
18534						test -n "$verbose" && echo "	...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
18535
18536echo "${as_me:-configure}:18536: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
18537
18538						LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
18539						break
18540					fi
18541				done
18542			done
18543		fi
18544	fi
18545
18546	test -n "$verbose" && echo "	...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
18547
18548echo "${as_me:-configure}:18548: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
18549
18550test -n "$verbose" && echo "	...checking LDFLAGS $LDFLAGS" 1>&6
18551
18552echo "${as_me:-configure}:18552: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
18553
18554cf_rpath_dst=
18555for cf_rpath_src in $LDFLAGS
18556do
18557	case $cf_rpath_src in #(vi
18558	-L*) #(vi
18559
18560		# check if this refers to a directory which we will ignore
18561		cf_rpath_skip=no
18562		if test -n "$cf_rpath_list"
18563		then
18564			for cf_rpath_item in $cf_rpath_list
18565			do
18566				if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
18567				then
18568					cf_rpath_skip=yes
18569					break
18570				fi
18571			done
18572		fi
18573
18574		if test "$cf_rpath_skip" = no
18575		then
18576			# transform the option
18577			if test "$LD_RPATH_OPT" = "-R " ; then
18578				cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
18579			else
18580				cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
18581			fi
18582
18583			# if we have not already added this, add it now
18584			cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
18585			if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
18586			then
18587				test -n "$verbose" && echo "	...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
18588
18589echo "${as_me:-configure}:18589: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
18590
18591				EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
18592			fi
18593		fi
18594		;;
18595	esac
18596	cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
18597done
18598LDFLAGS=$cf_rpath_dst
18599
18600test -n "$verbose" && echo "	...checked LDFLAGS $LDFLAGS" 1>&6
18601
18602echo "${as_me:-configure}:18602: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
18603
18604test -n "$verbose" && echo "	...checking LIBS $LIBS" 1>&6
18605
18606echo "${as_me:-configure}:18606: testing ...checking LIBS $LIBS ..." 1>&5
18607
18608cf_rpath_dst=
18609for cf_rpath_src in $LIBS
18610do
18611	case $cf_rpath_src in #(vi
18612	-L*) #(vi
18613
18614		# check if this refers to a directory which we will ignore
18615		cf_rpath_skip=no
18616		if test -n "$cf_rpath_list"
18617		then
18618			for cf_rpath_item in $cf_rpath_list
18619			do
18620				if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
18621				then
18622					cf_rpath_skip=yes
18623					break
18624				fi
18625			done
18626		fi
18627
18628		if test "$cf_rpath_skip" = no
18629		then
18630			# transform the option
18631			if test "$LD_RPATH_OPT" = "-R " ; then
18632				cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
18633			else
18634				cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
18635			fi
18636
18637			# if we have not already added this, add it now
18638			cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
18639			if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
18640			then
18641				test -n "$verbose" && echo "	...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
18642
18643echo "${as_me:-configure}:18643: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
18644
18645				EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
18646			fi
18647		fi
18648		;;
18649	esac
18650	cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
18651done
18652LIBS=$cf_rpath_dst
18653
18654test -n "$verbose" && echo "	...checked LIBS $LIBS" 1>&6
18655
18656echo "${as_me:-configure}:18656: testing ...checked LIBS $LIBS ..." 1>&5
18657
18658	test -n "$verbose" && echo "	...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
18659
18660echo "${as_me:-configure}:18660: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
18661
18662fi
18663
18664fi
18665
18666# Force plink.sh to not trim pcre's libraries, which have the same symbol
18667# names as the system regexp.
18668if test "$with_pcre" != no
18669then
18670	LIBS=`echo "$LIBS" | sed -e 's/-lpcre/-kpcre/g'`
18671fi
18672
18673###	output xtermcfg.h, etc
18674ac_config_files="$ac_config_files Makefile df-install minstall:minstall.in"
18675cat >confcache <<\_ACEOF
18676# This file is a shell script that caches the results of configure
18677# tests run on this system so they can be shared between configure
18678# scripts and configure runs, see configure's option --config-cache.
18679# It is not useful on other systems.  If it contains results you don't
18680# want to keep, you may remove or edit it.
18681#
18682# config.status only pays attention to the cache file if you give it
18683# the --recheck option to rerun configure.
18684#
18685# `ac_cv_env_foo' variables (set or unset) will be overriden when
18686# loading this file, other *unset* `ac_cv_foo' will be assigned the
18687# following values.
18688
18689_ACEOF
18690
18691# The following way of writing the cache mishandles newlines in values,
18692# but we know of no workaround that is simple, portable, and efficient.
18693# So, don't put newlines in cache variables' values.
18694# Ultrix sh set writes to stderr and can't be redirected directly,
18695# and sets the high bit in the cache file unless we assign to the vars.
18696{
18697  (set) 2>&1 |
18698    case `(ac_space=' '; set | grep ac_space) 2>&1` in
18699    *ac_space=\ *)
18700      # `set' does not quote correctly, so add quotes (double-quote
18701      # substitution turns \\\\ into \\, and sed turns \\ into \).
18702      sed -n \
18703        "s/'/'\\\\''/g;
18704    	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
18705      ;;
18706    *)
18707      # `set' quotes correctly as required by POSIX, so do not add quotes.
18708      sed -n \
18709        "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
18710      ;;
18711    esac;
18712} |
18713  sed '
18714     t clear
18715     : clear
18716     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
18717     t end
18718     /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
18719     : end' >>confcache
18720if cmp -s $cache_file confcache; then :; else
18721  if test -w $cache_file; then
18722    test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
18723    cat confcache >$cache_file
18724  else
18725    echo "not updating unwritable cache $cache_file"
18726  fi
18727fi
18728rm -f confcache
18729
18730test "x$prefix" = xNONE && prefix=$ac_default_prefix
18731# Let make expand exec_prefix.
18732test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
18733
18734# VPATH may cause trouble with some makes, so we remove $(srcdir),
18735# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
18736# trailing colons and then remove the whole line if VPATH becomes empty
18737# (actually we leave an empty line to preserve line numbers).
18738if test "x$srcdir" = x.; then
18739  ac_vpsub='/^[ 	]*VPATH[ 	]*=/{
18740s/:*\$(srcdir):*/:/;
18741s/:*\${srcdir}:*/:/;
18742s/:*@srcdir@:*/:/;
18743s/^\([^=]*=[ 	]*\):*/\1/;
18744s/:*$//;
18745s/^[^=]*=[ 	]*$//;
18746}'
18747fi
18748
18749DEFS=-DHAVE_CONFIG_H
18750
18751: ${CONFIG_STATUS=./config.status}
18752ac_clean_files_save=$ac_clean_files
18753ac_clean_files="$ac_clean_files $CONFIG_STATUS"
18754{ echo "$as_me:18754: creating $CONFIG_STATUS" >&5
18755echo "$as_me: creating $CONFIG_STATUS" >&6;}
18756cat >$CONFIG_STATUS <<_ACEOF
18757#! $SHELL
18758# Generated automatically by configure.
18759# Run this file to recreate the current configuration.
18760# Compiler output produced by configure, useful for debugging
18761# configure, is in config.log if it exists.
18762
18763debug=false
18764SHELL=\${CONFIG_SHELL-$SHELL}
18765ac_cs_invocation="\$0 \$@"
18766
18767_ACEOF
18768
18769cat >>$CONFIG_STATUS <<\_ACEOF
18770# Be Bourne compatible
18771if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
18772  emulate sh
18773  NULLCMD=:
18774elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
18775  set -o posix
18776fi
18777
18778# Name of the executable.
18779as_me=`echo "$0" |sed 's,.*[\\/],,'`
18780
18781if expr a : '\(a\)' >/dev/null 2>&1; then
18782  as_expr=expr
18783else
18784  as_expr=false
18785fi
18786
18787rm -f conf$$ conf$$.exe conf$$.file
18788echo >conf$$.file
18789if ln -s conf$$.file conf$$ 2>/dev/null; then
18790  # We could just check for DJGPP; but this test a) works b) is more generic
18791  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
18792  if test -f conf$$.exe; then
18793    # Don't use ln at all; we don't have any links
18794    as_ln_s='cp -p'
18795  else
18796    as_ln_s='ln -s'
18797  fi
18798elif ln conf$$.file conf$$ 2>/dev/null; then
18799  as_ln_s=ln
18800else
18801  as_ln_s='cp -p'
18802fi
18803rm -f conf$$ conf$$.exe conf$$.file
18804
18805as_executable_p="test -f"
18806
18807# Support unset when possible.
18808if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
18809  as_unset=unset
18810else
18811  as_unset=false
18812fi
18813
18814# NLS nuisances.
18815$as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
18816$as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
18817$as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
18818$as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
18819$as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
18820$as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
18821$as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
18822$as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
18823
18824# IFS
18825# We need space, tab and new line, in precisely that order.
18826as_nl='
18827'
18828IFS=" 	$as_nl"
18829
18830# CDPATH.
18831$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
18832
18833exec 6>&1
18834
18835_ACEOF
18836
18837# Files that config.status was made for.
18838if test -n "$ac_config_files"; then
18839  echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
18840fi
18841
18842if test -n "$ac_config_headers"; then
18843  echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
18844fi
18845
18846if test -n "$ac_config_links"; then
18847  echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
18848fi
18849
18850if test -n "$ac_config_commands"; then
18851  echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
18852fi
18853
18854cat >>$CONFIG_STATUS <<\EOF
18855
18856ac_cs_usage="\
18857\`$as_me' instantiates files from templates according to the
18858current configuration.
18859
18860Usage: $0 [OPTIONS] [FILE]...
18861
18862  -h, --help       print this help, then exit
18863  -V, --version    print version number, then exit
18864  -d, --debug      don't remove temporary files
18865      --recheck    update $as_me by reconfiguring in the same conditions
18866  --file=FILE[:TEMPLATE]
18867                   instantiate the configuration file FILE
18868  --header=FILE[:TEMPLATE]
18869                   instantiate the configuration header FILE
18870
18871Configuration files:
18872$config_files
18873
18874Configuration headers:
18875$config_headers
18876
18877Report bugs to <dickey@invisible-island.net>."
18878EOF
18879
18880cat >>$CONFIG_STATUS <<EOF
18881ac_cs_version="\\
18882config.status
18883configured by $0, generated by GNU Autoconf 2.52.20121002,
18884  with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
18885
18886Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
18887Free Software Foundation, Inc.
18888This config.status script is free software; the Free Software Foundation
18889gives unlimited permission to copy, distribute and modify it."
18890srcdir=$srcdir
18891INSTALL="$INSTALL"
18892EOF
18893
18894cat >>$CONFIG_STATUS <<\EOF
18895# If no file are specified by the user, then we need to provide default
18896# value.  By we need to know if files were specified by the user.
18897ac_need_defaults=:
18898while test $# != 0
18899do
18900  case $1 in
18901  --*=*)
18902    ac_option=`expr "x$1" : 'x\([^=]*\)='`
18903    ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
18904    shift
18905    set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
18906    shift
18907    ;;
18908  -*);;
18909  *) # This is not an option, so the user has probably given explicit
18910     # arguments.
18911     ac_need_defaults=false;;
18912  esac
18913
18914  case $1 in
18915  # Handling of the options.
18916EOF
18917cat >>$CONFIG_STATUS <<EOF
18918  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
18919    echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
18920    exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
18921EOF
18922cat >>$CONFIG_STATUS <<\EOF
18923  --version | --vers* | -V )
18924    echo "$ac_cs_version"; exit 0 ;;
18925  --he | --h)
18926    # Conflict between --help and --header
18927    { { echo "$as_me:18927: error: ambiguous option: $1
18928Try \`$0 --help' for more information." >&5
18929echo "$as_me: error: ambiguous option: $1
18930Try \`$0 --help' for more information." >&2;}
18931   { (exit 1); exit 1; }; };;
18932  --help | --hel | -h )
18933    echo "$ac_cs_usage"; exit 0 ;;
18934  --debug | --d* | -d )
18935    debug=: ;;
18936  --file | --fil | --fi | --f )
18937    shift
18938    CONFIG_FILES="$CONFIG_FILES $1"
18939    ac_need_defaults=false;;
18940  --header | --heade | --head | --hea )
18941    shift
18942    CONFIG_HEADERS="$CONFIG_HEADERS $1"
18943    ac_need_defaults=false;;
18944
18945  # This is an error.
18946  -*) { { echo "$as_me:18946: error: unrecognized option: $1
18947Try \`$0 --help' for more information." >&5
18948echo "$as_me: error: unrecognized option: $1
18949Try \`$0 --help' for more information." >&2;}
18950   { (exit 1); exit 1; }; } ;;
18951
18952  *) ac_config_targets="$ac_config_targets $1" ;;
18953
18954  esac
18955  shift
18956done
18957
18958exec 5>>config.log
18959cat >&5 << _ACEOF
18960
18961## ----------------------- ##
18962## Running config.status.  ##
18963## ----------------------- ##
18964
18965This file was extended by $as_me 2.52.20121002, executed with
18966  CONFIG_FILES    = $CONFIG_FILES
18967  CONFIG_HEADERS  = $CONFIG_HEADERS
18968  CONFIG_LINKS    = $CONFIG_LINKS
18969  CONFIG_COMMANDS = $CONFIG_COMMANDS
18970  > $ac_cs_invocation
18971on `(hostname || uname -n) 2>/dev/null | sed 1q`
18972
18973_ACEOF
18974EOF
18975
18976cat >>$CONFIG_STATUS <<\EOF
18977for ac_config_target in $ac_config_targets
18978do
18979  case "$ac_config_target" in
18980  # Handling of arguments.
18981  "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
18982  "df-install" ) CONFIG_FILES="$CONFIG_FILES df-install" ;;
18983  "minstall" ) CONFIG_FILES="$CONFIG_FILES minstall:minstall.in" ;;
18984  "xtermcfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS xtermcfg.h:xtermcfg.hin" ;;
18985  *) { { echo "$as_me:18985: error: invalid argument: $ac_config_target" >&5
18986echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
18987   { (exit 1); exit 1; }; };;
18988  esac
18989done
18990
18991# If the user did not use the arguments to specify the items to instantiate,
18992# then the envvar interface is used.  Set only those that are not.
18993# We use the long form for the default assignment because of an extremely
18994# bizarre bug on SunOS 4.1.3.
18995if $ac_need_defaults; then
18996  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
18997  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
18998fi
18999
19000# Create a temporary directory, and hook for its removal unless debugging.
19001$debug ||
19002{
19003  trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
19004  trap '{ (exit 1); exit 1; }' 1 2 13 15
19005}
19006
19007# Create a (secure) tmp directory for tmp files.
19008: ${TMPDIR=/tmp}
19009{
19010  tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
19011  test -n "$tmp" && test -d "$tmp"
19012}  ||
19013{
19014  tmp=$TMPDIR/cs$$-$RANDOM
19015  (umask 077 && mkdir $tmp)
19016} ||
19017{
19018   echo "$me: cannot create a temporary directory in $TMPDIR" >&2
19019   { (exit 1); exit 1; }
19020}
19021
19022EOF
19023
19024cat >>$CONFIG_STATUS <<EOF
19025
19026#
19027# CONFIG_FILES section.
19028#
19029
19030# No need to generate the scripts if there are no CONFIG_FILES.
19031# This happens for instance when ./config.status config.h
19032if test -n "\$CONFIG_FILES"; then
19033  # Protect against being on the right side of a sed subst in config.status.
19034  sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
19035   s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
19036s,@SHELL@,$SHELL,;t t
19037s,@exec_prefix@,$exec_prefix,;t t
19038s,@prefix@,$prefix,;t t
19039s,@program_transform_name@,$program_transform_name,;t t
19040s,@bindir@,$bindir,;t t
19041s,@sbindir@,$sbindir,;t t
19042s,@libexecdir@,$libexecdir,;t t
19043s,@datarootdir@,$datarootdir,;t t
19044s,@datadir@,$datadir,;t t
19045s,@sysconfdir@,$sysconfdir,;t t
19046s,@sharedstatedir@,$sharedstatedir,;t t
19047s,@localstatedir@,$localstatedir,;t t
19048s,@libdir@,$libdir,;t t
19049s,@includedir@,$includedir,;t t
19050s,@oldincludedir@,$oldincludedir,;t t
19051s,@infodir@,$infodir,;t t
19052s,@mandir@,$mandir,;t t
19053s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
19054s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
19055s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
19056s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
19057s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
19058s,@build_alias@,$build_alias,;t t
19059s,@host_alias@,$host_alias,;t t
19060s,@target_alias@,$target_alias,;t t
19061s,@ECHO_C@,$ECHO_C,;t t
19062s,@ECHO_N@,$ECHO_N,;t t
19063s,@ECHO_T@,$ECHO_T,;t t
19064s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
19065s,@DEFS@,$DEFS,;t t
19066s,@LIBS@,$LIBS,;t t
19067s,@build@,$build,;t t
19068s,@build_cpu@,$build_cpu,;t t
19069s,@build_vendor@,$build_vendor,;t t
19070s,@build_os@,$build_os,;t t
19071s,@host@,$host,;t t
19072s,@host_cpu@,$host_cpu,;t t
19073s,@host_vendor@,$host_vendor,;t t
19074s,@host_os@,$host_os,;t t
19075s,@CC@,$CC,;t t
19076s,@CFLAGS@,$CFLAGS,;t t
19077s,@LDFLAGS@,$LDFLAGS,;t t
19078s,@CPPFLAGS@,$CPPFLAGS,;t t
19079s,@ac_ct_CC@,$ac_ct_CC,;t t
19080s,@EXEEXT@,$EXEEXT,;t t
19081s,@OBJEXT@,$OBJEXT,;t t
19082s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
19083s,@CPP@,$CPP,;t t
19084s,@AWK@,$AWK,;t t
19085s,@GROFF_PATH@,$GROFF_PATH,;t t
19086s,@GROFF_NOTE@,$GROFF_NOTE,;t t
19087s,@NROFF_NOTE@,$NROFF_NOTE,;t t
19088s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
19089s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
19090s,@INSTALL_DATA@,$INSTALL_DATA,;t t
19091s,@LN_S@,$LN_S,;t t
19092s,@LINT@,$LINT,;t t
19093s,@APP_CLASS@,$APP_CLASS,;t t
19094s,@APPSDIR@,$APPSDIR,;t t
19095s,@no_appsdir@,$no_appsdir,;t t
19096s,@ICON_NAME@,$ICON_NAME,;t t
19097s,@ICON_SYMLINK@,$ICON_SYMLINK,;t t
19098s,@PIXMAPDIR@,$PIXMAPDIR,;t t
19099s,@no_pixmapdir@,$no_pixmapdir,;t t
19100s,@ICONDIR@,$ICONDIR,;t t
19101s,@no_icondir@,$no_icondir,;t t
19102s,@ICON_FORMAT@,$ICON_FORMAT,;t t
19103s,@ICON_THEME@,$ICON_THEME,;t t
19104s,@ICON_LIST@,$ICON_LIST,;t t
19105s,@desktop_utils@,$desktop_utils,;t t
19106s,@DESKTOP_FLAGS@,$DESKTOP_FLAGS,;t t
19107s,@DESKTOP_CATEGORY@,$DESKTOP_CATEGORY,;t t
19108s,@XTERM_PATH@,$XTERM_PATH,;t t
19109s,@XTERM_SYMLINK@,$XTERM_SYMLINK,;t t
19110s,@SINSTALL_OPTS@,$SINSTALL_OPTS,;t t
19111s,@X_CFLAGS@,$X_CFLAGS,;t t
19112s,@X_PRE_LIBS@,$X_PRE_LIBS,;t t
19113s,@X_LIBS@,$X_LIBS,;t t
19114s,@X_EXTRA_LIBS@,$X_EXTRA_LIBS,;t t
19115s,@PKG_CONFIG@,$PKG_CONFIG,;t t
19116s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
19117s,@ICON_SUFFIX@,$ICON_SUFFIX,;t t
19118s,@IMAKE@,$IMAKE,;t t
19119s,@IMAKE_CFLAGS@,$IMAKE_CFLAGS,;t t
19120s,@IMAKE_LOADFLAGS@,$IMAKE_LOADFLAGS,;t t
19121s,@default_termid@,$default_termid,;t t
19122s,@default_TERM@,$default_TERM,;t t
19123s,@backarrow_is_bs@,$backarrow_is_bs,;t t
19124s,@backarrow_is_erase@,$backarrow_is_erase,;t t
19125s,@delete_is_del@,$delete_is_del,;t t
19126s,@alt_sends_esc@,$alt_sends_esc,;t t
19127s,@meta_sends_esc@,$meta_sends_esc,;t t
19128s,@cf_tic_prog@,$cf_tic_prog,;t t
19129s,@no_ticprog@,$no_ticprog,;t t
19130s,@TERMINFO_DIR@,$TERMINFO_DIR,;t t
19131s,@SET_TERMINFO@,$SET_TERMINFO,;t t
19132s,@FREETYPE_CONFIG@,$FREETYPE_CONFIG,;t t
19133s,@FREETYPE_OLD_CONFIG@,$FREETYPE_OLD_CONFIG,;t t
19134s,@FREETYPE_XFT_CONFIG@,$FREETYPE_XFT_CONFIG,;t t
19135s,@HAVE_TYPE_FCCHAR32@,$HAVE_TYPE_FCCHAR32,;t t
19136s,@HAVE_TYPE_XFTCHARSPEC@,$HAVE_TYPE_XFTCHARSPEC,;t t
19137s,@LUIT@,$LUIT,;t t
19138s,@ECHO_LT@,$ECHO_LT,;t t
19139s,@ECHO_LD@,$ECHO_LD,;t t
19140s,@RULE_CC@,$RULE_CC,;t t
19141s,@SHOW_CC@,$SHOW_CC,;t t
19142s,@ECHO_CC@,$ECHO_CC,;t t
19143s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
19144s,@CHARPROC_DEPS@,$CHARPROC_DEPS,;t t
19145s,@EXTRAHDRS@,$EXTRAHDRS,;t t
19146s,@EXTRASRCS@,$EXTRASRCS,;t t
19147s,@EXTRAOBJS@,$EXTRAOBJS,;t t
19148s,@MAY_SETUID@,$MAY_SETUID,;t t
19149s,@NOT_SETUID@,$NOT_SETUID,;t t
19150s,@CTAGS@,$CTAGS,;t t
19151s,@ETAGS@,$ETAGS,;t t
19152s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
19153s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
19154s,@cf_ldd_prog@,$cf_ldd_prog,;t t
19155s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
19156CEOF
19157
19158EOF
19159
19160  cat >>$CONFIG_STATUS <<\EOF
19161  # Split the substitutions into bite-sized pieces for seds with
19162  # small command number limits, like on Digital OSF/1 and HP-UX.
19163  ac_max_sed_lines=48
19164  ac_sed_frag=1 # Number of current file.
19165  ac_beg=1 # First line for current file.
19166  ac_end=$ac_max_sed_lines # Line after last line for current file.
19167  ac_more_lines=:
19168  ac_sed_cmds=
19169  while $ac_more_lines; do
19170    if test $ac_beg -gt 1; then
19171      sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
19172    else
19173      sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
19174    fi
19175    if test ! -s $tmp/subs.frag; then
19176      ac_more_lines=false
19177    else
19178      # The purpose of the label and of the branching condition is to
19179      # speed up the sed processing (if there are no `@' at all, there
19180      # is no need to browse any of the substitutions).
19181      # These are the two extra sed commands mentioned above.
19182      (echo ':t
19183  /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
19184      if test -z "$ac_sed_cmds"; then
19185  	ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
19186      else
19187  	ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
19188      fi
19189      ac_sed_frag=`expr $ac_sed_frag + 1`
19190      ac_beg=$ac_end
19191      ac_end=`expr $ac_end + $ac_max_sed_lines`
19192    fi
19193  done
19194  if test -z "$ac_sed_cmds"; then
19195    ac_sed_cmds=cat
19196  fi
19197fi # test -n "$CONFIG_FILES"
19198
19199EOF
19200cat >>$CONFIG_STATUS <<\EOF
19201for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
19202  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
19203  case $ac_file in
19204  - | *:- | *:-:* ) # input from stdin
19205        cat >$tmp/stdin
19206        ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19207        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19208  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19209        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19210  * )   ac_file_in=$ac_file.in ;;
19211  esac
19212
19213  # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
19214  ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19215         X"$ac_file" : 'X\(//\)[^/]' \| \
19216         X"$ac_file" : 'X\(//\)$' \| \
19217         X"$ac_file" : 'X\(/\)' \| \
19218         .     : '\(.\)' 2>/dev/null ||
19219echo X"$ac_file" |
19220    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19221  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19222  	  /^X\(\/\/\)$/{ s//\1/; q; }
19223  	  /^X\(\/\).*/{ s//\1/; q; }
19224  	  s/.*/./; q'`
19225  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
19226    { case "$ac_dir" in
19227  [\\/]* | ?:[\\/]* ) as_incr_dir=;;
19228  *)                      as_incr_dir=.;;
19229esac
19230as_dummy="$ac_dir"
19231for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
19232  case $as_mkdir_dir in
19233    # Skip DOS drivespec
19234    ?:) as_incr_dir=$as_mkdir_dir ;;
19235    *)
19236      as_incr_dir=$as_incr_dir/$as_mkdir_dir
19237      test -d "$as_incr_dir" || mkdir "$as_incr_dir"
19238    ;;
19239  esac
19240done; }
19241
19242    ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
19243    # A "../" for each directory in $ac_dir_suffix.
19244    ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
19245  else
19246    ac_dir_suffix= ac_dots=
19247  fi
19248
19249  case $srcdir in
19250  .)  ac_srcdir=.
19251      if test -z "$ac_dots"; then
19252         ac_top_srcdir=.
19253      else
19254         ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
19255      fi ;;
19256  [\\/]* | ?:[\\/]* )
19257      ac_srcdir=$srcdir$ac_dir_suffix;
19258      ac_top_srcdir=$srcdir ;;
19259  *) # Relative path.
19260    ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
19261    ac_top_srcdir=$ac_dots$srcdir ;;
19262  esac
19263
19264  case $INSTALL in
19265  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
19266  *) ac_INSTALL=$ac_dots$INSTALL ;;
19267  esac
19268
19269  if test x"$ac_file" != x-; then
19270    { echo "$as_me:19270: creating $ac_file" >&5
19271echo "$as_me: creating $ac_file" >&6;}
19272    rm -f "$ac_file"
19273  fi
19274  # Let's still pretend it is `configure' which instantiates (i.e., don't
19275  # use $as_me), people would be surprised to read:
19276  #    /* config.h.  Generated automatically by config.status.  */
19277  configure_input="Generated automatically from `echo $ac_file_in |
19278                                                 sed 's,.*/,,'` by configure."
19279
19280  # First look for the input files in the build tree, otherwise in the
19281  # src tree.
19282  ac_file_inputs=`IFS=:
19283    for f in $ac_file_in; do
19284      case $f in
19285      -) echo $tmp/stdin ;;
19286      [\\/$]*)
19287         # Absolute (can't be DOS-style, as IFS=:)
19288         test -f "$f" || { { echo "$as_me:19288: error: cannot find input file: $f" >&5
19289echo "$as_me: error: cannot find input file: $f" >&2;}
19290   { (exit 1); exit 1; }; }
19291         echo $f;;
19292      *) # Relative
19293         if test -f "$f"; then
19294           # Build tree
19295           echo $f
19296         elif test -f "$srcdir/$f"; then
19297           # Source tree
19298           echo $srcdir/$f
19299         else
19300           # /dev/null tree
19301           { { echo "$as_me:19301: error: cannot find input file: $f" >&5
19302echo "$as_me: error: cannot find input file: $f" >&2;}
19303   { (exit 1); exit 1; }; }
19304         fi;;
19305      esac
19306    done` || { (exit 1); exit 1; }
19307EOF
19308cat >>$CONFIG_STATUS <<\EOF
19309  ac_warn_datarootdir=no
19310  if test x"$ac_file" != x-; then
19311    for ac_item in $ac_file_inputs
19312    do
19313      ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' $ac_item`
19314      if test -n "$ac_seen"; then
19315        ac_used=`grep '@datarootdir@' $ac_item`
19316        if test -z "$ac_used"; then
19317          { echo "$as_me:19317: WARNING: datarootdir was used implicitly but not set:
19318$ac_seen" >&5
19319echo "$as_me: WARNING: datarootdir was used implicitly but not set:
19320$ac_seen" >&2;}
19321          ac_warn_datarootdir=yes
19322        fi
19323      fi
19324      ac_seen=`grep '${datarootdir}' $ac_item`
19325      if test -n "$ac_seen"; then
19326        { echo "$as_me:19326: WARNING: datarootdir was used explicitly but not set:
19327$ac_seen" >&5
19328echo "$as_me: WARNING: datarootdir was used explicitly but not set:
19329$ac_seen" >&2;}
19330        ac_warn_datarootdir=yes
19331      fi
19332    done
19333  fi
19334
19335if test "x$ac_warn_datarootdir" = xyes; then
19336  ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
19337fi
19338
19339EOF
19340cat >>$CONFIG_STATUS <<EOF
19341  sed "$ac_vpsub
19342$extrasub
19343EOF
19344cat >>$CONFIG_STATUS <<\EOF
19345:t
19346/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
19347s,@configure_input@,$configure_input,;t t
19348s,@srcdir@,$ac_srcdir,;t t
19349s,@top_srcdir@,$ac_top_srcdir,;t t
19350s,@INSTALL@,$ac_INSTALL,;t t
19351" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
19352  rm -f $tmp/stdin
19353  if test x"$ac_file" != x-; then
19354    cp $tmp/out $ac_file
19355
19356    for ac_name in prefix exec_prefix datarootdir
19357    do
19358        ac_seen=`fgrep -n '${'$ac_name'[:=].*}' $ac_file`
19359        if test -n "$ac_seen"; then
19360            ac_init=`egrep '[ 	]*'$ac_name'[ 	]*=' $ac_file`
19361            if test -z "$ac_init"; then
19362              ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
19363              { echo "$as_me:19363: WARNING: Variable $ac_name is used but was not set:
19364$ac_seen" >&5
19365echo "$as_me: WARNING: Variable $ac_name is used but was not set:
19366$ac_seen" >&2;}
19367            fi
19368        fi
19369    done
19370    egrep -n '@[a-z_][a-z_0-9]+@' $ac_file >$tmp/out
19371    egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
19372    if test -s $tmp/out; then
19373      ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
19374      { echo "$as_me:19374: WARNING: Some variables may not be substituted:
19375$ac_seen" >&5
19376echo "$as_me: WARNING: Some variables may not be substituted:
19377$ac_seen" >&2;}
19378    fi
19379  else
19380    cat $tmp/out
19381  fi
19382  rm -f $tmp/out
19383
19384done
19385EOF
19386cat >>$CONFIG_STATUS <<\EOF
19387
19388#
19389# CONFIG_HEADER section.
19390#
19391
19392# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
19393# NAME is the cpp macro being defined and VALUE is the value it is being given.
19394#
19395# ac_d sets the value in "#define NAME VALUE" lines.
19396ac_dA='s,^\([ 	]*\)#\([ 	]*define[ 	][ 	]*\)'
19397ac_dB='[ 	].*$,\1#\2'
19398ac_dC=' '
19399ac_dD=',;t'
19400# ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
19401ac_iA='s,^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
19402ac_iB='\([ 	]\),\1#\2define\3'
19403ac_iC=' '
19404ac_iD='\4,;t'
19405# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
19406ac_uA='s,^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
19407ac_uB='$,\1#\2define\3'
19408ac_uC=' '
19409ac_uD=',;t'
19410
19411for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
19412  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
19413  case $ac_file in
19414  - | *:- | *:-:* ) # input from stdin
19415        cat >$tmp/stdin
19416        ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19417        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19418  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19419        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19420  * )   ac_file_in=$ac_file.in ;;
19421  esac
19422
19423  test x"$ac_file" != x- && { echo "$as_me:19423: creating $ac_file" >&5
19424echo "$as_me: creating $ac_file" >&6;}
19425
19426  # First look for the input files in the build tree, otherwise in the
19427  # src tree.
19428  ac_file_inputs=`IFS=:
19429    for f in $ac_file_in; do
19430      case $f in
19431      -) echo $tmp/stdin ;;
19432      [\\/$]*)
19433         # Absolute (can't be DOS-style, as IFS=:)
19434         test -f "$f" || { { echo "$as_me:19434: error: cannot find input file: $f" >&5
19435echo "$as_me: error: cannot find input file: $f" >&2;}
19436   { (exit 1); exit 1; }; }
19437         echo $f;;
19438      *) # Relative
19439         if test -f "$f"; then
19440           # Build tree
19441           echo $f
19442         elif test -f "$srcdir/$f"; then
19443           # Source tree
19444           echo $srcdir/$f
19445         else
19446           # /dev/null tree
19447           { { echo "$as_me:19447: error: cannot find input file: $f" >&5
19448echo "$as_me: error: cannot find input file: $f" >&2;}
19449   { (exit 1); exit 1; }; }
19450         fi;;
19451      esac
19452    done` || { (exit 1); exit 1; }
19453  # Remove the trailing spaces.
19454  sed 's/[ 	]*$//' $ac_file_inputs >$tmp/in
19455
19456EOF
19457
19458# Transform confdefs.h into two sed scripts, `conftest.defines' and
19459# `conftest.undefs', that substitutes the proper values into
19460# config.h.in to produce config.h.  The first handles `#define'
19461# templates, and the second `#undef' templates.
19462# And first: Protect against being on the right side of a sed subst in
19463# config.status.  Protect against being in an unquoted here document
19464# in config.status.
19465rm -f conftest.defines conftest.undefs
19466# Using a here document instead of a string reduces the quoting nightmare.
19467# Putting comments in sed scripts is not portable.
19468#
19469# `end' is used to avoid that the second main sed command (meant for
19470# 0-ary CPP macros) applies to n-ary macro definitions.
19471# See the Autoconf documentation for `clear'.
19472cat >confdef2sed.sed <<\EOF
19473s/[\\&,]/\\&/g
19474s,[\\$`],\\&,g
19475t clear
19476: clear
19477s,^[ 	]*#[ 	]*define[ 	][ 	]*\(\([^ 	(][^ 	(]*\)([^)]*)\)[ 	]*\(.*\)$,${ac_dA}\2${ac_dB}\1${ac_dC}\3${ac_dD},gp
19478t end
19479s,^[ 	]*#[ 	]*define[ 	][ 	]*\([^ 	][^ 	]*\)[ 	]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
19480: end
19481EOF
19482# If some macros were called several times there might be several times
19483# the same #defines, which is useless.  Nevertheless, we may not want to
19484# sort them, since we want the *last* AC-DEFINE to be honored.
19485uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
19486sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
19487sed 's/ac_d/ac_i/g' conftest.defines >>conftest.undefs
19488rm -f confdef2sed.sed
19489
19490# This sed command replaces #undef with comments.  This is necessary, for
19491# example, in the case of _POSIX_SOURCE, which is predefined and required
19492# on some systems where configure will not decide to define it.
19493cat >>conftest.undefs <<\EOF
19494s,^[ 	]*#[ 	]*undef[ 	][ 	]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
19495EOF
19496
19497# Break up conftest.defines because some shells have a limit on the size
19498# of here documents, and old seds have small limits too (100 cmds).
19499echo '  # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
19500echo '  if egrep "^[ 	]*#[ 	]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
19501echo '  # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
19502echo '  :' >>$CONFIG_STATUS
19503rm -f conftest.tail
19504while grep . conftest.defines >/dev/null
19505do
19506  # Write a limited-size here document to $tmp/defines.sed.
19507  echo '  cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
19508  # Speed up: don't consider the non `#define' lines.
19509  echo '/^[ 	]*#[ 	]*define/!b' >>$CONFIG_STATUS
19510  # Work around the forget-to-reset-the-flag bug.
19511  echo 't clr' >>$CONFIG_STATUS
19512  echo ': clr' >>$CONFIG_STATUS
19513  sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
19514  echo 'CEOF
19515  sed -f $tmp/defines.sed $tmp/in >$tmp/out
19516  rm -f $tmp/in
19517  mv $tmp/out $tmp/in
19518' >>$CONFIG_STATUS
19519  sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
19520  rm -f conftest.defines
19521  mv conftest.tail conftest.defines
19522done
19523rm -f conftest.defines
19524echo '  fi # egrep' >>$CONFIG_STATUS
19525echo >>$CONFIG_STATUS
19526
19527# Break up conftest.undefs because some shells have a limit on the size
19528# of here documents, and old seds have small limits too (100 cmds).
19529echo '  # Handle all the #undef templates' >>$CONFIG_STATUS
19530rm -f conftest.tail
19531while grep . conftest.undefs >/dev/null
19532do
19533  # Write a limited-size here document to $tmp/undefs.sed.
19534  echo '  cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
19535  # Speed up: don't consider the non `#undef'
19536  echo '/^[ 	]*#[ 	]*undef/!b' >>$CONFIG_STATUS
19537  # Work around the forget-to-reset-the-flag bug.
19538  echo 't clr' >>$CONFIG_STATUS
19539  echo ': clr' >>$CONFIG_STATUS
19540  sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
19541  echo 'CEOF
19542  sed -f $tmp/undefs.sed $tmp/in >$tmp/out
19543  rm -f $tmp/in
19544  mv $tmp/out $tmp/in
19545' >>$CONFIG_STATUS
19546  sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
19547  rm -f conftest.undefs
19548  mv conftest.tail conftest.undefs
19549done
19550rm -f conftest.undefs
19551
19552cat >>$CONFIG_STATUS <<\EOF
19553  # Let's still pretend it is `configure' which instantiates (i.e., don't
19554  # use $as_me), people would be surprised to read:
19555  #    /* config.h.  Generated automatically by config.status.  */
19556  if test x"$ac_file" = x-; then
19557    echo "/* Generated automatically by configure.  */" >$tmp/config.h
19558  else
19559    echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
19560  fi
19561  cat $tmp/in >>$tmp/config.h
19562  rm -f $tmp/in
19563  if test x"$ac_file" != x-; then
19564    if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
19565      { echo "$as_me:19565: $ac_file is unchanged" >&5
19566echo "$as_me: $ac_file is unchanged" >&6;}
19567    else
19568      ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19569         X"$ac_file" : 'X\(//\)[^/]' \| \
19570         X"$ac_file" : 'X\(//\)$' \| \
19571         X"$ac_file" : 'X\(/\)' \| \
19572         .     : '\(.\)' 2>/dev/null ||
19573echo X"$ac_file" |
19574    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19575  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19576  	  /^X\(\/\/\)$/{ s//\1/; q; }
19577  	  /^X\(\/\).*/{ s//\1/; q; }
19578  	  s/.*/./; q'`
19579      if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
19580        { case "$ac_dir" in
19581  [\\/]* | ?:[\\/]* ) as_incr_dir=;;
19582  *)                      as_incr_dir=.;;
19583esac
19584as_dummy="$ac_dir"
19585for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
19586  case $as_mkdir_dir in
19587    # Skip DOS drivespec
19588    ?:) as_incr_dir=$as_mkdir_dir ;;
19589    *)
19590      as_incr_dir=$as_incr_dir/$as_mkdir_dir
19591      test -d "$as_incr_dir" || mkdir "$as_incr_dir"
19592    ;;
19593  esac
19594done; }
19595
19596      fi
19597      rm -f $ac_file
19598      mv $tmp/config.h $ac_file
19599    fi
19600  else
19601    cat $tmp/config.h
19602    rm -f $tmp/config.h
19603  fi
19604done
19605EOF
19606
19607cat >>$CONFIG_STATUS <<\EOF
19608
19609{ (exit 0); exit 0; }
19610EOF
19611chmod +x $CONFIG_STATUS
19612ac_clean_files=$ac_clean_files_save
19613
19614# configure is writing to config.log, and then calls config.status.
19615# config.status does its own redirection, appending to config.log.
19616# Unfortunately, on DOS this fails, as config.log is still kept open
19617# by configure, so config.status won't be able to write to it; its
19618# output is simply discarded.  So we exec the FD to /dev/null,
19619# effectively closing config.log, so it can be properly (re)opened and
19620# appended to by config.status.  When coming back to configure, we
19621# need to make the FD available again.
19622if test "$no_create" != yes; then
19623  ac_cs_success=:
19624  exec 5>/dev/null
19625  $SHELL $CONFIG_STATUS || ac_cs_success=false
19626  exec 5>>config.log
19627  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
19628  # would make configure fail if this is the last instruction.
19629  $ac_cs_success || { (exit 1); exit 1; }
19630fi
19631
19632