configure revision ad37e533
1#! /bin/sh
2# Guess values for system-dependent variables and create Makefiles.
3# Generated by Autoconf 2.52.20210105.
4#
5# Copyright 2003-2020,2021	Thomas E. Dickey
6# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
7# Free Software Foundation, Inc.
8# This configure script is free software; the Free Software Foundation
9# gives unlimited permission to copy, distribute and modify it.
10
11# Avoid depending upon Character Ranges.
12as_cr_letters='abcdefghijklmnopqrstuvwxyz'
13as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15as_cr_digits='0123456789'
16as_cr_alnum=$as_cr_Letters$as_cr_digits
17
18# Sed expression to map a string onto a valid variable name.
19as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
20
21# Sed expression to map a string onto a valid CPP name.
22as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
23
24# Be Bourne compatible
25if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
26  emulate sh
27  NULLCMD=:
28elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
29  set -o posix
30fi
31
32# Name of the executable.
33as_me=`echo "$0" |sed 's,.*[\\/],,'`
34
35if expr a : '\(a\)' >/dev/null 2>&1; then
36  as_expr=expr
37else
38  as_expr=false
39fi
40
41rm -f conf$$ conf$$.exe conf$$.file
42echo >conf$$.file
43if ln -s conf$$.file conf$$ 2>/dev/null; then
44  # We could just check for DJGPP; but this test a) works b) is more generic
45  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
46  if test -f conf$$.exe; then
47    # Don't use ln at all; we don't have any links
48    as_ln_s='cp -p'
49  else
50    as_ln_s='ln -s'
51  fi
52elif ln conf$$.file conf$$ 2>/dev/null; then
53  as_ln_s=ln
54else
55  as_ln_s='cp -p'
56fi
57rm -f conf$$ conf$$.exe conf$$.file
58
59as_executable_p="test -f"
60
61# Support unset when possible.
62if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
63  as_unset="unset"
64else
65  as_unset="false"
66fi
67
68# NLS nuisances.
69$as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
70$as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
71$as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
72$as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
73$as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
74$as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
75$as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
76$as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
77
78# IFS
79# We need space, tab and new line, in precisely that order.
80as_nl='
81'
82IFS=" 	$as_nl"
83
84# CDPATH.
85$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
86
87# Name of the host.
88# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
89# so uname gets run too.
90ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
91
92exec 6>&1
93
94#
95# Initializations.
96#
97ac_default_prefix=/usr/local
98cross_compiling=no
99subdirs=
100MFLAGS=
101MAKEFLAGS=
102SHELL=${CONFIG_SHELL-/bin/sh}
103
104# Maximum number of lines to put in a shell here document.
105# This variable seems obsolete.  It should probably be removed, and
106# only ac_max_sed_lines should be used.
107: "${ac_max_here_lines=38}"
108
109ac_unique_file="charproc.c"
110# Factoring default headers for most tests.
111ac_includes_default="\
112#include <stdio.h>
113#if HAVE_SYS_TYPES_H
114# include <sys/types.h>
115#endif
116#if HAVE_SYS_STAT_H
117# include <sys/stat.h>
118#endif
119#if STDC_HEADERS
120# include <stdlib.h>
121# include <stddef.h>
122#else
123# if HAVE_STDLIB_H
124#  include <stdlib.h>
125# endif
126#endif
127#if HAVE_STRING_H
128# if !STDC_HEADERS && HAVE_MEMORY_H
129#  include <memory.h>
130# endif
131# include <string.h>
132#endif
133#if HAVE_STRINGS_H
134# include <strings.h>
135#endif
136#if HAVE_INTTYPES_H
137# include <inttypes.h>
138#else
139# if HAVE_STDINT_H
140#  include <stdint.h>
141# endif
142#endif
143#if HAVE_UNISTD_H
144# include <unistd.h>
145#endif"
146
147# Initialize some variables set by options.
148ac_init_help=
149ac_init_version=false
150# The variables have the same names as the options, with
151# dashes changed to underlines.
152cache_file=/dev/null
153exec_prefix=NONE
154no_create=
155no_recursion=
156prefix=NONE
157program_prefix=NONE
158program_suffix=NONE
159program_transform_name=s,x,x,
160silent=
161site=
162srcdir=
163verbose=
164x_includes=NONE
165x_libraries=NONE
166
167# Installation directory options.
168# These are left unexpanded so users can "make install exec_prefix=/foo"
169# and all the variables that are supposed to be based on exec_prefix
170# by default will actually change.
171# Use braces instead of parens because sh, perl, etc. also accept them.
172bindir='${exec_prefix}/bin'
173sbindir='${exec_prefix}/sbin'
174libexecdir='${exec_prefix}/libexec'
175datarootdir='${prefix}/share'
176datadir='${datarootdir}'
177sysconfdir='${prefix}/etc'
178sharedstatedir='${prefix}/com'
179localstatedir='${prefix}/var'
180runstatedir='${localstatedir}/run'
181libdir='${exec_prefix}/lib'
182includedir='${prefix}/include'
183oldincludedir='/usr/include'
184infodir='${datarootdir}/info'
185mandir='${datarootdir}/man'
186
187# Identity of this package.
188PACKAGE_NAME=
189PACKAGE_TARNAME=
190PACKAGE_VERSION=
191PACKAGE_STRING=
192PACKAGE_BUGREPORT=
193
194ac_prev=
195for ac_option
196do
197  # If the previous option needs an argument, assign it.
198  if test -n "$ac_prev"; then
199    eval "$ac_prev=\$ac_option"
200    ac_prev=
201    continue
202  fi
203
204  ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
205
206  # Accept the important Cygnus configure options, so we can diagnose typos.
207
208  case "$ac_option" in
209
210  -bindir | --bindir | --bindi | --bind | --bin | --bi)
211    ac_prev=bindir ;;
212  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
213    bindir=$ac_optarg ;;
214
215  -build | --build | --buil | --bui | --bu)
216    ac_prev=build_alias ;;
217  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
218    build_alias=$ac_optarg ;;
219
220  -cache-file | --cache-file | --cache-fil | --cache-fi \
221  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
222    ac_prev=cache_file ;;
223  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
224  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
225    cache_file=$ac_optarg ;;
226
227  --config-cache | -C)
228    cache_file=config.cache ;;
229
230  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
231    ac_prev=datadir ;;
232  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
233  | --da=*)
234    datadir=$ac_optarg ;;
235
236  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
237  | --dataroo | --dataro | --datar)
238    ac_prev=datarootdir ;;
239  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
240  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
241    datarootdir=$ac_optarg ;;
242
243  -disable-* | --disable-*)
244    ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
245    # Reject names that are not valid shell variable names.
246    expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
247      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
248   { (exit 1); exit 1; }; }
249    ac_feature=`echo "$ac_feature" | sed 's/-/_/g'`
250    eval "enable_$ac_feature=no" ;;
251
252  -enable-* | --enable-*)
253    ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
254    # Reject names that are not valid shell variable names.
255    expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
256      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
257   { (exit 1); exit 1; }; }
258    ac_feature=`echo "$ac_feature" | sed 's/-/_/g'`
259    case "$ac_option" in
260      *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
261      *) ac_optarg=yes ;;
262    esac
263    eval "enable_$ac_feature='$ac_optarg'" ;;
264
265  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
266  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
267  | --exec | --exe | --ex)
268    ac_prev=exec_prefix ;;
269  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
270  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
271  | --exec=* | --exe=* | --ex=*)
272    exec_prefix=$ac_optarg ;;
273
274  -gas | --gas | --ga | --g)
275    # Obsolete; use --with-gas.
276    with_gas=yes ;;
277
278  -help | --help | --hel | --he | -h)
279    ac_init_help=long ;;
280  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
281    ac_init_help=recursive ;;
282  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
283    ac_init_help=short ;;
284
285  -host | --host | --hos | --ho)
286    ac_prev=host_alias ;;
287  -host=* | --host=* | --hos=* | --ho=*)
288    host_alias=$ac_optarg ;;
289
290  -includedir | --includedir | --includedi | --included | --include \
291  | --includ | --inclu | --incl | --inc)
292    ac_prev=includedir ;;
293  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
294  | --includ=* | --inclu=* | --incl=* | --inc=*)
295    includedir=$ac_optarg ;;
296
297  -infodir | --infodir | --infodi | --infod | --info | --inf)
298    ac_prev=infodir ;;
299  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
300    infodir=$ac_optarg ;;
301
302  -libdir | --libdir | --libdi | --libd)
303    ac_prev=libdir ;;
304  -libdir=* | --libdir=* | --libdi=* | --libd=*)
305    libdir=$ac_optarg ;;
306
307  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
308  | --libexe | --libex | --libe)
309    ac_prev=libexecdir ;;
310  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
311  | --libexe=* | --libex=* | --libe=*)
312    libexecdir=$ac_optarg ;;
313
314  -localstatedir | --localstatedir | --localstatedi | --localstated \
315  | --localstate | --localstat | --localsta | --localst \
316  | --locals | --local | --loca | --loc | --lo)
317    ac_prev=localstatedir ;;
318  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
319  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
320  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
321    localstatedir=$ac_optarg ;;
322
323  -runstatedir | --runstatedir | --runstatedi | --runstated \
324  | --runstate | --runstat | --runsta | --runst \
325  | --runs | --run | --ru)
326    ac_prev=runstatedir ;;
327  -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
328  | --runstate=* | --runstat=* | --runsta=* | --runst=* \
329  | --runs=* | --run=* | --ru=*)
330    runstatedir=$ac_optarg ;;
331
332  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
333    ac_prev=mandir ;;
334  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
335    mandir=$ac_optarg ;;
336
337  -nfp | --nfp | --nf)
338    # Obsolete; use --without-fp.
339    with_fp=no ;;
340
341  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
342  | --no-cr | --no-c)
343    no_create=yes ;;
344
345  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
346  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
347    no_recursion=yes ;;
348
349  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
350  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
351  | --oldin | --oldi | --old | --ol | --o)
352    ac_prev=oldincludedir ;;
353  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
354  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
355  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
356    oldincludedir=$ac_optarg ;;
357
358  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
359    ac_prev=prefix ;;
360  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
361    prefix=$ac_optarg ;;
362
363  -program-prefix | --program-prefix | --program-prefi | --program-pref \
364  | --program-pre | --program-pr | --program-p)
365    ac_prev=program_prefix ;;
366  -program-prefix=* | --program-prefix=* | --program-prefi=* \
367  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
368    program_prefix=$ac_optarg ;;
369
370  -program-suffix | --program-suffix | --program-suffi | --program-suff \
371  | --program-suf | --program-su | --program-s)
372    ac_prev=program_suffix ;;
373  -program-suffix=* | --program-suffix=* | --program-suffi=* \
374  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
375    program_suffix=$ac_optarg ;;
376
377  -program-transform-name | --program-transform-name \
378  | --program-transform-nam | --program-transform-na \
379  | --program-transform-n | --program-transform- \
380  | --program-transform | --program-transfor \
381  | --program-transfo | --program-transf \
382  | --program-trans | --program-tran \
383  | --progr-tra | --program-tr | --program-t)
384    ac_prev=program_transform_name ;;
385  -program-transform-name=* | --program-transform-name=* \
386  | --program-transform-nam=* | --program-transform-na=* \
387  | --program-transform-n=* | --program-transform-=* \
388  | --program-transform=* | --program-transfor=* \
389  | --program-transfo=* | --program-transf=* \
390  | --program-trans=* | --program-tran=* \
391  | --progr-tra=* | --program-tr=* | --program-t=*)
392    program_transform_name=$ac_optarg ;;
393
394  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
395  | -silent | --silent | --silen | --sile | --sil)
396    silent=yes ;;
397
398  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
399    ac_prev=sbindir ;;
400  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
401  | --sbi=* | --sb=*)
402    sbindir=$ac_optarg ;;
403
404  -sharedstatedir | --sharedstatedir | --sharedstatedi \
405  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
406  | --sharedst | --shareds | --shared | --share | --shar \
407  | --sha | --sh)
408    ac_prev=sharedstatedir ;;
409  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
410  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
411  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
412  | --sha=* | --sh=*)
413    sharedstatedir=$ac_optarg ;;
414
415  -site | --site | --sit)
416    ac_prev=site ;;
417  -site=* | --site=* | --sit=*)
418    site=$ac_optarg ;;
419
420  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
421    ac_prev=srcdir ;;
422  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
423    srcdir=$ac_optarg ;;
424
425  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
426  | --syscon | --sysco | --sysc | --sys | --sy)
427    ac_prev=sysconfdir ;;
428  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
429  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
430    sysconfdir=$ac_optarg ;;
431
432  -target | --target | --targe | --targ | --tar | --ta | --t)
433    ac_prev=target_alias ;;
434  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
435    target_alias=$ac_optarg ;;
436
437  -v | -verbose | --verbose | --verbos | --verbo | --verb)
438    verbose=yes ;;
439
440  -version | --version | --versio | --versi | --vers | -V)
441    ac_init_version=: ;;
442
443  -with-* | --with-*)
444    ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
445    # Reject names that are not valid shell variable names.
446    expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
447      { echo "$as_me: error: invalid package name: $ac_package" >&2
448   { (exit 1); exit 1; }; }
449    ac_package=`echo "$ac_package" | sed 's/-/_/g'`
450    case "$ac_option" in
451      *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
452      *) ac_optarg=yes ;;
453    esac
454    eval "with_$ac_package='$ac_optarg'" ;;
455
456  -without-* | --without-*)
457    ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
458    # Reject names that are not valid shell variable names.
459    expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
460      { echo "$as_me: error: invalid package name: $ac_package" >&2
461   { (exit 1); exit 1; }; }
462    ac_package=`echo "$ac_package" | sed 's/-/_/g'`
463    eval "with_$ac_package=no" ;;
464
465  --x)
466    # Obsolete; use --with-x.
467    with_x=yes ;;
468
469  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
470  | --x-incl | --x-inc | --x-in | --x-i)
471    ac_prev=x_includes ;;
472  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
473  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
474    x_includes=$ac_optarg ;;
475
476  -x-libraries | --x-libraries | --x-librarie | --x-librari \
477  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
478    ac_prev=x_libraries ;;
479  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
480  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
481    x_libraries=$ac_optarg ;;
482
483  -*) { echo "$as_me: error: unrecognized option: $ac_option
484Try \`$0 --help' for more information." >&2
485   { (exit 1); exit 1; }; }
486    ;;
487
488  *=*)
489    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
490    # Reject names that are not valid shell variable names.
491    expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
492      { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
493   { (exit 1); exit 1; }; }
494    ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
495    eval "$ac_envvar='$ac_optarg'"
496    export "$ac_envvar" ;;
497
498  *)
499    # FIXME: should be removed in autoconf 3.0.
500    echo "$as_me: WARNING: you should use --build, --host, --target" >&2
501    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
502      echo "$as_me: WARNING: invalid host type: $ac_option" >&2
503    : "${build_alias=$ac_option}" "${host_alias=$ac_option}" "${target_alias=$ac_option}"
504    ;;
505
506  esac
507done
508
509if test -n "$ac_prev"; then
510  ac_option=--`echo "$ac_prev" | sed 's/_/-/g'`
511  { echo "$as_me: error: missing argument to $ac_option" >&2
512   { (exit 1); exit 1; }; }
513fi
514
515# Be sure to have absolute paths.
516for ac_var in exec_prefix prefix
517do
518  eval ac_val=$`echo "$ac_var"`
519  case "$ac_val" in
520    [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
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# Be sure to have absolute paths.
527for ac_var in bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir \
528              localstatedir libdir includedir oldincludedir infodir mandir
529do
530  eval ac_val=$`echo "$ac_var"`
531  case "$ac_val" in
532    [\\/$]* | ?:[\\/]* ) ;;
533    *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
534   { (exit 1); exit 1; }; };;
535  esac
536done
537
538# There might be people who depend on the old broken behavior: `$host'
539# used to hold the argument of --host etc.
540build=$build_alias
541host=$host_alias
542target=$target_alias
543
544# FIXME: should be removed in autoconf 3.0.
545if test "x$host_alias" != x; then
546  if test "x$build_alias" = x; then
547    cross_compiling=maybe
548    echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
549    If a cross compiler is detected then cross compile mode will be used." >&2
550  elif test "x$build_alias" != "x$host_alias"; then
551    cross_compiling=yes
552  fi
553fi
554
555ac_tool_prefix=
556test -n "$host_alias" && ac_tool_prefix=$host_alias-
557
558test "$silent" = yes && exec 6>/dev/null
559
560# Find the source files, if location was not specified.
561if test -z "$srcdir"; then
562  ac_srcdir_defaulted=yes
563  # Try the directory containing this script, then its parent.
564  ac_prog=$0
565  ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
566  test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
567  srcdir=$ac_confdir
568  if test ! -r "$srcdir/$ac_unique_file"; then
569    srcdir=..
570  fi
571else
572  ac_srcdir_defaulted=no
573fi
574if test ! -r "$srcdir/$ac_unique_file"; then
575  if test "$ac_srcdir_defaulted" = yes; then
576    { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
577   { (exit 1); exit 1; }; }
578  else
579    { echo "$as_me: error: cannot find sources in $srcdir" >&2
580   { (exit 1); exit 1; }; }
581  fi
582fi
583srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
584ac_env_build_alias_set=${build_alias+set}
585ac_env_build_alias_value=$build_alias
586ac_cv_env_build_alias_set=${build_alias+set}
587ac_cv_env_build_alias_value=$build_alias
588ac_env_host_alias_set=${host_alias+set}
589ac_env_host_alias_value=$host_alias
590ac_cv_env_host_alias_set=${host_alias+set}
591ac_cv_env_host_alias_value=$host_alias
592ac_env_target_alias_set=${target_alias+set}
593ac_env_target_alias_value=$target_alias
594ac_cv_env_target_alias_set=${target_alias+set}
595ac_cv_env_target_alias_value=$target_alias
596ac_env_CC_set=${CC+set}
597ac_env_CC_value=$CC
598ac_cv_env_CC_set=${CC+set}
599ac_cv_env_CC_value=$CC
600ac_env_CFLAGS_set=${CFLAGS+set}
601ac_env_CFLAGS_value=$CFLAGS
602ac_cv_env_CFLAGS_set=${CFLAGS+set}
603ac_cv_env_CFLAGS_value=$CFLAGS
604ac_env_LDFLAGS_set=${LDFLAGS+set}
605ac_env_LDFLAGS_value=$LDFLAGS
606ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
607ac_cv_env_LDFLAGS_value=$LDFLAGS
608ac_env_CPPFLAGS_set=${CPPFLAGS+set}
609ac_env_CPPFLAGS_value=$CPPFLAGS
610ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
611ac_cv_env_CPPFLAGS_value=$CPPFLAGS
612ac_env_CPP_set=${CPP+set}
613ac_env_CPP_value=$CPP
614ac_cv_env_CPP_set=${CPP+set}
615ac_cv_env_CPP_value=$CPP
616
617#
618# Report the --help message.
619#
620if test "$ac_init_help" = "long"; then
621  # Omit some internal or obsolete options to make the list less imposing.
622  # This message is too long to be a string in the A/UX 3.1 sh.
623  cat <<EOF
624\`configure' configures this package to adapt to many kinds of systems.
625
626Usage: $0 [OPTION]... [VAR=VALUE]...
627
628To assign environment variables (e.g., CC, CFLAGS...), specify them as
629VAR=VALUE.  See below for descriptions of some of the useful variables.
630
631Defaults for the options are specified in brackets.
632
633Configuration:
634  -h, --help              display this help and exit
635      --help=short        display options specific to this package
636      --help=recursive    display the short help of all the included packages
637  -V, --version           display version information and exit
638  -q, --quiet, --silent   do not print \`checking...' messages
639      --cache-file=FILE   cache test results in FILE [disabled]
640  -C, --config-cache      alias for \`--cache-file=config.cache'
641  -n, --no-create         do not create output files
642      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
643
644EOF
645
646  cat <<EOF
647Installation directories:
648  --prefix=PREFIX         install architecture-independent files in PREFIX
649                          [$ac_default_prefix]
650  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
651                          [PREFIX]
652
653By default, \`make install' will install all the files in
654\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
655an installation prefix other than \`$ac_default_prefix' using \`--prefix',
656for instance \`--prefix=\$HOME'.
657
658For better control, use the options below.
659
660Fine tuning of the installation directories:
661  --bindir=DIR            user executables [EPREFIX/bin]
662  --sbindir=DIR           system admin executables [EPREFIX/sbin]
663  --libexecdir=DIR        program executables [EPREFIX/libexec]
664  --datarootdir=DIR       read-only architecture-independent data [PREFIX/share]
665  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
666  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
667  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
668  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
669  --runstatedir=DIR       extra definition of runtime data [LOCALSTATEDIR/run]
670  --libdir=DIR            object code libraries [EPREFIX/lib]
671  --includedir=DIR        C header files [PREFIX/include]
672  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
673  --infodir=DIR           info documentation [DATAROOTDIR/info]
674  --mandir=DIR            man documentation [DATAROOTDIR/man]
675EOF
676
677  cat <<\EOF
678
679Program names:
680  --program-prefix=PREFIX            prepend PREFIX to installed program names
681  --program-suffix=SUFFIX            append SUFFIX to installed program names
682  --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
683
684X features:
685  --x-includes=DIR    X include files are in DIR
686  --x-libraries=DIR   X library files are in DIR
687
688System types:
689  --build=BUILD           configure for building on BUILD [guessed]
690  --host=HOST       build programs to run on HOST [BUILD]
691EOF
692fi
693
694if test -n "$ac_init_help"; then
695
696  cat <<\EOF
697
698Optional Features:
699  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
700  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
701
702Optional Packages:
703  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
704  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
705
706Compile/Install Options:
707  --disable-full-tgetent  disable check for full tgetent function
708  --with-app-class=XXX    override X applications class (default XTerm)
709  --with-app-defaults=DIR directory in which to install resource files (EPREFIX/lib/X11/app-defaults)
710  --with-icon-name=XXXX   override icon name (default: mini.xterm)
711  --with-icon-symlink=XXX make symbolic link for icon name (default: xterm)
712  --with-pixmapdir=DIR    directory in which to install pixmaps (DATADIR/pixmaps)
713  --with-icondir=DIR      directory in which to install icons for desktop
714  --with-icon-theme=XXX   install icons into desktop theme (hicolor)
715  --disable-desktop       disable install of xterm desktop files
716  --with-desktop-category=XXX  one or more desktop catgories or auto
717  --with-reference=XXX    program to use as permissions-reference
718  --with-xterm-symlink=XXX make symbolic link to installed xterm
719  --disable-openpty       disable openpty, prefer other interfaces
720  --disable-setuid        disable setuid in xterm, do not install setuid/setgid
721  --disable-setgid        disable setgid in xterm, do not install setuid/setgid
722  --with-setuid=XXX       use the given setuid user
723  --with-utmp-setgid=XXX  use setgid to match utmp/utmpx file
724  --with-utempter         use utempter library for access to utmp
725  --with-tty-group=XXX    use XXX for the tty-group
726  --with-x                use the X Window System
727  --with-pkg-config{=path} enable/disable use of pkg-config
728  --with-xpm=DIR          use Xpm library for colored icon, may specify path
729  --without-xinerama      do not use Xinerama extension for multiscreen support
730  --with-Xaw3d            link with Xaw 3d library
731  --with-Xaw3dxft         link with Xaw 3d xft library
732  --with-neXtaw           link with neXT Athena library
733  --with-XawPlus          link with Athena-Plus library
734  --disable-xcursor        disable cursorTheme resource
735  --enable-narrowproto    enable narrow prototypes for X libraries
736  --disable-imake         disable use of imake for definitions
737  --with-man2html=XXX     use XXX rather than groff
738Terminal Configuration:
739  --with-terminal-id=V    set default decTerminalID (default: vt420)
740  --with-terminal-type=T  set default $TERM (default: xterm)
741  --enable-backarrow-key  set default backarrowKey resource (default: true)
742  --enable-backarrow-is-erase set default backarrowKeyIsErase resource (default: false)
743  --enable-delete-is-del  set default deleteIsDEL resource (default: maybe)
744  --enable-pty-erase      set default ptyInitialErase resource (default: maybe)
745  --enable-alt-sends-esc  set default altSendsEscape resource (default: no)
746  --enable-meta-sends-esc set default metaSendsEscape resource (default: no)
747  --with-own-terminfo=P   set default $TERMINFO (default: from environment)
748  --enable-env-terminfo   setenv $TERMINFO if --with-own-terminfo gives value
749Optional Features:
750  --disable-active-icon   disable X11R6.3 active-icon feature
751  --disable-ansi-color    disable ANSI color
752  --disable-16-color      disable 16-color support
753  --disable-256-color     disable 256-color support
754  --disable-direct-color  disable direct-color support
755  --disable-88-color      disable 88-color support
756  --disable-blink-cursor  disable support for blinking cursor
757  --enable-broken-osc     allow broken Linux OSC-strings
758  --disable-broken-st     disallow broken string-terminators
759  --enable-builtin-xpms   compile-in icon data
760  --disable-c1-print      disallow -k8 option for printable 128-159
761  --disable-bold-color    disable PC-style mapping of bold colors
762  --disable-color-class   disable separate color class resources
763  --disable-color-mode    disable default colorMode resource
764  --disable-highlighting  disable support for color highlighting
765  --disable-doublechars   disable support for double-size chars
766  --disable-boxchars      disable fallback-support for box chars
767  --enable-exec-xterm     enable "spawn-new-terminal" action
768  --enable-double-buffer  enable double-buffering in default resources
769  --disable-freetype      disable freetype library-support
770  --with-freetype-config  configure script to use for FreeType
771  --with-freetype-cflags  -D/-I options for compiling with FreeType
772  --with-freetype-libs    -L/-l options to link FreeType
773  --enable-hp-fkeys       enable support for HP-style function keys
774  --enable-sco-fkeys      enable support for SCO-style function keys
775  --disable-sun-fkeys     disable support for Sun-style function keys
776  --disable-fifo-lines    disable FIFO-storage for saved-lines
777  --disable-i18n          disable internationalization
778  --disable-initial-erase disable setup for stty erase
779  --disable-input-method  disable input-method
780  --enable-load-vt-fonts  enable load-vt-fonts() action
781  --enable-logging        enable logging
782  --enable-logfile-exec   enable exec'd logfile filter
783  --disable-maximize      disable actions for iconify/deiconify/maximize/restore
784  --disable-num-lock      disable NumLock keypad support
785  --disable-paste64       disable get/set base64 selection data
786  --disable-pty-handshake disable pty-handshake support
787  --enable-readline-mouse enable support for mouse in readline applications
788  --disable-regex         disable regular-expression selections
789  --with-pcre2            use PCRE2 for regular-expressions
790  --with-pcre             use PCRE for regular-expressions
791  --disable-rightbar      disable right-scrollbar support
792  --disable-samename      disable check for redundant name-change
793  --disable-selection-ops disable selection-action operations
794  --disable-session-mgt   disable support for session management
795  --disable-tcap-fkeys    disable termcap function-keys support
796  --disable-tcap-query    disable compiled-in termcap-query support
797  --disable-tek4014       disable tek4014 emulation
798  --enable-toolbar        compile-in toolbar for pulldown menus
799  --disable-vt52          disable VT52 emulation
800  --disable-wide-attrs    disable wide-attribute support
801  --disable-wide-chars    disable wide-character support
802  --enable-16bit-chars    enable 16-bit character support
803  --enable-mini-luit      enable mini-luit (built-in Latin9 support)
804  --disable-luit          enable luit filter (Unicode translation)
805  --enable-dabbrev        enable dynamic-abbreviation support
806  --enable-dec-locator    enable DECterm Locator support
807  --disable-screen-dumps  disable XHTML and SVG screen dumps
808  --enable-regis-graphics enable ReGIS graphics support
809  --disable-sixel-graphics disable sixel graphics support
810  --disable-print-graphics disable screen dump to sixel support
811  --disable-rectangles    disable VT420 rectangle support
812  --disable-ziconbeep     disable -ziconbeep option
813Testing/development Options:
814  --enable-trace          test: set to enable debugging traces
815  --with-dmalloc          test: use Gray Watson's dmalloc library
816  --with-dbmalloc         test: use Conor Cahill's dbmalloc library
817  --with-valgrind         test: use valgrind
818  --disable-leaks         test: free permanent memory, analyze leaks
819  --disable-echo          do not display "compiling" commands
820  --enable-xmc-glitch     test: enable xmc magic-cookie emulation
821  --enable-warnings       test: turn on gcc compiler warnings
822  --enable-stdnoreturn    enable C11 _Noreturn feature for diagnostics
823  --disable-rpath-hack    don't add rpath options for additional libraries
824
825Some influential environment variables:
826  CC          C compiler command
827  CFLAGS      C compiler flags
828  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
829              nonstandard directory <lib dir>
830  CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
831              headers in a nonstandard directory <include dir>
832  CPP         C preprocessor
833
834Use these variables to override the choices made by `configure' or to help
835it to find libraries and programs with nonstandard names/locations.
836
837EOF
838fi
839
840if test "$ac_init_help" = "recursive"; then
841  # If there are subdirs, report their specific --help.
842  ac_popdir=`pwd`
843  for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
844    cd "$ac_subdir"
845    # A "../" for each directory in /$ac_subdir.
846    ac_dots=`echo "$ac_subdir" |
847             sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
848
849    case "$srcdir" in
850    .) # No --srcdir option.  We are building in place.
851      ac_sub_srcdir="$srcdir" ;;
852    [\\/]* | ?:[\\/]* ) # Absolute path.
853      ac_sub_srcdir="$srcdir/$ac_subdir" ;;
854    *) # Relative path.
855      ac_sub_srcdir="$ac_dots$srcdir/$ac_subdir" ;;
856    esac
857
858    # Check for guested configure; otherwise get Cygnus style configure.
859    if test -f "$ac_sub_srcdir/configure.gnu"; then
860      echo
861      $SHELL "$ac_sub_srcdir/configure.gnu" --help=recursive
862    elif test -f "$ac_sub_srcdir/configure"; then
863      echo
864      $SHELL "$ac_sub_srcdir/configure" --help=recursive
865    elif test -f "$ac_sub_srcdir/configure.ac" ||
866           test -f "$ac_sub_srcdir/configure.in"; then
867      echo
868      "$ac_configure" --help
869    else
870      echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
871    fi
872    cd "$ac_popdir"
873  done
874fi
875
876test -n "$ac_init_help" && exit 0
877if "$ac_init_version"; then
878  cat <<\EOF
879
880Copyright 2003-2020,2021	Thomas E. Dickey
881Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
882Free Software Foundation, Inc.
883This configure script is free software; the Free Software Foundation
884gives unlimited permission to copy, distribute and modify it.
885EOF
886  exit 0
887fi
888exec 5>config.log
889cat >&5 <<EOF
890This file contains any messages produced by compilers while
891running configure, to aid debugging if configure makes a mistake.
892
893It was created by $as_me, which was
894generated by GNU Autoconf 2.52.20210105.  Invocation command line was
895
896  $ $0 $@
897
898EOF
899{
900cat <<_ASUNAME
901## ---------- ##
902## Platform.  ##
903## ---------- ##
904
905hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
906uname -m = `(uname -m) 2>/dev/null || echo unknown`
907uname -r = `(uname -r) 2>/dev/null || echo unknown`
908uname -s = `(uname -s) 2>/dev/null || echo unknown`
909uname -v = `(uname -v) 2>/dev/null || echo unknown`
910
911/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
912/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
913
914/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
915/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
916/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
917hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
918/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
919/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
920/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
921
922PATH = $PATH
923
924_ASUNAME
925} >&5
926
927cat >&5 <<EOF
928## ------------ ##
929## Core tests.  ##
930## ------------ ##
931
932EOF
933
934# Keep a trace of the command line.
935# Strip out --no-create and --no-recursion so they do not pile up.
936# Also quote any args containing shell meta-characters.
937ac_configure_args=
938ac_sep=
939for ac_arg
940do
941  case "$ac_arg" in
942  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
943  | --no-cr | --no-c) ;;
944  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
945  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
946  *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
947    ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
948    ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
949    ac_sep=" " ;;
950  *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
951     ac_sep=" " ;;
952  esac
953  # Get rid of the leading space.
954done
955
956# When interrupted or exit'd, cleanup temporary files, and complete
957# config.log.  We remove comments because anyway the quotes in there
958# would cause problems or look ugly.
959trap 'exit_status=$?
960  # Save into config.log some information that might help in debugging.
961  echo >&5
962  echo "## ----------------- ##" >&5
963  echo "## Cache variables.  ##" >&5
964  echo "## ----------------- ##" >&5
965  echo >&5
966  # The following way of writing the cache mishandles newlines in values,
967{
968  (set) 2>&1 |
969    case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
970    *ac_space=\ *)
971      sed -n \
972        "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
973    	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
974      ;;
975    *)
976      sed -n \
977        "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
978      ;;
979    esac;
980} >&5
981  sed "/^$/d" confdefs.h >conftest.log
982  if test -s conftest.log; then
983    echo >&5
984    echo "## ------------ ##" >&5
985    echo "## confdefs.h.  ##" >&5
986    echo "## ------------ ##" >&5
987    echo >&5
988    cat conftest.log >&5
989  fi
990  (echo; echo) >&5
991  test "$ac_signal" != 0 &&
992    echo "$as_me: caught signal $ac_signal" >&5
993  echo "$as_me: exit $exit_status" >&5
994  rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
995    exit $exit_status
996     ' 0
997for ac_signal in 1 2 13 15; do
998  trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' "$ac_signal"
999done
1000ac_signal=0
1001
1002# confdefs.h avoids OS command line length limits that DEFS can exceed.
1003rm -rf conftest* confdefs.h
1004# AIX cpp loses on an empty file, so make sure it contains at least a newline.
1005echo >confdefs.h
1006
1007# Let the site file select an alternate cache file if it wants to.
1008# Prefer explicitly selected file to automatically selected ones.
1009if test -z "$CONFIG_SITE"; then
1010  if test "x$prefix" != xNONE; then
1011    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1012  else
1013    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1014  fi
1015fi
1016for ac_site_file in $CONFIG_SITE; do
1017  if test -r "$ac_site_file"; then
1018    { echo "$as_me:1018: loading site script $ac_site_file" >&5
1019echo "$as_me: loading site script $ac_site_file" >&6;}
1020    cat "$ac_site_file" >&5
1021    . "$ac_site_file"
1022  fi
1023done
1024
1025if test -r "$cache_file"; then
1026  # Some versions of bash will fail to source /dev/null (special
1027  # files actually), so we avoid doing that.
1028  if test -f "$cache_file"; then
1029    { echo "$as_me:1029: loading cache $cache_file" >&5
1030echo "$as_me: loading cache $cache_file" >&6;}
1031    case $cache_file in
1032      [\\/]* | ?:[\\/]* ) . $cache_file;;
1033      *)                      . ./$cache_file;;
1034    esac
1035  fi
1036else
1037  { echo "$as_me:1037: creating cache $cache_file" >&5
1038echo "$as_me: creating cache $cache_file" >&6;}
1039  >$cache_file
1040fi
1041
1042# Check that the precious variables saved in the cache have kept the same
1043# value.
1044ac_cache_corrupted=false
1045for ac_var in `(set) 2>&1 |
1046               sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1047  eval ac_old_set=\$ac_cv_env_${ac_var}_set
1048  eval ac_new_set=\$ac_env_${ac_var}_set
1049  eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1050  eval ac_new_val="\$ac_env_${ac_var}_value"
1051  case "$ac_old_set,$ac_new_set" in
1052    set,)
1053      { echo "$as_me:1053: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1054echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1055      ac_cache_corrupted=: ;;
1056    ,set)
1057      { echo "$as_me:1057: error: \`$ac_var' was not set in the previous run" >&5
1058echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1059      ac_cache_corrupted=: ;;
1060    ,);;
1061    *)
1062      if test "x$ac_old_val" != "x$ac_new_val"; then
1063        { echo "$as_me:1063: error: \`$ac_var' has changed since the previous run:" >&5
1064echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1065        { echo "$as_me:1065:   former value:  $ac_old_val" >&5
1066echo "$as_me:   former value:  $ac_old_val" >&2;}
1067        { echo "$as_me:1067:   current value: $ac_new_val" >&5
1068echo "$as_me:   current value: $ac_new_val" >&2;}
1069        ac_cache_corrupted=:
1070      fi;;
1071  esac
1072  # Pass precious variables to config.status.  It doesn't matter if
1073  # we pass some twice (in addition to the command line arguments).
1074  if test "$ac_new_set" = set; then
1075    case "$ac_new_val" in
1076    *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1077      ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1078      ac_configure_args="$ac_configure_args '$ac_arg'"
1079      ;;
1080    *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1081       ;;
1082    esac
1083  fi
1084done
1085if "$ac_cache_corrupted"; then
1086  { echo "$as_me:1086: error: changes in the environment can compromise the build" >&5
1087echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1088  { { echo "$as_me:1088: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1089echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1090   { (exit 1); exit 1; }; }
1091fi
1092
1093ac_ext=c
1094ac_cpp='$CPP $CPPFLAGS'
1095ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1096ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1097ac_compiler_gnu=$ac_cv_c_compiler_gnu
1098ac_main_return="return"
1099
1100case `echo "testing\c" 2>/dev/null; echo 1,2,3`,`echo -n testing 2>/dev/null; echo 1,2,3` in
1101  *c*,-n*) ECHO_N=
1102           ECHO_C=      # newlines do not sed ;-) only broken shells would use this case anyway
1103           ECHO_T='	'
1104           ;;
1105  *c*,*  ) ECHO_N=-n
1106           ECHO_C=
1107           ECHO_T=
1108           ;;
1109  *)       ECHO_N=
1110           ECHO_C='\c'
1111           ECHO_T=
1112           ;;
1113esac
1114echo "#! $SHELL" >conftest.sh
1115echo  "exit 0"   >>conftest.sh
1116chmod +x conftest.sh
1117if { (echo "$as_me:1117: PATH=\".;.\"; conftest.sh") >&5
1118  (PATH=".;."; conftest.sh) 2>&5
1119  ac_status=$?
1120  echo "$as_me:1120: \$? = $ac_status" >&5
1121  (exit "$ac_status"); }; then
1122  ac_path_separator=';'
1123else
1124  ac_path_separator=:
1125fi
1126PATH_SEPARATOR="$ac_path_separator"
1127rm -f conftest.sh
1128
1129ac_config_headers="$ac_config_headers xtermcfg.h:xtermcfg.hin"
1130
1131ac_aux_dir=
1132for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1133  if test -f "$ac_dir/install-sh"; then
1134    ac_aux_dir=$ac_dir
1135    ac_install_sh="$ac_aux_dir/install-sh -c"
1136    break
1137  elif test -f "$ac_dir/install.sh"; then
1138    ac_aux_dir=$ac_dir
1139    ac_install_sh="$ac_aux_dir/install.sh -c"
1140    break
1141  elif test -f "$ac_dir/shtool"; then
1142    ac_aux_dir=$ac_dir
1143    ac_install_sh="$ac_aux_dir/shtool install -c"
1144    break
1145  fi
1146done
1147if test -z "$ac_aux_dir"; then
1148  { { echo "$as_me:1148: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1149echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1150   { (exit 1); exit 1; }; }
1151fi
1152ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1153ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1154ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1155
1156# Make sure we can run config.sub.
1157$ac_config_sub sun4 >/dev/null 2>&1 ||
1158  { { echo "$as_me:1158: error: cannot run $ac_config_sub" >&5
1159echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1160   { (exit 1); exit 1; }; }
1161
1162echo "$as_me:1162: checking build system type" >&5
1163echo $ECHO_N "checking build system type... $ECHO_C" >&6
1164if test "${ac_cv_build+set}" = set; then
1165  echo $ECHO_N "(cached) $ECHO_C" >&6
1166else
1167  ac_cv_build_alias=$build_alias
1168test -z "$ac_cv_build_alias" &&
1169  ac_cv_build_alias=`$ac_config_guess`
1170test -z "$ac_cv_build_alias" &&
1171  { { echo "$as_me:1171: error: cannot guess build type; you must specify one" >&5
1172echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1173   { (exit 1); exit 1; }; }
1174ac_cv_build=`$ac_config_sub "$ac_cv_build_alias"` ||
1175  { { echo "$as_me:1175: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1176echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1177   { (exit 1); exit 1; }; }
1178
1179fi
1180echo "$as_me:1180: result: $ac_cv_build" >&5
1181echo "${ECHO_T}$ac_cv_build" >&6
1182build=$ac_cv_build
1183build_cpu=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1184build_vendor=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1185build_os=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1186
1187if test -f "$srcdir/config.guess" || test -f "$ac_aux_dir/config.guess" ; then
1188	echo "$as_me:1188: checking host system type" >&5
1189echo $ECHO_N "checking host system type... $ECHO_C" >&6
1190if test "${ac_cv_host+set}" = set; then
1191  echo $ECHO_N "(cached) $ECHO_C" >&6
1192else
1193  ac_cv_host_alias=$host_alias
1194test -z "$ac_cv_host_alias" &&
1195  ac_cv_host_alias=$ac_cv_build_alias
1196ac_cv_host=`$ac_config_sub "$ac_cv_host_alias"` ||
1197  { { echo "$as_me:1197: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1198echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1199   { (exit 1); exit 1; }; }
1200
1201fi
1202echo "$as_me:1202: result: $ac_cv_host" >&5
1203echo "${ECHO_T}$ac_cv_host" >&6
1204host=$ac_cv_host
1205host_cpu=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1206host_vendor=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1207host_os=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1208
1209	system_name="$host_os"
1210else
1211	system_name="`(uname -s -r) 2>/dev/null`"
1212	if test -z "$system_name" ; then
1213		system_name="`(hostname) 2>/dev/null`"
1214	fi
1215fi
1216test -n "$system_name" &&
1217cat >>confdefs.h <<EOF
1218#define SYSTEM_NAME "$system_name"
1219EOF
1220
1221if test "${cf_cv_system_name+set}" = set; then
1222  echo $ECHO_N "(cached) $ECHO_C" >&6
1223else
1224  cf_cv_system_name="$system_name"
1225fi
1226
1227test -z "$system_name" && system_name="$cf_cv_system_name"
1228test -n "$cf_cv_system_name" && echo "$as_me:1228: result: Configuring for $cf_cv_system_name" >&5
1229echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1230
1231if test ".$system_name" != ".$cf_cv_system_name" ; then
1232	echo "$as_me:1232: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1233echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1234	{ { echo "$as_me:1234: error: \"Please remove config.cache and try again.\"" >&5
1235echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1236   { (exit 1); exit 1; }; }
1237fi
1238
1239###	checks for alternative programs
1240
1241case "$host_os" in
1242(openedition)	: "${CFLAGS=\"-O2 -Wc,dll -Wl,EDIT=NO\"}"
1243		: "${CPPFLAGS=\"-D_ALL_SOURCE\"}"
1244		: "${LIBS=\"/usr/lib/Xaw.x /usr/lib/SM.x /usr/lib/ICE.x /usr/lib/X11.x\"}"
1245		: "${CC=c89}";;
1246(darwin*)
1247		: "${LDFLAGS}=\"${LDFLAGS} -Wl,-bind_at_load\"";;
1248esac
1249
1250ac_ext=c
1251ac_cpp='$CPP $CPPFLAGS'
1252ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1253ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1254ac_compiler_gnu=$ac_cv_c_compiler_gnu
1255ac_main_return="return"
1256if test -n "$ac_tool_prefix"; then
1257  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1258set dummy ${ac_tool_prefix}gcc; ac_word=$2
1259echo "$as_me:1259: checking for $ac_word" >&5
1260echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1261if test "${ac_cv_prog_CC+set}" = set; then
1262  echo $ECHO_N "(cached) $ECHO_C" >&6
1263else
1264  if test -n "$CC"; then
1265  ac_cv_prog_CC="$CC" # Let the user override the test.
1266else
1267  ac_save_IFS=$IFS; IFS=$ac_path_separator
1268ac_dummy="$PATH"
1269for ac_dir in $ac_dummy; do
1270  IFS=$ac_save_IFS
1271  test -z "$ac_dir" && ac_dir=.
1272  $as_executable_p "$ac_dir/$ac_word" || continue
1273ac_cv_prog_CC="${ac_tool_prefix}gcc"
1274echo "$as_me:1274: found $ac_dir/$ac_word" >&5
1275break
1276done
1277
1278fi
1279fi
1280CC=$ac_cv_prog_CC
1281if test -n "$CC"; then
1282  echo "$as_me:1282: result: $CC" >&5
1283echo "${ECHO_T}$CC" >&6
1284else
1285  echo "$as_me:1285: result: no" >&5
1286echo "${ECHO_T}no" >&6
1287fi
1288
1289fi
1290if test -z "$ac_cv_prog_CC"; then
1291  ac_ct_CC=$CC
1292  # Extract the first word of "gcc", so it can be a program name with args.
1293set dummy gcc; ac_word=$2
1294echo "$as_me:1294: checking for $ac_word" >&5
1295echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1296if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1297  echo $ECHO_N "(cached) $ECHO_C" >&6
1298else
1299  if test -n "$ac_ct_CC"; then
1300  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1301else
1302  ac_save_IFS=$IFS; IFS=$ac_path_separator
1303ac_dummy="$PATH"
1304for ac_dir in $ac_dummy; do
1305  IFS=$ac_save_IFS
1306  test -z "$ac_dir" && ac_dir=.
1307  $as_executable_p "$ac_dir/$ac_word" || continue
1308ac_cv_prog_ac_ct_CC="gcc"
1309echo "$as_me:1309: found $ac_dir/$ac_word" >&5
1310break
1311done
1312
1313fi
1314fi
1315ac_ct_CC=$ac_cv_prog_ac_ct_CC
1316if test -n "$ac_ct_CC"; then
1317  echo "$as_me:1317: result: $ac_ct_CC" >&5
1318echo "${ECHO_T}$ac_ct_CC" >&6
1319else
1320  echo "$as_me:1320: result: no" >&5
1321echo "${ECHO_T}no" >&6
1322fi
1323
1324  CC=$ac_ct_CC
1325else
1326  CC="$ac_cv_prog_CC"
1327fi
1328
1329if test -z "$CC"; then
1330  if test -n "$ac_tool_prefix"; then
1331  # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1332set dummy ${ac_tool_prefix}cc; ac_word=$2
1333echo "$as_me:1333: checking for $ac_word" >&5
1334echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1335if test "${ac_cv_prog_CC+set}" = set; then
1336  echo $ECHO_N "(cached) $ECHO_C" >&6
1337else
1338  if test -n "$CC"; then
1339  ac_cv_prog_CC="$CC" # Let the user override the test.
1340else
1341  ac_save_IFS=$IFS; IFS=$ac_path_separator
1342ac_dummy="$PATH"
1343for ac_dir in $ac_dummy; do
1344  IFS=$ac_save_IFS
1345  test -z "$ac_dir" && ac_dir=.
1346  $as_executable_p "$ac_dir/$ac_word" || continue
1347ac_cv_prog_CC="${ac_tool_prefix}cc"
1348echo "$as_me:1348: found $ac_dir/$ac_word" >&5
1349break
1350done
1351
1352fi
1353fi
1354CC=$ac_cv_prog_CC
1355if test -n "$CC"; then
1356  echo "$as_me:1356: result: $CC" >&5
1357echo "${ECHO_T}$CC" >&6
1358else
1359  echo "$as_me:1359: result: no" >&5
1360echo "${ECHO_T}no" >&6
1361fi
1362
1363fi
1364if test -z "$ac_cv_prog_CC"; then
1365  ac_ct_CC=$CC
1366  # Extract the first word of "cc", so it can be a program name with args.
1367set dummy cc; ac_word=$2
1368echo "$as_me:1368: checking for $ac_word" >&5
1369echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1370if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1371  echo $ECHO_N "(cached) $ECHO_C" >&6
1372else
1373  if test -n "$ac_ct_CC"; then
1374  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1375else
1376  ac_save_IFS=$IFS; IFS=$ac_path_separator
1377ac_dummy="$PATH"
1378for ac_dir in $ac_dummy; do
1379  IFS=$ac_save_IFS
1380  test -z "$ac_dir" && ac_dir=.
1381  $as_executable_p "$ac_dir/$ac_word" || continue
1382ac_cv_prog_ac_ct_CC="cc"
1383echo "$as_me:1383: found $ac_dir/$ac_word" >&5
1384break
1385done
1386
1387fi
1388fi
1389ac_ct_CC=$ac_cv_prog_ac_ct_CC
1390if test -n "$ac_ct_CC"; then
1391  echo "$as_me:1391: result: $ac_ct_CC" >&5
1392echo "${ECHO_T}$ac_ct_CC" >&6
1393else
1394  echo "$as_me:1394: result: no" >&5
1395echo "${ECHO_T}no" >&6
1396fi
1397
1398  CC=$ac_ct_CC
1399else
1400  CC="$ac_cv_prog_CC"
1401fi
1402
1403fi
1404if test -z "$CC"; then
1405  # Extract the first word of "cc", so it can be a program name with args.
1406set dummy cc; ac_word=$2
1407echo "$as_me:1407: checking for $ac_word" >&5
1408echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1409if test "${ac_cv_prog_CC+set}" = set; then
1410  echo $ECHO_N "(cached) $ECHO_C" >&6
1411else
1412  if test -n "$CC"; then
1413  ac_cv_prog_CC="$CC" # Let the user override the test.
1414else
1415  ac_prog_rejected=no
1416  ac_save_IFS=$IFS; IFS=$ac_path_separator
1417ac_dummy="$PATH"
1418for ac_dir in $ac_dummy; do
1419  IFS=$ac_save_IFS
1420  test -z "$ac_dir" && ac_dir=.
1421  $as_executable_p "$ac_dir/$ac_word" || continue
1422if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1423  ac_prog_rejected=yes
1424  continue
1425fi
1426ac_cv_prog_CC="cc"
1427echo "$as_me:1427: found $ac_dir/$ac_word" >&5
1428break
1429done
1430
1431if test "$ac_prog_rejected" = yes; then
1432  # We found a bogon in the path, so make sure we never use it.
1433  set dummy $ac_cv_prog_CC
1434  shift
1435  if test $# != 0; then
1436    # We chose a different compiler from the bogus one.
1437    # However, it has the same basename, so the bogon will be chosen
1438    # first if we set CC to just the basename; use the full file name.
1439    shift
1440    set dummy "$ac_dir/$ac_word" ${1+"$@"}
1441    shift
1442    ac_cv_prog_CC="$@"
1443  fi
1444fi
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
1456fi
1457if test -z "$CC"; then
1458  if test -n "$ac_tool_prefix"; then
1459  for ac_prog in cl
1460  do
1461    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1462set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1463echo "$as_me:1463: checking for $ac_word" >&5
1464echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1465if test "${ac_cv_prog_CC+set}" = set; then
1466  echo $ECHO_N "(cached) $ECHO_C" >&6
1467else
1468  if test -n "$CC"; then
1469  ac_cv_prog_CC="$CC" # Let the user override the test.
1470else
1471  ac_save_IFS=$IFS; IFS=$ac_path_separator
1472ac_dummy="$PATH"
1473for ac_dir in $ac_dummy; do
1474  IFS=$ac_save_IFS
1475  test -z "$ac_dir" && ac_dir=.
1476  $as_executable_p "$ac_dir/$ac_word" || continue
1477ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1478echo "$as_me:1478: found $ac_dir/$ac_word" >&5
1479break
1480done
1481
1482fi
1483fi
1484CC=$ac_cv_prog_CC
1485if test -n "$CC"; then
1486  echo "$as_me:1486: result: $CC" >&5
1487echo "${ECHO_T}$CC" >&6
1488else
1489  echo "$as_me:1489: result: no" >&5
1490echo "${ECHO_T}no" >&6
1491fi
1492
1493    test -n "$CC" && break
1494  done
1495fi
1496if test -z "$CC"; then
1497  ac_ct_CC=$CC
1498  for ac_prog in cl
1499do
1500  # Extract the first word of "$ac_prog", so it can be a program name with args.
1501set dummy $ac_prog; ac_word=$2
1502echo "$as_me:1502: checking for $ac_word" >&5
1503echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1504if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1505  echo $ECHO_N "(cached) $ECHO_C" >&6
1506else
1507  if test -n "$ac_ct_CC"; then
1508  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1509else
1510  ac_save_IFS=$IFS; IFS=$ac_path_separator
1511ac_dummy="$PATH"
1512for ac_dir in $ac_dummy; do
1513  IFS=$ac_save_IFS
1514  test -z "$ac_dir" && ac_dir=.
1515  $as_executable_p "$ac_dir/$ac_word" || continue
1516ac_cv_prog_ac_ct_CC="$ac_prog"
1517echo "$as_me:1517: found $ac_dir/$ac_word" >&5
1518break
1519done
1520
1521fi
1522fi
1523ac_ct_CC=$ac_cv_prog_ac_ct_CC
1524if test -n "$ac_ct_CC"; then
1525  echo "$as_me:1525: result: $ac_ct_CC" >&5
1526echo "${ECHO_T}$ac_ct_CC" >&6
1527else
1528  echo "$as_me:1528: result: no" >&5
1529echo "${ECHO_T}no" >&6
1530fi
1531
1532  test -n "$ac_ct_CC" && break
1533done
1534
1535  CC=$ac_ct_CC
1536fi
1537
1538fi
1539
1540test -z "$CC" && { { echo "$as_me:1540: error: no acceptable cc found in \$PATH" >&5
1541echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1542   { (exit 1); exit 1; }; }
1543
1544# Provide some information about the compiler.
1545echo "$as_me:1545:" \
1546     "checking for C compiler version" >&5
1547ac_compiler=`set X $ac_compile; echo "$2"`
1548{ (eval echo "$as_me:1548: \"$ac_compiler --version </dev/null >&5\"") >&5
1549  (eval $ac_compiler --version </dev/null >&5) 2>&5
1550  ac_status=$?
1551  echo "$as_me:1551: \$? = $ac_status" >&5
1552  (exit "$ac_status"); }
1553{ (eval echo "$as_me:1553: \"$ac_compiler -v </dev/null >&5\"") >&5
1554  (eval $ac_compiler -v </dev/null >&5) 2>&5
1555  ac_status=$?
1556  echo "$as_me:1556: \$? = $ac_status" >&5
1557  (exit "$ac_status"); }
1558{ (eval echo "$as_me:1558: \"$ac_compiler -V </dev/null >&5\"") >&5
1559  (eval $ac_compiler -V </dev/null >&5) 2>&5
1560  ac_status=$?
1561  echo "$as_me:1561: \$? = $ac_status" >&5
1562  (exit "$ac_status"); }
1563
1564cat >"conftest.$ac_ext" <<_ACEOF
1565#line 1565 "configure"
1566#include "confdefs.h"
1567
1568int
1569main (void)
1570{
1571
1572  ;
1573  return 0;
1574}
1575_ACEOF
1576ac_clean_files_save=$ac_clean_files
1577ac_clean_files="$ac_clean_files a.out a.exe"
1578# Try to create an executable without -o first, disregard a.out.
1579# It will help us diagnose broken compilers, and finding out an intuition
1580# of exeext.
1581echo "$as_me:1581: checking for C compiler default output" >&5
1582echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1583ac_link_default=`echo "$ac_link" | sed 's/ -o *"conftest[^"]*"//'`
1584if { (eval echo "$as_me:1584: \"$ac_link_default\"") >&5
1585  (eval $ac_link_default) 2>&5
1586  ac_status=$?
1587  echo "$as_me:1587: \$? = $ac_status" >&5
1588  (exit "$ac_status"); }; then
1589  # Find the output, starting from the most likely.  This scheme is
1590# not robust to junk in `.', hence go to wildcards (a.*) only as a last
1591# resort.
1592for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1593                ls a.out conftest 2>/dev/null;
1594                ls a.* conftest.* 2>/dev/null`; do
1595  case $ac_file in
1596    *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1597    a.out ) # We found the default executable, but exeext='' is most
1598            # certainly right.
1599            break;;
1600    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1601          # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1602          export ac_cv_exeext
1603          break;;
1604    * ) break;;
1605  esac
1606done
1607else
1608  echo "$as_me: failed program was:" >&5
1609cat "conftest.$ac_ext" >&5
1610{ { echo "$as_me:1610: error: C compiler cannot create executables" >&5
1611echo "$as_me: error: C compiler cannot create executables" >&2;}
1612   { (exit 77); exit 77; }; }
1613fi
1614
1615ac_exeext=$ac_cv_exeext
1616echo "$as_me:1616: result: $ac_file" >&5
1617echo "${ECHO_T}$ac_file" >&6
1618
1619# Check the compiler produces executables we can run.  If not, either
1620# the compiler is broken, or we cross compile.
1621echo "$as_me:1621: checking whether the C compiler works" >&5
1622echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1623# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1624# If not cross compiling, check that we can run a simple program.
1625if test "$cross_compiling" != yes; then
1626  if { ac_try='./$ac_file'
1627  { (eval echo "$as_me:1627: \"$ac_try\"") >&5
1628  (eval $ac_try) 2>&5
1629  ac_status=$?
1630  echo "$as_me:1630: \$? = $ac_status" >&5
1631  (exit "$ac_status"); }; }; then
1632    cross_compiling=no
1633  else
1634    if test "$cross_compiling" = maybe; then
1635	cross_compiling=yes
1636    else
1637	{ { echo "$as_me:1637: error: cannot run C compiled programs.
1638If you meant to cross compile, use \`--host'." >&5
1639echo "$as_me: error: cannot run C compiled programs.
1640If you meant to cross compile, use \`--host'." >&2;}
1641   { (exit 1); exit 1; }; }
1642    fi
1643  fi
1644fi
1645echo "$as_me:1645: result: yes" >&5
1646echo "${ECHO_T}yes" >&6
1647
1648rm -f a.out a.exe "conftest$ac_cv_exeext"
1649ac_clean_files=$ac_clean_files_save
1650# Check the compiler produces executables we can run.  If not, either
1651# the compiler is broken, or we cross compile.
1652echo "$as_me:1652: checking whether we are cross compiling" >&5
1653echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1654echo "$as_me:1654: result: $cross_compiling" >&5
1655echo "${ECHO_T}$cross_compiling" >&6
1656
1657echo "$as_me:1657: checking for executable suffix" >&5
1658echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1659if { (eval echo "$as_me:1659: \"$ac_link\"") >&5
1660  (eval $ac_link) 2>&5
1661  ac_status=$?
1662  echo "$as_me:1662: \$? = $ac_status" >&5
1663  (exit "$ac_status"); }; then
1664  # If both `conftest.exe' and `conftest' are `present' (well, observable)
1665# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1666# work properly (i.e., refer to `conftest.exe'), while it won't with
1667# `rm'.
1668for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1669  case $ac_file in
1670    *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1671    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1672          export ac_cv_exeext
1673          break;;
1674    * ) break;;
1675  esac
1676done
1677else
1678  { { echo "$as_me:1678: error: cannot compute EXEEXT: cannot compile and link" >&5
1679echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1680   { (exit 1); exit 1; }; }
1681fi
1682
1683rm -f "conftest$ac_cv_exeext"
1684echo "$as_me:1684: result: $ac_cv_exeext" >&5
1685echo "${ECHO_T}$ac_cv_exeext" >&6
1686
1687rm -f "conftest.$ac_ext"
1688EXEEXT=$ac_cv_exeext
1689ac_exeext=$EXEEXT
1690echo "$as_me:1690: checking for object suffix" >&5
1691echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1692if test "${ac_cv_objext+set}" = set; then
1693  echo $ECHO_N "(cached) $ECHO_C" >&6
1694else
1695  cat >"conftest.$ac_ext" <<_ACEOF
1696#line 1696 "configure"
1697#include "confdefs.h"
1698
1699int
1700main (void)
1701{
1702
1703  ;
1704  return 0;
1705}
1706_ACEOF
1707rm -f conftest.o conftest.obj
1708if { (eval echo "$as_me:1708: \"$ac_compile\"") >&5
1709  (eval $ac_compile) 2>&5
1710  ac_status=$?
1711  echo "$as_me:1711: \$? = $ac_status" >&5
1712  (exit "$ac_status"); }; then
1713  for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1714  case $ac_file in
1715    *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1716    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1717       break;;
1718  esac
1719done
1720else
1721  echo "$as_me: failed program was:" >&5
1722cat "conftest.$ac_ext" >&5
1723{ { echo "$as_me:1723: error: cannot compute OBJEXT: cannot compile" >&5
1724echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1725   { (exit 1); exit 1; }; }
1726fi
1727
1728rm -f "conftest.$ac_cv_objext" "conftest.$ac_ext"
1729fi
1730echo "$as_me:1730: result: $ac_cv_objext" >&5
1731echo "${ECHO_T}$ac_cv_objext" >&6
1732OBJEXT=$ac_cv_objext
1733ac_objext=$OBJEXT
1734echo "$as_me:1734: checking whether we are using the GNU C compiler" >&5
1735echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1736if test "${ac_cv_c_compiler_gnu+set}" = set; then
1737  echo $ECHO_N "(cached) $ECHO_C" >&6
1738else
1739  cat >"conftest.$ac_ext" <<_ACEOF
1740#line 1740 "configure"
1741#include "confdefs.h"
1742
1743int
1744main (void)
1745{
1746#ifndef __GNUC__
1747       choke me
1748#endif
1749
1750  ;
1751  return 0;
1752}
1753_ACEOF
1754rm -f "conftest.$ac_objext"
1755if { (eval echo "$as_me:1755: \"$ac_compile\"") >&5
1756  (eval $ac_compile) 2>&5
1757  ac_status=$?
1758  echo "$as_me:1758: \$? = $ac_status" >&5
1759  (exit "$ac_status"); } &&
1760         { ac_try='test -s "conftest.$ac_objext"'
1761  { (eval echo "$as_me:1761: \"$ac_try\"") >&5
1762  (eval $ac_try) 2>&5
1763  ac_status=$?
1764  echo "$as_me:1764: \$? = $ac_status" >&5
1765  (exit "$ac_status"); }; }; then
1766  ac_compiler_gnu=yes
1767else
1768  echo "$as_me: failed program was:" >&5
1769cat "conftest.$ac_ext" >&5
1770ac_compiler_gnu=no
1771fi
1772rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1773ac_cv_c_compiler_gnu=$ac_compiler_gnu
1774
1775fi
1776echo "$as_me:1776: result: $ac_cv_c_compiler_gnu" >&5
1777echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1778GCC=`test $ac_compiler_gnu = yes && echo yes`
1779ac_test_CFLAGS=${CFLAGS+set}
1780ac_save_CFLAGS=$CFLAGS
1781CFLAGS="-g"
1782echo "$as_me:1782: checking whether $CC accepts -g" >&5
1783echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1784if test "${ac_cv_prog_cc_g+set}" = set; then
1785  echo $ECHO_N "(cached) $ECHO_C" >&6
1786else
1787  cat >"conftest.$ac_ext" <<_ACEOF
1788#line 1788 "configure"
1789#include "confdefs.h"
1790
1791int
1792main (void)
1793{
1794
1795  ;
1796  return 0;
1797}
1798_ACEOF
1799rm -f "conftest.$ac_objext"
1800if { (eval echo "$as_me:1800: \"$ac_compile\"") >&5
1801  (eval $ac_compile) 2>&5
1802  ac_status=$?
1803  echo "$as_me:1803: \$? = $ac_status" >&5
1804  (exit "$ac_status"); } &&
1805         { ac_try='test -s "conftest.$ac_objext"'
1806  { (eval echo "$as_me:1806: \"$ac_try\"") >&5
1807  (eval $ac_try) 2>&5
1808  ac_status=$?
1809  echo "$as_me:1809: \$? = $ac_status" >&5
1810  (exit "$ac_status"); }; }; then
1811  ac_cv_prog_cc_g=yes
1812else
1813  echo "$as_me: failed program was:" >&5
1814cat "conftest.$ac_ext" >&5
1815ac_cv_prog_cc_g=no
1816fi
1817rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1818fi
1819echo "$as_me:1819: result: $ac_cv_prog_cc_g" >&5
1820echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1821if test "$ac_test_CFLAGS" = set; then
1822  CFLAGS=$ac_save_CFLAGS
1823elif test $ac_cv_prog_cc_g = yes; then
1824  if test "$GCC" = yes; then
1825    CFLAGS="-g -O2"
1826  else
1827    CFLAGS="-g"
1828  fi
1829else
1830  if test "$GCC" = yes; then
1831    CFLAGS="-O2"
1832  else
1833    CFLAGS=
1834  fi
1835fi
1836# Some people use a C++ compiler to compile C.  Since we use `exit',
1837# in C++ we need to declare it.  In case someone uses the same compiler
1838# for both compiling C and C++ we need to have the C++ compiler decide
1839# the declaration of exit, since it's the most demanding environment.
1840cat >"conftest.$ac_ext" <<_ACEOF
1841#ifndef __cplusplus
1842  choke me
1843#endif
1844_ACEOF
1845rm -f "conftest.$ac_objext"
1846if { (eval echo "$as_me:1846: \"$ac_compile\"") >&5
1847  (eval $ac_compile) 2>&5
1848  ac_status=$?
1849  echo "$as_me:1849: \$? = $ac_status" >&5
1850  (exit "$ac_status"); } &&
1851         { ac_try='test -s "conftest.$ac_objext"'
1852  { (eval echo "$as_me:1852: \"$ac_try\"") >&5
1853  (eval $ac_try) 2>&5
1854  ac_status=$?
1855  echo "$as_me:1855: \$? = $ac_status" >&5
1856  (exit "$ac_status"); }; }; then
1857  for ac_declaration in \
1858   ''\
1859   '#include <stdlib.h>' \
1860   'extern "C" void std::exit (int) throw (); using std::exit;' \
1861   'extern "C" void std::exit (int); using std::exit;' \
1862   'extern "C" void exit (int) throw ();' \
1863   'extern "C" void exit (int);' \
1864   'void exit (int);'
1865do
1866  cat >"conftest.$ac_ext" <<_ACEOF
1867#line 1867 "configure"
1868#include "confdefs.h"
1869#include <stdlib.h>
1870$ac_declaration
1871int
1872main (void)
1873{
1874exit (42);
1875  ;
1876  return 0;
1877}
1878_ACEOF
1879rm -f "conftest.$ac_objext"
1880if { (eval echo "$as_me:1880: \"$ac_compile\"") >&5
1881  (eval $ac_compile) 2>&5
1882  ac_status=$?
1883  echo "$as_me:1883: \$? = $ac_status" >&5
1884  (exit "$ac_status"); } &&
1885         { ac_try='test -s "conftest.$ac_objext"'
1886  { (eval echo "$as_me:1886: \"$ac_try\"") >&5
1887  (eval $ac_try) 2>&5
1888  ac_status=$?
1889  echo "$as_me:1889: \$? = $ac_status" >&5
1890  (exit "$ac_status"); }; }; then
1891  :
1892else
1893  echo "$as_me: failed program was:" >&5
1894cat "conftest.$ac_ext" >&5
1895continue
1896fi
1897rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1898  cat >"conftest.$ac_ext" <<_ACEOF
1899#line 1899 "configure"
1900#include "confdefs.h"
1901$ac_declaration
1902int
1903main (void)
1904{
1905exit (42);
1906  ;
1907  return 0;
1908}
1909_ACEOF
1910rm -f "conftest.$ac_objext"
1911if { (eval echo "$as_me:1911: \"$ac_compile\"") >&5
1912  (eval $ac_compile) 2>&5
1913  ac_status=$?
1914  echo "$as_me:1914: \$? = $ac_status" >&5
1915  (exit "$ac_status"); } &&
1916         { ac_try='test -s "conftest.$ac_objext"'
1917  { (eval echo "$as_me:1917: \"$ac_try\"") >&5
1918  (eval $ac_try) 2>&5
1919  ac_status=$?
1920  echo "$as_me:1920: \$? = $ac_status" >&5
1921  (exit "$ac_status"); }; }; then
1922  break
1923else
1924  echo "$as_me: failed program was:" >&5
1925cat "conftest.$ac_ext" >&5
1926fi
1927rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1928done
1929rm -rf conftest*
1930if test -n "$ac_declaration"; then
1931  echo '#ifdef __cplusplus' >>confdefs.h
1932  echo "$ac_declaration"    >>confdefs.h
1933  echo '#endif'             >>confdefs.h
1934fi
1935
1936else
1937  echo "$as_me: failed program was:" >&5
1938cat "conftest.$ac_ext" >&5
1939fi
1940rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1941ac_ext=c
1942ac_cpp='$CPP $CPPFLAGS'
1943ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1944ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1945ac_compiler_gnu=$ac_cv_c_compiler_gnu
1946ac_main_return="return"
1947
1948GCC_VERSION=none
1949if test "$GCC" = yes ; then
1950	echo "$as_me:1950: checking version of $CC" >&5
1951echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
1952	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.].*//'`"
1953	test -z "$GCC_VERSION" && GCC_VERSION=unknown
1954	echo "$as_me:1954: result: $GCC_VERSION" >&5
1955echo "${ECHO_T}$GCC_VERSION" >&6
1956fi
1957
1958INTEL_COMPILER=no
1959
1960if test "$GCC" = yes ; then
1961	case "$host_os" in
1962	(linux*|gnu*)
1963		echo "$as_me:1963: checking if this is really Intel C compiler" >&5
1964echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
1965		cf_save_CFLAGS="$CFLAGS"
1966		CFLAGS="$CFLAGS -no-gcc"
1967		cat >"conftest.$ac_ext" <<_ACEOF
1968#line 1968 "configure"
1969#include "confdefs.h"
1970
1971int
1972main (void)
1973{
1974
1975#ifdef __INTEL_COMPILER
1976#else
1977make an error
1978#endif
1979
1980  ;
1981  return 0;
1982}
1983_ACEOF
1984rm -f "conftest.$ac_objext"
1985if { (eval echo "$as_me:1985: \"$ac_compile\"") >&5
1986  (eval $ac_compile) 2>&5
1987  ac_status=$?
1988  echo "$as_me:1988: \$? = $ac_status" >&5
1989  (exit "$ac_status"); } &&
1990         { ac_try='test -s "conftest.$ac_objext"'
1991  { (eval echo "$as_me:1991: \"$ac_try\"") >&5
1992  (eval $ac_try) 2>&5
1993  ac_status=$?
1994  echo "$as_me:1994: \$? = $ac_status" >&5
1995  (exit "$ac_status"); }; }; then
1996  INTEL_COMPILER=yes
1997cf_save_CFLAGS="$cf_save_CFLAGS -we147"
1998
1999else
2000  echo "$as_me: failed program was:" >&5
2001cat "conftest.$ac_ext" >&5
2002fi
2003rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2004		CFLAGS="$cf_save_CFLAGS"
2005		echo "$as_me:2005: result: $INTEL_COMPILER" >&5
2006echo "${ECHO_T}$INTEL_COMPILER" >&6
2007		;;
2008	esac
2009fi
2010
2011CLANG_COMPILER=no
2012
2013if test "$GCC" = yes ; then
2014	echo "$as_me:2014: checking if this is really Clang C compiler" >&5
2015echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
2016	cf_save_CFLAGS="$CFLAGS"
2017	cat >"conftest.$ac_ext" <<_ACEOF
2018#line 2018 "configure"
2019#include "confdefs.h"
2020
2021int
2022main (void)
2023{
2024
2025#ifdef __clang__
2026#else
2027make an error
2028#endif
2029
2030  ;
2031  return 0;
2032}
2033_ACEOF
2034rm -f "conftest.$ac_objext"
2035if { (eval echo "$as_me:2035: \"$ac_compile\"") >&5
2036  (eval $ac_compile) 2>&5
2037  ac_status=$?
2038  echo "$as_me:2038: \$? = $ac_status" >&5
2039  (exit "$ac_status"); } &&
2040         { ac_try='test -s "conftest.$ac_objext"'
2041  { (eval echo "$as_me:2041: \"$ac_try\"") >&5
2042  (eval $ac_try) 2>&5
2043  ac_status=$?
2044  echo "$as_me:2044: \$? = $ac_status" >&5
2045  (exit "$ac_status"); }; }; then
2046  CLANG_COMPILER=yes
2047
2048else
2049  echo "$as_me: failed program was:" >&5
2050cat "conftest.$ac_ext" >&5
2051fi
2052rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2053	CFLAGS="$cf_save_CFLAGS"
2054	echo "$as_me:2054: result: $CLANG_COMPILER" >&5
2055echo "${ECHO_T}$CLANG_COMPILER" >&6
2056fi
2057
2058CLANG_VERSION=none
2059
2060if test "x$CLANG_COMPILER" = "xyes" ; then
2061	case "$CC" in
2062	(c[1-9][0-9]|*/c[1-9][0-9])
2063		{ echo "$as_me:2063: WARNING: replacing broken compiler alias $CC" >&5
2064echo "$as_me: WARNING: replacing broken compiler alias $CC" >&2;}
2065		CFLAGS="$CFLAGS -std=`echo "$CC" | sed -e 's%.*/%%'`"
2066		CC=clang
2067		;;
2068	esac
2069
2070	echo "$as_me:2070: checking version of $CC" >&5
2071echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2072	CLANG_VERSION="`$CC --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(CLANG[^)]*) //' -e 's/^.*(Debian[^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
2073	test -z "$CLANG_VERSION" && CLANG_VERSION=unknown
2074	echo "$as_me:2074: result: $CLANG_VERSION" >&5
2075echo "${ECHO_T}$CLANG_VERSION" >&6
2076
2077	for cf_clang_opt in \
2078		-Qunused-arguments \
2079		-Wno-error=implicit-function-declaration
2080	do
2081		echo "$as_me:2081: checking if option $cf_clang_opt works" >&5
2082echo $ECHO_N "checking if option $cf_clang_opt works... $ECHO_C" >&6
2083		cf_save_CFLAGS="$CFLAGS"
2084		CFLAGS="$CFLAGS $cf_clang_opt"
2085		cat >"conftest.$ac_ext" <<_ACEOF
2086#line 2086 "configure"
2087#include "confdefs.h"
2088
2089			#include <stdio.h>
2090int
2091main (void)
2092{
2093
2094			printf("hello!\\n");
2095  ;
2096  return 0;
2097}
2098_ACEOF
2099rm -f "conftest.$ac_objext" "conftest$ac_exeext"
2100if { (eval echo "$as_me:2100: \"$ac_link\"") >&5
2101  (eval $ac_link) 2>&5
2102  ac_status=$?
2103  echo "$as_me:2103: \$? = $ac_status" >&5
2104  (exit "$ac_status"); } &&
2105         { ac_try='test -s "conftest$ac_exeext"'
2106  { (eval echo "$as_me:2106: \"$ac_try\"") >&5
2107  (eval $ac_try) 2>&5
2108  ac_status=$?
2109  echo "$as_me:2109: \$? = $ac_status" >&5
2110  (exit "$ac_status"); }; }; then
2111
2112			cf_clang_optok=yes
2113else
2114  echo "$as_me: failed program was:" >&5
2115cat "conftest.$ac_ext" >&5
2116
2117			cf_clang_optok=no
2118fi
2119rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
2120		echo "$as_me:2120: result: $cf_clang_optok" >&5
2121echo "${ECHO_T}$cf_clang_optok" >&6
2122		CFLAGS="$cf_save_CFLAGS"
2123		if test "$cf_clang_optok" = yes; then
2124			test -n "$verbose" && echo "	adding option $cf_clang_opt" 1>&6
2125
2126echo "${as_me:-configure}:2126: testing adding option $cf_clang_opt ..." 1>&5
2127
2128	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2129	CFLAGS="${CFLAGS}$cf_clang_opt"
2130
2131		fi
2132	done
2133fi
2134
2135echo "$as_me:2135: checking for $CC option to accept ANSI C" >&5
2136echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2137if test "${ac_cv_prog_cc_stdc+set}" = set; then
2138  echo $ECHO_N "(cached) $ECHO_C" >&6
2139else
2140  ac_cv_prog_cc_stdc=no
2141ac_save_CC=$CC
2142cat >"conftest.$ac_ext" <<_ACEOF
2143#line 2143 "configure"
2144#include "confdefs.h"
2145#include <stdarg.h>
2146#include <stdio.h>
2147#include <sys/types.h>
2148#include <sys/stat.h>
2149/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2150struct buf { int x; };
2151FILE * (*rcsopen) (struct buf *, struct stat *, int);
2152static char *e (p, i)
2153     char **p;
2154     int i;
2155{
2156  return p[i];
2157}
2158static char *f (char * (*g) (char **, int), char **p, ...)
2159{
2160  char *s;
2161  va_list v;
2162  va_start (v,p);
2163  s = g (p, va_arg (v,int));
2164  va_end (v);
2165  return s;
2166}
2167int test (int i, double x);
2168struct s1 {int (*f) (int a);};
2169struct s2 {int (*f) (double a);};
2170int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2171int argc;
2172char **argv;
2173int
2174main (void)
2175{
2176return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2177  ;
2178  return 0;
2179}
2180_ACEOF
2181# Don't try gcc -ansi; that turns off useful extensions and
2182# breaks some systems' header files.
2183# AIX			-qlanglvl=ansi
2184# Ultrix and OSF/1	-std1
2185# HP-UX 10.20 and later	-Ae
2186# HP-UX older versions	-Aa -D_HPUX_SOURCE
2187# SVR4			-Xc -D__EXTENSIONS__
2188for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2189do
2190  CC="$ac_save_CC $ac_arg"
2191  rm -f "conftest.$ac_objext"
2192if { (eval echo "$as_me:2192: \"$ac_compile\"") >&5
2193  (eval $ac_compile) 2>&5
2194  ac_status=$?
2195  echo "$as_me:2195: \$? = $ac_status" >&5
2196  (exit "$ac_status"); } &&
2197         { ac_try='test -s "conftest.$ac_objext"'
2198  { (eval echo "$as_me:2198: \"$ac_try\"") >&5
2199  (eval $ac_try) 2>&5
2200  ac_status=$?
2201  echo "$as_me:2201: \$? = $ac_status" >&5
2202  (exit "$ac_status"); }; }; then
2203  ac_cv_prog_cc_stdc=$ac_arg
2204break
2205else
2206  echo "$as_me: failed program was:" >&5
2207cat "conftest.$ac_ext" >&5
2208fi
2209rm -f "conftest.$ac_objext"
2210done
2211rm -f "conftest.$ac_ext" "conftest.$ac_objext"
2212CC=$ac_save_CC
2213
2214fi
2215
2216case "x$ac_cv_prog_cc_stdc" in
2217  x|xno)
2218    echo "$as_me:2218: result: none needed" >&5
2219echo "${ECHO_T}none needed" >&6 ;;
2220  *)
2221    echo "$as_me:2221: result: $ac_cv_prog_cc_stdc" >&5
2222echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2223    CC="$CC $ac_cv_prog_cc_stdc" ;;
2224esac
2225
2226# This should have been defined by AC_PROG_CC
2227: "${CC:=cc}"
2228
2229echo "$as_me:2229: checking \$CFLAGS variable" >&5
2230echo $ECHO_N "checking \$CFLAGS variable... $ECHO_C" >&6
2231case "x$CFLAGS" in
2232(*-[IUD]*)
2233	echo "$as_me:2233: result: broken" >&5
2234echo "${ECHO_T}broken" >&6
2235	{ echo "$as_me:2235: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&5
2236echo "$as_me: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&2;}
2237	cf_flags="$CFLAGS"
2238	CFLAGS=
2239	for cf_arg in $cf_flags
2240	do
2241
2242cf_fix_cppflags=no
2243cf_new_cflags=
2244cf_new_cppflags=
2245cf_new_extra_cppflags=
2246
2247for cf_add_cflags in $cf_arg
2248do
2249case "$cf_fix_cppflags" in
2250(no)
2251	case "$cf_add_cflags" in
2252	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2253		case "$cf_add_cflags" in
2254		(-D*)
2255			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2256
2257			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2258				&& test -z "${cf_tst_cflags}" \
2259				&& cf_fix_cppflags=yes
2260
2261			if test "$cf_fix_cppflags" = yes ; then
2262
2263	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2264	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2265
2266				continue
2267			elif test "${cf_tst_cflags}" = "\"'" ; then
2268
2269	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2270	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2271
2272				continue
2273			fi
2274			;;
2275		esac
2276		case "$CPPFLAGS" in
2277		(*$cf_add_cflags)
2278			;;
2279		(*)
2280			case "$cf_add_cflags" in
2281			(-D*)
2282				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2283
2284CPPFLAGS=`echo "$CPPFLAGS" | \
2285	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
2286		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
2287
2288				;;
2289			esac
2290
2291	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2292	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2293
2294			;;
2295		esac
2296		;;
2297	(*)
2298
2299	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2300	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2301
2302		;;
2303	esac
2304	;;
2305(yes)
2306
2307	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2308	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2309
2310	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
2311
2312	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2313		&& test -z "${cf_tst_cflags}" \
2314		&& cf_fix_cppflags=no
2315	;;
2316esac
2317done
2318
2319if test -n "$cf_new_cflags" ; then
2320
2321	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2322	CFLAGS="${CFLAGS}$cf_new_cflags"
2323
2324fi
2325
2326if test -n "$cf_new_cppflags" ; then
2327
2328	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2329	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2330
2331fi
2332
2333if test -n "$cf_new_extra_cppflags" ; then
2334
2335	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2336	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2337
2338fi
2339
2340	done
2341	;;
2342(*)
2343	echo "$as_me:2343: result: ok" >&5
2344echo "${ECHO_T}ok" >&6
2345	;;
2346esac
2347
2348echo "$as_me:2348: checking \$CC variable" >&5
2349echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2350case "$CC" in
2351(*[\ \	]-*)
2352	echo "$as_me:2352: result: broken" >&5
2353echo "${ECHO_T}broken" >&6
2354	{ echo "$as_me:2354: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2355echo "$as_me: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2356	# humor him...
2357	cf_prog=`echo "$CC" | sed -e 's/	/ /g' -e 's/[ ]* / /g' -e 's/[ ]*[ ]-[^ ].*//'`
2358	cf_flags=`echo "$CC" | ${AWK:-awk} -v prog="$cf_prog" '{ printf("%s", substr($0,1+length(prog))); }'`
2359	CC="$cf_prog"
2360	for cf_arg in $cf_flags
2361	do
2362		case "x$cf_arg" in
2363		(x-[IUDfgOW]*)
2364
2365cf_fix_cppflags=no
2366cf_new_cflags=
2367cf_new_cppflags=
2368cf_new_extra_cppflags=
2369
2370for cf_add_cflags in $cf_arg
2371do
2372case "$cf_fix_cppflags" in
2373(no)
2374	case "$cf_add_cflags" in
2375	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2376		case "$cf_add_cflags" in
2377		(-D*)
2378			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2379
2380			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2381				&& test -z "${cf_tst_cflags}" \
2382				&& cf_fix_cppflags=yes
2383
2384			if test "$cf_fix_cppflags" = yes ; then
2385
2386	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2387	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2388
2389				continue
2390			elif test "${cf_tst_cflags}" = "\"'" ; then
2391
2392	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2393	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2394
2395				continue
2396			fi
2397			;;
2398		esac
2399		case "$CPPFLAGS" in
2400		(*$cf_add_cflags)
2401			;;
2402		(*)
2403			case "$cf_add_cflags" in
2404			(-D*)
2405				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2406
2407CPPFLAGS=`echo "$CPPFLAGS" | \
2408	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
2409		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
2410
2411				;;
2412			esac
2413
2414	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2415	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2416
2417			;;
2418		esac
2419		;;
2420	(*)
2421
2422	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2423	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2424
2425		;;
2426	esac
2427	;;
2428(yes)
2429
2430	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2431	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2432
2433	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
2434
2435	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2436		&& test -z "${cf_tst_cflags}" \
2437		&& cf_fix_cppflags=no
2438	;;
2439esac
2440done
2441
2442if test -n "$cf_new_cflags" ; then
2443
2444	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2445	CFLAGS="${CFLAGS}$cf_new_cflags"
2446
2447fi
2448
2449if test -n "$cf_new_cppflags" ; then
2450
2451	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2452	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2453
2454fi
2455
2456if test -n "$cf_new_extra_cppflags" ; then
2457
2458	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2459	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2460
2461fi
2462
2463			;;
2464		(*)
2465			CC="$CC $cf_arg"
2466			;;
2467		esac
2468	done
2469	test -n "$verbose" && echo "	resulting CC: '$CC'" 1>&6
2470
2471echo "${as_me:-configure}:2471: testing resulting CC: '$CC' ..." 1>&5
2472
2473	test -n "$verbose" && echo "	resulting CFLAGS: '$CFLAGS'" 1>&6
2474
2475echo "${as_me:-configure}:2475: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5
2476
2477	test -n "$verbose" && echo "	resulting CPPFLAGS: '$CPPFLAGS'" 1>&6
2478
2479echo "${as_me:-configure}:2479: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5
2480
2481	;;
2482(*)
2483	echo "$as_me:2483: result: ok" >&5
2484echo "${ECHO_T}ok" >&6
2485	;;
2486esac
2487
2488for ac_prog in ggrep grep
2489do
2490  # Extract the first word of "$ac_prog", so it can be a program name with args.
2491set dummy $ac_prog; ac_word=$2
2492echo "$as_me:2492: checking for $ac_word" >&5
2493echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2494if test "${ac_cv_prog_GREP+set}" = set; then
2495  echo $ECHO_N "(cached) $ECHO_C" >&6
2496else
2497  if test -n "$GREP"; then
2498  ac_cv_prog_GREP="$GREP" # Let the user override the test.
2499else
2500  ac_save_IFS=$IFS; IFS=$ac_path_separator
2501ac_dummy="$PATH"
2502for ac_dir in $ac_dummy; do
2503  IFS=$ac_save_IFS
2504  test -z "$ac_dir" && ac_dir=.
2505  $as_executable_p "$ac_dir/$ac_word" || continue
2506ac_cv_prog_GREP="$ac_prog"
2507echo "$as_me:2507: found $ac_dir/$ac_word" >&5
2508break
2509done
2510
2511fi
2512fi
2513GREP=$ac_cv_prog_GREP
2514if test -n "$GREP"; then
2515  echo "$as_me:2515: result: $GREP" >&5
2516echo "${ECHO_T}$GREP" >&6
2517else
2518  echo "$as_me:2518: result: no" >&5
2519echo "${ECHO_T}no" >&6
2520fi
2521
2522  test -n "$GREP" && break
2523done
2524test -n "$GREP" || GREP=": "
2525
2526echo "$as_me:2526: checking for egrep" >&5
2527echo $ECHO_N "checking for egrep... $ECHO_C" >&6
2528if test "${ac_cv_path_EGREP+set}" = set; then
2529  echo $ECHO_N "(cached) $ECHO_C" >&6
2530else
2531  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
2532   then ac_cv_path_EGREP="$GREP -E"
2533   else
2534     for ac_prog in gegrep egrep
2535do
2536  # Extract the first word of "$ac_prog", so it can be a program name with args.
2537set dummy $ac_prog; ac_word=$2
2538echo "$as_me:2538: checking for $ac_word" >&5
2539echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2540if test "${ac_cv_path_EGREP+set}" = set; then
2541  echo $ECHO_N "(cached) $ECHO_C" >&6
2542else
2543  case $EGREP in
2544  [\\/]* | ?:[\\/]*)
2545  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
2546  ;;
2547  *)
2548  ac_save_IFS=$IFS; IFS=$ac_path_separator
2549ac_dummy="$PATH"
2550for ac_dir in $ac_dummy; do
2551  IFS=$ac_save_IFS
2552  test -z "$ac_dir" && ac_dir=.
2553  if $as_executable_p "$ac_dir/$ac_word"; then
2554   ac_cv_path_EGREP="$ac_dir/$ac_word"
2555   echo "$as_me:2555: found $ac_dir/$ac_word" >&5
2556   break
2557fi
2558done
2559
2560  ;;
2561esac
2562fi
2563EGREP=$ac_cv_path_EGREP
2564
2565if test -n "$EGREP"; then
2566  echo "$as_me:2566: result: $EGREP" >&5
2567echo "${ECHO_T}$EGREP" >&6
2568else
2569  echo "$as_me:2569: result: no" >&5
2570echo "${ECHO_T}no" >&6
2571fi
2572
2573  test -n "$EGREP" && break
2574done
2575test -n "$EGREP" || EGREP=": "
2576
2577     test "x$ac_cv_path_EGREP" = "x:" && { { echo "$as_me:2577: error: cannot find workable egrep" >&5
2578echo "$as_me: error: cannot find workable egrep" >&2;}
2579   { (exit 1); exit 1; }; }
2580   fi
2581fi
2582echo "$as_me:2582: result: $ac_cv_path_EGREP" >&5
2583echo "${ECHO_T}$ac_cv_path_EGREP" >&6
2584 EGREP="$ac_cv_path_EGREP"
2585
2586ac_ext=c
2587ac_cpp='$CPP $CPPFLAGS'
2588ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
2589ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
2590ac_compiler_gnu=$ac_cv_c_compiler_gnu
2591ac_main_return="return"
2592echo "$as_me:2592: checking how to run the C preprocessor" >&5
2593echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2594# On Suns, sometimes $CPP names a directory.
2595if test -n "$CPP" && test -d "$CPP"; then
2596  CPP=
2597fi
2598if test -z "$CPP"; then
2599  if test "${ac_cv_prog_CPP+set}" = set; then
2600  echo $ECHO_N "(cached) $ECHO_C" >&6
2601else
2602      # Double quotes because CPP needs to be expanded
2603    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2604    do
2605      ac_preproc_ok=false
2606for ac_c_preproc_warn_flag in '' yes
2607do
2608  # Use a header file that comes with gcc, so configuring glibc
2609  # with a fresh cross-compiler works.
2610  # On the NeXT, cc -E runs the code through the compiler's parser,
2611  # not just through cpp. "Syntax error" is here to catch this case.
2612  cat >"conftest.$ac_ext" <<_ACEOF
2613#line 2613 "configure"
2614#include "confdefs.h"
2615#include <assert.h>
2616                     Syntax error
2617_ACEOF
2618if { (eval echo "$as_me:2618: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2619  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2620  ac_status=$?
2621  $EGREP -v '^ *\+' conftest.er1 >conftest.err
2622  rm -f conftest.er1
2623  cat conftest.err >&5
2624  echo "$as_me:2624: \$? = $ac_status" >&5
2625  (exit "$ac_status"); } >/dev/null; then
2626  if test -s conftest.err; then
2627    ac_cpp_err=$ac_c_preproc_warn_flag
2628  else
2629    ac_cpp_err=
2630  fi
2631else
2632  ac_cpp_err=yes
2633fi
2634if test -z "$ac_cpp_err"; then
2635  :
2636else
2637  echo "$as_me: failed program was:" >&5
2638  cat "conftest.$ac_ext" >&5
2639  # Broken: fails on valid input.
2640continue
2641fi
2642rm -f conftest.err "conftest.$ac_ext"
2643
2644  # OK, works on sane cases.  Now check whether non-existent headers
2645  # can be detected and how.
2646  cat >"conftest.$ac_ext" <<_ACEOF
2647#line 2647 "configure"
2648#include "confdefs.h"
2649#include <ac_nonexistent.h>
2650_ACEOF
2651if { (eval echo "$as_me:2651: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2652  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2653  ac_status=$?
2654  $EGREP -v '^ *\+' conftest.er1 >conftest.err
2655  rm -f conftest.er1
2656  cat conftest.err >&5
2657  echo "$as_me:2657: \$? = $ac_status" >&5
2658  (exit "$ac_status"); } >/dev/null; then
2659  if test -s conftest.err; then
2660    ac_cpp_err=$ac_c_preproc_warn_flag
2661  else
2662    ac_cpp_err=
2663  fi
2664else
2665  ac_cpp_err=yes
2666fi
2667if test -z "$ac_cpp_err"; then
2668  # Broken: success on invalid input.
2669continue
2670else
2671  echo "$as_me: failed program was:" >&5
2672  cat "conftest.$ac_ext" >&5
2673  # Passes both tests.
2674ac_preproc_ok=:
2675break
2676fi
2677rm -f conftest.err "conftest.$ac_ext"
2678
2679done
2680# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2681rm -f conftest.err "conftest.$ac_ext"
2682if $ac_preproc_ok; then
2683  break
2684fi
2685
2686    done
2687    ac_cv_prog_CPP=$CPP
2688
2689fi
2690  CPP=$ac_cv_prog_CPP
2691else
2692  ac_cv_prog_CPP=$CPP
2693fi
2694echo "$as_me:2694: result: $CPP" >&5
2695echo "${ECHO_T}$CPP" >&6
2696ac_preproc_ok=false
2697for ac_c_preproc_warn_flag in '' yes
2698do
2699  # Use a header file that comes with gcc, so configuring glibc
2700  # with a fresh cross-compiler works.
2701  # On the NeXT, cc -E runs the code through the compiler's parser,
2702  # not just through cpp. "Syntax error" is here to catch this case.
2703  cat >"conftest.$ac_ext" <<_ACEOF
2704#line 2704 "configure"
2705#include "confdefs.h"
2706#include <assert.h>
2707                     Syntax error
2708_ACEOF
2709if { (eval echo "$as_me:2709: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2710  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2711  ac_status=$?
2712  $EGREP -v '^ *\+' conftest.er1 >conftest.err
2713  rm -f conftest.er1
2714  cat conftest.err >&5
2715  echo "$as_me:2715: \$? = $ac_status" >&5
2716  (exit "$ac_status"); } >/dev/null; then
2717  if test -s conftest.err; then
2718    ac_cpp_err=$ac_c_preproc_warn_flag
2719  else
2720    ac_cpp_err=
2721  fi
2722else
2723  ac_cpp_err=yes
2724fi
2725if test -z "$ac_cpp_err"; then
2726  :
2727else
2728  echo "$as_me: failed program was:" >&5
2729  cat "conftest.$ac_ext" >&5
2730  # Broken: fails on valid input.
2731continue
2732fi
2733rm -f conftest.err "conftest.$ac_ext"
2734
2735  # OK, works on sane cases.  Now check whether non-existent headers
2736  # can be detected and how.
2737  cat >"conftest.$ac_ext" <<_ACEOF
2738#line 2738 "configure"
2739#include "confdefs.h"
2740#include <ac_nonexistent.h>
2741_ACEOF
2742if { (eval echo "$as_me:2742: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2743  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2744  ac_status=$?
2745  $EGREP -v '^ *\+' conftest.er1 >conftest.err
2746  rm -f conftest.er1
2747  cat conftest.err >&5
2748  echo "$as_me:2748: \$? = $ac_status" >&5
2749  (exit "$ac_status"); } >/dev/null; then
2750  if test -s conftest.err; then
2751    ac_cpp_err=$ac_c_preproc_warn_flag
2752  else
2753    ac_cpp_err=
2754  fi
2755else
2756  ac_cpp_err=yes
2757fi
2758if test -z "$ac_cpp_err"; then
2759  # Broken: success on invalid input.
2760continue
2761else
2762  echo "$as_me: failed program was:" >&5
2763  cat "conftest.$ac_ext" >&5
2764  # Passes both tests.
2765ac_preproc_ok=:
2766break
2767fi
2768rm -f conftest.err "conftest.$ac_ext"
2769
2770done
2771# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2772rm -f conftest.err "conftest.$ac_ext"
2773if $ac_preproc_ok; then
2774  :
2775else
2776  { { echo "$as_me:2776: error: C preprocessor \"$CPP\" fails sanity check" >&5
2777echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2778   { (exit 1); exit 1; }; }
2779fi
2780
2781ac_ext=c
2782ac_cpp='$CPP $CPPFLAGS'
2783ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
2784ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
2785ac_compiler_gnu=$ac_cv_c_compiler_gnu
2786ac_main_return="return"
2787
2788for ac_prog in mawk gawk nawk awk
2789do
2790  # Extract the first word of "$ac_prog", so it can be a program name with args.
2791set dummy $ac_prog; ac_word=$2
2792echo "$as_me:2792: checking for $ac_word" >&5
2793echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2794if test "${ac_cv_prog_AWK+set}" = set; then
2795  echo $ECHO_N "(cached) $ECHO_C" >&6
2796else
2797  if test -n "$AWK"; then
2798  ac_cv_prog_AWK="$AWK" # Let the user override the test.
2799else
2800  ac_save_IFS=$IFS; IFS=$ac_path_separator
2801ac_dummy="$PATH"
2802for ac_dir in $ac_dummy; do
2803  IFS=$ac_save_IFS
2804  test -z "$ac_dir" && ac_dir=.
2805  $as_executable_p "$ac_dir/$ac_word" || continue
2806ac_cv_prog_AWK="$ac_prog"
2807echo "$as_me:2807: found $ac_dir/$ac_word" >&5
2808break
2809done
2810
2811fi
2812fi
2813AWK=$ac_cv_prog_AWK
2814if test -n "$AWK"; then
2815  echo "$as_me:2815: result: $AWK" >&5
2816echo "${ECHO_T}$AWK" >&6
2817else
2818  echo "$as_me:2818: result: no" >&5
2819echo "${ECHO_T}no" >&6
2820fi
2821
2822  test -n "$AWK" && break
2823done
2824
2825# Find a good install program.  We prefer a C program (faster),
2826# so one script is as good as another.  But avoid the broken or
2827# incompatible versions:
2828# SysV /etc/install, /usr/sbin/install
2829# SunOS /usr/etc/install
2830# IRIX /sbin/install
2831# AIX /bin/install
2832# AmigaOS /C/install, which installs bootblocks on floppy discs
2833# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2834# AFS /usr/afsws/bin/install, which mishandles nonexistent args
2835# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2836# ./install, which can be erroneously created by make from ./install.sh.
2837echo "$as_me:2837: checking for a BSD compatible install" >&5
2838echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
2839if test -z "$INSTALL"; then
2840if test "${ac_cv_path_install+set}" = set; then
2841  echo $ECHO_N "(cached) $ECHO_C" >&6
2842else
2843    ac_save_IFS=$IFS; IFS=$ac_path_separator
2844  for ac_dir in $PATH; do
2845    IFS=$ac_save_IFS
2846    # Account for people who put trailing slashes in PATH elements.
2847    case $ac_dir/ in
2848    / | ./ | .// | /cC/* \
2849    | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
2850    | /usr/ucb/* ) ;;
2851    *)
2852      # OSF1 and SCO ODT 3.0 have their own names for install.
2853      # Don't use installbsd from OSF since it installs stuff as root
2854      # by default.
2855      for ac_prog in ginstall scoinst install; do
2856        if $as_executable_p "$ac_dir/$ac_prog"; then
2857	  if test $ac_prog = install &&
2858            grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2859	    # AIX install.  It has an incompatible calling convention.
2860	    :
2861	  elif test $ac_prog = install &&
2862	    grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2863	    # program-specific install script used by HP pwplus--don't use.
2864	    :
2865	  else
2866	    ac_cv_path_install="$ac_dir/$ac_prog -c"
2867	    break 2
2868	  fi
2869	fi
2870      done
2871      ;;
2872    esac
2873  done
2874
2875fi
2876  if test "${ac_cv_path_install+set}" = set; then
2877    INSTALL=$ac_cv_path_install
2878  else
2879    # As a last resort, use the slow shell script.  We don't cache a
2880    # path for INSTALL within a source directory, because that will
2881    # break other packages using the cache if that directory is
2882    # removed, or if the path is relative.
2883    INSTALL=$ac_install_sh
2884  fi
2885fi
2886echo "$as_me:2886: result: $INSTALL" >&5
2887echo "${ECHO_T}$INSTALL" >&6
2888
2889# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2890# It thinks the first close brace ends the variable substitution.
2891test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2892
2893test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2894
2895test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2896
2897echo "$as_me:2897: checking whether ln -s works" >&5
2898echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
2899LN_S=$as_ln_s
2900if test "$LN_S" = "ln -s"; then
2901  echo "$as_me:2901: result: yes" >&5
2902echo "${ECHO_T}yes" >&6
2903else
2904  echo "$as_me:2904: result: no, using $LN_S" >&5
2905echo "${ECHO_T}no, using $LN_S" >&6
2906fi
2907
2908test "$program_prefix" != NONE &&
2909  program_transform_name="s,^,$program_prefix,;$program_transform_name"
2910# Use a double $ so make ignores it.
2911test "$program_suffix" != NONE &&
2912  program_transform_name="s,\$,$program_suffix,;$program_transform_name"
2913# Double any \ or $.  echo might interpret backslashes.
2914# By default was `s,x,x', remove it if useless.
2915cat <<\_ACEOF >conftest.sed
2916s/[\\$]/&&/g;s/;s,x,x,$//
2917_ACEOF
2918program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
2919rm conftest.sed
2920
2921for ac_prog in lint cppcheck splint
2922do
2923  # Extract the first word of "$ac_prog", so it can be a program name with args.
2924set dummy $ac_prog; ac_word=$2
2925echo "$as_me:2925: checking for $ac_word" >&5
2926echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2927if test "${ac_cv_prog_LINT+set}" = set; then
2928  echo $ECHO_N "(cached) $ECHO_C" >&6
2929else
2930  if test -n "$LINT"; then
2931  ac_cv_prog_LINT="$LINT" # Let the user override the test.
2932else
2933  ac_save_IFS=$IFS; IFS=$ac_path_separator
2934ac_dummy="$PATH"
2935for ac_dir in $ac_dummy; do
2936  IFS=$ac_save_IFS
2937  test -z "$ac_dir" && ac_dir=.
2938  $as_executable_p "$ac_dir/$ac_word" || continue
2939ac_cv_prog_LINT="$ac_prog"
2940echo "$as_me:2940: found $ac_dir/$ac_word" >&5
2941break
2942done
2943
2944fi
2945fi
2946LINT=$ac_cv_prog_LINT
2947if test -n "$LINT"; then
2948  echo "$as_me:2948: result: $LINT" >&5
2949echo "${ECHO_T}$LINT" >&6
2950else
2951  echo "$as_me:2951: result: no" >&5
2952echo "${ECHO_T}no" >&6
2953fi
2954
2955  test -n "$LINT" && break
2956done
2957
2958case "x$LINT" in
2959(xcppcheck|x*/cppcheck)
2960	test -z "$LINT_OPTS" && LINT_OPTS="--enable=all"
2961	;;
2962esac
2963
2964###	checks for compiler characteristics
2965
2966echo "$as_me:2966: checking if the POSIX test-macros are already defined" >&5
2967echo $ECHO_N "checking if the POSIX test-macros are already defined... $ECHO_C" >&6
2968if test "${cf_cv_posix_visible+set}" = set; then
2969  echo $ECHO_N "(cached) $ECHO_C" >&6
2970else
2971
2972cat >"conftest.$ac_ext" <<_ACEOF
2973#line 2973 "configure"
2974#include "confdefs.h"
2975#include <stdio.h>
2976int
2977main (void)
2978{
2979
2980#if defined(__POSIX_VISIBLE) && ((__POSIX_VISIBLE - 0L) > 0) \
2981	&& defined(__XSI_VISIBLE) && ((__XSI_VISIBLE - 0L) > 0) \
2982	&& defined(__BSD_VISIBLE) && ((__BSD_VISIBLE - 0L) > 0) \
2983	&& defined(__ISO_C_VISIBLE) && ((__ISO_C_VISIBLE - 0L) > 0)
2984#error conflicting symbols found
2985#endif
2986
2987  ;
2988  return 0;
2989}
2990_ACEOF
2991rm -f "conftest.$ac_objext"
2992if { (eval echo "$as_me:2992: \"$ac_compile\"") >&5
2993  (eval $ac_compile) 2>&5
2994  ac_status=$?
2995  echo "$as_me:2995: \$? = $ac_status" >&5
2996  (exit "$ac_status"); } &&
2997         { ac_try='test -s "conftest.$ac_objext"'
2998  { (eval echo "$as_me:2998: \"$ac_try\"") >&5
2999  (eval $ac_try) 2>&5
3000  ac_status=$?
3001  echo "$as_me:3001: \$? = $ac_status" >&5
3002  (exit "$ac_status"); }; }; then
3003  cf_cv_posix_visible=no
3004else
3005  echo "$as_me: failed program was:" >&5
3006cat "conftest.$ac_ext" >&5
3007cf_cv_posix_visible=yes
3008fi
3009rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3010
3011fi
3012echo "$as_me:3012: result: $cf_cv_posix_visible" >&5
3013echo "${ECHO_T}$cf_cv_posix_visible" >&6
3014
3015if test "$cf_cv_posix_visible" = no; then
3016
3017cf_XOPEN_SOURCE=700
3018cf_POSIX_C_SOURCE=199506L
3019cf_xopen_source=
3020
3021case "$host_os" in
3022(aix[4-7]*)
3023	cf_xopen_source="-D_ALL_SOURCE"
3024	;;
3025(msys)
3026	cf_XOPEN_SOURCE=600
3027	;;
3028(darwin[0-8].*)
3029	cf_xopen_source="-D_APPLE_C_SOURCE"
3030	;;
3031(darwin*)
3032	cf_xopen_source="-D_DARWIN_C_SOURCE"
3033	cf_XOPEN_SOURCE=
3034	;;
3035(freebsd*|dragonfly*|midnightbsd*)
3036	# 5.x headers associate
3037	#	_XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
3038	#	_XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
3039	cf_POSIX_C_SOURCE=200112L
3040	cf_XOPEN_SOURCE=600
3041	cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
3042	;;
3043(hpux11*)
3044	cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
3045	;;
3046(hpux*)
3047	cf_xopen_source="-D_HPUX_SOURCE"
3048	;;
3049(irix[56].*)
3050	cf_xopen_source="-D_SGI_SOURCE"
3051	cf_XOPEN_SOURCE=
3052	;;
3053(linux*|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
3054
3055cf_gnu_xopen_source=$cf_XOPEN_SOURCE
3056
3057echo "$as_me:3057: checking if this is the GNU C library" >&5
3058echo $ECHO_N "checking if this is the GNU C library... $ECHO_C" >&6
3059if test "${cf_cv_gnu_library+set}" = set; then
3060  echo $ECHO_N "(cached) $ECHO_C" >&6
3061else
3062
3063cat >"conftest.$ac_ext" <<_ACEOF
3064#line 3064 "configure"
3065#include "confdefs.h"
3066#include <sys/types.h>
3067int
3068main (void)
3069{
3070
3071	#if __GLIBC__ > 0 && __GLIBC_MINOR__ >= 0
3072		return 0;
3073	#elif __NEWLIB__ > 0 && __NEWLIB_MINOR__ >= 0
3074		return 0;
3075	#else
3076	#	error not GNU C library
3077	#endif
3078  ;
3079  return 0;
3080}
3081_ACEOF
3082rm -f "conftest.$ac_objext"
3083if { (eval echo "$as_me:3083: \"$ac_compile\"") >&5
3084  (eval $ac_compile) 2>&5
3085  ac_status=$?
3086  echo "$as_me:3086: \$? = $ac_status" >&5
3087  (exit "$ac_status"); } &&
3088         { ac_try='test -s "conftest.$ac_objext"'
3089  { (eval echo "$as_me:3089: \"$ac_try\"") >&5
3090  (eval $ac_try) 2>&5
3091  ac_status=$?
3092  echo "$as_me:3092: \$? = $ac_status" >&5
3093  (exit "$ac_status"); }; }; then
3094  cf_cv_gnu_library=yes
3095else
3096  echo "$as_me: failed program was:" >&5
3097cat "conftest.$ac_ext" >&5
3098cf_cv_gnu_library=no
3099fi
3100rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3101
3102fi
3103echo "$as_me:3103: result: $cf_cv_gnu_library" >&5
3104echo "${ECHO_T}$cf_cv_gnu_library" >&6
3105
3106if test x$cf_cv_gnu_library = xyes; then
3107
3108	# With glibc 2.19 (13 years after this check was begun), _DEFAULT_SOURCE
3109	# was changed to help a little.  newlib incorporated the change about 4
3110	# years later.
3111	echo "$as_me:3111: checking if _DEFAULT_SOURCE can be used as a basis" >&5
3112echo $ECHO_N "checking if _DEFAULT_SOURCE can be used as a basis... $ECHO_C" >&6
3113if test "${cf_cv_gnu_library_219+set}" = set; then
3114  echo $ECHO_N "(cached) $ECHO_C" >&6
3115else
3116
3117		cf_save="$CPPFLAGS"
3118
3119	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3120	CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
3121
3122		cat >"conftest.$ac_ext" <<_ACEOF
3123#line 3123 "configure"
3124#include "confdefs.h"
3125#include <sys/types.h>
3126int
3127main (void)
3128{
3129
3130			#if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19) || (__GLIBC__ > 2)
3131				return 0;
3132			#elif (__NEWLIB__ == 2 && __NEWLIB_MINOR__ >= 4) || (__GLIBC__ > 3)
3133				return 0;
3134			#else
3135			#	error GNU C library __GLIBC__.__GLIBC_MINOR__ is too old
3136			#endif
3137  ;
3138  return 0;
3139}
3140_ACEOF
3141rm -f "conftest.$ac_objext"
3142if { (eval echo "$as_me:3142: \"$ac_compile\"") >&5
3143  (eval $ac_compile) 2>&5
3144  ac_status=$?
3145  echo "$as_me:3145: \$? = $ac_status" >&5
3146  (exit "$ac_status"); } &&
3147         { ac_try='test -s "conftest.$ac_objext"'
3148  { (eval echo "$as_me:3148: \"$ac_try\"") >&5
3149  (eval $ac_try) 2>&5
3150  ac_status=$?
3151  echo "$as_me:3151: \$? = $ac_status" >&5
3152  (exit "$ac_status"); }; }; then
3153  cf_cv_gnu_library_219=yes
3154else
3155  echo "$as_me: failed program was:" >&5
3156cat "conftest.$ac_ext" >&5
3157cf_cv_gnu_library_219=no
3158fi
3159rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3160		CPPFLAGS="$cf_save"
3161
3162fi
3163echo "$as_me:3163: result: $cf_cv_gnu_library_219" >&5
3164echo "${ECHO_T}$cf_cv_gnu_library_219" >&6
3165
3166	if test "x$cf_cv_gnu_library_219" = xyes; then
3167		cf_save="$CPPFLAGS"
3168		echo "$as_me:3168: checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE" >&5
3169echo $ECHO_N "checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE... $ECHO_C" >&6
3170if test "${cf_cv_gnu_dftsrc_219+set}" = set; then
3171  echo $ECHO_N "(cached) $ECHO_C" >&6
3172else
3173
3174cf_fix_cppflags=no
3175cf_new_cflags=
3176cf_new_cppflags=
3177cf_new_extra_cppflags=
3178
3179for cf_add_cflags in -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=$cf_gnu_xopen_source
3180do
3181case "$cf_fix_cppflags" in
3182(no)
3183	case "$cf_add_cflags" in
3184	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
3185		case "$cf_add_cflags" in
3186		(-D*)
3187			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3188
3189			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3190				&& test -z "${cf_tst_cflags}" \
3191				&& cf_fix_cppflags=yes
3192
3193			if test "$cf_fix_cppflags" = yes ; then
3194
3195	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3196	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3197
3198				continue
3199			elif test "${cf_tst_cflags}" = "\"'" ; then
3200
3201	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3202	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3203
3204				continue
3205			fi
3206			;;
3207		esac
3208		case "$CPPFLAGS" in
3209		(*$cf_add_cflags)
3210			;;
3211		(*)
3212			case "$cf_add_cflags" in
3213			(-D*)
3214				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3215
3216CPPFLAGS=`echo "$CPPFLAGS" | \
3217	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
3218		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
3219
3220				;;
3221			esac
3222
3223	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
3224	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
3225
3226			;;
3227		esac
3228		;;
3229	(*)
3230
3231	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
3232	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
3233
3234		;;
3235	esac
3236	;;
3237(yes)
3238
3239	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3240	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3241
3242	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
3243
3244	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3245		&& test -z "${cf_tst_cflags}" \
3246		&& cf_fix_cppflags=no
3247	;;
3248esac
3249done
3250
3251if test -n "$cf_new_cflags" ; then
3252
3253	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
3254	CFLAGS="${CFLAGS}$cf_new_cflags"
3255
3256fi
3257
3258if test -n "$cf_new_cppflags" ; then
3259
3260	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3261	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
3262
3263fi
3264
3265if test -n "$cf_new_extra_cppflags" ; then
3266
3267	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
3268	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
3269
3270fi
3271
3272			cat >"conftest.$ac_ext" <<_ACEOF
3273#line 3273 "configure"
3274#include "confdefs.h"
3275
3276				#include <limits.h>
3277				#include <sys/types.h>
3278
3279int
3280main (void)
3281{
3282
3283				#if (_XOPEN_SOURCE >= $cf_gnu_xopen_source) && (MB_LEN_MAX > 1)
3284					return 0;
3285				#else
3286				#	error GNU C library is too old
3287				#endif
3288  ;
3289  return 0;
3290}
3291_ACEOF
3292rm -f "conftest.$ac_objext"
3293if { (eval echo "$as_me:3293: \"$ac_compile\"") >&5
3294  (eval $ac_compile) 2>&5
3295  ac_status=$?
3296  echo "$as_me:3296: \$? = $ac_status" >&5
3297  (exit "$ac_status"); } &&
3298         { ac_try='test -s "conftest.$ac_objext"'
3299  { (eval echo "$as_me:3299: \"$ac_try\"") >&5
3300  (eval $ac_try) 2>&5
3301  ac_status=$?
3302  echo "$as_me:3302: \$? = $ac_status" >&5
3303  (exit "$ac_status"); }; }; then
3304  cf_cv_gnu_dftsrc_219=yes
3305else
3306  echo "$as_me: failed program was:" >&5
3307cat "conftest.$ac_ext" >&5
3308cf_cv_gnu_dftsrc_219=no
3309fi
3310rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3311
3312fi
3313echo "$as_me:3313: result: $cf_cv_gnu_dftsrc_219" >&5
3314echo "${ECHO_T}$cf_cv_gnu_dftsrc_219" >&6
3315		test "x$cf_cv_gnu_dftsrc_219" = "xyes" || CPPFLAGS="$cf_save"
3316	else
3317		cf_cv_gnu_dftsrc_219=maybe
3318	fi
3319
3320	if test "x$cf_cv_gnu_dftsrc_219" != xyes; then
3321
3322		echo "$as_me:3322: checking if we must define _GNU_SOURCE" >&5
3323echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
3324if test "${cf_cv_gnu_source+set}" = set; then
3325  echo $ECHO_N "(cached) $ECHO_C" >&6
3326else
3327
3328		cat >"conftest.$ac_ext" <<_ACEOF
3329#line 3329 "configure"
3330#include "confdefs.h"
3331#include <sys/types.h>
3332int
3333main (void)
3334{
3335
3336			#ifndef _XOPEN_SOURCE
3337			#error	expected _XOPEN_SOURCE to be defined
3338			#endif
3339  ;
3340  return 0;
3341}
3342_ACEOF
3343rm -f "conftest.$ac_objext"
3344if { (eval echo "$as_me:3344: \"$ac_compile\"") >&5
3345  (eval $ac_compile) 2>&5
3346  ac_status=$?
3347  echo "$as_me:3347: \$? = $ac_status" >&5
3348  (exit "$ac_status"); } &&
3349         { ac_try='test -s "conftest.$ac_objext"'
3350  { (eval echo "$as_me:3350: \"$ac_try\"") >&5
3351  (eval $ac_try) 2>&5
3352  ac_status=$?
3353  echo "$as_me:3353: \$? = $ac_status" >&5
3354  (exit "$ac_status"); }; }; then
3355  cf_cv_gnu_source=no
3356else
3357  echo "$as_me: failed program was:" >&5
3358cat "conftest.$ac_ext" >&5
3359cf_save="$CPPFLAGS"
3360
3361cf_fix_cppflags=no
3362cf_new_cflags=
3363cf_new_cppflags=
3364cf_new_extra_cppflags=
3365
3366for cf_add_cflags in -D_GNU_SOURCE
3367do
3368case "$cf_fix_cppflags" in
3369(no)
3370	case "$cf_add_cflags" in
3371	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
3372		case "$cf_add_cflags" in
3373		(-D*)
3374			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3375
3376			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3377				&& test -z "${cf_tst_cflags}" \
3378				&& cf_fix_cppflags=yes
3379
3380			if test "$cf_fix_cppflags" = yes ; then
3381
3382	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3383	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3384
3385				continue
3386			elif test "${cf_tst_cflags}" = "\"'" ; then
3387
3388	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3389	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3390
3391				continue
3392			fi
3393			;;
3394		esac
3395		case "$CPPFLAGS" in
3396		(*$cf_add_cflags)
3397			;;
3398		(*)
3399			case "$cf_add_cflags" in
3400			(-D*)
3401				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3402
3403CPPFLAGS=`echo "$CPPFLAGS" | \
3404	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
3405		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
3406
3407				;;
3408			esac
3409
3410	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
3411	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
3412
3413			;;
3414		esac
3415		;;
3416	(*)
3417
3418	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
3419	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
3420
3421		;;
3422	esac
3423	;;
3424(yes)
3425
3426	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3427	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3428
3429	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
3430
3431	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3432		&& test -z "${cf_tst_cflags}" \
3433		&& cf_fix_cppflags=no
3434	;;
3435esac
3436done
3437
3438if test -n "$cf_new_cflags" ; then
3439
3440	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
3441	CFLAGS="${CFLAGS}$cf_new_cflags"
3442
3443fi
3444
3445if test -n "$cf_new_cppflags" ; then
3446
3447	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3448	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
3449
3450fi
3451
3452if test -n "$cf_new_extra_cppflags" ; then
3453
3454	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
3455	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
3456
3457fi
3458
3459			 cat >"conftest.$ac_ext" <<_ACEOF
3460#line 3460 "configure"
3461#include "confdefs.h"
3462#include <sys/types.h>
3463int
3464main (void)
3465{
3466
3467				#ifdef _XOPEN_SOURCE
3468				#error	expected _XOPEN_SOURCE to be undefined
3469				#endif
3470  ;
3471  return 0;
3472}
3473_ACEOF
3474rm -f "conftest.$ac_objext"
3475if { (eval echo "$as_me:3475: \"$ac_compile\"") >&5
3476  (eval $ac_compile) 2>&5
3477  ac_status=$?
3478  echo "$as_me:3478: \$? = $ac_status" >&5
3479  (exit "$ac_status"); } &&
3480         { ac_try='test -s "conftest.$ac_objext"'
3481  { (eval echo "$as_me:3481: \"$ac_try\"") >&5
3482  (eval $ac_try) 2>&5
3483  ac_status=$?
3484  echo "$as_me:3484: \$? = $ac_status" >&5
3485  (exit "$ac_status"); }; }; then
3486  cf_cv_gnu_source=no
3487else
3488  echo "$as_me: failed program was:" >&5
3489cat "conftest.$ac_ext" >&5
3490cf_cv_gnu_source=yes
3491fi
3492rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3493			CPPFLAGS="$cf_save"
3494
3495fi
3496rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3497
3498fi
3499echo "$as_me:3499: result: $cf_cv_gnu_source" >&5
3500echo "${ECHO_T}$cf_cv_gnu_source" >&6
3501
3502		if test "$cf_cv_gnu_source" = yes
3503		then
3504		echo "$as_me:3504: checking if we should also define _DEFAULT_SOURCE" >&5
3505echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
3506if test "${cf_cv_default_source+set}" = set; then
3507  echo $ECHO_N "(cached) $ECHO_C" >&6
3508else
3509
3510	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3511	CPPFLAGS="${CPPFLAGS}-D_GNU_SOURCE"
3512
3513			cat >"conftest.$ac_ext" <<_ACEOF
3514#line 3514 "configure"
3515#include "confdefs.h"
3516#include <sys/types.h>
3517int
3518main (void)
3519{
3520
3521				#ifdef _DEFAULT_SOURCE
3522				#error	expected _DEFAULT_SOURCE to be undefined
3523				#endif
3524  ;
3525  return 0;
3526}
3527_ACEOF
3528rm -f "conftest.$ac_objext"
3529if { (eval echo "$as_me:3529: \"$ac_compile\"") >&5
3530  (eval $ac_compile) 2>&5
3531  ac_status=$?
3532  echo "$as_me:3532: \$? = $ac_status" >&5
3533  (exit "$ac_status"); } &&
3534         { ac_try='test -s "conftest.$ac_objext"'
3535  { (eval echo "$as_me:3535: \"$ac_try\"") >&5
3536  (eval $ac_try) 2>&5
3537  ac_status=$?
3538  echo "$as_me:3538: \$? = $ac_status" >&5
3539  (exit "$ac_status"); }; }; then
3540  cf_cv_default_source=no
3541else
3542  echo "$as_me: failed program was:" >&5
3543cat "conftest.$ac_ext" >&5
3544cf_cv_default_source=yes
3545fi
3546rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3547
3548fi
3549echo "$as_me:3549: result: $cf_cv_default_source" >&5
3550echo "${ECHO_T}$cf_cv_default_source" >&6
3551			if test "$cf_cv_default_source" = yes
3552			then
3553
3554	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3555	CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
3556
3557			fi
3558		fi
3559	fi
3560
3561fi
3562
3563	;;
3564(minix*)
3565	cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
3566	;;
3567(mirbsd*)
3568	# setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
3569	cf_XOPEN_SOURCE=
3570
3571if test "$cf_cv_posix_visible" = no; then
3572
3573cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
3574
3575cf_save_CFLAGS="$CFLAGS"
3576cf_save_CPPFLAGS="$CPPFLAGS"
3577
3578cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
3579	sed	-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
3580		-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?$//g'`
3581
3582cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
3583	sed	-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
3584		-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?$//g'`
3585
3586echo "$as_me:3586: checking if we should define _POSIX_C_SOURCE" >&5
3587echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
3588if test "${cf_cv_posix_c_source+set}" = set; then
3589  echo $ECHO_N "(cached) $ECHO_C" >&6
3590else
3591
3592echo "${as_me:-configure}:3592: testing if the symbol is already defined go no further ..." 1>&5
3593
3594	cat >"conftest.$ac_ext" <<_ACEOF
3595#line 3595 "configure"
3596#include "confdefs.h"
3597#include <sys/types.h>
3598int
3599main (void)
3600{
3601
3602#ifndef _POSIX_C_SOURCE
3603make an error
3604#endif
3605  ;
3606  return 0;
3607}
3608_ACEOF
3609rm -f "conftest.$ac_objext"
3610if { (eval echo "$as_me:3610: \"$ac_compile\"") >&5
3611  (eval $ac_compile) 2>&5
3612  ac_status=$?
3613  echo "$as_me:3613: \$? = $ac_status" >&5
3614  (exit "$ac_status"); } &&
3615         { ac_try='test -s "conftest.$ac_objext"'
3616  { (eval echo "$as_me:3616: \"$ac_try\"") >&5
3617  (eval $ac_try) 2>&5
3618  ac_status=$?
3619  echo "$as_me:3619: \$? = $ac_status" >&5
3620  (exit "$ac_status"); }; }; then
3621  cf_cv_posix_c_source=no
3622else
3623  echo "$as_me: failed program was:" >&5
3624cat "conftest.$ac_ext" >&5
3625cf_want_posix_source=no
3626	 case .$cf_POSIX_C_SOURCE in
3627	 (.[12]??*)
3628		cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
3629		;;
3630	 (.2)
3631		cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
3632		cf_want_posix_source=yes
3633		;;
3634	 (.*)
3635		cf_want_posix_source=yes
3636		;;
3637	 esac
3638	 if test "$cf_want_posix_source" = yes ; then
3639		cat >"conftest.$ac_ext" <<_ACEOF
3640#line 3640 "configure"
3641#include "confdefs.h"
3642#include <sys/types.h>
3643int
3644main (void)
3645{
3646
3647#ifdef _POSIX_SOURCE
3648make an error
3649#endif
3650  ;
3651  return 0;
3652}
3653_ACEOF
3654rm -f "conftest.$ac_objext"
3655if { (eval echo "$as_me:3655: \"$ac_compile\"") >&5
3656  (eval $ac_compile) 2>&5
3657  ac_status=$?
3658  echo "$as_me:3658: \$? = $ac_status" >&5
3659  (exit "$ac_status"); } &&
3660         { ac_try='test -s "conftest.$ac_objext"'
3661  { (eval echo "$as_me:3661: \"$ac_try\"") >&5
3662  (eval $ac_try) 2>&5
3663  ac_status=$?
3664  echo "$as_me:3664: \$? = $ac_status" >&5
3665  (exit "$ac_status"); }; }; then
3666  :
3667else
3668  echo "$as_me: failed program was:" >&5
3669cat "conftest.$ac_ext" >&5
3670cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
3671fi
3672rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3673	 fi
3674
3675echo "${as_me:-configure}:3675: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
3676
3677	 CFLAGS="$cf_trim_CFLAGS"
3678	 CPPFLAGS="$cf_trim_CPPFLAGS"
3679
3680	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3681	CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
3682
3683echo "${as_me:-configure}:3683: testing if the second compile does not leave our definition intact error ..." 1>&5
3684
3685	 cat >"conftest.$ac_ext" <<_ACEOF
3686#line 3686 "configure"
3687#include "confdefs.h"
3688#include <sys/types.h>
3689int
3690main (void)
3691{
3692
3693#ifndef _POSIX_C_SOURCE
3694make an error
3695#endif
3696  ;
3697  return 0;
3698}
3699_ACEOF
3700rm -f "conftest.$ac_objext"
3701if { (eval echo "$as_me:3701: \"$ac_compile\"") >&5
3702  (eval $ac_compile) 2>&5
3703  ac_status=$?
3704  echo "$as_me:3704: \$? = $ac_status" >&5
3705  (exit "$ac_status"); } &&
3706         { ac_try='test -s "conftest.$ac_objext"'
3707  { (eval echo "$as_me:3707: \"$ac_try\"") >&5
3708  (eval $ac_try) 2>&5
3709  ac_status=$?
3710  echo "$as_me:3710: \$? = $ac_status" >&5
3711  (exit "$ac_status"); }; }; then
3712  :
3713else
3714  echo "$as_me: failed program was:" >&5
3715cat "conftest.$ac_ext" >&5
3716cf_cv_posix_c_source=no
3717fi
3718rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3719	 CFLAGS="$cf_save_CFLAGS"
3720	 CPPFLAGS="$cf_save_CPPFLAGS"
3721
3722fi
3723rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3724
3725fi
3726echo "$as_me:3726: result: $cf_cv_posix_c_source" >&5
3727echo "${ECHO_T}$cf_cv_posix_c_source" >&6
3728
3729if test "$cf_cv_posix_c_source" != no ; then
3730	CFLAGS="$cf_trim_CFLAGS"
3731	CPPFLAGS="$cf_trim_CPPFLAGS"
3732
3733cf_fix_cppflags=no
3734cf_new_cflags=
3735cf_new_cppflags=
3736cf_new_extra_cppflags=
3737
3738for cf_add_cflags in $cf_cv_posix_c_source
3739do
3740case "$cf_fix_cppflags" in
3741(no)
3742	case "$cf_add_cflags" in
3743	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
3744		case "$cf_add_cflags" in
3745		(-D*)
3746			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3747
3748			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3749				&& test -z "${cf_tst_cflags}" \
3750				&& cf_fix_cppflags=yes
3751
3752			if test "$cf_fix_cppflags" = yes ; then
3753
3754	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3755	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3756
3757				continue
3758			elif test "${cf_tst_cflags}" = "\"'" ; then
3759
3760	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3761	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3762
3763				continue
3764			fi
3765			;;
3766		esac
3767		case "$CPPFLAGS" in
3768		(*$cf_add_cflags)
3769			;;
3770		(*)
3771			case "$cf_add_cflags" in
3772			(-D*)
3773				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3774
3775CPPFLAGS=`echo "$CPPFLAGS" | \
3776	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
3777		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
3778
3779				;;
3780			esac
3781
3782	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
3783	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
3784
3785			;;
3786		esac
3787		;;
3788	(*)
3789
3790	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
3791	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
3792
3793		;;
3794	esac
3795	;;
3796(yes)
3797
3798	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3799	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3800
3801	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
3802
3803	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3804		&& test -z "${cf_tst_cflags}" \
3805		&& cf_fix_cppflags=no
3806	;;
3807esac
3808done
3809
3810if test -n "$cf_new_cflags" ; then
3811
3812	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
3813	CFLAGS="${CFLAGS}$cf_new_cflags"
3814
3815fi
3816
3817if test -n "$cf_new_cppflags" ; then
3818
3819	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3820	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
3821
3822fi
3823
3824if test -n "$cf_new_extra_cppflags" ; then
3825
3826	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
3827	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
3828
3829fi
3830
3831fi
3832
3833fi # cf_cv_posix_visible
3834
3835	;;
3836(netbsd*)
3837	cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
3838	;;
3839(openbsd[4-9]*)
3840	# setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
3841	cf_xopen_source="-D_BSD_SOURCE"
3842	cf_XOPEN_SOURCE=600
3843	;;
3844(openbsd*)
3845	# setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
3846	;;
3847(osf[45]*)
3848	cf_xopen_source="-D_OSF_SOURCE"
3849	;;
3850(nto-qnx*)
3851	cf_xopen_source="-D_QNX_SOURCE"
3852	;;
3853(sco*)
3854	# setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
3855	;;
3856(solaris2.*)
3857	cf_xopen_source="-D__EXTENSIONS__"
3858	cf_cv_xopen_source=broken
3859	;;
3860(sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
3861	cf_XOPEN_SOURCE=
3862	cf_POSIX_C_SOURCE=
3863	;;
3864(*)
3865
3866echo "$as_me:3866: checking if we should define _XOPEN_SOURCE" >&5
3867echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
3868if test "${cf_cv_xopen_source+set}" = set; then
3869  echo $ECHO_N "(cached) $ECHO_C" >&6
3870else
3871
3872	cat >"conftest.$ac_ext" <<_ACEOF
3873#line 3873 "configure"
3874#include "confdefs.h"
3875
3876#include <stdlib.h>
3877#include <string.h>
3878#include <sys/types.h>
3879
3880int
3881main (void)
3882{
3883
3884#ifndef _XOPEN_SOURCE
3885make an error
3886#endif
3887  ;
3888  return 0;
3889}
3890_ACEOF
3891rm -f "conftest.$ac_objext"
3892if { (eval echo "$as_me:3892: \"$ac_compile\"") >&5
3893  (eval $ac_compile) 2>&5
3894  ac_status=$?
3895  echo "$as_me:3895: \$? = $ac_status" >&5
3896  (exit "$ac_status"); } &&
3897         { ac_try='test -s "conftest.$ac_objext"'
3898  { (eval echo "$as_me:3898: \"$ac_try\"") >&5
3899  (eval $ac_try) 2>&5
3900  ac_status=$?
3901  echo "$as_me:3901: \$? = $ac_status" >&5
3902  (exit "$ac_status"); }; }; then
3903  cf_cv_xopen_source=no
3904else
3905  echo "$as_me: failed program was:" >&5
3906cat "conftest.$ac_ext" >&5
3907cf_save="$CPPFLAGS"
3908
3909	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3910	CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
3911
3912	 cat >"conftest.$ac_ext" <<_ACEOF
3913#line 3913 "configure"
3914#include "confdefs.h"
3915
3916#include <stdlib.h>
3917#include <string.h>
3918#include <sys/types.h>
3919
3920int
3921main (void)
3922{
3923
3924#ifdef _XOPEN_SOURCE
3925make an error
3926#endif
3927  ;
3928  return 0;
3929}
3930_ACEOF
3931rm -f "conftest.$ac_objext"
3932if { (eval echo "$as_me:3932: \"$ac_compile\"") >&5
3933  (eval $ac_compile) 2>&5
3934  ac_status=$?
3935  echo "$as_me:3935: \$? = $ac_status" >&5
3936  (exit "$ac_status"); } &&
3937         { ac_try='test -s "conftest.$ac_objext"'
3938  { (eval echo "$as_me:3938: \"$ac_try\"") >&5
3939  (eval $ac_try) 2>&5
3940  ac_status=$?
3941  echo "$as_me:3941: \$? = $ac_status" >&5
3942  (exit "$ac_status"); }; }; then
3943  cf_cv_xopen_source=no
3944else
3945  echo "$as_me: failed program was:" >&5
3946cat "conftest.$ac_ext" >&5
3947cf_cv_xopen_source=$cf_XOPEN_SOURCE
3948fi
3949rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3950	CPPFLAGS="$cf_save"
3951
3952fi
3953rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3954
3955fi
3956echo "$as_me:3956: result: $cf_cv_xopen_source" >&5
3957echo "${ECHO_T}$cf_cv_xopen_source" >&6
3958
3959if test "$cf_cv_xopen_source" != no ; then
3960
3961CFLAGS=`echo "$CFLAGS" | \
3962	sed	-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
3963		-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?$//g'`
3964
3965CPPFLAGS=`echo "$CPPFLAGS" | \
3966	sed	-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
3967		-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?$//g'`
3968
3969	cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
3970
3971cf_fix_cppflags=no
3972cf_new_cflags=
3973cf_new_cppflags=
3974cf_new_extra_cppflags=
3975
3976for cf_add_cflags in $cf_temp_xopen_source
3977do
3978case "$cf_fix_cppflags" in
3979(no)
3980	case "$cf_add_cflags" in
3981	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
3982		case "$cf_add_cflags" in
3983		(-D*)
3984			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3985
3986			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3987				&& test -z "${cf_tst_cflags}" \
3988				&& cf_fix_cppflags=yes
3989
3990			if test "$cf_fix_cppflags" = yes ; then
3991
3992	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3993	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3994
3995				continue
3996			elif test "${cf_tst_cflags}" = "\"'" ; then
3997
3998	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3999	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4000
4001				continue
4002			fi
4003			;;
4004		esac
4005		case "$CPPFLAGS" in
4006		(*$cf_add_cflags)
4007			;;
4008		(*)
4009			case "$cf_add_cflags" in
4010			(-D*)
4011				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4012
4013CPPFLAGS=`echo "$CPPFLAGS" | \
4014	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
4015		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
4016
4017				;;
4018			esac
4019
4020	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4021	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4022
4023			;;
4024		esac
4025		;;
4026	(*)
4027
4028	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4029	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4030
4031		;;
4032	esac
4033	;;
4034(yes)
4035
4036	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4037	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4038
4039	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
4040
4041	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4042		&& test -z "${cf_tst_cflags}" \
4043		&& cf_fix_cppflags=no
4044	;;
4045esac
4046done
4047
4048if test -n "$cf_new_cflags" ; then
4049
4050	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4051	CFLAGS="${CFLAGS}$cf_new_cflags"
4052
4053fi
4054
4055if test -n "$cf_new_cppflags" ; then
4056
4057	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4058	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4059
4060fi
4061
4062if test -n "$cf_new_extra_cppflags" ; then
4063
4064	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4065	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4066
4067fi
4068
4069fi
4070
4071if test "$cf_cv_posix_visible" = no; then
4072
4073cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
4074
4075cf_save_CFLAGS="$CFLAGS"
4076cf_save_CPPFLAGS="$CPPFLAGS"
4077
4078cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
4079	sed	-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
4080		-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?$//g'`
4081
4082cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
4083	sed	-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
4084		-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?$//g'`
4085
4086echo "$as_me:4086: checking if we should define _POSIX_C_SOURCE" >&5
4087echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
4088if test "${cf_cv_posix_c_source+set}" = set; then
4089  echo $ECHO_N "(cached) $ECHO_C" >&6
4090else
4091
4092echo "${as_me:-configure}:4092: testing if the symbol is already defined go no further ..." 1>&5
4093
4094	cat >"conftest.$ac_ext" <<_ACEOF
4095#line 4095 "configure"
4096#include "confdefs.h"
4097#include <sys/types.h>
4098int
4099main (void)
4100{
4101
4102#ifndef _POSIX_C_SOURCE
4103make an error
4104#endif
4105  ;
4106  return 0;
4107}
4108_ACEOF
4109rm -f "conftest.$ac_objext"
4110if { (eval echo "$as_me:4110: \"$ac_compile\"") >&5
4111  (eval $ac_compile) 2>&5
4112  ac_status=$?
4113  echo "$as_me:4113: \$? = $ac_status" >&5
4114  (exit "$ac_status"); } &&
4115         { ac_try='test -s "conftest.$ac_objext"'
4116  { (eval echo "$as_me:4116: \"$ac_try\"") >&5
4117  (eval $ac_try) 2>&5
4118  ac_status=$?
4119  echo "$as_me:4119: \$? = $ac_status" >&5
4120  (exit "$ac_status"); }; }; then
4121  cf_cv_posix_c_source=no
4122else
4123  echo "$as_me: failed program was:" >&5
4124cat "conftest.$ac_ext" >&5
4125cf_want_posix_source=no
4126	 case .$cf_POSIX_C_SOURCE in
4127	 (.[12]??*)
4128		cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
4129		;;
4130	 (.2)
4131		cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
4132		cf_want_posix_source=yes
4133		;;
4134	 (.*)
4135		cf_want_posix_source=yes
4136		;;
4137	 esac
4138	 if test "$cf_want_posix_source" = yes ; then
4139		cat >"conftest.$ac_ext" <<_ACEOF
4140#line 4140 "configure"
4141#include "confdefs.h"
4142#include <sys/types.h>
4143int
4144main (void)
4145{
4146
4147#ifdef _POSIX_SOURCE
4148make an error
4149#endif
4150  ;
4151  return 0;
4152}
4153_ACEOF
4154rm -f "conftest.$ac_objext"
4155if { (eval echo "$as_me:4155: \"$ac_compile\"") >&5
4156  (eval $ac_compile) 2>&5
4157  ac_status=$?
4158  echo "$as_me:4158: \$? = $ac_status" >&5
4159  (exit "$ac_status"); } &&
4160         { ac_try='test -s "conftest.$ac_objext"'
4161  { (eval echo "$as_me:4161: \"$ac_try\"") >&5
4162  (eval $ac_try) 2>&5
4163  ac_status=$?
4164  echo "$as_me:4164: \$? = $ac_status" >&5
4165  (exit "$ac_status"); }; }; then
4166  :
4167else
4168  echo "$as_me: failed program was:" >&5
4169cat "conftest.$ac_ext" >&5
4170cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
4171fi
4172rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4173	 fi
4174
4175echo "${as_me:-configure}:4175: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
4176
4177	 CFLAGS="$cf_trim_CFLAGS"
4178	 CPPFLAGS="$cf_trim_CPPFLAGS"
4179
4180	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4181	CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
4182
4183echo "${as_me:-configure}:4183: testing if the second compile does not leave our definition intact error ..." 1>&5
4184
4185	 cat >"conftest.$ac_ext" <<_ACEOF
4186#line 4186 "configure"
4187#include "confdefs.h"
4188#include <sys/types.h>
4189int
4190main (void)
4191{
4192
4193#ifndef _POSIX_C_SOURCE
4194make an error
4195#endif
4196  ;
4197  return 0;
4198}
4199_ACEOF
4200rm -f "conftest.$ac_objext"
4201if { (eval echo "$as_me:4201: \"$ac_compile\"") >&5
4202  (eval $ac_compile) 2>&5
4203  ac_status=$?
4204  echo "$as_me:4204: \$? = $ac_status" >&5
4205  (exit "$ac_status"); } &&
4206         { ac_try='test -s "conftest.$ac_objext"'
4207  { (eval echo "$as_me:4207: \"$ac_try\"") >&5
4208  (eval $ac_try) 2>&5
4209  ac_status=$?
4210  echo "$as_me:4210: \$? = $ac_status" >&5
4211  (exit "$ac_status"); }; }; then
4212  :
4213else
4214  echo "$as_me: failed program was:" >&5
4215cat "conftest.$ac_ext" >&5
4216cf_cv_posix_c_source=no
4217fi
4218rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4219	 CFLAGS="$cf_save_CFLAGS"
4220	 CPPFLAGS="$cf_save_CPPFLAGS"
4221
4222fi
4223rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4224
4225fi
4226echo "$as_me:4226: result: $cf_cv_posix_c_source" >&5
4227echo "${ECHO_T}$cf_cv_posix_c_source" >&6
4228
4229if test "$cf_cv_posix_c_source" != no ; then
4230	CFLAGS="$cf_trim_CFLAGS"
4231	CPPFLAGS="$cf_trim_CPPFLAGS"
4232
4233cf_fix_cppflags=no
4234cf_new_cflags=
4235cf_new_cppflags=
4236cf_new_extra_cppflags=
4237
4238for cf_add_cflags in $cf_cv_posix_c_source
4239do
4240case "$cf_fix_cppflags" in
4241(no)
4242	case "$cf_add_cflags" in
4243	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4244		case "$cf_add_cflags" in
4245		(-D*)
4246			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4247
4248			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4249				&& test -z "${cf_tst_cflags}" \
4250				&& cf_fix_cppflags=yes
4251
4252			if test "$cf_fix_cppflags" = yes ; then
4253
4254	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4255	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4256
4257				continue
4258			elif test "${cf_tst_cflags}" = "\"'" ; then
4259
4260	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4261	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4262
4263				continue
4264			fi
4265			;;
4266		esac
4267		case "$CPPFLAGS" in
4268		(*$cf_add_cflags)
4269			;;
4270		(*)
4271			case "$cf_add_cflags" in
4272			(-D*)
4273				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4274
4275CPPFLAGS=`echo "$CPPFLAGS" | \
4276	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
4277		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
4278
4279				;;
4280			esac
4281
4282	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4283	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4284
4285			;;
4286		esac
4287		;;
4288	(*)
4289
4290	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4291	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4292
4293		;;
4294	esac
4295	;;
4296(yes)
4297
4298	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4299	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4300
4301	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
4302
4303	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4304		&& test -z "${cf_tst_cflags}" \
4305		&& cf_fix_cppflags=no
4306	;;
4307esac
4308done
4309
4310if test -n "$cf_new_cflags" ; then
4311
4312	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4313	CFLAGS="${CFLAGS}$cf_new_cflags"
4314
4315fi
4316
4317if test -n "$cf_new_cppflags" ; then
4318
4319	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4320	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4321
4322fi
4323
4324if test -n "$cf_new_extra_cppflags" ; then
4325
4326	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4327	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4328
4329fi
4330
4331fi
4332
4333fi # cf_cv_posix_visible
4334
4335	;;
4336esac
4337
4338if test -n "$cf_xopen_source" ; then
4339
4340cf_fix_cppflags=no
4341cf_new_cflags=
4342cf_new_cppflags=
4343cf_new_extra_cppflags=
4344
4345for cf_add_cflags in $cf_xopen_source
4346do
4347case "$cf_fix_cppflags" in
4348(no)
4349	case "$cf_add_cflags" in
4350	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4351		case "$cf_add_cflags" in
4352		(-D*)
4353			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4354
4355			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4356				&& test -z "${cf_tst_cflags}" \
4357				&& cf_fix_cppflags=yes
4358
4359			if test "$cf_fix_cppflags" = yes ; then
4360
4361	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4362	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4363
4364				continue
4365			elif test "${cf_tst_cflags}" = "\"'" ; then
4366
4367	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4368	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4369
4370				continue
4371			fi
4372			;;
4373		esac
4374		case "$CPPFLAGS" in
4375		(*$cf_add_cflags)
4376			;;
4377		(*)
4378			case "$cf_add_cflags" in
4379			(-D*)
4380				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4381
4382CPPFLAGS=`echo "$CPPFLAGS" | \
4383	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
4384		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
4385
4386				;;
4387			esac
4388
4389	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4390	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4391
4392			;;
4393		esac
4394		;;
4395	(*)
4396
4397	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4398	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4399
4400		;;
4401	esac
4402	;;
4403(yes)
4404
4405	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4406	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4407
4408	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
4409
4410	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4411		&& test -z "${cf_tst_cflags}" \
4412		&& cf_fix_cppflags=no
4413	;;
4414esac
4415done
4416
4417if test -n "$cf_new_cflags" ; then
4418	test -n "$verbose" && echo "	add to \$CFLAGS $cf_new_cflags" 1>&6
4419
4420echo "${as_me:-configure}:4420: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
4421
4422	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4423	CFLAGS="${CFLAGS}$cf_new_cflags"
4424
4425fi
4426
4427if test -n "$cf_new_cppflags" ; then
4428	test -n "$verbose" && echo "	add to \$CPPFLAGS $cf_new_cppflags" 1>&6
4429
4430echo "${as_me:-configure}:4430: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
4431
4432	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4433	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4434
4435fi
4436
4437if test -n "$cf_new_extra_cppflags" ; then
4438	test -n "$verbose" && echo "	add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
4439
4440echo "${as_me:-configure}:4440: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
4441
4442	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4443	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4444
4445fi
4446
4447fi
4448
4449if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
4450	echo "$as_me:4450: checking if _XOPEN_SOURCE really is set" >&5
4451echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
4452	cat >"conftest.$ac_ext" <<_ACEOF
4453#line 4453 "configure"
4454#include "confdefs.h"
4455#include <stdlib.h>
4456int
4457main (void)
4458{
4459
4460#ifndef _XOPEN_SOURCE
4461make an error
4462#endif
4463  ;
4464  return 0;
4465}
4466_ACEOF
4467rm -f "conftest.$ac_objext"
4468if { (eval echo "$as_me:4468: \"$ac_compile\"") >&5
4469  (eval $ac_compile) 2>&5
4470  ac_status=$?
4471  echo "$as_me:4471: \$? = $ac_status" >&5
4472  (exit "$ac_status"); } &&
4473         { ac_try='test -s "conftest.$ac_objext"'
4474  { (eval echo "$as_me:4474: \"$ac_try\"") >&5
4475  (eval $ac_try) 2>&5
4476  ac_status=$?
4477  echo "$as_me:4477: \$? = $ac_status" >&5
4478  (exit "$ac_status"); }; }; then
4479  cf_XOPEN_SOURCE_set=yes
4480else
4481  echo "$as_me: failed program was:" >&5
4482cat "conftest.$ac_ext" >&5
4483cf_XOPEN_SOURCE_set=no
4484fi
4485rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4486	echo "$as_me:4486: result: $cf_XOPEN_SOURCE_set" >&5
4487echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
4488	if test "$cf_XOPEN_SOURCE_set" = yes
4489	then
4490		cat >"conftest.$ac_ext" <<_ACEOF
4491#line 4491 "configure"
4492#include "confdefs.h"
4493#include <stdlib.h>
4494int
4495main (void)
4496{
4497
4498#if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
4499make an error
4500#endif
4501  ;
4502  return 0;
4503}
4504_ACEOF
4505rm -f "conftest.$ac_objext"
4506if { (eval echo "$as_me:4506: \"$ac_compile\"") >&5
4507  (eval $ac_compile) 2>&5
4508  ac_status=$?
4509  echo "$as_me:4509: \$? = $ac_status" >&5
4510  (exit "$ac_status"); } &&
4511         { ac_try='test -s "conftest.$ac_objext"'
4512  { (eval echo "$as_me:4512: \"$ac_try\"") >&5
4513  (eval $ac_try) 2>&5
4514  ac_status=$?
4515  echo "$as_me:4515: \$? = $ac_status" >&5
4516  (exit "$ac_status"); }; }; then
4517  cf_XOPEN_SOURCE_set_ok=yes
4518else
4519  echo "$as_me: failed program was:" >&5
4520cat "conftest.$ac_ext" >&5
4521cf_XOPEN_SOURCE_set_ok=no
4522fi
4523rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4524		if test "$cf_XOPEN_SOURCE_set_ok" = no
4525		then
4526			{ echo "$as_me:4526: WARNING: _XOPEN_SOURCE is lower than requested" >&5
4527echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
4528		fi
4529	else
4530
4531echo "$as_me:4531: checking if we should define _XOPEN_SOURCE" >&5
4532echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
4533if test "${cf_cv_xopen_source+set}" = set; then
4534  echo $ECHO_N "(cached) $ECHO_C" >&6
4535else
4536
4537	cat >"conftest.$ac_ext" <<_ACEOF
4538#line 4538 "configure"
4539#include "confdefs.h"
4540
4541#include <stdlib.h>
4542#include <string.h>
4543#include <sys/types.h>
4544
4545int
4546main (void)
4547{
4548
4549#ifndef _XOPEN_SOURCE
4550make an error
4551#endif
4552  ;
4553  return 0;
4554}
4555_ACEOF
4556rm -f "conftest.$ac_objext"
4557if { (eval echo "$as_me:4557: \"$ac_compile\"") >&5
4558  (eval $ac_compile) 2>&5
4559  ac_status=$?
4560  echo "$as_me:4560: \$? = $ac_status" >&5
4561  (exit "$ac_status"); } &&
4562         { ac_try='test -s "conftest.$ac_objext"'
4563  { (eval echo "$as_me:4563: \"$ac_try\"") >&5
4564  (eval $ac_try) 2>&5
4565  ac_status=$?
4566  echo "$as_me:4566: \$? = $ac_status" >&5
4567  (exit "$ac_status"); }; }; then
4568  cf_cv_xopen_source=no
4569else
4570  echo "$as_me: failed program was:" >&5
4571cat "conftest.$ac_ext" >&5
4572cf_save="$CPPFLAGS"
4573
4574	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4575	CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
4576
4577	 cat >"conftest.$ac_ext" <<_ACEOF
4578#line 4578 "configure"
4579#include "confdefs.h"
4580
4581#include <stdlib.h>
4582#include <string.h>
4583#include <sys/types.h>
4584
4585int
4586main (void)
4587{
4588
4589#ifdef _XOPEN_SOURCE
4590make an error
4591#endif
4592  ;
4593  return 0;
4594}
4595_ACEOF
4596rm -f "conftest.$ac_objext"
4597if { (eval echo "$as_me:4597: \"$ac_compile\"") >&5
4598  (eval $ac_compile) 2>&5
4599  ac_status=$?
4600  echo "$as_me:4600: \$? = $ac_status" >&5
4601  (exit "$ac_status"); } &&
4602         { ac_try='test -s "conftest.$ac_objext"'
4603  { (eval echo "$as_me:4603: \"$ac_try\"") >&5
4604  (eval $ac_try) 2>&5
4605  ac_status=$?
4606  echo "$as_me:4606: \$? = $ac_status" >&5
4607  (exit "$ac_status"); }; }; then
4608  cf_cv_xopen_source=no
4609else
4610  echo "$as_me: failed program was:" >&5
4611cat "conftest.$ac_ext" >&5
4612cf_cv_xopen_source=$cf_XOPEN_SOURCE
4613fi
4614rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4615	CPPFLAGS="$cf_save"
4616
4617fi
4618rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4619
4620fi
4621echo "$as_me:4621: result: $cf_cv_xopen_source" >&5
4622echo "${ECHO_T}$cf_cv_xopen_source" >&6
4623
4624if test "$cf_cv_xopen_source" != no ; then
4625
4626CFLAGS=`echo "$CFLAGS" | \
4627	sed	-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
4628		-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?$//g'`
4629
4630CPPFLAGS=`echo "$CPPFLAGS" | \
4631	sed	-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
4632		-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?$//g'`
4633
4634	cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
4635
4636cf_fix_cppflags=no
4637cf_new_cflags=
4638cf_new_cppflags=
4639cf_new_extra_cppflags=
4640
4641for cf_add_cflags in $cf_temp_xopen_source
4642do
4643case "$cf_fix_cppflags" in
4644(no)
4645	case "$cf_add_cflags" in
4646	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4647		case "$cf_add_cflags" in
4648		(-D*)
4649			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4650
4651			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4652				&& test -z "${cf_tst_cflags}" \
4653				&& cf_fix_cppflags=yes
4654
4655			if test "$cf_fix_cppflags" = yes ; then
4656
4657	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4658	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4659
4660				continue
4661			elif test "${cf_tst_cflags}" = "\"'" ; then
4662
4663	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4664	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4665
4666				continue
4667			fi
4668			;;
4669		esac
4670		case "$CPPFLAGS" in
4671		(*$cf_add_cflags)
4672			;;
4673		(*)
4674			case "$cf_add_cflags" in
4675			(-D*)
4676				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4677
4678CPPFLAGS=`echo "$CPPFLAGS" | \
4679	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
4680		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
4681
4682				;;
4683			esac
4684
4685	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4686	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4687
4688			;;
4689		esac
4690		;;
4691	(*)
4692
4693	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4694	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4695
4696		;;
4697	esac
4698	;;
4699(yes)
4700
4701	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4702	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4703
4704	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
4705
4706	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4707		&& test -z "${cf_tst_cflags}" \
4708		&& cf_fix_cppflags=no
4709	;;
4710esac
4711done
4712
4713if test -n "$cf_new_cflags" ; then
4714
4715	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4716	CFLAGS="${CFLAGS}$cf_new_cflags"
4717
4718fi
4719
4720if test -n "$cf_new_cppflags" ; then
4721
4722	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4723	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4724
4725fi
4726
4727if test -n "$cf_new_extra_cppflags" ; then
4728
4729	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4730	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4731
4732fi
4733
4734fi
4735
4736	fi
4737fi
4738fi # cf_cv_posix_visible
4739
4740echo "$as_me:4740: checking if SIGWINCH is defined" >&5
4741echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
4742if test "${cf_cv_define_sigwinch+set}" = set; then
4743  echo $ECHO_N "(cached) $ECHO_C" >&6
4744else
4745
4746	cat >"conftest.$ac_ext" <<_ACEOF
4747#line 4747 "configure"
4748#include "confdefs.h"
4749
4750#include <sys/types.h>
4751#include <sys/signal.h>
4752
4753int
4754main (void)
4755{
4756int x = SIGWINCH; (void)x
4757  ;
4758  return 0;
4759}
4760_ACEOF
4761rm -f "conftest.$ac_objext"
4762if { (eval echo "$as_me:4762: \"$ac_compile\"") >&5
4763  (eval $ac_compile) 2>&5
4764  ac_status=$?
4765  echo "$as_me:4765: \$? = $ac_status" >&5
4766  (exit "$ac_status"); } &&
4767         { ac_try='test -s "conftest.$ac_objext"'
4768  { (eval echo "$as_me:4768: \"$ac_try\"") >&5
4769  (eval $ac_try) 2>&5
4770  ac_status=$?
4771  echo "$as_me:4771: \$? = $ac_status" >&5
4772  (exit "$ac_status"); }; }; then
4773  cf_cv_define_sigwinch=yes
4774else
4775  echo "$as_me: failed program was:" >&5
4776cat "conftest.$ac_ext" >&5
4777cat >"conftest.$ac_ext" <<_ACEOF
4778#line 4778 "configure"
4779#include "confdefs.h"
4780
4781#undef _XOPEN_SOURCE
4782#undef _POSIX_SOURCE
4783#undef _POSIX_C_SOURCE
4784#include <sys/types.h>
4785#include <sys/signal.h>
4786
4787int
4788main (void)
4789{
4790int x = SIGWINCH; (void)x
4791  ;
4792  return 0;
4793}
4794_ACEOF
4795rm -f "conftest.$ac_objext"
4796if { (eval echo "$as_me:4796: \"$ac_compile\"") >&5
4797  (eval $ac_compile) 2>&5
4798  ac_status=$?
4799  echo "$as_me:4799: \$? = $ac_status" >&5
4800  (exit "$ac_status"); } &&
4801         { ac_try='test -s "conftest.$ac_objext"'
4802  { (eval echo "$as_me:4802: \"$ac_try\"") >&5
4803  (eval $ac_try) 2>&5
4804  ac_status=$?
4805  echo "$as_me:4805: \$? = $ac_status" >&5
4806  (exit "$ac_status"); }; }; then
4807  cf_cv_define_sigwinch=maybe
4808else
4809  echo "$as_me: failed program was:" >&5
4810cat "conftest.$ac_ext" >&5
4811cf_cv_define_sigwinch=no
4812fi
4813rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4814
4815fi
4816rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4817
4818fi
4819echo "$as_me:4819: result: $cf_cv_define_sigwinch" >&5
4820echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
4821
4822if test "$cf_cv_define_sigwinch" = maybe ; then
4823echo "$as_me:4823: checking for actual SIGWINCH definition" >&5
4824echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
4825if test "${cf_cv_fixup_sigwinch+set}" = set; then
4826  echo $ECHO_N "(cached) $ECHO_C" >&6
4827else
4828
4829cf_cv_fixup_sigwinch=unknown
4830cf_sigwinch=32
4831while test "$cf_sigwinch" != 1
4832do
4833	cat >"conftest.$ac_ext" <<_ACEOF
4834#line 4834 "configure"
4835#include "confdefs.h"
4836
4837#undef _XOPEN_SOURCE
4838#undef _POSIX_SOURCE
4839#undef _POSIX_C_SOURCE
4840#include <sys/types.h>
4841#include <sys/signal.h>
4842
4843int
4844main (void)
4845{
4846
4847#if SIGWINCH != $cf_sigwinch
4848make an error
4849#endif
4850int x = SIGWINCH; (void)x
4851  ;
4852  return 0;
4853}
4854_ACEOF
4855rm -f "conftest.$ac_objext"
4856if { (eval echo "$as_me:4856: \"$ac_compile\"") >&5
4857  (eval $ac_compile) 2>&5
4858  ac_status=$?
4859  echo "$as_me:4859: \$? = $ac_status" >&5
4860  (exit "$ac_status"); } &&
4861         { ac_try='test -s "conftest.$ac_objext"'
4862  { (eval echo "$as_me:4862: \"$ac_try\"") >&5
4863  (eval $ac_try) 2>&5
4864  ac_status=$?
4865  echo "$as_me:4865: \$? = $ac_status" >&5
4866  (exit "$ac_status"); }; }; then
4867  cf_cv_fixup_sigwinch=$cf_sigwinch
4868	 break
4869else
4870  echo "$as_me: failed program was:" >&5
4871cat "conftest.$ac_ext" >&5
4872fi
4873rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4874
4875cf_sigwinch="`expr "$cf_sigwinch" - 1`"
4876done
4877
4878fi
4879echo "$as_me:4879: result: $cf_cv_fixup_sigwinch" >&5
4880echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
4881
4882	if test "$cf_cv_fixup_sigwinch" != unknown ; then
4883		CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
4884	fi
4885fi
4886
4887###	checks for header files
4888
4889for ac_header in \
4890ncurses/curses.h \
4891ncurses/term.h \
4892stdlib.h \
4893sys/ptem.h sys/ttydefaults.h \
4894term.h \
4895termios.h \
4896unistd.h \
4897wchar.h \
4898
4899do
4900as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4901echo "$as_me:4901: checking for $ac_header" >&5
4902echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4903if eval "test \"\${$as_ac_Header+set}\" = set"; then
4904  echo $ECHO_N "(cached) $ECHO_C" >&6
4905else
4906  cat >"conftest.$ac_ext" <<_ACEOF
4907#line 4907 "configure"
4908#include "confdefs.h"
4909#include <$ac_header>
4910_ACEOF
4911if { (eval echo "$as_me:4911: \"$ac_cpp "conftest.$ac_ext"\"") >&5
4912  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
4913  ac_status=$?
4914  $EGREP -v '^ *\+' conftest.er1 >conftest.err
4915  rm -f conftest.er1
4916  cat conftest.err >&5
4917  echo "$as_me:4917: \$? = $ac_status" >&5
4918  (exit "$ac_status"); } >/dev/null; then
4919  if test -s conftest.err; then
4920    ac_cpp_err=$ac_c_preproc_warn_flag
4921  else
4922    ac_cpp_err=
4923  fi
4924else
4925  ac_cpp_err=yes
4926fi
4927if test -z "$ac_cpp_err"; then
4928  eval "$as_ac_Header=yes"
4929else
4930  echo "$as_me: failed program was:" >&5
4931  cat "conftest.$ac_ext" >&5
4932  eval "$as_ac_Header=no"
4933fi
4934rm -f conftest.err "conftest.$ac_ext"
4935fi
4936echo "$as_me:4936: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
4937echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
4938if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
4939  cat >>confdefs.h <<EOF
4940#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4941EOF
4942
4943fi
4944done
4945
4946echo "$as_me:4946: checking whether time.h and sys/time.h may both be included" >&5
4947echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
4948if test "${ac_cv_header_time+set}" = set; then
4949  echo $ECHO_N "(cached) $ECHO_C" >&6
4950else
4951  cat >"conftest.$ac_ext" <<_ACEOF
4952#line 4952 "configure"
4953#include "confdefs.h"
4954#include <sys/types.h>
4955#include <sys/time.h>
4956#include <time.h>
4957
4958int
4959main (void)
4960{
4961if ((struct tm *) 0)
4962return 0;
4963  ;
4964  return 0;
4965}
4966_ACEOF
4967rm -f "conftest.$ac_objext"
4968if { (eval echo "$as_me:4968: \"$ac_compile\"") >&5
4969  (eval $ac_compile) 2>&5
4970  ac_status=$?
4971  echo "$as_me:4971: \$? = $ac_status" >&5
4972  (exit "$ac_status"); } &&
4973         { ac_try='test -s "conftest.$ac_objext"'
4974  { (eval echo "$as_me:4974: \"$ac_try\"") >&5
4975  (eval $ac_try) 2>&5
4976  ac_status=$?
4977  echo "$as_me:4977: \$? = $ac_status" >&5
4978  (exit "$ac_status"); }; }; then
4979  ac_cv_header_time=yes
4980else
4981  echo "$as_me: failed program was:" >&5
4982cat "conftest.$ac_ext" >&5
4983ac_cv_header_time=no
4984fi
4985rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4986fi
4987echo "$as_me:4987: result: $ac_cv_header_time" >&5
4988echo "${ECHO_T}$ac_cv_header_time" >&6
4989if test $ac_cv_header_time = yes; then
4990
4991cat >>confdefs.h <<\EOF
4992#define TIME_WITH_SYS_TIME 1
4993EOF
4994
4995fi
4996
4997echo "$as_me:4997: checking for nl_langinfo and CODESET" >&5
4998echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
4999if test "${am_cv_langinfo_codeset+set}" = set; then
5000  echo $ECHO_N "(cached) $ECHO_C" >&6
5001else
5002  cat >"conftest.$ac_ext" <<_ACEOF
5003#line 5003 "configure"
5004#include "confdefs.h"
5005#include <langinfo.h>
5006int
5007main (void)
5008{
5009char* cs = nl_langinfo(CODESET); (void)cs
5010  ;
5011  return 0;
5012}
5013_ACEOF
5014rm -f "conftest.$ac_objext" "conftest$ac_exeext"
5015if { (eval echo "$as_me:5015: \"$ac_link\"") >&5
5016  (eval $ac_link) 2>&5
5017  ac_status=$?
5018  echo "$as_me:5018: \$? = $ac_status" >&5
5019  (exit "$ac_status"); } &&
5020         { ac_try='test -s "conftest$ac_exeext"'
5021  { (eval echo "$as_me:5021: \"$ac_try\"") >&5
5022  (eval $ac_try) 2>&5
5023  ac_status=$?
5024  echo "$as_me:5024: \$? = $ac_status" >&5
5025  (exit "$ac_status"); }; }; then
5026  am_cv_langinfo_codeset=yes
5027else
5028  echo "$as_me: failed program was:" >&5
5029cat "conftest.$ac_ext" >&5
5030am_cv_langinfo_codeset=no
5031fi
5032rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
5033
5034fi
5035echo "$as_me:5035: result: $am_cv_langinfo_codeset" >&5
5036echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
5037	if test "$am_cv_langinfo_codeset" = yes; then
5038
5039cat >>confdefs.h <<\EOF
5040#define HAVE_LANGINFO_CODESET 1
5041EOF
5042
5043	fi
5044
5045###	checks for typedefs
5046
5047echo "$as_me:5047: checking for signal global datatype" >&5
5048echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
5049if test "${cf_cv_sig_atomic_t+set}" = set; then
5050  echo $ECHO_N "(cached) $ECHO_C" >&6
5051else
5052
5053	for cf_type in \
5054		"volatile sig_atomic_t" \
5055		"sig_atomic_t" \
5056		"int"
5057	do
5058	cat >"conftest.$ac_ext" <<_ACEOF
5059#line 5059 "configure"
5060#include "confdefs.h"
5061
5062#include <sys/types.h>
5063#include <signal.h>
5064#include <stdio.h>
5065
5066extern $cf_type x;
5067$cf_type x;
5068static void handler(int sig)
5069{
5070	(void)sig;
5071	x = 5;
5072}
5073int
5074main (void)
5075{
5076signal(SIGINT, handler);
5077		 x = 1
5078  ;
5079  return 0;
5080}
5081_ACEOF
5082rm -f "conftest.$ac_objext"
5083if { (eval echo "$as_me:5083: \"$ac_compile\"") >&5
5084  (eval $ac_compile) 2>&5
5085  ac_status=$?
5086  echo "$as_me:5086: \$? = $ac_status" >&5
5087  (exit "$ac_status"); } &&
5088         { ac_try='test -s "conftest.$ac_objext"'
5089  { (eval echo "$as_me:5089: \"$ac_try\"") >&5
5090  (eval $ac_try) 2>&5
5091  ac_status=$?
5092  echo "$as_me:5092: \$? = $ac_status" >&5
5093  (exit "$ac_status"); }; }; then
5094  cf_cv_sig_atomic_t=$cf_type
5095else
5096  echo "$as_me: failed program was:" >&5
5097cat "conftest.$ac_ext" >&5
5098cf_cv_sig_atomic_t=no
5099fi
5100rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5101		test "$cf_cv_sig_atomic_t" != no && break
5102	done
5103
5104fi
5105
5106echo "$as_me:5106: result: $cf_cv_sig_atomic_t" >&5
5107echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
5108test "$cf_cv_sig_atomic_t" != no &&
5109cat >>confdefs.h <<EOF
5110#define SIG_ATOMIC_T $cf_cv_sig_atomic_t
5111EOF
5112
5113echo "$as_me:5113: checking for ANSI C header files" >&5
5114echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
5115if test "${ac_cv_header_stdc+set}" = set; then
5116  echo $ECHO_N "(cached) $ECHO_C" >&6
5117else
5118  cat >"conftest.$ac_ext" <<_ACEOF
5119#line 5119 "configure"
5120#include "confdefs.h"
5121#include <stdlib.h>
5122#include <stdarg.h>
5123#include <string.h>
5124#include <float.h>
5125
5126_ACEOF
5127if { (eval echo "$as_me:5127: \"$ac_cpp "conftest.$ac_ext"\"") >&5
5128  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
5129  ac_status=$?
5130  $EGREP -v '^ *\+' conftest.er1 >conftest.err
5131  rm -f conftest.er1
5132  cat conftest.err >&5
5133  echo "$as_me:5133: \$? = $ac_status" >&5
5134  (exit "$ac_status"); } >/dev/null; then
5135  if test -s conftest.err; then
5136    ac_cpp_err=$ac_c_preproc_warn_flag
5137  else
5138    ac_cpp_err=
5139  fi
5140else
5141  ac_cpp_err=yes
5142fi
5143if test -z "$ac_cpp_err"; then
5144  ac_cv_header_stdc=yes
5145else
5146  echo "$as_me: failed program was:" >&5
5147  cat "conftest.$ac_ext" >&5
5148  ac_cv_header_stdc=no
5149fi
5150rm -f conftest.err "conftest.$ac_ext"
5151
5152if test $ac_cv_header_stdc = yes; then
5153  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5154  cat >"conftest.$ac_ext" <<_ACEOF
5155#line 5155 "configure"
5156#include "confdefs.h"
5157#include <string.h>
5158
5159_ACEOF
5160if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5161  $EGREP "memchr" >/dev/null 2>&1; then
5162  :
5163else
5164  ac_cv_header_stdc=no
5165fi
5166rm -rf conftest*
5167
5168fi
5169
5170if test $ac_cv_header_stdc = yes; then
5171  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5172  cat >"conftest.$ac_ext" <<_ACEOF
5173#line 5173 "configure"
5174#include "confdefs.h"
5175#include <stdlib.h>
5176
5177_ACEOF
5178if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5179  $EGREP "free" >/dev/null 2>&1; then
5180  :
5181else
5182  ac_cv_header_stdc=no
5183fi
5184rm -rf conftest*
5185
5186fi
5187
5188if test $ac_cv_header_stdc = yes; then
5189  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5190  if test "$cross_compiling" = yes; then
5191  :
5192else
5193  cat >"conftest.$ac_ext" <<_ACEOF
5194#line 5194 "configure"
5195#include "confdefs.h"
5196#include <ctype.h>
5197#if ((' ' & 0x0FF) == 0x020)
5198# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5199# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5200#else
5201# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
5202                     || ('j' <= (c) && (c) <= 'r') \
5203                     || ('s' <= (c) && (c) <= 'z'))
5204# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5205#endif
5206
5207#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5208int
5209main (void)
5210{
5211  int i;
5212  for (i = 0; i < 256; i++)
5213    if (XOR (islower (i), ISLOWER (i))
5214        || toupper (i) != TOUPPER (i))
5215      $ac_main_return(2);
5216  $ac_main_return (0);
5217}
5218_ACEOF
5219rm -f "conftest$ac_exeext"
5220if { (eval echo "$as_me:5220: \"$ac_link\"") >&5
5221  (eval $ac_link) 2>&5
5222  ac_status=$?
5223  echo "$as_me:5223: \$? = $ac_status" >&5
5224  (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
5225  { (eval echo "$as_me:5225: \"$ac_try\"") >&5
5226  (eval $ac_try) 2>&5
5227  ac_status=$?
5228  echo "$as_me:5228: \$? = $ac_status" >&5
5229  (exit "$ac_status"); }; }; then
5230  :
5231else
5232  echo "$as_me: program exited with status $ac_status" >&5
5233echo "$as_me: failed program was:" >&5
5234cat "conftest.$ac_ext" >&5
5235ac_cv_header_stdc=no
5236fi
5237rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
5238fi
5239fi
5240fi
5241echo "$as_me:5241: result: $ac_cv_header_stdc" >&5
5242echo "${ECHO_T}$ac_cv_header_stdc" >&6
5243if test $ac_cv_header_stdc = yes; then
5244
5245cat >>confdefs.h <<\EOF
5246#define STDC_HEADERS 1
5247EOF
5248
5249fi
5250
5251# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5252
5253for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5254                  inttypes.h stdint.h unistd.h
5255do
5256as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5257echo "$as_me:5257: checking for $ac_header" >&5
5258echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5259if eval "test \"\${$as_ac_Header+set}\" = set"; then
5260  echo $ECHO_N "(cached) $ECHO_C" >&6
5261else
5262  cat >"conftest.$ac_ext" <<_ACEOF
5263#line 5263 "configure"
5264#include "confdefs.h"
5265$ac_includes_default
5266#include <$ac_header>
5267_ACEOF
5268rm -f "conftest.$ac_objext"
5269if { (eval echo "$as_me:5269: \"$ac_compile\"") >&5
5270  (eval $ac_compile) 2>&5
5271  ac_status=$?
5272  echo "$as_me:5272: \$? = $ac_status" >&5
5273  (exit "$ac_status"); } &&
5274         { ac_try='test -s "conftest.$ac_objext"'
5275  { (eval echo "$as_me:5275: \"$ac_try\"") >&5
5276  (eval $ac_try) 2>&5
5277  ac_status=$?
5278  echo "$as_me:5278: \$? = $ac_status" >&5
5279  (exit "$ac_status"); }; }; then
5280  eval "$as_ac_Header=yes"
5281else
5282  echo "$as_me: failed program was:" >&5
5283cat "conftest.$ac_ext" >&5
5284eval "$as_ac_Header=no"
5285fi
5286rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5287fi
5288echo "$as_me:5288: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
5289echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
5290if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
5291  cat >>confdefs.h <<EOF
5292#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5293EOF
5294
5295fi
5296done
5297
5298echo "$as_me:5298: checking for time_t" >&5
5299echo $ECHO_N "checking for time_t... $ECHO_C" >&6
5300if test "${ac_cv_type_time_t+set}" = set; then
5301  echo $ECHO_N "(cached) $ECHO_C" >&6
5302else
5303  cat >"conftest.$ac_ext" <<_ACEOF
5304#line 5304 "configure"
5305#include "confdefs.h"
5306$ac_includes_default
5307int
5308main (void)
5309{
5310if ((time_t *) 0)
5311  return 0;
5312if (sizeof (time_t))
5313  return 0;
5314  ;
5315  return 0;
5316}
5317_ACEOF
5318rm -f "conftest.$ac_objext"
5319if { (eval echo "$as_me:5319: \"$ac_compile\"") >&5
5320  (eval $ac_compile) 2>&5
5321  ac_status=$?
5322  echo "$as_me:5322: \$? = $ac_status" >&5
5323  (exit "$ac_status"); } &&
5324         { ac_try='test -s "conftest.$ac_objext"'
5325  { (eval echo "$as_me:5325: \"$ac_try\"") >&5
5326  (eval $ac_try) 2>&5
5327  ac_status=$?
5328  echo "$as_me:5328: \$? = $ac_status" >&5
5329  (exit "$ac_status"); }; }; then
5330  ac_cv_type_time_t=yes
5331else
5332  echo "$as_me: failed program was:" >&5
5333cat "conftest.$ac_ext" >&5
5334ac_cv_type_time_t=no
5335fi
5336rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5337fi
5338echo "$as_me:5338: result: $ac_cv_type_time_t" >&5
5339echo "${ECHO_T}$ac_cv_type_time_t" >&6
5340if test "$ac_cv_type_time_t" = yes; then
5341  :
5342else
5343
5344cat >>confdefs.h <<EOF
5345#define time_t long
5346EOF
5347
5348fi
5349
5350echo "$as_me:5350: checking for cc_t in <termios.h> or <termio.h>" >&5
5351echo $ECHO_N "checking for cc_t in <termios.h> or <termio.h>... $ECHO_C" >&6
5352if test "${cf_cv_type_cc_t+set}" = set; then
5353  echo $ECHO_N "(cached) $ECHO_C" >&6
5354else
5355
5356	cat >"conftest.$ac_ext" <<_ACEOF
5357#line 5357 "configure"
5358#include "confdefs.h"
5359
5360#include <sys/types.h>
5361#if defined(HAVE_TERMIOS_H)
5362#include <termios.h>
5363#else
5364#include <termio.h>
5365#include <sys/ioctl.h>
5366#endif
5367
5368int
5369main (void)
5370{
5371cc_t x; (void)x
5372  ;
5373  return 0;
5374}
5375_ACEOF
5376rm -f "conftest.$ac_objext"
5377if { (eval echo "$as_me:5377: \"$ac_compile\"") >&5
5378  (eval $ac_compile) 2>&5
5379  ac_status=$?
5380  echo "$as_me:5380: \$? = $ac_status" >&5
5381  (exit "$ac_status"); } &&
5382         { ac_try='test -s "conftest.$ac_objext"'
5383  { (eval echo "$as_me:5383: \"$ac_try\"") >&5
5384  (eval $ac_try) 2>&5
5385  ac_status=$?
5386  echo "$as_me:5386: \$? = $ac_status" >&5
5387  (exit "$ac_status"); }; }; then
5388  cf_cv_type_cc_t=yes
5389else
5390  echo "$as_me: failed program was:" >&5
5391cat "conftest.$ac_ext" >&5
5392cf_cv_type_cc_t=no
5393fi
5394rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5395
5396fi
5397
5398echo "$as_me:5398: result: $cf_cv_type_cc_t" >&5
5399echo "${ECHO_T}$cf_cv_type_cc_t" >&6
5400test $cf_cv_type_cc_t = no &&
5401cat >>confdefs.h <<\EOF
5402#define cc_t unsigned char
5403EOF
5404
5405echo "$as_me:5405: checking for mode_t" >&5
5406echo $ECHO_N "checking for mode_t... $ECHO_C" >&6
5407if test "${ac_cv_type_mode_t+set}" = set; then
5408  echo $ECHO_N "(cached) $ECHO_C" >&6
5409else
5410  cat >"conftest.$ac_ext" <<_ACEOF
5411#line 5411 "configure"
5412#include "confdefs.h"
5413$ac_includes_default
5414int
5415main (void)
5416{
5417if ((mode_t *) 0)
5418  return 0;
5419if (sizeof (mode_t))
5420  return 0;
5421  ;
5422  return 0;
5423}
5424_ACEOF
5425rm -f "conftest.$ac_objext"
5426if { (eval echo "$as_me:5426: \"$ac_compile\"") >&5
5427  (eval $ac_compile) 2>&5
5428  ac_status=$?
5429  echo "$as_me:5429: \$? = $ac_status" >&5
5430  (exit "$ac_status"); } &&
5431         { ac_try='test -s "conftest.$ac_objext"'
5432  { (eval echo "$as_me:5432: \"$ac_try\"") >&5
5433  (eval $ac_try) 2>&5
5434  ac_status=$?
5435  echo "$as_me:5435: \$? = $ac_status" >&5
5436  (exit "$ac_status"); }; }; then
5437  ac_cv_type_mode_t=yes
5438else
5439  echo "$as_me: failed program was:" >&5
5440cat "conftest.$ac_ext" >&5
5441ac_cv_type_mode_t=no
5442fi
5443rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5444fi
5445echo "$as_me:5445: result: $ac_cv_type_mode_t" >&5
5446echo "${ECHO_T}$ac_cv_type_mode_t" >&6
5447if test "$ac_cv_type_mode_t" = yes; then
5448  :
5449else
5450
5451cat >>confdefs.h <<EOF
5452#define mode_t int
5453EOF
5454
5455fi
5456
5457echo "$as_me:5457: checking for pid_t" >&5
5458echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
5459if test "${ac_cv_type_pid_t+set}" = set; then
5460  echo $ECHO_N "(cached) $ECHO_C" >&6
5461else
5462  cat >"conftest.$ac_ext" <<_ACEOF
5463#line 5463 "configure"
5464#include "confdefs.h"
5465$ac_includes_default
5466int
5467main (void)
5468{
5469if ((pid_t *) 0)
5470  return 0;
5471if (sizeof (pid_t))
5472  return 0;
5473  ;
5474  return 0;
5475}
5476_ACEOF
5477rm -f "conftest.$ac_objext"
5478if { (eval echo "$as_me:5478: \"$ac_compile\"") >&5
5479  (eval $ac_compile) 2>&5
5480  ac_status=$?
5481  echo "$as_me:5481: \$? = $ac_status" >&5
5482  (exit "$ac_status"); } &&
5483         { ac_try='test -s "conftest.$ac_objext"'
5484  { (eval echo "$as_me:5484: \"$ac_try\"") >&5
5485  (eval $ac_try) 2>&5
5486  ac_status=$?
5487  echo "$as_me:5487: \$? = $ac_status" >&5
5488  (exit "$ac_status"); }; }; then
5489  ac_cv_type_pid_t=yes
5490else
5491  echo "$as_me: failed program was:" >&5
5492cat "conftest.$ac_ext" >&5
5493ac_cv_type_pid_t=no
5494fi
5495rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5496fi
5497echo "$as_me:5497: result: $ac_cv_type_pid_t" >&5
5498echo "${ECHO_T}$ac_cv_type_pid_t" >&6
5499if test "$ac_cv_type_pid_t" = yes; then
5500  :
5501else
5502
5503cat >>confdefs.h <<EOF
5504#define pid_t int
5505EOF
5506
5507fi
5508
5509echo "$as_me:5509: checking for uid_t in sys/types.h" >&5
5510echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
5511if test "${ac_cv_type_uid_t+set}" = set; then
5512  echo $ECHO_N "(cached) $ECHO_C" >&6
5513else
5514  cat >"conftest.$ac_ext" <<_ACEOF
5515#line 5515 "configure"
5516#include "confdefs.h"
5517#include <sys/types.h>
5518
5519_ACEOF
5520if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5521  $EGREP "uid_t" >/dev/null 2>&1; then
5522  ac_cv_type_uid_t=yes
5523else
5524  ac_cv_type_uid_t=no
5525fi
5526rm -rf conftest*
5527
5528fi
5529echo "$as_me:5529: result: $ac_cv_type_uid_t" >&5
5530echo "${ECHO_T}$ac_cv_type_uid_t" >&6
5531if test $ac_cv_type_uid_t = no; then
5532
5533cat >>confdefs.h <<\EOF
5534#define uid_t int
5535EOF
5536
5537cat >>confdefs.h <<\EOF
5538#define gid_t int
5539EOF
5540
5541fi
5542
5543echo "$as_me:5543: checking for off_t" >&5
5544echo $ECHO_N "checking for off_t... $ECHO_C" >&6
5545if test "${ac_cv_type_off_t+set}" = set; then
5546  echo $ECHO_N "(cached) $ECHO_C" >&6
5547else
5548  cat >"conftest.$ac_ext" <<_ACEOF
5549#line 5549 "configure"
5550#include "confdefs.h"
5551$ac_includes_default
5552int
5553main (void)
5554{
5555if ((off_t *) 0)
5556  return 0;
5557if (sizeof (off_t))
5558  return 0;
5559  ;
5560  return 0;
5561}
5562_ACEOF
5563rm -f "conftest.$ac_objext"
5564if { (eval echo "$as_me:5564: \"$ac_compile\"") >&5
5565  (eval $ac_compile) 2>&5
5566  ac_status=$?
5567  echo "$as_me:5567: \$? = $ac_status" >&5
5568  (exit "$ac_status"); } &&
5569         { ac_try='test -s "conftest.$ac_objext"'
5570  { (eval echo "$as_me:5570: \"$ac_try\"") >&5
5571  (eval $ac_try) 2>&5
5572  ac_status=$?
5573  echo "$as_me:5573: \$? = $ac_status" >&5
5574  (exit "$ac_status"); }; }; then
5575  ac_cv_type_off_t=yes
5576else
5577  echo "$as_me: failed program was:" >&5
5578cat "conftest.$ac_ext" >&5
5579ac_cv_type_off_t=no
5580fi
5581rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5582fi
5583echo "$as_me:5583: result: $ac_cv_type_off_t" >&5
5584echo "${ECHO_T}$ac_cv_type_off_t" >&6
5585if test "$ac_cv_type_off_t" = yes; then
5586  :
5587else
5588
5589cat >>confdefs.h <<EOF
5590#define off_t long
5591EOF
5592
5593fi
5594
5595###	checks for library functions
5596
5597for ac_func in \
5598	gethostname \
5599	getusershell \
5600	endusershell \
5601	getlogin \
5602	initgroups \
5603	mkdtemp \
5604	putenv \
5605	unsetenv \
5606	sched_yield \
5607	setpgid \
5608	strftime \
5609	tcgetattr \
5610	waitpid \
5611	wcswidth \
5612	wcwidth
5613do
5614as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
5615echo "$as_me:5615: checking for $ac_func" >&5
5616echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
5617if eval "test \"\${$as_ac_var+set}\" = set"; then
5618  echo $ECHO_N "(cached) $ECHO_C" >&6
5619else
5620  cat >"conftest.$ac_ext" <<_ACEOF
5621#line 5621 "configure"
5622#include "confdefs.h"
5623#define $ac_func autoconf_temporary
5624#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
5625#undef $ac_func
5626
5627#ifdef __cplusplus
5628extern "C"
5629#endif
5630
5631/* We use char because int might match the return type of a gcc2
5632   builtin and then its argument prototype would still apply.  */
5633char $ac_func (void);
5634
5635int
5636main (void)
5637{
5638
5639/* The GNU C library defines stubs for functions which it implements
5640    to always fail with ENOSYS.  Some functions are actually named
5641    something starting with __ and the normal name is an alias.  */
5642#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5643#error found stub for $ac_func
5644#endif
5645
5646	return $ac_func ();
5647  ;
5648  return 0;
5649}
5650_ACEOF
5651rm -f "conftest.$ac_objext" "conftest$ac_exeext"
5652if { (eval echo "$as_me:5652: \"$ac_link\"") >&5
5653  (eval $ac_link) 2>&5
5654  ac_status=$?
5655  echo "$as_me:5655: \$? = $ac_status" >&5
5656  (exit "$ac_status"); } &&
5657         { ac_try='test -s "conftest$ac_exeext"'
5658  { (eval echo "$as_me:5658: \"$ac_try\"") >&5
5659  (eval $ac_try) 2>&5
5660  ac_status=$?
5661  echo "$as_me:5661: \$? = $ac_status" >&5
5662  (exit "$ac_status"); }; }; then
5663  eval "$as_ac_var=yes"
5664else
5665  echo "$as_me: failed program was:" >&5
5666cat "conftest.$ac_ext" >&5
5667eval "$as_ac_var=no"
5668fi
5669rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
5670fi
5671echo "$as_me:5671: result: `eval echo '${'"$as_ac_var"'}'`" >&5
5672echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
5673if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
5674  cat >>confdefs.h <<EOF
5675#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
5676EOF
5677
5678fi
5679done
5680
5681for ac_header in lastlog.h paths.h
5682do
5683as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5684echo "$as_me:5684: checking for $ac_header" >&5
5685echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5686if eval "test \"\${$as_ac_Header+set}\" = set"; then
5687  echo $ECHO_N "(cached) $ECHO_C" >&6
5688else
5689  cat >"conftest.$ac_ext" <<_ACEOF
5690#line 5690 "configure"
5691#include "confdefs.h"
5692#include <$ac_header>
5693_ACEOF
5694if { (eval echo "$as_me:5694: \"$ac_cpp "conftest.$ac_ext"\"") >&5
5695  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
5696  ac_status=$?
5697  $EGREP -v '^ *\+' conftest.er1 >conftest.err
5698  rm -f conftest.er1
5699  cat conftest.err >&5
5700  echo "$as_me:5700: \$? = $ac_status" >&5
5701  (exit "$ac_status"); } >/dev/null; then
5702  if test -s conftest.err; then
5703    ac_cpp_err=$ac_c_preproc_warn_flag
5704  else
5705    ac_cpp_err=
5706  fi
5707else
5708  ac_cpp_err=yes
5709fi
5710if test -z "$ac_cpp_err"; then
5711  eval "$as_ac_Header=yes"
5712else
5713  echo "$as_me: failed program was:" >&5
5714  cat "conftest.$ac_ext" >&5
5715  eval "$as_ac_Header=no"
5716fi
5717rm -f conftest.err "conftest.$ac_ext"
5718fi
5719echo "$as_me:5719: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
5720echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
5721if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
5722  cat >>confdefs.h <<EOF
5723#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5724EOF
5725
5726fi
5727done
5728
5729echo "$as_me:5729: checking for lastlog path" >&5
5730echo $ECHO_N "checking for lastlog path... $ECHO_C" >&6
5731if test "${cf_cv_path_lastlog+set}" = set; then
5732  echo $ECHO_N "(cached) $ECHO_C" >&6
5733else
5734
5735cat >"conftest.$ac_ext" <<_ACEOF
5736#line 5736 "configure"
5737#include "confdefs.h"
5738
5739#include <sys/types.h>
5740#ifdef HAVE_LASTLOG_H
5741#include <lastlog.h>
5742#else
5743#ifdef HAVE_PATHS_H
5744#include <paths.h>
5745#endif
5746#endif
5747int
5748main (void)
5749{
5750char *path = _PATH_LASTLOG; (void)path
5751  ;
5752  return 0;
5753}
5754_ACEOF
5755rm -f "conftest.$ac_objext"
5756if { (eval echo "$as_me:5756: \"$ac_compile\"") >&5
5757  (eval $ac_compile) 2>&5
5758  ac_status=$?
5759  echo "$as_me:5759: \$? = $ac_status" >&5
5760  (exit "$ac_status"); } &&
5761         { ac_try='test -s "conftest.$ac_objext"'
5762  { (eval echo "$as_me:5762: \"$ac_try\"") >&5
5763  (eval $ac_try) 2>&5
5764  ac_status=$?
5765  echo "$as_me:5765: \$? = $ac_status" >&5
5766  (exit "$ac_status"); }; }; then
5767  cf_cv_path_lastlog="_PATH_LASTLOG"
5768else
5769  echo "$as_me: failed program was:" >&5
5770cat "conftest.$ac_ext" >&5
5771if test -f /usr/adm/lastlog ; then
5772	 	cf_cv_path_lastlog=/usr/adm/lastlog
5773	else
5774		cf_cv_path_lastlog=no
5775	fi
5776fi
5777rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5778
5779fi
5780echo "$as_me:5780: result: $cf_cv_path_lastlog" >&5
5781echo "${ECHO_T}$cf_cv_path_lastlog" >&6
5782test "$cf_cv_path_lastlog" != no &&
5783cat >>confdefs.h <<\EOF
5784#define USE_LASTLOG 1
5785EOF
5786
5787echo "$as_me:5787: checking for utmp implementation" >&5
5788echo $ECHO_N "checking for utmp implementation... $ECHO_C" >&6
5789if test "${cf_cv_have_utmp+set}" = set; then
5790  echo $ECHO_N "(cached) $ECHO_C" >&6
5791else
5792
5793	cf_cv_have_utmp=no
5794for cf_header in utmpx utmp ; do
5795cf_utmp_includes="
5796#include <sys/types.h>
5797#include <${cf_header}.h>
5798#define getutent getutxent
5799#ifdef USE_LASTLOG
5800#include <lastlog.h>	/* may conflict with utmpx.h on Linux */
5801#endif
5802"
5803	cat >"conftest.$ac_ext" <<_ACEOF
5804#line 5804 "configure"
5805#include "confdefs.h"
5806$cf_utmp_includes
5807int
5808main (void)
5809{
5810struct $cf_header x;
5811	 char *name = x.ut_name; /* utmp.h and compatible definitions */
5812	 (void)x;
5813	 (void)name;
5814
5815  ;
5816  return 0;
5817}
5818_ACEOF
5819rm -f "conftest.$ac_objext"
5820if { (eval echo "$as_me:5820: \"$ac_compile\"") >&5
5821  (eval $ac_compile) 2>&5
5822  ac_status=$?
5823  echo "$as_me:5823: \$? = $ac_status" >&5
5824  (exit "$ac_status"); } &&
5825         { ac_try='test -s "conftest.$ac_objext"'
5826  { (eval echo "$as_me:5826: \"$ac_try\"") >&5
5827  (eval $ac_try) 2>&5
5828  ac_status=$?
5829  echo "$as_me:5829: \$? = $ac_status" >&5
5830  (exit "$ac_status"); }; }; then
5831  cf_cv_have_utmp=$cf_header
5832	 break
5833else
5834  echo "$as_me: failed program was:" >&5
5835cat "conftest.$ac_ext" >&5
5836
5837	cat >"conftest.$ac_ext" <<_ACEOF
5838#line 5838 "configure"
5839#include "confdefs.h"
5840$cf_utmp_includes
5841int
5842main (void)
5843{
5844struct $cf_header x;
5845	 char *name = x.ut_user; /* utmpx.h must declare this */
5846	 (void)x;
5847	 (void)name;
5848
5849  ;
5850  return 0;
5851}
5852_ACEOF
5853rm -f "conftest.$ac_objext"
5854if { (eval echo "$as_me:5854: \"$ac_compile\"") >&5
5855  (eval $ac_compile) 2>&5
5856  ac_status=$?
5857  echo "$as_me:5857: \$? = $ac_status" >&5
5858  (exit "$ac_status"); } &&
5859         { ac_try='test -s "conftest.$ac_objext"'
5860  { (eval echo "$as_me:5860: \"$ac_try\"") >&5
5861  (eval $ac_try) 2>&5
5862  ac_status=$?
5863  echo "$as_me:5863: \$? = $ac_status" >&5
5864  (exit "$ac_status"); }; }; then
5865  cf_cv_have_utmp=$cf_header
5866	 break
5867
5868else
5869  echo "$as_me: failed program was:" >&5
5870cat "conftest.$ac_ext" >&5
5871fi
5872rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5873fi
5874rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5875done
5876
5877fi
5878echo "$as_me:5878: result: $cf_cv_have_utmp" >&5
5879echo "${ECHO_T}$cf_cv_have_utmp" >&6
5880
5881if test "$cf_cv_have_utmp" != no ; then
5882
5883cat >>confdefs.h <<\EOF
5884#define HAVE_UTMP 1
5885EOF
5886
5887	test "$cf_cv_have_utmp" = utmpx &&
5888cat >>confdefs.h <<\EOF
5889#define UTMPX_FOR_UTMP 1
5890EOF
5891
5892if test "$cf_cv_have_utmp" != no ; then
5893echo "$as_me:5893: checking if ${cf_cv_have_utmp}.ut_host is declared" >&5
5894echo $ECHO_N "checking if ${cf_cv_have_utmp}.ut_host is declared... $ECHO_C" >&6
5895if test "${cf_cv_have_utmp_ut_host+set}" = set; then
5896  echo $ECHO_N "(cached) $ECHO_C" >&6
5897else
5898
5899	cat >"conftest.$ac_ext" <<_ACEOF
5900#line 5900 "configure"
5901#include "confdefs.h"
5902
5903#include <sys/types.h>
5904#include <${cf_cv_have_utmp}.h>
5905int
5906main (void)
5907{
5908struct $cf_cv_have_utmp x;
5909	 char *y = &x.ut_host[0];
5910	 (void)x;
5911	 (void)y
5912  ;
5913  return 0;
5914}
5915_ACEOF
5916rm -f "conftest.$ac_objext"
5917if { (eval echo "$as_me:5917: \"$ac_compile\"") >&5
5918  (eval $ac_compile) 2>&5
5919  ac_status=$?
5920  echo "$as_me:5920: \$? = $ac_status" >&5
5921  (exit "$ac_status"); } &&
5922         { ac_try='test -s "conftest.$ac_objext"'
5923  { (eval echo "$as_me:5923: \"$ac_try\"") >&5
5924  (eval $ac_try) 2>&5
5925  ac_status=$?
5926  echo "$as_me:5926: \$? = $ac_status" >&5
5927  (exit "$ac_status"); }; }; then
5928  cf_cv_have_utmp_ut_host=yes
5929else
5930  echo "$as_me: failed program was:" >&5
5931cat "conftest.$ac_ext" >&5
5932cf_cv_have_utmp_ut_host=no
5933fi
5934rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5935
5936fi
5937
5938echo "$as_me:5938: result: $cf_cv_have_utmp_ut_host" >&5
5939echo "${ECHO_T}$cf_cv_have_utmp_ut_host" >&6
5940test "$cf_cv_have_utmp_ut_host" != no &&
5941cat >>confdefs.h <<\EOF
5942#define HAVE_UTMP_UT_HOST 1
5943EOF
5944
5945fi
5946
5947if test "$cf_cv_have_utmp" != no ; then
5948echo "$as_me:5948: checking if ${cf_cv_have_utmp}.ut_syslen is declared" >&5
5949echo $ECHO_N "checking if ${cf_cv_have_utmp}.ut_syslen is declared... $ECHO_C" >&6
5950if test "${cf_cv_have_utmp_ut_syslen+set}" = set; then
5951  echo $ECHO_N "(cached) $ECHO_C" >&6
5952else
5953
5954	cat >"conftest.$ac_ext" <<_ACEOF
5955#line 5955 "configure"
5956#include "confdefs.h"
5957
5958#include <sys/types.h>
5959#include <${cf_cv_have_utmp}.h>
5960int
5961main (void)
5962{
5963struct $cf_cv_have_utmp x;
5964	 int y = x.ut_syslen;
5965	 (void)x;
5966	 (void)y
5967  ;
5968  return 0;
5969}
5970_ACEOF
5971rm -f "conftest.$ac_objext"
5972if { (eval echo "$as_me:5972: \"$ac_compile\"") >&5
5973  (eval $ac_compile) 2>&5
5974  ac_status=$?
5975  echo "$as_me:5975: \$? = $ac_status" >&5
5976  (exit "$ac_status"); } &&
5977         { ac_try='test -s "conftest.$ac_objext"'
5978  { (eval echo "$as_me:5978: \"$ac_try\"") >&5
5979  (eval $ac_try) 2>&5
5980  ac_status=$?
5981  echo "$as_me:5981: \$? = $ac_status" >&5
5982  (exit "$ac_status"); }; }; then
5983  cf_cv_have_utmp_ut_syslen=yes
5984else
5985  echo "$as_me: failed program was:" >&5
5986cat "conftest.$ac_ext" >&5
5987cf_cv_have_utmp_ut_syslen=no
5988fi
5989rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5990
5991fi
5992
5993echo "$as_me:5993: result: $cf_cv_have_utmp_ut_syslen" >&5
5994echo "${ECHO_T}$cf_cv_have_utmp_ut_syslen" >&6
5995test "$cf_cv_have_utmp_ut_syslen" != no &&
5996cat >>confdefs.h <<\EOF
5997#define HAVE_UTMP_UT_SYSLEN 1
5998EOF
5999
6000fi
6001
6002if test "$cf_cv_have_utmp" != no ; then
6003echo "$as_me:6003: checking if ${cf_cv_have_utmp}.ut_name is declared" >&5
6004echo $ECHO_N "checking if ${cf_cv_have_utmp}.ut_name is declared... $ECHO_C" >&6
6005if test "${cf_cv_have_utmp_ut_name+set}" = set; then
6006  echo $ECHO_N "(cached) $ECHO_C" >&6
6007else
6008
6009	cf_cv_have_utmp_ut_name=no
6010cf_utmp_includes="
6011#include <sys/types.h>
6012#include <${cf_cv_have_utmp}.h>
6013#define getutent getutxent
6014#ifdef USE_LASTLOG
6015#include <lastlog.h>		/* may conflict with utmpx.h on Linux */
6016#endif
6017"
6018for cf_header in ut_name ut_user ; do
6019	cat >"conftest.$ac_ext" <<_ACEOF
6020#line 6020 "configure"
6021#include "confdefs.h"
6022$cf_utmp_includes
6023int
6024main (void)
6025{
6026struct $cf_cv_have_utmp x;
6027	 char *name = x.$cf_header;
6028	 (void)x;
6029	 (void)name;
6030
6031  ;
6032  return 0;
6033}
6034_ACEOF
6035rm -f "conftest.$ac_objext"
6036if { (eval echo "$as_me:6036: \"$ac_compile\"") >&5
6037  (eval $ac_compile) 2>&5
6038  ac_status=$?
6039  echo "$as_me:6039: \$? = $ac_status" >&5
6040  (exit "$ac_status"); } &&
6041         { ac_try='test -s "conftest.$ac_objext"'
6042  { (eval echo "$as_me:6042: \"$ac_try\"") >&5
6043  (eval $ac_try) 2>&5
6044  ac_status=$?
6045  echo "$as_me:6045: \$? = $ac_status" >&5
6046  (exit "$ac_status"); }; }; then
6047  cf_cv_have_utmp_ut_name=$cf_header
6048	 break
6049else
6050  echo "$as_me: failed program was:" >&5
6051cat "conftest.$ac_ext" >&5
6052fi
6053rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6054done
6055
6056fi
6057echo "$as_me:6057: result: $cf_cv_have_utmp_ut_name" >&5
6058echo "${ECHO_T}$cf_cv_have_utmp_ut_name" >&6
6059
6060case "$cf_cv_have_utmp_ut_name" in
6061(no)
6062	{ { echo "$as_me:6062: error: Cannot find declaration for ut.ut_name" >&5
6063echo "$as_me: error: Cannot find declaration for ut.ut_name" >&2;}
6064   { (exit 1); exit 1; }; }
6065	;;
6066(ut_user)
6067
6068cat >>confdefs.h <<\EOF
6069#define ut_name ut_user
6070EOF
6071
6072	;;
6073esac
6074fi
6075
6076if test "$cf_cv_have_utmp" != no ; then
6077echo "$as_me:6077: checking for exit-status in $cf_cv_have_utmp" >&5
6078echo $ECHO_N "checking for exit-status in $cf_cv_have_utmp... $ECHO_C" >&6
6079if test "${cf_cv_have_utmp_ut_xstatus+set}" = set; then
6080  echo $ECHO_N "(cached) $ECHO_C" >&6
6081else
6082
6083for cf_result in \
6084	ut_exit.__e_exit \
6085	ut_exit.e_exit \
6086	ut_exit.ut_e_exit \
6087	ut_exit.ut_exit
6088do
6089cat >"conftest.$ac_ext" <<_ACEOF
6090#line 6090 "configure"
6091#include "confdefs.h"
6092
6093#include <sys/types.h>
6094#include <${cf_cv_have_utmp}.h>
6095int
6096main (void)
6097{
6098struct $cf_cv_have_utmp x;
6099	 long y = x.$cf_result = 0;
6100	 (void)x;
6101	 (void)y
6102  ;
6103  return 0;
6104}
6105_ACEOF
6106rm -f "conftest.$ac_objext"
6107if { (eval echo "$as_me:6107: \"$ac_compile\"") >&5
6108  (eval $ac_compile) 2>&5
6109  ac_status=$?
6110  echo "$as_me:6110: \$? = $ac_status" >&5
6111  (exit "$ac_status"); } &&
6112         { ac_try='test -s "conftest.$ac_objext"'
6113  { (eval echo "$as_me:6113: \"$ac_try\"") >&5
6114  (eval $ac_try) 2>&5
6115  ac_status=$?
6116  echo "$as_me:6116: \$? = $ac_status" >&5
6117  (exit "$ac_status"); }; }; then
6118  cf_cv_have_utmp_ut_xstatus=$cf_result
6119	 break
6120else
6121  echo "$as_me: failed program was:" >&5
6122cat "conftest.$ac_ext" >&5
6123cf_cv_have_utmp_ut_xstatus=no
6124fi
6125rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6126done
6127
6128fi
6129echo "$as_me:6129: result: $cf_cv_have_utmp_ut_xstatus" >&5
6130echo "${ECHO_T}$cf_cv_have_utmp_ut_xstatus" >&6
6131if test "$cf_cv_have_utmp_ut_xstatus" != no ; then
6132
6133cat >>confdefs.h <<\EOF
6134#define HAVE_UTMP_UT_XSTATUS 1
6135EOF
6136
6137cat >>confdefs.h <<EOF
6138#define ut_xstatus $cf_cv_have_utmp_ut_xstatus
6139EOF
6140
6141fi
6142fi
6143
6144if test "$cf_cv_have_utmp" != no ; then
6145echo "$as_me:6145: checking if ${cf_cv_have_utmp}.ut_xtime is declared" >&5
6146echo $ECHO_N "checking if ${cf_cv_have_utmp}.ut_xtime is declared... $ECHO_C" >&6
6147if test "${cf_cv_have_utmp_ut_xtime+set}" = set; then
6148  echo $ECHO_N "(cached) $ECHO_C" >&6
6149else
6150
6151	cat >"conftest.$ac_ext" <<_ACEOF
6152#line 6152 "configure"
6153#include "confdefs.h"
6154
6155#include <sys/types.h>
6156#include <${cf_cv_have_utmp}.h>
6157int
6158main (void)
6159{
6160struct $cf_cv_have_utmp x;
6161	 long y = x.ut_xtime = 0;
6162	 (void)x;
6163	 (void)y
6164  ;
6165  return 0;
6166}
6167_ACEOF
6168rm -f "conftest.$ac_objext"
6169if { (eval echo "$as_me:6169: \"$ac_compile\"") >&5
6170  (eval $ac_compile) 2>&5
6171  ac_status=$?
6172  echo "$as_me:6172: \$? = $ac_status" >&5
6173  (exit "$ac_status"); } &&
6174         { ac_try='test -s "conftest.$ac_objext"'
6175  { (eval echo "$as_me:6175: \"$ac_try\"") >&5
6176  (eval $ac_try) 2>&5
6177  ac_status=$?
6178  echo "$as_me:6178: \$? = $ac_status" >&5
6179  (exit "$ac_status"); }; }; then
6180  cf_cv_have_utmp_ut_xtime=yes
6181else
6182  echo "$as_me: failed program was:" >&5
6183cat "conftest.$ac_ext" >&5
6184cat >"conftest.$ac_ext" <<_ACEOF
6185#line 6185 "configure"
6186#include "confdefs.h"
6187
6188#include <sys/types.h>
6189#include <${cf_cv_have_utmp}.h>
6190int
6191main (void)
6192{
6193struct $cf_cv_have_utmp x;
6194	 long y = x.ut_tv.tv_sec;
6195	 (void)x;
6196	 (void)y
6197  ;
6198  return 0;
6199}
6200_ACEOF
6201rm -f "conftest.$ac_objext"
6202if { (eval echo "$as_me:6202: \"$ac_compile\"") >&5
6203  (eval $ac_compile) 2>&5
6204  ac_status=$?
6205  echo "$as_me:6205: \$? = $ac_status" >&5
6206  (exit "$ac_status"); } &&
6207         { ac_try='test -s "conftest.$ac_objext"'
6208  { (eval echo "$as_me:6208: \"$ac_try\"") >&5
6209  (eval $ac_try) 2>&5
6210  ac_status=$?
6211  echo "$as_me:6211: \$? = $ac_status" >&5
6212  (exit "$ac_status"); }; }; then
6213  cf_cv_have_utmp_ut_xtime=define
6214else
6215  echo "$as_me: failed program was:" >&5
6216cat "conftest.$ac_ext" >&5
6217cf_cv_have_utmp_ut_xtime=no
6218fi
6219rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6220
6221fi
6222rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6223
6224fi
6225echo "$as_me:6225: result: $cf_cv_have_utmp_ut_xtime" >&5
6226echo "${ECHO_T}$cf_cv_have_utmp_ut_xtime" >&6
6227if test "$cf_cv_have_utmp_ut_xtime" != no ; then
6228
6229cat >>confdefs.h <<\EOF
6230#define HAVE_UTMP_UT_XTIME 1
6231EOF
6232
6233	if test "$cf_cv_have_utmp_ut_xtime" = define ; then
6234
6235cat >>confdefs.h <<\EOF
6236#define ut_xtime ut_tv.tv_sec
6237EOF
6238
6239	fi
6240fi
6241fi
6242
6243if test "$cf_cv_have_utmp" != no ; then
6244echo "$as_me:6244: checking if ${cf_cv_have_utmp}.ut_session is declared" >&5
6245echo $ECHO_N "checking if ${cf_cv_have_utmp}.ut_session is declared... $ECHO_C" >&6
6246if test "${cf_cv_have_utmp_ut_session+set}" = set; then
6247  echo $ECHO_N "(cached) $ECHO_C" >&6
6248else
6249
6250	cat >"conftest.$ac_ext" <<_ACEOF
6251#line 6251 "configure"
6252#include "confdefs.h"
6253
6254#include <sys/types.h>
6255#include <${cf_cv_have_utmp}.h>
6256int
6257main (void)
6258{
6259struct $cf_cv_have_utmp x;
6260	 long y = x.ut_session;
6261	 (void)x;
6262	 (void)y
6263  ;
6264  return 0;
6265}
6266_ACEOF
6267rm -f "conftest.$ac_objext"
6268if { (eval echo "$as_me:6268: \"$ac_compile\"") >&5
6269  (eval $ac_compile) 2>&5
6270  ac_status=$?
6271  echo "$as_me:6271: \$? = $ac_status" >&5
6272  (exit "$ac_status"); } &&
6273         { ac_try='test -s "conftest.$ac_objext"'
6274  { (eval echo "$as_me:6274: \"$ac_try\"") >&5
6275  (eval $ac_try) 2>&5
6276  ac_status=$?
6277  echo "$as_me:6277: \$? = $ac_status" >&5
6278  (exit "$ac_status"); }; }; then
6279  cf_cv_have_utmp_ut_session=yes
6280else
6281  echo "$as_me: failed program was:" >&5
6282cat "conftest.$ac_ext" >&5
6283cf_cv_have_utmp_ut_session=no
6284fi
6285rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6286
6287fi
6288echo "$as_me:6288: result: $cf_cv_have_utmp_ut_session" >&5
6289echo "${ECHO_T}$cf_cv_have_utmp_ut_session" >&6
6290if test "$cf_cv_have_utmp_ut_session" != no ; then
6291
6292cat >>confdefs.h <<\EOF
6293#define HAVE_UTMP_UT_SESSION 1
6294EOF
6295
6296fi
6297fi
6298
6299echo "$as_me:6299: checking if $cf_cv_have_utmp is SYSV flavor" >&5
6300echo $ECHO_N "checking if $cf_cv_have_utmp is SYSV flavor... $ECHO_C" >&6
6301if test "${cf_cv_sysv_utmp+set}" = set; then
6302  echo $ECHO_N "(cached) $ECHO_C" >&6
6303else
6304
6305test "$cf_cv_have_utmp" = "utmp" && cf_prefix="ut" || cf_prefix="utx"
6306cat >"conftest.$ac_ext" <<_ACEOF
6307#line 6307 "configure"
6308#include "confdefs.h"
6309
6310#include <sys/types.h>
6311#include <${cf_cv_have_utmp}.h>
6312int
6313main (void)
6314{
6315
6316struct $cf_cv_have_utmp x;
6317	set${cf_prefix}ent ();
6318	get${cf_prefix}id(&x);
6319	put${cf_prefix}line(&x);
6320	end${cf_prefix}ent();
6321  ;
6322  return 0;
6323}
6324_ACEOF
6325rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6326if { (eval echo "$as_me:6326: \"$ac_link\"") >&5
6327  (eval $ac_link) 2>&5
6328  ac_status=$?
6329  echo "$as_me:6329: \$? = $ac_status" >&5
6330  (exit "$ac_status"); } &&
6331         { ac_try='test -s "conftest$ac_exeext"'
6332  { (eval echo "$as_me:6332: \"$ac_try\"") >&5
6333  (eval $ac_try) 2>&5
6334  ac_status=$?
6335  echo "$as_me:6335: \$? = $ac_status" >&5
6336  (exit "$ac_status"); }; }; then
6337  cf_cv_sysv_utmp=yes
6338else
6339  echo "$as_me: failed program was:" >&5
6340cat "conftest.$ac_ext" >&5
6341cf_cv_sysv_utmp=no
6342fi
6343rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6344
6345fi
6346echo "$as_me:6346: result: $cf_cv_sysv_utmp" >&5
6347echo "${ECHO_T}$cf_cv_sysv_utmp" >&6
6348test "$cf_cv_sysv_utmp" = yes &&
6349cat >>confdefs.h <<\EOF
6350#define USE_SYSV_UTMP 1
6351EOF
6352
6353fi
6354
6355for ac_header in lastlog.h
6356do
6357as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6358echo "$as_me:6358: checking for $ac_header" >&5
6359echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6360if eval "test \"\${$as_ac_Header+set}\" = set"; then
6361  echo $ECHO_N "(cached) $ECHO_C" >&6
6362else
6363  cat >"conftest.$ac_ext" <<_ACEOF
6364#line 6364 "configure"
6365#include "confdefs.h"
6366#include <$ac_header>
6367_ACEOF
6368if { (eval echo "$as_me:6368: \"$ac_cpp "conftest.$ac_ext"\"") >&5
6369  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
6370  ac_status=$?
6371  $EGREP -v '^ *\+' conftest.er1 >conftest.err
6372  rm -f conftest.er1
6373  cat conftest.err >&5
6374  echo "$as_me:6374: \$? = $ac_status" >&5
6375  (exit "$ac_status"); } >/dev/null; then
6376  if test -s conftest.err; then
6377    ac_cpp_err=$ac_c_preproc_warn_flag
6378  else
6379    ac_cpp_err=
6380  fi
6381else
6382  ac_cpp_err=yes
6383fi
6384if test -z "$ac_cpp_err"; then
6385  eval "$as_ac_Header=yes"
6386else
6387  echo "$as_me: failed program was:" >&5
6388  cat "conftest.$ac_ext" >&5
6389  eval "$as_ac_Header=no"
6390fi
6391rm -f conftest.err "conftest.$ac_ext"
6392fi
6393echo "$as_me:6393: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
6394echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
6395if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
6396  cat >>confdefs.h <<EOF
6397#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6398EOF
6399
6400fi
6401done
6402
6403echo "$as_me:6403: checking for struct lastlog" >&5
6404echo $ECHO_N "checking for struct lastlog... $ECHO_C" >&6
6405if test "${cf_cv_struct_lastlog+set}" = set; then
6406  echo $ECHO_N "(cached) $ECHO_C" >&6
6407else
6408
6409if test "$cross_compiling" = yes; then
6410
6411cf_cv_struct_lastlog=unknown
6412else
6413  cat >"conftest.$ac_ext" <<_ACEOF
6414#line 6414 "configure"
6415#include "confdefs.h"
6416
6417#include <sys/types.h>
6418#include <time.h>
6419#include <lastlog.h>
6420
6421int main(void)
6422{
6423	struct lastlog data;
6424	return (sizeof(data.ll_time) != sizeof(time_t));
6425}
6426_ACEOF
6427rm -f "conftest$ac_exeext"
6428if { (eval echo "$as_me:6428: \"$ac_link\"") >&5
6429  (eval $ac_link) 2>&5
6430  ac_status=$?
6431  echo "$as_me:6431: \$? = $ac_status" >&5
6432  (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
6433  { (eval echo "$as_me:6433: \"$ac_try\"") >&5
6434  (eval $ac_try) 2>&5
6435  ac_status=$?
6436  echo "$as_me:6436: \$? = $ac_status" >&5
6437  (exit "$ac_status"); }; }; then
6438
6439cf_cv_struct_lastlog=yes
6440else
6441  echo "$as_me: program exited with status $ac_status" >&5
6442echo "$as_me: failed program was:" >&5
6443cat "conftest.$ac_ext" >&5
6444
6445cf_cv_struct_lastlog=no
6446fi
6447rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
6448fi
6449fi
6450echo "$as_me:6450: result: $cf_cv_struct_lastlog" >&5
6451echo "${ECHO_T}$cf_cv_struct_lastlog" >&6
6452
6453test $cf_cv_struct_lastlog != no &&
6454cat >>confdefs.h <<\EOF
6455#define USE_STRUCT_LASTLOG 1
6456EOF
6457
6458for ac_header in \
6459sys/param.h \
6460
6461do
6462as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6463echo "$as_me:6463: checking for $ac_header" >&5
6464echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6465if eval "test \"\${$as_ac_Header+set}\" = set"; then
6466  echo $ECHO_N "(cached) $ECHO_C" >&6
6467else
6468  cat >"conftest.$ac_ext" <<_ACEOF
6469#line 6469 "configure"
6470#include "confdefs.h"
6471#include <$ac_header>
6472_ACEOF
6473if { (eval echo "$as_me:6473: \"$ac_cpp "conftest.$ac_ext"\"") >&5
6474  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
6475  ac_status=$?
6476  $EGREP -v '^ *\+' conftest.er1 >conftest.err
6477  rm -f conftest.er1
6478  cat conftest.err >&5
6479  echo "$as_me:6479: \$? = $ac_status" >&5
6480  (exit "$ac_status"); } >/dev/null; then
6481  if test -s conftest.err; then
6482    ac_cpp_err=$ac_c_preproc_warn_flag
6483  else
6484    ac_cpp_err=
6485  fi
6486else
6487  ac_cpp_err=yes
6488fi
6489if test -z "$ac_cpp_err"; then
6490  eval "$as_ac_Header=yes"
6491else
6492  echo "$as_me: failed program was:" >&5
6493  cat "conftest.$ac_ext" >&5
6494  eval "$as_ac_Header=no"
6495fi
6496rm -f conftest.err "conftest.$ac_ext"
6497fi
6498echo "$as_me:6498: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
6499echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
6500if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
6501  cat >>confdefs.h <<EOF
6502#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6503EOF
6504
6505fi
6506done
6507
6508echo "$as_me:6508: checking if POSIX saved-ids are supported" >&5
6509echo $ECHO_N "checking if POSIX saved-ids are supported... $ECHO_C" >&6
6510if test "${cf_cv_posix_saved_ids+set}" = set; then
6511  echo $ECHO_N "(cached) $ECHO_C" >&6
6512else
6513
6514cat >"conftest.$ac_ext" <<_ACEOF
6515#line 6515 "configure"
6516#include "confdefs.h"
6517
6518#include <unistd.h>
6519#ifdef HAVE_SYS_PARAM_H
6520#include <sys/param.h>		/* this may define "BSD" */
6521#endif
6522
6523int
6524main (void)
6525{
6526
6527#if defined(_POSIX_SAVED_IDS) && (_POSIX_SAVED_IDS > 0)
6528	void *p = (void *) seteuid;
6529	int x = seteuid(geteuid());
6530	(void)p;
6531	(void)x;
6532#elif defined(BSD) && (BSD >= 199103)
6533/* The BSD's may implement the runtime check - and it fails.
6534 * However, saved-ids work almost like POSIX (close enough for most uses).
6535 */
6536#else
6537make an error
6538#endif
6539
6540  ;
6541  return 0;
6542}
6543_ACEOF
6544rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6545if { (eval echo "$as_me:6545: \"$ac_link\"") >&5
6546  (eval $ac_link) 2>&5
6547  ac_status=$?
6548  echo "$as_me:6548: \$? = $ac_status" >&5
6549  (exit "$ac_status"); } &&
6550         { ac_try='test -s "conftest$ac_exeext"'
6551  { (eval echo "$as_me:6551: \"$ac_try\"") >&5
6552  (eval $ac_try) 2>&5
6553  ac_status=$?
6554  echo "$as_me:6554: \$? = $ac_status" >&5
6555  (exit "$ac_status"); }; }; then
6556  cf_cv_posix_saved_ids=yes
6557
6558else
6559  echo "$as_me: failed program was:" >&5
6560cat "conftest.$ac_ext" >&5
6561
6562if test "$cross_compiling" = yes; then
6563  cf_cv_posix_saved_ids=unknown
6564else
6565  cat >"conftest.$ac_ext" <<_ACEOF
6566#line 6566 "configure"
6567#include "confdefs.h"
6568
6569#ifdef HAVE_STDLIB_H
6570#include <stdlib.h>
6571#endif
6572#include <unistd.h>
6573int main(void)
6574{
6575	void *p = (void *) seteuid;
6576	long code = sysconf(_SC_SAVED_IDS);
6577	(void)p;
6578	${cf_cv_main_return:-return}  ((code > 0) ? 0 : 1);
6579}
6580_ACEOF
6581rm -f "conftest$ac_exeext"
6582if { (eval echo "$as_me:6582: \"$ac_link\"") >&5
6583  (eval $ac_link) 2>&5
6584  ac_status=$?
6585  echo "$as_me:6585: \$? = $ac_status" >&5
6586  (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
6587  { (eval echo "$as_me:6587: \"$ac_try\"") >&5
6588  (eval $ac_try) 2>&5
6589  ac_status=$?
6590  echo "$as_me:6590: \$? = $ac_status" >&5
6591  (exit "$ac_status"); }; }; then
6592  cf_cv_posix_saved_ids=yes
6593else
6594  echo "$as_me: program exited with status $ac_status" >&5
6595echo "$as_me: failed program was:" >&5
6596cat "conftest.$ac_ext" >&5
6597cf_cv_posix_saved_ids=no
6598fi
6599rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
6600fi
6601
6602fi
6603rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6604
6605fi
6606echo "$as_me:6606: result: $cf_cv_posix_saved_ids" >&5
6607echo "${ECHO_T}$cf_cv_posix_saved_ids" >&6
6608
6609test "$cf_cv_posix_saved_ids" = yes &&
6610cat >>confdefs.h <<\EOF
6611#define HAVE_POSIX_SAVED_IDS 1
6612EOF
6613
6614# compute a reasonable value for $TERM to give tgetent(), since we may be
6615# running in 'screen', which sets $TERMCAP to a specific entry that is not
6616# necessarily in /etc/termcap - unsetenv is not portable, so we cannot simply
6617# discard $TERMCAP.
6618cf_TERMVAR=vt100
6619if test -n "$TERMCAP"
6620then
6621	cf_TERMCAP=`echo "$TERMCAP" | tr '\n' ' ' | sed -e 's/^..|//' -e 's/|.*//'`
6622	case "$cf_TERMCAP" in
6623	(screen*.*)
6624		;;
6625	(*)
6626		cf_TERMVAR="$cf_TERMCAP"
6627		;;
6628	esac
6629fi
6630test -z "$cf_TERMVAR" && cf_TERMVAR=vt100
6631
6632# BSD termcap used no header file
6633# SVr4 provided termcap prototypes as a legacy feature in term.h
6634# GNU termcap provided termcap prototypes in termcap.h
6635# ncurses provides termcap prototypes in both term.h and termcap.h
6636#
6637# The terminfo-based termcap interfaces do not provide a full tgetent (i.e., do
6638# not return the text of the termcap entry in the buffer), but as a special
6639# case, FreeBSD provides ncurses' termcap.h with a modified termcap reader that
6640# returns the termcap text.
6641
6642for ac_header in termcap.h
6643do
6644as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6645echo "$as_me:6645: checking for $ac_header" >&5
6646echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6647if eval "test \"\${$as_ac_Header+set}\" = set"; then
6648  echo $ECHO_N "(cached) $ECHO_C" >&6
6649else
6650  cat >"conftest.$ac_ext" <<_ACEOF
6651#line 6651 "configure"
6652#include "confdefs.h"
6653#include <$ac_header>
6654_ACEOF
6655if { (eval echo "$as_me:6655: \"$ac_cpp "conftest.$ac_ext"\"") >&5
6656  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
6657  ac_status=$?
6658  $EGREP -v '^ *\+' conftest.er1 >conftest.err
6659  rm -f conftest.er1
6660  cat conftest.err >&5
6661  echo "$as_me:6661: \$? = $ac_status" >&5
6662  (exit "$ac_status"); } >/dev/null; then
6663  if test -s conftest.err; then
6664    ac_cpp_err=$ac_c_preproc_warn_flag
6665  else
6666    ac_cpp_err=
6667  fi
6668else
6669  ac_cpp_err=yes
6670fi
6671if test -z "$ac_cpp_err"; then
6672  eval "$as_ac_Header=yes"
6673else
6674  echo "$as_me: failed program was:" >&5
6675  cat "conftest.$ac_ext" >&5
6676  eval "$as_ac_Header=no"
6677fi
6678rm -f conftest.err "conftest.$ac_ext"
6679fi
6680echo "$as_me:6680: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
6681echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
6682if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
6683  cat >>confdefs.h <<EOF
6684#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6685EOF
6686
6687fi
6688done
6689
6690echo "$as_me:6690: checking if we want full tgetent function" >&5
6691echo $ECHO_N "checking if we want full tgetent function... $ECHO_C" >&6
6692
6693# Check whether --enable-full-tgetent or --disable-full-tgetent was given.
6694if test "${enable_full_tgetent+set}" = set; then
6695  enableval="$enable_full_tgetent"
6696  test "$enableval" != no && enableval=yes
6697	if test "$enableval" != "yes" ; then
6698    cf_full_tgetent=no
6699	else
6700		cf_full_tgetent=yes
6701	fi
6702else
6703  enableval=yes
6704	cf_full_tgetent=yes
6705
6706fi;
6707echo "$as_me:6707: result: $cf_full_tgetent" >&5
6708echo "${ECHO_T}$cf_full_tgetent" >&6
6709
6710if test "$cf_full_tgetent" = yes ; then
6711	cf_test_message="full tgetent"
6712else
6713	cf_test_message="tgetent"
6714fi
6715
6716echo "$as_me:6716: checking for $cf_test_message function" >&5
6717echo $ECHO_N "checking for $cf_test_message function... $ECHO_C" >&6
6718if test "${cf_cv_lib_tgetent+set}" = set; then
6719  echo $ECHO_N "(cached) $ECHO_C" >&6
6720else
6721
6722cf_save_LIBS="$LIBS"
6723cf_cv_lib_tgetent=no
6724if test "$cf_full_tgetent" = yes ; then
6725	cf_TERMLIB="otermcap termcap termlib ncurses curses"
6726	cf_TERMTST="buffer[0] == 0"
6727else
6728	cf_TERMLIB="termlib ncurses curses"
6729	cf_TERMTST="0"
6730fi
6731for cf_termlib in '' $cf_TERMLIB ; do
6732	LIBS="$cf_save_LIBS"
6733	test -n "$cf_termlib" && {
6734cf_add_libs="$LIBS"
6735# reverse order
6736cf_add_0lib=
6737for cf_add_1lib in -l$cf_termlib; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6738# filter duplicates
6739for cf_add_1lib in $cf_add_0lib; do
6740	for cf_add_2lib in $cf_add_libs; do
6741		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6742			cf_add_1lib=
6743			break
6744		fi
6745	done
6746	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6747done
6748LIBS="$cf_add_libs"
6749 }
6750	if test "$cross_compiling" = yes; then
6751  echo "cross-compiling, cannot verify if a termcap/tgetent is present in $cf_termlib" 1>&5
6752else
6753  cat >"conftest.$ac_ext" <<_ACEOF
6754#line 6754 "configure"
6755#include "confdefs.h"
6756
6757#ifdef HAVE_TERMCAP_H
6758#include <termcap.h>
6759#endif
6760/* terminfo implementations ignore the buffer argument, making it useless for
6761 * the xterm application, which uses this information to make a new TERMCAP
6762 * environment variable.
6763 */
6764int main(void)
6765{
6766	char buffer[1024];
6767	buffer[0] = 0;
6768	tgetent(buffer, "$cf_TERMVAR");
6769	${cf_cv_main_return:-return} ($cf_TERMTST); }
6770_ACEOF
6771rm -f "conftest$ac_exeext"
6772if { (eval echo "$as_me:6772: \"$ac_link\"") >&5
6773  (eval $ac_link) 2>&5
6774  ac_status=$?
6775  echo "$as_me:6775: \$? = $ac_status" >&5
6776  (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
6777  { (eval echo "$as_me:6777: \"$ac_try\"") >&5
6778  (eval $ac_try) 2>&5
6779  ac_status=$?
6780  echo "$as_me:6780: \$? = $ac_status" >&5
6781  (exit "$ac_status"); }; }; then
6782  echo "yes, there is a termcap/tgetent in $cf_termlib" 1>&5
6783	 if test -n "$cf_termlib" ; then
6784	 	cf_cv_lib_tgetent="-l$cf_termlib"
6785	 else
6786	 	cf_cv_lib_tgetent=yes
6787	 fi
6788	 break
6789else
6790  echo "$as_me: program exited with status $ac_status" >&5
6791echo "$as_me: failed program was:" >&5
6792cat "conftest.$ac_ext" >&5
6793echo "no, there is no termcap/tgetent in $cf_termlib" 1>&5
6794fi
6795rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
6796fi
6797done
6798LIBS="$cf_save_LIBS"
6799
6800fi
6801echo "$as_me:6801: result: $cf_cv_lib_tgetent" >&5
6802echo "${ECHO_T}$cf_cv_lib_tgetent" >&6
6803
6804# If we found a working tgetent(), set LIBS and check for termcap.h.
6805# (LIBS cannot be set inside AC_CACHE_CHECK; the commands there should
6806# not have side effects other than setting the cache variable, because
6807# they are not executed when a cached value exists.)
6808if test "x$cf_cv_lib_tgetent" != xno ; then
6809	test "x$cf_cv_lib_tgetent" != xyes && {
6810cf_add_libs="$LIBS"
6811# reverse order
6812cf_add_0lib=
6813for cf_add_1lib in $cf_cv_lib_tgetent; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6814# filter duplicates
6815for cf_add_1lib in $cf_add_0lib; do
6816	for cf_add_2lib in $cf_add_libs; do
6817		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6818			cf_add_1lib=
6819			break
6820		fi
6821	done
6822	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6823done
6824LIBS="$cf_add_libs"
6825 }
6826
6827cat >>confdefs.h <<\EOF
6828#define USE_TERMCAP 1
6829EOF
6830
6831	if test "$cf_full_tgetent" = no ; then
6832		cat >"conftest.$ac_ext" <<_ACEOF
6833#line 6833 "configure"
6834#include "confdefs.h"
6835
6836#include <termcap.h>
6837int
6838main (void)
6839{
6840
6841#ifdef NCURSES_VERSION
6842make an error
6843#endif
6844  ;
6845  return 0;
6846}
6847_ACEOF
6848rm -f "conftest.$ac_objext"
6849if { (eval echo "$as_me:6849: \"$ac_compile\"") >&5
6850  (eval $ac_compile) 2>&5
6851  ac_status=$?
6852  echo "$as_me:6852: \$? = $ac_status" >&5
6853  (exit "$ac_status"); } &&
6854         { ac_try='test -s "conftest.$ac_objext"'
6855  { (eval echo "$as_me:6855: \"$ac_try\"") >&5
6856  (eval $ac_try) 2>&5
6857  ac_status=$?
6858  echo "$as_me:6858: \$? = $ac_status" >&5
6859  (exit "$ac_status"); }; }; then
6860  cat >>confdefs.h <<\EOF
6861#define HAVE_TERMCAP_H 1
6862EOF
6863
6864else
6865  echo "$as_me: failed program was:" >&5
6866cat "conftest.$ac_ext" >&5
6867fi
6868rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6869	else
6870
6871for ac_header in termcap.h
6872do
6873as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6874echo "$as_me:6874: checking for $ac_header" >&5
6875echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6876if eval "test \"\${$as_ac_Header+set}\" = set"; then
6877  echo $ECHO_N "(cached) $ECHO_C" >&6
6878else
6879  cat >"conftest.$ac_ext" <<_ACEOF
6880#line 6880 "configure"
6881#include "confdefs.h"
6882#include <$ac_header>
6883_ACEOF
6884if { (eval echo "$as_me:6884: \"$ac_cpp "conftest.$ac_ext"\"") >&5
6885  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
6886  ac_status=$?
6887  $EGREP -v '^ *\+' conftest.er1 >conftest.err
6888  rm -f conftest.er1
6889  cat conftest.err >&5
6890  echo "$as_me:6890: \$? = $ac_status" >&5
6891  (exit "$ac_status"); } >/dev/null; then
6892  if test -s conftest.err; then
6893    ac_cpp_err=$ac_c_preproc_warn_flag
6894  else
6895    ac_cpp_err=
6896  fi
6897else
6898  ac_cpp_err=yes
6899fi
6900if test -z "$ac_cpp_err"; then
6901  eval "$as_ac_Header=yes"
6902else
6903  echo "$as_me: failed program was:" >&5
6904  cat "conftest.$ac_ext" >&5
6905  eval "$as_ac_Header=no"
6906fi
6907rm -f conftest.err "conftest.$ac_ext"
6908fi
6909echo "$as_me:6909: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
6910echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
6911if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
6912  cat >>confdefs.h <<EOF
6913#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6914EOF
6915
6916fi
6917done
6918
6919	fi
6920else
6921        # If we didn't find a tgetent() that supports the buffer
6922        # argument, look again to see whether we can find even
6923        # a crippled one.  A crippled tgetent() is still useful to
6924        # validate values for the TERM environment variable given to
6925        # child processes.
6926	echo "$as_me:6926: checking for partial tgetent function" >&5
6927echo $ECHO_N "checking for partial tgetent function... $ECHO_C" >&6
6928if test "${cf_cv_lib_part_tgetent+set}" = set; then
6929  echo $ECHO_N "(cached) $ECHO_C" >&6
6930else
6931
6932	cf_cv_lib_part_tgetent=no
6933	for cf_termlib in $cf_TERMLIB ; do
6934		LIBS="$cf_save_LIBS -l$cf_termlib"
6935		cat >"conftest.$ac_ext" <<_ACEOF
6936#line 6936 "configure"
6937#include "confdefs.h"
6938
6939int
6940main (void)
6941{
6942tgetent(0, "$cf_TERMVAR")
6943  ;
6944  return 0;
6945}
6946_ACEOF
6947rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6948if { (eval echo "$as_me:6948: \"$ac_link\"") >&5
6949  (eval $ac_link) 2>&5
6950  ac_status=$?
6951  echo "$as_me:6951: \$? = $ac_status" >&5
6952  (exit "$ac_status"); } &&
6953         { ac_try='test -s "conftest$ac_exeext"'
6954  { (eval echo "$as_me:6954: \"$ac_try\"") >&5
6955  (eval $ac_try) 2>&5
6956  ac_status=$?
6957  echo "$as_me:6957: \$? = $ac_status" >&5
6958  (exit "$ac_status"); }; }; then
6959  echo "there is a terminfo/tgetent in $cf_termlib" 1>&5
6960			 cf_cv_lib_part_tgetent="-l$cf_termlib"
6961			 break
6962else
6963  echo "$as_me: failed program was:" >&5
6964cat "conftest.$ac_ext" >&5
6965fi
6966rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6967	done
6968	LIBS="$cf_save_LIBS"
6969
6970fi
6971echo "$as_me:6971: result: $cf_cv_lib_part_tgetent" >&5
6972echo "${ECHO_T}$cf_cv_lib_part_tgetent" >&6
6973
6974	if test "$cf_cv_lib_part_tgetent" != no ; then
6975
6976cf_add_libs="$LIBS"
6977# reverse order
6978cf_add_0lib=
6979for cf_add_1lib in $cf_cv_lib_part_tgetent; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6980# filter duplicates
6981for cf_add_1lib in $cf_add_0lib; do
6982	for cf_add_2lib in $cf_add_libs; do
6983		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6984			cf_add_1lib=
6985			break
6986		fi
6987	done
6988	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6989done
6990LIBS="$cf_add_libs"
6991
6992for ac_header in termcap.h
6993do
6994as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6995echo "$as_me:6995: checking for $ac_header" >&5
6996echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6997if eval "test \"\${$as_ac_Header+set}\" = set"; then
6998  echo $ECHO_N "(cached) $ECHO_C" >&6
6999else
7000  cat >"conftest.$ac_ext" <<_ACEOF
7001#line 7001 "configure"
7002#include "confdefs.h"
7003#include <$ac_header>
7004_ACEOF
7005if { (eval echo "$as_me:7005: \"$ac_cpp "conftest.$ac_ext"\"") >&5
7006  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
7007  ac_status=$?
7008  $EGREP -v '^ *\+' conftest.er1 >conftest.err
7009  rm -f conftest.er1
7010  cat conftest.err >&5
7011  echo "$as_me:7011: \$? = $ac_status" >&5
7012  (exit "$ac_status"); } >/dev/null; then
7013  if test -s conftest.err; then
7014    ac_cpp_err=$ac_c_preproc_warn_flag
7015  else
7016    ac_cpp_err=
7017  fi
7018else
7019  ac_cpp_err=yes
7020fi
7021if test -z "$ac_cpp_err"; then
7022  eval "$as_ac_Header=yes"
7023else
7024  echo "$as_me: failed program was:" >&5
7025  cat "conftest.$ac_ext" >&5
7026  eval "$as_ac_Header=no"
7027fi
7028rm -f conftest.err "conftest.$ac_ext"
7029fi
7030echo "$as_me:7030: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
7031echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
7032if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
7033  cat >>confdefs.h <<EOF
7034#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7035EOF
7036
7037fi
7038done
7039
7040                # If this is linking against ncurses, we'll trigger the
7041                # ifdef in resize.c that turns the termcap stuff back off.
7042
7043cat >>confdefs.h <<\EOF
7044#define USE_TERMINFO 1
7045EOF
7046
7047	fi
7048fi
7049
7050echo "$as_me:7050: checking for X applications class" >&5
7051echo $ECHO_N "checking for X applications class... $ECHO_C" >&6
7052
7053# Check whether --with-app-class or --without-app-class was given.
7054if test "${with_app_class+set}" = set; then
7055  withval="$with_app_class"
7056  APP_CLASS=$withval
7057else
7058  APP_CLASS=XTerm
7059fi;
7060
7061case x$APP_CLASS in
7062(*[/@,%]*)
7063	{ echo "$as_me:7063: WARNING: X applications class cannot contain punctuation" >&5
7064echo "$as_me: WARNING: X applications class cannot contain punctuation" >&2;}
7065	APP_CLASS=XTerm
7066	;;
7067(x[A-Z]*)
7068	;;
7069(*)
7070	{ echo "$as_me:7070: WARNING: X applications class must start with capital, ignoring $APP_CLASS" >&5
7071echo "$as_me: WARNING: X applications class must start with capital, ignoring $APP_CLASS" >&2;}
7072	APP_CLASS=XTerm
7073	;;
7074esac
7075
7076echo "$as_me:7076: result: $APP_CLASS" >&5
7077echo "${ECHO_T}$APP_CLASS" >&6
7078
7079echo "$as_me:7079: checking for directory to install resource files" >&5
7080echo $ECHO_N "checking for directory to install resource files... $ECHO_C" >&6
7081
7082# Check whether --with-app-defaults or --without-app-defaults was given.
7083if test "${with_app_defaults+set}" = set; then
7084  withval="$with_app_defaults"
7085  APPSDIR=$withval
7086else
7087  APPSDIR='${exec_prefix}/lib/X11/app-defaults'
7088fi;
7089
7090if test "x$APPSDIR" = xauto
7091then
7092	APPSDIR='${exec_prefix}/lib/X11/app-defaults'
7093	for cf_path in \
7094		/opt/local/share/X11/app-defaults \
7095		/opt/X11/share/X11/app-defaults \
7096		/usr/share/X11/app-defaults \
7097		/usr/X11/share/X11/app-defaults \
7098		/usr/X11/lib/X11/app-defaults \
7099		/usr/lib/X11/app-defaults \
7100		/etc/X11/app-defaults \
7101		/usr/pkg/lib/X11/app-defaults \
7102		/usr/X11R7/lib/X11/app-defaults \
7103		/usr/X11R6/lib/X11/app-defaults \
7104		/usr/X11R5/lib/X11/app-defaults \
7105		/usr/X11R4/lib/X11/app-defaults \
7106		/usr/local/lib/X11/app-defaults \
7107		/usr/local/share/X11/app-defaults \
7108		/usr/lib64/X11/app-defaults
7109	do
7110		if test -d "$cf_path" ; then
7111			APPSDIR="$cf_path"
7112			break
7113		fi
7114	done
7115else
7116	cf_path=$APPSDIR
7117
7118if test "x$prefix" != xNONE; then
7119	cf_path_syntax="$prefix"
7120else
7121	cf_path_syntax="$ac_default_prefix"
7122fi
7123
7124case ".$cf_path" in
7125(.\$\(*\)*|.\'*\'*)
7126	;;
7127(..|./*|.\\*)
7128	;;
7129(.[a-zA-Z]:[\\/]*) # OS/2 EMX
7130	;;
7131(.\$\{*prefix\}*|.\$\{*dir\}*)
7132	eval cf_path="$cf_path"
7133	case ".$cf_path" in
7134	(.NONE/*)
7135		cf_path=`echo "$cf_path" | sed -e s%NONE%$cf_path_syntax%`
7136		;;
7137	esac
7138	;;
7139(.no|.NONE/*)
7140	cf_path=`echo "$cf_path" | sed -e s%NONE%$cf_path_syntax%`
7141	;;
7142(*)
7143	{ { echo "$as_me:7143: error: expected a pathname, not \"$cf_path\"" >&5
7144echo "$as_me: error: expected a pathname, not \"$cf_path\"" >&2;}
7145   { (exit 1); exit 1; }; }
7146	;;
7147esac
7148
7149fi
7150
7151echo "$as_me:7151: result: $APPSDIR" >&5
7152echo "${ECHO_T}$APPSDIR" >&6
7153
7154no_appsdir=
7155if test "$APPSDIR" = no
7156then
7157	no_appsdir="#"
7158else
7159	EXTRA_INSTALL_DIRS="$EXTRA_INSTALL_DIRS \$(APPSDIR)"
7160fi
7161
7162echo "$as_me:7162: checking for the icon name" >&5
7163echo $ECHO_N "checking for the icon name... $ECHO_C" >&6
7164
7165# Check whether --with-icon-name or --without-icon-name was given.
7166if test "${with_icon_name+set}" = set; then
7167  withval="$with_icon_name"
7168  ICON_NAME="$withval"
7169else
7170  ICON_NAME=mini.xterm
7171fi;
7172case "x$ICON_NAME" in
7173(xyes|xno|x)
7174	ICON_NAME=mini.xterm
7175	;;
7176esac
7177
7178echo "$as_me:7178: result: $ICON_NAME" >&5
7179echo "${ECHO_T}$ICON_NAME" >&6
7180
7181echo "$as_me:7181: checking for icon symlink to use" >&5
7182echo $ECHO_N "checking for icon symlink to use... $ECHO_C" >&6
7183
7184# Check whether --with-icon-symlink or --without-icon-symlink was given.
7185if test "${with_icon_symlink+set}" = set; then
7186  withval="$with_icon_symlink"
7187  ICON_SYMLINK="$withval"
7188else
7189  ICON_SYMLINK=NONE
7190fi;
7191case "x$ICON_SYMLINK" in
7192(xyes)
7193	ICON_SYMLINK=xterm
7194	;;
7195(xno|x)
7196	ICON_SYMLINK=NONE
7197	;;
7198esac
7199
7200echo "$as_me:7200: result: $ICON_SYMLINK" >&5
7201echo "${ECHO_T}$ICON_SYMLINK" >&6
7202
7203# Install all icons except for the overused "terminal".
7204cf_cv_icon_list=
7205for my_item in $srcdir/icons/*.svg
7206do
7207	test -f "$my_item" || continue
7208	cf_icon_name=`echo "$my_item" |sed -e "s,.svg,," -e "s,^$srcdir/,,"`
7209	case $cf_icon_name in
7210	(*_48x48)
7211		continue
7212		;;
7213	esac
7214	test -n "$verbose" && echo "	adding $cf_icon_name to icon-list" 1>&6
7215
7216echo "${as_me:-configure}:7216: testing adding $cf_icon_name to icon-list ..." 1>&5
7217
7218	cf_cv_icon_list="$cf_cv_icon_list $cf_icon_name"
7219	if test -f "${cf_icon_name}_48x48.png"
7220	then
7221		test -n "$verbose" && echo "	adding ${cf_icon_name}_48x48 to icon-list" 1>&6
7222
7223echo "${as_me:-configure}:7223: testing adding ${cf_icon_name}_48x48 to icon-list ..." 1>&5
7224
7225		cf_cv_icon_list="$cf_cv_icon_list ${cf_icon_name}_48x48"
7226	fi
7227done
7228
7229echo "$as_me:7229: checking for directory to install pixmaps" >&5
7230echo $ECHO_N "checking for directory to install pixmaps... $ECHO_C" >&6
7231
7232# Check whether --with-pixmapdir or --without-pixmapdir was given.
7233if test "${with_pixmapdir+set}" = set; then
7234  withval="$with_pixmapdir"
7235  PIXMAPDIR=$withval
7236else
7237  test -z "$PIXMAPDIR" && PIXMAPDIR='${datadir}/pixmaps'
7238fi;
7239
7240if test "x$PIXMAPDIR" = xauto
7241then
7242	PIXMAPDIR='${datadir}/pixmaps'
7243	for cf_path in \
7244		/usr/share/pixmaps \
7245		/usr/X11R6/share/pixmaps
7246	do
7247		if test -d "$cf_path" ; then
7248			PIXMAPDIR="$cf_path"
7249			break
7250		fi
7251	done
7252else
7253	cf_path=$PIXMAPDIR
7254
7255if test "x$prefix" != xNONE; then
7256	cf_path_syntax="$prefix"
7257else
7258	cf_path_syntax="$ac_default_prefix"
7259fi
7260
7261case ".$cf_path" in
7262(.\$\(*\)*|.\'*\'*)
7263	;;
7264(..|./*|.\\*)
7265	;;
7266(.[a-zA-Z]:[\\/]*) # OS/2 EMX
7267	;;
7268(.\$\{*prefix\}*|.\$\{*dir\}*)
7269	eval cf_path="$cf_path"
7270	case ".$cf_path" in
7271	(.NONE/*)
7272		cf_path=`echo "$cf_path" | sed -e s%NONE%$cf_path_syntax%`
7273		;;
7274	esac
7275	;;
7276(.no|.NONE/*)
7277	cf_path=`echo "$cf_path" | sed -e s%NONE%$cf_path_syntax%`
7278	;;
7279(*)
7280	{ { echo "$as_me:7280: error: expected a pathname, not \"$cf_path\"" >&5
7281echo "$as_me: error: expected a pathname, not \"$cf_path\"" >&2;}
7282   { (exit 1); exit 1; }; }
7283	;;
7284esac
7285
7286fi
7287echo "$as_me:7287: result: $PIXMAPDIR" >&5
7288echo "${ECHO_T}$PIXMAPDIR" >&6
7289
7290no_pixmapdir=
7291if test "$PIXMAPDIR" = no
7292then
7293	no_pixmapdir="#"
7294else
7295	EXTRA_INSTALL_DIRS="$EXTRA_INSTALL_DIRS \$(PIXMAPDIR)"
7296fi
7297
7298echo "$as_me:7298: checking for directory to install icons" >&5
7299echo $ECHO_N "checking for directory to install icons... $ECHO_C" >&6
7300
7301# Check whether --with-icondir or --without-icondir was given.
7302if test "${with_icondir+set}" = set; then
7303  withval="$with_icondir"
7304  ICONDIR=$withval
7305else
7306  test -z "$ICONDIR" && ICONDIR=no
7307fi;
7308
7309if test "x$ICONDIR" = xauto
7310then
7311	ICONDIR='${datadir}/icons'
7312	for cf_path in \
7313		/usr/share/icons \
7314		/usr/X11R6/share/icons
7315	do
7316		if test -d "$cf_path" ; then
7317			ICONDIR="$cf_path"
7318			break
7319		fi
7320	done
7321else
7322	cf_path=$ICONDIR
7323
7324if test "x$prefix" != xNONE; then
7325	cf_path_syntax="$prefix"
7326else
7327	cf_path_syntax="$ac_default_prefix"
7328fi
7329
7330case ".$cf_path" in
7331(.\$\(*\)*|.\'*\'*)
7332	;;
7333(..|./*|.\\*)
7334	;;
7335(.[a-zA-Z]:[\\/]*) # OS/2 EMX
7336	;;
7337(.\$\{*prefix\}*|.\$\{*dir\}*)
7338	eval cf_path="$cf_path"
7339	case ".$cf_path" in
7340	(.NONE/*)
7341		cf_path=`echo "$cf_path" | sed -e s%NONE%$cf_path_syntax%`
7342		;;
7343	esac
7344	;;
7345(.no|.NONE/*)
7346	cf_path=`echo "$cf_path" | sed -e s%NONE%$cf_path_syntax%`
7347	;;
7348(*)
7349	{ { echo "$as_me:7349: error: expected a pathname, not \"$cf_path\"" >&5
7350echo "$as_me: error: expected a pathname, not \"$cf_path\"" >&2;}
7351   { (exit 1); exit 1; }; }
7352	;;
7353esac
7354
7355fi
7356echo "$as_me:7356: result: $ICONDIR" >&5
7357echo "${ECHO_T}$ICONDIR" >&6
7358
7359no_icondir=
7360if test "$ICONDIR" = no
7361then
7362	no_icondir="#"
7363else
7364	EXTRA_INSTALL_DIRS="$EXTRA_INSTALL_DIRS \$(ICONDIR)"
7365fi
7366
7367echo "$as_me:7367: checking if icon theme should be used" >&5
7368echo $ECHO_N "checking if icon theme should be used... $ECHO_C" >&6
7369
7370# Check whether --with-icon-theme or --without-icon-theme was given.
7371if test "${with_icon_theme+set}" = set; then
7372  withval="$with_icon_theme"
7373  ICON_THEME=$withval
7374else
7375  ICON_THEME=no
7376fi;
7377
7378case "x$ICON_THEME" in
7379(xno)
7380	;;
7381(x|xyes)
7382	ICON_THEME=hicolor
7383	;;
7384esac
7385echo "$as_me:7385: result: $ICON_THEME" >&5
7386echo "${ECHO_T}$ICON_THEME" >&6
7387
7388if test "x$ICON_THEME" = xno
7389then
7390	if test "x$ICONDIR" != xno
7391	then
7392		test -n "$verbose" && echo "	ignoring icondir without theme" 1>&6
7393
7394echo "${as_me:-configure}:7394: testing ignoring icondir without theme ..." 1>&5
7395
7396		no_icondir="#"
7397	fi
7398else
7399	if test "x$ICONDIR" = xno
7400	then
7401		{ { echo "$as_me:7401: error: icondir must be set for icon theme" >&5
7402echo "$as_me: error: icondir must be set for icon theme" >&2;}
7403   { (exit 1); exit 1; }; }
7404	fi
7405fi
7406
7407: ${ICON_FORMAT:=".svg .png .xpm"}
7408
7409ICON_LIST=
7410
7411if test "x$ICON_THEME" != xno
7412then
7413	cf_icon_list="$cf_cv_icon_list"
7414else
7415	cf_icon_list="icons/${ICON_NAME}_48x48"
7416fi
7417
7418echo "$as_me:7418: checking for icon(s) to install" >&5
7419echo $ECHO_N "checking for icon(s) to install... $ECHO_C" >&6
7420for cf_name in $cf_icon_list
7421do
7422	test -n "$verbose" && echo "	using $ICON_FORMAT" 1>&6
7423
7424echo "${as_me:-configure}:7424: testing using $ICON_FORMAT ..." 1>&5
7425
7426	for cf_suffix in $ICON_FORMAT
7427	do
7428		cf_icon="${cf_name}${cf_suffix}"
7429		cf_left=`echo "$cf_icon" | sed -e 's/:.*//'`
7430		if test ! -f "${cf_left}"
7431		then
7432			if test "x$srcdir" != "x."
7433			then
7434				cf_icon="${srcdir}/${cf_left}"
7435				cf_left=`echo "$cf_icon" | sed -e 's/:.*//'`
7436				if test ! -f "${cf_left}"
7437				then
7438					continue
7439				fi
7440			else
7441				continue
7442			fi
7443		fi
7444		if test "x$ICON_THEME" != xno
7445		then
7446			cf_base=`basename "$cf_left"`
7447			cf_trim=`echo "$cf_base" | sed -e 's/_[0-9][0-9]x[0-9][0-9]\././'`
7448			case "x${cf_base}" in
7449			(*:*)
7450				cf_next=$cf_base
7451				# user-defined mapping
7452				;;
7453			(*.png)
7454				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'`
7455				if test -z "$cf_size"
7456				then
7457					{ echo "$as_me:7457: WARNING: cannot determine size of $cf_left" >&5
7458echo "$as_me: WARNING: cannot determine size of $cf_left" >&2;}
7459					continue
7460				fi
7461				cf_next="$cf_size/apps/$cf_trim"
7462				;;
7463			(*.svg)
7464				cf_next="scalable/apps/$cf_trim"
7465				;;
7466			(*.xpm)
7467				test -n "$verbose" && echo "	ignored XPM file in icon theme" 1>&6
7468
7469echo "${as_me:-configure}:7469: testing ignored XPM file in icon theme ..." 1>&5
7470
7471				continue
7472				;;
7473			(*_[0-9][0-9]*x[0-9][0-9]*.*)
7474				cf_size=`echo "$cf_left"|sed -e 's/^.*_\([0-9][0-9]*x[0-9][0-9]*\)\..*$/\1/'`
7475				cf_left=`echo "$cf_left"|sed -e 's/^\(.*\)_\([0-9][0-9]*x[0-9][0-9]*\)\(\..*\)$/\1\3/'`
7476				cf_next="$cf_size/apps/$cf_base"
7477				;;
7478			esac
7479			test -n "$verbose" && echo "	adding $cf_next" 1>&6
7480
7481echo "${as_me:-configure}:7481: testing adding $cf_next ..." 1>&5
7482
7483			cf_icon="${cf_icon}:${cf_next}"
7484		fi
7485		test -n "$ICON_LIST" && ICON_LIST="$ICON_LIST "
7486		ICON_LIST="$ICON_LIST${cf_icon}"
7487		if test -z "$ICON_NAME"
7488		then
7489			ICON_NAME=`basename "$cf_icon" | sed -e 's/[.:].*//'`
7490		fi
7491	done
7492done
7493
7494if test -n "$verbose"
7495then
7496	echo "$as_me:7496: checking result" >&5
7497echo $ECHO_N "checking result... $ECHO_C" >&6
7498fi
7499echo "$as_me:7499: result: $ICON_LIST" >&5
7500echo "${ECHO_T}$ICON_LIST" >&6
7501
7502if test -z "$ICON_LIST"
7503then
7504	{ { echo "$as_me:7504: error: no icons found" >&5
7505echo "$as_me: error: no icons found" >&2;}
7506   { (exit 1); exit 1; }; }
7507fi
7508
7509echo "$as_me:7509: checking for icon name" >&5
7510echo $ECHO_N "checking for icon name... $ECHO_C" >&6
7511echo "$as_me:7511: result: $ICON_NAME" >&5
7512echo "${ECHO_T}$ICON_NAME" >&6
7513
7514# Comment-out the install-desktop rule if the desktop-utils are not found.
7515echo "$as_me:7515: checking if you want to install desktop files" >&5
7516echo $ECHO_N "checking if you want to install desktop files... $ECHO_C" >&6
7517
7518# Check whether --enable-desktop or --disable-desktop was given.
7519if test "${enable_desktop+set}" = set; then
7520  enableval="$enable_desktop"
7521  test "$enableval" != no && enableval=yes
7522	if test "$enableval" != "yes" ; then
7523    enable_desktop=$enableval
7524	else
7525		enable_desktop=$enableval
7526	fi
7527else
7528  enableval=yes
7529	enable_desktop=$enableval
7530
7531fi;
7532echo "$as_me:7532: result: $enable_desktop" >&5
7533echo "${ECHO_T}$enable_desktop" >&6
7534
7535desktop_utils=
7536if test "$enable_desktop" = yes ; then
7537# Extract the first word of "desktop-file-install", so it can be a program name with args.
7538set dummy desktop-file-install; ac_word=$2
7539echo "$as_me:7539: checking for $ac_word" >&5
7540echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7541if test "${ac_cv_prog_desktop_utils+set}" = set; then
7542  echo $ECHO_N "(cached) $ECHO_C" >&6
7543else
7544  if test -n "$desktop_utils"; then
7545  ac_cv_prog_desktop_utils="$desktop_utils" # Let the user override the test.
7546else
7547  ac_save_IFS=$IFS; IFS=$ac_path_separator
7548ac_dummy="$PATH"
7549for ac_dir in $ac_dummy; do
7550  IFS=$ac_save_IFS
7551  test -z "$ac_dir" && ac_dir=.
7552  $as_executable_p "$ac_dir/$ac_word" || continue
7553ac_cv_prog_desktop_utils="yes"
7554echo "$as_me:7554: found $ac_dir/$ac_word" >&5
7555break
7556done
7557
7558  test -z "$ac_cv_prog_desktop_utils" && ac_cv_prog_desktop_utils="no"
7559fi
7560fi
7561desktop_utils=$ac_cv_prog_desktop_utils
7562if test -n "$desktop_utils"; then
7563  echo "$as_me:7563: result: $desktop_utils" >&5
7564echo "${ECHO_T}$desktop_utils" >&6
7565else
7566  echo "$as_me:7566: result: no" >&5
7567echo "${ECHO_T}no" >&6
7568fi
7569
7570fi
7571
7572test "$desktop_utils" = yes && desktop_utils= || desktop_utils="#"
7573
7574if test -z "$desktop_utils"
7575then
7576	echo "$as_me:7576: checking for requested desktop-category" >&5
7577echo $ECHO_N "checking for requested desktop-category... $ECHO_C" >&6
7578
7579# Check whether --with-desktop-category or --without-desktop-category was given.
7580if test "${with_desktop_category+set}" = set; then
7581  withval="$with_desktop_category"
7582  cf_desktop_want=$withval
7583else
7584  cf_desktop_want=auto
7585fi;
7586	echo "$as_me:7586: result: $cf_desktop_want" >&5
7587echo "${ECHO_T}$cf_desktop_want" >&6
7588
7589	if test "$cf_desktop_want" = auto
7590	then
7591		rm -rf conftest*
7592		cf_desktop_also=
7593		for cf_desktop_dir in  \
7594			/usr/share/app-install \
7595			/usr/share/applications
7596		do
7597			if test -d $cf_desktop_dir
7598			then
7599				find $cf_desktop_dir -name '*.desktop' | \
7600				while true
7601				do
7602					read cf_desktop_path
7603					test -z "$cf_desktop_path" && break
7604					cf_desktop_name=`basename "$cf_desktop_path" .desktop`
7605					case $cf_desktop_name in
7606					(xterm|*-xterm|*rxvt*|*konsole|*[Tt]erminal)
7607						test -n "$verbose" && echo "	inspect $cf_desktop_path" 1>&6
7608
7609echo "${as_me:-configure}:7609: testing inspect $cf_desktop_path ..." 1>&5
7610
7611						${EGREP-egrep} '^Categories=' "$cf_desktop_path" | \
7612							tr ';' '\n' | \
7613							sed -e 's%^.*=%%' -e '/^$/d' >>conftest.1
7614						;;
7615					esac
7616				done
7617			fi
7618		done
7619		if test -s conftest.1
7620		then
7621			cf_desktop_last=
7622			sort conftest.1 | \
7623			while true
7624			do
7625				read cf_desktop_this
7626				test -z "$cf_desktop_this" && break
7627				if test -s conftest.2
7628				then
7629					grep -w "$cf_desktop_this" conftest.2 >/dev/null && continue
7630				elif test -s conftest.3
7631				then
7632					grep -w "$cf_desktop_this" conftest.3 >/dev/null && continue
7633				fi
7634				case "$cf_desktop_this" in
7635				(-*)
7636					;;
7637				(Qt*|*Xfce*|*[ABCDEFGHIJKLMNOPQRSTUVWXYZ][ABCDEFGHIJKLMNOPQRSTUVWXYZ]*)
7638					test -n "$verbose" && echo "	ignored $cf_desktop_this" 1>&6
7639
7640echo "${as_me:-configure}:7640: testing ignored $cf_desktop_this ..." 1>&5
7641
7642					echo "$cf_desktop_this" >> conftest.3
7643					;;
7644				(System|TerminalEmulator|*)
7645					test -n "$verbose" && echo "	applied $cf_desktop_this" 1>&6
7646
7647echo "${as_me:-configure}:7647: testing applied $cf_desktop_this ..." 1>&5
7648
7649					test "x$cf_desktop_last" != "x$cf_desktop_this" && echo "$cf_desktop_this" >>conftest.2
7650					;;
7651				esac
7652				cf_desktop_last=$cf_desktop_this
7653			done
7654			cf_desktop_want="`tr '\n' ';' < conftest.2`"
7655		fi
7656		if test -n "$cf_desktop_want"
7657		then
7658			if test "$cf_desktop_want" = auto
7659			then
7660				cf_desktop_want=
7661			else
7662				# do a sanity check on the semicolon-separated list, ignore on failure
7663				cf_desktop_test=`echo "$cf_desktop_want" | sed -e 's/[^;]//g'`
7664				test -z "$cf_desktop_test" && cf_desktop_want=
7665				cf_desktop_test=`echo "$cf_desktop_want" | sed -e 's/^.*;$/./g'`
7666				test -z "$cf_desktop_test" && cf_desktop_want=
7667			fi
7668		fi
7669		if test -z "$cf_desktop_want"
7670		then
7671			cf_desktop_want="`echo "System|TerminalEmulator|*" | sed -e 's/\*//g' -e 's/|/;/g' -e 's/;*$/;/g'`"
7672			test -n "$verbose" && echo "	no usable value found for desktop category" 1>&6
7673
7674echo "${as_me:-configure}:7674: testing no usable value found for desktop category ..." 1>&5
7675
7676		fi
7677	fi
7678	DESKTOP_CATEGORY=`echo "$cf_desktop_want" | sed -e 's/[ ,]/;/g'`
7679	test -n "$verbose" && echo "	will use Categories=$DESKTOP_CATEGORY" 1>&6
7680
7681echo "${as_me:-configure}:7681: testing will use Categories=$DESKTOP_CATEGORY ..." 1>&5
7682
7683fi
7684
7685echo "$as_me:7685: checking for install-permissions reference" >&5
7686echo $ECHO_N "checking for install-permissions reference... $ECHO_C" >&6
7687
7688# Check whether --with-reference or --without-reference was given.
7689if test "${with_reference+set}" = set; then
7690  withval="$with_reference"
7691  with_reference=$withval
7692else
7693  with_reference=xterm
7694fi;
7695echo "$as_me:7695: result: $with_reference" >&5
7696echo "${ECHO_T}$with_reference" >&6
7697
7698with_full_paths=yes
7699
7700	echo "$as_me:7700: checking for PATH separator" >&5
7701echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
7702	case "$cf_cv_system_name" in
7703	(os2*)	PATH_SEPARATOR=';'  ;;
7704	(*)	${PATH_SEPARATOR:=':'}  ;;
7705	esac
7706
7707	echo "$as_me:7707: result: $PATH_SEPARATOR" >&5
7708echo "${ECHO_T}$PATH_SEPARATOR" >&6
7709
7710test -z "$XTERM_PATH" && XTERM_PATH="$with_reference"
7711for ac_prog in $XTERM_PATH $with_reference
7712do
7713  # Extract the first word of "$ac_prog", so it can be a program name with args.
7714set dummy $ac_prog; ac_word=$2
7715echo "$as_me:7715: checking for $ac_word" >&5
7716echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7717if test "${ac_cv_path_XTERM_PATH+set}" = set; then
7718  echo $ECHO_N "(cached) $ECHO_C" >&6
7719else
7720  case $XTERM_PATH in
7721  [\\/]* | ?:[\\/]*)
7722  ac_cv_path_XTERM_PATH="$XTERM_PATH" # Let the user override the test with a path.
7723  ;;
7724  *)
7725  ac_save_IFS=$IFS; IFS=$ac_path_separator
7726ac_dummy="$PATH"
7727for ac_dir in $ac_dummy; do
7728  IFS=$ac_save_IFS
7729  test -z "$ac_dir" && ac_dir=.
7730  if $as_executable_p "$ac_dir/$ac_word"; then
7731   ac_cv_path_XTERM_PATH="$ac_dir/$ac_word"
7732   echo "$as_me:7732: found $ac_dir/$ac_word" >&5
7733   break
7734fi
7735done
7736
7737  ;;
7738esac
7739fi
7740XTERM_PATH=$ac_cv_path_XTERM_PATH
7741
7742if test -n "$XTERM_PATH"; then
7743  echo "$as_me:7743: result: $XTERM_PATH" >&5
7744echo "${ECHO_T}$XTERM_PATH" >&6
7745else
7746  echo "$as_me:7746: result: no" >&5
7747echo "${ECHO_T}no" >&6
7748fi
7749
7750  test -n "$XTERM_PATH" && break
7751done
7752test -n "$XTERM_PATH" || XTERM_PATH="$XTERM_PATH"
7753
7754cf_path_prog=""
7755cf_path_args=""
7756IFS="${IFS:- 	}"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
7757for cf_temp in $ac_cv_path_XTERM_PATH
7758do
7759	if test -z "$cf_path_prog" ; then
7760		if test "$with_full_paths" = yes ; then
7761
7762if test "x$prefix" != xNONE; then
7763	cf_path_syntax="$prefix"
7764else
7765	cf_path_syntax="$ac_default_prefix"
7766fi
7767
7768case ".$cf_temp" in
7769(.\$\(*\)*|.\'*\'*)
7770	;;
7771(..|./*|.\\*)
7772	;;
7773(.[a-zA-Z]:[\\/]*) # OS/2 EMX
7774	;;
7775(.\$\{*prefix\}*|.\$\{*dir\}*)
7776	eval cf_temp="$cf_temp"
7777	case ".$cf_temp" in
7778	(.NONE/*)
7779		cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
7780		;;
7781	esac
7782	;;
7783(.no|.NONE/*)
7784	cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
7785	;;
7786(*)
7787	break
7788	;;
7789esac
7790
7791			cf_path_prog="$cf_temp"
7792		else
7793			cf_path_prog="`basename "$cf_temp"`"
7794		fi
7795	elif test -z "$cf_path_args" ; then
7796		cf_path_args="$cf_temp"
7797	else
7798		cf_path_args="$cf_path_args $cf_temp"
7799	fi
7800done
7801IFS="$cf_save_ifs"
7802
7803if test -n "$cf_path_prog" ; then
7804
7805echo "${as_me:-configure}:7805: testing defining path for ${cf_path_prog} ..." 1>&5
7806
7807cat >>confdefs.h <<EOF
7808#define XTERM_PATH_PATH "$cf_path_prog"
7809EOF
7810
7811	test -n "$cf_path_args" &&
7812cat >>confdefs.h <<EOF
7813#define XTERM_PATH_ARGS "$cf_path_args"
7814EOF
7815
7816fi
7817
7818# If any of --program-prefix, --program-suffix or --program-transform-name is
7819# given, accept an option tell the makefile to create a symbolic link, e.g.,
7820# to "xterm" on install.
7821XTERM_SYMLINK=NONE
7822
7823if test "$program_transform_name" != "'s,,,'" ; then
7824cf_name=`echo "$program_transform_name" | sed -e 's,\\$\\$,$,g'`
7825cf_name=`echo xterm |sed -e "$cf_name"`
7826echo "$as_me:7826: checking for symbolic link to create to $cf_name" >&5
7827echo $ECHO_N "checking for symbolic link to create to $cf_name... $ECHO_C" >&6
7828
7829# Check whether --with-xterm-symlink or --without-xterm-symlink was given.
7830if test "${with_xterm_symlink+set}" = set; then
7831  withval="$with_xterm_symlink"
7832  with_symlink=$withval
7833else
7834  with_symlink=xterm
7835fi;
7836echo "$as_me:7836: result: $with_symlink" >&5
7837echo "${ECHO_T}$with_symlink" >&6
7838test "$with_symlink" = yes && with_symlink=xterm
7839test -n "$with_symlink" && \
7840	test "$with_symlink" != no && \
7841	test "$with_symlink" != "$cf_name" && \
7842	XTERM_SYMLINK="$with_symlink"
7843fi
7844
7845echo "$as_me:7845: checking if you want to disable openpty" >&5
7846echo $ECHO_N "checking if you want to disable openpty... $ECHO_C" >&6
7847
7848# Check whether --enable-openpty or --disable-openpty was given.
7849if test "${enable_openpty+set}" = set; then
7850  enableval="$enable_openpty"
7851  test "$enableval" != no && enableval=yes
7852	if test "$enableval" != "yes" ; then
7853    disable_openpty=yes
7854	else
7855		disable_openpty=no
7856	fi
7857else
7858  enableval=yes
7859	disable_openpty=no
7860
7861fi;
7862echo "$as_me:7862: result: $disable_openpty" >&5
7863echo "${ECHO_T}$disable_openpty" >&6
7864
7865echo "$as_me:7865: checking if you want to disable setuid" >&5
7866echo $ECHO_N "checking if you want to disable setuid... $ECHO_C" >&6
7867
7868# Check whether --enable-setuid or --disable-setuid was given.
7869if test "${enable_setuid+set}" = set; then
7870  enableval="$enable_setuid"
7871  test "$enableval" != no && enableval=yes
7872	if test "$enableval" != "yes" ; then
7873    disable_setuid=yes
7874	else
7875		disable_setuid=no
7876	fi
7877else
7878  enableval=yes
7879	disable_setuid=no
7880
7881fi;
7882echo "$as_me:7882: result: $disable_setuid" >&5
7883echo "${ECHO_T}$disable_setuid" >&6
7884
7885echo "$as_me:7885: checking if you want to disable setgid" >&5
7886echo $ECHO_N "checking if you want to disable setgid... $ECHO_C" >&6
7887
7888# Check whether --enable-setgid or --disable-setgid was given.
7889if test "${enable_setgid+set}" = set; then
7890  enableval="$enable_setgid"
7891  test "$enableval" != no && enableval=yes
7892	if test "$enableval" != "yes" ; then
7893    disable_setgid=yes
7894	else
7895		disable_setgid=no
7896	fi
7897else
7898  enableval=yes
7899	disable_setgid=no
7900
7901fi;
7902echo "$as_me:7902: result: $disable_setgid" >&5
7903echo "${ECHO_T}$disable_setgid" >&6
7904
7905echo "$as_me:7905: checking if you want to run xterm setuid to a given user" >&5
7906echo $ECHO_N "checking if you want to run xterm setuid to a given user... $ECHO_C" >&6
7907
7908# Check whether --with-setuid or --without-setuid was given.
7909if test "${with_setuid+set}" = set; then
7910  withval="$with_setuid"
7911  use_given_setuid=$withval
7912else
7913  use_given_setuid=no
7914fi;
7915echo "$as_me:7915: result: $use_given_setuid" >&5
7916echo "${ECHO_T}$use_given_setuid" >&6
7917
7918if test "$use_given_setuid" != no ; then
7919	if test "$use_given_setuid" = yes ; then
7920		cf_cv_given_setuid=root
7921	else
7922		cf_cv_given_setuid=$use_given_setuid
7923	fi
7924	# inherit SINSTALL_OPTS from environment to allow packager to customize it.
7925	SINSTALL_OPTS="$SINSTALL_OPTS u+s -u $cf_cv_given_setuid"
7926fi
7927
7928echo "$as_me:7928: checking if you want to run xterm setgid to match utmp/utmpx file" >&5
7929echo $ECHO_N "checking if you want to run xterm setgid to match utmp/utmpx file... $ECHO_C" >&6
7930
7931# Check whether --with-utmp-setgid or --without-utmp-setgid was given.
7932if test "${with_utmp_setgid+set}" = set; then
7933  withval="$with_utmp_setgid"
7934  use_utmp_setgid=$withval
7935else
7936  use_utmp_setgid=no
7937fi;
7938echo "$as_me:7938: result: $use_utmp_setgid" >&5
7939echo "${ECHO_T}$use_utmp_setgid" >&6
7940
7941if test "$use_utmp_setgid" != no ; then
7942	if test "$use_utmp_setgid" = yes ; then
7943
7944if test $cf_cv_have_utmp != no ; then
7945echo "$as_me:7945: checking for utmp/utmpx group" >&5
7946echo $ECHO_N "checking for utmp/utmpx group... $ECHO_C" >&6
7947if test "${cf_cv_utmp_group+set}" = set; then
7948  echo $ECHO_N "(cached) $ECHO_C" >&6
7949else
7950
7951for cf_utmp_path in /var/adm /var/run
7952do
7953	for cf_utmp_file in utmpx utmp
7954	do
7955		if test -f $cf_utmp_path/$cf_utmp_file
7956		then
7957			cf_cv_utmp_group=root
7958
7959			cf_option="-lL"
7960
7961			# Expect listing to have fields like this:
7962			#-r--r--r--   1 user      group       34293 Jul 18 16:29 pathname
7963			ls "$cf_option" "$cf_utmp_path/$cf_utmp_file" >conftest
7964			read cf_mode cf_links cf_usr cf_grp cf_size cf_date1 cf_date2 cf_date3 cf_rest <conftest
7965			if test -z "$cf_rest" ; then
7966				cf_option="${cf_option}g"
7967				ls "$cf_option" "$cf_utmp_path/$cf_utmp_file" >conftest
7968				read cf_mode cf_links cf_usr cf_grp cf_size cf_date1 cf_date2 cf_date3 cf_rest <conftest
7969			fi
7970			rm -f conftest
7971
7972			# If we have a pathname, and the date fields look right, assume we've
7973			# captured the group as well.
7974			if test -n "$cf_rest" ; then
7975				cf_test=`echo "${cf_date2}${cf_date3}" | sed -e 's/[0-9:]//g'`
7976				if test -z "$cf_test" ; then
7977					cf_cv_utmp_group=$cf_grp;
7978				fi
7979			fi
7980			break
7981		fi
7982	done
7983	test -n "$cf_cv_utmp_group" && break
7984done
7985
7986fi
7987echo "$as_me:7987: result: $cf_cv_utmp_group" >&5
7988echo "${ECHO_T}$cf_cv_utmp_group" >&6
7989else
7990	{ { echo "$as_me:7990: error: cannot find utmp group" >&5
7991echo "$as_me: error: cannot find utmp group" >&2;}
7992   { (exit 1); exit 1; }; }
7993fi
7994
7995	else
7996		cf_cv_utmp_group=$use_utmp_setgid
7997	fi
7998	if test "$cf_cv_posix_saved_ids" != yes ; then
7999		{ { echo "$as_me:7999: error: Your system does not support POSIX saved-ids" >&5
8000echo "$as_me: error: Your system does not support POSIX saved-ids" >&2;}
8001   { (exit 1); exit 1; }; }
8002	fi
8003
8004cat >>confdefs.h <<\EOF
8005#define USE_UTMP_SETGID 1
8006EOF
8007
8008	SINSTALL_OPTS="$SINSTALL_OPTS g+s -g $cf_cv_utmp_group"
8009fi
8010
8011echo "$as_me:8011: checking if you want to link with utempter" >&5
8012echo $ECHO_N "checking if you want to link with utempter... $ECHO_C" >&6
8013
8014# Check whether --with-utempter or --without-utempter was given.
8015if test "${with_utempter+set}" = set; then
8016  withval="$with_utempter"
8017  use_utempter=$withval
8018else
8019  use_utempter=no
8020fi;
8021echo "$as_me:8021: result: $use_utempter" >&5
8022echo "${ECHO_T}$use_utempter" >&6
8023
8024if test "$use_utempter" = yes ; then
8025
8026echo "$as_me:8026: checking if we can link with utempter library" >&5
8027echo $ECHO_N "checking if we can link with utempter library... $ECHO_C" >&6
8028if test "${cf_cv_have_utempter+set}" = set; then
8029  echo $ECHO_N "(cached) $ECHO_C" >&6
8030else
8031
8032cf_save_LIBS="$LIBS"
8033
8034cf_add_libs="$LIBS"
8035# reverse order
8036cf_add_0lib=
8037for cf_add_1lib in -lutempter; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8038# filter duplicates
8039for cf_add_1lib in $cf_add_0lib; do
8040	for cf_add_2lib in $cf_add_libs; do
8041		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8042			cf_add_1lib=
8043			break
8044		fi
8045	done
8046	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8047done
8048LIBS="$cf_add_libs"
8049
8050cat >"conftest.$ac_ext" <<_ACEOF
8051#line 8051 "configure"
8052#include "confdefs.h"
8053
8054#include <utempter.h>
8055
8056int
8057main (void)
8058{
8059
8060	addToUtmp("/dev/tty", 0, 1);
8061	removeFromUtmp();
8062
8063  ;
8064  return 0;
8065}
8066_ACEOF
8067rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8068if { (eval echo "$as_me:8068: \"$ac_link\"") >&5
8069  (eval $ac_link) 2>&5
8070  ac_status=$?
8071  echo "$as_me:8071: \$? = $ac_status" >&5
8072  (exit "$ac_status"); } &&
8073         { ac_try='test -s "conftest$ac_exeext"'
8074  { (eval echo "$as_me:8074: \"$ac_try\"") >&5
8075  (eval $ac_try) 2>&5
8076  ac_status=$?
8077  echo "$as_me:8077: \$? = $ac_status" >&5
8078  (exit "$ac_status"); }; }; then
8079
8080	cf_cv_have_utempter=yes
8081else
8082  echo "$as_me: failed program was:" >&5
8083cat "conftest.$ac_ext" >&5
8084
8085	cf_cv_have_utempter=no
8086fi
8087rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8088LIBS="$cf_save_LIBS"
8089
8090fi
8091echo "$as_me:8091: result: $cf_cv_have_utempter" >&5
8092echo "${ECHO_T}$cf_cv_have_utempter" >&6
8093if test "$cf_cv_have_utempter" = yes ; then
8094
8095cat >>confdefs.h <<\EOF
8096#define USE_UTEMPTER 1
8097EOF
8098
8099cf_add_libs="$LIBS"
8100# reverse order
8101cf_add_0lib=
8102for cf_add_1lib in -lutempter; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8103# filter duplicates
8104for cf_add_1lib in $cf_add_0lib; do
8105	for cf_add_2lib in $cf_add_libs; do
8106		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8107			cf_add_1lib=
8108			break
8109		fi
8110	done
8111	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8112done
8113LIBS="$cf_add_libs"
8114
8115fi
8116
8117	test "$cf_cv_have_utempter" != yes && use_utempter=no
8118else
8119	use_utempter=no
8120fi
8121
8122# Some configurations permit (or require) either setuid or setgid mode.
8123# Let the user decide.
8124if test "$use_utempter" = yes ; then
8125	if test "${enable_setuid+set}" != set ; then
8126		disable_setuid=yes
8127		test -n "$verbose" && echo "	No --disable-setuid option given, force to yes" 1>&6
8128
8129echo "${as_me:-configure}:8129: testing No --disable-setuid option given, force to yes ..." 1>&5
8130
8131	fi
8132fi
8133
8134###	checks for external data
8135
8136echo "$as_me:8136: checking if external errno is declared" >&5
8137echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
8138if test "${cf_cv_dcl_errno+set}" = set; then
8139  echo $ECHO_N "(cached) $ECHO_C" >&6
8140else
8141
8142	cat >"conftest.$ac_ext" <<_ACEOF
8143#line 8143 "configure"
8144#include "confdefs.h"
8145
8146#ifdef HAVE_STDLIB_H
8147#include <stdlib.h>
8148#endif
8149#include <stdio.h>
8150#include <sys/types.h>
8151#include <errno.h>
8152int
8153main (void)
8154{
8155int x = (int) errno; (void)x
8156  ;
8157  return 0;
8158}
8159_ACEOF
8160rm -f "conftest.$ac_objext"
8161if { (eval echo "$as_me:8161: \"$ac_compile\"") >&5
8162  (eval $ac_compile) 2>&5
8163  ac_status=$?
8164  echo "$as_me:8164: \$? = $ac_status" >&5
8165  (exit "$ac_status"); } &&
8166         { ac_try='test -s "conftest.$ac_objext"'
8167  { (eval echo "$as_me:8167: \"$ac_try\"") >&5
8168  (eval $ac_try) 2>&5
8169  ac_status=$?
8170  echo "$as_me:8170: \$? = $ac_status" >&5
8171  (exit "$ac_status"); }; }; then
8172  cf_cv_dcl_errno=yes
8173else
8174  echo "$as_me: failed program was:" >&5
8175cat "conftest.$ac_ext" >&5
8176cf_cv_dcl_errno=no
8177fi
8178rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8179
8180fi
8181echo "$as_me:8181: result: $cf_cv_dcl_errno" >&5
8182echo "${ECHO_T}$cf_cv_dcl_errno" >&6
8183
8184if test "$cf_cv_dcl_errno" = no ; then
8185
8186cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
8187
8188	cat >>confdefs.h <<EOF
8189#define $cf_result 1
8190EOF
8191
8192fi
8193
8194# It's possible (for near-UNIX clones) that the data doesn't exist
8195
8196echo "$as_me:8196: checking if external errno exists" >&5
8197echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
8198if test "${cf_cv_have_errno+set}" = set; then
8199  echo $ECHO_N "(cached) $ECHO_C" >&6
8200else
8201
8202	cat >"conftest.$ac_ext" <<_ACEOF
8203#line 8203 "configure"
8204#include "confdefs.h"
8205
8206#undef errno
8207extern int errno;
8208
8209int
8210main (void)
8211{
8212errno = 2
8213  ;
8214  return 0;
8215}
8216_ACEOF
8217rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8218if { (eval echo "$as_me:8218: \"$ac_link\"") >&5
8219  (eval $ac_link) 2>&5
8220  ac_status=$?
8221  echo "$as_me:8221: \$? = $ac_status" >&5
8222  (exit "$ac_status"); } &&
8223         { ac_try='test -s "conftest$ac_exeext"'
8224  { (eval echo "$as_me:8224: \"$ac_try\"") >&5
8225  (eval $ac_try) 2>&5
8226  ac_status=$?
8227  echo "$as_me:8227: \$? = $ac_status" >&5
8228  (exit "$ac_status"); }; }; then
8229  cf_cv_have_errno=yes
8230else
8231  echo "$as_me: failed program was:" >&5
8232cat "conftest.$ac_ext" >&5
8233cf_cv_have_errno=no
8234fi
8235rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8236
8237fi
8238echo "$as_me:8238: result: $cf_cv_have_errno" >&5
8239echo "${ECHO_T}$cf_cv_have_errno" >&6
8240
8241if test "$cf_cv_have_errno" = yes ; then
8242
8243cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
8244
8245	cat >>confdefs.h <<EOF
8246#define $cf_result 1
8247EOF
8248
8249fi
8250
8251echo "$as_me:8251: checking for explicit tty group name" >&5
8252echo $ECHO_N "checking for explicit tty group name... $ECHO_C" >&6
8253
8254# Check whether --with-tty-group or --without-tty-group was given.
8255if test "${with_tty_group+set}" = set; then
8256  withval="$with_tty_group"
8257  cf_tty_group=$withval
8258else
8259  cf_tty_group=auto...
8260fi;
8261test -z "$cf_tty_group"    && cf_tty_group=auto...
8262test "$cf_tty_group" = yes && cf_tty_group=auto...
8263echo "$as_me:8263: result: $cf_tty_group" >&5
8264echo "${ECHO_T}$cf_tty_group" >&6
8265
8266if test "$cf_tty_group" = "auto..." ; then
8267echo "$as_me:8267: checking for tty group name" >&5
8268echo $ECHO_N "checking for tty group name... $ECHO_C" >&6
8269if test "${cf_cv_tty_group_name+set}" = set; then
8270  echo $ECHO_N "(cached) $ECHO_C" >&6
8271else
8272
8273# If we are configuring as root, it is hard to get a clue about the tty group.
8274# But we'll guess based on how our connection is set up - assuming it is done
8275# properly.
8276
8277cf_uid="`id | sed -e 's/^^=*=//' -e 's/(.*$//'`"
8278# )vi
8279if test "$cf_uid" != 0 ; then
8280cf_cv_tty_group_name=
8281cf_tty_name="`tty`"
8282test "$cf_tty_name" = "not a tty" && cf_tty_name=/dev/tty
8283test -z "$cf_tty_name" && cf_tty_name=/dev/tty
8284if test -c "$cf_tty_name"
8285then
8286	cf_option="-lL"
8287
8288	# Expect listing to have fields like this:
8289	#-rwxrwxrwx   1 user      group       34293 Jul 18 16:29 pathname
8290	ls $cf_option "$cf_tty_name" >conftest.out
8291	read cf_mode cf_links cf_usr cf_grp cf_size cf_date1 cf_date2 cf_date3 cf_rest <conftest.out
8292	if test -z "$cf_rest" ; then
8293		cf_option="${cf_option}g"
8294		ls "$cf_option" "$cf_tty_name" >conftest.out
8295		read cf_mode cf_links cf_usr cf_grp cf_size cf_date1 cf_date2 cf_date3 cf_rest <conftest.out
8296	fi
8297	rm -f conftest.out
8298	cf_cv_tty_group_name=$cf_grp
8299fi
8300fi
8301
8302# If we cannot deduce the tty group, fall back on hardcoded cases
8303
8304if test -z "$cf_cv_tty_group_name"
8305then
8306case $host_os in
8307(osf*)
8308	cf_cv_tty_group_name="terminal"
8309	;;
8310(*)
8311	cf_cv_tty_group_name="unknown"
8312	if ( ${EGREP-egrep} '^tty:' /etc/group 2>/dev/null 1>/dev/null ) then
8313		cf_cv_tty_group_name="tty"
8314	fi
8315	;;
8316esac
8317fi
8318
8319fi
8320echo "$as_me:8320: result: $cf_cv_tty_group_name" >&5
8321echo "${ECHO_T}$cf_cv_tty_group_name" >&6
8322cf_tty_group="$cf_cv_tty_group_name"
8323else
8324	# if configure option, always do this
8325
8326cat >>confdefs.h <<\EOF
8327#define USE_TTY_GROUP 1
8328EOF
8329
8330fi
8331
8332cat >>confdefs.h <<EOF
8333#define TTY_GROUP_NAME "$cf_tty_group"
8334EOF
8335
8336# This is only a double-check that the group-name we obtained above really
8337# does apply to the device.  We cannot perform this test if we are in batch
8338# mode, or if we are cross-compiling.
8339
8340echo "$as_me:8340: checking if we may use the $cf_tty_group group" >&5
8341echo $ECHO_N "checking if we may use the $cf_tty_group group... $ECHO_C" >&6
8342if test "${cf_cv_tty_group+set}" = set; then
8343  echo $ECHO_N "(cached) $ECHO_C" >&6
8344else
8345
8346cf_tty_name="`tty`"
8347if test "$cf_tty_name" != "not a tty"
8348then
8349if test "$cross_compiling" = yes; then
8350  cf_cv_tty_group=unknown
8351else
8352  cat >"conftest.$ac_ext" <<_ACEOF
8353#line 8353 "configure"
8354#include "confdefs.h"
8355
8356#include <unistd.h>
8357#include <sys/types.h>
8358#include <sys/stat.h>
8359#include <grp.h>
8360int main(void)
8361{
8362	struct stat sb;
8363	struct group *ttygrp;
8364	int fd;
8365	char *name;
8366
8367	for (fd = 0; fd < 3; ++fd) {
8368		if ((name = ttyname(fd)) != 0)
8369			break;
8370	}
8371	if (name == 0)
8372		name = "/dev/tty";
8373
8374	ttygrp = getgrnam(TTY_GROUP_NAME);
8375	endgrent();
8376
8377	if (ttygrp != 0
8378	 && name != 0
8379	 && stat(name, &sb) == 0
8380	 && sb.st_gid != getgid()
8381	 && sb.st_gid == ttygrp->gr_gid) {
8382		${cf_cv_main_return:-return} (0);
8383	}
8384	${cf_cv_main_return:-return} (1);
8385}
8386
8387_ACEOF
8388rm -f "conftest$ac_exeext"
8389if { (eval echo "$as_me:8389: \"$ac_link\"") >&5
8390  (eval $ac_link) 2>&5
8391  ac_status=$?
8392  echo "$as_me:8392: \$? = $ac_status" >&5
8393  (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
8394  { (eval echo "$as_me:8394: \"$ac_try\"") >&5
8395  (eval $ac_try) 2>&5
8396  ac_status=$?
8397  echo "$as_me:8397: \$? = $ac_status" >&5
8398  (exit "$ac_status"); }; }; then
8399  cf_cv_tty_group=yes
8400else
8401  echo "$as_me: program exited with status $ac_status" >&5
8402echo "$as_me: failed program was:" >&5
8403cat "conftest.$ac_ext" >&5
8404cf_cv_tty_group=no
8405fi
8406rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
8407fi
8408elif test "$cross_compiling" = yes; then
8409	cf_cv_tty_group=unknown
8410else
8411	cf_cv_tty_group=yes
8412fi
8413
8414fi
8415echo "$as_me:8415: result: $cf_cv_tty_group" >&5
8416echo "${ECHO_T}$cf_cv_tty_group" >&6
8417
8418if test $cf_cv_tty_group = no ; then
8419	{ echo "$as_me:8419: WARNING: Cannot use $cf_tty_group group" >&5
8420echo "$as_me: WARNING: Cannot use $cf_tty_group group" >&2;}
8421else
8422	cat >>confdefs.h <<\EOF
8423#define USE_TTY_GROUP 1
8424EOF
8425
8426fi
8427
8428###	checks for system services and user specified options
8429
8430echo "$as_me:8430: checking for X" >&5
8431echo $ECHO_N "checking for X... $ECHO_C" >&6
8432
8433# Check whether --with-x or --without-x was given.
8434if test "${with_x+set}" = set; then
8435  withval="$with_x"
8436
8437fi;
8438# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
8439if test "x$with_x" = xno; then
8440  # The user explicitly disabled X.
8441  have_x=disabled
8442else
8443  if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
8444    # Both variables are already set.
8445    have_x=yes
8446  else
8447    if test "${ac_cv_have_x+set}" = set; then
8448  echo $ECHO_N "(cached) $ECHO_C" >&6
8449else
8450  # One or both of the vars are not set, and there is no cached value.
8451ac_x_includes=no ac_x_libraries=no
8452rm -fr conftest.dir
8453if mkdir conftest.dir; then
8454  cd conftest.dir
8455  # Make sure to not put "make" in the Imakefile rules, since we grep it out.
8456  cat >Imakefile <<'EOF'
8457acfindx:
8458	@echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
8459EOF
8460  if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
8461    # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
8462    eval "`${MAKE-make} acfindx 2>/dev/null | grep -v make`"
8463    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
8464    for ac_extension in a so sl dylib dll; do
8465      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
8466         test -f "$ac_im_libdir/libX11.$ac_extension"; then
8467        ac_im_usrlibdir=$ac_im_libdir; break
8468      fi
8469    done
8470    # Screen out bogus values from the imake configuration.  They are
8471    # bogus both because they are the default anyway, and because
8472    # using them would break gcc on systems where it needs fixed includes.
8473    case $ac_im_incroot in
8474	/usr/include) ;;
8475	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
8476    esac
8477    case $ac_im_usrlibdir in
8478	/usr/lib | /lib) ;;
8479	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
8480    esac
8481  fi
8482  cd ..
8483  rm -fr conftest.dir
8484fi
8485
8486# Standard set of common directories for X headers.
8487# Check X11 before X11Rn because it is often a symlink to the current release.
8488ac_x_header_dirs='
8489/usr/X11/include
8490/usr/X11R7/include
8491/usr/X11R6/include
8492/usr/X11R5/include
8493/usr/X11R4/include
8494
8495/opt/local/include
8496/opt/X11/include
8497
8498/usr/include/X11
8499/usr/include/X11R7
8500/usr/include/X11R6
8501/usr/include/X11R5
8502/usr/include/X11R4
8503
8504/usr/local/X11/include
8505/usr/local/X11R7/include
8506/usr/local/X11R6/include
8507/usr/local/X11R5/include
8508/usr/local/X11R4/include
8509
8510/usr/local/include/X11
8511/usr/local/include/X11R7
8512/usr/local/include/X11R6
8513/usr/local/include/X11R5
8514/usr/local/include/X11R4
8515
8516/usr/X386/include
8517/usr/x386/include
8518/usr/XFree86/include/X11
8519
8520/usr/include
8521/usr/local/include
8522/usr/unsupported/include
8523/usr/athena/include
8524/usr/local/x11r5/include
8525/usr/lpp/Xamples/include
8526
8527/usr/openwin/include
8528/usr/openwin/share/include'
8529
8530if test "$ac_x_includes" = no; then
8531  # Guess where to find include files, by looking for Intrinsic.h.
8532  # First, try using that file with no special directory specified.
8533  cat >"conftest.$ac_ext" <<_ACEOF
8534#line 8534 "configure"
8535#include "confdefs.h"
8536#include <X11/Intrinsic.h>
8537_ACEOF
8538if { (eval echo "$as_me:8538: \"$ac_cpp "conftest.$ac_ext"\"") >&5
8539  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
8540  ac_status=$?
8541  $EGREP -v '^ *\+' conftest.er1 >conftest.err
8542  rm -f conftest.er1
8543  cat conftest.err >&5
8544  echo "$as_me:8544: \$? = $ac_status" >&5
8545  (exit "$ac_status"); } >/dev/null; then
8546  if test -s conftest.err; then
8547    ac_cpp_err=$ac_c_preproc_warn_flag
8548  else
8549    ac_cpp_err=
8550  fi
8551else
8552  ac_cpp_err=yes
8553fi
8554if test -z "$ac_cpp_err"; then
8555  # We can compile using X headers with no special include directory.
8556ac_x_includes=
8557else
8558  echo "$as_me: failed program was:" >&5
8559  cat "conftest.$ac_ext" >&5
8560  for ac_dir in $ac_x_header_dirs; do
8561  if test -r "$ac_dir/X11/Intrinsic.h"; then
8562    ac_x_includes=$ac_dir
8563    break
8564  fi
8565done
8566fi
8567rm -f conftest.err "conftest.$ac_ext"
8568fi # $ac_x_includes = no
8569
8570if test "$ac_x_libraries" = no; then
8571  # Check for the libraries.
8572  # See if we find them without any special options.
8573  # Don't add to $LIBS permanently.
8574  ac_save_LIBS=$LIBS
8575  LIBS="-lXt $LIBS"
8576  cat >"conftest.$ac_ext" <<_ACEOF
8577#line 8577 "configure"
8578#include "confdefs.h"
8579#include <X11/Intrinsic.h>
8580int
8581main (void)
8582{
8583XtMalloc (0)
8584  ;
8585  return 0;
8586}
8587_ACEOF
8588rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8589if { (eval echo "$as_me:8589: \"$ac_link\"") >&5
8590  (eval $ac_link) 2>&5
8591  ac_status=$?
8592  echo "$as_me:8592: \$? = $ac_status" >&5
8593  (exit "$ac_status"); } &&
8594         { ac_try='test -s "conftest$ac_exeext"'
8595  { (eval echo "$as_me:8595: \"$ac_try\"") >&5
8596  (eval $ac_try) 2>&5
8597  ac_status=$?
8598  echo "$as_me:8598: \$? = $ac_status" >&5
8599  (exit "$ac_status"); }; }; then
8600  LIBS=$ac_save_LIBS
8601# We can link X programs with no special library path.
8602ac_x_libraries=
8603else
8604  echo "$as_me: failed program was:" >&5
8605cat "conftest.$ac_ext" >&5
8606LIBS=$ac_save_LIBS
8607for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
8608do
8609  # Don't even attempt the hair of trying to link an X program!
8610  for ac_extension in a so sl dylib dll; do
8611    if test -r "$ac_dir/libXt.$ac_extension"; then
8612      ac_x_libraries=$ac_dir
8613      break 2
8614    fi
8615  done
8616done
8617fi
8618rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8619fi # $ac_x_libraries = no
8620
8621if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
8622  # Didn't find X anywhere.  Cache the known absence of X.
8623  ac_cv_have_x="have_x=no"
8624else
8625  # Record where we found X for the cache.
8626  ac_cv_have_x="have_x=yes \
8627	        ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
8628fi
8629fi
8630
8631  fi
8632  eval "$ac_cv_have_x"
8633fi # $with_x != no
8634
8635if test "$have_x" != yes; then
8636  echo "$as_me:8636: result: $have_x" >&5
8637echo "${ECHO_T}$have_x" >&6
8638  no_x=yes
8639else
8640  # If each of the values was on the command line, it overrides each guess.
8641  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
8642  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
8643  # Update the cache value to reflect the command line values.
8644  ac_cv_have_x="have_x=yes \
8645		ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
8646  echo "$as_me:8646: result: libraries $x_libraries, headers $x_includes" >&5
8647echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6
8648fi
8649
8650if test "$no_x" = yes; then
8651  # Not all programs may use this symbol, but it does not hurt to define it.
8652
8653cat >>confdefs.h <<\EOF
8654#define X_DISPLAY_MISSING 1
8655EOF
8656
8657  X_CFLAGS=
8658  X_PRE_LIBS=
8659  X_LIBS=
8660  X_EXTRA_LIBS=
8661else
8662  if test -n "$x_includes"; then
8663    X_CFLAGS="$X_CFLAGS -I$x_includes"
8664  fi
8665
8666  # It would also be nice to do this for all -L options, not just this one.
8667  if test -n "$x_libraries"; then
8668    X_LIBS="$X_LIBS -L$x_libraries"
8669    # For Solaris; some versions of Sun CC require a space after -R and
8670    # others require no space.  Words are not sufficient . . . .
8671    case `(uname -sr) 2>/dev/null` in
8672    "SunOS 5"*)
8673      echo "$as_me:8673: checking whether -R must be followed by a space" >&5
8674echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6
8675      ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
8676      cat >"conftest.$ac_ext" <<_ACEOF
8677#line 8677 "configure"
8678#include "confdefs.h"
8679
8680int
8681main (void)
8682{
8683
8684  ;
8685  return 0;
8686}
8687_ACEOF
8688rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8689if { (eval echo "$as_me:8689: \"$ac_link\"") >&5
8690  (eval $ac_link) 2>&5
8691  ac_status=$?
8692  echo "$as_me:8692: \$? = $ac_status" >&5
8693  (exit "$ac_status"); } &&
8694         { ac_try='test -s "conftest$ac_exeext"'
8695  { (eval echo "$as_me:8695: \"$ac_try\"") >&5
8696  (eval $ac_try) 2>&5
8697  ac_status=$?
8698  echo "$as_me:8698: \$? = $ac_status" >&5
8699  (exit "$ac_status"); }; }; then
8700  ac_R_nospace=yes
8701else
8702  echo "$as_me: failed program was:" >&5
8703cat "conftest.$ac_ext" >&5
8704ac_R_nospace=no
8705fi
8706rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8707      if test $ac_R_nospace = yes; then
8708	echo "$as_me:8708: result: no" >&5
8709echo "${ECHO_T}no" >&6
8710	X_LIBS="$X_LIBS -R$x_libraries"
8711      else
8712	LIBS="$ac_xsave_LIBS -R $x_libraries"
8713	cat >"conftest.$ac_ext" <<_ACEOF
8714#line 8714 "configure"
8715#include "confdefs.h"
8716
8717int
8718main (void)
8719{
8720
8721  ;
8722  return 0;
8723}
8724_ACEOF
8725rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8726if { (eval echo "$as_me:8726: \"$ac_link\"") >&5
8727  (eval $ac_link) 2>&5
8728  ac_status=$?
8729  echo "$as_me:8729: \$? = $ac_status" >&5
8730  (exit "$ac_status"); } &&
8731         { ac_try='test -s "conftest$ac_exeext"'
8732  { (eval echo "$as_me:8732: \"$ac_try\"") >&5
8733  (eval $ac_try) 2>&5
8734  ac_status=$?
8735  echo "$as_me:8735: \$? = $ac_status" >&5
8736  (exit "$ac_status"); }; }; then
8737  ac_R_space=yes
8738else
8739  echo "$as_me: failed program was:" >&5
8740cat "conftest.$ac_ext" >&5
8741ac_R_space=no
8742fi
8743rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8744	if test $ac_R_space = yes; then
8745	  echo "$as_me:8745: result: yes" >&5
8746echo "${ECHO_T}yes" >&6
8747	  X_LIBS="$X_LIBS -R $x_libraries"
8748	else
8749	  echo "$as_me:8749: result: neither works" >&5
8750echo "${ECHO_T}neither works" >&6
8751	fi
8752      fi
8753      LIBS=$ac_xsave_LIBS
8754    esac
8755  fi
8756
8757  # Check for system-dependent libraries X programs must link with.
8758  # Do this before checking for the system-independent R6 libraries
8759  # (-lICE), since we may need -lsocket or whatever for X linking.
8760
8761  if test "$ISC" = yes; then
8762    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
8763  else
8764    # Martyn Johnson says this is needed for Ultrix, if the X
8765    # libraries were built with DECnet support.  And Karl Berry says
8766    # the Alpha needs dnet_stub (dnet does not exist).
8767    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
8768    cat >"conftest.$ac_ext" <<_ACEOF
8769#line 8769 "configure"
8770#include "confdefs.h"
8771
8772/* Override any gcc2 internal prototype to avoid an error.  */
8773#ifdef __cplusplus
8774extern "C"
8775#endif
8776/* We use char because int might match the return type of a gcc2
8777   builtin and then its argument prototype would still apply.  */
8778char XOpenDisplay ();
8779int
8780main (void)
8781{
8782XOpenDisplay ();
8783  ;
8784  return 0;
8785}
8786_ACEOF
8787rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8788if { (eval echo "$as_me:8788: \"$ac_link\"") >&5
8789  (eval $ac_link) 2>&5
8790  ac_status=$?
8791  echo "$as_me:8791: \$? = $ac_status" >&5
8792  (exit "$ac_status"); } &&
8793         { ac_try='test -s "conftest$ac_exeext"'
8794  { (eval echo "$as_me:8794: \"$ac_try\"") >&5
8795  (eval $ac_try) 2>&5
8796  ac_status=$?
8797  echo "$as_me:8797: \$? = $ac_status" >&5
8798  (exit "$ac_status"); }; }; then
8799  :
8800else
8801  echo "$as_me: failed program was:" >&5
8802cat "conftest.$ac_ext" >&5
8803echo "$as_me:8803: checking for dnet_ntoa in -ldnet" >&5
8804echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6
8805if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
8806  echo $ECHO_N "(cached) $ECHO_C" >&6
8807else
8808  ac_check_lib_save_LIBS=$LIBS
8809LIBS="-ldnet  $LIBS"
8810cat >"conftest.$ac_ext" <<_ACEOF
8811#line 8811 "configure"
8812#include "confdefs.h"
8813
8814/* Override any gcc2 internal prototype to avoid an error.  */
8815#ifdef __cplusplus
8816extern "C"
8817#endif
8818/* We use char because int might match the return type of a gcc2
8819   builtin and then its argument prototype would still apply.  */
8820char dnet_ntoa ();
8821int
8822main (void)
8823{
8824dnet_ntoa ();
8825  ;
8826  return 0;
8827}
8828_ACEOF
8829rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8830if { (eval echo "$as_me:8830: \"$ac_link\"") >&5
8831  (eval $ac_link) 2>&5
8832  ac_status=$?
8833  echo "$as_me:8833: \$? = $ac_status" >&5
8834  (exit "$ac_status"); } &&
8835         { ac_try='test -s "conftest$ac_exeext"'
8836  { (eval echo "$as_me:8836: \"$ac_try\"") >&5
8837  (eval $ac_try) 2>&5
8838  ac_status=$?
8839  echo "$as_me:8839: \$? = $ac_status" >&5
8840  (exit "$ac_status"); }; }; then
8841  ac_cv_lib_dnet_dnet_ntoa=yes
8842else
8843  echo "$as_me: failed program was:" >&5
8844cat "conftest.$ac_ext" >&5
8845ac_cv_lib_dnet_dnet_ntoa=no
8846fi
8847rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8848LIBS=$ac_check_lib_save_LIBS
8849fi
8850echo "$as_me:8850: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
8851echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6
8852if test "$ac_cv_lib_dnet_dnet_ntoa" = yes; then
8853  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
8854fi
8855
8856    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
8857      echo "$as_me:8857: checking for dnet_ntoa in -ldnet_stub" >&5
8858echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6
8859if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then
8860  echo $ECHO_N "(cached) $ECHO_C" >&6
8861else
8862  ac_check_lib_save_LIBS=$LIBS
8863LIBS="-ldnet_stub  $LIBS"
8864cat >"conftest.$ac_ext" <<_ACEOF
8865#line 8865 "configure"
8866#include "confdefs.h"
8867
8868/* Override any gcc2 internal prototype to avoid an error.  */
8869#ifdef __cplusplus
8870extern "C"
8871#endif
8872/* We use char because int might match the return type of a gcc2
8873   builtin and then its argument prototype would still apply.  */
8874char dnet_ntoa ();
8875int
8876main (void)
8877{
8878dnet_ntoa ();
8879  ;
8880  return 0;
8881}
8882_ACEOF
8883rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8884if { (eval echo "$as_me:8884: \"$ac_link\"") >&5
8885  (eval $ac_link) 2>&5
8886  ac_status=$?
8887  echo "$as_me:8887: \$? = $ac_status" >&5
8888  (exit "$ac_status"); } &&
8889         { ac_try='test -s "conftest$ac_exeext"'
8890  { (eval echo "$as_me:8890: \"$ac_try\"") >&5
8891  (eval $ac_try) 2>&5
8892  ac_status=$?
8893  echo "$as_me:8893: \$? = $ac_status" >&5
8894  (exit "$ac_status"); }; }; then
8895  ac_cv_lib_dnet_stub_dnet_ntoa=yes
8896else
8897  echo "$as_me: failed program was:" >&5
8898cat "conftest.$ac_ext" >&5
8899ac_cv_lib_dnet_stub_dnet_ntoa=no
8900fi
8901rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8902LIBS=$ac_check_lib_save_LIBS
8903fi
8904echo "$as_me:8904: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
8905echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6
8906if test "$ac_cv_lib_dnet_stub_dnet_ntoa" = yes; then
8907  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
8908fi
8909
8910    fi
8911fi
8912rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8913    LIBS="$ac_xsave_LIBS"
8914
8915    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
8916    # to get the SysV transport functions.
8917    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
8918    # needs -lnsl.
8919    # The nsl library prevents programs from opening the X display
8920    # on Irix 5.2, according to T.E. Dickey.
8921    # The functions gethostbyname, getservbyname, and inet_addr are
8922    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
8923    echo "$as_me:8923: checking for gethostbyname" >&5
8924echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6
8925if test "${ac_cv_func_gethostbyname+set}" = set; then
8926  echo $ECHO_N "(cached) $ECHO_C" >&6
8927else
8928  cat >"conftest.$ac_ext" <<_ACEOF
8929#line 8929 "configure"
8930#include "confdefs.h"
8931#define gethostbyname autoconf_temporary
8932#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
8933#undef gethostbyname
8934
8935#ifdef __cplusplus
8936extern "C"
8937#endif
8938
8939/* We use char because int might match the return type of a gcc2
8940   builtin and then its argument prototype would still apply.  */
8941char gethostbyname (void);
8942
8943int
8944main (void)
8945{
8946
8947/* The GNU C library defines stubs for functions which it implements
8948    to always fail with ENOSYS.  Some functions are actually named
8949    something starting with __ and the normal name is an alias.  */
8950#if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
8951#error found stub for gethostbyname
8952#endif
8953
8954	return gethostbyname ();
8955  ;
8956  return 0;
8957}
8958_ACEOF
8959rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8960if { (eval echo "$as_me:8960: \"$ac_link\"") >&5
8961  (eval $ac_link) 2>&5
8962  ac_status=$?
8963  echo "$as_me:8963: \$? = $ac_status" >&5
8964  (exit "$ac_status"); } &&
8965         { ac_try='test -s "conftest$ac_exeext"'
8966  { (eval echo "$as_me:8966: \"$ac_try\"") >&5
8967  (eval $ac_try) 2>&5
8968  ac_status=$?
8969  echo "$as_me:8969: \$? = $ac_status" >&5
8970  (exit "$ac_status"); }; }; then
8971  ac_cv_func_gethostbyname=yes
8972else
8973  echo "$as_me: failed program was:" >&5
8974cat "conftest.$ac_ext" >&5
8975ac_cv_func_gethostbyname=no
8976fi
8977rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8978fi
8979echo "$as_me:8979: result: $ac_cv_func_gethostbyname" >&5
8980echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6
8981
8982    if test $ac_cv_func_gethostbyname = no; then
8983      echo "$as_me:8983: checking for gethostbyname in -lnsl" >&5
8984echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6
8985if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
8986  echo $ECHO_N "(cached) $ECHO_C" >&6
8987else
8988  ac_check_lib_save_LIBS=$LIBS
8989LIBS="-lnsl  $LIBS"
8990cat >"conftest.$ac_ext" <<_ACEOF
8991#line 8991 "configure"
8992#include "confdefs.h"
8993
8994/* Override any gcc2 internal prototype to avoid an error.  */
8995#ifdef __cplusplus
8996extern "C"
8997#endif
8998/* We use char because int might match the return type of a gcc2
8999   builtin and then its argument prototype would still apply.  */
9000char gethostbyname ();
9001int
9002main (void)
9003{
9004gethostbyname ();
9005  ;
9006  return 0;
9007}
9008_ACEOF
9009rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9010if { (eval echo "$as_me:9010: \"$ac_link\"") >&5
9011  (eval $ac_link) 2>&5
9012  ac_status=$?
9013  echo "$as_me:9013: \$? = $ac_status" >&5
9014  (exit "$ac_status"); } &&
9015         { ac_try='test -s "conftest$ac_exeext"'
9016  { (eval echo "$as_me:9016: \"$ac_try\"") >&5
9017  (eval $ac_try) 2>&5
9018  ac_status=$?
9019  echo "$as_me:9019: \$? = $ac_status" >&5
9020  (exit "$ac_status"); }; }; then
9021  ac_cv_lib_nsl_gethostbyname=yes
9022else
9023  echo "$as_me: failed program was:" >&5
9024cat "conftest.$ac_ext" >&5
9025ac_cv_lib_nsl_gethostbyname=no
9026fi
9027rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9028LIBS=$ac_check_lib_save_LIBS
9029fi
9030echo "$as_me:9030: result: $ac_cv_lib_nsl_gethostbyname" >&5
9031echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6
9032if test "$ac_cv_lib_nsl_gethostbyname" = yes; then
9033  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
9034fi
9035
9036      if test $ac_cv_lib_nsl_gethostbyname = no; then
9037        echo "$as_me:9037: checking for gethostbyname in -lbsd" >&5
9038echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6
9039if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then
9040  echo $ECHO_N "(cached) $ECHO_C" >&6
9041else
9042  ac_check_lib_save_LIBS=$LIBS
9043LIBS="-lbsd  $LIBS"
9044cat >"conftest.$ac_ext" <<_ACEOF
9045#line 9045 "configure"
9046#include "confdefs.h"
9047
9048/* Override any gcc2 internal prototype to avoid an error.  */
9049#ifdef __cplusplus
9050extern "C"
9051#endif
9052/* We use char because int might match the return type of a gcc2
9053   builtin and then its argument prototype would still apply.  */
9054char gethostbyname ();
9055int
9056main (void)
9057{
9058gethostbyname ();
9059  ;
9060  return 0;
9061}
9062_ACEOF
9063rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9064if { (eval echo "$as_me:9064: \"$ac_link\"") >&5
9065  (eval $ac_link) 2>&5
9066  ac_status=$?
9067  echo "$as_me:9067: \$? = $ac_status" >&5
9068  (exit "$ac_status"); } &&
9069         { ac_try='test -s "conftest$ac_exeext"'
9070  { (eval echo "$as_me:9070: \"$ac_try\"") >&5
9071  (eval $ac_try) 2>&5
9072  ac_status=$?
9073  echo "$as_me:9073: \$? = $ac_status" >&5
9074  (exit "$ac_status"); }; }; then
9075  ac_cv_lib_bsd_gethostbyname=yes
9076else
9077  echo "$as_me: failed program was:" >&5
9078cat "conftest.$ac_ext" >&5
9079ac_cv_lib_bsd_gethostbyname=no
9080fi
9081rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9082LIBS=$ac_check_lib_save_LIBS
9083fi
9084echo "$as_me:9084: result: $ac_cv_lib_bsd_gethostbyname" >&5
9085echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6
9086if test "$ac_cv_lib_bsd_gethostbyname" = yes; then
9087  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
9088fi
9089
9090      fi
9091    fi
9092
9093    # lieder@skyler.mavd.honeywell.com says without -lsocket,
9094    # socket/setsockopt and other routines are undefined under SCO ODT
9095    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
9096    # on later versions), says Simon Leinen: it contains gethostby*
9097    # variants that don't use the nameserver (or something).  -lsocket
9098    # must be given before -lnsl if both are needed.  We assume that
9099    # if connect needs -lnsl, so does gethostbyname.
9100    echo "$as_me:9100: checking for connect" >&5
9101echo $ECHO_N "checking for connect... $ECHO_C" >&6
9102if test "${ac_cv_func_connect+set}" = set; then
9103  echo $ECHO_N "(cached) $ECHO_C" >&6
9104else
9105  cat >"conftest.$ac_ext" <<_ACEOF
9106#line 9106 "configure"
9107#include "confdefs.h"
9108#define connect autoconf_temporary
9109#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
9110#undef connect
9111
9112#ifdef __cplusplus
9113extern "C"
9114#endif
9115
9116/* We use char because int might match the return type of a gcc2
9117   builtin and then its argument prototype would still apply.  */
9118char connect (void);
9119
9120int
9121main (void)
9122{
9123
9124/* The GNU C library defines stubs for functions which it implements
9125    to always fail with ENOSYS.  Some functions are actually named
9126    something starting with __ and the normal name is an alias.  */
9127#if defined (__stub_connect) || defined (__stub___connect)
9128#error found stub for connect
9129#endif
9130
9131	return connect ();
9132  ;
9133  return 0;
9134}
9135_ACEOF
9136rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9137if { (eval echo "$as_me:9137: \"$ac_link\"") >&5
9138  (eval $ac_link) 2>&5
9139  ac_status=$?
9140  echo "$as_me:9140: \$? = $ac_status" >&5
9141  (exit "$ac_status"); } &&
9142         { ac_try='test -s "conftest$ac_exeext"'
9143  { (eval echo "$as_me:9143: \"$ac_try\"") >&5
9144  (eval $ac_try) 2>&5
9145  ac_status=$?
9146  echo "$as_me:9146: \$? = $ac_status" >&5
9147  (exit "$ac_status"); }; }; then
9148  ac_cv_func_connect=yes
9149else
9150  echo "$as_me: failed program was:" >&5
9151cat "conftest.$ac_ext" >&5
9152ac_cv_func_connect=no
9153fi
9154rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9155fi
9156echo "$as_me:9156: result: $ac_cv_func_connect" >&5
9157echo "${ECHO_T}$ac_cv_func_connect" >&6
9158
9159    if test $ac_cv_func_connect = no; then
9160      echo "$as_me:9160: checking for connect in -lsocket" >&5
9161echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6
9162if test "${ac_cv_lib_socket_connect+set}" = set; then
9163  echo $ECHO_N "(cached) $ECHO_C" >&6
9164else
9165  ac_check_lib_save_LIBS=$LIBS
9166LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
9167cat >"conftest.$ac_ext" <<_ACEOF
9168#line 9168 "configure"
9169#include "confdefs.h"
9170
9171/* Override any gcc2 internal prototype to avoid an error.  */
9172#ifdef __cplusplus
9173extern "C"
9174#endif
9175/* We use char because int might match the return type of a gcc2
9176   builtin and then its argument prototype would still apply.  */
9177char connect ();
9178int
9179main (void)
9180{
9181connect ();
9182  ;
9183  return 0;
9184}
9185_ACEOF
9186rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9187if { (eval echo "$as_me:9187: \"$ac_link\"") >&5
9188  (eval $ac_link) 2>&5
9189  ac_status=$?
9190  echo "$as_me:9190: \$? = $ac_status" >&5
9191  (exit "$ac_status"); } &&
9192         { ac_try='test -s "conftest$ac_exeext"'
9193  { (eval echo "$as_me:9193: \"$ac_try\"") >&5
9194  (eval $ac_try) 2>&5
9195  ac_status=$?
9196  echo "$as_me:9196: \$? = $ac_status" >&5
9197  (exit "$ac_status"); }; }; then
9198  ac_cv_lib_socket_connect=yes
9199else
9200  echo "$as_me: failed program was:" >&5
9201cat "conftest.$ac_ext" >&5
9202ac_cv_lib_socket_connect=no
9203fi
9204rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9205LIBS=$ac_check_lib_save_LIBS
9206fi
9207echo "$as_me:9207: result: $ac_cv_lib_socket_connect" >&5
9208echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6
9209if test "$ac_cv_lib_socket_connect" = yes; then
9210  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
9211fi
9212
9213    fi
9214
9215    # Guillermo Gomez says -lposix is necessary on A/UX.
9216    echo "$as_me:9216: checking for remove" >&5
9217echo $ECHO_N "checking for remove... $ECHO_C" >&6
9218if test "${ac_cv_func_remove+set}" = set; then
9219  echo $ECHO_N "(cached) $ECHO_C" >&6
9220else
9221  cat >"conftest.$ac_ext" <<_ACEOF
9222#line 9222 "configure"
9223#include "confdefs.h"
9224#define remove autoconf_temporary
9225#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
9226#undef remove
9227
9228#ifdef __cplusplus
9229extern "C"
9230#endif
9231
9232/* We use char because int might match the return type of a gcc2
9233   builtin and then its argument prototype would still apply.  */
9234char remove (void);
9235
9236int
9237main (void)
9238{
9239
9240/* The GNU C library defines stubs for functions which it implements
9241    to always fail with ENOSYS.  Some functions are actually named
9242    something starting with __ and the normal name is an alias.  */
9243#if defined (__stub_remove) || defined (__stub___remove)
9244#error found stub for remove
9245#endif
9246
9247	return remove ();
9248  ;
9249  return 0;
9250}
9251_ACEOF
9252rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9253if { (eval echo "$as_me:9253: \"$ac_link\"") >&5
9254  (eval $ac_link) 2>&5
9255  ac_status=$?
9256  echo "$as_me:9256: \$? = $ac_status" >&5
9257  (exit "$ac_status"); } &&
9258         { ac_try='test -s "conftest$ac_exeext"'
9259  { (eval echo "$as_me:9259: \"$ac_try\"") >&5
9260  (eval $ac_try) 2>&5
9261  ac_status=$?
9262  echo "$as_me:9262: \$? = $ac_status" >&5
9263  (exit "$ac_status"); }; }; then
9264  ac_cv_func_remove=yes
9265else
9266  echo "$as_me: failed program was:" >&5
9267cat "conftest.$ac_ext" >&5
9268ac_cv_func_remove=no
9269fi
9270rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9271fi
9272echo "$as_me:9272: result: $ac_cv_func_remove" >&5
9273echo "${ECHO_T}$ac_cv_func_remove" >&6
9274
9275    if test $ac_cv_func_remove = no; then
9276      echo "$as_me:9276: checking for remove in -lposix" >&5
9277echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6
9278if test "${ac_cv_lib_posix_remove+set}" = set; then
9279  echo $ECHO_N "(cached) $ECHO_C" >&6
9280else
9281  ac_check_lib_save_LIBS=$LIBS
9282LIBS="-lposix  $LIBS"
9283cat >"conftest.$ac_ext" <<_ACEOF
9284#line 9284 "configure"
9285#include "confdefs.h"
9286
9287/* Override any gcc2 internal prototype to avoid an error.  */
9288#ifdef __cplusplus
9289extern "C"
9290#endif
9291/* We use char because int might match the return type of a gcc2
9292   builtin and then its argument prototype would still apply.  */
9293char remove ();
9294int
9295main (void)
9296{
9297remove ();
9298  ;
9299  return 0;
9300}
9301_ACEOF
9302rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9303if { (eval echo "$as_me:9303: \"$ac_link\"") >&5
9304  (eval $ac_link) 2>&5
9305  ac_status=$?
9306  echo "$as_me:9306: \$? = $ac_status" >&5
9307  (exit "$ac_status"); } &&
9308         { ac_try='test -s "conftest$ac_exeext"'
9309  { (eval echo "$as_me:9309: \"$ac_try\"") >&5
9310  (eval $ac_try) 2>&5
9311  ac_status=$?
9312  echo "$as_me:9312: \$? = $ac_status" >&5
9313  (exit "$ac_status"); }; }; then
9314  ac_cv_lib_posix_remove=yes
9315else
9316  echo "$as_me: failed program was:" >&5
9317cat "conftest.$ac_ext" >&5
9318ac_cv_lib_posix_remove=no
9319fi
9320rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9321LIBS=$ac_check_lib_save_LIBS
9322fi
9323echo "$as_me:9323: result: $ac_cv_lib_posix_remove" >&5
9324echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6
9325if test "$ac_cv_lib_posix_remove" = yes; then
9326  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
9327fi
9328
9329    fi
9330
9331    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
9332    echo "$as_me:9332: checking for shmat" >&5
9333echo $ECHO_N "checking for shmat... $ECHO_C" >&6
9334if test "${ac_cv_func_shmat+set}" = set; then
9335  echo $ECHO_N "(cached) $ECHO_C" >&6
9336else
9337  cat >"conftest.$ac_ext" <<_ACEOF
9338#line 9338 "configure"
9339#include "confdefs.h"
9340#define shmat autoconf_temporary
9341#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
9342#undef shmat
9343
9344#ifdef __cplusplus
9345extern "C"
9346#endif
9347
9348/* We use char because int might match the return type of a gcc2
9349   builtin and then its argument prototype would still apply.  */
9350char shmat (void);
9351
9352int
9353main (void)
9354{
9355
9356/* The GNU C library defines stubs for functions which it implements
9357    to always fail with ENOSYS.  Some functions are actually named
9358    something starting with __ and the normal name is an alias.  */
9359#if defined (__stub_shmat) || defined (__stub___shmat)
9360#error found stub for shmat
9361#endif
9362
9363	return shmat ();
9364  ;
9365  return 0;
9366}
9367_ACEOF
9368rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9369if { (eval echo "$as_me:9369: \"$ac_link\"") >&5
9370  (eval $ac_link) 2>&5
9371  ac_status=$?
9372  echo "$as_me:9372: \$? = $ac_status" >&5
9373  (exit "$ac_status"); } &&
9374         { ac_try='test -s "conftest$ac_exeext"'
9375  { (eval echo "$as_me:9375: \"$ac_try\"") >&5
9376  (eval $ac_try) 2>&5
9377  ac_status=$?
9378  echo "$as_me:9378: \$? = $ac_status" >&5
9379  (exit "$ac_status"); }; }; then
9380  ac_cv_func_shmat=yes
9381else
9382  echo "$as_me: failed program was:" >&5
9383cat "conftest.$ac_ext" >&5
9384ac_cv_func_shmat=no
9385fi
9386rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9387fi
9388echo "$as_me:9388: result: $ac_cv_func_shmat" >&5
9389echo "${ECHO_T}$ac_cv_func_shmat" >&6
9390
9391    if test $ac_cv_func_shmat = no; then
9392      echo "$as_me:9392: checking for shmat in -lipc" >&5
9393echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6
9394if test "${ac_cv_lib_ipc_shmat+set}" = set; then
9395  echo $ECHO_N "(cached) $ECHO_C" >&6
9396else
9397  ac_check_lib_save_LIBS=$LIBS
9398LIBS="-lipc  $LIBS"
9399cat >"conftest.$ac_ext" <<_ACEOF
9400#line 9400 "configure"
9401#include "confdefs.h"
9402
9403/* Override any gcc2 internal prototype to avoid an error.  */
9404#ifdef __cplusplus
9405extern "C"
9406#endif
9407/* We use char because int might match the return type of a gcc2
9408   builtin and then its argument prototype would still apply.  */
9409char shmat ();
9410int
9411main (void)
9412{
9413shmat ();
9414  ;
9415  return 0;
9416}
9417_ACEOF
9418rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9419if { (eval echo "$as_me:9419: \"$ac_link\"") >&5
9420  (eval $ac_link) 2>&5
9421  ac_status=$?
9422  echo "$as_me:9422: \$? = $ac_status" >&5
9423  (exit "$ac_status"); } &&
9424         { ac_try='test -s "conftest$ac_exeext"'
9425  { (eval echo "$as_me:9425: \"$ac_try\"") >&5
9426  (eval $ac_try) 2>&5
9427  ac_status=$?
9428  echo "$as_me:9428: \$? = $ac_status" >&5
9429  (exit "$ac_status"); }; }; then
9430  ac_cv_lib_ipc_shmat=yes
9431else
9432  echo "$as_me: failed program was:" >&5
9433cat "conftest.$ac_ext" >&5
9434ac_cv_lib_ipc_shmat=no
9435fi
9436rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9437LIBS=$ac_check_lib_save_LIBS
9438fi
9439echo "$as_me:9439: result: $ac_cv_lib_ipc_shmat" >&5
9440echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6
9441if test "$ac_cv_lib_ipc_shmat" = yes; then
9442  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
9443fi
9444
9445    fi
9446  fi
9447
9448  # Check for libraries that X11R6 Xt/Xaw programs need.
9449  ac_save_LDFLAGS=$LDFLAGS
9450  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
9451  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
9452  # check for ICE first), but we must link in the order -lSM -lICE or
9453  # we get undefined symbols.  So assume we have SM if we have ICE.
9454  # These have to be linked with before -lX11, unlike the other
9455  # libraries we check for below, so use a different variable.
9456  # John Interrante, Karl Berry
9457  echo "$as_me:9457: checking for IceConnectionNumber in -lICE" >&5
9458echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6
9459if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then
9460  echo $ECHO_N "(cached) $ECHO_C" >&6
9461else
9462  ac_check_lib_save_LIBS=$LIBS
9463LIBS="-lICE $X_EXTRA_LIBS $LIBS"
9464cat >"conftest.$ac_ext" <<_ACEOF
9465#line 9465 "configure"
9466#include "confdefs.h"
9467
9468/* Override any gcc2 internal prototype to avoid an error.  */
9469#ifdef __cplusplus
9470extern "C"
9471#endif
9472/* We use char because int might match the return type of a gcc2
9473   builtin and then its argument prototype would still apply.  */
9474char IceConnectionNumber ();
9475int
9476main (void)
9477{
9478IceConnectionNumber ();
9479  ;
9480  return 0;
9481}
9482_ACEOF
9483rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9484if { (eval echo "$as_me:9484: \"$ac_link\"") >&5
9485  (eval $ac_link) 2>&5
9486  ac_status=$?
9487  echo "$as_me:9487: \$? = $ac_status" >&5
9488  (exit "$ac_status"); } &&
9489         { ac_try='test -s "conftest$ac_exeext"'
9490  { (eval echo "$as_me:9490: \"$ac_try\"") >&5
9491  (eval $ac_try) 2>&5
9492  ac_status=$?
9493  echo "$as_me:9493: \$? = $ac_status" >&5
9494  (exit "$ac_status"); }; }; then
9495  ac_cv_lib_ICE_IceConnectionNumber=yes
9496else
9497  echo "$as_me: failed program was:" >&5
9498cat "conftest.$ac_ext" >&5
9499ac_cv_lib_ICE_IceConnectionNumber=no
9500fi
9501rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9502LIBS=$ac_check_lib_save_LIBS
9503fi
9504echo "$as_me:9504: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
9505echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6
9506if test "$ac_cv_lib_ICE_IceConnectionNumber" = yes; then
9507  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
9508fi
9509
9510  LDFLAGS=$ac_save_LDFLAGS
9511
9512fi
9513
9514echo "$as_me:9514: checking for sys/wait.h that is POSIX.1 compatible" >&5
9515echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6
9516if test "${ac_cv_header_sys_wait_h+set}" = set; then
9517  echo $ECHO_N "(cached) $ECHO_C" >&6
9518else
9519  cat >"conftest.$ac_ext" <<_ACEOF
9520#line 9520 "configure"
9521#include "confdefs.h"
9522#include <sys/types.h>
9523#include <sys/wait.h>
9524#ifndef WEXITSTATUS
9525# define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
9526#endif
9527#ifndef WIFEXITED
9528# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
9529#endif
9530
9531int
9532main (void)
9533{
9534  int s;
9535  wait (&s);
9536  s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
9537  ;
9538  return 0;
9539}
9540_ACEOF
9541rm -f "conftest.$ac_objext"
9542if { (eval echo "$as_me:9542: \"$ac_compile\"") >&5
9543  (eval $ac_compile) 2>&5
9544  ac_status=$?
9545  echo "$as_me:9545: \$? = $ac_status" >&5
9546  (exit "$ac_status"); } &&
9547         { ac_try='test -s "conftest.$ac_objext"'
9548  { (eval echo "$as_me:9548: \"$ac_try\"") >&5
9549  (eval $ac_try) 2>&5
9550  ac_status=$?
9551  echo "$as_me:9551: \$? = $ac_status" >&5
9552  (exit "$ac_status"); }; }; then
9553  ac_cv_header_sys_wait_h=yes
9554else
9555  echo "$as_me: failed program was:" >&5
9556cat "conftest.$ac_ext" >&5
9557ac_cv_header_sys_wait_h=no
9558fi
9559rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9560fi
9561echo "$as_me:9561: result: $ac_cv_header_sys_wait_h" >&5
9562echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6
9563if test $ac_cv_header_sys_wait_h = yes; then
9564
9565cat >>confdefs.h <<\EOF
9566#define HAVE_SYS_WAIT_H 1
9567EOF
9568
9569fi
9570
9571echo "$as_me:9571: checking for POSIX wait functions" >&5
9572echo $ECHO_N "checking for POSIX wait functions... $ECHO_C" >&6
9573if test "${cf_cv_posix_wait+set}" = set; then
9574  echo $ECHO_N "(cached) $ECHO_C" >&6
9575else
9576
9577cat >"conftest.$ac_ext" <<_ACEOF
9578#line 9578 "configure"
9579#include "confdefs.h"
9580
9581#include <stdlib.h>
9582#include <stdio.h>
9583#include <sys/types.h>
9584#ifdef HAVE_SYS_WAIT_H
9585#include <sys/wait.h>
9586#endif
9587
9588int
9589main (void)
9590{
9591
9592	int stat_loc;
9593	pid_t pid = waitpid(-1, &stat_loc, WNOHANG|WUNTRACED);
9594	pid_t pid2 = wait(&stat_loc);
9595	(void)pid;
9596	(void)pid2;
9597
9598  ;
9599  return 0;
9600}
9601_ACEOF
9602rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9603if { (eval echo "$as_me:9603: \"$ac_link\"") >&5
9604  (eval $ac_link) 2>&5
9605  ac_status=$?
9606  echo "$as_me:9606: \$? = $ac_status" >&5
9607  (exit "$ac_status"); } &&
9608         { ac_try='test -s "conftest$ac_exeext"'
9609  { (eval echo "$as_me:9609: \"$ac_try\"") >&5
9610  (eval $ac_try) 2>&5
9611  ac_status=$?
9612  echo "$as_me:9612: \$? = $ac_status" >&5
9613  (exit "$ac_status"); }; }; then
9614  cf_cv_posix_wait=yes
9615else
9616  echo "$as_me: failed program was:" >&5
9617cat "conftest.$ac_ext" >&5
9618cf_cv_posix_wait=no
9619fi
9620rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9621
9622fi
9623echo "$as_me:9623: result: $cf_cv_posix_wait" >&5
9624echo "${ECHO_T}$cf_cv_posix_wait" >&6
9625test "$cf_cv_posix_wait" = yes &&
9626cat >>confdefs.h <<\EOF
9627#define USE_POSIX_WAIT 1
9628EOF
9629
9630echo "$as_me:9630: checking if external sys_nerr is declared" >&5
9631echo $ECHO_N "checking if external sys_nerr is declared... $ECHO_C" >&6
9632if test "${cf_cv_dcl_sys_nerr+set}" = set; then
9633  echo $ECHO_N "(cached) $ECHO_C" >&6
9634else
9635
9636	cat >"conftest.$ac_ext" <<_ACEOF
9637#line 9637 "configure"
9638#include "confdefs.h"
9639
9640#ifdef HAVE_STDLIB_H
9641#include <stdlib.h>
9642#endif
9643#include <stdio.h>
9644#include <sys/types.h>
9645#include <errno.h>
9646int
9647main (void)
9648{
9649int x = (int) sys_nerr; (void)x
9650  ;
9651  return 0;
9652}
9653_ACEOF
9654rm -f "conftest.$ac_objext"
9655if { (eval echo "$as_me:9655: \"$ac_compile\"") >&5
9656  (eval $ac_compile) 2>&5
9657  ac_status=$?
9658  echo "$as_me:9658: \$? = $ac_status" >&5
9659  (exit "$ac_status"); } &&
9660         { ac_try='test -s "conftest.$ac_objext"'
9661  { (eval echo "$as_me:9661: \"$ac_try\"") >&5
9662  (eval $ac_try) 2>&5
9663  ac_status=$?
9664  echo "$as_me:9664: \$? = $ac_status" >&5
9665  (exit "$ac_status"); }; }; then
9666  cf_cv_dcl_sys_nerr=yes
9667else
9668  echo "$as_me: failed program was:" >&5
9669cat "conftest.$ac_ext" >&5
9670cf_cv_dcl_sys_nerr=no
9671fi
9672rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9673
9674fi
9675echo "$as_me:9675: result: $cf_cv_dcl_sys_nerr" >&5
9676echo "${ECHO_T}$cf_cv_dcl_sys_nerr" >&6
9677
9678if test "$cf_cv_dcl_sys_nerr" = no ; then
9679
9680cf_result=`echo "decl_sys_nerr" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9681
9682	cat >>confdefs.h <<EOF
9683#define $cf_result 1
9684EOF
9685
9686fi
9687
9688# It's possible (for near-UNIX clones) that the data doesn't exist
9689
9690echo "$as_me:9690: checking if external sys_nerr exists" >&5
9691echo $ECHO_N "checking if external sys_nerr exists... $ECHO_C" >&6
9692if test "${cf_cv_have_sys_nerr+set}" = set; then
9693  echo $ECHO_N "(cached) $ECHO_C" >&6
9694else
9695
9696	cat >"conftest.$ac_ext" <<_ACEOF
9697#line 9697 "configure"
9698#include "confdefs.h"
9699
9700#undef sys_nerr
9701extern int sys_nerr;
9702
9703int
9704main (void)
9705{
9706sys_nerr = 2
9707  ;
9708  return 0;
9709}
9710_ACEOF
9711rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9712if { (eval echo "$as_me:9712: \"$ac_link\"") >&5
9713  (eval $ac_link) 2>&5
9714  ac_status=$?
9715  echo "$as_me:9715: \$? = $ac_status" >&5
9716  (exit "$ac_status"); } &&
9717         { ac_try='test -s "conftest$ac_exeext"'
9718  { (eval echo "$as_me:9718: \"$ac_try\"") >&5
9719  (eval $ac_try) 2>&5
9720  ac_status=$?
9721  echo "$as_me:9721: \$? = $ac_status" >&5
9722  (exit "$ac_status"); }; }; then
9723  cf_cv_have_sys_nerr=yes
9724else
9725  echo "$as_me: failed program was:" >&5
9726cat "conftest.$ac_ext" >&5
9727cf_cv_have_sys_nerr=no
9728fi
9729rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9730
9731fi
9732echo "$as_me:9732: result: $cf_cv_have_sys_nerr" >&5
9733echo "${ECHO_T}$cf_cv_have_sys_nerr" >&6
9734
9735if test "$cf_cv_have_sys_nerr" = yes ; then
9736
9737cf_result=`echo "have_sys_nerr" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9738
9739	cat >>confdefs.h <<EOF
9740#define $cf_result 1
9741EOF
9742
9743fi
9744
9745echo "$as_me:9745: checking if external sys_errlist is declared" >&5
9746echo $ECHO_N "checking if external sys_errlist is declared... $ECHO_C" >&6
9747if test "${cf_cv_dcl_sys_errlist+set}" = set; then
9748  echo $ECHO_N "(cached) $ECHO_C" >&6
9749else
9750
9751	cat >"conftest.$ac_ext" <<_ACEOF
9752#line 9752 "configure"
9753#include "confdefs.h"
9754
9755#ifdef HAVE_STDLIB_H
9756#include <stdlib.h>
9757#endif
9758#include <stdio.h>
9759#include <sys/types.h>
9760#include <errno.h>
9761int
9762main (void)
9763{
9764int x = (int) sys_errlist; (void)x
9765  ;
9766  return 0;
9767}
9768_ACEOF
9769rm -f "conftest.$ac_objext"
9770if { (eval echo "$as_me:9770: \"$ac_compile\"") >&5
9771  (eval $ac_compile) 2>&5
9772  ac_status=$?
9773  echo "$as_me:9773: \$? = $ac_status" >&5
9774  (exit "$ac_status"); } &&
9775         { ac_try='test -s "conftest.$ac_objext"'
9776  { (eval echo "$as_me:9776: \"$ac_try\"") >&5
9777  (eval $ac_try) 2>&5
9778  ac_status=$?
9779  echo "$as_me:9779: \$? = $ac_status" >&5
9780  (exit "$ac_status"); }; }; then
9781  cf_cv_dcl_sys_errlist=yes
9782else
9783  echo "$as_me: failed program was:" >&5
9784cat "conftest.$ac_ext" >&5
9785cf_cv_dcl_sys_errlist=no
9786fi
9787rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9788
9789fi
9790echo "$as_me:9790: result: $cf_cv_dcl_sys_errlist" >&5
9791echo "${ECHO_T}$cf_cv_dcl_sys_errlist" >&6
9792
9793if test "$cf_cv_dcl_sys_errlist" = no ; then
9794
9795cf_result=`echo "decl_sys_errlist" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9796
9797	cat >>confdefs.h <<EOF
9798#define $cf_result 1
9799EOF
9800
9801fi
9802
9803# It's possible (for near-UNIX clones) that the data doesn't exist
9804
9805echo "$as_me:9805: checking if external sys_errlist exists" >&5
9806echo $ECHO_N "checking if external sys_errlist exists... $ECHO_C" >&6
9807if test "${cf_cv_have_sys_errlist+set}" = set; then
9808  echo $ECHO_N "(cached) $ECHO_C" >&6
9809else
9810
9811	cat >"conftest.$ac_ext" <<_ACEOF
9812#line 9812 "configure"
9813#include "confdefs.h"
9814
9815#undef sys_errlist
9816extern int sys_errlist;
9817
9818int
9819main (void)
9820{
9821sys_errlist = 2
9822  ;
9823  return 0;
9824}
9825_ACEOF
9826rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9827if { (eval echo "$as_me:9827: \"$ac_link\"") >&5
9828  (eval $ac_link) 2>&5
9829  ac_status=$?
9830  echo "$as_me:9830: \$? = $ac_status" >&5
9831  (exit "$ac_status"); } &&
9832         { ac_try='test -s "conftest$ac_exeext"'
9833  { (eval echo "$as_me:9833: \"$ac_try\"") >&5
9834  (eval $ac_try) 2>&5
9835  ac_status=$?
9836  echo "$as_me:9836: \$? = $ac_status" >&5
9837  (exit "$ac_status"); }; }; then
9838  cf_cv_have_sys_errlist=yes
9839else
9840  echo "$as_me: failed program was:" >&5
9841cat "conftest.$ac_ext" >&5
9842cf_cv_have_sys_errlist=no
9843fi
9844rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9845
9846fi
9847echo "$as_me:9847: result: $cf_cv_have_sys_errlist" >&5
9848echo "${ECHO_T}$cf_cv_have_sys_errlist" >&6
9849
9850if test "$cf_cv_have_sys_errlist" = yes ; then
9851
9852cf_result=`echo "have_sys_errlist" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9853
9854	cat >>confdefs.h <<EOF
9855#define $cf_result 1
9856EOF
9857
9858fi
9859
9860cf_save_LIBS_CF_SYSV="$LIBS"
9861cf_save_CFLAGS_CF_SYSV="$CFLAGS"
9862cf_save_CPPFLAGS_CF_SYSV="$CPPFLAGS"
9863LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
9864for cf_X_CFLAGS in $X_CFLAGS
9865do
9866	case "x$cf_X_CFLAGS" in
9867	x-[IUD]*)
9868		CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
9869		;;
9870	*)
9871		CFLAGS="$CFLAGS $cf_X_CFLAGS"
9872		;;
9873	esac
9874done
9875
9876for ac_header in \
9877termios.h \
9878stdlib.h \
9879X11/Intrinsic.h \
9880
9881do
9882as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9883echo "$as_me:9883: checking for $ac_header" >&5
9884echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9885if eval "test \"\${$as_ac_Header+set}\" = set"; then
9886  echo $ECHO_N "(cached) $ECHO_C" >&6
9887else
9888  cat >"conftest.$ac_ext" <<_ACEOF
9889#line 9889 "configure"
9890#include "confdefs.h"
9891#include <$ac_header>
9892_ACEOF
9893if { (eval echo "$as_me:9893: \"$ac_cpp "conftest.$ac_ext"\"") >&5
9894  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
9895  ac_status=$?
9896  $EGREP -v '^ *\+' conftest.er1 >conftest.err
9897  rm -f conftest.er1
9898  cat conftest.err >&5
9899  echo "$as_me:9899: \$? = $ac_status" >&5
9900  (exit "$ac_status"); } >/dev/null; then
9901  if test -s conftest.err; then
9902    ac_cpp_err=$ac_c_preproc_warn_flag
9903  else
9904    ac_cpp_err=
9905  fi
9906else
9907  ac_cpp_err=yes
9908fi
9909if test -z "$ac_cpp_err"; then
9910  eval "$as_ac_Header=yes"
9911else
9912  echo "$as_me: failed program was:" >&5
9913  cat "conftest.$ac_ext" >&5
9914  eval "$as_ac_Header=no"
9915fi
9916rm -f conftest.err "conftest.$ac_ext"
9917fi
9918echo "$as_me:9918: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
9919echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
9920if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
9921  cat >>confdefs.h <<EOF
9922#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9923EOF
9924
9925fi
9926done
9927
9928echo "$as_me:9928: checking if we should define SYSV" >&5
9929echo $ECHO_N "checking if we should define SYSV... $ECHO_C" >&6
9930if test "${cf_cv_sysv+set}" = set; then
9931  echo $ECHO_N "(cached) $ECHO_C" >&6
9932else
9933
9934cat >"conftest.$ac_ext" <<_ACEOF
9935#line 9935 "configure"
9936#include "confdefs.h"
9937
9938#undef  SYSV
9939#define SYSV 1			/* get Xos.h to declare sys_errlist[] */
9940#ifdef HAVE_STDLIB_H
9941#include <stdlib.h>		/* look for wchar_t */
9942#endif
9943#ifdef HAVE_X11_INTRINSIC_H
9944#include <X11/Intrinsic.h>	/* Intrinsic.h has other traps... */
9945#endif
9946#ifdef HAVE_TERMIOS_H		/* needed for HPUX 10.20 */
9947#include <termios.h>
9948#define STRUCT_TERMIOS struct termios
9949#else
9950#define STRUCT_TERMIOS struct termio
9951#endif
9952#include <curses.h>
9953#include <term.h>		/* eliminate most BSD hacks */
9954#include <errno.h>		/* declare sys_errlist on older systems */
9955#include <sys/termio.h>		/* eliminate most of the remaining ones */
9956
9957int
9958main (void)
9959{
9960
9961static STRUCT_TERMIOS d_tio;
9962	d_tio.c_cc[VINTR] = 0;
9963	d_tio.c_cc[VQUIT] = 0;
9964	d_tio.c_cc[VERASE] = 0;
9965	d_tio.c_cc[VKILL] = 0;
9966	d_tio.c_cc[VEOF] = 0;
9967	d_tio.c_cc[VEOL] = 0;
9968	d_tio.c_cc[VMIN] = 0;
9969	d_tio.c_cc[VTIME] = 0;
9970#if defined(HAVE_SYS_ERRLIST) && !defined(DECL_SYS_ERRLIST)
9971sys_errlist[0] = "";		/* Cygwin mis-declares this */
9972#endif
9973
9974  ;
9975  return 0;
9976}
9977_ACEOF
9978rm -f "conftest.$ac_objext"
9979if { (eval echo "$as_me:9979: \"$ac_compile\"") >&5
9980  (eval $ac_compile) 2>&5
9981  ac_status=$?
9982  echo "$as_me:9982: \$? = $ac_status" >&5
9983  (exit "$ac_status"); } &&
9984         { ac_try='test -s "conftest.$ac_objext"'
9985  { (eval echo "$as_me:9985: \"$ac_try\"") >&5
9986  (eval $ac_try) 2>&5
9987  ac_status=$?
9988  echo "$as_me:9988: \$? = $ac_status" >&5
9989  (exit "$ac_status"); }; }; then
9990  cf_cv_sysv=yes
9991else
9992  echo "$as_me: failed program was:" >&5
9993cat "conftest.$ac_ext" >&5
9994cf_cv_sysv=no
9995fi
9996rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9997
9998fi
9999echo "$as_me:9999: result: $cf_cv_sysv" >&5
10000echo "${ECHO_T}$cf_cv_sysv" >&6
10001test "$cf_cv_sysv" = yes &&
10002cat >>confdefs.h <<\EOF
10003#define SYSV 1
10004EOF
10005
10006LIBS="$cf_save_LIBS_CF_SYSV"
10007CFLAGS="$cf_save_CFLAGS_CF_SYSV"
10008CPPFLAGS="$cf_save_CPPFLAGS_CF_SYSV"
10009
10010echo "$as_me:10010: checking for elf_begin in -lelf" >&5
10011echo $ECHO_N "checking for elf_begin in -lelf... $ECHO_C" >&6
10012if test "${ac_cv_lib_elf_elf_begin+set}" = set; then
10013  echo $ECHO_N "(cached) $ECHO_C" >&6
10014else
10015  ac_check_lib_save_LIBS=$LIBS
10016LIBS="-lelf  $LIBS"
10017cat >"conftest.$ac_ext" <<_ACEOF
10018#line 10018 "configure"
10019#include "confdefs.h"
10020
10021/* Override any gcc2 internal prototype to avoid an error.  */
10022#ifdef __cplusplus
10023extern "C"
10024#endif
10025/* We use char because int might match the return type of a gcc2
10026   builtin and then its argument prototype would still apply.  */
10027char elf_begin ();
10028int
10029main (void)
10030{
10031elf_begin ();
10032  ;
10033  return 0;
10034}
10035_ACEOF
10036rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10037if { (eval echo "$as_me:10037: \"$ac_link\"") >&5
10038  (eval $ac_link) 2>&5
10039  ac_status=$?
10040  echo "$as_me:10040: \$? = $ac_status" >&5
10041  (exit "$ac_status"); } &&
10042         { ac_try='test -s "conftest$ac_exeext"'
10043  { (eval echo "$as_me:10043: \"$ac_try\"") >&5
10044  (eval $ac_try) 2>&5
10045  ac_status=$?
10046  echo "$as_me:10046: \$? = $ac_status" >&5
10047  (exit "$ac_status"); }; }; then
10048  ac_cv_lib_elf_elf_begin=yes
10049else
10050  echo "$as_me: failed program was:" >&5
10051cat "conftest.$ac_ext" >&5
10052ac_cv_lib_elf_elf_begin=no
10053fi
10054rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10055LIBS=$ac_check_lib_save_LIBS
10056fi
10057echo "$as_me:10057: result: $ac_cv_lib_elf_elf_begin" >&5
10058echo "${ECHO_T}$ac_cv_lib_elf_elf_begin" >&6
10059if test "$ac_cv_lib_elf_elf_begin" = yes; then
10060
10061echo "$as_me:10061: checking if this is an SVR4 system" >&5
10062echo $ECHO_N "checking if this is an SVR4 system... $ECHO_C" >&6
10063if test "${cf_cv_svr4+set}" = set; then
10064  echo $ECHO_N "(cached) $ECHO_C" >&6
10065else
10066
10067cat >"conftest.$ac_ext" <<_ACEOF
10068#line 10068 "configure"
10069#include "confdefs.h"
10070
10071#if defined(__CYGWIN__)
10072make an error
10073#endif
10074#include <elf.h>
10075#include <sys/termio.h>
10076
10077int
10078main (void)
10079{
10080
10081static struct termio d_tio;
10082	d_tio.c_cc[VINTR] = 0;
10083	d_tio.c_cc[VQUIT] = 0;
10084	d_tio.c_cc[VERASE] = 0;
10085	d_tio.c_cc[VKILL] = 0;
10086	d_tio.c_cc[VEOF] = 0;
10087	d_tio.c_cc[VEOL] = 0;
10088	d_tio.c_cc[VMIN] = 0;
10089	d_tio.c_cc[VTIME] = 0;
10090	d_tio.c_cc[VLNEXT] = 0;
10091
10092  ;
10093  return 0;
10094}
10095_ACEOF
10096rm -f "conftest.$ac_objext"
10097if { (eval echo "$as_me:10097: \"$ac_compile\"") >&5
10098  (eval $ac_compile) 2>&5
10099  ac_status=$?
10100  echo "$as_me:10100: \$? = $ac_status" >&5
10101  (exit "$ac_status"); } &&
10102         { ac_try='test -s "conftest.$ac_objext"'
10103  { (eval echo "$as_me:10103: \"$ac_try\"") >&5
10104  (eval $ac_try) 2>&5
10105  ac_status=$?
10106  echo "$as_me:10106: \$? = $ac_status" >&5
10107  (exit "$ac_status"); }; }; then
10108  cf_cv_svr4=yes
10109else
10110  echo "$as_me: failed program was:" >&5
10111cat "conftest.$ac_ext" >&5
10112cf_cv_svr4=no
10113fi
10114rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10115
10116fi
10117echo "$as_me:10117: result: $cf_cv_svr4" >&5
10118echo "${ECHO_T}$cf_cv_svr4" >&6
10119
10120fi
10121
10122test "$cf_cv_svr4" = yes &&
10123cat >>confdefs.h <<\EOF
10124#define SVR4 1
10125EOF
10126
10127echo "$as_me:10127: checking if you want to use pkg-config" >&5
10128echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
10129
10130# Check whether --with-pkg-config or --without-pkg-config was given.
10131if test "${with_pkg_config+set}" = set; then
10132  withval="$with_pkg_config"
10133  cf_pkg_config=$withval
10134else
10135  cf_pkg_config=yes
10136fi;
10137echo "$as_me:10137: result: $cf_pkg_config" >&5
10138echo "${ECHO_T}$cf_pkg_config" >&6
10139
10140case "$cf_pkg_config" in
10141(no)
10142	PKG_CONFIG=none
10143	;;
10144(yes)
10145
10146if test -n "$ac_tool_prefix"; then
10147  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10148set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
10149echo "$as_me:10149: checking for $ac_word" >&5
10150echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
10151if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
10152  echo $ECHO_N "(cached) $ECHO_C" >&6
10153else
10154  case $PKG_CONFIG in
10155  [\\/]* | ?:[\\/]*)
10156  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10157  ;;
10158  *)
10159  ac_save_IFS=$IFS; IFS=$ac_path_separator
10160ac_dummy="$PATH"
10161for ac_dir in $ac_dummy; do
10162  IFS=$ac_save_IFS
10163  test -z "$ac_dir" && ac_dir=.
10164  if $as_executable_p "$ac_dir/$ac_word"; then
10165   ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
10166   echo "$as_me:10166: found $ac_dir/$ac_word" >&5
10167   break
10168fi
10169done
10170
10171  ;;
10172esac
10173fi
10174PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10175
10176if test -n "$PKG_CONFIG"; then
10177  echo "$as_me:10177: result: $PKG_CONFIG" >&5
10178echo "${ECHO_T}$PKG_CONFIG" >&6
10179else
10180  echo "$as_me:10180: result: no" >&5
10181echo "${ECHO_T}no" >&6
10182fi
10183
10184fi
10185if test -z "$ac_cv_path_PKG_CONFIG"; then
10186  ac_pt_PKG_CONFIG=$PKG_CONFIG
10187  # Extract the first word of "pkg-config", so it can be a program name with args.
10188set dummy pkg-config; ac_word=$2
10189echo "$as_me:10189: checking for $ac_word" >&5
10190echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
10191if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
10192  echo $ECHO_N "(cached) $ECHO_C" >&6
10193else
10194  case $ac_pt_PKG_CONFIG in
10195  [\\/]* | ?:[\\/]*)
10196  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10197  ;;
10198  *)
10199  ac_save_IFS=$IFS; IFS=$ac_path_separator
10200ac_dummy="$PATH"
10201for ac_dir in $ac_dummy; do
10202  IFS=$ac_save_IFS
10203  test -z "$ac_dir" && ac_dir=.
10204  if $as_executable_p "$ac_dir/$ac_word"; then
10205   ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
10206   echo "$as_me:10206: found $ac_dir/$ac_word" >&5
10207   break
10208fi
10209done
10210
10211  test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
10212  ;;
10213esac
10214fi
10215ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10216
10217if test -n "$ac_pt_PKG_CONFIG"; then
10218  echo "$as_me:10218: result: $ac_pt_PKG_CONFIG" >&5
10219echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
10220else
10221  echo "$as_me:10221: result: no" >&5
10222echo "${ECHO_T}no" >&6
10223fi
10224
10225  PKG_CONFIG=$ac_pt_PKG_CONFIG
10226else
10227  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10228fi
10229
10230	;;
10231(*)
10232	PKG_CONFIG=$withval
10233	;;
10234esac
10235
10236test -z "$PKG_CONFIG" && PKG_CONFIG=none
10237if test "$PKG_CONFIG" != none ; then
10238
10239if test "x$prefix" != xNONE; then
10240	cf_path_syntax="$prefix"
10241else
10242	cf_path_syntax="$ac_default_prefix"
10243fi
10244
10245case ".$PKG_CONFIG" in
10246(.\$\(*\)*|.\'*\'*)
10247	;;
10248(..|./*|.\\*)
10249	;;
10250(.[a-zA-Z]:[\\/]*) # OS/2 EMX
10251	;;
10252(.\$\{*prefix\}*|.\$\{*dir\}*)
10253	eval PKG_CONFIG="$PKG_CONFIG"
10254	case ".$PKG_CONFIG" in
10255	(.NONE/*)
10256		PKG_CONFIG=`echo "$PKG_CONFIG" | sed -e s%NONE%$cf_path_syntax%`
10257		;;
10258	esac
10259	;;
10260(.no|.NONE/*)
10261	PKG_CONFIG=`echo "$PKG_CONFIG" | sed -e s%NONE%$cf_path_syntax%`
10262	;;
10263(*)
10264	{ { echo "$as_me:10264: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
10265echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
10266   { (exit 1); exit 1; }; }
10267	;;
10268esac
10269
10270elif test "x$cf_pkg_config" != xno ; then
10271	{ echo "$as_me:10271: WARNING: pkg-config is not installed" >&5
10272echo "$as_me: WARNING: pkg-config is not installed" >&2;}
10273fi
10274
10275# OSX is schizoid about who owns /usr/X11 (old) versus /opt/X11 (new) (and
10276# in some cases has installed dummy files in the former, other cases replaced
10277# it with a link to the new location).  This complicates the configure script.
10278# Check for that pitfall, and recover using pkg-config
10279#
10280# If none of these are set, the configuration is almost certainly broken.
10281if test -z "${X_CFLAGS}${X_PRE_LIBS}${X_LIBS}${X_EXTRA_LIBS}"
10282then
10283
10284if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "x11"; then
10285	test -n "$verbose" && echo "	found package x11" 1>&6
10286
10287echo "${as_me:-configure}:10287: testing found package x11 ..." 1>&5
10288
10289	cf_pkgconfig_incs="`$PKG_CONFIG --cflags "x11" 2>/dev/null`"
10290	cf_pkgconfig_libs="`$PKG_CONFIG --libs   "x11" 2>/dev/null`"
10291	test -n "$verbose" && echo "	package x11 CFLAGS: $cf_pkgconfig_incs" 1>&6
10292
10293echo "${as_me:-configure}:10293: testing package x11 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
10294
10295	test -n "$verbose" && echo "	package x11 LIBS: $cf_pkgconfig_libs" 1>&6
10296
10297echo "${as_me:-configure}:10297: testing package x11 LIBS: $cf_pkgconfig_libs ..." 1>&5
10298
10299cf_fix_cppflags=no
10300cf_new_cflags=
10301cf_new_cppflags=
10302cf_new_extra_cppflags=
10303
10304for cf_add_cflags in $cf_pkgconfig_incs
10305do
10306case "$cf_fix_cppflags" in
10307(no)
10308	case "$cf_add_cflags" in
10309	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10310		case "$cf_add_cflags" in
10311		(-D*)
10312			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10313
10314			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10315				&& test -z "${cf_tst_cflags}" \
10316				&& cf_fix_cppflags=yes
10317
10318			if test "$cf_fix_cppflags" = yes ; then
10319
10320	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10321	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10322
10323				continue
10324			elif test "${cf_tst_cflags}" = "\"'" ; then
10325
10326	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10327	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10328
10329				continue
10330			fi
10331			;;
10332		esac
10333		case "$CPPFLAGS" in
10334		(*$cf_add_cflags)
10335			;;
10336		(*)
10337			case "$cf_add_cflags" in
10338			(-D*)
10339				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10340
10341CPPFLAGS=`echo "$CPPFLAGS" | \
10342	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
10343		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
10344
10345				;;
10346			esac
10347
10348	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10349	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10350
10351			;;
10352		esac
10353		;;
10354	(*)
10355
10356	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10357	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10358
10359		;;
10360	esac
10361	;;
10362(yes)
10363
10364	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10365	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10366
10367	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10368
10369	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10370		&& test -z "${cf_tst_cflags}" \
10371		&& cf_fix_cppflags=no
10372	;;
10373esac
10374done
10375
10376if test -n "$cf_new_cflags" ; then
10377
10378	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10379	CFLAGS="${CFLAGS}$cf_new_cflags"
10380
10381fi
10382
10383if test -n "$cf_new_cppflags" ; then
10384
10385	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10386	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10387
10388fi
10389
10390if test -n "$cf_new_extra_cppflags" ; then
10391
10392	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10393	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10394
10395fi
10396
10397cf_add_libs="$LIBS"
10398# reverse order
10399cf_add_0lib=
10400for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
10401# filter duplicates
10402for cf_add_1lib in $cf_add_0lib; do
10403	for cf_add_2lib in $cf_add_libs; do
10404		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
10405			cf_add_1lib=
10406			break
10407		fi
10408	done
10409	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
10410done
10411LIBS="$cf_add_libs"
10412
10413	:
10414else
10415	cf_pkgconfig_incs=
10416	cf_pkgconfig_libs=
10417	{ echo "$as_me:10417: WARNING: unable to find X11 library" >&5
10418echo "$as_me: WARNING: unable to find X11 library" >&2;}
10419fi
10420
10421if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "ice"; then
10422	test -n "$verbose" && echo "	found package ice" 1>&6
10423
10424echo "${as_me:-configure}:10424: testing found package ice ..." 1>&5
10425
10426	cf_pkgconfig_incs="`$PKG_CONFIG --cflags "ice" 2>/dev/null`"
10427	cf_pkgconfig_libs="`$PKG_CONFIG --libs   "ice" 2>/dev/null`"
10428	test -n "$verbose" && echo "	package ice CFLAGS: $cf_pkgconfig_incs" 1>&6
10429
10430echo "${as_me:-configure}:10430: testing package ice CFLAGS: $cf_pkgconfig_incs ..." 1>&5
10431
10432	test -n "$verbose" && echo "	package ice LIBS: $cf_pkgconfig_libs" 1>&6
10433
10434echo "${as_me:-configure}:10434: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5
10435
10436cf_fix_cppflags=no
10437cf_new_cflags=
10438cf_new_cppflags=
10439cf_new_extra_cppflags=
10440
10441for cf_add_cflags in $cf_pkgconfig_incs
10442do
10443case "$cf_fix_cppflags" in
10444(no)
10445	case "$cf_add_cflags" in
10446	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10447		case "$cf_add_cflags" in
10448		(-D*)
10449			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10450
10451			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10452				&& test -z "${cf_tst_cflags}" \
10453				&& cf_fix_cppflags=yes
10454
10455			if test "$cf_fix_cppflags" = yes ; then
10456
10457	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10458	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10459
10460				continue
10461			elif test "${cf_tst_cflags}" = "\"'" ; then
10462
10463	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10464	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10465
10466				continue
10467			fi
10468			;;
10469		esac
10470		case "$CPPFLAGS" in
10471		(*$cf_add_cflags)
10472			;;
10473		(*)
10474			case "$cf_add_cflags" in
10475			(-D*)
10476				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10477
10478CPPFLAGS=`echo "$CPPFLAGS" | \
10479	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
10480		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
10481
10482				;;
10483			esac
10484
10485	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10486	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10487
10488			;;
10489		esac
10490		;;
10491	(*)
10492
10493	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10494	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10495
10496		;;
10497	esac
10498	;;
10499(yes)
10500
10501	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
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 "x${cf_add_cflags}" != "x${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	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10516	CFLAGS="${CFLAGS}$cf_new_cflags"
10517
10518fi
10519
10520if test -n "$cf_new_cppflags" ; then
10521
10522	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10523	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10524
10525fi
10526
10527if test -n "$cf_new_extra_cppflags" ; then
10528
10529	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10530	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10531
10532fi
10533
10534cf_add_libs="$LIBS"
10535# reverse order
10536cf_add_0lib=
10537for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
10538# filter duplicates
10539for cf_add_1lib in $cf_add_0lib; do
10540	for cf_add_2lib in $cf_add_libs; do
10541		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
10542			cf_add_1lib=
10543			break
10544		fi
10545	done
10546	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
10547done
10548LIBS="$cf_add_libs"
10549
10550	:
10551else
10552	cf_pkgconfig_incs=
10553	cf_pkgconfig_libs=
10554	{ echo "$as_me:10554: WARNING: unable to find ICE library" >&5
10555echo "$as_me: WARNING: unable to find ICE library" >&2;}
10556fi
10557
10558if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "sm"; then
10559	test -n "$verbose" && echo "	found package sm" 1>&6
10560
10561echo "${as_me:-configure}:10561: testing found package sm ..." 1>&5
10562
10563	cf_pkgconfig_incs="`$PKG_CONFIG --cflags "sm" 2>/dev/null`"
10564	cf_pkgconfig_libs="`$PKG_CONFIG --libs   "sm" 2>/dev/null`"
10565	test -n "$verbose" && echo "	package sm CFLAGS: $cf_pkgconfig_incs" 1>&6
10566
10567echo "${as_me:-configure}:10567: testing package sm CFLAGS: $cf_pkgconfig_incs ..." 1>&5
10568
10569	test -n "$verbose" && echo "	package sm LIBS: $cf_pkgconfig_libs" 1>&6
10570
10571echo "${as_me:-configure}:10571: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5
10572
10573cf_fix_cppflags=no
10574cf_new_cflags=
10575cf_new_cppflags=
10576cf_new_extra_cppflags=
10577
10578for cf_add_cflags in $cf_pkgconfig_incs
10579do
10580case "$cf_fix_cppflags" in
10581(no)
10582	case "$cf_add_cflags" in
10583	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10584		case "$cf_add_cflags" in
10585		(-D*)
10586			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10587
10588			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10589				&& test -z "${cf_tst_cflags}" \
10590				&& cf_fix_cppflags=yes
10591
10592			if test "$cf_fix_cppflags" = yes ; then
10593
10594	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10595	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10596
10597				continue
10598			elif test "${cf_tst_cflags}" = "\"'" ; then
10599
10600	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10601	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10602
10603				continue
10604			fi
10605			;;
10606		esac
10607		case "$CPPFLAGS" in
10608		(*$cf_add_cflags)
10609			;;
10610		(*)
10611			case "$cf_add_cflags" in
10612			(-D*)
10613				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10614
10615CPPFLAGS=`echo "$CPPFLAGS" | \
10616	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
10617		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
10618
10619				;;
10620			esac
10621
10622	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10623	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10624
10625			;;
10626		esac
10627		;;
10628	(*)
10629
10630	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10631	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10632
10633		;;
10634	esac
10635	;;
10636(yes)
10637
10638	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10639	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10640
10641	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10642
10643	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10644		&& test -z "${cf_tst_cflags}" \
10645		&& cf_fix_cppflags=no
10646	;;
10647esac
10648done
10649
10650if test -n "$cf_new_cflags" ; then
10651
10652	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10653	CFLAGS="${CFLAGS}$cf_new_cflags"
10654
10655fi
10656
10657if test -n "$cf_new_cppflags" ; then
10658
10659	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10660	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10661
10662fi
10663
10664if test -n "$cf_new_extra_cppflags" ; then
10665
10666	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10667	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10668
10669fi
10670
10671cf_add_libs="$LIBS"
10672# reverse order
10673cf_add_0lib=
10674for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
10675# filter duplicates
10676for cf_add_1lib in $cf_add_0lib; do
10677	for cf_add_2lib in $cf_add_libs; do
10678		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
10679			cf_add_1lib=
10680			break
10681		fi
10682	done
10683	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
10684done
10685LIBS="$cf_add_libs"
10686
10687	:
10688else
10689	cf_pkgconfig_incs=
10690	cf_pkgconfig_libs=
10691	{ echo "$as_me:10691: WARNING: unable to find SM library" >&5
10692echo "$as_me: WARNING: unable to find SM library" >&2;}
10693fi
10694
10695if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "xt"; then
10696	test -n "$verbose" && echo "	found package xt" 1>&6
10697
10698echo "${as_me:-configure}:10698: testing found package xt ..." 1>&5
10699
10700	cf_pkgconfig_incs="`$PKG_CONFIG --cflags "xt" 2>/dev/null`"
10701	cf_pkgconfig_libs="`$PKG_CONFIG --libs   "xt" 2>/dev/null`"
10702	test -n "$verbose" && echo "	package xt CFLAGS: $cf_pkgconfig_incs" 1>&6
10703
10704echo "${as_me:-configure}:10704: testing package xt CFLAGS: $cf_pkgconfig_incs ..." 1>&5
10705
10706	test -n "$verbose" && echo "	package xt LIBS: $cf_pkgconfig_libs" 1>&6
10707
10708echo "${as_me:-configure}:10708: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5
10709
10710cf_fix_cppflags=no
10711cf_new_cflags=
10712cf_new_cppflags=
10713cf_new_extra_cppflags=
10714
10715for cf_add_cflags in $cf_pkgconfig_incs
10716do
10717case "$cf_fix_cppflags" in
10718(no)
10719	case "$cf_add_cflags" in
10720	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10721		case "$cf_add_cflags" in
10722		(-D*)
10723			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10724
10725			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10726				&& test -z "${cf_tst_cflags}" \
10727				&& cf_fix_cppflags=yes
10728
10729			if test "$cf_fix_cppflags" = yes ; then
10730
10731	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10732	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10733
10734				continue
10735			elif test "${cf_tst_cflags}" = "\"'" ; then
10736
10737	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10738	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10739
10740				continue
10741			fi
10742			;;
10743		esac
10744		case "$CPPFLAGS" in
10745		(*$cf_add_cflags)
10746			;;
10747		(*)
10748			case "$cf_add_cflags" in
10749			(-D*)
10750				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10751
10752CPPFLAGS=`echo "$CPPFLAGS" | \
10753	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
10754		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
10755
10756				;;
10757			esac
10758
10759	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10760	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10761
10762			;;
10763		esac
10764		;;
10765	(*)
10766
10767	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10768	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10769
10770		;;
10771	esac
10772	;;
10773(yes)
10774
10775	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10776	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10777
10778	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10779
10780	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10781		&& test -z "${cf_tst_cflags}" \
10782		&& cf_fix_cppflags=no
10783	;;
10784esac
10785done
10786
10787if test -n "$cf_new_cflags" ; then
10788
10789	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10790	CFLAGS="${CFLAGS}$cf_new_cflags"
10791
10792fi
10793
10794if test -n "$cf_new_cppflags" ; then
10795
10796	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10797	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10798
10799fi
10800
10801if test -n "$cf_new_extra_cppflags" ; then
10802
10803	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10804	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10805
10806fi
10807
10808cf_add_libs="$LIBS"
10809# reverse order
10810cf_add_0lib=
10811for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
10812# filter duplicates
10813for cf_add_1lib in $cf_add_0lib; do
10814	for cf_add_2lib in $cf_add_libs; do
10815		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
10816			cf_add_1lib=
10817			break
10818		fi
10819	done
10820	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
10821done
10822LIBS="$cf_add_libs"
10823
10824	:
10825else
10826	cf_pkgconfig_incs=
10827	cf_pkgconfig_libs=
10828	{ echo "$as_me:10828: WARNING: unable to find Xt library" >&5
10829echo "$as_me: WARNING: unable to find Xt library" >&2;}
10830fi
10831
10832else
10833	LIBS="$X_PRE_LIBS $LIBS $X_EXTRA_LIBS"
10834fi
10835
10836cf_have_X_LIBS=no
10837
10838if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "xt"; then
10839	test -n "$verbose" && echo "	found package xt" 1>&6
10840
10841echo "${as_me:-configure}:10841: testing found package xt ..." 1>&5
10842
10843	cf_pkgconfig_incs="`$PKG_CONFIG --cflags "xt" 2>/dev/null`"
10844	cf_pkgconfig_libs="`$PKG_CONFIG --libs   "xt" 2>/dev/null`"
10845	test -n "$verbose" && echo "	package xt CFLAGS: $cf_pkgconfig_incs" 1>&6
10846
10847echo "${as_me:-configure}:10847: testing package xt CFLAGS: $cf_pkgconfig_incs ..." 1>&5
10848
10849	test -n "$verbose" && echo "	package xt LIBS: $cf_pkgconfig_libs" 1>&6
10850
10851echo "${as_me:-configure}:10851: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5
10852
10853cf_fix_cppflags=no
10854cf_new_cflags=
10855cf_new_cppflags=
10856cf_new_extra_cppflags=
10857
10858for cf_add_cflags in $cf_pkgconfig_incs
10859do
10860case "$cf_fix_cppflags" in
10861(no)
10862	case "$cf_add_cflags" in
10863	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10864		case "$cf_add_cflags" in
10865		(-D*)
10866			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10867
10868			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10869				&& test -z "${cf_tst_cflags}" \
10870				&& cf_fix_cppflags=yes
10871
10872			if test "$cf_fix_cppflags" = yes ; then
10873
10874	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10875	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10876
10877				continue
10878			elif test "${cf_tst_cflags}" = "\"'" ; then
10879
10880	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10881	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10882
10883				continue
10884			fi
10885			;;
10886		esac
10887		case "$CPPFLAGS" in
10888		(*$cf_add_cflags)
10889			;;
10890		(*)
10891			case "$cf_add_cflags" in
10892			(-D*)
10893				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10894
10895CPPFLAGS=`echo "$CPPFLAGS" | \
10896	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
10897		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
10898
10899				;;
10900			esac
10901
10902	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10903	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10904
10905			;;
10906		esac
10907		;;
10908	(*)
10909
10910	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10911	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10912
10913		;;
10914	esac
10915	;;
10916(yes)
10917
10918	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10919	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10920
10921	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10922
10923	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10924		&& test -z "${cf_tst_cflags}" \
10925		&& cf_fix_cppflags=no
10926	;;
10927esac
10928done
10929
10930if test -n "$cf_new_cflags" ; then
10931
10932	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10933	CFLAGS="${CFLAGS}$cf_new_cflags"
10934
10935fi
10936
10937if test -n "$cf_new_cppflags" ; then
10938
10939	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10940	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10941
10942fi
10943
10944if test -n "$cf_new_extra_cppflags" ; then
10945
10946	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10947	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10948
10949fi
10950
10951cf_add_libs="$LIBS"
10952# reverse order
10953cf_add_0lib=
10954for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
10955# filter duplicates
10956for cf_add_1lib in $cf_add_0lib; do
10957	for cf_add_2lib in $cf_add_libs; do
10958		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
10959			cf_add_1lib=
10960			break
10961		fi
10962	done
10963	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
10964done
10965LIBS="$cf_add_libs"
10966
10967	case "x$LIBS" in
10968	(*-lX11*)
10969		;;
10970	(*)
10971# we have an "xt" package, but it may omit Xt's dependency on X11
10972echo "$as_me:10972: checking for usable X dependency" >&5
10973echo $ECHO_N "checking for usable X dependency... $ECHO_C" >&6
10974if test "${cf_cv_xt_x11_compat+set}" = set; then
10975  echo $ECHO_N "(cached) $ECHO_C" >&6
10976else
10977
10978cat >"conftest.$ac_ext" <<_ACEOF
10979#line 10979 "configure"
10980#include "confdefs.h"
10981
10982#include <X11/Xlib.h>
10983
10984int
10985main (void)
10986{
10987
10988	int rc1 = XDrawLine((Display*) 0, (Drawable) 0, (GC) 0, 0, 0, 0, 0);
10989	int rc2 = XClearWindow((Display*) 0, (Window) 0);
10990	int rc3 = XMoveWindow((Display*) 0, (Window) 0, 0, 0);
10991	int rc4 = XMoveResizeWindow((Display*)0, (Window)0, 0, 0, 0, 0);
10992
10993  ;
10994  return 0;
10995}
10996_ACEOF
10997rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10998if { (eval echo "$as_me:10998: \"$ac_link\"") >&5
10999  (eval $ac_link) 2>&5
11000  ac_status=$?
11001  echo "$as_me:11001: \$? = $ac_status" >&5
11002  (exit "$ac_status"); } &&
11003         { ac_try='test -s "conftest$ac_exeext"'
11004  { (eval echo "$as_me:11004: \"$ac_try\"") >&5
11005  (eval $ac_try) 2>&5
11006  ac_status=$?
11007  echo "$as_me:11007: \$? = $ac_status" >&5
11008  (exit "$ac_status"); }; }; then
11009  cf_cv_xt_x11_compat=yes
11010else
11011  echo "$as_me: failed program was:" >&5
11012cat "conftest.$ac_ext" >&5
11013cf_cv_xt_x11_compat=no
11014fi
11015rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11016fi
11017echo "$as_me:11017: result: $cf_cv_xt_x11_compat" >&5
11018echo "${ECHO_T}$cf_cv_xt_x11_compat" >&6
11019		if test "$cf_cv_xt_x11_compat" = no
11020		then
11021			test -n "$verbose" && echo "	work around broken X11 dependency" 1>&6
11022
11023echo "${as_me:-configure}:11023: testing work around broken X11 dependency ..." 1>&5
11024
11025			# 2010/11/19 - good enough until a working Xt on Xcb is delivered.
11026
11027if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "x11"; then
11028	test -n "$verbose" && echo "	found package x11" 1>&6
11029
11030echo "${as_me:-configure}:11030: testing found package x11 ..." 1>&5
11031
11032	cf_pkgconfig_incs="`$PKG_CONFIG --cflags "x11" 2>/dev/null`"
11033	cf_pkgconfig_libs="`$PKG_CONFIG --libs   "x11" 2>/dev/null`"
11034	test -n "$verbose" && echo "	package x11 CFLAGS: $cf_pkgconfig_incs" 1>&6
11035
11036echo "${as_me:-configure}:11036: testing package x11 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11037
11038	test -n "$verbose" && echo "	package x11 LIBS: $cf_pkgconfig_libs" 1>&6
11039
11040echo "${as_me:-configure}:11040: testing package x11 LIBS: $cf_pkgconfig_libs ..." 1>&5
11041
11042cf_fix_cppflags=no
11043cf_new_cflags=
11044cf_new_cppflags=
11045cf_new_extra_cppflags=
11046
11047for cf_add_cflags in $cf_pkgconfig_incs
11048do
11049case "$cf_fix_cppflags" in
11050(no)
11051	case "$cf_add_cflags" in
11052	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11053		case "$cf_add_cflags" in
11054		(-D*)
11055			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11056
11057			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11058				&& test -z "${cf_tst_cflags}" \
11059				&& cf_fix_cppflags=yes
11060
11061			if test "$cf_fix_cppflags" = yes ; then
11062
11063	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11064	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11065
11066				continue
11067			elif test "${cf_tst_cflags}" = "\"'" ; then
11068
11069	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11070	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11071
11072				continue
11073			fi
11074			;;
11075		esac
11076		case "$CPPFLAGS" in
11077		(*$cf_add_cflags)
11078			;;
11079		(*)
11080			case "$cf_add_cflags" in
11081			(-D*)
11082				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11083
11084CPPFLAGS=`echo "$CPPFLAGS" | \
11085	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
11086		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
11087
11088				;;
11089			esac
11090
11091	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11092	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11093
11094			;;
11095		esac
11096		;;
11097	(*)
11098
11099	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11100	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11101
11102		;;
11103	esac
11104	;;
11105(yes)
11106
11107	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11108	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11109
11110	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11111
11112	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11113		&& test -z "${cf_tst_cflags}" \
11114		&& cf_fix_cppflags=no
11115	;;
11116esac
11117done
11118
11119if test -n "$cf_new_cflags" ; then
11120
11121	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11122	CFLAGS="${CFLAGS}$cf_new_cflags"
11123
11124fi
11125
11126if test -n "$cf_new_cppflags" ; then
11127
11128	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11129	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11130
11131fi
11132
11133if test -n "$cf_new_extra_cppflags" ; then
11134
11135	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11136	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11137
11138fi
11139
11140cf_add_libs="$LIBS"
11141# reverse order
11142cf_add_0lib=
11143for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
11144# filter duplicates
11145for cf_add_1lib in $cf_add_0lib; do
11146	for cf_add_2lib in $cf_add_libs; do
11147		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
11148			cf_add_1lib=
11149			break
11150		fi
11151	done
11152	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
11153done
11154LIBS="$cf_add_libs"
11155
11156	:
11157else
11158	cf_pkgconfig_incs=
11159	cf_pkgconfig_libs=
11160
11161test -n "$verbose" && echo "	...before $LIBS" 1>&6
11162
11163echo "${as_me:-configure}:11163: testing ...before $LIBS ..." 1>&5
11164
11165LIBS=`echo "$LIBS" | sed -e "s/[ 	][ 	]*/ /g" -e "s%-lXt %-lXt -lX11 %" -e 's%  % %g'`
11166test -n "$verbose" && echo "	...after  $LIBS" 1>&6
11167
11168echo "${as_me:-configure}:11168: testing ...after  $LIBS ..." 1>&5
11169
11170fi
11171
11172		fi
11173		;;
11174	esac
11175
11176echo "$as_me:11176: checking for usable X Toolkit package" >&5
11177echo $ECHO_N "checking for usable X Toolkit package... $ECHO_C" >&6
11178if test "${cf_cv_xt_ice_compat+set}" = set; then
11179  echo $ECHO_N "(cached) $ECHO_C" >&6
11180else
11181
11182cat >"conftest.$ac_ext" <<_ACEOF
11183#line 11183 "configure"
11184#include "confdefs.h"
11185
11186#include <X11/Shell.h>
11187
11188int
11189main (void)
11190{
11191int num = IceConnectionNumber(0); (void) num
11192
11193  ;
11194  return 0;
11195}
11196_ACEOF
11197rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11198if { (eval echo "$as_me:11198: \"$ac_link\"") >&5
11199  (eval $ac_link) 2>&5
11200  ac_status=$?
11201  echo "$as_me:11201: \$? = $ac_status" >&5
11202  (exit "$ac_status"); } &&
11203         { ac_try='test -s "conftest$ac_exeext"'
11204  { (eval echo "$as_me:11204: \"$ac_try\"") >&5
11205  (eval $ac_try) 2>&5
11206  ac_status=$?
11207  echo "$as_me:11207: \$? = $ac_status" >&5
11208  (exit "$ac_status"); }; }; then
11209  cf_cv_xt_ice_compat=yes
11210else
11211  echo "$as_me: failed program was:" >&5
11212cat "conftest.$ac_ext" >&5
11213cf_cv_xt_ice_compat=no
11214fi
11215rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11216fi
11217echo "$as_me:11217: result: $cf_cv_xt_ice_compat" >&5
11218echo "${ECHO_T}$cf_cv_xt_ice_compat" >&6
11219
11220	if test "$cf_cv_xt_ice_compat" = no
11221	then
11222		# workaround for broken ".pc" files used for X Toolkit.
11223		case "x$X_PRE_LIBS" in
11224		(*-lICE*)
11225			case "x$LIBS" in
11226			(*-lICE*)
11227				;;
11228			(*)
11229				test -n "$verbose" && echo "	work around broken ICE dependency" 1>&6
11230
11231echo "${as_me:-configure}:11231: testing work around broken ICE dependency ..." 1>&5
11232
11233if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "ice"; then
11234	test -n "$verbose" && echo "	found package ice" 1>&6
11235
11236echo "${as_me:-configure}:11236: testing found package ice ..." 1>&5
11237
11238	cf_pkgconfig_incs="`$PKG_CONFIG --cflags "ice" 2>/dev/null`"
11239	cf_pkgconfig_libs="`$PKG_CONFIG --libs   "ice" 2>/dev/null`"
11240	test -n "$verbose" && echo "	package ice CFLAGS: $cf_pkgconfig_incs" 1>&6
11241
11242echo "${as_me:-configure}:11242: testing package ice CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11243
11244	test -n "$verbose" && echo "	package ice LIBS: $cf_pkgconfig_libs" 1>&6
11245
11246echo "${as_me:-configure}:11246: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5
11247
11248cf_fix_cppflags=no
11249cf_new_cflags=
11250cf_new_cppflags=
11251cf_new_extra_cppflags=
11252
11253for cf_add_cflags in $cf_pkgconfig_incs
11254do
11255case "$cf_fix_cppflags" in
11256(no)
11257	case "$cf_add_cflags" in
11258	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11259		case "$cf_add_cflags" in
11260		(-D*)
11261			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11262
11263			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11264				&& test -z "${cf_tst_cflags}" \
11265				&& cf_fix_cppflags=yes
11266
11267			if test "$cf_fix_cppflags" = yes ; then
11268
11269	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11270	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11271
11272				continue
11273			elif test "${cf_tst_cflags}" = "\"'" ; then
11274
11275	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11276	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11277
11278				continue
11279			fi
11280			;;
11281		esac
11282		case "$CPPFLAGS" in
11283		(*$cf_add_cflags)
11284			;;
11285		(*)
11286			case "$cf_add_cflags" in
11287			(-D*)
11288				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11289
11290CPPFLAGS=`echo "$CPPFLAGS" | \
11291	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
11292		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
11293
11294				;;
11295			esac
11296
11297	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11298	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11299
11300			;;
11301		esac
11302		;;
11303	(*)
11304
11305	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11306	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11307
11308		;;
11309	esac
11310	;;
11311(yes)
11312
11313	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11314	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11315
11316	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11317
11318	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11319		&& test -z "${cf_tst_cflags}" \
11320		&& cf_fix_cppflags=no
11321	;;
11322esac
11323done
11324
11325if test -n "$cf_new_cflags" ; then
11326
11327	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11328	CFLAGS="${CFLAGS}$cf_new_cflags"
11329
11330fi
11331
11332if test -n "$cf_new_cppflags" ; then
11333
11334	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11335	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11336
11337fi
11338
11339if test -n "$cf_new_extra_cppflags" ; then
11340
11341	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11342	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11343
11344fi
11345
11346cf_add_libs="$LIBS"
11347# reverse order
11348cf_add_0lib=
11349for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
11350# filter duplicates
11351for cf_add_1lib in $cf_add_0lib; do
11352	for cf_add_2lib in $cf_add_libs; do
11353		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
11354			cf_add_1lib=
11355			break
11356		fi
11357	done
11358	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
11359done
11360LIBS="$cf_add_libs"
11361
11362if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "sm"; then
11363	test -n "$verbose" && echo "	found package sm" 1>&6
11364
11365echo "${as_me:-configure}:11365: testing found package sm ..." 1>&5
11366
11367	cf_pkgconfig_incs="`$PKG_CONFIG --cflags "sm" 2>/dev/null`"
11368	cf_pkgconfig_libs="`$PKG_CONFIG --libs   "sm" 2>/dev/null`"
11369	test -n "$verbose" && echo "	package sm CFLAGS: $cf_pkgconfig_incs" 1>&6
11370
11371echo "${as_me:-configure}:11371: testing package sm CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11372
11373	test -n "$verbose" && echo "	package sm LIBS: $cf_pkgconfig_libs" 1>&6
11374
11375echo "${as_me:-configure}:11375: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5
11376
11377cf_fix_cppflags=no
11378cf_new_cflags=
11379cf_new_cppflags=
11380cf_new_extra_cppflags=
11381
11382for cf_add_cflags in $cf_pkgconfig_incs
11383do
11384case "$cf_fix_cppflags" in
11385(no)
11386	case "$cf_add_cflags" in
11387	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11388		case "$cf_add_cflags" in
11389		(-D*)
11390			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11391
11392			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11393				&& test -z "${cf_tst_cflags}" \
11394				&& cf_fix_cppflags=yes
11395
11396			if test "$cf_fix_cppflags" = yes ; then
11397
11398	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11399	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11400
11401				continue
11402			elif test "${cf_tst_cflags}" = "\"'" ; then
11403
11404	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11405	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11406
11407				continue
11408			fi
11409			;;
11410		esac
11411		case "$CPPFLAGS" in
11412		(*$cf_add_cflags)
11413			;;
11414		(*)
11415			case "$cf_add_cflags" in
11416			(-D*)
11417				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11418
11419CPPFLAGS=`echo "$CPPFLAGS" | \
11420	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
11421		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
11422
11423				;;
11424			esac
11425
11426	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11427	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11428
11429			;;
11430		esac
11431		;;
11432	(*)
11433
11434	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11435	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11436
11437		;;
11438	esac
11439	;;
11440(yes)
11441
11442	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11443	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11444
11445	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11446
11447	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11448		&& test -z "${cf_tst_cflags}" \
11449		&& cf_fix_cppflags=no
11450	;;
11451esac
11452done
11453
11454if test -n "$cf_new_cflags" ; then
11455
11456	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11457	CFLAGS="${CFLAGS}$cf_new_cflags"
11458
11459fi
11460
11461if test -n "$cf_new_cppflags" ; then
11462
11463	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11464	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11465
11466fi
11467
11468if test -n "$cf_new_extra_cppflags" ; then
11469
11470	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11471	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11472
11473fi
11474
11475cf_add_libs="$LIBS"
11476# reverse order
11477cf_add_0lib=
11478for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
11479# filter duplicates
11480for cf_add_1lib in $cf_add_0lib; do
11481	for cf_add_2lib in $cf_add_libs; do
11482		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
11483			cf_add_1lib=
11484			break
11485		fi
11486	done
11487	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
11488done
11489LIBS="$cf_add_libs"
11490
11491	:
11492else
11493	cf_pkgconfig_incs=
11494	cf_pkgconfig_libs=
11495	:
11496fi
11497
11498else
11499	cf_pkgconfig_incs=
11500	cf_pkgconfig_libs=
11501
11502test -n "$verbose" && echo "	...before $LIBS" 1>&6
11503
11504echo "${as_me:-configure}:11504: testing ...before $LIBS ..." 1>&5
11505
11506LIBS=`echo "$LIBS" | sed -e "s/[ 	][ 	]*/ /g" -e "s%-lXt %-lXt $X_PRE_LIBS %" -e 's%  % %g'`
11507test -n "$verbose" && echo "	...after  $LIBS" 1>&6
11508
11509echo "${as_me:-configure}:11509: testing ...after  $LIBS ..." 1>&5
11510
11511fi
11512
11513				;;
11514			esac
11515			;;
11516		esac
11517	fi
11518
11519	cf_have_X_LIBS=yes
11520
11521else
11522	cf_pkgconfig_incs=
11523	cf_pkgconfig_libs=
11524
11525	LDFLAGS="$X_LIBS $LDFLAGS"
11526
11527test -n "$verbose" && echo "	checking additions to CFLAGS" 1>&6
11528
11529echo "${as_me:-configure}:11529: testing checking additions to CFLAGS ..." 1>&5
11530
11531cf_check_cflags="$CFLAGS"
11532cf_check_cppflags="$CPPFLAGS"
11533
11534cf_fix_cppflags=no
11535cf_new_cflags=
11536cf_new_cppflags=
11537cf_new_extra_cppflags=
11538
11539for cf_add_cflags in $X_CFLAGS
11540do
11541case "$cf_fix_cppflags" in
11542(no)
11543	case "$cf_add_cflags" in
11544	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11545		case "$cf_add_cflags" in
11546		(-D*)
11547			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11548
11549			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11550				&& test -z "${cf_tst_cflags}" \
11551				&& cf_fix_cppflags=yes
11552
11553			if test "$cf_fix_cppflags" = yes ; then
11554
11555	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11556	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11557
11558				continue
11559			elif test "${cf_tst_cflags}" = "\"'" ; then
11560
11561	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11562	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11563
11564				continue
11565			fi
11566			;;
11567		esac
11568		case "$CPPFLAGS" in
11569		(*$cf_add_cflags)
11570			;;
11571		(*)
11572			case "$cf_add_cflags" in
11573			(-D*)
11574				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11575
11576CPPFLAGS=`echo "$CPPFLAGS" | \
11577	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
11578		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
11579
11580				;;
11581			esac
11582
11583	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11584	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11585
11586			;;
11587		esac
11588		;;
11589	(*)
11590
11591	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11592	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11593
11594		;;
11595	esac
11596	;;
11597(yes)
11598
11599	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11600	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11601
11602	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11603
11604	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11605		&& test -z "${cf_tst_cflags}" \
11606		&& cf_fix_cppflags=no
11607	;;
11608esac
11609done
11610
11611if test -n "$cf_new_cflags" ; then
11612	test -n "$verbose" && echo "	add to \$CFLAGS $cf_new_cflags" 1>&6
11613
11614echo "${as_me:-configure}:11614: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
11615
11616	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11617	CFLAGS="${CFLAGS}$cf_new_cflags"
11618
11619fi
11620
11621if test -n "$cf_new_cppflags" ; then
11622	test -n "$verbose" && echo "	add to \$CPPFLAGS $cf_new_cppflags" 1>&6
11623
11624echo "${as_me:-configure}:11624: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
11625
11626	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11627	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11628
11629fi
11630
11631if test -n "$cf_new_extra_cppflags" ; then
11632	test -n "$verbose" && echo "	add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
11633
11634echo "${as_me:-configure}:11634: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
11635
11636	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11637	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11638
11639fi
11640
11641if test "x$cf_check_cflags" != "x$CFLAGS" ; then
11642cat >"conftest.$ac_ext" <<_ACEOF
11643#line 11643 "configure"
11644#include "confdefs.h"
11645#include <stdio.h>
11646int
11647main (void)
11648{
11649printf("Hello world");
11650  ;
11651  return 0;
11652}
11653_ACEOF
11654rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11655if { (eval echo "$as_me:11655: \"$ac_link\"") >&5
11656  (eval $ac_link) 2>&5
11657  ac_status=$?
11658  echo "$as_me:11658: \$? = $ac_status" >&5
11659  (exit "$ac_status"); } &&
11660         { ac_try='test -s "conftest$ac_exeext"'
11661  { (eval echo "$as_me:11661: \"$ac_try\"") >&5
11662  (eval $ac_try) 2>&5
11663  ac_status=$?
11664  echo "$as_me:11664: \$? = $ac_status" >&5
11665  (exit "$ac_status"); }; }; then
11666  :
11667else
11668  echo "$as_me: failed program was:" >&5
11669cat "conftest.$ac_ext" >&5
11670test -n "$verbose" && echo "	test-compile failed.  Undoing change to \$CFLAGS" 1>&6
11671
11672echo "${as_me:-configure}:11672: testing test-compile failed.  Undoing change to \$CFLAGS ..." 1>&5
11673
11674	 if test "x$cf_check_cppflags" != "x$CPPFLAGS" ; then
11675		 test -n "$verbose" && echo "	but keeping change to \$CPPFLAGS" 1>&6
11676
11677echo "${as_me:-configure}:11677: testing but keeping change to \$CPPFLAGS ..." 1>&5
11678
11679	 fi
11680	 CFLAGS="$cf_check_cflags"
11681fi
11682rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11683fi
11684
11685	echo "$as_me:11685: checking for XOpenDisplay" >&5
11686echo $ECHO_N "checking for XOpenDisplay... $ECHO_C" >&6
11687if test "${ac_cv_func_XOpenDisplay+set}" = set; then
11688  echo $ECHO_N "(cached) $ECHO_C" >&6
11689else
11690  cat >"conftest.$ac_ext" <<_ACEOF
11691#line 11691 "configure"
11692#include "confdefs.h"
11693#define XOpenDisplay autoconf_temporary
11694#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
11695#undef XOpenDisplay
11696
11697#ifdef __cplusplus
11698extern "C"
11699#endif
11700
11701/* We use char because int might match the return type of a gcc2
11702   builtin and then its argument prototype would still apply.  */
11703char XOpenDisplay (void);
11704
11705int
11706main (void)
11707{
11708
11709/* The GNU C library defines stubs for functions which it implements
11710    to always fail with ENOSYS.  Some functions are actually named
11711    something starting with __ and the normal name is an alias.  */
11712#if defined (__stub_XOpenDisplay) || defined (__stub___XOpenDisplay)
11713#error found stub for XOpenDisplay
11714#endif
11715
11716	return XOpenDisplay ();
11717  ;
11718  return 0;
11719}
11720_ACEOF
11721rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11722if { (eval echo "$as_me:11722: \"$ac_link\"") >&5
11723  (eval $ac_link) 2>&5
11724  ac_status=$?
11725  echo "$as_me:11725: \$? = $ac_status" >&5
11726  (exit "$ac_status"); } &&
11727         { ac_try='test -s "conftest$ac_exeext"'
11728  { (eval echo "$as_me:11728: \"$ac_try\"") >&5
11729  (eval $ac_try) 2>&5
11730  ac_status=$?
11731  echo "$as_me:11731: \$? = $ac_status" >&5
11732  (exit "$ac_status"); }; }; then
11733  ac_cv_func_XOpenDisplay=yes
11734else
11735  echo "$as_me: failed program was:" >&5
11736cat "conftest.$ac_ext" >&5
11737ac_cv_func_XOpenDisplay=no
11738fi
11739rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11740fi
11741echo "$as_me:11741: result: $ac_cv_func_XOpenDisplay" >&5
11742echo "${ECHO_T}$ac_cv_func_XOpenDisplay" >&6
11743if test "$ac_cv_func_XOpenDisplay" = yes; then
11744  :
11745else
11746
11747	echo "$as_me:11747: checking for XOpenDisplay in -lX11" >&5
11748echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6
11749if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then
11750  echo $ECHO_N "(cached) $ECHO_C" >&6
11751else
11752  ac_check_lib_save_LIBS=$LIBS
11753LIBS="-lX11  $LIBS"
11754cat >"conftest.$ac_ext" <<_ACEOF
11755#line 11755 "configure"
11756#include "confdefs.h"
11757
11758/* Override any gcc2 internal prototype to avoid an error.  */
11759#ifdef __cplusplus
11760extern "C"
11761#endif
11762/* We use char because int might match the return type of a gcc2
11763   builtin and then its argument prototype would still apply.  */
11764char XOpenDisplay ();
11765int
11766main (void)
11767{
11768XOpenDisplay ();
11769  ;
11770  return 0;
11771}
11772_ACEOF
11773rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11774if { (eval echo "$as_me:11774: \"$ac_link\"") >&5
11775  (eval $ac_link) 2>&5
11776  ac_status=$?
11777  echo "$as_me:11777: \$? = $ac_status" >&5
11778  (exit "$ac_status"); } &&
11779         { ac_try='test -s "conftest$ac_exeext"'
11780  { (eval echo "$as_me:11780: \"$ac_try\"") >&5
11781  (eval $ac_try) 2>&5
11782  ac_status=$?
11783  echo "$as_me:11783: \$? = $ac_status" >&5
11784  (exit "$ac_status"); }; }; then
11785  ac_cv_lib_X11_XOpenDisplay=yes
11786else
11787  echo "$as_me: failed program was:" >&5
11788cat "conftest.$ac_ext" >&5
11789ac_cv_lib_X11_XOpenDisplay=no
11790fi
11791rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11792LIBS=$ac_check_lib_save_LIBS
11793fi
11794echo "$as_me:11794: result: $ac_cv_lib_X11_XOpenDisplay" >&5
11795echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6
11796if test "$ac_cv_lib_X11_XOpenDisplay" = yes; then
11797
11798cf_add_libs="$LIBS"
11799# reverse order
11800cf_add_0lib=
11801for cf_add_1lib in -lX11; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
11802# filter duplicates
11803for cf_add_1lib in $cf_add_0lib; do
11804	for cf_add_2lib in $cf_add_libs; do
11805		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
11806			cf_add_1lib=
11807			break
11808		fi
11809	done
11810	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
11811done
11812LIBS="$cf_add_libs"
11813
11814fi
11815
11816fi
11817
11818	echo "$as_me:11818: checking for XtAppInitialize" >&5
11819echo $ECHO_N "checking for XtAppInitialize... $ECHO_C" >&6
11820if test "${ac_cv_func_XtAppInitialize+set}" = set; then
11821  echo $ECHO_N "(cached) $ECHO_C" >&6
11822else
11823  cat >"conftest.$ac_ext" <<_ACEOF
11824#line 11824 "configure"
11825#include "confdefs.h"
11826#define XtAppInitialize autoconf_temporary
11827#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
11828#undef XtAppInitialize
11829
11830#ifdef __cplusplus
11831extern "C"
11832#endif
11833
11834/* We use char because int might match the return type of a gcc2
11835   builtin and then its argument prototype would still apply.  */
11836char XtAppInitialize (void);
11837
11838int
11839main (void)
11840{
11841
11842/* The GNU C library defines stubs for functions which it implements
11843    to always fail with ENOSYS.  Some functions are actually named
11844    something starting with __ and the normal name is an alias.  */
11845#if defined (__stub_XtAppInitialize) || defined (__stub___XtAppInitialize)
11846#error found stub for XtAppInitialize
11847#endif
11848
11849	return XtAppInitialize ();
11850  ;
11851  return 0;
11852}
11853_ACEOF
11854rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11855if { (eval echo "$as_me:11855: \"$ac_link\"") >&5
11856  (eval $ac_link) 2>&5
11857  ac_status=$?
11858  echo "$as_me:11858: \$? = $ac_status" >&5
11859  (exit "$ac_status"); } &&
11860         { ac_try='test -s "conftest$ac_exeext"'
11861  { (eval echo "$as_me:11861: \"$ac_try\"") >&5
11862  (eval $ac_try) 2>&5
11863  ac_status=$?
11864  echo "$as_me:11864: \$? = $ac_status" >&5
11865  (exit "$ac_status"); }; }; then
11866  ac_cv_func_XtAppInitialize=yes
11867else
11868  echo "$as_me: failed program was:" >&5
11869cat "conftest.$ac_ext" >&5
11870ac_cv_func_XtAppInitialize=no
11871fi
11872rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11873fi
11874echo "$as_me:11874: result: $ac_cv_func_XtAppInitialize" >&5
11875echo "${ECHO_T}$ac_cv_func_XtAppInitialize" >&6
11876if test "$ac_cv_func_XtAppInitialize" = yes; then
11877  :
11878else
11879
11880	echo "$as_me:11880: checking for XtAppInitialize in -lXt" >&5
11881echo $ECHO_N "checking for XtAppInitialize in -lXt... $ECHO_C" >&6
11882if test "${ac_cv_lib_Xt_XtAppInitialize+set}" = set; then
11883  echo $ECHO_N "(cached) $ECHO_C" >&6
11884else
11885  ac_check_lib_save_LIBS=$LIBS
11886LIBS="-lXt  $LIBS"
11887cat >"conftest.$ac_ext" <<_ACEOF
11888#line 11888 "configure"
11889#include "confdefs.h"
11890
11891/* Override any gcc2 internal prototype to avoid an error.  */
11892#ifdef __cplusplus
11893extern "C"
11894#endif
11895/* We use char because int might match the return type of a gcc2
11896   builtin and then its argument prototype would still apply.  */
11897char XtAppInitialize ();
11898int
11899main (void)
11900{
11901XtAppInitialize ();
11902  ;
11903  return 0;
11904}
11905_ACEOF
11906rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11907if { (eval echo "$as_me:11907: \"$ac_link\"") >&5
11908  (eval $ac_link) 2>&5
11909  ac_status=$?
11910  echo "$as_me:11910: \$? = $ac_status" >&5
11911  (exit "$ac_status"); } &&
11912         { ac_try='test -s "conftest$ac_exeext"'
11913  { (eval echo "$as_me:11913: \"$ac_try\"") >&5
11914  (eval $ac_try) 2>&5
11915  ac_status=$?
11916  echo "$as_me:11916: \$? = $ac_status" >&5
11917  (exit "$ac_status"); }; }; then
11918  ac_cv_lib_Xt_XtAppInitialize=yes
11919else
11920  echo "$as_me: failed program was:" >&5
11921cat "conftest.$ac_ext" >&5
11922ac_cv_lib_Xt_XtAppInitialize=no
11923fi
11924rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11925LIBS=$ac_check_lib_save_LIBS
11926fi
11927echo "$as_me:11927: result: $ac_cv_lib_Xt_XtAppInitialize" >&5
11928echo "${ECHO_T}$ac_cv_lib_Xt_XtAppInitialize" >&6
11929if test "$ac_cv_lib_Xt_XtAppInitialize" = yes; then
11930
11931cat >>confdefs.h <<\EOF
11932#define HAVE_LIBXT 1
11933EOF
11934
11935		 cf_have_X_LIBS=Xt
11936		 LIBS="-lXt $LIBS"
11937fi
11938
11939fi
11940
11941fi
11942
11943if test "$cf_have_X_LIBS" = no ; then
11944	{ echo "$as_me:11944: WARNING: Unable to successfully link X Toolkit library (-lXt) with
11945test program.  You will have to check and add the proper libraries by hand
11946to makefile." >&5
11947echo "$as_me: WARNING: Unable to successfully link X Toolkit library (-lXt) with
11948test program.  You will have to check and add the proper libraries by hand
11949to makefile." >&2;}
11950fi
11951
11952for ac_header in \
11953	X11/DECkeysym.h \
11954	X11/Sunkeysym.h \
11955	X11/XF86keysym.h \
11956	X11/XKBlib.h \
11957	X11/TranslateI.h \
11958	X11/Xpoll.h \
11959	X11/extensions/XKB.h \
11960
11961do
11962as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11963echo "$as_me:11963: checking for $ac_header" >&5
11964echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11965if eval "test \"\${$as_ac_Header+set}\" = set"; then
11966  echo $ECHO_N "(cached) $ECHO_C" >&6
11967else
11968  cat >"conftest.$ac_ext" <<_ACEOF
11969#line 11969 "configure"
11970#include "confdefs.h"
11971#include <$ac_header>
11972_ACEOF
11973if { (eval echo "$as_me:11973: \"$ac_cpp "conftest.$ac_ext"\"") >&5
11974  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
11975  ac_status=$?
11976  $EGREP -v '^ *\+' conftest.er1 >conftest.err
11977  rm -f conftest.er1
11978  cat conftest.err >&5
11979  echo "$as_me:11979: \$? = $ac_status" >&5
11980  (exit "$ac_status"); } >/dev/null; then
11981  if test -s conftest.err; then
11982    ac_cpp_err=$ac_c_preproc_warn_flag
11983  else
11984    ac_cpp_err=
11985  fi
11986else
11987  ac_cpp_err=yes
11988fi
11989if test -z "$ac_cpp_err"; then
11990  eval "$as_ac_Header=yes"
11991else
11992  echo "$as_me: failed program was:" >&5
11993  cat "conftest.$ac_ext" >&5
11994  eval "$as_ac_Header=no"
11995fi
11996rm -f conftest.err "conftest.$ac_ext"
11997fi
11998echo "$as_me:11998: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
11999echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
12000if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
12001  cat >>confdefs.h <<EOF
12002#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12003EOF
12004
12005fi
12006done
12007
12008ICON_SUFFIX=.xbm
12009
12010cf_save_cppflags="${CPPFLAGS}"
12011cf_save_ldflags="${LDFLAGS}"
12012
12013echo "$as_me:12013: checking if you want to use the Xpm library for colored icon" >&5
12014echo $ECHO_N "checking if you want to use the Xpm library for colored icon... $ECHO_C" >&6
12015
12016# Check whether --with-xpm or --without-xpm was given.
12017if test "${with_xpm+set}" = set; then
12018  withval="$with_xpm"
12019  cf_Xpm_library="$withval"
12020else
12021  cf_Xpm_library=yes
12022fi;
12023echo "$as_me:12023: result: $cf_Xpm_library" >&5
12024echo "${ECHO_T}$cf_Xpm_library" >&6
12025
12026if test "$cf_Xpm_library" != no ; then
12027    if test "$cf_Xpm_library" != yes ; then
12028	CPPFLAGS="$CPPFLAGS -I$withval/include"
12029	LDFLAGS="$LDFLAGS -L$withval/lib"
12030    fi
12031    echo "$as_me:12031: checking for X11/xpm.h" >&5
12032echo $ECHO_N "checking for X11/xpm.h... $ECHO_C" >&6
12033if test "${ac_cv_header_X11_xpm_h+set}" = set; then
12034  echo $ECHO_N "(cached) $ECHO_C" >&6
12035else
12036  cat >"conftest.$ac_ext" <<_ACEOF
12037#line 12037 "configure"
12038#include "confdefs.h"
12039#include <X11/xpm.h>
12040_ACEOF
12041if { (eval echo "$as_me:12041: \"$ac_cpp "conftest.$ac_ext"\"") >&5
12042  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
12043  ac_status=$?
12044  $EGREP -v '^ *\+' conftest.er1 >conftest.err
12045  rm -f conftest.er1
12046  cat conftest.err >&5
12047  echo "$as_me:12047: \$? = $ac_status" >&5
12048  (exit "$ac_status"); } >/dev/null; then
12049  if test -s conftest.err; then
12050    ac_cpp_err=$ac_c_preproc_warn_flag
12051  else
12052    ac_cpp_err=
12053  fi
12054else
12055  ac_cpp_err=yes
12056fi
12057if test -z "$ac_cpp_err"; then
12058  ac_cv_header_X11_xpm_h=yes
12059else
12060  echo "$as_me: failed program was:" >&5
12061  cat "conftest.$ac_ext" >&5
12062  ac_cv_header_X11_xpm_h=no
12063fi
12064rm -f conftest.err "conftest.$ac_ext"
12065fi
12066echo "$as_me:12066: result: $ac_cv_header_X11_xpm_h" >&5
12067echo "${ECHO_T}$ac_cv_header_X11_xpm_h" >&6
12068if test "$ac_cv_header_X11_xpm_h" = yes; then
12069
12070	echo "$as_me:12070: checking for XpmCreatePixmapFromData in -lXpm" >&5
12071echo $ECHO_N "checking for XpmCreatePixmapFromData in -lXpm... $ECHO_C" >&6
12072if test "${ac_cv_lib_Xpm_XpmCreatePixmapFromData+set}" = set; then
12073  echo $ECHO_N "(cached) $ECHO_C" >&6
12074else
12075  ac_check_lib_save_LIBS=$LIBS
12076LIBS="-lXpm -lX11 $X_LIBS $LIBS"
12077cat >"conftest.$ac_ext" <<_ACEOF
12078#line 12078 "configure"
12079#include "confdefs.h"
12080
12081/* Override any gcc2 internal prototype to avoid an error.  */
12082#ifdef __cplusplus
12083extern "C"
12084#endif
12085/* We use char because int might match the return type of a gcc2
12086   builtin and then its argument prototype would still apply.  */
12087char XpmCreatePixmapFromData ();
12088int
12089main (void)
12090{
12091XpmCreatePixmapFromData ();
12092  ;
12093  return 0;
12094}
12095_ACEOF
12096rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12097if { (eval echo "$as_me:12097: \"$ac_link\"") >&5
12098  (eval $ac_link) 2>&5
12099  ac_status=$?
12100  echo "$as_me:12100: \$? = $ac_status" >&5
12101  (exit "$ac_status"); } &&
12102         { ac_try='test -s "conftest$ac_exeext"'
12103  { (eval echo "$as_me:12103: \"$ac_try\"") >&5
12104  (eval $ac_try) 2>&5
12105  ac_status=$?
12106  echo "$as_me:12106: \$? = $ac_status" >&5
12107  (exit "$ac_status"); }; }; then
12108  ac_cv_lib_Xpm_XpmCreatePixmapFromData=yes
12109else
12110  echo "$as_me: failed program was:" >&5
12111cat "conftest.$ac_ext" >&5
12112ac_cv_lib_Xpm_XpmCreatePixmapFromData=no
12113fi
12114rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12115LIBS=$ac_check_lib_save_LIBS
12116fi
12117echo "$as_me:12117: result: $ac_cv_lib_Xpm_XpmCreatePixmapFromData" >&5
12118echo "${ECHO_T}$ac_cv_lib_Xpm_XpmCreatePixmapFromData" >&6
12119if test "$ac_cv_lib_Xpm_XpmCreatePixmapFromData" = yes; then
12120
12121cat >>confdefs.h <<\EOF
12122#define HAVE_LIBXPM 1
12123EOF
12124
12125	    ICON_SUFFIX=.xpm
12126	    LIBS="-lXpm $LIBS"
12127else
12128  CPPFLAGS="${cf_save_cppflags}" LDFLAGS="${cf_save_ldflags}"
12129fi
12130
12131else
12132  CPPFLAGS="${cf_save_cppflags}" LDFLAGS="${cf_save_ldflags}"
12133fi
12134
12135fi
12136
12137echo "$as_me:12137: checking if you want to use the Xinerama extension" >&5
12138echo $ECHO_N "checking if you want to use the Xinerama extension... $ECHO_C" >&6
12139
12140# Check whether --with-xinerama or --without-xinerama was given.
12141if test "${with_xinerama+set}" = set; then
12142  withval="$with_xinerama"
12143  cf_with_xinerama="$withval"
12144else
12145  cf_with_xinerama=yes
12146fi;
12147echo "$as_me:12147: result: $cf_with_xinerama" >&5
12148echo "${ECHO_T}$cf_with_xinerama" >&6
12149if test "$cf_with_xinerama" = yes; then
12150
12151if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "xinerama"; then
12152	test -n "$verbose" && echo "	found package xinerama" 1>&6
12153
12154echo "${as_me:-configure}:12154: testing found package xinerama ..." 1>&5
12155
12156	cf_pkgconfig_incs="`$PKG_CONFIG --cflags "xinerama" 2>/dev/null`"
12157	cf_pkgconfig_libs="`$PKG_CONFIG --libs   "xinerama" 2>/dev/null`"
12158	test -n "$verbose" && echo "	package xinerama CFLAGS: $cf_pkgconfig_incs" 1>&6
12159
12160echo "${as_me:-configure}:12160: testing package xinerama CFLAGS: $cf_pkgconfig_incs ..." 1>&5
12161
12162	test -n "$verbose" && echo "	package xinerama LIBS: $cf_pkgconfig_libs" 1>&6
12163
12164echo "${as_me:-configure}:12164: testing package xinerama LIBS: $cf_pkgconfig_libs ..." 1>&5
12165
12166cf_fix_cppflags=no
12167cf_new_cflags=
12168cf_new_cppflags=
12169cf_new_extra_cppflags=
12170
12171for cf_add_cflags in $cf_pkgconfig_incs
12172do
12173case "$cf_fix_cppflags" in
12174(no)
12175	case "$cf_add_cflags" in
12176	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12177		case "$cf_add_cflags" in
12178		(-D*)
12179			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12180
12181			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12182				&& test -z "${cf_tst_cflags}" \
12183				&& cf_fix_cppflags=yes
12184
12185			if test "$cf_fix_cppflags" = yes ; then
12186
12187	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12188	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12189
12190				continue
12191			elif test "${cf_tst_cflags}" = "\"'" ; then
12192
12193	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12194	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12195
12196				continue
12197			fi
12198			;;
12199		esac
12200		case "$CPPFLAGS" in
12201		(*$cf_add_cflags)
12202			;;
12203		(*)
12204			case "$cf_add_cflags" in
12205			(-D*)
12206				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12207
12208CPPFLAGS=`echo "$CPPFLAGS" | \
12209	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
12210		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
12211
12212				;;
12213			esac
12214
12215	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12216	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12217
12218			;;
12219		esac
12220		;;
12221	(*)
12222
12223	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12224	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12225
12226		;;
12227	esac
12228	;;
12229(yes)
12230
12231	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12232	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12233
12234	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
12235
12236	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12237		&& test -z "${cf_tst_cflags}" \
12238		&& cf_fix_cppflags=no
12239	;;
12240esac
12241done
12242
12243if test -n "$cf_new_cflags" ; then
12244
12245	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12246	CFLAGS="${CFLAGS}$cf_new_cflags"
12247
12248fi
12249
12250if test -n "$cf_new_cppflags" ; then
12251
12252	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12253	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12254
12255fi
12256
12257if test -n "$cf_new_extra_cppflags" ; then
12258
12259	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12260	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12261
12262fi
12263
12264cf_add_libs="$LIBS"
12265# reverse order
12266cf_add_0lib=
12267for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
12268# filter duplicates
12269for cf_add_1lib in $cf_add_0lib; do
12270	for cf_add_2lib in $cf_add_libs; do
12271		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
12272			cf_add_1lib=
12273			break
12274		fi
12275	done
12276	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
12277done
12278LIBS="$cf_add_libs"
12279
12280	cat >>confdefs.h <<\EOF
12281#define HAVE_X11_EXTENSIONS_XINERAMA_H 1
12282EOF
12283
12284else
12285	cf_pkgconfig_incs=
12286	cf_pkgconfig_libs=
12287
12288	echo "$as_me:12288: checking for XineramaQueryScreens in -lXinerama" >&5
12289echo $ECHO_N "checking for XineramaQueryScreens in -lXinerama... $ECHO_C" >&6
12290if test "${ac_cv_lib_Xinerama_XineramaQueryScreens+set}" = set; then
12291  echo $ECHO_N "(cached) $ECHO_C" >&6
12292else
12293  ac_check_lib_save_LIBS=$LIBS
12294LIBS="-lXinerama  $LIBS"
12295cat >"conftest.$ac_ext" <<_ACEOF
12296#line 12296 "configure"
12297#include "confdefs.h"
12298
12299/* Override any gcc2 internal prototype to avoid an error.  */
12300#ifdef __cplusplus
12301extern "C"
12302#endif
12303/* We use char because int might match the return type of a gcc2
12304   builtin and then its argument prototype would still apply.  */
12305char XineramaQueryScreens ();
12306int
12307main (void)
12308{
12309XineramaQueryScreens ();
12310  ;
12311  return 0;
12312}
12313_ACEOF
12314rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12315if { (eval echo "$as_me:12315: \"$ac_link\"") >&5
12316  (eval $ac_link) 2>&5
12317  ac_status=$?
12318  echo "$as_me:12318: \$? = $ac_status" >&5
12319  (exit "$ac_status"); } &&
12320         { ac_try='test -s "conftest$ac_exeext"'
12321  { (eval echo "$as_me:12321: \"$ac_try\"") >&5
12322  (eval $ac_try) 2>&5
12323  ac_status=$?
12324  echo "$as_me:12324: \$? = $ac_status" >&5
12325  (exit "$ac_status"); }; }; then
12326  ac_cv_lib_Xinerama_XineramaQueryScreens=yes
12327else
12328  echo "$as_me: failed program was:" >&5
12329cat "conftest.$ac_ext" >&5
12330ac_cv_lib_Xinerama_XineramaQueryScreens=no
12331fi
12332rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12333LIBS=$ac_check_lib_save_LIBS
12334fi
12335echo "$as_me:12335: result: $ac_cv_lib_Xinerama_XineramaQueryScreens" >&5
12336echo "${ECHO_T}$ac_cv_lib_Xinerama_XineramaQueryScreens" >&6
12337if test "$ac_cv_lib_Xinerama_XineramaQueryScreens" = yes; then
12338
12339cf_add_libs="$LIBS"
12340# reverse order
12341cf_add_0lib=
12342for cf_add_1lib in -lXinerama; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
12343# filter duplicates
12344for cf_add_1lib in $cf_add_0lib; do
12345	for cf_add_2lib in $cf_add_libs; do
12346		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
12347			cf_add_1lib=
12348			break
12349		fi
12350	done
12351	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
12352done
12353LIBS="$cf_add_libs"
12354
12355for ac_header in \
12356			X11/extensions/Xinerama.h \
12357
12358do
12359as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12360echo "$as_me:12360: checking for $ac_header" >&5
12361echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12362if eval "test \"\${$as_ac_Header+set}\" = set"; then
12363  echo $ECHO_N "(cached) $ECHO_C" >&6
12364else
12365  cat >"conftest.$ac_ext" <<_ACEOF
12366#line 12366 "configure"
12367#include "confdefs.h"
12368#include <$ac_header>
12369_ACEOF
12370if { (eval echo "$as_me:12370: \"$ac_cpp "conftest.$ac_ext"\"") >&5
12371  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
12372  ac_status=$?
12373  $EGREP -v '^ *\+' conftest.er1 >conftest.err
12374  rm -f conftest.er1
12375  cat conftest.err >&5
12376  echo "$as_me:12376: \$? = $ac_status" >&5
12377  (exit "$ac_status"); } >/dev/null; then
12378  if test -s conftest.err; then
12379    ac_cpp_err=$ac_c_preproc_warn_flag
12380  else
12381    ac_cpp_err=
12382  fi
12383else
12384  ac_cpp_err=yes
12385fi
12386if test -z "$ac_cpp_err"; then
12387  eval "$as_ac_Header=yes"
12388else
12389  echo "$as_me: failed program was:" >&5
12390  cat "conftest.$ac_ext" >&5
12391  eval "$as_ac_Header=no"
12392fi
12393rm -f conftest.err "conftest.$ac_ext"
12394fi
12395echo "$as_me:12395: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
12396echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
12397if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
12398  cat >>confdefs.h <<EOF
12399#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12400EOF
12401
12402fi
12403done
12404
12405fi
12406
12407fi
12408
12409fi
12410
12411cf_x_athena=${cf_x_athena:-Xaw}
12412
12413echo "$as_me:12413: checking if you want to link with Xaw 3d library" >&5
12414echo $ECHO_N "checking if you want to link with Xaw 3d library... $ECHO_C" >&6
12415withval=
12416
12417# Check whether --with-Xaw3d or --without-Xaw3d was given.
12418if test "${with_Xaw3d+set}" = set; then
12419  withval="$with_Xaw3d"
12420
12421fi;
12422if test "$withval" = yes ; then
12423	cf_x_athena=Xaw3d
12424	echo "$as_me:12424: result: yes" >&5
12425echo "${ECHO_T}yes" >&6
12426else
12427	echo "$as_me:12427: result: no" >&5
12428echo "${ECHO_T}no" >&6
12429fi
12430
12431echo "$as_me:12431: checking if you want to link with Xaw 3d xft library" >&5
12432echo $ECHO_N "checking if you want to link with Xaw 3d xft library... $ECHO_C" >&6
12433withval=
12434
12435# Check whether --with-Xaw3dxft or --without-Xaw3dxft was given.
12436if test "${with_Xaw3dxft+set}" = set; then
12437  withval="$with_Xaw3dxft"
12438
12439fi;
12440if test "$withval" = yes ; then
12441	cf_x_athena=Xaw3dxft
12442	echo "$as_me:12442: result: yes" >&5
12443echo "${ECHO_T}yes" >&6
12444else
12445	echo "$as_me:12445: result: no" >&5
12446echo "${ECHO_T}no" >&6
12447fi
12448
12449echo "$as_me:12449: checking if you want to link with neXT Athena library" >&5
12450echo $ECHO_N "checking if you want to link with neXT Athena library... $ECHO_C" >&6
12451withval=
12452
12453# Check whether --with-neXtaw or --without-neXtaw was given.
12454if test "${with_neXtaw+set}" = set; then
12455  withval="$with_neXtaw"
12456
12457fi;
12458if test "$withval" = yes ; then
12459	cf_x_athena=neXtaw
12460	echo "$as_me:12460: result: yes" >&5
12461echo "${ECHO_T}yes" >&6
12462else
12463	echo "$as_me:12463: result: no" >&5
12464echo "${ECHO_T}no" >&6
12465fi
12466
12467echo "$as_me:12467: checking if you want to link with Athena-Plus library" >&5
12468echo $ECHO_N "checking if you want to link with Athena-Plus library... $ECHO_C" >&6
12469withval=
12470
12471# Check whether --with-XawPlus or --without-XawPlus was given.
12472if test "${with_XawPlus+set}" = set; then
12473  withval="$with_XawPlus"
12474
12475fi;
12476if test "$withval" = yes ; then
12477	cf_x_athena=XawPlus
12478	echo "$as_me:12478: result: yes" >&5
12479echo "${ECHO_T}yes" >&6
12480else
12481	echo "$as_me:12481: result: no" >&5
12482echo "${ECHO_T}no" >&6
12483fi
12484
12485cf_x_athena_lib=""
12486
12487if test "$PKG_CONFIG" != none ; then
12488	cf_athena_list=
12489	test "$cf_x_athena" = Xaw && cf_athena_list="xaw8 xaw7 xaw6"
12490	for cf_athena_pkg in \
12491		$cf_athena_list \
12492		${cf_x_athena} \
12493		${cf_x_athena}-devel \
12494		lib${cf_x_athena} \
12495		lib${cf_x_athena}-devel
12496	do
12497
12498if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "$cf_athena_pkg"; then
12499	test -n "$verbose" && echo "	found package $cf_athena_pkg" 1>&6
12500
12501echo "${as_me:-configure}:12501: testing found package $cf_athena_pkg ..." 1>&5
12502
12503	cf_pkgconfig_incs="`$PKG_CONFIG --cflags "$cf_athena_pkg" 2>/dev/null`"
12504	cf_pkgconfig_libs="`$PKG_CONFIG --libs   "$cf_athena_pkg" 2>/dev/null`"
12505	test -n "$verbose" && echo "	package $cf_athena_pkg CFLAGS: $cf_pkgconfig_incs" 1>&6
12506
12507echo "${as_me:-configure}:12507: testing package $cf_athena_pkg CFLAGS: $cf_pkgconfig_incs ..." 1>&5
12508
12509	test -n "$verbose" && echo "	package $cf_athena_pkg LIBS: $cf_pkgconfig_libs" 1>&6
12510
12511echo "${as_me:-configure}:12511: testing package $cf_athena_pkg LIBS: $cf_pkgconfig_libs ..." 1>&5
12512
12513cf_fix_cppflags=no
12514cf_new_cflags=
12515cf_new_cppflags=
12516cf_new_extra_cppflags=
12517
12518for cf_add_cflags in $cf_pkgconfig_incs
12519do
12520case "$cf_fix_cppflags" in
12521(no)
12522	case "$cf_add_cflags" in
12523	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12524		case "$cf_add_cflags" in
12525		(-D*)
12526			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12527
12528			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12529				&& test -z "${cf_tst_cflags}" \
12530				&& cf_fix_cppflags=yes
12531
12532			if test "$cf_fix_cppflags" = yes ; then
12533
12534	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12535	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12536
12537				continue
12538			elif test "${cf_tst_cflags}" = "\"'" ; then
12539
12540	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12541	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12542
12543				continue
12544			fi
12545			;;
12546		esac
12547		case "$CPPFLAGS" in
12548		(*$cf_add_cflags)
12549			;;
12550		(*)
12551			case "$cf_add_cflags" in
12552			(-D*)
12553				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12554
12555CPPFLAGS=`echo "$CPPFLAGS" | \
12556	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
12557		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
12558
12559				;;
12560			esac
12561
12562	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12563	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12564
12565			;;
12566		esac
12567		;;
12568	(*)
12569
12570	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12571	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12572
12573		;;
12574	esac
12575	;;
12576(yes)
12577
12578	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12579	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12580
12581	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
12582
12583	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12584		&& test -z "${cf_tst_cflags}" \
12585		&& cf_fix_cppflags=no
12586	;;
12587esac
12588done
12589
12590if test -n "$cf_new_cflags" ; then
12591
12592	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12593	CFLAGS="${CFLAGS}$cf_new_cflags"
12594
12595fi
12596
12597if test -n "$cf_new_cppflags" ; then
12598
12599	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12600	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12601
12602fi
12603
12604if test -n "$cf_new_extra_cppflags" ; then
12605
12606	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12607	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12608
12609fi
12610
12611cf_add_libs="$LIBS"
12612# reverse order
12613cf_add_0lib=
12614for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
12615# filter duplicates
12616for cf_add_1lib in $cf_add_0lib; do
12617	for cf_add_2lib in $cf_add_libs; do
12618		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
12619			cf_add_1lib=
12620			break
12621		fi
12622	done
12623	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
12624done
12625LIBS="$cf_add_libs"
12626
12627			cf_x_athena_lib="$cf_pkgconfig_libs"
12628
12629cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
12630
12631			cat >>confdefs.h <<EOF
12632#define $cf_x_athena_LIBS 1
12633EOF
12634
12635	for cf_trim_lib in Xmu Xt X11
12636	do
12637		case "$LIBS" in
12638		(*-l$cf_trim_lib\ *-l$cf_trim_lib*)
12639			LIBS=`echo "$LIBS " | sed -e 's/  / /g' -e 's%-l'"$cf_trim_lib"' %%' -e 's/ $//'`
12640			test -n "$verbose" && echo "	..trimmed $LIBS" 1>&6
12641
12642echo "${as_me:-configure}:12642: testing ..trimmed $LIBS ..." 1>&5
12643
12644			;;
12645		esac
12646	done
12647
12648echo "$as_me:12648: checking for usable $cf_x_athena/Xmu package" >&5
12649echo $ECHO_N "checking for usable $cf_x_athena/Xmu package... $ECHO_C" >&6
12650if test "${cf_cv_xaw_compat+set}" = set; then
12651  echo $ECHO_N "(cached) $ECHO_C" >&6
12652else
12653
12654cat >"conftest.$ac_ext" <<_ACEOF
12655#line 12655 "configure"
12656#include "confdefs.h"
12657
12658#include <X11/Xmu/CharSet.h>
12659
12660int
12661main (void)
12662{
12663
12664int check = XmuCompareISOLatin1("big", "small");
12665(void)check;
12666
12667  ;
12668  return 0;
12669}
12670_ACEOF
12671rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12672if { (eval echo "$as_me:12672: \"$ac_link\"") >&5
12673  (eval $ac_link) 2>&5
12674  ac_status=$?
12675  echo "$as_me:12675: \$? = $ac_status" >&5
12676  (exit "$ac_status"); } &&
12677         { ac_try='test -s "conftest$ac_exeext"'
12678  { (eval echo "$as_me:12678: \"$ac_try\"") >&5
12679  (eval $ac_try) 2>&5
12680  ac_status=$?
12681  echo "$as_me:12681: \$? = $ac_status" >&5
12682  (exit "$ac_status"); }; }; then
12683  cf_cv_xaw_compat=yes
12684else
12685  echo "$as_me: failed program was:" >&5
12686cat "conftest.$ac_ext" >&5
12687cf_cv_xaw_compat=no
12688fi
12689rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12690fi
12691echo "$as_me:12691: result: $cf_cv_xaw_compat" >&5
12692echo "${ECHO_T}$cf_cv_xaw_compat" >&6
12693
12694			if test "$cf_cv_xaw_compat" = no
12695			then
12696				# workaround for broken ".pc" files...
12697				case "$cf_x_athena_lib" in
12698				(*-lXmu*)
12699					;;
12700				(*)
12701					test -n "$verbose" && echo "	work around broken package" 1>&6
12702
12703echo "${as_me:-configure}:12703: testing work around broken package ..." 1>&5
12704
12705					cf_save_xmu="$LIBS"
12706					cf_first_lib=`echo "$cf_save_xmu" | sed -e 's/^  *//' -e 's/ .*//'`
12707
12708if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "xmu"; then
12709	test -n "$verbose" && echo "	found package xmu" 1>&6
12710
12711echo "${as_me:-configure}:12711: testing found package xmu ..." 1>&5
12712
12713	cf_pkgconfig_incs="`$PKG_CONFIG --cflags "xmu" 2>/dev/null`"
12714	cf_pkgconfig_libs="`$PKG_CONFIG --libs   "xmu" 2>/dev/null`"
12715	test -n "$verbose" && echo "	package xmu CFLAGS: $cf_pkgconfig_incs" 1>&6
12716
12717echo "${as_me:-configure}:12717: testing package xmu CFLAGS: $cf_pkgconfig_incs ..." 1>&5
12718
12719	test -n "$verbose" && echo "	package xmu LIBS: $cf_pkgconfig_libs" 1>&6
12720
12721echo "${as_me:-configure}:12721: testing package xmu LIBS: $cf_pkgconfig_libs ..." 1>&5
12722
12723cf_fix_cppflags=no
12724cf_new_cflags=
12725cf_new_cppflags=
12726cf_new_extra_cppflags=
12727
12728for cf_add_cflags in $cf_pkgconfig_incs
12729do
12730case "$cf_fix_cppflags" in
12731(no)
12732	case "$cf_add_cflags" in
12733	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12734		case "$cf_add_cflags" in
12735		(-D*)
12736			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12737
12738			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12739				&& test -z "${cf_tst_cflags}" \
12740				&& cf_fix_cppflags=yes
12741
12742			if test "$cf_fix_cppflags" = yes ; then
12743
12744	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12745	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12746
12747				continue
12748			elif test "${cf_tst_cflags}" = "\"'" ; then
12749
12750	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12751	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12752
12753				continue
12754			fi
12755			;;
12756		esac
12757		case "$CPPFLAGS" in
12758		(*$cf_add_cflags)
12759			;;
12760		(*)
12761			case "$cf_add_cflags" in
12762			(-D*)
12763				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12764
12765CPPFLAGS=`echo "$CPPFLAGS" | \
12766	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
12767		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
12768
12769				;;
12770			esac
12771
12772	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12773	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12774
12775			;;
12776		esac
12777		;;
12778	(*)
12779
12780	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12781	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12782
12783		;;
12784	esac
12785	;;
12786(yes)
12787
12788	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12789	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12790
12791	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
12792
12793	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12794		&& test -z "${cf_tst_cflags}" \
12795		&& cf_fix_cppflags=no
12796	;;
12797esac
12798done
12799
12800if test -n "$cf_new_cflags" ; then
12801
12802	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12803	CFLAGS="${CFLAGS}$cf_new_cflags"
12804
12805fi
12806
12807if test -n "$cf_new_cppflags" ; then
12808
12809	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12810	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12811
12812fi
12813
12814if test -n "$cf_new_extra_cppflags" ; then
12815
12816	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12817	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12818
12819fi
12820
12821cf_add_libs="$LIBS"
12822# reverse order
12823cf_add_0lib=
12824for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
12825# filter duplicates
12826for cf_add_1lib in $cf_add_0lib; do
12827	for cf_add_2lib in $cf_add_libs; do
12828		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
12829			cf_add_1lib=
12830			break
12831		fi
12832	done
12833	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
12834done
12835LIBS="$cf_add_libs"
12836
12837							LIBS="$cf_save_xmu"
12838
12839test -n "$verbose" && echo "	...before $LIBS" 1>&6
12840
12841echo "${as_me:-configure}:12841: testing ...before $LIBS ..." 1>&5
12842
12843LIBS=`echo "$LIBS" | sed -e "s/[ 	][ 	]*/ /g" -e "s%$cf_first_lib %$cf_first_lib $cf_pkgconfig_libs %" -e 's%  % %g'`
12844test -n "$verbose" && echo "	...after  $LIBS" 1>&6
12845
12846echo "${as_me:-configure}:12846: testing ...after  $LIBS ..." 1>&5
12847
12848else
12849	cf_pkgconfig_incs=
12850	cf_pkgconfig_libs=
12851
12852test -n "$verbose" && echo "	...before $LIBS" 1>&6
12853
12854echo "${as_me:-configure}:12854: testing ...before $LIBS ..." 1>&5
12855
12856LIBS=`echo "$LIBS" | sed -e "s/[ 	][ 	]*/ /g" -e "s%$cf_first_lib %$cf_first_lib -lXmu %" -e 's%  % %g'`
12857test -n "$verbose" && echo "	...after  $LIBS" 1>&6
12858
12859echo "${as_me:-configure}:12859: testing ...after  $LIBS ..." 1>&5
12860
12861fi
12862
12863	for cf_trim_lib in Xmu Xt X11
12864	do
12865		case "$LIBS" in
12866		(*-l$cf_trim_lib\ *-l$cf_trim_lib*)
12867			LIBS=`echo "$LIBS " | sed -e 's/  / /g' -e 's%-l'"$cf_trim_lib"' %%' -e 's/ $//'`
12868			test -n "$verbose" && echo "	..trimmed $LIBS" 1>&6
12869
12870echo "${as_me:-configure}:12870: testing ..trimmed $LIBS ..." 1>&5
12871
12872			;;
12873		esac
12874	done
12875
12876					;;
12877				esac
12878			fi
12879
12880			break
12881else
12882	cf_pkgconfig_incs=
12883	cf_pkgconfig_libs=
12884	:
12885fi
12886
12887	done
12888fi
12889
12890if test -z "$cf_x_athena_lib" ; then
12891
12892if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "Xext"; then
12893	test -n "$verbose" && echo "	found package Xext" 1>&6
12894
12895echo "${as_me:-configure}:12895: testing found package Xext ..." 1>&5
12896
12897	cf_pkgconfig_incs="`$PKG_CONFIG --cflags "Xext" 2>/dev/null`"
12898	cf_pkgconfig_libs="`$PKG_CONFIG --libs   "Xext" 2>/dev/null`"
12899	test -n "$verbose" && echo "	package Xext CFLAGS: $cf_pkgconfig_incs" 1>&6
12900
12901echo "${as_me:-configure}:12901: testing package Xext CFLAGS: $cf_pkgconfig_incs ..." 1>&5
12902
12903	test -n "$verbose" && echo "	package Xext LIBS: $cf_pkgconfig_libs" 1>&6
12904
12905echo "${as_me:-configure}:12905: testing package Xext LIBS: $cf_pkgconfig_libs ..." 1>&5
12906
12907cf_fix_cppflags=no
12908cf_new_cflags=
12909cf_new_cppflags=
12910cf_new_extra_cppflags=
12911
12912for cf_add_cflags in $cf_pkgconfig_incs
12913do
12914case "$cf_fix_cppflags" in
12915(no)
12916	case "$cf_add_cflags" in
12917	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12918		case "$cf_add_cflags" in
12919		(-D*)
12920			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12921
12922			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12923				&& test -z "${cf_tst_cflags}" \
12924				&& cf_fix_cppflags=yes
12925
12926			if test "$cf_fix_cppflags" = yes ; then
12927
12928	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12929	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12930
12931				continue
12932			elif test "${cf_tst_cflags}" = "\"'" ; then
12933
12934	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12935	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12936
12937				continue
12938			fi
12939			;;
12940		esac
12941		case "$CPPFLAGS" in
12942		(*$cf_add_cflags)
12943			;;
12944		(*)
12945			case "$cf_add_cflags" in
12946			(-D*)
12947				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12948
12949CPPFLAGS=`echo "$CPPFLAGS" | \
12950	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
12951		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
12952
12953				;;
12954			esac
12955
12956	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12957	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12958
12959			;;
12960		esac
12961		;;
12962	(*)
12963
12964	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12965	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12966
12967		;;
12968	esac
12969	;;
12970(yes)
12971
12972	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12973	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12974
12975	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
12976
12977	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12978		&& test -z "${cf_tst_cflags}" \
12979		&& cf_fix_cppflags=no
12980	;;
12981esac
12982done
12983
12984if test -n "$cf_new_cflags" ; then
12985
12986	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12987	CFLAGS="${CFLAGS}$cf_new_cflags"
12988
12989fi
12990
12991if test -n "$cf_new_cppflags" ; then
12992
12993	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12994	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12995
12996fi
12997
12998if test -n "$cf_new_extra_cppflags" ; then
12999
13000	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13001	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13002
13003fi
13004
13005cf_add_libs="$LIBS"
13006# reverse order
13007cf_add_0lib=
13008for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
13009# filter duplicates
13010for cf_add_1lib in $cf_add_0lib; do
13011	for cf_add_2lib in $cf_add_libs; do
13012		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
13013			cf_add_1lib=
13014			break
13015		fi
13016	done
13017	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
13018done
13019LIBS="$cf_add_libs"
13020
13021	:
13022else
13023	cf_pkgconfig_incs=
13024	cf_pkgconfig_libs=
13025
13026	echo "$as_me:13026: checking for XextCreateExtension in -lXext" >&5
13027echo $ECHO_N "checking for XextCreateExtension in -lXext... $ECHO_C" >&6
13028if test "${ac_cv_lib_Xext_XextCreateExtension+set}" = set; then
13029  echo $ECHO_N "(cached) $ECHO_C" >&6
13030else
13031  ac_check_lib_save_LIBS=$LIBS
13032LIBS="-lXext  $LIBS"
13033cat >"conftest.$ac_ext" <<_ACEOF
13034#line 13034 "configure"
13035#include "confdefs.h"
13036
13037/* Override any gcc2 internal prototype to avoid an error.  */
13038#ifdef __cplusplus
13039extern "C"
13040#endif
13041/* We use char because int might match the return type of a gcc2
13042   builtin and then its argument prototype would still apply.  */
13043char XextCreateExtension ();
13044int
13045main (void)
13046{
13047XextCreateExtension ();
13048  ;
13049  return 0;
13050}
13051_ACEOF
13052rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13053if { (eval echo "$as_me:13053: \"$ac_link\"") >&5
13054  (eval $ac_link) 2>&5
13055  ac_status=$?
13056  echo "$as_me:13056: \$? = $ac_status" >&5
13057  (exit "$ac_status"); } &&
13058         { ac_try='test -s "conftest$ac_exeext"'
13059  { (eval echo "$as_me:13059: \"$ac_try\"") >&5
13060  (eval $ac_try) 2>&5
13061  ac_status=$?
13062  echo "$as_me:13062: \$? = $ac_status" >&5
13063  (exit "$ac_status"); }; }; then
13064  ac_cv_lib_Xext_XextCreateExtension=yes
13065else
13066  echo "$as_me: failed program was:" >&5
13067cat "conftest.$ac_ext" >&5
13068ac_cv_lib_Xext_XextCreateExtension=no
13069fi
13070rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13071LIBS=$ac_check_lib_save_LIBS
13072fi
13073echo "$as_me:13073: result: $ac_cv_lib_Xext_XextCreateExtension" >&5
13074echo "${ECHO_T}$ac_cv_lib_Xext_XextCreateExtension" >&6
13075if test "$ac_cv_lib_Xext_XextCreateExtension" = yes; then
13076
13077cf_add_libs="$LIBS"
13078# reverse order
13079cf_add_0lib=
13080for cf_add_1lib in -lXext; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
13081# filter duplicates
13082for cf_add_1lib in $cf_add_0lib; do
13083	for cf_add_2lib in $cf_add_libs; do
13084		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
13085			cf_add_1lib=
13086			break
13087		fi
13088	done
13089	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
13090done
13091LIBS="$cf_add_libs"
13092
13093fi
13094
13095fi
13096
13097# OSX is schizoid about who owns /usr/X11 (old) versus /opt/X11 (new) (and
13098# in some cases has installed dummy files in the former, other cases replaced
13099# it with a link to the new location).  This complicates the configure script.
13100# Check for that pitfall, and recover using pkg-config
13101#
13102# If none of these are set, the configuration is almost certainly broken.
13103if test -z "${X_CFLAGS}${X_PRE_LIBS}${X_LIBS}${X_EXTRA_LIBS}"
13104then
13105
13106if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "x11"; then
13107	test -n "$verbose" && echo "	found package x11" 1>&6
13108
13109echo "${as_me:-configure}:13109: testing found package x11 ..." 1>&5
13110
13111	cf_pkgconfig_incs="`$PKG_CONFIG --cflags "x11" 2>/dev/null`"
13112	cf_pkgconfig_libs="`$PKG_CONFIG --libs   "x11" 2>/dev/null`"
13113	test -n "$verbose" && echo "	package x11 CFLAGS: $cf_pkgconfig_incs" 1>&6
13114
13115echo "${as_me:-configure}:13115: testing package x11 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
13116
13117	test -n "$verbose" && echo "	package x11 LIBS: $cf_pkgconfig_libs" 1>&6
13118
13119echo "${as_me:-configure}:13119: testing package x11 LIBS: $cf_pkgconfig_libs ..." 1>&5
13120
13121cf_fix_cppflags=no
13122cf_new_cflags=
13123cf_new_cppflags=
13124cf_new_extra_cppflags=
13125
13126for cf_add_cflags in $cf_pkgconfig_incs
13127do
13128case "$cf_fix_cppflags" in
13129(no)
13130	case "$cf_add_cflags" in
13131	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13132		case "$cf_add_cflags" in
13133		(-D*)
13134			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13135
13136			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13137				&& test -z "${cf_tst_cflags}" \
13138				&& cf_fix_cppflags=yes
13139
13140			if test "$cf_fix_cppflags" = yes ; then
13141
13142	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13143	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13144
13145				continue
13146			elif test "${cf_tst_cflags}" = "\"'" ; then
13147
13148	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13149	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13150
13151				continue
13152			fi
13153			;;
13154		esac
13155		case "$CPPFLAGS" in
13156		(*$cf_add_cflags)
13157			;;
13158		(*)
13159			case "$cf_add_cflags" in
13160			(-D*)
13161				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13162
13163CPPFLAGS=`echo "$CPPFLAGS" | \
13164	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
13165		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
13166
13167				;;
13168			esac
13169
13170	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13171	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13172
13173			;;
13174		esac
13175		;;
13176	(*)
13177
13178	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13179	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13180
13181		;;
13182	esac
13183	;;
13184(yes)
13185
13186	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13187	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13188
13189	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13190
13191	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13192		&& test -z "${cf_tst_cflags}" \
13193		&& cf_fix_cppflags=no
13194	;;
13195esac
13196done
13197
13198if test -n "$cf_new_cflags" ; then
13199
13200	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13201	CFLAGS="${CFLAGS}$cf_new_cflags"
13202
13203fi
13204
13205if test -n "$cf_new_cppflags" ; then
13206
13207	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13208	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13209
13210fi
13211
13212if test -n "$cf_new_extra_cppflags" ; then
13213
13214	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13215	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13216
13217fi
13218
13219cf_add_libs="$LIBS"
13220# reverse order
13221cf_add_0lib=
13222for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
13223# filter duplicates
13224for cf_add_1lib in $cf_add_0lib; do
13225	for cf_add_2lib in $cf_add_libs; do
13226		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
13227			cf_add_1lib=
13228			break
13229		fi
13230	done
13231	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
13232done
13233LIBS="$cf_add_libs"
13234
13235	:
13236else
13237	cf_pkgconfig_incs=
13238	cf_pkgconfig_libs=
13239	{ echo "$as_me:13239: WARNING: unable to find X11 library" >&5
13240echo "$as_me: WARNING: unable to find X11 library" >&2;}
13241fi
13242
13243if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "ice"; then
13244	test -n "$verbose" && echo "	found package ice" 1>&6
13245
13246echo "${as_me:-configure}:13246: testing found package ice ..." 1>&5
13247
13248	cf_pkgconfig_incs="`$PKG_CONFIG --cflags "ice" 2>/dev/null`"
13249	cf_pkgconfig_libs="`$PKG_CONFIG --libs   "ice" 2>/dev/null`"
13250	test -n "$verbose" && echo "	package ice CFLAGS: $cf_pkgconfig_incs" 1>&6
13251
13252echo "${as_me:-configure}:13252: testing package ice CFLAGS: $cf_pkgconfig_incs ..." 1>&5
13253
13254	test -n "$verbose" && echo "	package ice LIBS: $cf_pkgconfig_libs" 1>&6
13255
13256echo "${as_me:-configure}:13256: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5
13257
13258cf_fix_cppflags=no
13259cf_new_cflags=
13260cf_new_cppflags=
13261cf_new_extra_cppflags=
13262
13263for cf_add_cflags in $cf_pkgconfig_incs
13264do
13265case "$cf_fix_cppflags" in
13266(no)
13267	case "$cf_add_cflags" in
13268	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13269		case "$cf_add_cflags" in
13270		(-D*)
13271			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13272
13273			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13274				&& test -z "${cf_tst_cflags}" \
13275				&& cf_fix_cppflags=yes
13276
13277			if test "$cf_fix_cppflags" = yes ; then
13278
13279	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13280	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13281
13282				continue
13283			elif test "${cf_tst_cflags}" = "\"'" ; then
13284
13285	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13286	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13287
13288				continue
13289			fi
13290			;;
13291		esac
13292		case "$CPPFLAGS" in
13293		(*$cf_add_cflags)
13294			;;
13295		(*)
13296			case "$cf_add_cflags" in
13297			(-D*)
13298				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13299
13300CPPFLAGS=`echo "$CPPFLAGS" | \
13301	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
13302		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
13303
13304				;;
13305			esac
13306
13307	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13308	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13309
13310			;;
13311		esac
13312		;;
13313	(*)
13314
13315	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13316	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13317
13318		;;
13319	esac
13320	;;
13321(yes)
13322
13323	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13324	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13325
13326	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13327
13328	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13329		&& test -z "${cf_tst_cflags}" \
13330		&& cf_fix_cppflags=no
13331	;;
13332esac
13333done
13334
13335if test -n "$cf_new_cflags" ; then
13336
13337	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13338	CFLAGS="${CFLAGS}$cf_new_cflags"
13339
13340fi
13341
13342if test -n "$cf_new_cppflags" ; then
13343
13344	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13345	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13346
13347fi
13348
13349if test -n "$cf_new_extra_cppflags" ; then
13350
13351	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13352	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13353
13354fi
13355
13356cf_add_libs="$LIBS"
13357# reverse order
13358cf_add_0lib=
13359for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
13360# filter duplicates
13361for cf_add_1lib in $cf_add_0lib; do
13362	for cf_add_2lib in $cf_add_libs; do
13363		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
13364			cf_add_1lib=
13365			break
13366		fi
13367	done
13368	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
13369done
13370LIBS="$cf_add_libs"
13371
13372	:
13373else
13374	cf_pkgconfig_incs=
13375	cf_pkgconfig_libs=
13376	{ echo "$as_me:13376: WARNING: unable to find ICE library" >&5
13377echo "$as_me: WARNING: unable to find ICE library" >&2;}
13378fi
13379
13380if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "sm"; then
13381	test -n "$verbose" && echo "	found package sm" 1>&6
13382
13383echo "${as_me:-configure}:13383: testing found package sm ..." 1>&5
13384
13385	cf_pkgconfig_incs="`$PKG_CONFIG --cflags "sm" 2>/dev/null`"
13386	cf_pkgconfig_libs="`$PKG_CONFIG --libs   "sm" 2>/dev/null`"
13387	test -n "$verbose" && echo "	package sm CFLAGS: $cf_pkgconfig_incs" 1>&6
13388
13389echo "${as_me:-configure}:13389: testing package sm CFLAGS: $cf_pkgconfig_incs ..." 1>&5
13390
13391	test -n "$verbose" && echo "	package sm LIBS: $cf_pkgconfig_libs" 1>&6
13392
13393echo "${as_me:-configure}:13393: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5
13394
13395cf_fix_cppflags=no
13396cf_new_cflags=
13397cf_new_cppflags=
13398cf_new_extra_cppflags=
13399
13400for cf_add_cflags in $cf_pkgconfig_incs
13401do
13402case "$cf_fix_cppflags" in
13403(no)
13404	case "$cf_add_cflags" in
13405	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13406		case "$cf_add_cflags" in
13407		(-D*)
13408			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13409
13410			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13411				&& test -z "${cf_tst_cflags}" \
13412				&& cf_fix_cppflags=yes
13413
13414			if test "$cf_fix_cppflags" = yes ; then
13415
13416	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13417	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13418
13419				continue
13420			elif test "${cf_tst_cflags}" = "\"'" ; then
13421
13422	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13423	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13424
13425				continue
13426			fi
13427			;;
13428		esac
13429		case "$CPPFLAGS" in
13430		(*$cf_add_cflags)
13431			;;
13432		(*)
13433			case "$cf_add_cflags" in
13434			(-D*)
13435				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13436
13437CPPFLAGS=`echo "$CPPFLAGS" | \
13438	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
13439		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
13440
13441				;;
13442			esac
13443
13444	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13445	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13446
13447			;;
13448		esac
13449		;;
13450	(*)
13451
13452	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13453	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13454
13455		;;
13456	esac
13457	;;
13458(yes)
13459
13460	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13461	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13462
13463	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13464
13465	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13466		&& test -z "${cf_tst_cflags}" \
13467		&& cf_fix_cppflags=no
13468	;;
13469esac
13470done
13471
13472if test -n "$cf_new_cflags" ; then
13473
13474	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13475	CFLAGS="${CFLAGS}$cf_new_cflags"
13476
13477fi
13478
13479if test -n "$cf_new_cppflags" ; then
13480
13481	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13482	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13483
13484fi
13485
13486if test -n "$cf_new_extra_cppflags" ; then
13487
13488	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13489	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13490
13491fi
13492
13493cf_add_libs="$LIBS"
13494# reverse order
13495cf_add_0lib=
13496for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
13497# filter duplicates
13498for cf_add_1lib in $cf_add_0lib; do
13499	for cf_add_2lib in $cf_add_libs; do
13500		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
13501			cf_add_1lib=
13502			break
13503		fi
13504	done
13505	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
13506done
13507LIBS="$cf_add_libs"
13508
13509	:
13510else
13511	cf_pkgconfig_incs=
13512	cf_pkgconfig_libs=
13513	{ echo "$as_me:13513: WARNING: unable to find SM library" >&5
13514echo "$as_me: WARNING: unable to find SM library" >&2;}
13515fi
13516
13517if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "xt"; then
13518	test -n "$verbose" && echo "	found package xt" 1>&6
13519
13520echo "${as_me:-configure}:13520: testing found package xt ..." 1>&5
13521
13522	cf_pkgconfig_incs="`$PKG_CONFIG --cflags "xt" 2>/dev/null`"
13523	cf_pkgconfig_libs="`$PKG_CONFIG --libs   "xt" 2>/dev/null`"
13524	test -n "$verbose" && echo "	package xt CFLAGS: $cf_pkgconfig_incs" 1>&6
13525
13526echo "${as_me:-configure}:13526: testing package xt CFLAGS: $cf_pkgconfig_incs ..." 1>&5
13527
13528	test -n "$verbose" && echo "	package xt LIBS: $cf_pkgconfig_libs" 1>&6
13529
13530echo "${as_me:-configure}:13530: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5
13531
13532cf_fix_cppflags=no
13533cf_new_cflags=
13534cf_new_cppflags=
13535cf_new_extra_cppflags=
13536
13537for cf_add_cflags in $cf_pkgconfig_incs
13538do
13539case "$cf_fix_cppflags" in
13540(no)
13541	case "$cf_add_cflags" in
13542	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13543		case "$cf_add_cflags" in
13544		(-D*)
13545			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13546
13547			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13548				&& test -z "${cf_tst_cflags}" \
13549				&& cf_fix_cppflags=yes
13550
13551			if test "$cf_fix_cppflags" = yes ; then
13552
13553	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13554	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13555
13556				continue
13557			elif test "${cf_tst_cflags}" = "\"'" ; then
13558
13559	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13560	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13561
13562				continue
13563			fi
13564			;;
13565		esac
13566		case "$CPPFLAGS" in
13567		(*$cf_add_cflags)
13568			;;
13569		(*)
13570			case "$cf_add_cflags" in
13571			(-D*)
13572				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13573
13574CPPFLAGS=`echo "$CPPFLAGS" | \
13575	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
13576		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
13577
13578				;;
13579			esac
13580
13581	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13582	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13583
13584			;;
13585		esac
13586		;;
13587	(*)
13588
13589	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13590	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13591
13592		;;
13593	esac
13594	;;
13595(yes)
13596
13597	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13598	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13599
13600	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13601
13602	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13603		&& test -z "${cf_tst_cflags}" \
13604		&& cf_fix_cppflags=no
13605	;;
13606esac
13607done
13608
13609if test -n "$cf_new_cflags" ; then
13610
13611	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13612	CFLAGS="${CFLAGS}$cf_new_cflags"
13613
13614fi
13615
13616if test -n "$cf_new_cppflags" ; then
13617
13618	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13619	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13620
13621fi
13622
13623if test -n "$cf_new_extra_cppflags" ; then
13624
13625	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13626	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13627
13628fi
13629
13630cf_add_libs="$LIBS"
13631# reverse order
13632cf_add_0lib=
13633for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
13634# filter duplicates
13635for cf_add_1lib in $cf_add_0lib; do
13636	for cf_add_2lib in $cf_add_libs; do
13637		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
13638			cf_add_1lib=
13639			break
13640		fi
13641	done
13642	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
13643done
13644LIBS="$cf_add_libs"
13645
13646	:
13647else
13648	cf_pkgconfig_incs=
13649	cf_pkgconfig_libs=
13650	{ echo "$as_me:13650: WARNING: unable to find Xt library" >&5
13651echo "$as_me: WARNING: unable to find Xt library" >&2;}
13652fi
13653
13654else
13655	LIBS="$X_PRE_LIBS $LIBS $X_EXTRA_LIBS"
13656fi
13657
13658cf_have_X_LIBS=no
13659
13660if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "xt"; then
13661	test -n "$verbose" && echo "	found package xt" 1>&6
13662
13663echo "${as_me:-configure}:13663: testing found package xt ..." 1>&5
13664
13665	cf_pkgconfig_incs="`$PKG_CONFIG --cflags "xt" 2>/dev/null`"
13666	cf_pkgconfig_libs="`$PKG_CONFIG --libs   "xt" 2>/dev/null`"
13667	test -n "$verbose" && echo "	package xt CFLAGS: $cf_pkgconfig_incs" 1>&6
13668
13669echo "${as_me:-configure}:13669: testing package xt CFLAGS: $cf_pkgconfig_incs ..." 1>&5
13670
13671	test -n "$verbose" && echo "	package xt LIBS: $cf_pkgconfig_libs" 1>&6
13672
13673echo "${as_me:-configure}:13673: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5
13674
13675cf_fix_cppflags=no
13676cf_new_cflags=
13677cf_new_cppflags=
13678cf_new_extra_cppflags=
13679
13680for cf_add_cflags in $cf_pkgconfig_incs
13681do
13682case "$cf_fix_cppflags" in
13683(no)
13684	case "$cf_add_cflags" in
13685	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13686		case "$cf_add_cflags" in
13687		(-D*)
13688			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13689
13690			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13691				&& test -z "${cf_tst_cflags}" \
13692				&& cf_fix_cppflags=yes
13693
13694			if test "$cf_fix_cppflags" = yes ; then
13695
13696	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13697	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13698
13699				continue
13700			elif test "${cf_tst_cflags}" = "\"'" ; then
13701
13702	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13703	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13704
13705				continue
13706			fi
13707			;;
13708		esac
13709		case "$CPPFLAGS" in
13710		(*$cf_add_cflags)
13711			;;
13712		(*)
13713			case "$cf_add_cflags" in
13714			(-D*)
13715				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13716
13717CPPFLAGS=`echo "$CPPFLAGS" | \
13718	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
13719		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
13720
13721				;;
13722			esac
13723
13724	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13725	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13726
13727			;;
13728		esac
13729		;;
13730	(*)
13731
13732	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13733	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13734
13735		;;
13736	esac
13737	;;
13738(yes)
13739
13740	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13741	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13742
13743	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13744
13745	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13746		&& test -z "${cf_tst_cflags}" \
13747		&& cf_fix_cppflags=no
13748	;;
13749esac
13750done
13751
13752if test -n "$cf_new_cflags" ; then
13753
13754	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13755	CFLAGS="${CFLAGS}$cf_new_cflags"
13756
13757fi
13758
13759if test -n "$cf_new_cppflags" ; then
13760
13761	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13762	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13763
13764fi
13765
13766if test -n "$cf_new_extra_cppflags" ; then
13767
13768	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13769	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13770
13771fi
13772
13773cf_add_libs="$LIBS"
13774# reverse order
13775cf_add_0lib=
13776for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
13777# filter duplicates
13778for cf_add_1lib in $cf_add_0lib; do
13779	for cf_add_2lib in $cf_add_libs; do
13780		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
13781			cf_add_1lib=
13782			break
13783		fi
13784	done
13785	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
13786done
13787LIBS="$cf_add_libs"
13788
13789	case "x$LIBS" in
13790	(*-lX11*)
13791		;;
13792	(*)
13793# we have an "xt" package, but it may omit Xt's dependency on X11
13794echo "$as_me:13794: checking for usable X dependency" >&5
13795echo $ECHO_N "checking for usable X dependency... $ECHO_C" >&6
13796if test "${cf_cv_xt_x11_compat+set}" = set; then
13797  echo $ECHO_N "(cached) $ECHO_C" >&6
13798else
13799
13800cat >"conftest.$ac_ext" <<_ACEOF
13801#line 13801 "configure"
13802#include "confdefs.h"
13803
13804#include <X11/Xlib.h>
13805
13806int
13807main (void)
13808{
13809
13810	int rc1 = XDrawLine((Display*) 0, (Drawable) 0, (GC) 0, 0, 0, 0, 0);
13811	int rc2 = XClearWindow((Display*) 0, (Window) 0);
13812	int rc3 = XMoveWindow((Display*) 0, (Window) 0, 0, 0);
13813	int rc4 = XMoveResizeWindow((Display*)0, (Window)0, 0, 0, 0, 0);
13814
13815  ;
13816  return 0;
13817}
13818_ACEOF
13819rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13820if { (eval echo "$as_me:13820: \"$ac_link\"") >&5
13821  (eval $ac_link) 2>&5
13822  ac_status=$?
13823  echo "$as_me:13823: \$? = $ac_status" >&5
13824  (exit "$ac_status"); } &&
13825         { ac_try='test -s "conftest$ac_exeext"'
13826  { (eval echo "$as_me:13826: \"$ac_try\"") >&5
13827  (eval $ac_try) 2>&5
13828  ac_status=$?
13829  echo "$as_me:13829: \$? = $ac_status" >&5
13830  (exit "$ac_status"); }; }; then
13831  cf_cv_xt_x11_compat=yes
13832else
13833  echo "$as_me: failed program was:" >&5
13834cat "conftest.$ac_ext" >&5
13835cf_cv_xt_x11_compat=no
13836fi
13837rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13838fi
13839echo "$as_me:13839: result: $cf_cv_xt_x11_compat" >&5
13840echo "${ECHO_T}$cf_cv_xt_x11_compat" >&6
13841		if test "$cf_cv_xt_x11_compat" = no
13842		then
13843			test -n "$verbose" && echo "	work around broken X11 dependency" 1>&6
13844
13845echo "${as_me:-configure}:13845: testing work around broken X11 dependency ..." 1>&5
13846
13847			# 2010/11/19 - good enough until a working Xt on Xcb is delivered.
13848
13849if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "x11"; then
13850	test -n "$verbose" && echo "	found package x11" 1>&6
13851
13852echo "${as_me:-configure}:13852: testing found package x11 ..." 1>&5
13853
13854	cf_pkgconfig_incs="`$PKG_CONFIG --cflags "x11" 2>/dev/null`"
13855	cf_pkgconfig_libs="`$PKG_CONFIG --libs   "x11" 2>/dev/null`"
13856	test -n "$verbose" && echo "	package x11 CFLAGS: $cf_pkgconfig_incs" 1>&6
13857
13858echo "${as_me:-configure}:13858: testing package x11 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
13859
13860	test -n "$verbose" && echo "	package x11 LIBS: $cf_pkgconfig_libs" 1>&6
13861
13862echo "${as_me:-configure}:13862: testing package x11 LIBS: $cf_pkgconfig_libs ..." 1>&5
13863
13864cf_fix_cppflags=no
13865cf_new_cflags=
13866cf_new_cppflags=
13867cf_new_extra_cppflags=
13868
13869for cf_add_cflags in $cf_pkgconfig_incs
13870do
13871case "$cf_fix_cppflags" in
13872(no)
13873	case "$cf_add_cflags" in
13874	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13875		case "$cf_add_cflags" in
13876		(-D*)
13877			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13878
13879			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13880				&& test -z "${cf_tst_cflags}" \
13881				&& cf_fix_cppflags=yes
13882
13883			if test "$cf_fix_cppflags" = yes ; then
13884
13885	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13886	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13887
13888				continue
13889			elif test "${cf_tst_cflags}" = "\"'" ; then
13890
13891	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13892	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13893
13894				continue
13895			fi
13896			;;
13897		esac
13898		case "$CPPFLAGS" in
13899		(*$cf_add_cflags)
13900			;;
13901		(*)
13902			case "$cf_add_cflags" in
13903			(-D*)
13904				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13905
13906CPPFLAGS=`echo "$CPPFLAGS" | \
13907	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
13908		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
13909
13910				;;
13911			esac
13912
13913	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13914	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13915
13916			;;
13917		esac
13918		;;
13919	(*)
13920
13921	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13922	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13923
13924		;;
13925	esac
13926	;;
13927(yes)
13928
13929	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13930	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13931
13932	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13933
13934	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13935		&& test -z "${cf_tst_cflags}" \
13936		&& cf_fix_cppflags=no
13937	;;
13938esac
13939done
13940
13941if test -n "$cf_new_cflags" ; then
13942
13943	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13944	CFLAGS="${CFLAGS}$cf_new_cflags"
13945
13946fi
13947
13948if test -n "$cf_new_cppflags" ; then
13949
13950	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13951	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13952
13953fi
13954
13955if test -n "$cf_new_extra_cppflags" ; then
13956
13957	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13958	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13959
13960fi
13961
13962cf_add_libs="$LIBS"
13963# reverse order
13964cf_add_0lib=
13965for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
13966# filter duplicates
13967for cf_add_1lib in $cf_add_0lib; do
13968	for cf_add_2lib in $cf_add_libs; do
13969		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
13970			cf_add_1lib=
13971			break
13972		fi
13973	done
13974	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
13975done
13976LIBS="$cf_add_libs"
13977
13978	:
13979else
13980	cf_pkgconfig_incs=
13981	cf_pkgconfig_libs=
13982
13983test -n "$verbose" && echo "	...before $LIBS" 1>&6
13984
13985echo "${as_me:-configure}:13985: testing ...before $LIBS ..." 1>&5
13986
13987LIBS=`echo "$LIBS" | sed -e "s/[ 	][ 	]*/ /g" -e "s%-lXt %-lXt -lX11 %" -e 's%  % %g'`
13988test -n "$verbose" && echo "	...after  $LIBS" 1>&6
13989
13990echo "${as_me:-configure}:13990: testing ...after  $LIBS ..." 1>&5
13991
13992fi
13993
13994		fi
13995		;;
13996	esac
13997
13998echo "$as_me:13998: checking for usable X Toolkit package" >&5
13999echo $ECHO_N "checking for usable X Toolkit package... $ECHO_C" >&6
14000if test "${cf_cv_xt_ice_compat+set}" = set; then
14001  echo $ECHO_N "(cached) $ECHO_C" >&6
14002else
14003
14004cat >"conftest.$ac_ext" <<_ACEOF
14005#line 14005 "configure"
14006#include "confdefs.h"
14007
14008#include <X11/Shell.h>
14009
14010int
14011main (void)
14012{
14013int num = IceConnectionNumber(0); (void) num
14014
14015  ;
14016  return 0;
14017}
14018_ACEOF
14019rm -f "conftest.$ac_objext" "conftest$ac_exeext"
14020if { (eval echo "$as_me:14020: \"$ac_link\"") >&5
14021  (eval $ac_link) 2>&5
14022  ac_status=$?
14023  echo "$as_me:14023: \$? = $ac_status" >&5
14024  (exit "$ac_status"); } &&
14025         { ac_try='test -s "conftest$ac_exeext"'
14026  { (eval echo "$as_me:14026: \"$ac_try\"") >&5
14027  (eval $ac_try) 2>&5
14028  ac_status=$?
14029  echo "$as_me:14029: \$? = $ac_status" >&5
14030  (exit "$ac_status"); }; }; then
14031  cf_cv_xt_ice_compat=yes
14032else
14033  echo "$as_me: failed program was:" >&5
14034cat "conftest.$ac_ext" >&5
14035cf_cv_xt_ice_compat=no
14036fi
14037rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
14038fi
14039echo "$as_me:14039: result: $cf_cv_xt_ice_compat" >&5
14040echo "${ECHO_T}$cf_cv_xt_ice_compat" >&6
14041
14042	if test "$cf_cv_xt_ice_compat" = no
14043	then
14044		# workaround for broken ".pc" files used for X Toolkit.
14045		case "x$X_PRE_LIBS" in
14046		(*-lICE*)
14047			case "x$LIBS" in
14048			(*-lICE*)
14049				;;
14050			(*)
14051				test -n "$verbose" && echo "	work around broken ICE dependency" 1>&6
14052
14053echo "${as_me:-configure}:14053: testing work around broken ICE dependency ..." 1>&5
14054
14055if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "ice"; then
14056	test -n "$verbose" && echo "	found package ice" 1>&6
14057
14058echo "${as_me:-configure}:14058: testing found package ice ..." 1>&5
14059
14060	cf_pkgconfig_incs="`$PKG_CONFIG --cflags "ice" 2>/dev/null`"
14061	cf_pkgconfig_libs="`$PKG_CONFIG --libs   "ice" 2>/dev/null`"
14062	test -n "$verbose" && echo "	package ice CFLAGS: $cf_pkgconfig_incs" 1>&6
14063
14064echo "${as_me:-configure}:14064: testing package ice CFLAGS: $cf_pkgconfig_incs ..." 1>&5
14065
14066	test -n "$verbose" && echo "	package ice LIBS: $cf_pkgconfig_libs" 1>&6
14067
14068echo "${as_me:-configure}:14068: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5
14069
14070cf_fix_cppflags=no
14071cf_new_cflags=
14072cf_new_cppflags=
14073cf_new_extra_cppflags=
14074
14075for cf_add_cflags in $cf_pkgconfig_incs
14076do
14077case "$cf_fix_cppflags" in
14078(no)
14079	case "$cf_add_cflags" in
14080	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14081		case "$cf_add_cflags" in
14082		(-D*)
14083			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14084
14085			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14086				&& test -z "${cf_tst_cflags}" \
14087				&& cf_fix_cppflags=yes
14088
14089			if test "$cf_fix_cppflags" = yes ; then
14090
14091	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14092	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14093
14094				continue
14095			elif test "${cf_tst_cflags}" = "\"'" ; then
14096
14097	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14098	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14099
14100				continue
14101			fi
14102			;;
14103		esac
14104		case "$CPPFLAGS" in
14105		(*$cf_add_cflags)
14106			;;
14107		(*)
14108			case "$cf_add_cflags" in
14109			(-D*)
14110				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14111
14112CPPFLAGS=`echo "$CPPFLAGS" | \
14113	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
14114		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
14115
14116				;;
14117			esac
14118
14119	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14120	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14121
14122			;;
14123		esac
14124		;;
14125	(*)
14126
14127	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14128	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14129
14130		;;
14131	esac
14132	;;
14133(yes)
14134
14135	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14136	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14137
14138	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
14139
14140	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14141		&& test -z "${cf_tst_cflags}" \
14142		&& cf_fix_cppflags=no
14143	;;
14144esac
14145done
14146
14147if test -n "$cf_new_cflags" ; then
14148
14149	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14150	CFLAGS="${CFLAGS}$cf_new_cflags"
14151
14152fi
14153
14154if test -n "$cf_new_cppflags" ; then
14155
14156	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14157	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14158
14159fi
14160
14161if test -n "$cf_new_extra_cppflags" ; then
14162
14163	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14164	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14165
14166fi
14167
14168cf_add_libs="$LIBS"
14169# reverse order
14170cf_add_0lib=
14171for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14172# filter duplicates
14173for cf_add_1lib in $cf_add_0lib; do
14174	for cf_add_2lib in $cf_add_libs; do
14175		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14176			cf_add_1lib=
14177			break
14178		fi
14179	done
14180	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14181done
14182LIBS="$cf_add_libs"
14183
14184if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "sm"; then
14185	test -n "$verbose" && echo "	found package sm" 1>&6
14186
14187echo "${as_me:-configure}:14187: testing found package sm ..." 1>&5
14188
14189	cf_pkgconfig_incs="`$PKG_CONFIG --cflags "sm" 2>/dev/null`"
14190	cf_pkgconfig_libs="`$PKG_CONFIG --libs   "sm" 2>/dev/null`"
14191	test -n "$verbose" && echo "	package sm CFLAGS: $cf_pkgconfig_incs" 1>&6
14192
14193echo "${as_me:-configure}:14193: testing package sm CFLAGS: $cf_pkgconfig_incs ..." 1>&5
14194
14195	test -n "$verbose" && echo "	package sm LIBS: $cf_pkgconfig_libs" 1>&6
14196
14197echo "${as_me:-configure}:14197: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5
14198
14199cf_fix_cppflags=no
14200cf_new_cflags=
14201cf_new_cppflags=
14202cf_new_extra_cppflags=
14203
14204for cf_add_cflags in $cf_pkgconfig_incs
14205do
14206case "$cf_fix_cppflags" in
14207(no)
14208	case "$cf_add_cflags" in
14209	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14210		case "$cf_add_cflags" in
14211		(-D*)
14212			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14213
14214			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14215				&& test -z "${cf_tst_cflags}" \
14216				&& cf_fix_cppflags=yes
14217
14218			if test "$cf_fix_cppflags" = yes ; then
14219
14220	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14221	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14222
14223				continue
14224			elif test "${cf_tst_cflags}" = "\"'" ; then
14225
14226	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14227	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14228
14229				continue
14230			fi
14231			;;
14232		esac
14233		case "$CPPFLAGS" in
14234		(*$cf_add_cflags)
14235			;;
14236		(*)
14237			case "$cf_add_cflags" in
14238			(-D*)
14239				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14240
14241CPPFLAGS=`echo "$CPPFLAGS" | \
14242	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
14243		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
14244
14245				;;
14246			esac
14247
14248	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14249	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14250
14251			;;
14252		esac
14253		;;
14254	(*)
14255
14256	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14257	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14258
14259		;;
14260	esac
14261	;;
14262(yes)
14263
14264	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14265	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14266
14267	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
14268
14269	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14270		&& test -z "${cf_tst_cflags}" \
14271		&& cf_fix_cppflags=no
14272	;;
14273esac
14274done
14275
14276if test -n "$cf_new_cflags" ; then
14277
14278	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14279	CFLAGS="${CFLAGS}$cf_new_cflags"
14280
14281fi
14282
14283if test -n "$cf_new_cppflags" ; then
14284
14285	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14286	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14287
14288fi
14289
14290if test -n "$cf_new_extra_cppflags" ; then
14291
14292	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14293	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14294
14295fi
14296
14297cf_add_libs="$LIBS"
14298# reverse order
14299cf_add_0lib=
14300for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14301# filter duplicates
14302for cf_add_1lib in $cf_add_0lib; do
14303	for cf_add_2lib in $cf_add_libs; do
14304		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14305			cf_add_1lib=
14306			break
14307		fi
14308	done
14309	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14310done
14311LIBS="$cf_add_libs"
14312
14313	:
14314else
14315	cf_pkgconfig_incs=
14316	cf_pkgconfig_libs=
14317	:
14318fi
14319
14320else
14321	cf_pkgconfig_incs=
14322	cf_pkgconfig_libs=
14323
14324test -n "$verbose" && echo "	...before $LIBS" 1>&6
14325
14326echo "${as_me:-configure}:14326: testing ...before $LIBS ..." 1>&5
14327
14328LIBS=`echo "$LIBS" | sed -e "s/[ 	][ 	]*/ /g" -e "s%-lXt %-lXt $X_PRE_LIBS %" -e 's%  % %g'`
14329test -n "$verbose" && echo "	...after  $LIBS" 1>&6
14330
14331echo "${as_me:-configure}:14331: testing ...after  $LIBS ..." 1>&5
14332
14333fi
14334
14335				;;
14336			esac
14337			;;
14338		esac
14339	fi
14340
14341	cf_have_X_LIBS=yes
14342
14343else
14344	cf_pkgconfig_incs=
14345	cf_pkgconfig_libs=
14346
14347	LDFLAGS="$X_LIBS $LDFLAGS"
14348
14349test -n "$verbose" && echo "	checking additions to CFLAGS" 1>&6
14350
14351echo "${as_me:-configure}:14351: testing checking additions to CFLAGS ..." 1>&5
14352
14353cf_check_cflags="$CFLAGS"
14354cf_check_cppflags="$CPPFLAGS"
14355
14356cf_fix_cppflags=no
14357cf_new_cflags=
14358cf_new_cppflags=
14359cf_new_extra_cppflags=
14360
14361for cf_add_cflags in $X_CFLAGS
14362do
14363case "$cf_fix_cppflags" in
14364(no)
14365	case "$cf_add_cflags" in
14366	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14367		case "$cf_add_cflags" in
14368		(-D*)
14369			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14370
14371			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14372				&& test -z "${cf_tst_cflags}" \
14373				&& cf_fix_cppflags=yes
14374
14375			if test "$cf_fix_cppflags" = yes ; then
14376
14377	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14378	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14379
14380				continue
14381			elif test "${cf_tst_cflags}" = "\"'" ; then
14382
14383	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14384	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14385
14386				continue
14387			fi
14388			;;
14389		esac
14390		case "$CPPFLAGS" in
14391		(*$cf_add_cflags)
14392			;;
14393		(*)
14394			case "$cf_add_cflags" in
14395			(-D*)
14396				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14397
14398CPPFLAGS=`echo "$CPPFLAGS" | \
14399	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
14400		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
14401
14402				;;
14403			esac
14404
14405	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14406	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14407
14408			;;
14409		esac
14410		;;
14411	(*)
14412
14413	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14414	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14415
14416		;;
14417	esac
14418	;;
14419(yes)
14420
14421	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14422	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14423
14424	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
14425
14426	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14427		&& test -z "${cf_tst_cflags}" \
14428		&& cf_fix_cppflags=no
14429	;;
14430esac
14431done
14432
14433if test -n "$cf_new_cflags" ; then
14434	test -n "$verbose" && echo "	add to \$CFLAGS $cf_new_cflags" 1>&6
14435
14436echo "${as_me:-configure}:14436: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
14437
14438	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14439	CFLAGS="${CFLAGS}$cf_new_cflags"
14440
14441fi
14442
14443if test -n "$cf_new_cppflags" ; then
14444	test -n "$verbose" && echo "	add to \$CPPFLAGS $cf_new_cppflags" 1>&6
14445
14446echo "${as_me:-configure}:14446: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
14447
14448	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14449	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14450
14451fi
14452
14453if test -n "$cf_new_extra_cppflags" ; then
14454	test -n "$verbose" && echo "	add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
14455
14456echo "${as_me:-configure}:14456: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
14457
14458	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14459	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14460
14461fi
14462
14463if test "x$cf_check_cflags" != "x$CFLAGS" ; then
14464cat >"conftest.$ac_ext" <<_ACEOF
14465#line 14465 "configure"
14466#include "confdefs.h"
14467#include <stdio.h>
14468int
14469main (void)
14470{
14471printf("Hello world");
14472  ;
14473  return 0;
14474}
14475_ACEOF
14476rm -f "conftest.$ac_objext" "conftest$ac_exeext"
14477if { (eval echo "$as_me:14477: \"$ac_link\"") >&5
14478  (eval $ac_link) 2>&5
14479  ac_status=$?
14480  echo "$as_me:14480: \$? = $ac_status" >&5
14481  (exit "$ac_status"); } &&
14482         { ac_try='test -s "conftest$ac_exeext"'
14483  { (eval echo "$as_me:14483: \"$ac_try\"") >&5
14484  (eval $ac_try) 2>&5
14485  ac_status=$?
14486  echo "$as_me:14486: \$? = $ac_status" >&5
14487  (exit "$ac_status"); }; }; then
14488  :
14489else
14490  echo "$as_me: failed program was:" >&5
14491cat "conftest.$ac_ext" >&5
14492test -n "$verbose" && echo "	test-compile failed.  Undoing change to \$CFLAGS" 1>&6
14493
14494echo "${as_me:-configure}:14494: testing test-compile failed.  Undoing change to \$CFLAGS ..." 1>&5
14495
14496	 if test "x$cf_check_cppflags" != "x$CPPFLAGS" ; then
14497		 test -n "$verbose" && echo "	but keeping change to \$CPPFLAGS" 1>&6
14498
14499echo "${as_me:-configure}:14499: testing but keeping change to \$CPPFLAGS ..." 1>&5
14500
14501	 fi
14502	 CFLAGS="$cf_check_cflags"
14503fi
14504rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
14505fi
14506
14507	echo "$as_me:14507: checking for XOpenDisplay" >&5
14508echo $ECHO_N "checking for XOpenDisplay... $ECHO_C" >&6
14509if test "${ac_cv_func_XOpenDisplay+set}" = set; then
14510  echo $ECHO_N "(cached) $ECHO_C" >&6
14511else
14512  cat >"conftest.$ac_ext" <<_ACEOF
14513#line 14513 "configure"
14514#include "confdefs.h"
14515#define XOpenDisplay autoconf_temporary
14516#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
14517#undef XOpenDisplay
14518
14519#ifdef __cplusplus
14520extern "C"
14521#endif
14522
14523/* We use char because int might match the return type of a gcc2
14524   builtin and then its argument prototype would still apply.  */
14525char XOpenDisplay (void);
14526
14527int
14528main (void)
14529{
14530
14531/* The GNU C library defines stubs for functions which it implements
14532    to always fail with ENOSYS.  Some functions are actually named
14533    something starting with __ and the normal name is an alias.  */
14534#if defined (__stub_XOpenDisplay) || defined (__stub___XOpenDisplay)
14535#error found stub for XOpenDisplay
14536#endif
14537
14538	return XOpenDisplay ();
14539  ;
14540  return 0;
14541}
14542_ACEOF
14543rm -f "conftest.$ac_objext" "conftest$ac_exeext"
14544if { (eval echo "$as_me:14544: \"$ac_link\"") >&5
14545  (eval $ac_link) 2>&5
14546  ac_status=$?
14547  echo "$as_me:14547: \$? = $ac_status" >&5
14548  (exit "$ac_status"); } &&
14549         { ac_try='test -s "conftest$ac_exeext"'
14550  { (eval echo "$as_me:14550: \"$ac_try\"") >&5
14551  (eval $ac_try) 2>&5
14552  ac_status=$?
14553  echo "$as_me:14553: \$? = $ac_status" >&5
14554  (exit "$ac_status"); }; }; then
14555  ac_cv_func_XOpenDisplay=yes
14556else
14557  echo "$as_me: failed program was:" >&5
14558cat "conftest.$ac_ext" >&5
14559ac_cv_func_XOpenDisplay=no
14560fi
14561rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
14562fi
14563echo "$as_me:14563: result: $ac_cv_func_XOpenDisplay" >&5
14564echo "${ECHO_T}$ac_cv_func_XOpenDisplay" >&6
14565if test "$ac_cv_func_XOpenDisplay" = yes; then
14566  :
14567else
14568
14569	echo "$as_me:14569: checking for XOpenDisplay in -lX11" >&5
14570echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6
14571if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then
14572  echo $ECHO_N "(cached) $ECHO_C" >&6
14573else
14574  ac_check_lib_save_LIBS=$LIBS
14575LIBS="-lX11  $LIBS"
14576cat >"conftest.$ac_ext" <<_ACEOF
14577#line 14577 "configure"
14578#include "confdefs.h"
14579
14580/* Override any gcc2 internal prototype to avoid an error.  */
14581#ifdef __cplusplus
14582extern "C"
14583#endif
14584/* We use char because int might match the return type of a gcc2
14585   builtin and then its argument prototype would still apply.  */
14586char XOpenDisplay ();
14587int
14588main (void)
14589{
14590XOpenDisplay ();
14591  ;
14592  return 0;
14593}
14594_ACEOF
14595rm -f "conftest.$ac_objext" "conftest$ac_exeext"
14596if { (eval echo "$as_me:14596: \"$ac_link\"") >&5
14597  (eval $ac_link) 2>&5
14598  ac_status=$?
14599  echo "$as_me:14599: \$? = $ac_status" >&5
14600  (exit "$ac_status"); } &&
14601         { ac_try='test -s "conftest$ac_exeext"'
14602  { (eval echo "$as_me:14602: \"$ac_try\"") >&5
14603  (eval $ac_try) 2>&5
14604  ac_status=$?
14605  echo "$as_me:14605: \$? = $ac_status" >&5
14606  (exit "$ac_status"); }; }; then
14607  ac_cv_lib_X11_XOpenDisplay=yes
14608else
14609  echo "$as_me: failed program was:" >&5
14610cat "conftest.$ac_ext" >&5
14611ac_cv_lib_X11_XOpenDisplay=no
14612fi
14613rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
14614LIBS=$ac_check_lib_save_LIBS
14615fi
14616echo "$as_me:14616: result: $ac_cv_lib_X11_XOpenDisplay" >&5
14617echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6
14618if test "$ac_cv_lib_X11_XOpenDisplay" = yes; then
14619
14620cf_add_libs="$LIBS"
14621# reverse order
14622cf_add_0lib=
14623for cf_add_1lib in -lX11; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14624# filter duplicates
14625for cf_add_1lib in $cf_add_0lib; do
14626	for cf_add_2lib in $cf_add_libs; do
14627		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14628			cf_add_1lib=
14629			break
14630		fi
14631	done
14632	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14633done
14634LIBS="$cf_add_libs"
14635
14636fi
14637
14638fi
14639
14640	echo "$as_me:14640: checking for XtAppInitialize" >&5
14641echo $ECHO_N "checking for XtAppInitialize... $ECHO_C" >&6
14642if test "${ac_cv_func_XtAppInitialize+set}" = set; then
14643  echo $ECHO_N "(cached) $ECHO_C" >&6
14644else
14645  cat >"conftest.$ac_ext" <<_ACEOF
14646#line 14646 "configure"
14647#include "confdefs.h"
14648#define XtAppInitialize autoconf_temporary
14649#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
14650#undef XtAppInitialize
14651
14652#ifdef __cplusplus
14653extern "C"
14654#endif
14655
14656/* We use char because int might match the return type of a gcc2
14657   builtin and then its argument prototype would still apply.  */
14658char XtAppInitialize (void);
14659
14660int
14661main (void)
14662{
14663
14664/* The GNU C library defines stubs for functions which it implements
14665    to always fail with ENOSYS.  Some functions are actually named
14666    something starting with __ and the normal name is an alias.  */
14667#if defined (__stub_XtAppInitialize) || defined (__stub___XtAppInitialize)
14668#error found stub for XtAppInitialize
14669#endif
14670
14671	return XtAppInitialize ();
14672  ;
14673  return 0;
14674}
14675_ACEOF
14676rm -f "conftest.$ac_objext" "conftest$ac_exeext"
14677if { (eval echo "$as_me:14677: \"$ac_link\"") >&5
14678  (eval $ac_link) 2>&5
14679  ac_status=$?
14680  echo "$as_me:14680: \$? = $ac_status" >&5
14681  (exit "$ac_status"); } &&
14682         { ac_try='test -s "conftest$ac_exeext"'
14683  { (eval echo "$as_me:14683: \"$ac_try\"") >&5
14684  (eval $ac_try) 2>&5
14685  ac_status=$?
14686  echo "$as_me:14686: \$? = $ac_status" >&5
14687  (exit "$ac_status"); }; }; then
14688  ac_cv_func_XtAppInitialize=yes
14689else
14690  echo "$as_me: failed program was:" >&5
14691cat "conftest.$ac_ext" >&5
14692ac_cv_func_XtAppInitialize=no
14693fi
14694rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
14695fi
14696echo "$as_me:14696: result: $ac_cv_func_XtAppInitialize" >&5
14697echo "${ECHO_T}$ac_cv_func_XtAppInitialize" >&6
14698if test "$ac_cv_func_XtAppInitialize" = yes; then
14699  :
14700else
14701
14702	echo "$as_me:14702: checking for XtAppInitialize in -lXt" >&5
14703echo $ECHO_N "checking for XtAppInitialize in -lXt... $ECHO_C" >&6
14704if test "${ac_cv_lib_Xt_XtAppInitialize+set}" = set; then
14705  echo $ECHO_N "(cached) $ECHO_C" >&6
14706else
14707  ac_check_lib_save_LIBS=$LIBS
14708LIBS="-lXt  $LIBS"
14709cat >"conftest.$ac_ext" <<_ACEOF
14710#line 14710 "configure"
14711#include "confdefs.h"
14712
14713/* Override any gcc2 internal prototype to avoid an error.  */
14714#ifdef __cplusplus
14715extern "C"
14716#endif
14717/* We use char because int might match the return type of a gcc2
14718   builtin and then its argument prototype would still apply.  */
14719char XtAppInitialize ();
14720int
14721main (void)
14722{
14723XtAppInitialize ();
14724  ;
14725  return 0;
14726}
14727_ACEOF
14728rm -f "conftest.$ac_objext" "conftest$ac_exeext"
14729if { (eval echo "$as_me:14729: \"$ac_link\"") >&5
14730  (eval $ac_link) 2>&5
14731  ac_status=$?
14732  echo "$as_me:14732: \$? = $ac_status" >&5
14733  (exit "$ac_status"); } &&
14734         { ac_try='test -s "conftest$ac_exeext"'
14735  { (eval echo "$as_me:14735: \"$ac_try\"") >&5
14736  (eval $ac_try) 2>&5
14737  ac_status=$?
14738  echo "$as_me:14738: \$? = $ac_status" >&5
14739  (exit "$ac_status"); }; }; then
14740  ac_cv_lib_Xt_XtAppInitialize=yes
14741else
14742  echo "$as_me: failed program was:" >&5
14743cat "conftest.$ac_ext" >&5
14744ac_cv_lib_Xt_XtAppInitialize=no
14745fi
14746rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
14747LIBS=$ac_check_lib_save_LIBS
14748fi
14749echo "$as_me:14749: result: $ac_cv_lib_Xt_XtAppInitialize" >&5
14750echo "${ECHO_T}$ac_cv_lib_Xt_XtAppInitialize" >&6
14751if test "$ac_cv_lib_Xt_XtAppInitialize" = yes; then
14752
14753cat >>confdefs.h <<\EOF
14754#define HAVE_LIBXT 1
14755EOF
14756
14757		 cf_have_X_LIBS=Xt
14758		 LIBS="-lXt $LIBS"
14759fi
14760
14761fi
14762
14763fi
14764
14765if test "$cf_have_X_LIBS" = no ; then
14766	{ echo "$as_me:14766: WARNING: Unable to successfully link X Toolkit library (-lXt) with
14767test program.  You will have to check and add the proper libraries by hand
14768to makefile." >&5
14769echo "$as_me: WARNING: Unable to successfully link X Toolkit library (-lXt) with
14770test program.  You will have to check and add the proper libraries by hand
14771to makefile." >&2;}
14772fi
14773
14774cf_x_athena_root=$cf_x_athena
14775cf_x_athena_inc=""
14776
14777for cf_path in default \
14778	/usr/contrib/X11R6 \
14779	/usr/contrib/X11R5 \
14780	/usr/lib/X11R5 \
14781	/usr/local
14782do
14783	if test -z "$cf_x_athena_inc" ; then
14784
14785cf_save_LIBS_CF_X_ATHENA_CPPFLAGS="$LIBS"
14786cf_save_CFLAGS_CF_X_ATHENA_CPPFLAGS="$CFLAGS"
14787cf_save_CPPFLAGS_CF_X_ATHENA_CPPFLAGS="$CPPFLAGS"
14788LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
14789for cf_X_CFLAGS in $X_CFLAGS
14790do
14791	case "x$cf_X_CFLAGS" in
14792	x-[IUD]*)
14793		CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
14794		;;
14795	*)
14796		CFLAGS="$CFLAGS $cf_X_CFLAGS"
14797		;;
14798	esac
14799done
14800
14801		cf_test=X11/$cf_x_athena_root/SimpleMenu.h
14802		if test "$cf_path" != default ; then
14803
14804	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14805	CPPFLAGS="${CPPFLAGS}-I$cf_path/include"
14806
14807			echo "$as_me:14807: checking for $cf_test in $cf_path" >&5
14808echo $ECHO_N "checking for $cf_test in $cf_path... $ECHO_C" >&6
14809		else
14810			echo "$as_me:14810: checking for $cf_test" >&5
14811echo $ECHO_N "checking for $cf_test... $ECHO_C" >&6
14812		fi
14813		cat >"conftest.$ac_ext" <<_ACEOF
14814#line 14814 "configure"
14815#include "confdefs.h"
14816
14817#include <X11/Intrinsic.h>
14818#include <$cf_test>
14819int
14820main (void)
14821{
14822
14823  ;
14824  return 0;
14825}
14826_ACEOF
14827rm -f "conftest.$ac_objext"
14828if { (eval echo "$as_me:14828: \"$ac_compile\"") >&5
14829  (eval $ac_compile) 2>&5
14830  ac_status=$?
14831  echo "$as_me:14831: \$? = $ac_status" >&5
14832  (exit "$ac_status"); } &&
14833         { ac_try='test -s "conftest.$ac_objext"'
14834  { (eval echo "$as_me:14834: \"$ac_try\"") >&5
14835  (eval $ac_try) 2>&5
14836  ac_status=$?
14837  echo "$as_me:14837: \$? = $ac_status" >&5
14838  (exit "$ac_status"); }; }; then
14839  cf_result=yes
14840else
14841  echo "$as_me: failed program was:" >&5
14842cat "conftest.$ac_ext" >&5
14843cf_result=no
14844fi
14845rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14846		echo "$as_me:14846: result: $cf_result" >&5
14847echo "${ECHO_T}$cf_result" >&6
14848
14849LIBS="$cf_save_LIBS_CF_X_ATHENA_CPPFLAGS"
14850CFLAGS="$cf_save_CFLAGS_CF_X_ATHENA_CPPFLAGS"
14851CPPFLAGS="$cf_save_CPPFLAGS_CF_X_ATHENA_CPPFLAGS"
14852
14853		if test "$cf_result" = yes ; then
14854			test "$cf_path"  = default && cf_x_athena_inc=default
14855			test "$cf_path" != default && cf_x_athena_inc="$cf_path/include"
14856			break
14857		fi
14858	fi
14859done
14860
14861if test -z "$cf_x_athena_inc" ; then
14862	{ echo "$as_me:14862: WARNING: Unable to find Athena header files" >&5
14863echo "$as_me: WARNING: Unable to find Athena header files" >&2;}
14864elif test "$cf_x_athena_inc" != default ; then
14865
14866	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14867	CPPFLAGS="${CPPFLAGS}-I$cf_x_athena_inc"
14868
14869fi
14870
14871cf_x_athena_root=$cf_x_athena
14872cf_x_athena_lib=""
14873
14874for cf_path in default \
14875	/usr/contrib/X11R6 \
14876	/usr/contrib/X11R5 \
14877	/usr/lib/X11R5 \
14878	/usr/local
14879do
14880	for cf_lib in \
14881		${cf_x_athena_root} \
14882		${cf_x_athena_root}7 \
14883		${cf_x_athena_root}6
14884	do
14885	for cf_libs in \
14886		"-l$cf_lib -lXmu" \
14887		"-l$cf_lib -lXpm -lXmu" \
14888		"-l${cf_lib}_s -lXmu_s"
14889	do
14890		test -n "$cf_x_athena_lib" && break
14891
14892cf_save_LIBS_CF_X_ATHENA_LIBS="$LIBS"
14893cf_save_CFLAGS_CF_X_ATHENA_LIBS="$CFLAGS"
14894cf_save_CPPFLAGS_CF_X_ATHENA_LIBS="$CPPFLAGS"
14895LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
14896for cf_X_CFLAGS in $X_CFLAGS
14897do
14898	case "x$cf_X_CFLAGS" in
14899	x-[IUD]*)
14900		CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
14901		;;
14902	*)
14903		CFLAGS="$CFLAGS $cf_X_CFLAGS"
14904		;;
14905	esac
14906done
14907
14908		cf_test=XawSimpleMenuAddGlobalActions
14909		test "$cf_path" != default && cf_libs="-L$cf_path/lib $cf_libs"
14910
14911cf_add_libs="$LIBS"
14912# reverse order
14913cf_add_0lib=
14914for cf_add_1lib in $cf_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14915# filter duplicates
14916for cf_add_1lib in $cf_add_0lib; do
14917	for cf_add_2lib in $cf_add_libs; do
14918		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14919			cf_add_1lib=
14920			break
14921		fi
14922	done
14923	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14924done
14925LIBS="$cf_add_libs"
14926
14927		echo "$as_me:14927: checking for $cf_test in $cf_libs" >&5
14928echo $ECHO_N "checking for $cf_test in $cf_libs... $ECHO_C" >&6
14929		cat >"conftest.$ac_ext" <<_ACEOF
14930#line 14930 "configure"
14931#include "confdefs.h"
14932
14933#include <X11/Intrinsic.h>
14934#include <X11/$cf_x_athena_root/SimpleMenu.h>
14935
14936int
14937main (void)
14938{
14939
14940$cf_test((XtAppContext) 0)
14941  ;
14942  return 0;
14943}
14944_ACEOF
14945rm -f "conftest.$ac_objext" "conftest$ac_exeext"
14946if { (eval echo "$as_me:14946: \"$ac_link\"") >&5
14947  (eval $ac_link) 2>&5
14948  ac_status=$?
14949  echo "$as_me:14949: \$? = $ac_status" >&5
14950  (exit "$ac_status"); } &&
14951         { ac_try='test -s "conftest$ac_exeext"'
14952  { (eval echo "$as_me:14952: \"$ac_try\"") >&5
14953  (eval $ac_try) 2>&5
14954  ac_status=$?
14955  echo "$as_me:14955: \$? = $ac_status" >&5
14956  (exit "$ac_status"); }; }; then
14957  cf_result=yes
14958else
14959  echo "$as_me: failed program was:" >&5
14960cat "conftest.$ac_ext" >&5
14961cf_result=no
14962fi
14963rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
14964		echo "$as_me:14964: result: $cf_result" >&5
14965echo "${ECHO_T}$cf_result" >&6
14966
14967LIBS="$cf_save_LIBS_CF_X_ATHENA_LIBS"
14968CFLAGS="$cf_save_CFLAGS_CF_X_ATHENA_LIBS"
14969CPPFLAGS="$cf_save_CPPFLAGS_CF_X_ATHENA_LIBS"
14970
14971		if test "$cf_result" = yes ; then
14972			cf_x_athena_lib="$cf_libs"
14973			break
14974		fi
14975	done # cf_libs
14976		test -n "$cf_x_athena_lib" && break
14977	done # cf_lib
14978done
14979
14980if test -z "$cf_x_athena_lib" ; then
14981	{ { echo "$as_me:14981: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&5
14982echo "$as_me: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&2;}
14983   { (exit 1); exit 1; }; }
14984fi
14985
14986cf_add_libs="$LIBS"
14987# reverse order
14988cf_add_0lib=
14989for cf_add_1lib in $cf_x_athena_lib; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14990# filter duplicates
14991for cf_add_1lib in $cf_add_0lib; do
14992	for cf_add_2lib in $cf_add_libs; do
14993		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14994			cf_add_1lib=
14995			break
14996		fi
14997	done
14998	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14999done
15000LIBS="$cf_add_libs"
15001
15002cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15003
15004cat >>confdefs.h <<EOF
15005#define $cf_x_athena_LIBS 1
15006EOF
15007
15008fi
15009
15010for ac_header in X11/Xpoll.h
15011do
15012as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15013echo "$as_me:15013: checking for $ac_header" >&5
15014echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15015if eval "test \"\${$as_ac_Header+set}\" = set"; then
15016  echo $ECHO_N "(cached) $ECHO_C" >&6
15017else
15018  cat >"conftest.$ac_ext" <<_ACEOF
15019#line 15019 "configure"
15020#include "confdefs.h"
15021#include <$ac_header>
15022_ACEOF
15023if { (eval echo "$as_me:15023: \"$ac_cpp "conftest.$ac_ext"\"") >&5
15024  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
15025  ac_status=$?
15026  $EGREP -v '^ *\+' conftest.er1 >conftest.err
15027  rm -f conftest.er1
15028  cat conftest.err >&5
15029  echo "$as_me:15029: \$? = $ac_status" >&5
15030  (exit "$ac_status"); } >/dev/null; then
15031  if test -s conftest.err; then
15032    ac_cpp_err=$ac_c_preproc_warn_flag
15033  else
15034    ac_cpp_err=
15035  fi
15036else
15037  ac_cpp_err=yes
15038fi
15039if test -z "$ac_cpp_err"; then
15040  eval "$as_ac_Header=yes"
15041else
15042  echo "$as_me: failed program was:" >&5
15043  cat "conftest.$ac_ext" >&5
15044  eval "$as_ac_Header=no"
15045fi
15046rm -f conftest.err "conftest.$ac_ext"
15047fi
15048echo "$as_me:15048: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
15049echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
15050if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
15051  cat >>confdefs.h <<EOF
15052#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15053EOF
15054
15055fi
15056done
15057
15058echo "$as_me:15058: checking for declaration of fd_set" >&5
15059echo $ECHO_N "checking for declaration of fd_set... $ECHO_C" >&6
15060if test "${cf_cv_type_fd_set+set}" = set; then
15061  echo $ECHO_N "(cached) $ECHO_C" >&6
15062else
15063
15064echo "${as_me:-configure}:15064: testing sys/types alone ..." 1>&5
15065
15066cat >"conftest.$ac_ext" <<_ACEOF
15067#line 15067 "configure"
15068#include "confdefs.h"
15069
15070#include <sys/types.h>
15071int
15072main (void)
15073{
15074fd_set x; (void)x
15075  ;
15076  return 0;
15077}
15078_ACEOF
15079rm -f "conftest.$ac_objext"
15080if { (eval echo "$as_me:15080: \"$ac_compile\"") >&5
15081  (eval $ac_compile) 2>&5
15082  ac_status=$?
15083  echo "$as_me:15083: \$? = $ac_status" >&5
15084  (exit "$ac_status"); } &&
15085         { ac_try='test -s "conftest.$ac_objext"'
15086  { (eval echo "$as_me:15086: \"$ac_try\"") >&5
15087  (eval $ac_try) 2>&5
15088  ac_status=$?
15089  echo "$as_me:15089: \$? = $ac_status" >&5
15090  (exit "$ac_status"); }; }; then
15091  cf_cv_type_fd_set=sys/types.h
15092else
15093  echo "$as_me: failed program was:" >&5
15094cat "conftest.$ac_ext" >&5
15095
15096echo "${as_me:-configure}:15096: testing X11/Xpoll.h ..." 1>&5
15097
15098cat >"conftest.$ac_ext" <<_ACEOF
15099#line 15099 "configure"
15100#include "confdefs.h"
15101
15102#ifdef HAVE_X11_XPOLL_H
15103#include <X11/Xpoll.h>
15104#endif
15105int
15106main (void)
15107{
15108fd_set x; (void)x
15109  ;
15110  return 0;
15111}
15112_ACEOF
15113rm -f "conftest.$ac_objext"
15114if { (eval echo "$as_me:15114: \"$ac_compile\"") >&5
15115  (eval $ac_compile) 2>&5
15116  ac_status=$?
15117  echo "$as_me:15117: \$? = $ac_status" >&5
15118  (exit "$ac_status"); } &&
15119         { ac_try='test -s "conftest.$ac_objext"'
15120  { (eval echo "$as_me:15120: \"$ac_try\"") >&5
15121  (eval $ac_try) 2>&5
15122  ac_status=$?
15123  echo "$as_me:15123: \$? = $ac_status" >&5
15124  (exit "$ac_status"); }; }; then
15125  cf_cv_type_fd_set=X11/Xpoll.h
15126else
15127  echo "$as_me: failed program was:" >&5
15128cat "conftest.$ac_ext" >&5
15129
15130echo "${as_me:-configure}:15130: testing sys/select.h ..." 1>&5
15131
15132cat >"conftest.$ac_ext" <<_ACEOF
15133#line 15133 "configure"
15134#include "confdefs.h"
15135
15136#include <sys/types.h>
15137#include <sys/select.h>
15138int
15139main (void)
15140{
15141fd_set x; (void)x
15142  ;
15143  return 0;
15144}
15145_ACEOF
15146rm -f "conftest.$ac_objext"
15147if { (eval echo "$as_me:15147: \"$ac_compile\"") >&5
15148  (eval $ac_compile) 2>&5
15149  ac_status=$?
15150  echo "$as_me:15150: \$? = $ac_status" >&5
15151  (exit "$ac_status"); } &&
15152         { ac_try='test -s "conftest.$ac_objext"'
15153  { (eval echo "$as_me:15153: \"$ac_try\"") >&5
15154  (eval $ac_try) 2>&5
15155  ac_status=$?
15156  echo "$as_me:15156: \$? = $ac_status" >&5
15157  (exit "$ac_status"); }; }; then
15158  cf_cv_type_fd_set=sys/select.h
15159else
15160  echo "$as_me: failed program was:" >&5
15161cat "conftest.$ac_ext" >&5
15162cf_cv_type_fd_set=unknown
15163fi
15164rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15165fi
15166rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15167fi
15168rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15169fi
15170echo "$as_me:15170: result: $cf_cv_type_fd_set" >&5
15171echo "${ECHO_T}$cf_cv_type_fd_set" >&6
15172if test $cf_cv_type_fd_set = sys/select.h ; then
15173
15174cat >>confdefs.h <<\EOF
15175#define USE_SYS_SELECT_H 1
15176EOF
15177
15178fi
15179
15180echo "$as_me:15180: checking for declaration of fd_mask" >&5
15181echo $ECHO_N "checking for declaration of fd_mask... $ECHO_C" >&6
15182if test "${cf_cv_type_fd_mask+set}" = set; then
15183  echo $ECHO_N "(cached) $ECHO_C" >&6
15184else
15185
15186    if test x$cf_cv_type_fd_set = xX11/Xpoll.h ; then
15187        cat >"conftest.$ac_ext" <<_ACEOF
15188#line 15188 "configure"
15189#include "confdefs.h"
15190
15191#include <X11/Xpoll.h>
15192int
15193main (void)
15194{
15195fd_mask x
15196  ;
15197  return 0;
15198}
15199_ACEOF
15200rm -f "conftest.$ac_objext"
15201if { (eval echo "$as_me:15201: \"$ac_compile\"") >&5
15202  (eval $ac_compile) 2>&5
15203  ac_status=$?
15204  echo "$as_me:15204: \$? = $ac_status" >&5
15205  (exit "$ac_status"); } &&
15206         { ac_try='test -s "conftest.$ac_objext"'
15207  { (eval echo "$as_me:15207: \"$ac_try\"") >&5
15208  (eval $ac_try) 2>&5
15209  ac_status=$?
15210  echo "$as_me:15210: \$? = $ac_status" >&5
15211  (exit "$ac_status"); }; }; then
15212  :
15213else
15214  echo "$as_me: failed program was:" >&5
15215cat "conftest.$ac_ext" >&5
15216
15217echo "${as_me:-configure}:15217: testing if we must define CSRG_BASED ..." 1>&5
15218
15219# Xosdefs.h on Mac OS X may not define this (but it should).
15220            cat >"conftest.$ac_ext" <<_ACEOF
15221#line 15221 "configure"
15222#include "confdefs.h"
15223
15224#define CSRG_BASED
15225#include <X11/Xpoll.h>
15226int
15227main (void)
15228{
15229fd_mask x
15230  ;
15231  return 0;
15232}
15233_ACEOF
15234rm -f "conftest.$ac_objext"
15235if { (eval echo "$as_me:15235: \"$ac_compile\"") >&5
15236  (eval $ac_compile) 2>&5
15237  ac_status=$?
15238  echo "$as_me:15238: \$? = $ac_status" >&5
15239  (exit "$ac_status"); } &&
15240         { ac_try='test -s "conftest.$ac_objext"'
15241  { (eval echo "$as_me:15241: \"$ac_try\"") >&5
15242  (eval $ac_try) 2>&5
15243  ac_status=$?
15244  echo "$as_me:15244: \$? = $ac_status" >&5
15245  (exit "$ac_status"); }; }; then
15246  cf_cv_type_fd_mask=CSRG_BASED
15247else
15248  echo "$as_me: failed program was:" >&5
15249cat "conftest.$ac_ext" >&5
15250fi
15251rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15252fi
15253rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15254    else
15255        cf_cv_type_fd_mask=$cf_cv_type_fd_set
15256    fi
15257
15258fi
15259echo "$as_me:15259: result: $cf_cv_type_fd_mask" >&5
15260echo "${ECHO_T}$cf_cv_type_fd_mask" >&6
15261if test x$cf_cv_type_fd_mask = xCSRG_BASED ; then
15262
15263cat >>confdefs.h <<\EOF
15264#define CSRG_BASED 1
15265EOF
15266
15267fi
15268
15269echo "$as_me:15269: checking for IRIX 6.5 baud-rate redefinitions" >&5
15270echo $ECHO_N "checking for IRIX 6.5 baud-rate redefinitions... $ECHO_C" >&6
15271if test "${cf_cv_termio_c_ispeed+set}" = set; then
15272  echo $ECHO_N "(cached) $ECHO_C" >&6
15273else
15274
15275cat >"conftest.$ac_ext" <<_ACEOF
15276#line 15276 "configure"
15277#include "confdefs.h"
15278
15279#include <sys/types.h>
15280#include <sys/termio.h>
15281int
15282main (void)
15283{
15284
15285struct termio foo;
15286foo.c_ispeed = B38400;
15287foo.c_ospeed = B9600;
15288(void)foo;
15289
15290  ;
15291  return 0;
15292}
15293_ACEOF
15294rm -f "conftest.$ac_objext"
15295if { (eval echo "$as_me:15295: \"$ac_compile\"") >&5
15296  (eval $ac_compile) 2>&5
15297  ac_status=$?
15298  echo "$as_me:15298: \$? = $ac_status" >&5
15299  (exit "$ac_status"); } &&
15300         { ac_try='test -s "conftest.$ac_objext"'
15301  { (eval echo "$as_me:15301: \"$ac_try\"") >&5
15302  (eval $ac_try) 2>&5
15303  ac_status=$?
15304  echo "$as_me:15304: \$? = $ac_status" >&5
15305  (exit "$ac_status"); }; }; then
15306  cf_cv_termio_c_ispeed=yes
15307
15308else
15309  echo "$as_me: failed program was:" >&5
15310cat "conftest.$ac_ext" >&5
15311cf_cv_termio_c_ispeed=no
15312fi
15313rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15314
15315fi
15316echo "$as_me:15316: result: $cf_cv_termio_c_ispeed" >&5
15317echo "${ECHO_T}$cf_cv_termio_c_ispeed" >&6
15318test "$cf_cv_termio_c_ispeed" = yes &&
15319cat >>confdefs.h <<\EOF
15320#define HAVE_TERMIO_C_ISPEED 1
15321EOF
15322
15323echo "$as_me:15323: checking for termios type tcflag_t" >&5
15324echo $ECHO_N "checking for termios type tcflag_t... $ECHO_C" >&6
15325if test "${cf_cv_havetype_tcflag_t+set}" = set; then
15326  echo $ECHO_N "(cached) $ECHO_C" >&6
15327else
15328
15329	cat >"conftest.$ac_ext" <<_ACEOF
15330#line 15330 "configure"
15331#include "confdefs.h"
15332#include <termios.h>
15333int
15334main (void)
15335{
15336
15337		tcflag_t x = 0; (void)x
15338  ;
15339  return 0;
15340}
15341_ACEOF
15342rm -f "conftest.$ac_objext"
15343if { (eval echo "$as_me:15343: \"$ac_compile\"") >&5
15344  (eval $ac_compile) 2>&5
15345  ac_status=$?
15346  echo "$as_me:15346: \$? = $ac_status" >&5
15347  (exit "$ac_status"); } &&
15348         { ac_try='test -s "conftest.$ac_objext"'
15349  { (eval echo "$as_me:15349: \"$ac_try\"") >&5
15350  (eval $ac_try) 2>&5
15351  ac_status=$?
15352  echo "$as_me:15352: \$? = $ac_status" >&5
15353  (exit "$ac_status"); }; }; then
15354  cf_cv_havetype_tcflag_t=yes
15355else
15356  echo "$as_me: failed program was:" >&5
15357cat "conftest.$ac_ext" >&5
15358cf_cv_havetype_tcflag_t=no
15359fi
15360rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15361
15362fi
15363echo "$as_me:15363: result: $cf_cv_havetype_tcflag_t" >&5
15364echo "${ECHO_T}$cf_cv_havetype_tcflag_t" >&6
15365test "$cf_cv_havetype_tcflag_t" = no &&
15366cat >>confdefs.h <<\EOF
15367#define tcflag_t unsigned long
15368EOF
15369
15370echo "$as_me:15370: checking for termios type speed_t" >&5
15371echo $ECHO_N "checking for termios type speed_t... $ECHO_C" >&6
15372if test "${cf_cv_havetype_speed_t+set}" = set; then
15373  echo $ECHO_N "(cached) $ECHO_C" >&6
15374else
15375
15376	cat >"conftest.$ac_ext" <<_ACEOF
15377#line 15377 "configure"
15378#include "confdefs.h"
15379#include <termios.h>
15380int
15381main (void)
15382{
15383
15384		speed_t x = 0; (void)x
15385  ;
15386  return 0;
15387}
15388_ACEOF
15389rm -f "conftest.$ac_objext"
15390if { (eval echo "$as_me:15390: \"$ac_compile\"") >&5
15391  (eval $ac_compile) 2>&5
15392  ac_status=$?
15393  echo "$as_me:15393: \$? = $ac_status" >&5
15394  (exit "$ac_status"); } &&
15395         { ac_try='test -s "conftest.$ac_objext"'
15396  { (eval echo "$as_me:15396: \"$ac_try\"") >&5
15397  (eval $ac_try) 2>&5
15398  ac_status=$?
15399  echo "$as_me:15399: \$? = $ac_status" >&5
15400  (exit "$ac_status"); }; }; then
15401  cf_cv_havetype_speed_t=yes
15402else
15403  echo "$as_me: failed program was:" >&5
15404cat "conftest.$ac_ext" >&5
15405cf_cv_havetype_speed_t=no
15406fi
15407rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15408
15409fi
15410echo "$as_me:15410: result: $cf_cv_havetype_speed_t" >&5
15411echo "${ECHO_T}$cf_cv_havetype_speed_t" >&6
15412test "$cf_cv_havetype_speed_t" = no &&
15413cat >>confdefs.h <<\EOF
15414#define speed_t unsigned short
15415EOF
15416
15417echo "$as_me:15417: checking for termios type cc_t" >&5
15418echo $ECHO_N "checking for termios type cc_t... $ECHO_C" >&6
15419if test "${cf_cv_havetype_cc_t+set}" = set; then
15420  echo $ECHO_N "(cached) $ECHO_C" >&6
15421else
15422
15423	cat >"conftest.$ac_ext" <<_ACEOF
15424#line 15424 "configure"
15425#include "confdefs.h"
15426#include <termios.h>
15427int
15428main (void)
15429{
15430
15431		cc_t x = 0; (void)x
15432  ;
15433  return 0;
15434}
15435_ACEOF
15436rm -f "conftest.$ac_objext"
15437if { (eval echo "$as_me:15437: \"$ac_compile\"") >&5
15438  (eval $ac_compile) 2>&5
15439  ac_status=$?
15440  echo "$as_me:15440: \$? = $ac_status" >&5
15441  (exit "$ac_status"); } &&
15442         { ac_try='test -s "conftest.$ac_objext"'
15443  { (eval echo "$as_me:15443: \"$ac_try\"") >&5
15444  (eval $ac_try) 2>&5
15445  ac_status=$?
15446  echo "$as_me:15446: \$? = $ac_status" >&5
15447  (exit "$ac_status"); }; }; then
15448  cf_cv_havetype_cc_t=yes
15449else
15450  echo "$as_me: failed program was:" >&5
15451cat "conftest.$ac_ext" >&5
15452cf_cv_havetype_cc_t=no
15453fi
15454rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15455
15456fi
15457echo "$as_me:15457: result: $cf_cv_havetype_cc_t" >&5
15458echo "${ECHO_T}$cf_cv_havetype_cc_t" >&6
15459test "$cf_cv_havetype_cc_t" = no &&
15460cat >>confdefs.h <<\EOF
15461#define cc_t unsigned char
15462EOF
15463
15464# The Xcursor library is normally (weakly) linked via the X11 library rather
15465# than directly to applications.  xterm can select a cursor theme; users can
15466# also use environment variables to select cursor size.  We would only notice
15467# the library if there are development files for it.  Provide a way to disable
15468# the feature if it is unwanted.
15469echo "$as_me:15469: checking if we expect to use the Xcursor library" >&5
15470echo $ECHO_N "checking if we expect to use the Xcursor library... $ECHO_C" >&6
15471
15472# Check whether --enable-xcursor or --disable-xcursor was given.
15473if test "${enable_xcursor+set}" = set; then
15474  enableval="$enable_xcursor"
15475  test "$enableval" != no && enableval=yes
15476	if test "$enableval" != "yes" ; then
15477    enable_xcursor=no
15478	else
15479		enable_xcursor=yes
15480	fi
15481else
15482  enableval=yes
15483	enable_xcursor=yes
15484
15485fi;
15486echo "$as_me:15486: result: $enable_xcursor" >&5
15487echo "${ECHO_T}$enable_xcursor" >&6
15488if test "$enable_xcursor" = yes; then
15489
15490cat >>confdefs.h <<\EOF
15491#define HAVE_LIB_XCURSOR 1
15492EOF
15493
15494fi
15495
15496LIBS="$LIBS $X_EXTRA_LIBS"
15497
15498for ac_header in \
15499stropts.h \
15500
15501do
15502as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15503echo "$as_me:15503: checking for $ac_header" >&5
15504echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15505if eval "test \"\${$as_ac_Header+set}\" = set"; then
15506  echo $ECHO_N "(cached) $ECHO_C" >&6
15507else
15508  cat >"conftest.$ac_ext" <<_ACEOF
15509#line 15509 "configure"
15510#include "confdefs.h"
15511#include <$ac_header>
15512_ACEOF
15513if { (eval echo "$as_me:15513: \"$ac_cpp "conftest.$ac_ext"\"") >&5
15514  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
15515  ac_status=$?
15516  $EGREP -v '^ *\+' conftest.er1 >conftest.err
15517  rm -f conftest.er1
15518  cat conftest.err >&5
15519  echo "$as_me:15519: \$? = $ac_status" >&5
15520  (exit "$ac_status"); } >/dev/null; then
15521  if test -s conftest.err; then
15522    ac_cpp_err=$ac_c_preproc_warn_flag
15523  else
15524    ac_cpp_err=
15525  fi
15526else
15527  ac_cpp_err=yes
15528fi
15529if test -z "$ac_cpp_err"; then
15530  eval "$as_ac_Header=yes"
15531else
15532  echo "$as_me: failed program was:" >&5
15533  cat "conftest.$ac_ext" >&5
15534  eval "$as_ac_Header=no"
15535fi
15536rm -f conftest.err "conftest.$ac_ext"
15537fi
15538echo "$as_me:15538: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
15539echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
15540if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
15541  cat >>confdefs.h <<EOF
15542#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15543EOF
15544
15545fi
15546done
15547
15548cf_func_grantpt="grantpt ptsname"
15549cf_prefer_openpt=no
15550case $host_os in
15551(darwin[0-9].*)
15552	;;
15553(openbsd[0-9].*)
15554	# The POSIX entrypoints exist, but have never worked.
15555	;;
15556(linux*)
15557	cf_func_grantpt="$cf_func_grantpt posix_openpt"
15558	cf_prefer_openpt=yes
15559	;;
15560(*)
15561	cf_func_grantpt="$cf_func_grantpt posix_openpt"
15562	;;
15563esac
15564
15565for ac_func in $cf_func_grantpt
15566do
15567as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15568echo "$as_me:15568: checking for $ac_func" >&5
15569echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15570if eval "test \"\${$as_ac_var+set}\" = set"; then
15571  echo $ECHO_N "(cached) $ECHO_C" >&6
15572else
15573  cat >"conftest.$ac_ext" <<_ACEOF
15574#line 15574 "configure"
15575#include "confdefs.h"
15576#define $ac_func autoconf_temporary
15577#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
15578#undef $ac_func
15579
15580#ifdef __cplusplus
15581extern "C"
15582#endif
15583
15584/* We use char because int might match the return type of a gcc2
15585   builtin and then its argument prototype would still apply.  */
15586char $ac_func (void);
15587
15588int
15589main (void)
15590{
15591
15592/* The GNU C library defines stubs for functions which it implements
15593    to always fail with ENOSYS.  Some functions are actually named
15594    something starting with __ and the normal name is an alias.  */
15595#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15596#error found stub for $ac_func
15597#endif
15598
15599	return $ac_func ();
15600  ;
15601  return 0;
15602}
15603_ACEOF
15604rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15605if { (eval echo "$as_me:15605: \"$ac_link\"") >&5
15606  (eval $ac_link) 2>&5
15607  ac_status=$?
15608  echo "$as_me:15608: \$? = $ac_status" >&5
15609  (exit "$ac_status"); } &&
15610         { ac_try='test -s "conftest$ac_exeext"'
15611  { (eval echo "$as_me:15611: \"$ac_try\"") >&5
15612  (eval $ac_try) 2>&5
15613  ac_status=$?
15614  echo "$as_me:15614: \$? = $ac_status" >&5
15615  (exit "$ac_status"); }; }; then
15616  eval "$as_ac_var=yes"
15617else
15618  echo "$as_me: failed program was:" >&5
15619cat "conftest.$ac_ext" >&5
15620eval "$as_ac_var=no"
15621fi
15622rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15623fi
15624echo "$as_me:15624: result: `eval echo '${'"$as_ac_var"'}'`" >&5
15625echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
15626if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
15627  cat >>confdefs.h <<EOF
15628#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15629EOF
15630
15631fi
15632done
15633
15634cf_grantpt_opts=
15635if test "x$ac_cv_func_grantpt" = "xyes" ; then
15636	echo "$as_me:15636: checking if grantpt really works" >&5
15637echo $ECHO_N "checking if grantpt really works... $ECHO_C" >&6
15638	cat >"conftest.$ac_ext" <<_ACEOF
15639#line 15639 "configure"
15640#include "confdefs.h"
15641
15642#include <stdlib.h>
15643#include <stdio.h>
15644#include <termios.h>
15645#include <unistd.h>
15646#include <signal.h>
15647#include <fcntl.h>
15648#include <errno.h>
15649
15650#ifndef HAVE_POSIX_OPENPT
15651#undef posix_openpt
15652#define posix_openpt(mode) open("/dev/ptmx", mode)
15653#endif
15654
15655#ifdef HAVE_STROPTS_H
15656#include <stropts.h>
15657#endif
15658
15659static void failed(int code)
15660{
15661	perror("conftest");
15662	exit(code);
15663}
15664
15665static void my_timeout(int sig)
15666{
15667	(void)sig;
15668	exit(99);
15669}
15670
15671int
15672main (void)
15673{
15674
15675	int code = 0;
15676	int rc;
15677	int pty;
15678	int tty;
15679	char *slave;
15680	struct termios tio;
15681
15682	(void)tio;
15683	signal(SIGALRM, my_timeout);
15684
15685	if (alarm(2) == 9)
15686		failed(9);
15687	else if ((pty = posix_openpt(O_RDWR)) < 0)
15688		failed(1);
15689	else if ((rc = grantpt(pty)) < 0)
15690		failed(2);
15691	else if ((rc = unlockpt(pty)) < 0)
15692		failed(3);
15693	else if ((slave = ptsname(pty)) == 0)
15694		failed(4);
15695#if (CONFTEST == 3) || defined(CONFTEST_isatty)
15696	else if (!isatty(pty))
15697		failed(4);
15698#endif
15699#if CONFTEST >= 4
15700    else if ((rc = tcgetattr(pty, &tio)) < 0)
15701		failed(20);
15702    else if ((rc = tcsetattr(pty, TCSAFLUSH, &tio)) < 0)
15703		failed(21);
15704#endif
15705	/* BSD posix_openpt does not treat pty as a terminal until slave is opened.
15706	 * Linux does treat it that way.
15707	 */
15708	else if ((tty = open(slave, O_RDWR)) < 0)
15709		failed(5);
15710#ifdef CONFTEST
15711#ifdef I_PUSH
15712#if (CONFTEST == 0) || defined(CONFTEST_ptem)
15713    else if ((rc = ioctl(tty, I_PUSH, "ptem")) < 0)
15714		failed(10);
15715#endif
15716#if (CONFTEST == 1) || defined(CONFTEST_ldterm)
15717    else if ((rc = ioctl(tty, I_PUSH, "ldterm")) < 0)
15718		failed(11);
15719#endif
15720#if (CONFTEST == 2) || defined(CONFTEST_ttcompat)
15721    else if ((rc = ioctl(tty, I_PUSH, "ttcompat")) < 0)
15722		failed(12);
15723#endif
15724#endif /* I_PUSH */
15725#if CONFTEST >= 5
15726    else if ((rc = tcgetattr(tty, &tio)) < 0)
15727		failed(30);
15728    else if ((rc = tcsetattr(tty, TCSAFLUSH, &tio)) < 0)
15729		failed(31);
15730#endif
15731#endif /* CONFTEST */
15732
15733	${cf_cv_main_return:-return}(code);
15734
15735  ;
15736  return 0;
15737}
15738_ACEOF
15739rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15740if { (eval echo "$as_me:15740: \"$ac_link\"") >&5
15741  (eval $ac_link) 2>&5
15742  ac_status=$?
15743  echo "$as_me:15743: \$? = $ac_status" >&5
15744  (exit "$ac_status"); } &&
15745         { ac_try='test -s "conftest$ac_exeext"'
15746  { (eval echo "$as_me:15746: \"$ac_try\"") >&5
15747  (eval $ac_try) 2>&5
15748  ac_status=$?
15749  echo "$as_me:15749: \$? = $ac_status" >&5
15750  (exit "$ac_status"); }; }; then
15751
15752	if test "$cross_compiling" = yes; then
15753  ac_cv_func_grantpt=maybe
15754else
15755  cat >"conftest.$ac_ext" <<_ACEOF
15756#line 15756 "configure"
15757#include "confdefs.h"
15758
15759#include <stdlib.h>
15760#include <stdio.h>
15761#include <termios.h>
15762#include <unistd.h>
15763#include <signal.h>
15764#include <fcntl.h>
15765#include <errno.h>
15766
15767#ifndef HAVE_POSIX_OPENPT
15768#undef posix_openpt
15769#define posix_openpt(mode) open("/dev/ptmx", mode)
15770#endif
15771
15772#ifdef HAVE_STROPTS_H
15773#include <stropts.h>
15774#endif
15775
15776static void failed(int code)
15777{
15778	perror("conftest");
15779	exit(code);
15780}
15781
15782static void my_timeout(int sig)
15783{
15784	(void)sig;
15785	exit(99);
15786}
15787
15788int main(void)
15789{
15790
15791	int code = 0;
15792	int rc;
15793	int pty;
15794	int tty;
15795	char *slave;
15796	struct termios tio;
15797
15798	(void)tio;
15799	signal(SIGALRM, my_timeout);
15800
15801	if (alarm(2) == 9)
15802		failed(9);
15803	else if ((pty = posix_openpt(O_RDWR)) < 0)
15804		failed(1);
15805	else if ((rc = grantpt(pty)) < 0)
15806		failed(2);
15807	else if ((rc = unlockpt(pty)) < 0)
15808		failed(3);
15809	else if ((slave = ptsname(pty)) == 0)
15810		failed(4);
15811#if (CONFTEST == 3) || defined(CONFTEST_isatty)
15812	else if (!isatty(pty))
15813		failed(4);
15814#endif
15815#if CONFTEST >= 4
15816    else if ((rc = tcgetattr(pty, &tio)) < 0)
15817		failed(20);
15818    else if ((rc = tcsetattr(pty, TCSAFLUSH, &tio)) < 0)
15819		failed(21);
15820#endif
15821	/* BSD posix_openpt does not treat pty as a terminal until slave is opened.
15822	 * Linux does treat it that way.
15823	 */
15824	else if ((tty = open(slave, O_RDWR)) < 0)
15825		failed(5);
15826#ifdef CONFTEST
15827#ifdef I_PUSH
15828#if (CONFTEST == 0) || defined(CONFTEST_ptem)
15829    else if ((rc = ioctl(tty, I_PUSH, "ptem")) < 0)
15830		failed(10);
15831#endif
15832#if (CONFTEST == 1) || defined(CONFTEST_ldterm)
15833    else if ((rc = ioctl(tty, I_PUSH, "ldterm")) < 0)
15834		failed(11);
15835#endif
15836#if (CONFTEST == 2) || defined(CONFTEST_ttcompat)
15837    else if ((rc = ioctl(tty, I_PUSH, "ttcompat")) < 0)
15838		failed(12);
15839#endif
15840#endif /* I_PUSH */
15841#if CONFTEST >= 5
15842    else if ((rc = tcgetattr(tty, &tio)) < 0)
15843		failed(30);
15844    else if ((rc = tcsetattr(tty, TCSAFLUSH, &tio)) < 0)
15845		failed(31);
15846#endif
15847#endif /* CONFTEST */
15848
15849	${cf_cv_main_return:-return}(code);
15850
15851}
15852
15853_ACEOF
15854rm -f "conftest$ac_exeext"
15855if { (eval echo "$as_me:15855: \"$ac_link\"") >&5
15856  (eval $ac_link) 2>&5
15857  ac_status=$?
15858  echo "$as_me:15858: \$? = $ac_status" >&5
15859  (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
15860  { (eval echo "$as_me:15860: \"$ac_try\"") >&5
15861  (eval $ac_try) 2>&5
15862  ac_status=$?
15863  echo "$as_me:15863: \$? = $ac_status" >&5
15864  (exit "$ac_status"); }; }; then
15865  :
15866else
15867  echo "$as_me: program exited with status $ac_status" >&5
15868echo "$as_me: failed program was:" >&5
15869cat "conftest.$ac_ext" >&5
15870ac_cv_func_grantpt=no
15871
15872fi
15873rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
15874fi
15875
15876else
15877  echo "$as_me: failed program was:" >&5
15878cat "conftest.$ac_ext" >&5
15879ac_cv_func_grantpt=no
15880fi
15881rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15882	echo "$as_me:15882: result: $ac_cv_func_grantpt" >&5
15883echo "${ECHO_T}$ac_cv_func_grantpt" >&6
15884
15885	if test "x$ac_cv_func_grantpt" != "xno" ; then
15886
15887		if test "x$ac_cv_func_grantpt" = "xyes" ; then
15888			echo "$as_me:15888: checking for pty features" >&5
15889echo $ECHO_N "checking for pty features... $ECHO_C" >&6
15890			if test "x$ac_cv_header_stropts_h" = xyes
15891			then
15892				cf_pty_this=0
15893			else
15894				cf_pty_this=3
15895			fi
15896
15897			cf_pty_defines=
15898			while test $cf_pty_this != 6
15899			do
15900
15901				cf_pty_feature=
15902				cf_pty_next="`expr $cf_pty_this + 1`"
15903
15904echo "${as_me:-configure}:15904: testing pty feature test $cf_pty_next:5 ..." 1>&5
15905
15906				if test "$cross_compiling" = yes; then
15907  { { echo "$as_me:15907: error: cannot run test program while cross compiling" >&5
15908echo "$as_me: error: cannot run test program while cross compiling" >&2;}
15909   { (exit 1); exit 1; }; }
15910else
15911  cat >"conftest.$ac_ext" <<_ACEOF
15912#line 15912 "configure"
15913#include "confdefs.h"
15914#define CONFTEST $cf_pty_this
15915$cf_pty_defines
15916
15917#include <stdlib.h>
15918#include <stdio.h>
15919#include <termios.h>
15920#include <unistd.h>
15921#include <signal.h>
15922#include <fcntl.h>
15923#include <errno.h>
15924
15925#ifndef HAVE_POSIX_OPENPT
15926#undef posix_openpt
15927#define posix_openpt(mode) open("/dev/ptmx", mode)
15928#endif
15929
15930#ifdef HAVE_STROPTS_H
15931#include <stropts.h>
15932#endif
15933
15934static void failed(int code)
15935{
15936	perror("conftest");
15937	exit(code);
15938}
15939
15940static void my_timeout(int sig)
15941{
15942	(void)sig;
15943	exit(99);
15944}
15945
15946int main(void)
15947{
15948
15949	int code = 0;
15950	int rc;
15951	int pty;
15952	int tty;
15953	char *slave;
15954	struct termios tio;
15955
15956	(void)tio;
15957	signal(SIGALRM, my_timeout);
15958
15959	if (alarm(2) == 9)
15960		failed(9);
15961	else if ((pty = posix_openpt(O_RDWR)) < 0)
15962		failed(1);
15963	else if ((rc = grantpt(pty)) < 0)
15964		failed(2);
15965	else if ((rc = unlockpt(pty)) < 0)
15966		failed(3);
15967	else if ((slave = ptsname(pty)) == 0)
15968		failed(4);
15969#if (CONFTEST == 3) || defined(CONFTEST_isatty)
15970	else if (!isatty(pty))
15971		failed(4);
15972#endif
15973#if CONFTEST >= 4
15974    else if ((rc = tcgetattr(pty, &tio)) < 0)
15975		failed(20);
15976    else if ((rc = tcsetattr(pty, TCSAFLUSH, &tio)) < 0)
15977		failed(21);
15978#endif
15979	/* BSD posix_openpt does not treat pty as a terminal until slave is opened.
15980	 * Linux does treat it that way.
15981	 */
15982	else if ((tty = open(slave, O_RDWR)) < 0)
15983		failed(5);
15984#ifdef CONFTEST
15985#ifdef I_PUSH
15986#if (CONFTEST == 0) || defined(CONFTEST_ptem)
15987    else if ((rc = ioctl(tty, I_PUSH, "ptem")) < 0)
15988		failed(10);
15989#endif
15990#if (CONFTEST == 1) || defined(CONFTEST_ldterm)
15991    else if ((rc = ioctl(tty, I_PUSH, "ldterm")) < 0)
15992		failed(11);
15993#endif
15994#if (CONFTEST == 2) || defined(CONFTEST_ttcompat)
15995    else if ((rc = ioctl(tty, I_PUSH, "ttcompat")) < 0)
15996		failed(12);
15997#endif
15998#endif /* I_PUSH */
15999#if CONFTEST >= 5
16000    else if ((rc = tcgetattr(tty, &tio)) < 0)
16001		failed(30);
16002    else if ((rc = tcsetattr(tty, TCSAFLUSH, &tio)) < 0)
16003		failed(31);
16004#endif
16005#endif /* CONFTEST */
16006
16007	${cf_cv_main_return:-return}(code);
16008
16009}
16010
16011_ACEOF
16012rm -f "conftest$ac_exeext"
16013if { (eval echo "$as_me:16013: \"$ac_link\"") >&5
16014  (eval $ac_link) 2>&5
16015  ac_status=$?
16016  echo "$as_me:16016: \$? = $ac_status" >&5
16017  (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
16018  { (eval echo "$as_me:16018: \"$ac_try\"") >&5
16019  (eval $ac_try) 2>&5
16020  ac_status=$?
16021  echo "$as_me:16021: \$? = $ac_status" >&5
16022  (exit "$ac_status"); }; }; then
16023
16024				case $cf_pty_next in
16025				(1) # - streams
16026					cf_pty_feature=ptem
16027					;;
16028				(2) # - streams
16029					cf_pty_feature=ldterm
16030					;;
16031				(3) # - streams
16032					cf_pty_feature=ttcompat
16033					;;
16034				(4)
16035					cf_pty_feature=pty_isatty
16036					;;
16037				(5)
16038					cf_pty_feature=pty_tcsetattr
16039					;;
16040				(6)
16041					cf_pty_feature=tty_tcsetattr
16042					;;
16043				esac
16044
16045else
16046  echo "$as_me: program exited with status $ac_status" >&5
16047echo "$as_me: failed program was:" >&5
16048cat "conftest.$ac_ext" >&5
16049
16050				case $cf_pty_next in
16051				(1|2|3)
16052
16053echo "${as_me:-configure}:16053: testing skipping remaining streams features $cf_pty_this..2 ..." 1>&5
16054
16055					cf_pty_next=3
16056					;;
16057				esac
16058
16059fi
16060rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
16061fi
16062				if test -n "$cf_pty_feature"
16063				then
16064					cf_pty_defines="$cf_pty_defines
16065#define CONFTEST_$cf_pty_feature 1
16066"
16067					cf_grantpt_opts="$cf_grantpt_opts $cf_pty_feature"
16068				fi
16069
16070				cf_pty_this=$cf_pty_next
16071			done
16072			echo "$as_me:16072: result: $cf_grantpt_opts" >&5
16073echo "${ECHO_T}$cf_grantpt_opts" >&6
16074			cf_grantpt_opts=`echo "$cf_grantpt_opts" | sed -e 's/ isatty//'`
16075		fi
16076	fi
16077fi
16078
16079if test "x$cf_prefer_posix_openpt" = "xyes" && test "x$ac_cv_func_posix_openpt" = "xyes" ; then
16080	test -n "$verbose" && echo "	prefer posix_openpt over openpty" 1>&6
16081
16082echo "${as_me:-configure}:16082: testing prefer posix_openpt over openpty ..." 1>&5
16083
16084elif test "x$disable_openpty" != "xyes" || test -z "$cf_grantpt_opts" ; then
16085	echo "$as_me:16085: checking for openpty in -lutil" >&5
16086echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
16087if test "${ac_cv_lib_util_openpty+set}" = set; then
16088  echo $ECHO_N "(cached) $ECHO_C" >&6
16089else
16090  ac_check_lib_save_LIBS=$LIBS
16091LIBS="-lutil  $LIBS"
16092cat >"conftest.$ac_ext" <<_ACEOF
16093#line 16093 "configure"
16094#include "confdefs.h"
16095
16096/* Override any gcc2 internal prototype to avoid an error.  */
16097#ifdef __cplusplus
16098extern "C"
16099#endif
16100/* We use char because int might match the return type of a gcc2
16101   builtin and then its argument prototype would still apply.  */
16102char openpty ();
16103int
16104main (void)
16105{
16106openpty ();
16107  ;
16108  return 0;
16109}
16110_ACEOF
16111rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16112if { (eval echo "$as_me:16112: \"$ac_link\"") >&5
16113  (eval $ac_link) 2>&5
16114  ac_status=$?
16115  echo "$as_me:16115: \$? = $ac_status" >&5
16116  (exit "$ac_status"); } &&
16117         { ac_try='test -s "conftest$ac_exeext"'
16118  { (eval echo "$as_me:16118: \"$ac_try\"") >&5
16119  (eval $ac_try) 2>&5
16120  ac_status=$?
16121  echo "$as_me:16121: \$? = $ac_status" >&5
16122  (exit "$ac_status"); }; }; then
16123  ac_cv_lib_util_openpty=yes
16124else
16125  echo "$as_me: failed program was:" >&5
16126cat "conftest.$ac_ext" >&5
16127ac_cv_lib_util_openpty=no
16128fi
16129rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16130LIBS=$ac_check_lib_save_LIBS
16131fi
16132echo "$as_me:16132: result: $ac_cv_lib_util_openpty" >&5
16133echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
16134if test "$ac_cv_lib_util_openpty" = yes; then
16135  cf_have_openpty=yes
16136else
16137  cf_have_openpty=no
16138fi
16139
16140	if test "$cf_have_openpty" = yes ; then
16141		ac_cv_func_grantpt=no
16142		LIBS="-lutil $LIBS"
16143
16144cat >>confdefs.h <<\EOF
16145#define HAVE_OPENPTY 1
16146EOF
16147
16148for ac_header in \
16149			util.h \
16150			libutil.h \
16151			pty.h \
16152
16153do
16154as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16155echo "$as_me:16155: checking for $ac_header" >&5
16156echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16157if eval "test \"\${$as_ac_Header+set}\" = set"; then
16158  echo $ECHO_N "(cached) $ECHO_C" >&6
16159else
16160  cat >"conftest.$ac_ext" <<_ACEOF
16161#line 16161 "configure"
16162#include "confdefs.h"
16163#include <$ac_header>
16164_ACEOF
16165if { (eval echo "$as_me:16165: \"$ac_cpp "conftest.$ac_ext"\"") >&5
16166  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
16167  ac_status=$?
16168  $EGREP -v '^ *\+' conftest.er1 >conftest.err
16169  rm -f conftest.er1
16170  cat conftest.err >&5
16171  echo "$as_me:16171: \$? = $ac_status" >&5
16172  (exit "$ac_status"); } >/dev/null; then
16173  if test -s conftest.err; then
16174    ac_cpp_err=$ac_c_preproc_warn_flag
16175  else
16176    ac_cpp_err=
16177  fi
16178else
16179  ac_cpp_err=yes
16180fi
16181if test -z "$ac_cpp_err"; then
16182  eval "$as_ac_Header=yes"
16183else
16184  echo "$as_me: failed program was:" >&5
16185  cat "conftest.$ac_ext" >&5
16186  eval "$as_ac_Header=no"
16187fi
16188rm -f conftest.err "conftest.$ac_ext"
16189fi
16190echo "$as_me:16190: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
16191echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
16192if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
16193  cat >>confdefs.h <<EOF
16194#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16195EOF
16196
16197fi
16198done
16199
16200	fi
16201fi
16202
16203if test "x$ac_cv_func_grantpt" != xno
16204then
16205	test -n "$verbose" && echo "	will rely upon grantpt" 1>&6
16206
16207echo "${as_me:-configure}:16207: testing will rely upon grantpt ..." 1>&5
16208
16209cat >>confdefs.h <<\EOF
16210#define HAVE_WORKING_GRANTPT 1
16211EOF
16212
16213	for cf_feature in $cf_grantpt_opts
16214	do
16215		cf_feature=`echo "$cf_feature" | sed -e 's/ //g'`
16216
16217cf_FEATURE=`echo "$cf_feature" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16218
16219		cat >>confdefs.h <<EOF
16220#define HAVE_GRANTPT_$cf_FEATURE 1
16221EOF
16222
16223	done
16224elif test "x$cf_have_openpty" = xno
16225then
16226	test -n "$verbose" && echo "	will rely upon BSD-pseudoterminals" 1>&6
16227
16228echo "${as_me:-configure}:16228: testing will rely upon BSD-pseudoterminals ..." 1>&5
16229
16230else
16231	test -n "$verbose" && echo "	will rely upon openpty" 1>&6
16232
16233echo "${as_me:-configure}:16233: testing will rely upon openpty ..." 1>&5
16234
16235fi
16236
16237echo "$as_me:16237: checking if we can use XkbQueryExtension" >&5
16238echo $ECHO_N "checking if we can use XkbQueryExtension... $ECHO_C" >&6
16239if test "${cf_cv_xkb_query_extension+set}" = set; then
16240  echo $ECHO_N "(cached) $ECHO_C" >&6
16241else
16242
16243cat >"conftest.$ac_ext" <<_ACEOF
16244#line 16244 "configure"
16245#include "confdefs.h"
16246
16247#include <X11/Xlib.h>
16248#include <X11/extensions/XKB.h>
16249#include <X11/XKBlib.h>
16250
16251int
16252main (void)
16253{
16254
16255	int xkbmajor = XkbMajorVersion;
16256	int xkbminor = XkbMinorVersion;
16257	int xkbopcode, xkbevent, xkberror;
16258
16259	if (XkbLibraryVersion(&xkbmajor, &xkbminor)
16260	    && XkbQueryExtension((Display *)0,
16261				 &xkbopcode,
16262				 &xkbevent,
16263				 &xkberror,
16264				 &xkbmajor,
16265				 &xkbminor))
16266		 return 0;
16267
16268  ;
16269  return 0;
16270}
16271_ACEOF
16272rm -f "conftest.$ac_objext"
16273if { (eval echo "$as_me:16273: \"$ac_compile\"") >&5
16274  (eval $ac_compile) 2>&5
16275  ac_status=$?
16276  echo "$as_me:16276: \$? = $ac_status" >&5
16277  (exit "$ac_status"); } &&
16278         { ac_try='test -s "conftest.$ac_objext"'
16279  { (eval echo "$as_me:16279: \"$ac_try\"") >&5
16280  (eval $ac_try) 2>&5
16281  ac_status=$?
16282  echo "$as_me:16282: \$? = $ac_status" >&5
16283  (exit "$ac_status"); }; }; then
16284
16285cf_cv_xkb_query_extension=yes
16286
16287else
16288  echo "$as_me: failed program was:" >&5
16289cat "conftest.$ac_ext" >&5
16290
16291cf_cv_xkb_query_extension=no
16292
16293fi
16294rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16295
16296fi
16297echo "$as_me:16297: result: $cf_cv_xkb_query_extension" >&5
16298echo "${ECHO_T}$cf_cv_xkb_query_extension" >&6
16299
16300if test $cf_cv_xkb_query_extension = yes
16301then
16302
16303for ac_func in XkbQueryExtension
16304do
16305as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16306echo "$as_me:16306: checking for $ac_func" >&5
16307echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16308if eval "test \"\${$as_ac_var+set}\" = set"; then
16309  echo $ECHO_N "(cached) $ECHO_C" >&6
16310else
16311  cat >"conftest.$ac_ext" <<_ACEOF
16312#line 16312 "configure"
16313#include "confdefs.h"
16314#define $ac_func autoconf_temporary
16315#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
16316#undef $ac_func
16317
16318#ifdef __cplusplus
16319extern "C"
16320#endif
16321
16322/* We use char because int might match the return type of a gcc2
16323   builtin and then its argument prototype would still apply.  */
16324char $ac_func (void);
16325
16326int
16327main (void)
16328{
16329
16330/* The GNU C library defines stubs for functions which it implements
16331    to always fail with ENOSYS.  Some functions are actually named
16332    something starting with __ and the normal name is an alias.  */
16333#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16334#error found stub for $ac_func
16335#endif
16336
16337	return $ac_func ();
16338  ;
16339  return 0;
16340}
16341_ACEOF
16342rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16343if { (eval echo "$as_me:16343: \"$ac_link\"") >&5
16344  (eval $ac_link) 2>&5
16345  ac_status=$?
16346  echo "$as_me:16346: \$? = $ac_status" >&5
16347  (exit "$ac_status"); } &&
16348         { ac_try='test -s "conftest$ac_exeext"'
16349  { (eval echo "$as_me:16349: \"$ac_try\"") >&5
16350  (eval $ac_try) 2>&5
16351  ac_status=$?
16352  echo "$as_me:16352: \$? = $ac_status" >&5
16353  (exit "$ac_status"); }; }; then
16354  eval "$as_ac_var=yes"
16355else
16356  echo "$as_me: failed program was:" >&5
16357cat "conftest.$ac_ext" >&5
16358eval "$as_ac_var=no"
16359fi
16360rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16361fi
16362echo "$as_me:16362: result: `eval echo '${'"$as_ac_var"'}'`" >&5
16363echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
16364if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
16365  cat >>confdefs.h <<EOF
16366#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16367EOF
16368
16369fi
16370done
16371
16372fi
16373
16374echo "$as_me:16374: checking if we can use XkbKeycodeToKeysym" >&5
16375echo $ECHO_N "checking if we can use XkbKeycodeToKeysym... $ECHO_C" >&6
16376if test "${cf_cv_xkb_keycode_to_keysym+set}" = set; then
16377  echo $ECHO_N "(cached) $ECHO_C" >&6
16378else
16379
16380cat >"conftest.$ac_ext" <<_ACEOF
16381#line 16381 "configure"
16382#include "confdefs.h"
16383
16384#include <X11/Xlib.h>
16385#include <X11/XKBlib.h>
16386
16387int
16388main (void)
16389{
16390
16391    KeySym keysym = XkbKeycodeToKeysym((Display *)0, 0, 0, 0);
16392	(void)keysym;
16393
16394  ;
16395  return 0;
16396}
16397_ACEOF
16398rm -f "conftest.$ac_objext"
16399if { (eval echo "$as_me:16399: \"$ac_compile\"") >&5
16400  (eval $ac_compile) 2>&5
16401  ac_status=$?
16402  echo "$as_me:16402: \$? = $ac_status" >&5
16403  (exit "$ac_status"); } &&
16404         { ac_try='test -s "conftest.$ac_objext"'
16405  { (eval echo "$as_me:16405: \"$ac_try\"") >&5
16406  (eval $ac_try) 2>&5
16407  ac_status=$?
16408  echo "$as_me:16408: \$? = $ac_status" >&5
16409  (exit "$ac_status"); }; }; then
16410
16411cf_cv_xkb_keycode_to_keysym=yes
16412
16413else
16414  echo "$as_me: failed program was:" >&5
16415cat "conftest.$ac_ext" >&5
16416
16417cf_cv_xkb_keycode_to_keysym=no
16418
16419fi
16420rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16421
16422fi
16423echo "$as_me:16423: result: $cf_cv_xkb_keycode_to_keysym" >&5
16424echo "${ECHO_T}$cf_cv_xkb_keycode_to_keysym" >&6
16425
16426if test $cf_cv_xkb_keycode_to_keysym = yes
16427then
16428
16429for ac_func in XkbKeycodeToKeysym
16430do
16431as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16432echo "$as_me:16432: checking for $ac_func" >&5
16433echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16434if eval "test \"\${$as_ac_var+set}\" = set"; then
16435  echo $ECHO_N "(cached) $ECHO_C" >&6
16436else
16437  cat >"conftest.$ac_ext" <<_ACEOF
16438#line 16438 "configure"
16439#include "confdefs.h"
16440#define $ac_func autoconf_temporary
16441#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
16442#undef $ac_func
16443
16444#ifdef __cplusplus
16445extern "C"
16446#endif
16447
16448/* We use char because int might match the return type of a gcc2
16449   builtin and then its argument prototype would still apply.  */
16450char $ac_func (void);
16451
16452int
16453main (void)
16454{
16455
16456/* The GNU C library defines stubs for functions which it implements
16457    to always fail with ENOSYS.  Some functions are actually named
16458    something starting with __ and the normal name is an alias.  */
16459#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16460#error found stub for $ac_func
16461#endif
16462
16463	return $ac_func ();
16464  ;
16465  return 0;
16466}
16467_ACEOF
16468rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16469if { (eval echo "$as_me:16469: \"$ac_link\"") >&5
16470  (eval $ac_link) 2>&5
16471  ac_status=$?
16472  echo "$as_me:16472: \$? = $ac_status" >&5
16473  (exit "$ac_status"); } &&
16474         { ac_try='test -s "conftest$ac_exeext"'
16475  { (eval echo "$as_me:16475: \"$ac_try\"") >&5
16476  (eval $ac_try) 2>&5
16477  ac_status=$?
16478  echo "$as_me:16478: \$? = $ac_status" >&5
16479  (exit "$ac_status"); }; }; then
16480  eval "$as_ac_var=yes"
16481else
16482  echo "$as_me: failed program was:" >&5
16483cat "conftest.$ac_ext" >&5
16484eval "$as_ac_var=no"
16485fi
16486rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16487fi
16488echo "$as_me:16488: result: `eval echo '${'"$as_ac_var"'}'`" >&5
16489echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
16490if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
16491  cat >>confdefs.h <<EOF
16492#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16493EOF
16494
16495fi
16496done
16497
16498fi
16499
16500cf_save_LIBS_CF_XKB_BELL_EXT="$LIBS"
16501cf_save_CFLAGS_CF_XKB_BELL_EXT="$CFLAGS"
16502cf_save_CPPFLAGS_CF_XKB_BELL_EXT="$CPPFLAGS"
16503LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
16504for cf_X_CFLAGS in $X_CFLAGS
16505do
16506	case "x$cf_X_CFLAGS" in
16507	x-[IUD]*)
16508		CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
16509		;;
16510	*)
16511		CFLAGS="$CFLAGS $cf_X_CFLAGS"
16512		;;
16513	esac
16514done
16515
16516echo "$as_me:16516: checking for XKB Bell extension" >&5
16517echo $ECHO_N "checking for XKB Bell extension... $ECHO_C" >&6
16518if test "${cf_cv_xkb_bell_ext+set}" = set; then
16519  echo $ECHO_N "(cached) $ECHO_C" >&6
16520else
16521
16522cat >"conftest.$ac_ext" <<_ACEOF
16523#line 16523 "configure"
16524#include "confdefs.h"
16525
16526#include <X11/Intrinsic.h>
16527#include <X11/XKBlib.h>		/* has the prototype */
16528#include <X11/extensions/XKBbells.h>	/* has the XkbBI_xxx definitions */
16529
16530int
16531main (void)
16532{
16533
16534	int x = (XkbBI_Info |XkbBI_MinorError |XkbBI_MajorError |XkbBI_TerminalBell |XkbBI_MarginBell);
16535	Atom y = 0;
16536	(void)x;
16537	XkbBell((Display *)0, (Widget)0, 0, y);
16538
16539  ;
16540  return 0;
16541}
16542_ACEOF
16543rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16544if { (eval echo "$as_me:16544: \"$ac_link\"") >&5
16545  (eval $ac_link) 2>&5
16546  ac_status=$?
16547  echo "$as_me:16547: \$? = $ac_status" >&5
16548  (exit "$ac_status"); } &&
16549         { ac_try='test -s "conftest$ac_exeext"'
16550  { (eval echo "$as_me:16550: \"$ac_try\"") >&5
16551  (eval $ac_try) 2>&5
16552  ac_status=$?
16553  echo "$as_me:16553: \$? = $ac_status" >&5
16554  (exit "$ac_status"); }; }; then
16555  cf_cv_xkb_bell_ext=yes
16556else
16557  echo "$as_me: failed program was:" >&5
16558cat "conftest.$ac_ext" >&5
16559cf_cv_xkb_bell_ext=no
16560fi
16561rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16562
16563fi
16564echo "$as_me:16564: result: $cf_cv_xkb_bell_ext" >&5
16565echo "${ECHO_T}$cf_cv_xkb_bell_ext" >&6
16566test "$cf_cv_xkb_bell_ext" = yes &&
16567cat >>confdefs.h <<\EOF
16568#define HAVE_XKB_BELL_EXT 1
16569EOF
16570
16571LIBS="$cf_save_LIBS_CF_XKB_BELL_EXT"
16572CFLAGS="$cf_save_CFLAGS_CF_XKB_BELL_EXT"
16573CPPFLAGS="$cf_save_CPPFLAGS_CF_XKB_BELL_EXT"
16574
16575for ac_func in Xutf8LookupString
16576do
16577as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16578echo "$as_me:16578: checking for $ac_func" >&5
16579echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16580if eval "test \"\${$as_ac_var+set}\" = set"; then
16581  echo $ECHO_N "(cached) $ECHO_C" >&6
16582else
16583  cat >"conftest.$ac_ext" <<_ACEOF
16584#line 16584 "configure"
16585#include "confdefs.h"
16586#define $ac_func autoconf_temporary
16587#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
16588#undef $ac_func
16589
16590#ifdef __cplusplus
16591extern "C"
16592#endif
16593
16594/* We use char because int might match the return type of a gcc2
16595   builtin and then its argument prototype would still apply.  */
16596char $ac_func (void);
16597
16598int
16599main (void)
16600{
16601
16602/* The GNU C library defines stubs for functions which it implements
16603    to always fail with ENOSYS.  Some functions are actually named
16604    something starting with __ and the normal name is an alias.  */
16605#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16606#error found stub for $ac_func
16607#endif
16608
16609	return $ac_func ();
16610  ;
16611  return 0;
16612}
16613_ACEOF
16614rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16615if { (eval echo "$as_me:16615: \"$ac_link\"") >&5
16616  (eval $ac_link) 2>&5
16617  ac_status=$?
16618  echo "$as_me:16618: \$? = $ac_status" >&5
16619  (exit "$ac_status"); } &&
16620         { ac_try='test -s "conftest$ac_exeext"'
16621  { (eval echo "$as_me:16621: \"$ac_try\"") >&5
16622  (eval $ac_try) 2>&5
16623  ac_status=$?
16624  echo "$as_me:16624: \$? = $ac_status" >&5
16625  (exit "$ac_status"); }; }; then
16626  eval "$as_ac_var=yes"
16627else
16628  echo "$as_me: failed program was:" >&5
16629cat "conftest.$ac_ext" >&5
16630eval "$as_ac_var=no"
16631fi
16632rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16633fi
16634echo "$as_me:16634: result: `eval echo '${'"$as_ac_var"'}'`" >&5
16635echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
16636if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
16637  cat >>confdefs.h <<EOF
16638#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16639EOF
16640
16641else
16642
16643	EXTRAHDRS="$EXTRAHDRS xutf8.h"
16644	EXTRASRCS="$EXTRASRCS xutf8.c"
16645	EXTRAOBJS="$EXTRAOBJS xutf8.o"
16646
16647fi
16648done
16649
16650echo "$as_me:16650: checking if you want narrow prototypes for X libraries" >&5
16651echo $ECHO_N "checking if you want narrow prototypes for X libraries... $ECHO_C" >&6
16652
16653case `$ac_config_guess` in
16654(*freebsd*|*gnu*|*irix5*|*irix6*|*netbsd*|*openbsd*|*qnx*|*sco*|*sgi*)
16655	cf_default_narrowproto=yes
16656	;;
16657(*)
16658	cf_default_narrowproto=no
16659	;;
16660esac
16661
16662# Check whether --enable-narrowproto or --disable-narrowproto was given.
16663if test "${enable_narrowproto+set}" = set; then
16664  enableval="$enable_narrowproto"
16665  test "$enableval" != no && enableval=yes
16666	if test "$enableval" != "$cf_default_narrowproto" ; then
16667    enable_narrowproto=$enableval
16668	else
16669		enable_narrowproto=$cf_default_narrowproto
16670	fi
16671else
16672  enableval=$cf_default_narrowproto
16673	enable_narrowproto=$cf_default_narrowproto
16674
16675fi;
16676echo "$as_me:16676: result: $enable_narrowproto" >&5
16677echo "${ECHO_T}$enable_narrowproto" >&6
16678
16679echo "$as_me:16679: checking if we should use imake to help" >&5
16680echo $ECHO_N "checking if we should use imake to help... $ECHO_C" >&6
16681
16682# Check whether --enable-imake or --disable-imake was given.
16683if test "${enable_imake+set}" = set; then
16684  enableval="$enable_imake"
16685  test "$enableval" != no && enableval=yes
16686	if test "$enableval" != "yes" ; then
16687    enable_imake=no
16688	else
16689		enable_imake=yes
16690	fi
16691else
16692  enableval=yes
16693	enable_imake=yes
16694
16695fi;
16696echo "$as_me:16696: result: $enable_imake" >&5
16697echo "${ECHO_T}$enable_imake" >&6
16698
16699if test "$enable_imake" = yes ; then
16700
16701for ac_prog in xmkmf imake
16702do
16703  # Extract the first word of "$ac_prog", so it can be a program name with args.
16704set dummy $ac_prog; ac_word=$2
16705echo "$as_me:16705: checking for $ac_word" >&5
16706echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
16707if test "${ac_cv_path_IMAKE+set}" = set; then
16708  echo $ECHO_N "(cached) $ECHO_C" >&6
16709else
16710  case $IMAKE in
16711  [\\/]* | ?:[\\/]*)
16712  ac_cv_path_IMAKE="$IMAKE" # Let the user override the test with a path.
16713  ;;
16714  *)
16715  ac_save_IFS=$IFS; IFS=$ac_path_separator
16716ac_dummy="$PATH"
16717for ac_dir in $ac_dummy; do
16718  IFS=$ac_save_IFS
16719  test -z "$ac_dir" && ac_dir=.
16720  if $as_executable_p "$ac_dir/$ac_word"; then
16721   ac_cv_path_IMAKE="$ac_dir/$ac_word"
16722   echo "$as_me:16722: found $ac_dir/$ac_word" >&5
16723   break
16724fi
16725done
16726
16727  ;;
16728esac
16729fi
16730IMAKE=$ac_cv_path_IMAKE
16731
16732if test -n "$IMAKE"; then
16733  echo "$as_me:16733: result: $IMAKE" >&5
16734echo "${ECHO_T}$IMAKE" >&6
16735else
16736  echo "$as_me:16736: result: no" >&5
16737echo "${ECHO_T}no" >&6
16738fi
16739
16740  test -n "$IMAKE" && break
16741done
16742
16743if test -n "$IMAKE" ; then
16744
16745case $IMAKE in
16746(*/imake)
16747	cf_imake_opts="-DUseInstalled=YES"
16748	;;
16749(*/util/xmkmf)
16750	# A single parameter tells xmkmf where the config-files are:
16751	cf_imake_opts="`echo "$IMAKE"|sed -e s,/config/util/xmkmf,,`"
16752	;;
16753(*)
16754	cf_imake_opts=
16755	;;
16756esac
16757
16758# If it's installed properly, imake (or its wrapper, xmkmf) will point to the
16759# config directory.
16760if mkdir conftestdir; then
16761	CDPATH=; export CDPATH
16762	cf_makefile=`cd "$srcdir" || exit;pwd`/Imakefile
16763	cd conftestdir
16764
16765	cat >fix_cflags.sed <<'CF_EOF'
16766s/\\//g
16767s/[ 	][ 	]*/ /g
16768s/"//g
16769:pack
16770s/\(=[^ ][^ ]*\) \([^-]\)/\1	\2/g
16771t pack
16772s/\(-D[a-zA-Z0-9_][a-zA-Z0-9_]*\)=\([^\'0-9 ][^ ]*\)/\1='\\"\2\\"'/g
16773s/^IMAKE[ ]/IMAKE_CFLAGS="/
16774s/	/ /g
16775s/$/"/
16776CF_EOF
16777
16778	cat >fix_lflags.sed <<'CF_EOF'
16779s/^IMAKE[ 	]*/IMAKE_LOADFLAGS="/
16780s/$/"/
16781CF_EOF
16782
16783	echo >./Imakefile
16784	test -f "$cf_makefile" && cat "$cf_makefile" >>./Imakefile
16785
16786	cat >> ./Imakefile <<'CF_EOF'
16787findstddefs:
16788	@echo IMAKE ${ALLDEFINES} $(MAIN_DEFINES) $(VENDORMANDEFS)       | sed -f fix_cflags.sed
16789	@echo IMAKE ${EXTRA_LOAD_FLAGS} | sed -f fix_lflags.sed
16790CF_EOF
16791
16792	if ( $IMAKE "$cf_imake_opts" 1>/dev/null 2>&5 && test -f Makefile)
16793	then
16794		test -n "$verbose" && echo "	Using $IMAKE $cf_imake_opts" 1>&6
16795
16796echo "${as_me:-configure}:16796: testing Using $IMAKE $cf_imake_opts ..." 1>&5
16797
16798	else
16799		# sometimes imake doesn't have the config path compiled in.  Find it.
16800		cf_config=
16801		for cf_libpath in $X_LIBS $LIBS ; do
16802			case "$cf_libpath" in
16803			(-L*)
16804				cf_libpath=`echo ".$cf_libpath" | sed -e 's/^...//'`
16805				cf_libpath="$cf_libpath/X11/config"
16806				if test -d "$cf_libpath" ; then
16807					cf_config="$cf_libpath"
16808					break
16809				fi
16810				;;
16811			esac
16812		done
16813		if test -z "$cf_config" ; then
16814			{ echo "$as_me:16814: WARNING: Could not find imake config-directory" >&5
16815echo "$as_me: WARNING: Could not find imake config-directory" >&2;}
16816		else
16817			cf_imake_opts="$cf_imake_opts -I$cf_config"
16818			if ( "$IMAKE" -v "$cf_imake_opts" 2>&5)
16819			then
16820				test -n "$verbose" && echo "	Using $IMAKE $cf_config" 1>&6
16821
16822echo "${as_me:-configure}:16822: testing Using $IMAKE $cf_config ..." 1>&5
16823
16824			else
16825				{ echo "$as_me:16825: WARNING: Cannot run $IMAKE" >&5
16826echo "$as_me: WARNING: Cannot run $IMAKE" >&2;}
16827			fi
16828		fi
16829	fi
16830
16831	# GNU make sometimes prints "make[1]: Entering...", which
16832	# would confuse us.
16833	eval "`make findstddefs 2>/dev/null | grep -v make`"
16834
16835	cd ..
16836	rm -rf conftestdir
16837
16838	# We use ${ALLDEFINES} rather than ${STD_DEFINES} because the former
16839	# declares XTFUNCPROTO there.  However, some vendors (e.g., SGI) have
16840	# modified it to support site.cf, adding a kludge for the /usr/include
16841	# directory.  Try to filter that out, otherwise gcc won't find its
16842	# headers.
16843	if test -n "$GCC" ; then
16844	    if test -n "$IMAKE_CFLAGS" ; then
16845		cf_nostdinc=""
16846		cf_std_incl=""
16847		cf_cpp_opts=""
16848		for cf_opt in $IMAKE_CFLAGS
16849		do
16850		    case "$cf_opt" in
16851		    (-nostdinc)
16852			cf_nostdinc="$cf_opt"
16853			;;
16854		    (-I/usr/include)
16855			cf_std_incl="$cf_opt"
16856			;;
16857		    (*)
16858			cf_cpp_opts="$cf_cpp_opts $cf_opt"
16859			;;
16860		    esac
16861		done
16862		if test -z "$cf_nostdinc" ; then
16863		    IMAKE_CFLAGS="$cf_cpp_opts $cf_std_incl"
16864		elif test -z "$cf_std_incl" ; then
16865		    IMAKE_CFLAGS="$cf_cpp_opts $cf_nostdinc"
16866		else
16867		    test -n "$verbose" && echo "	suppressed \"$cf_nostdinc\" and \"$cf_std_incl\"" 1>&6
16868
16869echo "${as_me:-configure}:16869: testing suppressed \"$cf_nostdinc\" and \"$cf_std_incl\" ..." 1>&5
16870
16871		    IMAKE_CFLAGS="$cf_cpp_opts"
16872		fi
16873	    fi
16874	fi
16875fi
16876
16877# Some imake configurations define PROJECTROOT with an empty value.  Remove
16878# the empty definition.
16879case $IMAKE_CFLAGS in
16880(*-DPROJECTROOT=/*)
16881	;;
16882(*)
16883	IMAKE_CFLAGS=`echo "$IMAKE_CFLAGS" |sed -e "s,-DPROJECTROOT=[ 	], ,"`
16884	;;
16885esac
16886
16887fi
16888
16889test -n "$verbose" && echo "	IMAKE_CFLAGS $IMAKE_CFLAGS" 1>&6
16890
16891echo "${as_me:-configure}:16891: testing IMAKE_CFLAGS $IMAKE_CFLAGS ..." 1>&5
16892
16893test -n "$verbose" && echo "	IMAKE_LOADFLAGS $IMAKE_LOADFLAGS" 1>&6
16894
16895echo "${as_me:-configure}:16895: testing IMAKE_LOADFLAGS $IMAKE_LOADFLAGS ..." 1>&5
16896
16897fi
16898
16899if test -n "$IMAKE" && test -n "$IMAKE_CFLAGS" ; then
16900
16901cf_fix_cppflags=no
16902cf_new_cflags=
16903cf_new_cppflags=
16904cf_new_extra_cppflags=
16905
16906for cf_add_cflags in $IMAKE_CFLAGS
16907do
16908case "$cf_fix_cppflags" in
16909(no)
16910	case "$cf_add_cflags" in
16911	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16912		case "$cf_add_cflags" in
16913		(-D*)
16914			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16915
16916			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16917				&& test -z "${cf_tst_cflags}" \
16918				&& cf_fix_cppflags=yes
16919
16920			if test "$cf_fix_cppflags" = yes ; then
16921
16922	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16923	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16924
16925				continue
16926			elif test "${cf_tst_cflags}" = "\"'" ; then
16927
16928	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16929	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16930
16931				continue
16932			fi
16933			;;
16934		esac
16935		case "$CPPFLAGS" in
16936		(*$cf_add_cflags)
16937			;;
16938		(*)
16939			case "$cf_add_cflags" in
16940			(-D*)
16941				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16942
16943CPPFLAGS=`echo "$CPPFLAGS" | \
16944	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
16945		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
16946
16947				;;
16948			esac
16949
16950	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16951	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16952
16953			;;
16954		esac
16955		;;
16956	(*)
16957
16958	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16959	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16960
16961		;;
16962	esac
16963	;;
16964(yes)
16965
16966	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16967	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16968
16969	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
16970
16971	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16972		&& test -z "${cf_tst_cflags}" \
16973		&& cf_fix_cppflags=no
16974	;;
16975esac
16976done
16977
16978if test -n "$cf_new_cflags" ; then
16979
16980	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16981	CFLAGS="${CFLAGS}$cf_new_cflags"
16982
16983fi
16984
16985if test -n "$cf_new_cppflags" ; then
16986
16987	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16988	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16989
16990fi
16991
16992if test -n "$cf_new_extra_cppflags" ; then
16993
16994	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16995	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16996
16997fi
16998
16999else
17000	IMAKE_CFLAGS=
17001	IMAKE_LOADFLAGS=
17002	test -n "$verbose" && echo "	make fallback definitions" 1>&6
17003
17004echo "${as_me:-configure}:17004: testing make fallback definitions ..." 1>&5
17005
17006	# We prefer config.guess' values when we can get them, to avoid
17007	# inconsistent results with uname (AIX for instance).  However,
17008	# config.guess is not always consistent either.
17009	case $host_os in
17010	(*[0-9].[0-9]*)
17011		UNAME_RELEASE="$host_os"
17012		;;
17013	(*)
17014		UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
17015		;;
17016	esac
17017
17018	case .$UNAME_RELEASE in
17019	(*[0-9].[0-9]*)
17020		OSMAJORVERSION=`echo "$UNAME_RELEASE" |sed -e 's/^[^0-9]*//' -e 's/\..*//'`
17021		OSMINORVERSION=`echo "$UNAME_RELEASE" |sed -e 's/^[^0-9]*//' -e 's/^[^.]*\.//' -e 's/\..*//' -e 's/[^0-9].*//' `
17022		test -z "$OSMAJORVERSION" && OSMAJORVERSION=1
17023		test -z "$OSMINORVERSION" && OSMINORVERSION=0
17024		IMAKE_CFLAGS="-DOSMAJORVERSION=$OSMAJORVERSION -DOSMINORVERSION=$OSMINORVERSION $IMAKE_CFLAGS"
17025		;;
17026	esac
17027
17028	# FUNCPROTO is standard with X11R6, but XFree86 drops it, leaving some
17029	# fallback/fragments for NeedPrototypes, etc.
17030	IMAKE_CFLAGS="-DFUNCPROTO=15 $IMAKE_CFLAGS"
17031
17032	# If this is not set properly, Xaw's scrollbars will not work
17033	if test "$enable_narrowproto" = yes ; then
17034		IMAKE_CFLAGS="-DNARROWPROTO=1 $IMAKE_CFLAGS"
17035	fi
17036
17037	# Other special definitions:
17038	case $host_os in
17039	(aix*)
17040		# imake on AIX 5.1 defines AIXV3.  really.
17041		IMAKE_CFLAGS="-DAIXV3 -DAIXV4 $IMAKE_CFLAGS"
17042		;;
17043	(irix[56].*)
17044		# these are needed to make SIGWINCH work in xterm
17045		IMAKE_CFLAGS="-DSYSV -DSVR4 $IMAKE_CFLAGS"
17046		;;
17047	esac
17048
17049cf_fix_cppflags=no
17050cf_new_cflags=
17051cf_new_cppflags=
17052cf_new_extra_cppflags=
17053
17054for cf_add_cflags in $IMAKE_CFLAGS
17055do
17056case "$cf_fix_cppflags" in
17057(no)
17058	case "$cf_add_cflags" in
17059	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17060		case "$cf_add_cflags" in
17061		(-D*)
17062			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17063
17064			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17065				&& test -z "${cf_tst_cflags}" \
17066				&& cf_fix_cppflags=yes
17067
17068			if test "$cf_fix_cppflags" = yes ; then
17069
17070	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17071	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17072
17073				continue
17074			elif test "${cf_tst_cflags}" = "\"'" ; then
17075
17076	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17077	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17078
17079				continue
17080			fi
17081			;;
17082		esac
17083		case "$CPPFLAGS" in
17084		(*$cf_add_cflags)
17085			;;
17086		(*)
17087			case "$cf_add_cflags" in
17088			(-D*)
17089				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17090
17091CPPFLAGS=`echo "$CPPFLAGS" | \
17092	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
17093		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
17094
17095				;;
17096			esac
17097
17098	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
17099	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
17100
17101			;;
17102		esac
17103		;;
17104	(*)
17105
17106	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
17107	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
17108
17109		;;
17110	esac
17111	;;
17112(yes)
17113
17114	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17115	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17116
17117	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
17118
17119	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17120		&& test -z "${cf_tst_cflags}" \
17121		&& cf_fix_cppflags=no
17122	;;
17123esac
17124done
17125
17126if test -n "$cf_new_cflags" ; then
17127
17128	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17129	CFLAGS="${CFLAGS}$cf_new_cflags"
17130
17131fi
17132
17133if test -n "$cf_new_cppflags" ; then
17134
17135	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17136	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
17137
17138fi
17139
17140if test -n "$cf_new_extra_cppflags" ; then
17141
17142	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
17143	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
17144
17145fi
17146
17147fi
17148
17149# Extract the first word of "groff", so it can be a program name with args.
17150set dummy groff; ac_word=$2
17151echo "$as_me:17151: checking for $ac_word" >&5
17152echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
17153if test "${ac_cv_path_GROFF_PATH+set}" = set; then
17154  echo $ECHO_N "(cached) $ECHO_C" >&6
17155else
17156  case $GROFF_PATH in
17157  [\\/]* | ?:[\\/]*)
17158  ac_cv_path_GROFF_PATH="$GROFF_PATH" # Let the user override the test with a path.
17159  ;;
17160  *)
17161  ac_save_IFS=$IFS; IFS=$ac_path_separator
17162ac_dummy="$PATH"
17163for ac_dir in $ac_dummy; do
17164  IFS=$ac_save_IFS
17165  test -z "$ac_dir" && ac_dir=.
17166  if $as_executable_p "$ac_dir/$ac_word"; then
17167   ac_cv_path_GROFF_PATH="$ac_dir/$ac_word"
17168   echo "$as_me:17168: found $ac_dir/$ac_word" >&5
17169   break
17170fi
17171done
17172
17173  test -z "$ac_cv_path_GROFF_PATH" && ac_cv_path_GROFF_PATH="no"
17174  ;;
17175esac
17176fi
17177GROFF_PATH=$ac_cv_path_GROFF_PATH
17178
17179if test -n "$GROFF_PATH"; then
17180  echo "$as_me:17180: result: $GROFF_PATH" >&5
17181echo "${ECHO_T}$GROFF_PATH" >&6
17182else
17183  echo "$as_me:17183: result: no" >&5
17184echo "${ECHO_T}no" >&6
17185fi
17186
17187for ac_prog in nroff mandoc
17188do
17189  # Extract the first word of "$ac_prog", so it can be a program name with args.
17190set dummy $ac_prog; ac_word=$2
17191echo "$as_me:17191: checking for $ac_word" >&5
17192echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
17193if test "${ac_cv_path_NROFF_PATH+set}" = set; then
17194  echo $ECHO_N "(cached) $ECHO_C" >&6
17195else
17196  case $NROFF_PATH in
17197  [\\/]* | ?:[\\/]*)
17198  ac_cv_path_NROFF_PATH="$NROFF_PATH" # Let the user override the test with a path.
17199  ;;
17200  *)
17201  ac_save_IFS=$IFS; IFS=$ac_path_separator
17202ac_dummy="$PATH"
17203for ac_dir in $ac_dummy; do
17204  IFS=$ac_save_IFS
17205  test -z "$ac_dir" && ac_dir=.
17206  if $as_executable_p "$ac_dir/$ac_word"; then
17207   ac_cv_path_NROFF_PATH="$ac_dir/$ac_word"
17208   echo "$as_me:17208: found $ac_dir/$ac_word" >&5
17209   break
17210fi
17211done
17212
17213  ;;
17214esac
17215fi
17216NROFF_PATH=$ac_cv_path_NROFF_PATH
17217
17218if test -n "$NROFF_PATH"; then
17219  echo "$as_me:17219: result: $NROFF_PATH" >&5
17220echo "${ECHO_T}$NROFF_PATH" >&6
17221else
17222  echo "$as_me:17222: result: no" >&5
17223echo "${ECHO_T}no" >&6
17224fi
17225
17226  test -n "$NROFF_PATH" && break
17227done
17228test -n "$NROFF_PATH" || NROFF_PATH="no"
17229
17230# Extract the first word of "tbl", so it can be a program name with args.
17231set dummy tbl; ac_word=$2
17232echo "$as_me:17232: checking for $ac_word" >&5
17233echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
17234if test "${ac_cv_path_TBL_PATH+set}" = set; then
17235  echo $ECHO_N "(cached) $ECHO_C" >&6
17236else
17237  case $TBL_PATH in
17238  [\\/]* | ?:[\\/]*)
17239  ac_cv_path_TBL_PATH="$TBL_PATH" # Let the user override the test with a path.
17240  ;;
17241  *)
17242  ac_save_IFS=$IFS; IFS=$ac_path_separator
17243ac_dummy="$PATH"
17244for ac_dir in $ac_dummy; do
17245  IFS=$ac_save_IFS
17246  test -z "$ac_dir" && ac_dir=.
17247  if $as_executable_p "$ac_dir/$ac_word"; then
17248   ac_cv_path_TBL_PATH="$ac_dir/$ac_word"
17249   echo "$as_me:17249: found $ac_dir/$ac_word" >&5
17250   break
17251fi
17252done
17253
17254  test -z "$ac_cv_path_TBL_PATH" && ac_cv_path_TBL_PATH="cat"
17255  ;;
17256esac
17257fi
17258TBL_PATH=$ac_cv_path_TBL_PATH
17259
17260if test -n "$TBL_PATH"; then
17261  echo "$as_me:17261: result: $TBL_PATH" >&5
17262echo "${ECHO_T}$TBL_PATH" >&6
17263else
17264  echo "$as_me:17264: result: no" >&5
17265echo "${ECHO_T}no" >&6
17266fi
17267
17268if test "x$GROFF_PATH" = xno
17269then
17270	NROFF_NOTE=
17271	GROFF_NOTE="#"
17272else
17273	NROFF_NOTE="#"
17274	GROFF_NOTE=
17275fi
17276
17277echo "$as_me:17277: checking for fgrep" >&5
17278echo $ECHO_N "checking for fgrep... $ECHO_C" >&6
17279if test "${ac_cv_path_FGREP+set}" = set; then
17280  echo $ECHO_N "(cached) $ECHO_C" >&6
17281else
17282  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
17283   then ac_cv_path_FGREP="$GREP -F"
17284   else
17285     for ac_prog in gfgrep fgrep
17286do
17287  # Extract the first word of "$ac_prog", so it can be a program name with args.
17288set dummy $ac_prog; ac_word=$2
17289echo "$as_me:17289: checking for $ac_word" >&5
17290echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
17291if test "${ac_cv_path_FGREP+set}" = set; then
17292  echo $ECHO_N "(cached) $ECHO_C" >&6
17293else
17294  case $FGREP in
17295  [\\/]* | ?:[\\/]*)
17296  ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
17297  ;;
17298  *)
17299  ac_save_IFS=$IFS; IFS=$ac_path_separator
17300ac_dummy="$PATH"
17301for ac_dir in $ac_dummy; do
17302  IFS=$ac_save_IFS
17303  test -z "$ac_dir" && ac_dir=.
17304  if $as_executable_p "$ac_dir/$ac_word"; then
17305   ac_cv_path_FGREP="$ac_dir/$ac_word"
17306   echo "$as_me:17306: found $ac_dir/$ac_word" >&5
17307   break
17308fi
17309done
17310
17311  ;;
17312esac
17313fi
17314FGREP=$ac_cv_path_FGREP
17315
17316if test -n "$FGREP"; then
17317  echo "$as_me:17317: result: $FGREP" >&5
17318echo "${ECHO_T}$FGREP" >&6
17319else
17320  echo "$as_me:17320: result: no" >&5
17321echo "${ECHO_T}no" >&6
17322fi
17323
17324  test -n "$FGREP" && break
17325done
17326test -n "$FGREP" || FGREP=": "
17327
17328     test "x$ac_cv_path_FGREP" = "x:" && { { echo "$as_me:17328: error: cannot find workable fgrep" >&5
17329echo "$as_me: error: cannot find workable fgrep" >&2;}
17330   { (exit 1); exit 1; }; }
17331   fi
17332fi
17333echo "$as_me:17333: result: $ac_cv_path_FGREP" >&5
17334echo "${ECHO_T}$ac_cv_path_FGREP" >&6
17335 FGREP="$ac_cv_path_FGREP"
17336
17337case "x${with_man2html}" in
17338(xno)
17339	cf_man2html=no
17340	;;
17341(x|xyes)
17342	# Extract the first word of "man2html", so it can be a program name with args.
17343set dummy man2html; ac_word=$2
17344echo "$as_me:17344: checking for $ac_word" >&5
17345echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
17346if test "${ac_cv_path_cf_man2html+set}" = set; then
17347  echo $ECHO_N "(cached) $ECHO_C" >&6
17348else
17349  case $cf_man2html in
17350  [\\/]* | ?:[\\/]*)
17351  ac_cv_path_cf_man2html="$cf_man2html" # Let the user override the test with a path.
17352  ;;
17353  *)
17354  ac_save_IFS=$IFS; IFS=$ac_path_separator
17355ac_dummy="$PATH"
17356for ac_dir in $ac_dummy; do
17357  IFS=$ac_save_IFS
17358  test -z "$ac_dir" && ac_dir=.
17359  if $as_executable_p "$ac_dir/$ac_word"; then
17360   ac_cv_path_cf_man2html="$ac_dir/$ac_word"
17361   echo "$as_me:17361: found $ac_dir/$ac_word" >&5
17362   break
17363fi
17364done
17365
17366  test -z "$ac_cv_path_cf_man2html" && ac_cv_path_cf_man2html="no"
17367  ;;
17368esac
17369fi
17370cf_man2html=$ac_cv_path_cf_man2html
17371
17372if test -n "$cf_man2html"; then
17373  echo "$as_me:17373: result: $cf_man2html" >&5
17374echo "${ECHO_T}$cf_man2html" >&6
17375else
17376  echo "$as_me:17376: result: no" >&5
17377echo "${ECHO_T}no" >&6
17378fi
17379
17380	case "x$cf_man2html" in
17381	(x/*)
17382		echo "$as_me:17382: checking for the modified Earl Hood script" >&5
17383echo $ECHO_N "checking for the modified Earl Hood script... $ECHO_C" >&6
17384		if ( $cf_man2html -help 2>&1 | grep 'Make an index of headers at the end' >/dev/null )
17385		then
17386			cf_man2html_ok=yes
17387		else
17388			cf_man2html=no
17389			cf_man2html_ok=no
17390		fi
17391		echo "$as_me:17391: result: $cf_man2html_ok" >&5
17392echo "${ECHO_T}$cf_man2html_ok" >&6
17393		;;
17394	(*)
17395		cf_man2html=no
17396		;;
17397	esac
17398esac
17399
17400echo "$as_me:17400: checking for program to convert manpage to html" >&5
17401echo $ECHO_N "checking for program to convert manpage to html... $ECHO_C" >&6
17402
17403# Check whether --with-man2html or --without-man2html was given.
17404if test "${with_man2html+set}" = set; then
17405  withval="$with_man2html"
17406  cf_man2html=$withval
17407else
17408  cf_man2html=$cf_man2html
17409fi;
17410
17411cf_with_groff=no
17412
17413case $cf_man2html in
17414(yes)
17415	echo "$as_me:17415: result: man2html" >&5
17416echo "${ECHO_T}man2html" >&6
17417	# Extract the first word of "man2html", so it can be a program name with args.
17418set dummy man2html; ac_word=$2
17419echo "$as_me:17419: checking for $ac_word" >&5
17420echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
17421if test "${ac_cv_path_cf_man2html+set}" = set; then
17422  echo $ECHO_N "(cached) $ECHO_C" >&6
17423else
17424  case $cf_man2html in
17425  [\\/]* | ?:[\\/]*)
17426  ac_cv_path_cf_man2html="$cf_man2html" # Let the user override the test with a path.
17427  ;;
17428  *)
17429  ac_save_IFS=$IFS; IFS=$ac_path_separator
17430ac_dummy="$PATH"
17431for ac_dir in $ac_dummy; do
17432  IFS=$ac_save_IFS
17433  test -z "$ac_dir" && ac_dir=.
17434  if $as_executable_p "$ac_dir/$ac_word"; then
17435   ac_cv_path_cf_man2html="$ac_dir/$ac_word"
17436   echo "$as_me:17436: found $ac_dir/$ac_word" >&5
17437   break
17438fi
17439done
17440
17441  test -z "$ac_cv_path_cf_man2html" && ac_cv_path_cf_man2html="no"
17442  ;;
17443esac
17444fi
17445cf_man2html=$ac_cv_path_cf_man2html
17446
17447if test -n "$cf_man2html"; then
17448  echo "$as_me:17448: result: $cf_man2html" >&5
17449echo "${ECHO_T}$cf_man2html" >&6
17450else
17451  echo "$as_me:17451: result: no" >&5
17452echo "${ECHO_T}no" >&6
17453fi
17454
17455	;;
17456(no|groff|*/groff*)
17457	cf_with_groff=yes
17458	cf_man2html=$GROFF_PATH
17459	echo "$as_me:17459: result: $cf_man2html" >&5
17460echo "${ECHO_T}$cf_man2html" >&6
17461	;;
17462(*)
17463	echo "$as_me:17463: result: $cf_man2html" >&5
17464echo "${ECHO_T}$cf_man2html" >&6
17465	;;
17466esac
17467
17468MAN2HTML_TEMP="man2html.tmp"
17469	cat >$MAN2HTML_TEMP <<CF_EOF
17470#!$SHELL
17471# Temporary script generated by CF_WITH_MAN2HTML
17472# Convert inputs to html, sending result to standard output.
17473#
17474# Parameters:
17475# \${1} = rootname of file to convert
17476# \${2} = suffix of file to convert, e.g., "1"
17477# \${3} = macros to use, e.g., "man"
17478#
17479ROOT=\$1
17480TYPE=\$2
17481MACS=\$3
17482
17483unset LANG
17484unset LC_ALL
17485unset LC_CTYPE
17486unset LANGUAGE
17487GROFF_NO_SGR=stupid
17488export GROFF_NO_SGR
17489
17490CF_EOF
17491
17492NROFF_OPTS=
17493if test "x$cf_with_groff" = xyes
17494then
17495	MAN2HTML_NOTE="$GROFF_NOTE"
17496	MAN2HTML_PATH="$GROFF_PATH"
17497	cat >>$MAN2HTML_TEMP <<CF_EOF
17498$SHELL -c "$TBL_PATH \${ROOT}.\${TYPE} | $GROFF_PATH -P -o0 -I\${ROOT}_ -Thtml -\${MACS}"
17499CF_EOF
17500else
17501	# disable hyphenation if this is groff
17502	if test "x$GROFF_PATH" != xno
17503	then
17504		echo "$as_me:17504: checking if nroff is really groff" >&5
17505echo $ECHO_N "checking if nroff is really groff... $ECHO_C" >&6
17506		cf_check_groff="`$NROFF_PATH --version 2>/dev/null | grep groff`"
17507		test -n "$cf_check_groff" && cf_check_groff=yes
17508		test -n "$cf_check_groff" || cf_check_groff=no
17509		echo "$as_me:17509: result: $cf_check_groff" >&5
17510echo "${ECHO_T}$cf_check_groff" >&6
17511		test "x$cf_check_groff" = xyes && NROFF_OPTS="-rHY=0"
17512	fi
17513	MAN2HTML_NOTE=""
17514
17515if test "x$prefix" != xNONE; then
17516	cf_path_syntax="$prefix"
17517else
17518	cf_path_syntax="$ac_default_prefix"
17519fi
17520
17521case ".$cf_man2html" in
17522(.\$\(*\)*|.\'*\'*)
17523	;;
17524(..|./*|.\\*)
17525	;;
17526(.[a-zA-Z]:[\\/]*) # OS/2 EMX
17527	;;
17528(.\$\{*prefix\}*|.\$\{*dir\}*)
17529	eval cf_man2html="$cf_man2html"
17530	case ".$cf_man2html" in
17531	(.NONE/*)
17532		cf_man2html=`echo "$cf_man2html" | sed -e s%NONE%$cf_path_syntax%`
17533		;;
17534	esac
17535	;;
17536(.no|.NONE/*)
17537	cf_man2html=`echo "$cf_man2html" | sed -e s%NONE%$cf_path_syntax%`
17538	;;
17539(*)
17540	{ { echo "$as_me:17540: error: expected a pathname, not \"$cf_man2html\"" >&5
17541echo "$as_me: error: expected a pathname, not \"$cf_man2html\"" >&2;}
17542   { (exit 1); exit 1; }; }
17543	;;
17544esac
17545
17546	MAN2HTML_PATH="$cf_man2html"
17547	echo "$as_me:17547: checking for $cf_man2html top/bottom margins" >&5
17548echo $ECHO_N "checking for $cf_man2html top/bottom margins... $ECHO_C" >&6
17549
17550	# for this example, expect 3 lines of content, the remainder is head/foot
17551	cat >conftest.in <<CF_EOF
17552.TH HEAD1 HEAD2 HEAD3 HEAD4 HEAD5
17553.SH SECTION
17554MARKER
17555CF_EOF
17556
17557	LC_ALL=C LC_CTYPE=C LANG=C LANGUAGE=C $NROFF_PATH -man conftest.in >conftest.out
17558
17559	cf_man2html_1st="`${FGREP-fgrep} -n MARKER conftest.out |sed -e 's/^[^0-9]*://' -e 's/:.*//'`"
17560	cf_man2html_top=`expr "$cf_man2html_1st" - 2`
17561	cf_man2html_bot="`wc -l conftest.out |sed -e 's/[^0-9]//g'`"
17562	cf_man2html_bot=`expr "$cf_man2html_bot" - 2 - "$cf_man2html_top"`
17563	cf_man2html_top_bot="-topm=$cf_man2html_top -botm=$cf_man2html_bot"
17564
17565	echo "$as_me:17565: result: $cf_man2html_top_bot" >&5
17566echo "${ECHO_T}$cf_man2html_top_bot" >&6
17567
17568	echo "$as_me:17568: checking for pagesize to use" >&5
17569echo $ECHO_N "checking for pagesize to use... $ECHO_C" >&6
17570	for cf_block in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
17571	do
17572	cat >>conftest.in <<CF_EOF
17573.nf
175740
175751
175762
175773
175784
175795
175806
175817
175828
175839
17584CF_EOF
17585	done
17586
17587	LC_ALL=C LC_CTYPE=C LANG=C LANGUAGE=C $NROFF_PATH -man conftest.in >conftest.out
17588	cf_man2html_page="`${FGREP-fgrep} -n HEAD1 conftest.out |sed -n '$p' |sed -e 's/^[^0-9]*://' -e 's/:.*//'`"
17589	test -z "$cf_man2html_page" && cf_man2html_page=99999
17590	test "$cf_man2html_page" -gt 100 && cf_man2html_page=99999
17591
17592	rm -rf conftest*
17593	echo "$as_me:17593: result: $cf_man2html_page" >&5
17594echo "${ECHO_T}$cf_man2html_page" >&6
17595
17596	cat >>$MAN2HTML_TEMP <<CF_EOF
17597: \${MAN2HTML_PATH=$MAN2HTML_PATH}
17598MAN2HTML_OPTS="\$MAN2HTML_OPTS -index -title=\"\$ROOT(\$TYPE)\" -compress -pgsize $cf_man2html_page"
17599case \${TYPE} in
17600(ms)
17601	$TBL_PATH \${ROOT}.\${TYPE} | $NROFF_PATH $NROFF_OPTS -\${MACS} | \$MAN2HTML_PATH -topm=0 -botm=0 \$MAN2HTML_OPTS
17602	;;
17603(*)
17604	$TBL_PATH \${ROOT}.\${TYPE} | $NROFF_PATH $NROFF_OPTS -\${MACS} | \$MAN2HTML_PATH $cf_man2html_top_bot \$MAN2HTML_OPTS
17605	;;
17606esac
17607CF_EOF
17608fi
17609
17610chmod 700 $MAN2HTML_TEMP
17611
17612# If we have already established that there is a full termcap implementation,
17613# suppress the definitions for terminfo that we make have imported from the
17614# imake-file.
17615if test "x$cf_cv_lib_tgetent" != xno || test "x$cf_cv_lib_part_tgetent" != xno ; then
17616	case "$IMAKE_CFLAGS" in
17617	(*-DUSE_TERMINFO\ -DHAVE_TIGETSTR*)
17618
17619	test -n "$verbose" && echo "	removing terminfo flags from IMAKE_CFLAGS" 1>&6
17620
17621echo "${as_me:-configure}:17621: testing removing terminfo flags from IMAKE_CFLAGS ..." 1>&5
17622
17623	IMAKE_CFLAGS=`echo "$IMAKE_CFLAGS" | sed -e 's/-DUSE_TERMINFO[ 	]*-DHAVE_TIGETSTR[ 	]*//'`
17624	test -n "$verbose" && echo "	...result $IMAKE_CFLAGS" 1>&6
17625
17626echo "${as_me:-configure}:17626: testing ...result $IMAKE_CFLAGS ..." 1>&5
17627
17628	test -n "$verbose" && echo "	removing terminfo flags from CPPFLAGS" 1>&6
17629
17630echo "${as_me:-configure}:17630: testing removing terminfo flags from CPPFLAGS ..." 1>&5
17631
17632	CPPFLAGS=`echo "$CPPFLAGS" | sed -e 's/-DUSE_TERMINFO[ 	]*-DHAVE_TIGETSTR[ 	]*//'`
17633	test -n "$verbose" && echo "	...result $CPPFLAGS" 1>&6
17634
17635echo "${as_me:-configure}:17635: testing ...result $CPPFLAGS ..." 1>&5
17636
17637		;;
17638	esac
17639fi
17640
17641echo "$as_me:17641: checking for default terminal-id" >&5
17642echo $ECHO_N "checking for default terminal-id... $ECHO_C" >&6
17643
17644# Check whether --with-terminal-id or --without-terminal-id was given.
17645if test "${with_terminal_id+set}" = set; then
17646  withval="$with_terminal_id"
17647  default_termid=$withval
17648else
17649  default_termid=vt420
17650fi;
17651echo "$as_me:17651: result: $default_termid" >&5
17652echo "${ECHO_T}$default_termid" >&6
17653case $default_termid in
17654(vt*)	default_termid=`echo $default_termid | sed -e 's/^..//'`
17655	;;
17656esac
17657
17658cat >>confdefs.h <<EOF
17659#define DFT_DECID "$default_termid"
17660EOF
17661
17662echo "$as_me:17662: checking for default terminal-type" >&5
17663echo $ECHO_N "checking for default terminal-type... $ECHO_C" >&6
17664
17665# Check whether --with-terminal-type or --without-terminal-type was given.
17666if test "${with_terminal_type+set}" = set; then
17667  withval="$with_terminal_type"
17668  default_TERM=$withval
17669else
17670  default_TERM=xterm
17671fi;
17672echo "$as_me:17672: result: $default_TERM" >&5
17673echo "${ECHO_T}$default_TERM" >&6
17674
17675cat >>confdefs.h <<EOF
17676#define DFT_TERMTYPE "$default_TERM"
17677EOF
17678
17679###############################################################################
17680echo "$as_me:17680: checking if backarrow-key should be BS" >&5
17681echo $ECHO_N "checking if backarrow-key should be BS... $ECHO_C" >&6
17682
17683# Check whether --enable-backarrow-key or --disable-backarrow-key was given.
17684if test "${enable_backarrow_key+set}" = set; then
17685  enableval="$enable_backarrow_key"
17686  test "$enableval" != no && enableval=yes
17687	if test "$enableval" != "yes" ; then
17688    backarrow_is_bs=$enableval
17689	else
17690		backarrow_is_bs=yes
17691	fi
17692else
17693  enableval=yes
17694	backarrow_is_bs=yes
17695
17696fi;
17697
17698echo "$as_me:17698: result: $backarrow_is_bs" >&5
17699echo "${ECHO_T}$backarrow_is_bs" >&6
17700case $backarrow_is_bs in
17701(yes)
17702	backarrow_is_bs=true
17703	;;
17704(no)
17705	backarrow_is_bs=false
17706	;;
17707esac
17708cf_xbool1=`echo "$backarrow_is_bs"|sed -e 's/^\(.\).*/\1/'`
17709
17710cf_xbool1=`echo "$cf_xbool1" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17711
17712cf_xbool2=`echo "$backarrow_is_bs"|sed -e 's/^.//'`
17713backarrow_is_bs=${cf_xbool1}${cf_xbool2}
17714
17715cat >>confdefs.h <<EOF
17716#define DEF_BACKARO_BS $backarrow_is_bs
17717EOF
17718
17719echo "$as_me:17719: checking if backarrow-key should be treated as erase" >&5
17720echo $ECHO_N "checking if backarrow-key should be treated as erase... $ECHO_C" >&6
17721
17722# Check whether --enable-backarrow-is-erase or --disable-backarrow-is-erase was given.
17723if test "${enable_backarrow_is_erase+set}" = set; then
17724  enableval="$enable_backarrow_is_erase"
17725  test "$enableval" != yes && enableval=no
17726	if test "$enableval" != "no" ; then
17727    backarrow_is_erase=$enableval
17728	else
17729		backarrow_is_erase=no
17730	fi
17731else
17732  enableval=no
17733	backarrow_is_erase=no
17734
17735fi;
17736
17737echo "$as_me:17737: result: $backarrow_is_erase" >&5
17738echo "${ECHO_T}$backarrow_is_erase" >&6
17739case $backarrow_is_erase in
17740(yes)
17741	backarrow_is_erase=true
17742	;;
17743(no)
17744	backarrow_is_erase=false
17745	;;
17746esac
17747cf_xbool1=`echo "$backarrow_is_erase"|sed -e 's/^\(.\).*/\1/'`
17748
17749cf_xbool1=`echo "$cf_xbool1" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17750
17751cf_xbool2=`echo "$backarrow_is_erase"|sed -e 's/^.//'`
17752backarrow_is_erase=${cf_xbool1}${cf_xbool2}
17753
17754cat >>confdefs.h <<EOF
17755#define DEF_BACKARO_ERASE $backarrow_is_erase
17756EOF
17757
17758echo "$as_me:17758: checking for default backspace/DEL setting" >&5
17759echo $ECHO_N "checking for default backspace/DEL setting... $ECHO_C" >&6
17760
17761# Check whether --enable-delete-is-del or --disable-delete-is-del was given.
17762if test "${enable_delete_is_del+set}" = set; then
17763  enableval="$enable_delete_is_del"
17764  delete_is_del=$enableval
17765else
17766  delete_is_del=maybe
17767fi;
17768
17769echo "$as_me:17769: result: $delete_is_del" >&5
17770echo "${ECHO_T}$delete_is_del" >&6
17771case $delete_is_del in
17772(yes)
17773	delete_is_del=true
17774	;;
17775(no)
17776	delete_is_del=false
17777	;;
17778esac
17779cf_xbool1=`echo "$delete_is_del"|sed -e 's/^\(.\).*/\1/'`
17780
17781cf_xbool1=`echo "$cf_xbool1" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17782
17783cf_xbool2=`echo "$delete_is_del"|sed -e 's/^.//'`
17784delete_is_del=${cf_xbool1}${cf_xbool2}
17785
17786cat >>confdefs.h <<EOF
17787#define DEFDELETE_DEL $delete_is_del
17788EOF
17789
17790echo "$as_me:17790: checking for default pty initial erase setting" >&5
17791echo $ECHO_N "checking for default pty initial erase setting... $ECHO_C" >&6
17792
17793# Check whether --enable-pty-erase or --disable-pty-erase was given.
17794if test "${enable_pty_erase+set}" = set; then
17795  enableval="$enable_pty_erase"
17796  initial_erase=$enableval
17797else
17798  initial_erase=False
17799fi;
17800
17801echo "$as_me:17801: result: $initial_erase" >&5
17802echo "${ECHO_T}$initial_erase" >&6
17803case $initial_erase in
17804(yes)
17805	initial_erase=true
17806	;;
17807(no)
17808	initial_erase=false
17809	;;
17810esac
17811cf_xbool1=`echo "$initial_erase"|sed -e 's/^\(.\).*/\1/'`
17812
17813cf_xbool1=`echo "$cf_xbool1" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17814
17815cf_xbool2=`echo "$initial_erase"|sed -e 's/^.//'`
17816initial_erase=${cf_xbool1}${cf_xbool2}
17817
17818cat >>confdefs.h <<EOF
17819#define DEF_INITIAL_ERASE $initial_erase
17820EOF
17821
17822echo "$as_me:17822: checking if alt should send ESC" >&5
17823echo $ECHO_N "checking if alt should send ESC... $ECHO_C" >&6
17824
17825# Check whether --enable-alt-sends-esc or --disable-alt-sends-esc was given.
17826if test "${enable_alt_sends_esc+set}" = set; then
17827  enableval="$enable_alt_sends_esc"
17828  test "$enableval" != yes && enableval=no
17829	if test "$enableval" != "no" ; then
17830    alt_sends_esc=$enableval
17831	else
17832		alt_sends_esc=no
17833	fi
17834else
17835  enableval=no
17836	alt_sends_esc=no
17837
17838fi;
17839
17840echo "$as_me:17840: result: $alt_sends_esc" >&5
17841echo "${ECHO_T}$alt_sends_esc" >&6
17842case $alt_sends_esc in
17843(yes)
17844	alt_sends_esc=true
17845	;;
17846(no)
17847	alt_sends_esc=false
17848	;;
17849esac
17850cf_xbool1=`echo "$alt_sends_esc"|sed -e 's/^\(.\).*/\1/'`
17851
17852cf_xbool1=`echo "$cf_xbool1" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17853
17854cf_xbool2=`echo "$alt_sends_esc"|sed -e 's/^.//'`
17855alt_sends_esc=${cf_xbool1}${cf_xbool2}
17856
17857cat >>confdefs.h <<EOF
17858#define DEF_ALT_SENDS_ESC $alt_sends_esc
17859EOF
17860
17861echo "$as_me:17861: checking if meta should send ESC" >&5
17862echo $ECHO_N "checking if meta should send ESC... $ECHO_C" >&6
17863
17864# Check whether --enable-meta-sends-esc or --disable-meta-sends-esc was given.
17865if test "${enable_meta_sends_esc+set}" = set; then
17866  enableval="$enable_meta_sends_esc"
17867  test "$enableval" != yes && enableval=no
17868	if test "$enableval" != "no" ; then
17869    meta_sends_esc=$enableval
17870	else
17871		meta_sends_esc=no
17872	fi
17873else
17874  enableval=no
17875	meta_sends_esc=no
17876
17877fi;
17878
17879echo "$as_me:17879: result: $meta_sends_esc" >&5
17880echo "${ECHO_T}$meta_sends_esc" >&6
17881case $meta_sends_esc in
17882(yes)
17883	meta_sends_esc=true
17884	;;
17885(no)
17886	meta_sends_esc=false
17887	;;
17888esac
17889cf_xbool1=`echo "$meta_sends_esc"|sed -e 's/^\(.\).*/\1/'`
17890
17891cf_xbool1=`echo "$cf_xbool1" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17892
17893cf_xbool2=`echo "$meta_sends_esc"|sed -e 's/^.//'`
17894meta_sends_esc=${cf_xbool1}${cf_xbool2}
17895
17896cat >>confdefs.h <<EOF
17897#define DEF_META_SENDS_ESC $meta_sends_esc
17898EOF
17899
17900###############################################################################
17901# Extract the first word of "tic", so it can be a program name with args.
17902set dummy tic; ac_word=$2
17903echo "$as_me:17903: checking for $ac_word" >&5
17904echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
17905if test "${ac_cv_prog_cf_tic_prog+set}" = set; then
17906  echo $ECHO_N "(cached) $ECHO_C" >&6
17907else
17908  if test -n "$cf_tic_prog"; then
17909  ac_cv_prog_cf_tic_prog="$cf_tic_prog" # Let the user override the test.
17910else
17911  ac_save_IFS=$IFS; IFS=$ac_path_separator
17912ac_dummy="$PATH"
17913for ac_dir in $ac_dummy; do
17914  IFS=$ac_save_IFS
17915  test -z "$ac_dir" && ac_dir=.
17916  $as_executable_p "$ac_dir/$ac_word" || continue
17917ac_cv_prog_cf_tic_prog="yes"
17918echo "$as_me:17918: found $ac_dir/$ac_word" >&5
17919break
17920done
17921
17922  test -z "$ac_cv_prog_cf_tic_prog" && ac_cv_prog_cf_tic_prog="no"
17923fi
17924fi
17925cf_tic_prog=$ac_cv_prog_cf_tic_prog
17926if test -n "$cf_tic_prog"; then
17927  echo "$as_me:17927: result: $cf_tic_prog" >&5
17928echo "${ECHO_T}$cf_tic_prog" >&6
17929else
17930  echo "$as_me:17930: result: no" >&5
17931echo "${ECHO_T}no" >&6
17932fi
17933
17934if test "$cf_tic_prog" = yes ; then
17935	if test -n "$TERMINFO"
17936	then
17937		case "$TERMINFO" in
17938		(/*)
17939			test -d "$TERMINFO" || unset TERMINFO
17940			;;
17941		(*)
17942			unset TERMINFO
17943			;;
17944		esac
17945	fi
17946	echo "$as_me:17946: checking for private terminfo-directory" >&5
17947echo $ECHO_N "checking for private terminfo-directory... $ECHO_C" >&6
17948
17949# Check whether --with-own-terminfo or --without-own-terminfo was given.
17950if test "${with_own_terminfo+set}" = set; then
17951  withval="$with_own_terminfo"
17952  TERMINFO_DIR=$withval
17953else
17954  TERMINFO_DIR=${TERMINFO-none}
17955fi;
17956	echo "$as_me:17956: result: $TERMINFO_DIR" >&5
17957echo "${ECHO_T}$TERMINFO_DIR" >&6
17958	if test "$TERMINFO_DIR" = yes ; then
17959		{ echo "$as_me:17959: WARNING: no value given" >&5
17960echo "$as_me: WARNING: no value given" >&2;}
17961	elif test "$TERMINFO_DIR" != none ; then
17962		if test -d "$TERMINFO_DIR" ; then
17963
17964cat >>confdefs.h <<EOF
17965#define OWN_TERMINFO_DIR "$TERMINFO_DIR"
17966EOF
17967
17968			echo "$as_me:17968: checking if \$TERMINFO should also be set" >&5
17969echo $ECHO_N "checking if \$TERMINFO should also be set... $ECHO_C" >&6
17970
17971# Check whether --enable-env-terminfo or --disable-env-terminfo was given.
17972if test "${enable_env_terminfo+set}" = set; then
17973  enableval="$enable_env_terminfo"
17974  cf_env_terminfo=yes
17975else
17976  cf_env_terminfo=no
17977fi;
17978			echo "$as_me:17978: result: $cf_env_terminfo" >&5
17979echo "${ECHO_T}$cf_env_terminfo" >&6
17980			test $cf_env_terminfo = yes &&
17981
17982cat >>confdefs.h <<\EOF
17983#define OWN_TERMINFO_ENV 1
17984EOF
17985
17986		else
17987			{ echo "$as_me:17987: WARNING: not a directory" >&5
17988echo "$as_me: WARNING: not a directory" >&2;}
17989		fi
17990	elif test "$prefix" != NONE ; then
17991		TERMINFO_DIR='${prefix}/lib/terminfo'
17992	elif test -d /usr/lib/terminfo ; then
17993		TERMINFO_DIR=/usr/lib/terminfo
17994	else
17995		TERMINFO_DIR=
17996	fi
17997	SET_TERMINFO=
17998	if test -n "$TERMINFO_DIR" ; then
17999		TERMINFO_DIR='$(DESTDIR)'$TERMINFO_DIR
18000		SET_TERMINFO='TERMINFO=$(TERMINFO_DIR)'
18001	fi
18002	no_ticprog=
18003else
18004	no_ticprog="#"
18005	TERMINFO_DIR=
18006	SET_TERMINFO=
18007fi
18008
18009###############################################################################
18010
18011echo "$as_me:18011: checking if you want active-icons" >&5
18012echo $ECHO_N "checking if you want active-icons... $ECHO_C" >&6
18013
18014# Check whether --enable-active-icon or --disable-active-icon was given.
18015if test "${enable_active_icon+set}" = set; then
18016  enableval="$enable_active_icon"
18017  test "$enableval" != no && enableval=yes
18018	if test "$enableval" != "yes" ; then
18019    enable_active_icon=no
18020	else
18021		enable_active_icon=yes
18022	fi
18023else
18024  enableval=yes
18025	enable_active_icon=yes
18026
18027fi;
18028echo "$as_me:18028: result: $enable_active_icon" >&5
18029echo "${ECHO_T}$enable_active_icon" >&6
18030if test "$enable_active_icon" = no ; then
18031
18032cat >>confdefs.h <<\EOF
18033#define NO_ACTIVE_ICON 1
18034EOF
18035
18036fi
18037
18038echo "$as_me:18038: checking if you want ANSI color" >&5
18039echo $ECHO_N "checking if you want ANSI color... $ECHO_C" >&6
18040
18041# Check whether --enable-ansi-color or --disable-ansi-color was given.
18042if test "${enable_ansi_color+set}" = set; then
18043  enableval="$enable_ansi_color"
18044  test "$enableval" != no && enableval=yes
18045	if test "$enableval" != "yes" ; then
18046    enable_ansi_color=no
18047	else
18048		enable_ansi_color=yes
18049	fi
18050else
18051  enableval=yes
18052	enable_ansi_color=yes
18053
18054fi;
18055echo "$as_me:18055: result: $enable_ansi_color" >&5
18056echo "${ECHO_T}$enable_ansi_color" >&6
18057test "$enable_ansi_color" = no &&
18058cat >>confdefs.h <<\EOF
18059#define OPT_ISO_COLORS 0
18060EOF
18061
18062if test "$enable_ansi_color" = yes ; then
18063
18064	echo "$as_me:18064: checking if you want 16 colors like aixterm" >&5
18065echo $ECHO_N "checking if you want 16 colors like aixterm... $ECHO_C" >&6
18066
18067# Check whether --enable-16-color or --disable-16-color was given.
18068if test "${enable_16_color+set}" = set; then
18069  enableval="$enable_16_color"
18070  test "$enableval" != no && enableval=yes
18071	if test "$enableval" != "yes" ; then
18072    enable_16_color=no
18073	else
18074		enable_16_color=yes
18075	fi
18076else
18077  enableval=yes
18078	enable_16_color=yes
18079
18080fi;
18081	echo "$as_me:18081: result: $enable_16_color" >&5
18082echo "${ECHO_T}$enable_16_color" >&6
18083	test "$enable_16_color" = no &&
18084cat >>confdefs.h <<\EOF
18085#define OPT_AIX_COLORS 0
18086EOF
18087
18088	echo "$as_me:18088: checking if you want 256 colors" >&5
18089echo $ECHO_N "checking if you want 256 colors... $ECHO_C" >&6
18090
18091# Check whether --enable-256-color or --disable-256-color was given.
18092if test "${enable_256_color+set}" = set; then
18093  enableval="$enable_256_color"
18094  test "$enableval" != no && enableval=yes
18095	if test "$enableval" != "yes" ; then
18096    enable_256_color=no
18097	else
18098		enable_256_color=yes
18099	fi
18100else
18101  enableval=yes
18102	enable_256_color=yes
18103
18104fi;
18105	echo "$as_me:18105: result: $enable_256_color" >&5
18106echo "${ECHO_T}$enable_256_color" >&6
18107
18108	if test "$enable_256_color" = yes ; then
18109
18110		CHARPROC_DEPS="$CHARPROC_DEPS 256colres.h"
18111		EXTRAHDRS="$EXTRAHDRS 256colres.h"
18112
18113cat >>confdefs.h <<\EOF
18114#define OPT_256_COLORS 1
18115EOF
18116
18117		echo "$as_me:18117: checking if you want direct-color support" >&5
18118echo $ECHO_N "checking if you want direct-color support... $ECHO_C" >&6
18119
18120# Check whether --enable-direct-color or --disable-direct-color was given.
18121if test "${enable_direct_color+set}" = set; then
18122  enableval="$enable_direct_color"
18123  test "$enableval" != no && enableval=yes
18124	if test "$enableval" != "yes" ; then
18125    enable_direct_color=no
18126	else
18127		enable_direct_color=yes
18128	fi
18129else
18130  enableval=yes
18131	enable_direct_color=yes
18132
18133fi;
18134		echo "$as_me:18134: result: $enable_direct_color" >&5
18135echo "${ECHO_T}$enable_direct_color" >&6
18136		if test "$enable_direct_color" = yes ; then
18137
18138cat >>confdefs.h <<\EOF
18139#define OPT_DIRECT_COLOR 1
18140EOF
18141
18142		fi
18143
18144	else
18145
18146		echo "$as_me:18146: checking if you want 88 colors" >&5
18147echo $ECHO_N "checking if you want 88 colors... $ECHO_C" >&6
18148
18149# Check whether --enable-88-color or --disable-88-color was given.
18150if test "${enable_88_color+set}" = set; then
18151  enableval="$enable_88_color"
18152  test "$enableval" != no && enableval=yes
18153	if test "$enableval" != "yes" ; then
18154    enable_88_color=no
18155	else
18156		enable_88_color=yes
18157	fi
18158else
18159  enableval=yes
18160	enable_88_color=yes
18161
18162fi;
18163		echo "$as_me:18163: result: $enable_88_color" >&5
18164echo "${ECHO_T}$enable_88_color" >&6
18165		if test "$enable_88_color" = yes ; then
18166			CHARPROC_DEPS="$CHARPROC_DEPS 88colres.h"
18167			EXTRAHDRS="$EXTRAHDRS 88colres.h"
18168
18169cat >>confdefs.h <<\EOF
18170#define OPT_88_COLORS 1
18171EOF
18172
18173		fi
18174
18175	fi
18176
18177fi
18178
18179echo "$as_me:18179: checking if you want blinking cursor" >&5
18180echo $ECHO_N "checking if you want blinking cursor... $ECHO_C" >&6
18181
18182# Check whether --enable-blink-cursor or --disable-blink-cursor was given.
18183if test "${enable_blink_cursor+set}" = set; then
18184  enableval="$enable_blink_cursor"
18185  test "$enableval" != no && enableval=yes
18186	if test "$enableval" != "yes" ; then
18187    enable_blink_curs=no
18188	else
18189		enable_blink_curs=yes
18190	fi
18191else
18192  enableval=yes
18193	enable_blink_curs=yes
18194
18195fi;
18196echo "$as_me:18196: result: $enable_blink_curs" >&5
18197echo "${ECHO_T}$enable_blink_curs" >&6
18198test "$enable_blink_curs" = no &&
18199cat >>confdefs.h <<\EOF
18200#define OPT_BLINK_CURS 0
18201EOF
18202
18203echo "$as_me:18203: checking if you want to ignore Linux's broken palette-strings" >&5
18204echo $ECHO_N "checking if you want to ignore Linux's broken palette-strings... $ECHO_C" >&6
18205
18206case $host_os in
18207(linux*)
18208	assume_broken_osc=yes ;;
18209(*)
18210	assume_broken_osc=no ;;
18211esac
18212
18213# Check whether --enable-broken-osc or --disable-broken-osc was given.
18214if test "${enable_broken_osc+set}" = set; then
18215  enableval="$enable_broken_osc"
18216  test "$enableval" != no && enableval=yes
18217	if test "$enableval" != "$assume_broken_osc" ; then
18218    enable_broken_osc=$enableval
18219	else
18220		enable_broken_osc=$enableval
18221	fi
18222else
18223  enableval=$assume_broken_osc
18224	enable_broken_osc=$enableval
18225
18226fi;
18227echo "$as_me:18227: result: $enable_broken_osc" >&5
18228echo "${ECHO_T}$enable_broken_osc" >&6
18229if test "$enable_broken_osc" = yes ; then
18230
18231cat >>confdefs.h <<\EOF
18232#define OPT_BROKEN_OSC 1
18233EOF
18234
18235else
18236
18237cat >>confdefs.h <<\EOF
18238#define OPT_BROKEN_OSC 0
18239EOF
18240
18241fi
18242
18243echo "$as_me:18243: checking if you want to allow broken string-terminators" >&5
18244echo $ECHO_N "checking if you want to allow broken string-terminators... $ECHO_C" >&6
18245
18246# Check whether --enable-broken-st or --disable-broken-st was given.
18247if test "${enable_broken_st+set}" = set; then
18248  enableval="$enable_broken_st"
18249  test "$enableval" != yes && enableval=no
18250	if test "$enableval" != "no" ; then
18251    enable_broken_st=no
18252	else
18253		enable_broken_st=yes
18254	fi
18255else
18256  enableval=no
18257	enable_broken_st=yes
18258
18259fi;
18260echo "$as_me:18260: result: $enable_broken_st" >&5
18261echo "${ECHO_T}$enable_broken_st" >&6
18262test "$enable_broken_st" = no &&
18263cat >>confdefs.h <<\EOF
18264#define OPT_BROKEN_ST 0
18265EOF
18266
18267echo "$as_me:18267: checking if you want to compile-in icon data" >&5
18268echo $ECHO_N "checking if you want to compile-in icon data... $ECHO_C" >&6
18269
18270# Check whether --enable-builtin-xpms or --disable-builtin-xpms was given.
18271if test "${enable_builtin_xpms+set}" = set; then
18272  enableval="$enable_builtin_xpms"
18273  test "$enableval" != yes && enableval=no
18274	if test "$enableval" != "no" ; then
18275    enable_builtin_xpms=yes
18276	else
18277		enable_builtin_xpms=no
18278	fi
18279else
18280  enableval=no
18281	enable_builtin_xpms=no
18282
18283fi;
18284echo "$as_me:18284: result: $enable_builtin_xpms" >&5
18285echo "${ECHO_T}$enable_builtin_xpms" >&6
18286test "$enable_builtin_xpms" = yes &&
18287cat >>confdefs.h <<\EOF
18288#define OPT_BUILTIN_XPMS 1
18289EOF
18290
18291echo "$as_me:18291: checking if you want printable 128-159" >&5
18292echo $ECHO_N "checking if you want printable 128-159... $ECHO_C" >&6
18293
18294# Check whether --enable-c1-print or --disable-c1-print was given.
18295if test "${enable_c1_print+set}" = set; then
18296  enableval="$enable_c1_print"
18297  test "$enableval" != no && enableval=yes
18298	if test "$enableval" != "yes" ; then
18299    enable_c1_print=no
18300	else
18301		enable_c1_print=yes
18302	fi
18303else
18304  enableval=yes
18305	enable_c1_print=yes
18306
18307fi;
18308echo "$as_me:18308: result: $enable_c1_print" >&5
18309echo "${ECHO_T}$enable_c1_print" >&6
18310test "$enable_c1_print" = no &&
18311cat >>confdefs.h <<\EOF
18312#define OPT_C1_PRINT 0
18313EOF
18314
18315if test "$enable_ansi_color" = yes ; then
18316
18317	echo "$as_me:18317: checking if you want bold colors mapped like IBM PC" >&5
18318echo $ECHO_N "checking if you want bold colors mapped like IBM PC... $ECHO_C" >&6
18319
18320# Check whether --enable-bold-color or --disable-bold-color was given.
18321if test "${enable_bold_color+set}" = set; then
18322  enableval="$enable_bold_color"
18323  test "$enableval" != no && enableval=yes
18324	if test "$enableval" != "yes" ; then
18325    enable_pc_color=no
18326	else
18327		enable_pc_color=yes
18328	fi
18329else
18330  enableval=yes
18331	enable_pc_color=yes
18332
18333fi;
18334	echo "$as_me:18334: result: $enable_pc_color" >&5
18335echo "${ECHO_T}$enable_pc_color" >&6
18336	test "$enable_pc_color" = no &&
18337cat >>confdefs.h <<\EOF
18338#define OPT_PC_COLORS 0
18339EOF
18340
18341	echo "$as_me:18341: checking if you want separate color-classes" >&5
18342echo $ECHO_N "checking if you want separate color-classes... $ECHO_C" >&6
18343
18344# Check whether --enable-color-class or --disable-color-class was given.
18345if test "${enable_color_class+set}" = set; then
18346  enableval="$enable_color_class"
18347  test "$enableval" != no && enableval=yes
18348	if test "$enableval" != "yes" ; then
18349    enable_color_class=no
18350	else
18351		enable_color_class=yes
18352	fi
18353else
18354  enableval=yes
18355	enable_color_class=yes
18356
18357fi;
18358	echo "$as_me:18358: result: $enable_color_class" >&5
18359echo "${ECHO_T}$enable_color_class" >&6
18360	test "$enable_color_class" = no &&
18361cat >>confdefs.h <<\EOF
18362#define OPT_COLOR_CLASS 0
18363EOF
18364
18365	echo "$as_me:18365: checking if you want color-mode enabled by default" >&5
18366echo $ECHO_N "checking if you want color-mode enabled by default... $ECHO_C" >&6
18367
18368# Check whether --enable-color-mode or --disable-color-mode was given.
18369if test "${enable_color_mode+set}" = set; then
18370  enableval="$enable_color_mode"
18371  test "$enableval" != no && enableval=yes
18372	if test "$enableval" != "yes" ; then
18373    default_colormode=no
18374	else
18375		default_colormode=yes
18376	fi
18377else
18378  enableval=yes
18379	default_colormode=yes
18380
18381fi;
18382	echo "$as_me:18382: result: $default_colormode" >&5
18383echo "${ECHO_T}$default_colormode" >&6
18384	test "$default_colormode" = no &&
18385cat >>confdefs.h <<\EOF
18386#define DFT_COLORMODE 0
18387EOF
18388
18389fi
18390
18391echo "$as_me:18391: checking if you want support for color highlighting" >&5
18392echo $ECHO_N "checking if you want support for color highlighting... $ECHO_C" >&6
18393
18394# Check whether --enable-highlighting or --disable-highlighting was given.
18395if test "${enable_highlighting+set}" = set; then
18396  enableval="$enable_highlighting"
18397  test "$enableval" != no && enableval=yes
18398	if test "$enableval" != "yes" ; then
18399    default_highlight=no
18400	else
18401		default_highlight=yes
18402	fi
18403else
18404  enableval=yes
18405	default_highlight=yes
18406
18407fi;
18408echo "$as_me:18408: result: $default_highlight" >&5
18409echo "${ECHO_T}$default_highlight" >&6
18410test "$default_highlight" = no &&
18411cat >>confdefs.h <<\EOF
18412#define OPT_HIGHLIGHT_COLOR 0
18413EOF
18414
18415echo "$as_me:18415: checking if you want support for doublesize characters" >&5
18416echo $ECHO_N "checking if you want support for doublesize characters... $ECHO_C" >&6
18417
18418# Check whether --enable-doublechars or --disable-doublechars was given.
18419if test "${enable_doublechars+set}" = set; then
18420  enableval="$enable_doublechars"
18421  test "$enableval" != no && enableval=yes
18422	if test "$enableval" != "yes" ; then
18423    enable_doublechars=no
18424	else
18425		enable_doublechars=yes
18426	fi
18427else
18428  enableval=yes
18429	enable_doublechars=yes
18430
18431fi;
18432echo "$as_me:18432: result: $enable_doublechars" >&5
18433echo "${ECHO_T}$enable_doublechars" >&6
18434test "$enable_doublechars" = no &&
18435cat >>confdefs.h <<\EOF
18436#define OPT_DEC_CHRSET 0
18437EOF
18438
18439echo "$as_me:18439: checking if you want fallback-support for box characters" >&5
18440echo $ECHO_N "checking if you want fallback-support for box characters... $ECHO_C" >&6
18441
18442# Check whether --enable-boxchars or --disable-boxchars was given.
18443if test "${enable_boxchars+set}" = set; then
18444  enableval="$enable_boxchars"
18445  test "$enableval" != no && enableval=yes
18446	if test "$enableval" != "yes" ; then
18447    enable_boxchars=no
18448	else
18449		enable_boxchars=yes
18450	fi
18451else
18452  enableval=yes
18453	enable_boxchars=yes
18454
18455fi;
18456echo "$as_me:18456: result: $enable_boxchars" >&5
18457echo "${ECHO_T}$enable_boxchars" >&6
18458test "$enable_boxchars" = no &&
18459cat >>confdefs.h <<\EOF
18460#define OPT_BOX_CHARS 0
18461EOF
18462
18463echo "$as_me:18463: checking if you want to allow spawning new xterms" >&5
18464echo $ECHO_N "checking if you want to allow spawning new xterms... $ECHO_C" >&6
18465
18466# Check whether --enable-exec-xterm or --disable-exec-xterm was given.
18467if test "${enable_exec_xterm+set}" = set; then
18468  enableval="$enable_exec_xterm"
18469  test "$enableval" != yes && enableval=no
18470	if test "$enableval" != "no" ; then
18471    enable_exec_xterm=yes
18472	else
18473		enable_exec_xterm=no
18474	fi
18475else
18476  enableval=no
18477	enable_exec_xterm=no
18478
18479fi;
18480echo "$as_me:18480: result: $enable_exec_xterm" >&5
18481echo "${ECHO_T}$enable_exec_xterm" >&6
18482if test "$enable_exec_xterm" = yes ; then
18483
18484echo "$as_me:18484: checking for proc tree with cwd-support" >&5
18485echo $ECHO_N "checking for proc tree with cwd-support... $ECHO_C" >&6
18486if test "${cf_cv_procfs_cwd+set}" = set; then
18487  echo $ECHO_N "(cached) $ECHO_C" >&6
18488else
18489
18490cf_cv_procfs_cwd=no
18491for cf_path in /proc /compat/linux/proc /usr/compat/linux/proc
18492do
18493	if test -d "$cf_path" && \
18494	   test -d "$cf_path"/$$ && \
18495	   { test -d "$cf_path"/$$/cwd || \
18496	     test -L "$cf_path"/$$/cwd; }; then
18497		cf_cv_procfs_cwd="$cf_path"
18498		break
18499	fi
18500done
18501
18502fi
18503echo "$as_me:18503: result: $cf_cv_procfs_cwd" >&5
18504echo "${ECHO_T}$cf_cv_procfs_cwd" >&6
18505
18506	if test "$cf_cv_procfs_cwd" = no ; then
18507		{ echo "$as_me:18507: WARNING: no suitable proc filesystem found" >&5
18508echo "$as_me: WARNING: no suitable proc filesystem found" >&2;}
18509	else
18510
18511cat >>confdefs.h <<EOF
18512#define PROCFS_ROOT "$cf_cv_procfs_cwd"
18513EOF
18514
18515cat >>confdefs.h <<\EOF
18516#define OPT_EXEC_XTERM 1
18517EOF
18518
18519	fi
18520fi
18521
18522if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "Xext"; then
18523	test -n "$verbose" && echo "	found package Xext" 1>&6
18524
18525echo "${as_me:-configure}:18525: testing found package Xext ..." 1>&5
18526
18527	cf_pkgconfig_incs="`$PKG_CONFIG --cflags "Xext" 2>/dev/null`"
18528	cf_pkgconfig_libs="`$PKG_CONFIG --libs   "Xext" 2>/dev/null`"
18529	test -n "$verbose" && echo "	package Xext CFLAGS: $cf_pkgconfig_incs" 1>&6
18530
18531echo "${as_me:-configure}:18531: testing package Xext CFLAGS: $cf_pkgconfig_incs ..." 1>&5
18532
18533	test -n "$verbose" && echo "	package Xext LIBS: $cf_pkgconfig_libs" 1>&6
18534
18535echo "${as_me:-configure}:18535: testing package Xext LIBS: $cf_pkgconfig_libs ..." 1>&5
18536
18537cf_fix_cppflags=no
18538cf_new_cflags=
18539cf_new_cppflags=
18540cf_new_extra_cppflags=
18541
18542for cf_add_cflags in $cf_pkgconfig_incs
18543do
18544case "$cf_fix_cppflags" in
18545(no)
18546	case "$cf_add_cflags" in
18547	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18548		case "$cf_add_cflags" in
18549		(-D*)
18550			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18551
18552			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18553				&& test -z "${cf_tst_cflags}" \
18554				&& cf_fix_cppflags=yes
18555
18556			if test "$cf_fix_cppflags" = yes ; then
18557
18558	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18559	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18560
18561				continue
18562			elif test "${cf_tst_cflags}" = "\"'" ; then
18563
18564	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18565	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18566
18567				continue
18568			fi
18569			;;
18570		esac
18571		case "$CPPFLAGS" in
18572		(*$cf_add_cflags)
18573			;;
18574		(*)
18575			case "$cf_add_cflags" in
18576			(-D*)
18577				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18578
18579CPPFLAGS=`echo "$CPPFLAGS" | \
18580	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
18581		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
18582
18583				;;
18584			esac
18585
18586	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18587	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18588
18589			;;
18590		esac
18591		;;
18592	(*)
18593
18594	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18595	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18596
18597		;;
18598	esac
18599	;;
18600(yes)
18601
18602	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18603	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18604
18605	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
18606
18607	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18608		&& test -z "${cf_tst_cflags}" \
18609		&& cf_fix_cppflags=no
18610	;;
18611esac
18612done
18613
18614if test -n "$cf_new_cflags" ; then
18615
18616	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18617	CFLAGS="${CFLAGS}$cf_new_cflags"
18618
18619fi
18620
18621if test -n "$cf_new_cppflags" ; then
18622
18623	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18624	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18625
18626fi
18627
18628if test -n "$cf_new_extra_cppflags" ; then
18629
18630	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18631	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18632
18633fi
18634
18635cf_add_libs="$LIBS"
18636# reverse order
18637cf_add_0lib=
18638for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
18639# filter duplicates
18640for cf_add_1lib in $cf_add_0lib; do
18641	for cf_add_2lib in $cf_add_libs; do
18642		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
18643			cf_add_1lib=
18644			break
18645		fi
18646	done
18647	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
18648done
18649LIBS="$cf_add_libs"
18650
18651	:
18652else
18653	cf_pkgconfig_incs=
18654	cf_pkgconfig_libs=
18655
18656	echo "$as_me:18656: checking for XextCreateExtension in -lXext" >&5
18657echo $ECHO_N "checking for XextCreateExtension in -lXext... $ECHO_C" >&6
18658if test "${ac_cv_lib_Xext_XextCreateExtension+set}" = set; then
18659  echo $ECHO_N "(cached) $ECHO_C" >&6
18660else
18661  ac_check_lib_save_LIBS=$LIBS
18662LIBS="-lXext  $LIBS"
18663cat >"conftest.$ac_ext" <<_ACEOF
18664#line 18664 "configure"
18665#include "confdefs.h"
18666
18667/* Override any gcc2 internal prototype to avoid an error.  */
18668#ifdef __cplusplus
18669extern "C"
18670#endif
18671/* We use char because int might match the return type of a gcc2
18672   builtin and then its argument prototype would still apply.  */
18673char XextCreateExtension ();
18674int
18675main (void)
18676{
18677XextCreateExtension ();
18678  ;
18679  return 0;
18680}
18681_ACEOF
18682rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18683if { (eval echo "$as_me:18683: \"$ac_link\"") >&5
18684  (eval $ac_link) 2>&5
18685  ac_status=$?
18686  echo "$as_me:18686: \$? = $ac_status" >&5
18687  (exit "$ac_status"); } &&
18688         { ac_try='test -s "conftest$ac_exeext"'
18689  { (eval echo "$as_me:18689: \"$ac_try\"") >&5
18690  (eval $ac_try) 2>&5
18691  ac_status=$?
18692  echo "$as_me:18692: \$? = $ac_status" >&5
18693  (exit "$ac_status"); }; }; then
18694  ac_cv_lib_Xext_XextCreateExtension=yes
18695else
18696  echo "$as_me: failed program was:" >&5
18697cat "conftest.$ac_ext" >&5
18698ac_cv_lib_Xext_XextCreateExtension=no
18699fi
18700rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18701LIBS=$ac_check_lib_save_LIBS
18702fi
18703echo "$as_me:18703: result: $ac_cv_lib_Xext_XextCreateExtension" >&5
18704echo "${ECHO_T}$ac_cv_lib_Xext_XextCreateExtension" >&6
18705if test "$ac_cv_lib_Xext_XextCreateExtension" = yes; then
18706
18707cf_add_libs="$LIBS"
18708# reverse order
18709cf_add_0lib=
18710for cf_add_1lib in -lXext; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
18711# filter duplicates
18712for cf_add_1lib in $cf_add_0lib; do
18713	for cf_add_2lib in $cf_add_libs; do
18714		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
18715			cf_add_1lib=
18716			break
18717		fi
18718	done
18719	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
18720done
18721LIBS="$cf_add_libs"
18722
18723fi
18724
18725fi
18726
18727echo "$as_me:18727: checking for X11/extensions/Xdbe.h" >&5
18728echo $ECHO_N "checking for X11/extensions/Xdbe.h... $ECHO_C" >&6
18729if test "${ac_cv_header_X11_extensions_Xdbe_h+set}" = set; then
18730  echo $ECHO_N "(cached) $ECHO_C" >&6
18731else
18732  cat >"conftest.$ac_ext" <<_ACEOF
18733#line 18733 "configure"
18734#include "confdefs.h"
18735#include <X11/extensions/Xdbe.h>
18736_ACEOF
18737if { (eval echo "$as_me:18737: \"$ac_cpp "conftest.$ac_ext"\"") >&5
18738  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
18739  ac_status=$?
18740  $EGREP -v '^ *\+' conftest.er1 >conftest.err
18741  rm -f conftest.er1
18742  cat conftest.err >&5
18743  echo "$as_me:18743: \$? = $ac_status" >&5
18744  (exit "$ac_status"); } >/dev/null; then
18745  if test -s conftest.err; then
18746    ac_cpp_err=$ac_c_preproc_warn_flag
18747  else
18748    ac_cpp_err=
18749  fi
18750else
18751  ac_cpp_err=yes
18752fi
18753if test -z "$ac_cpp_err"; then
18754  ac_cv_header_X11_extensions_Xdbe_h=yes
18755else
18756  echo "$as_me: failed program was:" >&5
18757  cat "conftest.$ac_ext" >&5
18758  ac_cv_header_X11_extensions_Xdbe_h=no
18759fi
18760rm -f conftest.err "conftest.$ac_ext"
18761fi
18762echo "$as_me:18762: result: $ac_cv_header_X11_extensions_Xdbe_h" >&5
18763echo "${ECHO_T}$ac_cv_header_X11_extensions_Xdbe_h" >&6
18764if test "$ac_cv_header_X11_extensions_Xdbe_h" = yes; then
18765
18766cat >>confdefs.h <<\EOF
18767#define HAVE_X11_EXTENSIONS_XDBE_H 1
18768EOF
18769
18770	echo "$as_me:18770: checking for XdbeSwapBuffers" >&5
18771echo $ECHO_N "checking for XdbeSwapBuffers... $ECHO_C" >&6
18772if test "${ac_cv_func_XdbeSwapBuffers+set}" = set; then
18773  echo $ECHO_N "(cached) $ECHO_C" >&6
18774else
18775  cat >"conftest.$ac_ext" <<_ACEOF
18776#line 18776 "configure"
18777#include "confdefs.h"
18778#define XdbeSwapBuffers autoconf_temporary
18779#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
18780#undef XdbeSwapBuffers
18781
18782#ifdef __cplusplus
18783extern "C"
18784#endif
18785
18786/* We use char because int might match the return type of a gcc2
18787   builtin and then its argument prototype would still apply.  */
18788char XdbeSwapBuffers (void);
18789
18790int
18791main (void)
18792{
18793
18794/* The GNU C library defines stubs for functions which it implements
18795    to always fail with ENOSYS.  Some functions are actually named
18796    something starting with __ and the normal name is an alias.  */
18797#if defined (__stub_XdbeSwapBuffers) || defined (__stub___XdbeSwapBuffers)
18798#error found stub for XdbeSwapBuffers
18799#endif
18800
18801	return XdbeSwapBuffers ();
18802  ;
18803  return 0;
18804}
18805_ACEOF
18806rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18807if { (eval echo "$as_me:18807: \"$ac_link\"") >&5
18808  (eval $ac_link) 2>&5
18809  ac_status=$?
18810  echo "$as_me:18810: \$? = $ac_status" >&5
18811  (exit "$ac_status"); } &&
18812         { ac_try='test -s "conftest$ac_exeext"'
18813  { (eval echo "$as_me:18813: \"$ac_try\"") >&5
18814  (eval $ac_try) 2>&5
18815  ac_status=$?
18816  echo "$as_me:18816: \$? = $ac_status" >&5
18817  (exit "$ac_status"); }; }; then
18818  ac_cv_func_XdbeSwapBuffers=yes
18819else
18820  echo "$as_me: failed program was:" >&5
18821cat "conftest.$ac_ext" >&5
18822ac_cv_func_XdbeSwapBuffers=no
18823fi
18824rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18825fi
18826echo "$as_me:18826: result: $ac_cv_func_XdbeSwapBuffers" >&5
18827echo "${ECHO_T}$ac_cv_func_XdbeSwapBuffers" >&6
18828if test "$ac_cv_func_XdbeSwapBuffers" = yes; then
18829
18830cat >>confdefs.h <<\EOF
18831#define HAVE_XDBESWAPBUFFERS 1
18832EOF
18833
18834				   cf_x_ext_double_buffer=yes
18835fi
18836
18837fi
18838
18839double_buffer=False
18840if test "$cf_x_ext_double_buffer" = yes ; then
18841	echo "$as_me:18841: checking if you want to enable double-buffering in default resources" >&5
18842echo $ECHO_N "checking if you want to enable double-buffering in default resources... $ECHO_C" >&6
18843
18844# Check whether --enable-double-buffer or --disable-double-buffer was given.
18845if test "${enable_double_buffer+set}" = set; then
18846  enableval="$enable_double_buffer"
18847  test "$enableval" != yes && enableval=no
18848	if test "$enableval" != "no" ; then
18849    enable_double_bfr=yes
18850	else
18851		enable_double_bfr=no
18852	fi
18853else
18854  enableval=no
18855	enable_double_bfr=no
18856
18857fi;
18858	echo "$as_me:18858: result: $enable_double_bfr" >&5
18859echo "${ECHO_T}$enable_double_bfr" >&6
18860	if test "$enable_double_bfr" = yes ; then
18861
18862cat >>confdefs.h <<\EOF
18863#define OPT_DOUBLE_BUFFER 1
18864EOF
18865
18866		double_buffer=True
18867	fi
18868fi
18869
18870echo "$as_me:18870: checking if you want to use FreeType library" >&5
18871echo $ECHO_N "checking if you want to use FreeType library... $ECHO_C" >&6
18872
18873# Check whether --enable-freetype or --disable-freetype was given.
18874if test "${enable_freetype+set}" = set; then
18875  enableval="$enable_freetype"
18876  test "$enableval" != no && enableval=yes
18877	if test "$enableval" != "yes" ; then
18878    enable_freetype=no
18879	else
18880		enable_freetype=yes
18881	fi
18882else
18883  enableval=yes
18884	enable_freetype=yes
18885
18886fi;
18887echo "$as_me:18887: result: $enable_freetype" >&5
18888echo "${ECHO_T}$enable_freetype" >&6
18889if test "$enable_freetype" = yes ; then
18890
18891cf_cv_x_freetype_incs=no
18892cf_cv_x_freetype_libs=no
18893cf_extra_freetype_libs=
18894FREETYPE_CONFIG=none
18895FREETYPE_PARAMS=
18896
18897echo "$as_me:18897: checking for FreeType configuration script" >&5
18898echo $ECHO_N "checking for FreeType configuration script... $ECHO_C" >&6
18899
18900# Check whether --with-freetype-config or --without-freetype-config was given.
18901if test "${with_freetype_config+set}" = set; then
18902  withval="$with_freetype_config"
18903  cf_cv_x_freetype_cfgs="$withval"
18904else
18905  cf_cv_x_freetype_cfgs=auto
18906fi;
18907test -z $cf_cv_x_freetype_cfgs && cf_cv_x_freetype_cfgs=auto
18908test $cf_cv_x_freetype_cfgs = no && cf_cv_x_freetype_cfgs=none
18909echo "$as_me:18909: result: $cf_cv_x_freetype_cfgs" >&5
18910echo "${ECHO_T}$cf_cv_x_freetype_cfgs" >&6
18911
18912case $cf_cv_x_freetype_cfgs in
18913(none)
18914	echo "$as_me:18914: checking if you specified -D/-I options for FreeType" >&5
18915echo $ECHO_N "checking if you specified -D/-I options for FreeType... $ECHO_C" >&6
18916
18917# Check whether --with-freetype-cflags or --without-freetype-cflags was given.
18918if test "${with_freetype_cflags+set}" = set; then
18919  withval="$with_freetype_cflags"
18920  cf_cv_x_freetype_incs="$with_freetype_cflags"
18921else
18922  cf_cv_x_freetype_incs=no
18923fi;
18924	echo "$as_me:18924: result: $cf_cv_x_freetype_incs" >&5
18925echo "${ECHO_T}$cf_cv_x_freetype_incs" >&6
18926
18927	echo "$as_me:18927: checking if you specified -L/-l options for FreeType" >&5
18928echo $ECHO_N "checking if you specified -L/-l options for FreeType... $ECHO_C" >&6
18929
18930# Check whether --with-freetype-libs or --without-freetype-libs was given.
18931if test "${with_freetype_libs+set}" = set; then
18932  withval="$with_freetype_libs"
18933  cf_cv_x_freetype_libs="$with_freetype_libs"
18934else
18935  cf_cv_x_freetype_libs=no
18936fi;
18937	echo "$as_me:18937: result: $cf_cv_x_freetype_libs" >&5
18938echo "${ECHO_T}$cf_cv_x_freetype_libs" >&6
18939	;;
18940(auto)
18941	if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xft; then
18942		FREETYPE_CONFIG=$PKG_CONFIG
18943		FREETYPE_PARAMS=xft
18944	else
18945		# Extract the first word of "freetype-config", so it can be a program name with args.
18946set dummy freetype-config; ac_word=$2
18947echo "$as_me:18947: checking for $ac_word" >&5
18948echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
18949if test "${ac_cv_path_FREETYPE_CONFIG+set}" = set; then
18950  echo $ECHO_N "(cached) $ECHO_C" >&6
18951else
18952  case $FREETYPE_CONFIG in
18953  [\\/]* | ?:[\\/]*)
18954  ac_cv_path_FREETYPE_CONFIG="$FREETYPE_CONFIG" # Let the user override the test with a path.
18955  ;;
18956  *)
18957  ac_save_IFS=$IFS; IFS=$ac_path_separator
18958ac_dummy="$PATH"
18959for ac_dir in $ac_dummy; do
18960  IFS=$ac_save_IFS
18961  test -z "$ac_dir" && ac_dir=.
18962  if $as_executable_p "$ac_dir/$ac_word"; then
18963   ac_cv_path_FREETYPE_CONFIG="$ac_dir/$ac_word"
18964   echo "$as_me:18964: found $ac_dir/$ac_word" >&5
18965   break
18966fi
18967done
18968
18969  test -z "$ac_cv_path_FREETYPE_CONFIG" && ac_cv_path_FREETYPE_CONFIG="none"
18970  ;;
18971esac
18972fi
18973FREETYPE_CONFIG=$ac_cv_path_FREETYPE_CONFIG
18974
18975if test -n "$FREETYPE_CONFIG"; then
18976  echo "$as_me:18976: result: $FREETYPE_CONFIG" >&5
18977echo "${ECHO_T}$FREETYPE_CONFIG" >&6
18978else
18979  echo "$as_me:18979: result: no" >&5
18980echo "${ECHO_T}no" >&6
18981fi
18982
18983		if test "$FREETYPE_CONFIG" != none; then
18984			FREETYPE_CONFIG=$FREETYPE_CONFIG
18985			cf_extra_freetype_libs="-lXft"
18986		else
18987			# Extract the first word of "xft-config", so it can be a program name with args.
18988set dummy xft-config; ac_word=$2
18989echo "$as_me:18989: checking for $ac_word" >&5
18990echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
18991if test "${ac_cv_path_FREETYPE_OLD_CONFIG+set}" = set; then
18992  echo $ECHO_N "(cached) $ECHO_C" >&6
18993else
18994  case $FREETYPE_OLD_CONFIG in
18995  [\\/]* | ?:[\\/]*)
18996  ac_cv_path_FREETYPE_OLD_CONFIG="$FREETYPE_OLD_CONFIG" # Let the user override the test with a path.
18997  ;;
18998  *)
18999  ac_save_IFS=$IFS; IFS=$ac_path_separator
19000ac_dummy="$PATH"
19001for ac_dir in $ac_dummy; do
19002  IFS=$ac_save_IFS
19003  test -z "$ac_dir" && ac_dir=.
19004  if $as_executable_p "$ac_dir/$ac_word"; then
19005   ac_cv_path_FREETYPE_OLD_CONFIG="$ac_dir/$ac_word"
19006   echo "$as_me:19006: found $ac_dir/$ac_word" >&5
19007   break
19008fi
19009done
19010
19011  test -z "$ac_cv_path_FREETYPE_OLD_CONFIG" && ac_cv_path_FREETYPE_OLD_CONFIG="none"
19012  ;;
19013esac
19014fi
19015FREETYPE_OLD_CONFIG=$ac_cv_path_FREETYPE_OLD_CONFIG
19016
19017if test -n "$FREETYPE_OLD_CONFIG"; then
19018  echo "$as_me:19018: result: $FREETYPE_OLD_CONFIG" >&5
19019echo "${ECHO_T}$FREETYPE_OLD_CONFIG" >&6
19020else
19021  echo "$as_me:19021: result: no" >&5
19022echo "${ECHO_T}no" >&6
19023fi
19024
19025			if test "$FREETYPE_OLD_CONFIG" != none; then
19026				FREETYPE_CONFIG=$FREETYPE_OLD_CONFIG
19027			fi
19028		fi
19029	fi
19030	;;
19031(pkg*)
19032	if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xft; then
19033		FREETYPE_CONFIG=$cf_cv_x_freetype_cfgs
19034		FREETYPE_PARAMS=xft
19035	else
19036		{ echo "$as_me:19036: WARNING: cannot find pkg-config for Xft" >&5
19037echo "$as_me: WARNING: cannot find pkg-config for Xft" >&2;}
19038	fi
19039	;;
19040(*)
19041	# Extract the first word of "$cf_cv_x_freetype_cfgs", so it can be a program name with args.
19042set dummy $cf_cv_x_freetype_cfgs; ac_word=$2
19043echo "$as_me:19043: checking for $ac_word" >&5
19044echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
19045if test "${ac_cv_path_FREETYPE_XFT_CONFIG+set}" = set; then
19046  echo $ECHO_N "(cached) $ECHO_C" >&6
19047else
19048  case $FREETYPE_XFT_CONFIG in
19049  [\\/]* | ?:[\\/]*)
19050  ac_cv_path_FREETYPE_XFT_CONFIG="$FREETYPE_XFT_CONFIG" # Let the user override the test with a path.
19051  ;;
19052  *)
19053  ac_save_IFS=$IFS; IFS=$ac_path_separator
19054ac_dummy="$PATH"
19055for ac_dir in $ac_dummy; do
19056  IFS=$ac_save_IFS
19057  test -z "$ac_dir" && ac_dir=.
19058  if $as_executable_p "$ac_dir/$ac_word"; then
19059   ac_cv_path_FREETYPE_XFT_CONFIG="$ac_dir/$ac_word"
19060   echo "$as_me:19060: found $ac_dir/$ac_word" >&5
19061   break
19062fi
19063done
19064
19065  test -z "$ac_cv_path_FREETYPE_XFT_CONFIG" && ac_cv_path_FREETYPE_XFT_CONFIG="none"
19066  ;;
19067esac
19068fi
19069FREETYPE_XFT_CONFIG=$ac_cv_path_FREETYPE_XFT_CONFIG
19070
19071if test -n "$FREETYPE_XFT_CONFIG"; then
19072  echo "$as_me:19072: result: $FREETYPE_XFT_CONFIG" >&5
19073echo "${ECHO_T}$FREETYPE_XFT_CONFIG" >&6
19074else
19075  echo "$as_me:19075: result: no" >&5
19076echo "${ECHO_T}no" >&6
19077fi
19078
19079	if test "$FREETYPE_XFT_CONFIG" != none; then
19080		FREETYPE_CONFIG=$FREETYPE_XFT_CONFIG
19081	else
19082		{ echo "$as_me:19082: WARNING: cannot find config script for Xft" >&5
19083echo "$as_me: WARNING: cannot find config script for Xft" >&2;}
19084	fi
19085	;;
19086esac
19087
19088if test "$FREETYPE_CONFIG" != none ; then
19089	echo "$as_me:19089: checking for FreeType config" >&5
19090echo $ECHO_N "checking for FreeType config... $ECHO_C" >&6
19091	echo "$as_me:19091: result: $FREETYPE_CONFIG $FREETYPE_PARAMS" >&5
19092echo "${ECHO_T}$FREETYPE_CONFIG $FREETYPE_PARAMS" >&6
19093
19094	if test "$cf_cv_x_freetype_incs" = no ; then
19095		echo "$as_me:19095: checking for $FREETYPE_CONFIG cflags" >&5
19096echo $ECHO_N "checking for $FREETYPE_CONFIG cflags... $ECHO_C" >&6
19097		cf_cv_x_freetype_incs="`$FREETYPE_CONFIG $FREETYPE_PARAMS --cflags 2>/dev/null`"
19098		echo "$as_me:19098: result: $cf_cv_x_freetype_incs" >&5
19099echo "${ECHO_T}$cf_cv_x_freetype_incs" >&6
19100	fi
19101
19102	if test "$cf_cv_x_freetype_libs" = no ; then
19103		echo "$as_me:19103: checking for $FREETYPE_CONFIG libs" >&5
19104echo $ECHO_N "checking for $FREETYPE_CONFIG libs... $ECHO_C" >&6
19105		cf_cv_x_freetype_libs="$cf_extra_freetype_libs `$FREETYPE_CONFIG $FREETYPE_PARAMS --libs 2>/dev/null`"
19106		echo "$as_me:19106: result: $cf_cv_x_freetype_libs" >&5
19107echo "${ECHO_T}$cf_cv_x_freetype_libs" >&6
19108	fi
19109fi
19110
19111if test "$cf_cv_x_freetype_incs" = no ; then
19112	cf_cv_x_freetype_incs=
19113fi
19114
19115if test "$cf_cv_x_freetype_libs" = no ; then
19116	cf_cv_x_freetype_libs=-lXft
19117fi
19118
19119echo "$as_me:19119: checking if we can link with FreeType libraries" >&5
19120echo $ECHO_N "checking if we can link with FreeType libraries... $ECHO_C" >&6
19121
19122cf_save_LIBS="$LIBS"
19123cf_save_INCS="$CPPFLAGS"
19124
19125cf_add_libs="$LIBS"
19126# reverse order
19127cf_add_0lib=
19128for cf_add_1lib in $cf_cv_x_freetype_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19129# filter duplicates
19130for cf_add_1lib in $cf_add_0lib; do
19131	for cf_add_2lib in $cf_add_libs; do
19132		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19133			cf_add_1lib=
19134			break
19135		fi
19136	done
19137	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19138done
19139LIBS="$cf_add_libs"
19140
19141CPPFLAGS="$CPPFLAGS $cf_cv_x_freetype_incs"
19142
19143cat >"conftest.$ac_ext" <<_ACEOF
19144#line 19144 "configure"
19145#include "confdefs.h"
19146
19147#include <X11/Xlib.h>
19148#include <X11/extensions/Xrender.h>
19149#include <X11/Xft/Xft.h>
19150int
19151main (void)
19152{
19153
19154	XftPattern  *pat = XftNameParse ("name"); (void)pat
19155  ;
19156  return 0;
19157}
19158_ACEOF
19159rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19160if { (eval echo "$as_me:19160: \"$ac_link\"") >&5
19161  (eval $ac_link) 2>&5
19162  ac_status=$?
19163  echo "$as_me:19163: \$? = $ac_status" >&5
19164  (exit "$ac_status"); } &&
19165         { ac_try='test -s "conftest$ac_exeext"'
19166  { (eval echo "$as_me:19166: \"$ac_try\"") >&5
19167  (eval $ac_try) 2>&5
19168  ac_status=$?
19169  echo "$as_me:19169: \$? = $ac_status" >&5
19170  (exit "$ac_status"); }; }; then
19171  cf_cv_found_freetype=yes
19172else
19173  echo "$as_me: failed program was:" >&5
19174cat "conftest.$ac_ext" >&5
19175cf_cv_found_freetype=no
19176fi
19177rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19178echo "$as_me:19178: result: $cf_cv_found_freetype" >&5
19179echo "${ECHO_T}$cf_cv_found_freetype" >&6
19180
19181LIBS="$cf_save_LIBS"
19182CPPFLAGS="$cf_save_INCS"
19183
19184if test "$cf_cv_found_freetype" = yes ; then
19185
19186cf_add_libs="$LIBS"
19187# reverse order
19188cf_add_0lib=
19189for cf_add_1lib in $cf_cv_x_freetype_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19190# filter duplicates
19191for cf_add_1lib in $cf_add_0lib; do
19192	for cf_add_2lib in $cf_add_libs; do
19193		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19194			cf_add_1lib=
19195			break
19196		fi
19197	done
19198	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19199done
19200LIBS="$cf_add_libs"
19201
19202cf_fix_cppflags=no
19203cf_new_cflags=
19204cf_new_cppflags=
19205cf_new_extra_cppflags=
19206
19207for cf_add_cflags in $cf_cv_x_freetype_incs
19208do
19209case "$cf_fix_cppflags" in
19210(no)
19211	case "$cf_add_cflags" in
19212	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
19213		case "$cf_add_cflags" in
19214		(-D*)
19215			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
19216
19217			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19218				&& test -z "${cf_tst_cflags}" \
19219				&& cf_fix_cppflags=yes
19220
19221			if test "$cf_fix_cppflags" = yes ; then
19222
19223	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19224	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19225
19226				continue
19227			elif test "${cf_tst_cflags}" = "\"'" ; then
19228
19229	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19230	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19231
19232				continue
19233			fi
19234			;;
19235		esac
19236		case "$CPPFLAGS" in
19237		(*$cf_add_cflags)
19238			;;
19239		(*)
19240			case "$cf_add_cflags" in
19241			(-D*)
19242				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
19243
19244CPPFLAGS=`echo "$CPPFLAGS" | \
19245	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
19246		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
19247
19248				;;
19249			esac
19250
19251	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
19252	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
19253
19254			;;
19255		esac
19256		;;
19257	(*)
19258
19259	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
19260	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
19261
19262		;;
19263	esac
19264	;;
19265(yes)
19266
19267	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19268	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19269
19270	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
19271
19272	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19273		&& test -z "${cf_tst_cflags}" \
19274		&& cf_fix_cppflags=no
19275	;;
19276esac
19277done
19278
19279if test -n "$cf_new_cflags" ; then
19280
19281	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
19282	CFLAGS="${CFLAGS}$cf_new_cflags"
19283
19284fi
19285
19286if test -n "$cf_new_cppflags" ; then
19287
19288	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
19289	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
19290
19291fi
19292
19293if test -n "$cf_new_extra_cppflags" ; then
19294
19295	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
19296	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
19297
19298fi
19299
19300cat >>confdefs.h <<\EOF
19301#define XRENDERFONT 1
19302EOF
19303
19304for ac_func in \
19305	XftDrawCharSpec \
19306	XftDrawSetClip \
19307	XftDrawSetClipRectangles \
19308
19309do
19310as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19311echo "$as_me:19311: checking for $ac_func" >&5
19312echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
19313if eval "test \"\${$as_ac_var+set}\" = set"; then
19314  echo $ECHO_N "(cached) $ECHO_C" >&6
19315else
19316  cat >"conftest.$ac_ext" <<_ACEOF
19317#line 19317 "configure"
19318#include "confdefs.h"
19319#define $ac_func autoconf_temporary
19320#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
19321#undef $ac_func
19322
19323#ifdef __cplusplus
19324extern "C"
19325#endif
19326
19327/* We use char because int might match the return type of a gcc2
19328   builtin and then its argument prototype would still apply.  */
19329char $ac_func (void);
19330
19331int
19332main (void)
19333{
19334
19335/* The GNU C library defines stubs for functions which it implements
19336    to always fail with ENOSYS.  Some functions are actually named
19337    something starting with __ and the normal name is an alias.  */
19338#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
19339#error found stub for $ac_func
19340#endif
19341
19342	return $ac_func ();
19343  ;
19344  return 0;
19345}
19346_ACEOF
19347rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19348if { (eval echo "$as_me:19348: \"$ac_link\"") >&5
19349  (eval $ac_link) 2>&5
19350  ac_status=$?
19351  echo "$as_me:19351: \$? = $ac_status" >&5
19352  (exit "$ac_status"); } &&
19353         { ac_try='test -s "conftest$ac_exeext"'
19354  { (eval echo "$as_me:19354: \"$ac_try\"") >&5
19355  (eval $ac_try) 2>&5
19356  ac_status=$?
19357  echo "$as_me:19357: \$? = $ac_status" >&5
19358  (exit "$ac_status"); }; }; then
19359  eval "$as_ac_var=yes"
19360else
19361  echo "$as_me: failed program was:" >&5
19362cat "conftest.$ac_ext" >&5
19363eval "$as_ac_var=no"
19364fi
19365rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19366fi
19367echo "$as_me:19367: result: `eval echo '${'"$as_ac_var"'}'`" >&5
19368echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
19369if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
19370  cat >>confdefs.h <<EOF
19371#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
19372EOF
19373
19374fi
19375done
19376
19377else
19378	{ echo "$as_me:19378: WARNING: No libraries found for FreeType" >&5
19379echo "$as_me: WARNING: No libraries found for FreeType" >&2;}
19380	CPPFLAGS=`echo "$CPPFLAGS" | sed -e s/-DXRENDERFONT//`
19381fi
19382
19383# FIXME: revisit this if needed
19384
19385if test "$cf_cv_found_freetype" = yes ; then
19386echo "$as_me:19386: checking for usable Xft/fontconfig package" >&5
19387echo $ECHO_N "checking for usable Xft/fontconfig package... $ECHO_C" >&6
19388if test "${cf_cv_xft_compat+set}" = set; then
19389  echo $ECHO_N "(cached) $ECHO_C" >&6
19390else
19391
19392cat >"conftest.$ac_ext" <<_ACEOF
19393#line 19393 "configure"
19394#include "confdefs.h"
19395
19396#include <X11/Xft/Xft.h>
19397
19398int
19399main (void)
19400{
19401
19402	XftPattern *pat = 0;
19403	XftPatternBuild(pat,
19404					XFT_FAMILY, XftTypeString, "mono",
19405					(void *) 0);
19406
19407  ;
19408  return 0;
19409}
19410_ACEOF
19411rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19412if { (eval echo "$as_me:19412: \"$ac_link\"") >&5
19413  (eval $ac_link) 2>&5
19414  ac_status=$?
19415  echo "$as_me:19415: \$? = $ac_status" >&5
19416  (exit "$ac_status"); } &&
19417         { ac_try='test -s "conftest$ac_exeext"'
19418  { (eval echo "$as_me:19418: \"$ac_try\"") >&5
19419  (eval $ac_try) 2>&5
19420  ac_status=$?
19421  echo "$as_me:19421: \$? = $ac_status" >&5
19422  (exit "$ac_status"); }; }; then
19423  cf_cv_xft_compat=yes
19424else
19425  echo "$as_me: failed program was:" >&5
19426cat "conftest.$ac_ext" >&5
19427cf_cv_xft_compat=no
19428fi
19429rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19430
19431fi
19432echo "$as_me:19432: result: $cf_cv_xft_compat" >&5
19433echo "${ECHO_T}$cf_cv_xft_compat" >&6
19434
19435if test "$cf_cv_xft_compat" = no
19436then
19437	# workaround for broken ".pc" files used for Xft.
19438	case "$cf_cv_x_freetype_libs" in
19439	(*-lfontconfig*)
19440		;;
19441	(*)
19442		test -n "$verbose" && echo "	work around broken package" 1>&6
19443
19444echo "${as_me:-configure}:19444: testing work around broken package ..." 1>&5
19445
19446		cf_save_fontconfig="$LIBS"
19447
19448if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "fontconfig"; then
19449	test -n "$verbose" && echo "	found package fontconfig" 1>&6
19450
19451echo "${as_me:-configure}:19451: testing found package fontconfig ..." 1>&5
19452
19453	cf_pkgconfig_incs="`$PKG_CONFIG --cflags "fontconfig" 2>/dev/null`"
19454	cf_pkgconfig_libs="`$PKG_CONFIG --libs   "fontconfig" 2>/dev/null`"
19455	test -n "$verbose" && echo "	package fontconfig CFLAGS: $cf_pkgconfig_incs" 1>&6
19456
19457echo "${as_me:-configure}:19457: testing package fontconfig CFLAGS: $cf_pkgconfig_incs ..." 1>&5
19458
19459	test -n "$verbose" && echo "	package fontconfig LIBS: $cf_pkgconfig_libs" 1>&6
19460
19461echo "${as_me:-configure}:19461: testing package fontconfig LIBS: $cf_pkgconfig_libs ..." 1>&5
19462
19463cf_fix_cppflags=no
19464cf_new_cflags=
19465cf_new_cppflags=
19466cf_new_extra_cppflags=
19467
19468for cf_add_cflags in $cf_pkgconfig_incs
19469do
19470case "$cf_fix_cppflags" in
19471(no)
19472	case "$cf_add_cflags" in
19473	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
19474		case "$cf_add_cflags" in
19475		(-D*)
19476			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
19477
19478			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19479				&& test -z "${cf_tst_cflags}" \
19480				&& cf_fix_cppflags=yes
19481
19482			if test "$cf_fix_cppflags" = yes ; then
19483
19484	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19485	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19486
19487				continue
19488			elif test "${cf_tst_cflags}" = "\"'" ; then
19489
19490	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19491	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19492
19493				continue
19494			fi
19495			;;
19496		esac
19497		case "$CPPFLAGS" in
19498		(*$cf_add_cflags)
19499			;;
19500		(*)
19501			case "$cf_add_cflags" in
19502			(-D*)
19503				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
19504
19505CPPFLAGS=`echo "$CPPFLAGS" | \
19506	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
19507		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
19508
19509				;;
19510			esac
19511
19512	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
19513	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
19514
19515			;;
19516		esac
19517		;;
19518	(*)
19519
19520	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
19521	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
19522
19523		;;
19524	esac
19525	;;
19526(yes)
19527
19528	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19529	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19530
19531	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
19532
19533	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19534		&& test -z "${cf_tst_cflags}" \
19535		&& cf_fix_cppflags=no
19536	;;
19537esac
19538done
19539
19540if test -n "$cf_new_cflags" ; then
19541
19542	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
19543	CFLAGS="${CFLAGS}$cf_new_cflags"
19544
19545fi
19546
19547if test -n "$cf_new_cppflags" ; then
19548
19549	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
19550	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
19551
19552fi
19553
19554if test -n "$cf_new_extra_cppflags" ; then
19555
19556	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
19557	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
19558
19559fi
19560
19561cf_add_libs="$LIBS"
19562# reverse order
19563cf_add_0lib=
19564for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19565# filter duplicates
19566for cf_add_1lib in $cf_add_0lib; do
19567	for cf_add_2lib in $cf_add_libs; do
19568		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19569			cf_add_1lib=
19570			break
19571		fi
19572	done
19573	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19574done
19575LIBS="$cf_add_libs"
19576
19577cf_fix_cppflags=no
19578cf_new_cflags=
19579cf_new_cppflags=
19580cf_new_extra_cppflags=
19581
19582for cf_add_cflags in $cf_pkgconfig_incs
19583do
19584case "$cf_fix_cppflags" in
19585(no)
19586	case "$cf_add_cflags" in
19587	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
19588		case "$cf_add_cflags" in
19589		(-D*)
19590			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
19591
19592			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19593				&& test -z "${cf_tst_cflags}" \
19594				&& cf_fix_cppflags=yes
19595
19596			if test "$cf_fix_cppflags" = yes ; then
19597
19598	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19599	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19600
19601				continue
19602			elif test "${cf_tst_cflags}" = "\"'" ; then
19603
19604	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19605	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19606
19607				continue
19608			fi
19609			;;
19610		esac
19611		case "$CPPFLAGS" in
19612		(*$cf_add_cflags)
19613			;;
19614		(*)
19615			case "$cf_add_cflags" in
19616			(-D*)
19617				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
19618
19619CPPFLAGS=`echo "$CPPFLAGS" | \
19620	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
19621		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
19622
19623				;;
19624			esac
19625
19626	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
19627	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
19628
19629			;;
19630		esac
19631		;;
19632	(*)
19633
19634	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
19635	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
19636
19637		;;
19638	esac
19639	;;
19640(yes)
19641
19642	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19643	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19644
19645	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
19646
19647	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19648		&& test -z "${cf_tst_cflags}" \
19649		&& cf_fix_cppflags=no
19650	;;
19651esac
19652done
19653
19654if test -n "$cf_new_cflags" ; then
19655
19656	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
19657	CFLAGS="${CFLAGS}$cf_new_cflags"
19658
19659fi
19660
19661if test -n "$cf_new_cppflags" ; then
19662
19663	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
19664	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
19665
19666fi
19667
19668if test -n "$cf_new_extra_cppflags" ; then
19669
19670	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
19671	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
19672
19673fi
19674
19675				LIBS="$cf_save_fontconfig"
19676
19677test -n "$verbose" && echo "	...before $LIBS" 1>&6
19678
19679echo "${as_me:-configure}:19679: testing ...before $LIBS ..." 1>&5
19680
19681LIBS=`echo "$LIBS" | sed -e "s/[ 	][ 	]*/ /g" -e "s%-lXft %-lXft $cf_pkgconfig_libs %" -e 's%  % %g'`
19682test -n "$verbose" && echo "	...after  $LIBS" 1>&6
19683
19684echo "${as_me:-configure}:19684: testing ...after  $LIBS ..." 1>&5
19685
19686else
19687	cf_pkgconfig_incs=
19688	cf_pkgconfig_libs=
19689
19690test -n "$verbose" && echo "	...before $LIBS" 1>&6
19691
19692echo "${as_me:-configure}:19692: testing ...before $LIBS ..." 1>&5
19693
19694LIBS=`echo "$LIBS" | sed -e "s/[ 	][ 	]*/ /g" -e "s%-lXft %-lXft -lfontconfig %" -e 's%  % %g'`
19695test -n "$verbose" && echo "	...after  $LIBS" 1>&6
19696
19697echo "${as_me:-configure}:19697: testing ...after  $LIBS ..." 1>&5
19698
19699fi
19700
19701		;;
19702	esac
19703fi
19704fi
19705
19706else
19707	CPPFLAGS=`echo "$CPPFLAGS" | sed -e s/-DXRENDERFONT//`
19708fi
19709
19710echo "$as_me:19710: checking if you want support for HP-style function keys" >&5
19711echo $ECHO_N "checking if you want support for HP-style function keys... $ECHO_C" >&6
19712
19713# Check whether --enable-hp-fkeys or --disable-hp-fkeys was given.
19714if test "${enable_hp_fkeys+set}" = set; then
19715  enableval="$enable_hp_fkeys"
19716  test "$enableval" != yes && enableval=no
19717	if test "$enableval" != "no" ; then
19718    enable_hp_fkeys=yes
19719	else
19720		enable_hp_fkeys=no
19721	fi
19722else
19723  enableval=no
19724	enable_hp_fkeys=no
19725
19726fi;
19727echo "$as_me:19727: result: $enable_hp_fkeys" >&5
19728echo "${ECHO_T}$enable_hp_fkeys" >&6
19729if test "$enable_hp_fkeys" = yes ; then
19730
19731cat >>confdefs.h <<\EOF
19732#define OPT_HP_FUNC_KEYS 1
19733EOF
19734
19735fi
19736
19737echo "$as_me:19737: checking if you want support for SCO-style function keys" >&5
19738echo $ECHO_N "checking if you want support for SCO-style function keys... $ECHO_C" >&6
19739
19740# Check whether --enable-sco-fkeys or --disable-sco-fkeys was given.
19741if test "${enable_sco_fkeys+set}" = set; then
19742  enableval="$enable_sco_fkeys"
19743  test "$enableval" != yes && enableval=no
19744	if test "$enableval" != "no" ; then
19745    enable_sco_fkeys=yes
19746	else
19747		enable_sco_fkeys=no
19748	fi
19749else
19750  enableval=no
19751	enable_sco_fkeys=no
19752
19753fi;
19754echo "$as_me:19754: result: $enable_sco_fkeys" >&5
19755echo "${ECHO_T}$enable_sco_fkeys" >&6
19756if test "$enable_sco_fkeys" = yes ; then
19757
19758cat >>confdefs.h <<\EOF
19759#define OPT_SCO_FUNC_KEYS 1
19760EOF
19761
19762fi
19763
19764echo "$as_me:19764: checking if you want support for Sun-style function keys" >&5
19765echo $ECHO_N "checking if you want support for Sun-style function keys... $ECHO_C" >&6
19766
19767# Check whether --enable-sun-fkeys or --disable-sun-fkeys was given.
19768if test "${enable_sun_fkeys+set}" = set; then
19769  enableval="$enable_sun_fkeys"
19770  test "$enableval" != no && enableval=yes
19771	if test "$enableval" != "yes" ; then
19772    enable_sun_fkeys=no
19773	else
19774		enable_sun_fkeys=yes
19775	fi
19776else
19777  enableval=yes
19778	enable_sun_fkeys=yes
19779
19780fi;
19781echo "$as_me:19781: result: $enable_sun_fkeys" >&5
19782echo "${ECHO_T}$enable_sun_fkeys" >&6
19783if test "$enable_sun_fkeys" = no ; then
19784
19785cat >>confdefs.h <<\EOF
19786#define OPT_SUN_FUNC_KEYS 0
19787EOF
19788
19789fi
19790
19791echo "$as_me:19791: checking if you want saved-lines stored as a FIFO" >&5
19792echo $ECHO_N "checking if you want saved-lines stored as a FIFO... $ECHO_C" >&6
19793
19794# Check whether --enable-fifo-lines or --disable-fifo-lines was given.
19795if test "${enable_fifo_lines+set}" = set; then
19796  enableval="$enable_fifo_lines"
19797  test "$enableval" != no && enableval=yes
19798	if test "$enableval" != "yes" ; then
19799    enable_fifo_lines=no
19800	else
19801		enable_fifo_lines=yes
19802	fi
19803else
19804  enableval=yes
19805	enable_fifo_lines=yes
19806
19807fi;
19808echo "$as_me:19808: result: $enable_fifo_lines" >&5
19809echo "${ECHO_T}$enable_fifo_lines" >&6
19810if test "$enable_fifo_lines" = yes ; then
19811
19812cat >>confdefs.h <<\EOF
19813#define OPT_FIFO_LINES 1
19814EOF
19815
19816fi
19817
19818echo "$as_me:19818: checking if you want support for internationalization" >&5
19819echo $ECHO_N "checking if you want support for internationalization... $ECHO_C" >&6
19820
19821# Check whether --enable-i18n or --disable-i18n was given.
19822if test "${enable_i18n+set}" = set; then
19823  enableval="$enable_i18n"
19824  test "$enableval" != no && enableval=yes
19825	if test "$enableval" != "yes" ; then
19826    enable_i18n=no
19827	else
19828		enable_i18n=yes
19829	fi
19830else
19831  enableval=yes
19832	enable_i18n=yes
19833
19834fi;
19835echo "$as_me:19835: result: $enable_i18n" >&5
19836echo "${ECHO_T}$enable_i18n" >&6
19837if test "$enable_i18n" = no ; then
19838
19839cat >>confdefs.h <<\EOF
19840#define OPT_I18N_SUPPORT 0
19841EOF
19842
19843fi
19844
19845echo "$as_me:19845: checking if you want support for initial-erase setup" >&5
19846echo $ECHO_N "checking if you want support for initial-erase setup... $ECHO_C" >&6
19847
19848# Check whether --enable-initial-erase or --disable-initial-erase was given.
19849if test "${enable_initial_erase+set}" = set; then
19850  enableval="$enable_initial_erase"
19851  test "$enableval" != no && enableval=yes
19852	if test "$enableval" != "yes" ; then
19853    enable_ie=no
19854	else
19855		enable_ie=yes
19856	fi
19857else
19858  enableval=yes
19859	enable_ie=yes
19860
19861fi;
19862echo "$as_me:19862: result: $enable_ie" >&5
19863echo "${ECHO_T}$enable_ie" >&6
19864if test "$enable_ie" = no ; then
19865
19866cat >>confdefs.h <<\EOF
19867#define OPT_INITIAL_ERASE 0
19868EOF
19869
19870fi
19871
19872echo "$as_me:19872: checking if you want support for input-method" >&5
19873echo $ECHO_N "checking if you want support for input-method... $ECHO_C" >&6
19874
19875# Check whether --enable-input-method or --disable-input-method was given.
19876if test "${enable_input_method+set}" = set; then
19877  enableval="$enable_input_method"
19878  test "$enableval" != no && enableval=yes
19879	if test "$enableval" != "yes" ; then
19880    enable_ximp=no
19881	else
19882		enable_ximp=$enable_i18n
19883	fi
19884else
19885  enableval=yes
19886	enable_ximp=$enable_i18n
19887
19888fi;
19889echo "$as_me:19889: result: $enable_ximp" >&5
19890echo "${ECHO_T}$enable_ximp" >&6
19891
19892echo "$as_me:19892: checking if X libraries support input-method" >&5
19893echo $ECHO_N "checking if X libraries support input-method... $ECHO_C" >&6
19894if test "${cf_cv_input_method+set}" = set; then
19895  echo $ECHO_N "(cached) $ECHO_C" >&6
19896else
19897
19898cat >"conftest.$ac_ext" <<_ACEOF
19899#line 19899 "configure"
19900#include "confdefs.h"
19901
19902#include <X11/IntrinsicP.h>
19903#include <X11/Xatom.h>
19904#include <X11/Xutil.h>
19905#include <X11/Xmu/Atoms.h>
19906#include <X11/Xmu/Converters.h>
19907#include <X11/Xaw/XawImP.h>
19908
19909int
19910main (void)
19911{
19912
19913{
19914	XIM xim;
19915	XIMStyles *xim_styles = 0;
19916	XIMStyle input_style;
19917	Widget w = 0;
19918
19919	XSetLocaleModifiers("@im=none");
19920	xim = XOpenIM(XtDisplay(w), NULL, NULL, NULL);
19921	XGetIMValues(xim, XNQueryInputStyle, &xim_styles, NULL);
19922	XCloseIM(xim);
19923	input_style = (XIMPreeditNothing | XIMStatusNothing);
19924	(void)xim_styles;
19925	(void)input_style;
19926}
19927
19928  ;
19929  return 0;
19930}
19931_ACEOF
19932rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19933if { (eval echo "$as_me:19933: \"$ac_link\"") >&5
19934  (eval $ac_link) 2>&5
19935  ac_status=$?
19936  echo "$as_me:19936: \$? = $ac_status" >&5
19937  (exit "$ac_status"); } &&
19938         { ac_try='test -s "conftest$ac_exeext"'
19939  { (eval echo "$as_me:19939: \"$ac_try\"") >&5
19940  (eval $ac_try) 2>&5
19941  ac_status=$?
19942  echo "$as_me:19942: \$? = $ac_status" >&5
19943  (exit "$ac_status"); }; }; then
19944  cf_cv_input_method=yes
19945else
19946  echo "$as_me: failed program was:" >&5
19947cat "conftest.$ac_ext" >&5
19948cf_cv_input_method=no
19949fi
19950rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19951fi
19952echo "$as_me:19952: result: $cf_cv_input_method" >&5
19953echo "${ECHO_T}$cf_cv_input_method" >&6
19954
19955test "$cf_cv_input_method" = no && enable_ximp=no
19956if test "$enable_ximp" != no ; then
19957	if test "$enable_i18n" = no ; then
19958		{ echo "$as_me:19958: WARNING: input-methor relies upon internationalization" >&5
19959echo "$as_me: WARNING: input-methor relies upon internationalization" >&2;}
19960		enable_ximp=no
19961	fi
19962fi
19963if test "$enable_ximp" = no ; then
19964
19965cat >>confdefs.h <<\EOF
19966#define OPT_INPUT_METHOD 0
19967EOF
19968
19969fi
19970
19971echo "$as_me:19971: checking if you want support for load-vt-fonts" >&5
19972echo $ECHO_N "checking if you want support for load-vt-fonts... $ECHO_C" >&6
19973
19974# Check whether --enable-load-vt-fonts or --disable-load-vt-fonts was given.
19975if test "${enable_load_vt_fonts+set}" = set; then
19976  enableval="$enable_load_vt_fonts"
19977  test "$enableval" != yes && enableval=no
19978	if test "$enableval" != "no" ; then
19979    enable_load_vt_fonts=yes
19980	else
19981		enable_load_vt_fonts=no
19982	fi
19983else
19984  enableval=no
19985	enable_load_vt_fonts=no
19986
19987fi;
19988echo "$as_me:19988: result: $enable_load_vt_fonts" >&5
19989echo "${ECHO_T}$enable_load_vt_fonts" >&6
19990if test "$enable_load_vt_fonts" = yes ; then
19991
19992cat >>confdefs.h <<\EOF
19993#define OPT_LOAD_VTFONTS 1
19994EOF
19995
19996fi
19997
19998echo "$as_me:19998: checking if you want support for logging" >&5
19999echo $ECHO_N "checking if you want support for logging... $ECHO_C" >&6
20000
20001# Check whether --enable-logging or --disable-logging was given.
20002if test "${enable_logging+set}" = set; then
20003  enableval="$enable_logging"
20004  test "$enableval" != yes && enableval=no
20005	if test "$enableval" != "no" ; then
20006    enable_logging=yes
20007	else
20008		enable_logging=no
20009	fi
20010else
20011  enableval=no
20012	enable_logging=no
20013
20014fi;
20015echo "$as_me:20015: result: $enable_logging" >&5
20016echo "${ECHO_T}$enable_logging" >&6
20017if test "$enable_logging" = yes ; then
20018
20019cat >>confdefs.h <<\EOF
20020#define ALLOWLOGGING 1
20021EOF
20022
20023	echo "$as_me:20023: checking if you want to allow logging via a pipe" >&5
20024echo $ECHO_N "checking if you want to allow logging via a pipe... $ECHO_C" >&6
20025
20026# Check whether --enable-logfile-exec or --disable-logfile-exec was given.
20027if test "${enable_logfile_exec+set}" = set; then
20028  enableval="$enable_logfile_exec"
20029  test "$enableval" != yes && enableval=no
20030	if test "$enableval" != "no" ; then
20031    enable_log_exec=yes
20032	else
20033		enable_log_exec=no
20034	fi
20035else
20036  enableval=no
20037	enable_log_exec=no
20038
20039fi;
20040	echo "$as_me:20040: result: $enable_log_exec" >&5
20041echo "${ECHO_T}$enable_log_exec" >&6
20042	if test "$enable_log_exec" = yes ; then
20043
20044cat >>confdefs.h <<\EOF
20045#define ALLOWLOGFILEEXEC 1
20046EOF
20047
20048	fi
20049fi
20050
20051echo "$as_me:20051: checking if you want support for iconify/maximize translations" >&5
20052echo $ECHO_N "checking if you want support for iconify/maximize translations... $ECHO_C" >&6
20053
20054# Check whether --enable-maximize or --disable-maximize was given.
20055if test "${enable_maximize+set}" = set; then
20056  enableval="$enable_maximize"
20057  test "$enableval" != no && enableval=yes
20058	if test "$enableval" != "yes" ; then
20059    enable_maximize=no
20060	else
20061		enable_maximize=yes
20062	fi
20063else
20064  enableval=yes
20065	enable_maximize=yes
20066
20067fi;
20068echo "$as_me:20068: result: $enable_maximize" >&5
20069echo "${ECHO_T}$enable_maximize" >&6
20070test "$enable_maximize" = no &&
20071cat >>confdefs.h <<\EOF
20072#define OPT_MAXIMIZE 0
20073EOF
20074
20075echo "$as_me:20075: checking if you want NumLock to override keyboard tables" >&5
20076echo $ECHO_N "checking if you want NumLock to override keyboard tables... $ECHO_C" >&6
20077
20078# Check whether --enable-num-lock or --disable-num-lock was given.
20079if test "${enable_num_lock+set}" = set; then
20080  enableval="$enable_num_lock"
20081  test "$enableval" != no && enableval=yes
20082	if test "$enableval" != "yes" ; then
20083    enable_numlock=no
20084	else
20085		enable_numlock=yes
20086	fi
20087else
20088  enableval=yes
20089	enable_numlock=yes
20090
20091fi;
20092echo "$as_me:20092: result: $enable_numlock" >&5
20093echo "${ECHO_T}$enable_numlock" >&6
20094test "$enable_numlock" = no &&
20095cat >>confdefs.h <<\EOF
20096#define OPT_NUM_LOCK 0
20097EOF
20098
20099echo "$as_me:20099: checking if you want support for get/set of base64 selection data" >&5
20100echo $ECHO_N "checking if you want support for get/set of base64 selection data... $ECHO_C" >&6
20101
20102# Check whether --enable-paste64 or --disable-paste64 was given.
20103if test "${enable_paste64+set}" = set; then
20104  enableval="$enable_paste64"
20105  test "$enableval" != no && enableval=yes
20106	if test "$enableval" != "yes" ; then
20107    enable_paste64=no
20108	else
20109		enable_paste64=yes
20110	fi
20111else
20112  enableval=yes
20113	enable_paste64=yes
20114
20115fi;
20116echo "$as_me:20116: result: $enable_paste64" >&5
20117echo "${ECHO_T}$enable_paste64" >&6
20118if test "$enable_paste64" = yes ; then
20119
20120cat >>confdefs.h <<\EOF
20121#define OPT_PASTE64 1
20122EOF
20123
20124else
20125
20126cat >>confdefs.h <<\EOF
20127#define OPT_PASTE64 0
20128EOF
20129
20130fi
20131
20132echo "$as_me:20132: checking if you want support for pty-handshaking" >&5
20133echo $ECHO_N "checking if you want support for pty-handshaking... $ECHO_C" >&6
20134
20135# Check whether --enable-pty-handshake or --disable-pty-handshake was given.
20136if test "${enable_pty_handshake+set}" = set; then
20137  enableval="$enable_pty_handshake"
20138  test "$enableval" != no && enableval=yes
20139	if test "$enableval" != "yes" ; then
20140    enable_pty_handshake=no
20141	else
20142		enable_pty_handshake=yes
20143	fi
20144else
20145  enableval=yes
20146	enable_pty_handshake=yes
20147
20148fi;
20149echo "$as_me:20149: result: $enable_pty_handshake" >&5
20150echo "${ECHO_T}$enable_pty_handshake" >&6
20151if test "$enable_pty_handshake" = yes ; then
20152
20153cat >>confdefs.h <<\EOF
20154#define OPT_PTY_HANDSHAKE 1
20155EOF
20156
20157else
20158
20159cat >>confdefs.h <<\EOF
20160#define OPT_PTY_HANDSHAKE 0
20161EOF
20162
20163fi
20164
20165echo "$as_me:20165: checking if you want support for mouse in readline applications" >&5
20166echo $ECHO_N "checking if you want support for mouse in readline applications... $ECHO_C" >&6
20167
20168# Check whether --enable-readline-mouse or --disable-readline-mouse was given.
20169if test "${enable_readline_mouse+set}" = set; then
20170  enableval="$enable_readline_mouse"
20171  test "$enableval" != yes && enableval=no
20172	if test "$enableval" != "no" ; then
20173    enable_readline_mouse=yes
20174	else
20175		enable_readline_mouse=no
20176	fi
20177else
20178  enableval=no
20179	enable_readline_mouse=no
20180
20181fi;
20182echo "$as_me:20182: result: $enable_readline_mouse" >&5
20183echo "${ECHO_T}$enable_readline_mouse" >&6
20184if test "$enable_readline_mouse" = yes ; then
20185
20186cat >>confdefs.h <<\EOF
20187#define OPT_READLINE 1
20188EOF
20189
20190fi
20191
20192echo "$as_me:20192: checking if you want support for regular-expression selections" >&5
20193echo $ECHO_N "checking if you want support for regular-expression selections... $ECHO_C" >&6
20194
20195# Check whether --enable-regex or --disable-regex was given.
20196if test "${enable_regex+set}" = set; then
20197  enableval="$enable_regex"
20198  test "$enableval" != no && enableval=yes
20199	if test "$enableval" != "yes" ; then
20200    enable_regex=no
20201	else
20202		enable_regex=yes
20203	fi
20204else
20205  enableval=yes
20206	enable_regex=yes
20207
20208fi;
20209echo "$as_me:20209: result: $enable_regex" >&5
20210echo "${ECHO_T}$enable_regex" >&6
20211if test "$enable_regex" = yes ; then
20212
20213echo "$as_me:20213: checking if you want to use PCRE2 for regular-expressions" >&5
20214echo $ECHO_N "checking if you want to use PCRE2 for regular-expressions... $ECHO_C" >&6
20215
20216# Check whether --with-pcre2 or --without-pcre2 was given.
20217if test "${with_pcre2+set}" = set; then
20218  withval="$with_pcre2"
20219
20220fi;
20221test -z "$with_pcre2" && with_pcre2=no
20222echo "$as_me:20222: result: $with_pcre2" >&5
20223echo "${ECHO_T}$with_pcre2" >&6
20224
20225if test "x$with_pcre2" != xno ; then
20226	cf_with_pcre2_ok=no
20227	for cf_with_pcre2 in libpcre2 libpcre2-posix libpcre
20228	do
20229
20230if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "$cf_with_pcre2"; then
20231	test -n "$verbose" && echo "	found package $cf_with_pcre2" 1>&6
20232
20233echo "${as_me:-configure}:20233: testing found package $cf_with_pcre2 ..." 1>&5
20234
20235	cf_pkgconfig_incs="`$PKG_CONFIG --cflags "$cf_with_pcre2" 2>/dev/null`"
20236	cf_pkgconfig_libs="`$PKG_CONFIG --libs   "$cf_with_pcre2" 2>/dev/null`"
20237	test -n "$verbose" && echo "	package $cf_with_pcre2 CFLAGS: $cf_pkgconfig_incs" 1>&6
20238
20239echo "${as_me:-configure}:20239: testing package $cf_with_pcre2 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
20240
20241	test -n "$verbose" && echo "	package $cf_with_pcre2 LIBS: $cf_pkgconfig_libs" 1>&6
20242
20243echo "${as_me:-configure}:20243: testing package $cf_with_pcre2 LIBS: $cf_pkgconfig_libs ..." 1>&5
20244
20245cf_fix_cppflags=no
20246cf_new_cflags=
20247cf_new_cppflags=
20248cf_new_extra_cppflags=
20249
20250for cf_add_cflags in $cf_pkgconfig_incs
20251do
20252case "$cf_fix_cppflags" in
20253(no)
20254	case "$cf_add_cflags" in
20255	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
20256		case "$cf_add_cflags" in
20257		(-D*)
20258			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
20259
20260			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20261				&& test -z "${cf_tst_cflags}" \
20262				&& cf_fix_cppflags=yes
20263
20264			if test "$cf_fix_cppflags" = yes ; then
20265
20266	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20267	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20268
20269				continue
20270			elif test "${cf_tst_cflags}" = "\"'" ; then
20271
20272	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20273	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20274
20275				continue
20276			fi
20277			;;
20278		esac
20279		case "$CPPFLAGS" in
20280		(*$cf_add_cflags)
20281			;;
20282		(*)
20283			case "$cf_add_cflags" in
20284			(-D*)
20285				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
20286
20287CPPFLAGS=`echo "$CPPFLAGS" | \
20288	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
20289		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
20290
20291				;;
20292			esac
20293
20294	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
20295	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
20296
20297			;;
20298		esac
20299		;;
20300	(*)
20301
20302	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
20303	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
20304
20305		;;
20306	esac
20307	;;
20308(yes)
20309
20310	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20311	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20312
20313	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
20314
20315	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20316		&& test -z "${cf_tst_cflags}" \
20317		&& cf_fix_cppflags=no
20318	;;
20319esac
20320done
20321
20322if test -n "$cf_new_cflags" ; then
20323
20324	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
20325	CFLAGS="${CFLAGS}$cf_new_cflags"
20326
20327fi
20328
20329if test -n "$cf_new_cppflags" ; then
20330
20331	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
20332	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
20333
20334fi
20335
20336if test -n "$cf_new_extra_cppflags" ; then
20337
20338	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
20339	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
20340
20341fi
20342
20343cf_add_libs="$LIBS"
20344# reverse order
20345cf_add_0lib=
20346for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
20347# filter duplicates
20348for cf_add_1lib in $cf_add_0lib; do
20349	for cf_add_2lib in $cf_add_libs; do
20350		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
20351			cf_add_1lib=
20352			break
20353		fi
20354	done
20355	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
20356done
20357LIBS="$cf_add_libs"
20358
20359	cf_with_pcre2_ok=yes; break
20360else
20361	cf_pkgconfig_incs=
20362	cf_pkgconfig_libs=
20363	:
20364fi
20365
20366	done
20367	cf_with_pcre2_ok=yes || { { echo "$as_me:20367: error: Cannot find PCRE2 library" >&5
20368echo "$as_me: error: Cannot find PCRE2 library" >&2;}
20369   { (exit 1); exit 1; }; }
20370
20371cat >>confdefs.h <<\EOF
20372#define HAVE_LIB_PCRE2 1
20373EOF
20374
20375	# if pkgconfig gave no results, look for the libraries directly
20376	case "$LIBS" in
20377	(*pcre2-posix*|*pcreposix*)
20378		;;
20379	(*)
20380		echo "$as_me:20380: checking for regcomp in -lpcre2-posix" >&5
20381echo $ECHO_N "checking for regcomp in -lpcre2-posix... $ECHO_C" >&6
20382if test "${ac_cv_lib_pcre2_posix_regcomp+set}" = set; then
20383  echo $ECHO_N "(cached) $ECHO_C" >&6
20384else
20385  ac_check_lib_save_LIBS=$LIBS
20386LIBS="-lpcre2-posix  $LIBS"
20387cat >"conftest.$ac_ext" <<_ACEOF
20388#line 20388 "configure"
20389#include "confdefs.h"
20390
20391/* Override any gcc2 internal prototype to avoid an error.  */
20392#ifdef __cplusplus
20393extern "C"
20394#endif
20395/* We use char because int might match the return type of a gcc2
20396   builtin and then its argument prototype would still apply.  */
20397char regcomp ();
20398int
20399main (void)
20400{
20401regcomp ();
20402  ;
20403  return 0;
20404}
20405_ACEOF
20406rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20407if { (eval echo "$as_me:20407: \"$ac_link\"") >&5
20408  (eval $ac_link) 2>&5
20409  ac_status=$?
20410  echo "$as_me:20410: \$? = $ac_status" >&5
20411  (exit "$ac_status"); } &&
20412         { ac_try='test -s "conftest$ac_exeext"'
20413  { (eval echo "$as_me:20413: \"$ac_try\"") >&5
20414  (eval $ac_try) 2>&5
20415  ac_status=$?
20416  echo "$as_me:20416: \$? = $ac_status" >&5
20417  (exit "$ac_status"); }; }; then
20418  ac_cv_lib_pcre2_posix_regcomp=yes
20419else
20420  echo "$as_me: failed program was:" >&5
20421cat "conftest.$ac_ext" >&5
20422ac_cv_lib_pcre2_posix_regcomp=no
20423fi
20424rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20425LIBS=$ac_check_lib_save_LIBS
20426fi
20427echo "$as_me:20427: result: $ac_cv_lib_pcre2_posix_regcomp" >&5
20428echo "${ECHO_T}$ac_cv_lib_pcre2_posix_regcomp" >&6
20429if test "$ac_cv_lib_pcre2_posix_regcomp" = yes; then
20430
20431cf_add_libs="$LIBS"
20432# reverse order
20433cf_add_0lib=
20434for cf_add_1lib in -lpcre2-posix; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
20435# filter duplicates
20436for cf_add_1lib in $cf_add_0lib; do
20437	for cf_add_2lib in $cf_add_libs; do
20438		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
20439			cf_add_1lib=
20440			break
20441		fi
20442	done
20443	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
20444done
20445LIBS="$cf_add_libs"
20446
20447else
20448  echo "$as_me:20448: checking for regcomp in -lpcreposix" >&5
20449echo $ECHO_N "checking for regcomp in -lpcreposix... $ECHO_C" >&6
20450if test "${ac_cv_lib_pcreposix_regcomp+set}" = set; then
20451  echo $ECHO_N "(cached) $ECHO_C" >&6
20452else
20453  ac_check_lib_save_LIBS=$LIBS
20454LIBS="-lpcreposix  $LIBS"
20455cat >"conftest.$ac_ext" <<_ACEOF
20456#line 20456 "configure"
20457#include "confdefs.h"
20458
20459/* Override any gcc2 internal prototype to avoid an error.  */
20460#ifdef __cplusplus
20461extern "C"
20462#endif
20463/* We use char because int might match the return type of a gcc2
20464   builtin and then its argument prototype would still apply.  */
20465char regcomp ();
20466int
20467main (void)
20468{
20469regcomp ();
20470  ;
20471  return 0;
20472}
20473_ACEOF
20474rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20475if { (eval echo "$as_me:20475: \"$ac_link\"") >&5
20476  (eval $ac_link) 2>&5
20477  ac_status=$?
20478  echo "$as_me:20478: \$? = $ac_status" >&5
20479  (exit "$ac_status"); } &&
20480         { ac_try='test -s "conftest$ac_exeext"'
20481  { (eval echo "$as_me:20481: \"$ac_try\"") >&5
20482  (eval $ac_try) 2>&5
20483  ac_status=$?
20484  echo "$as_me:20484: \$? = $ac_status" >&5
20485  (exit "$ac_status"); }; }; then
20486  ac_cv_lib_pcreposix_regcomp=yes
20487else
20488  echo "$as_me: failed program was:" >&5
20489cat "conftest.$ac_ext" >&5
20490ac_cv_lib_pcreposix_regcomp=no
20491fi
20492rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20493LIBS=$ac_check_lib_save_LIBS
20494fi
20495echo "$as_me:20495: result: $ac_cv_lib_pcreposix_regcomp" >&5
20496echo "${ECHO_T}$ac_cv_lib_pcreposix_regcomp" >&6
20497if test "$ac_cv_lib_pcreposix_regcomp" = yes; then
20498
20499cf_add_libs="$LIBS"
20500# reverse order
20501cf_add_0lib=
20502for cf_add_1lib in -lpcreposix; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
20503# filter duplicates
20504for cf_add_1lib in $cf_add_0lib; do
20505	for cf_add_2lib in $cf_add_libs; do
20506		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
20507			cf_add_1lib=
20508			break
20509		fi
20510	done
20511	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
20512done
20513LIBS="$cf_add_libs"
20514
20515else
20516  { { echo "$as_me:20516: error: Cannot find PCRE2 POSIX library" >&5
20517echo "$as_me: error: Cannot find PCRE2 POSIX library" >&2;}
20518   { (exit 1); exit 1; }; }
20519fi
20520
20521fi
20522
20523		;;
20524	esac
20525
20526	# either way, check for the library header files
20527
20528for ac_header in pcre2posix.h pcreposix.h
20529do
20530as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20531echo "$as_me:20531: checking for $ac_header" >&5
20532echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20533if eval "test \"\${$as_ac_Header+set}\" = set"; then
20534  echo $ECHO_N "(cached) $ECHO_C" >&6
20535else
20536  cat >"conftest.$ac_ext" <<_ACEOF
20537#line 20537 "configure"
20538#include "confdefs.h"
20539#include <$ac_header>
20540_ACEOF
20541if { (eval echo "$as_me:20541: \"$ac_cpp "conftest.$ac_ext"\"") >&5
20542  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
20543  ac_status=$?
20544  $EGREP -v '^ *\+' conftest.er1 >conftest.err
20545  rm -f conftest.er1
20546  cat conftest.err >&5
20547  echo "$as_me:20547: \$? = $ac_status" >&5
20548  (exit "$ac_status"); } >/dev/null; then
20549  if test -s conftest.err; then
20550    ac_cpp_err=$ac_c_preproc_warn_flag
20551  else
20552    ac_cpp_err=
20553  fi
20554else
20555  ac_cpp_err=yes
20556fi
20557if test -z "$ac_cpp_err"; then
20558  eval "$as_ac_Header=yes"
20559else
20560  echo "$as_me: failed program was:" >&5
20561  cat "conftest.$ac_ext" >&5
20562  eval "$as_ac_Header=no"
20563fi
20564rm -f conftest.err "conftest.$ac_ext"
20565fi
20566echo "$as_me:20566: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
20567echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
20568if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
20569  cat >>confdefs.h <<EOF
20570#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20571EOF
20572
20573fi
20574done
20575
20576fi
20577
20578	if test "$with_pcre2" = no ; then
20579
20580echo "$as_me:20580: checking if you want to use PCRE for regular-expressions" >&5
20581echo $ECHO_N "checking if you want to use PCRE for regular-expressions... $ECHO_C" >&6
20582
20583# Check whether --with-pcre or --without-pcre was given.
20584if test "${with_pcre+set}" = set; then
20585  withval="$with_pcre"
20586
20587fi;
20588test -z "$with_pcre" && with_pcre=no
20589echo "$as_me:20589: result: $with_pcre" >&5
20590echo "${ECHO_T}$with_pcre" >&6
20591
20592if test "$with_pcre" != no ; then
20593
20594if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "libpcre"; then
20595	test -n "$verbose" && echo "	found package libpcre" 1>&6
20596
20597echo "${as_me:-configure}:20597: testing found package libpcre ..." 1>&5
20598
20599	cf_pkgconfig_incs="`$PKG_CONFIG --cflags "libpcre" 2>/dev/null`"
20600	cf_pkgconfig_libs="`$PKG_CONFIG --libs   "libpcre" 2>/dev/null`"
20601	test -n "$verbose" && echo "	package libpcre CFLAGS: $cf_pkgconfig_incs" 1>&6
20602
20603echo "${as_me:-configure}:20603: testing package libpcre CFLAGS: $cf_pkgconfig_incs ..." 1>&5
20604
20605	test -n "$verbose" && echo "	package libpcre LIBS: $cf_pkgconfig_libs" 1>&6
20606
20607echo "${as_me:-configure}:20607: testing package libpcre LIBS: $cf_pkgconfig_libs ..." 1>&5
20608
20609cf_fix_cppflags=no
20610cf_new_cflags=
20611cf_new_cppflags=
20612cf_new_extra_cppflags=
20613
20614for cf_add_cflags in $cf_pkgconfig_incs
20615do
20616case "$cf_fix_cppflags" in
20617(no)
20618	case "$cf_add_cflags" in
20619	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
20620		case "$cf_add_cflags" in
20621		(-D*)
20622			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
20623
20624			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20625				&& test -z "${cf_tst_cflags}" \
20626				&& cf_fix_cppflags=yes
20627
20628			if test "$cf_fix_cppflags" = yes ; then
20629
20630	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20631	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20632
20633				continue
20634			elif test "${cf_tst_cflags}" = "\"'" ; then
20635
20636	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20637	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20638
20639				continue
20640			fi
20641			;;
20642		esac
20643		case "$CPPFLAGS" in
20644		(*$cf_add_cflags)
20645			;;
20646		(*)
20647			case "$cf_add_cflags" in
20648			(-D*)
20649				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
20650
20651CPPFLAGS=`echo "$CPPFLAGS" | \
20652	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
20653		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
20654
20655				;;
20656			esac
20657
20658	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
20659	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
20660
20661			;;
20662		esac
20663		;;
20664	(*)
20665
20666	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
20667	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
20668
20669		;;
20670	esac
20671	;;
20672(yes)
20673
20674	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20675	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20676
20677	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
20678
20679	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20680		&& test -z "${cf_tst_cflags}" \
20681		&& cf_fix_cppflags=no
20682	;;
20683esac
20684done
20685
20686if test -n "$cf_new_cflags" ; then
20687
20688	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
20689	CFLAGS="${CFLAGS}$cf_new_cflags"
20690
20691fi
20692
20693if test -n "$cf_new_cppflags" ; then
20694
20695	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
20696	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
20697
20698fi
20699
20700if test -n "$cf_new_extra_cppflags" ; then
20701
20702	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
20703	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
20704
20705fi
20706
20707cf_add_libs="$LIBS"
20708# reverse order
20709cf_add_0lib=
20710for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
20711# filter duplicates
20712for cf_add_1lib in $cf_add_0lib; do
20713	for cf_add_2lib in $cf_add_libs; do
20714		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
20715			cf_add_1lib=
20716			break
20717		fi
20718	done
20719	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
20720done
20721LIBS="$cf_add_libs"
20722
20723	:
20724else
20725	cf_pkgconfig_incs=
20726	cf_pkgconfig_libs=
20727
20728echo "$as_me:20728: checking for pcre_compile in -lpcre" >&5
20729echo $ECHO_N "checking for pcre_compile in -lpcre... $ECHO_C" >&6
20730if test "${ac_cv_lib_pcre_pcre_compile+set}" = set; then
20731  echo $ECHO_N "(cached) $ECHO_C" >&6
20732else
20733  ac_check_lib_save_LIBS=$LIBS
20734LIBS="-lpcre  $LIBS"
20735cat >"conftest.$ac_ext" <<_ACEOF
20736#line 20736 "configure"
20737#include "confdefs.h"
20738
20739/* Override any gcc2 internal prototype to avoid an error.  */
20740#ifdef __cplusplus
20741extern "C"
20742#endif
20743/* We use char because int might match the return type of a gcc2
20744   builtin and then its argument prototype would still apply.  */
20745char pcre_compile ();
20746int
20747main (void)
20748{
20749pcre_compile ();
20750  ;
20751  return 0;
20752}
20753_ACEOF
20754rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20755if { (eval echo "$as_me:20755: \"$ac_link\"") >&5
20756  (eval $ac_link) 2>&5
20757  ac_status=$?
20758  echo "$as_me:20758: \$? = $ac_status" >&5
20759  (exit "$ac_status"); } &&
20760         { ac_try='test -s "conftest$ac_exeext"'
20761  { (eval echo "$as_me:20761: \"$ac_try\"") >&5
20762  (eval $ac_try) 2>&5
20763  ac_status=$?
20764  echo "$as_me:20764: \$? = $ac_status" >&5
20765  (exit "$ac_status"); }; }; then
20766  ac_cv_lib_pcre_pcre_compile=yes
20767else
20768  echo "$as_me: failed program was:" >&5
20769cat "conftest.$ac_ext" >&5
20770ac_cv_lib_pcre_pcre_compile=no
20771fi
20772rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20773LIBS=$ac_check_lib_save_LIBS
20774fi
20775echo "$as_me:20775: result: $ac_cv_lib_pcre_pcre_compile" >&5
20776echo "${ECHO_T}$ac_cv_lib_pcre_pcre_compile" >&6
20777if test "$ac_cv_lib_pcre_pcre_compile" = yes; then
20778  cat >>confdefs.h <<EOF
20779#define HAVE_LIBPCRE 1
20780EOF
20781
20782  LIBS="-lpcre $LIBS"
20783
20784else
20785  { { echo "$as_me:20785: error: Cannot find PCRE library" >&5
20786echo "$as_me: error: Cannot find PCRE library" >&2;}
20787   { (exit 1); exit 1; }; }
20788fi
20789
20790fi
20791
20792cat >>confdefs.h <<\EOF
20793#define HAVE_LIB_PCRE 1
20794EOF
20795
20796	case $LIBS in
20797	(*pcreposix*)
20798		;;
20799	(*)
20800		echo "$as_me:20800: checking for pcreposix_regcomp in -lpcreposix" >&5
20801echo $ECHO_N "checking for pcreposix_regcomp in -lpcreposix... $ECHO_C" >&6
20802if test "${ac_cv_lib_pcreposix_pcreposix_regcomp+set}" = set; then
20803  echo $ECHO_N "(cached) $ECHO_C" >&6
20804else
20805  ac_check_lib_save_LIBS=$LIBS
20806LIBS="-lpcreposix  $LIBS"
20807cat >"conftest.$ac_ext" <<_ACEOF
20808#line 20808 "configure"
20809#include "confdefs.h"
20810
20811/* Override any gcc2 internal prototype to avoid an error.  */
20812#ifdef __cplusplus
20813extern "C"
20814#endif
20815/* We use char because int might match the return type of a gcc2
20816   builtin and then its argument prototype would still apply.  */
20817char pcreposix_regcomp ();
20818int
20819main (void)
20820{
20821pcreposix_regcomp ();
20822  ;
20823  return 0;
20824}
20825_ACEOF
20826rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20827if { (eval echo "$as_me:20827: \"$ac_link\"") >&5
20828  (eval $ac_link) 2>&5
20829  ac_status=$?
20830  echo "$as_me:20830: \$? = $ac_status" >&5
20831  (exit "$ac_status"); } &&
20832         { ac_try='test -s "conftest$ac_exeext"'
20833  { (eval echo "$as_me:20833: \"$ac_try\"") >&5
20834  (eval $ac_try) 2>&5
20835  ac_status=$?
20836  echo "$as_me:20836: \$? = $ac_status" >&5
20837  (exit "$ac_status"); }; }; then
20838  ac_cv_lib_pcreposix_pcreposix_regcomp=yes
20839else
20840  echo "$as_me: failed program was:" >&5
20841cat "conftest.$ac_ext" >&5
20842ac_cv_lib_pcreposix_pcreposix_regcomp=no
20843fi
20844rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20845LIBS=$ac_check_lib_save_LIBS
20846fi
20847echo "$as_me:20847: result: $ac_cv_lib_pcreposix_pcreposix_regcomp" >&5
20848echo "${ECHO_T}$ac_cv_lib_pcreposix_pcreposix_regcomp" >&6
20849if test "$ac_cv_lib_pcreposix_pcreposix_regcomp" = yes; then
20850
20851cat >>confdefs.h <<\EOF
20852#define HAVE_PCREPOSIX_H 1
20853EOF
20854
20855cf_add_libs="$LIBS"
20856# reverse order
20857cf_add_0lib=
20858for cf_add_1lib in -lpcreposix; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
20859# filter duplicates
20860for cf_add_1lib in $cf_add_0lib; do
20861	for cf_add_2lib in $cf_add_libs; do
20862		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
20863			cf_add_1lib=
20864			break
20865		fi
20866	done
20867	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
20868done
20869LIBS="$cf_add_libs"
20870
20871else
20872  echo "$as_me:20872: checking for regcomp in -lpcreposix" >&5
20873echo $ECHO_N "checking for regcomp in -lpcreposix... $ECHO_C" >&6
20874if test "${ac_cv_lib_pcreposix_regcomp+set}" = set; then
20875  echo $ECHO_N "(cached) $ECHO_C" >&6
20876else
20877  ac_check_lib_save_LIBS=$LIBS
20878LIBS="-lpcreposix  $LIBS"
20879cat >"conftest.$ac_ext" <<_ACEOF
20880#line 20880 "configure"
20881#include "confdefs.h"
20882
20883/* Override any gcc2 internal prototype to avoid an error.  */
20884#ifdef __cplusplus
20885extern "C"
20886#endif
20887/* We use char because int might match the return type of a gcc2
20888   builtin and then its argument prototype would still apply.  */
20889char regcomp ();
20890int
20891main (void)
20892{
20893regcomp ();
20894  ;
20895  return 0;
20896}
20897_ACEOF
20898rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20899if { (eval echo "$as_me:20899: \"$ac_link\"") >&5
20900  (eval $ac_link) 2>&5
20901  ac_status=$?
20902  echo "$as_me:20902: \$? = $ac_status" >&5
20903  (exit "$ac_status"); } &&
20904         { ac_try='test -s "conftest$ac_exeext"'
20905  { (eval echo "$as_me:20905: \"$ac_try\"") >&5
20906  (eval $ac_try) 2>&5
20907  ac_status=$?
20908  echo "$as_me:20908: \$? = $ac_status" >&5
20909  (exit "$ac_status"); }; }; then
20910  ac_cv_lib_pcreposix_regcomp=yes
20911else
20912  echo "$as_me: failed program was:" >&5
20913cat "conftest.$ac_ext" >&5
20914ac_cv_lib_pcreposix_regcomp=no
20915fi
20916rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20917LIBS=$ac_check_lib_save_LIBS
20918fi
20919echo "$as_me:20919: result: $ac_cv_lib_pcreposix_regcomp" >&5
20920echo "${ECHO_T}$ac_cv_lib_pcreposix_regcomp" >&6
20921if test "$ac_cv_lib_pcreposix_regcomp" = yes; then
20922
20923cat >>confdefs.h <<\EOF
20924#define HAVE_PCREPOSIX_H 1
20925EOF
20926
20927cf_add_libs="$LIBS"
20928# reverse order
20929cf_add_0lib=
20930for cf_add_1lib in -lpcreposix; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
20931# filter duplicates
20932for cf_add_1lib in $cf_add_0lib; do
20933	for cf_add_2lib in $cf_add_libs; do
20934		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
20935			cf_add_1lib=
20936			break
20937		fi
20938	done
20939	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
20940done
20941LIBS="$cf_add_libs"
20942
20943else
20944  { { echo "$as_me:20944: error: Cannot find PCRE POSIX library" >&5
20945echo "$as_me: error: Cannot find PCRE POSIX library" >&2;}
20946   { (exit 1); exit 1; }; }
20947fi
20948
20949fi
20950
20951		;;
20952	esac
20953fi
20954
20955		if test "$with_pcre" = no ; then
20956
20957cf_regex_func=no
20958cf_regex_libs=
20959case "$host_os" in
20960(mingw*)
20961	# -lsystre -ltre -lintl -liconv
20962	echo "$as_me:20962: checking for regcomp in -lsystre" >&5
20963echo $ECHO_N "checking for regcomp in -lsystre... $ECHO_C" >&6
20964if test "${ac_cv_lib_systre_regcomp+set}" = set; then
20965  echo $ECHO_N "(cached) $ECHO_C" >&6
20966else
20967  ac_check_lib_save_LIBS=$LIBS
20968LIBS="-lsystre  $LIBS"
20969cat >"conftest.$ac_ext" <<_ACEOF
20970#line 20970 "configure"
20971#include "confdefs.h"
20972
20973/* Override any gcc2 internal prototype to avoid an error.  */
20974#ifdef __cplusplus
20975extern "C"
20976#endif
20977/* We use char because int might match the return type of a gcc2
20978   builtin and then its argument prototype would still apply.  */
20979char regcomp ();
20980int
20981main (void)
20982{
20983regcomp ();
20984  ;
20985  return 0;
20986}
20987_ACEOF
20988rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20989if { (eval echo "$as_me:20989: \"$ac_link\"") >&5
20990  (eval $ac_link) 2>&5
20991  ac_status=$?
20992  echo "$as_me:20992: \$? = $ac_status" >&5
20993  (exit "$ac_status"); } &&
20994         { ac_try='test -s "conftest$ac_exeext"'
20995  { (eval echo "$as_me:20995: \"$ac_try\"") >&5
20996  (eval $ac_try) 2>&5
20997  ac_status=$?
20998  echo "$as_me:20998: \$? = $ac_status" >&5
20999  (exit "$ac_status"); }; }; then
21000  ac_cv_lib_systre_regcomp=yes
21001else
21002  echo "$as_me: failed program was:" >&5
21003cat "conftest.$ac_ext" >&5
21004ac_cv_lib_systre_regcomp=no
21005fi
21006rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21007LIBS=$ac_check_lib_save_LIBS
21008fi
21009echo "$as_me:21009: result: $ac_cv_lib_systre_regcomp" >&5
21010echo "${ECHO_T}$ac_cv_lib_systre_regcomp" >&6
21011if test "$ac_cv_lib_systre_regcomp" = yes; then
21012
21013		echo "$as_me:21013: checking for libiconv_open in -liconv" >&5
21014echo $ECHO_N "checking for libiconv_open in -liconv... $ECHO_C" >&6
21015if test "${ac_cv_lib_iconv_libiconv_open+set}" = set; then
21016  echo $ECHO_N "(cached) $ECHO_C" >&6
21017else
21018  ac_check_lib_save_LIBS=$LIBS
21019LIBS="-liconv  $LIBS"
21020cat >"conftest.$ac_ext" <<_ACEOF
21021#line 21021 "configure"
21022#include "confdefs.h"
21023
21024/* Override any gcc2 internal prototype to avoid an error.  */
21025#ifdef __cplusplus
21026extern "C"
21027#endif
21028/* We use char because int might match the return type of a gcc2
21029   builtin and then its argument prototype would still apply.  */
21030char libiconv_open ();
21031int
21032main (void)
21033{
21034libiconv_open ();
21035  ;
21036  return 0;
21037}
21038_ACEOF
21039rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21040if { (eval echo "$as_me:21040: \"$ac_link\"") >&5
21041  (eval $ac_link) 2>&5
21042  ac_status=$?
21043  echo "$as_me:21043: \$? = $ac_status" >&5
21044  (exit "$ac_status"); } &&
21045         { ac_try='test -s "conftest$ac_exeext"'
21046  { (eval echo "$as_me:21046: \"$ac_try\"") >&5
21047  (eval $ac_try) 2>&5
21048  ac_status=$?
21049  echo "$as_me:21049: \$? = $ac_status" >&5
21050  (exit "$ac_status"); }; }; then
21051  ac_cv_lib_iconv_libiconv_open=yes
21052else
21053  echo "$as_me: failed program was:" >&5
21054cat "conftest.$ac_ext" >&5
21055ac_cv_lib_iconv_libiconv_open=no
21056fi
21057rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21058LIBS=$ac_check_lib_save_LIBS
21059fi
21060echo "$as_me:21060: result: $ac_cv_lib_iconv_libiconv_open" >&5
21061echo "${ECHO_T}$ac_cv_lib_iconv_libiconv_open" >&6
21062if test "$ac_cv_lib_iconv_libiconv_open" = yes; then
21063
21064cf_add_libs="$LIBS"
21065# reverse order
21066cf_add_0lib=
21067for cf_add_1lib in -liconv; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
21068# filter duplicates
21069for cf_add_1lib in $cf_add_0lib; do
21070	for cf_add_2lib in $cf_add_libs; do
21071		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
21072			cf_add_1lib=
21073			break
21074		fi
21075	done
21076	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
21077done
21078LIBS="$cf_add_libs"
21079
21080fi
21081
21082		echo "$as_me:21082: checking for libintl_gettext in -lintl" >&5
21083echo $ECHO_N "checking for libintl_gettext in -lintl... $ECHO_C" >&6
21084if test "${ac_cv_lib_intl_libintl_gettext+set}" = set; then
21085  echo $ECHO_N "(cached) $ECHO_C" >&6
21086else
21087  ac_check_lib_save_LIBS=$LIBS
21088LIBS="-lintl  $LIBS"
21089cat >"conftest.$ac_ext" <<_ACEOF
21090#line 21090 "configure"
21091#include "confdefs.h"
21092
21093/* Override any gcc2 internal prototype to avoid an error.  */
21094#ifdef __cplusplus
21095extern "C"
21096#endif
21097/* We use char because int might match the return type of a gcc2
21098   builtin and then its argument prototype would still apply.  */
21099char libintl_gettext ();
21100int
21101main (void)
21102{
21103libintl_gettext ();
21104  ;
21105  return 0;
21106}
21107_ACEOF
21108rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21109if { (eval echo "$as_me:21109: \"$ac_link\"") >&5
21110  (eval $ac_link) 2>&5
21111  ac_status=$?
21112  echo "$as_me:21112: \$? = $ac_status" >&5
21113  (exit "$ac_status"); } &&
21114         { ac_try='test -s "conftest$ac_exeext"'
21115  { (eval echo "$as_me:21115: \"$ac_try\"") >&5
21116  (eval $ac_try) 2>&5
21117  ac_status=$?
21118  echo "$as_me:21118: \$? = $ac_status" >&5
21119  (exit "$ac_status"); }; }; then
21120  ac_cv_lib_intl_libintl_gettext=yes
21121else
21122  echo "$as_me: failed program was:" >&5
21123cat "conftest.$ac_ext" >&5
21124ac_cv_lib_intl_libintl_gettext=no
21125fi
21126rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21127LIBS=$ac_check_lib_save_LIBS
21128fi
21129echo "$as_me:21129: result: $ac_cv_lib_intl_libintl_gettext" >&5
21130echo "${ECHO_T}$ac_cv_lib_intl_libintl_gettext" >&6
21131if test "$ac_cv_lib_intl_libintl_gettext" = yes; then
21132
21133cf_add_libs="$LIBS"
21134# reverse order
21135cf_add_0lib=
21136for cf_add_1lib in -lintl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
21137# filter duplicates
21138for cf_add_1lib in $cf_add_0lib; do
21139	for cf_add_2lib in $cf_add_libs; do
21140		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
21141			cf_add_1lib=
21142			break
21143		fi
21144	done
21145	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
21146done
21147LIBS="$cf_add_libs"
21148
21149fi
21150
21151		echo "$as_me:21151: checking for tre_regcomp in -ltre" >&5
21152echo $ECHO_N "checking for tre_regcomp in -ltre... $ECHO_C" >&6
21153if test "${ac_cv_lib_tre_tre_regcomp+set}" = set; then
21154  echo $ECHO_N "(cached) $ECHO_C" >&6
21155else
21156  ac_check_lib_save_LIBS=$LIBS
21157LIBS="-ltre  $LIBS"
21158cat >"conftest.$ac_ext" <<_ACEOF
21159#line 21159 "configure"
21160#include "confdefs.h"
21161
21162/* Override any gcc2 internal prototype to avoid an error.  */
21163#ifdef __cplusplus
21164extern "C"
21165#endif
21166/* We use char because int might match the return type of a gcc2
21167   builtin and then its argument prototype would still apply.  */
21168char tre_regcomp ();
21169int
21170main (void)
21171{
21172tre_regcomp ();
21173  ;
21174  return 0;
21175}
21176_ACEOF
21177rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21178if { (eval echo "$as_me:21178: \"$ac_link\"") >&5
21179  (eval $ac_link) 2>&5
21180  ac_status=$?
21181  echo "$as_me:21181: \$? = $ac_status" >&5
21182  (exit "$ac_status"); } &&
21183         { ac_try='test -s "conftest$ac_exeext"'
21184  { (eval echo "$as_me:21184: \"$ac_try\"") >&5
21185  (eval $ac_try) 2>&5
21186  ac_status=$?
21187  echo "$as_me:21187: \$? = $ac_status" >&5
21188  (exit "$ac_status"); }; }; then
21189  ac_cv_lib_tre_tre_regcomp=yes
21190else
21191  echo "$as_me: failed program was:" >&5
21192cat "conftest.$ac_ext" >&5
21193ac_cv_lib_tre_tre_regcomp=no
21194fi
21195rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21196LIBS=$ac_check_lib_save_LIBS
21197fi
21198echo "$as_me:21198: result: $ac_cv_lib_tre_tre_regcomp" >&5
21199echo "${ECHO_T}$ac_cv_lib_tre_tre_regcomp" >&6
21200if test "$ac_cv_lib_tre_tre_regcomp" = yes; then
21201
21202cf_add_libs="$LIBS"
21203# reverse order
21204cf_add_0lib=
21205for cf_add_1lib in -ltre; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
21206# filter duplicates
21207for cf_add_1lib in $cf_add_0lib; do
21208	for cf_add_2lib in $cf_add_libs; do
21209		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
21210			cf_add_1lib=
21211			break
21212		fi
21213	done
21214	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
21215done
21216LIBS="$cf_add_libs"
21217
21218fi
21219
21220cf_add_libs="$LIBS"
21221# reverse order
21222cf_add_0lib=
21223for cf_add_1lib in -lsystre; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
21224# filter duplicates
21225for cf_add_1lib in $cf_add_0lib; do
21226	for cf_add_2lib in $cf_add_libs; do
21227		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
21228			cf_add_1lib=
21229			break
21230		fi
21231	done
21232	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
21233done
21234LIBS="$cf_add_libs"
21235
21236		cf_regex_func=regcomp
21237
21238else
21239
21240		echo "$as_me:21240: checking for regcomp in -lgnurx" >&5
21241echo $ECHO_N "checking for regcomp in -lgnurx... $ECHO_C" >&6
21242if test "${ac_cv_lib_gnurx_regcomp+set}" = set; then
21243  echo $ECHO_N "(cached) $ECHO_C" >&6
21244else
21245  ac_check_lib_save_LIBS=$LIBS
21246LIBS="-lgnurx  $LIBS"
21247cat >"conftest.$ac_ext" <<_ACEOF
21248#line 21248 "configure"
21249#include "confdefs.h"
21250
21251/* Override any gcc2 internal prototype to avoid an error.  */
21252#ifdef __cplusplus
21253extern "C"
21254#endif
21255/* We use char because int might match the return type of a gcc2
21256   builtin and then its argument prototype would still apply.  */
21257char regcomp ();
21258int
21259main (void)
21260{
21261regcomp ();
21262  ;
21263  return 0;
21264}
21265_ACEOF
21266rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21267if { (eval echo "$as_me:21267: \"$ac_link\"") >&5
21268  (eval $ac_link) 2>&5
21269  ac_status=$?
21270  echo "$as_me:21270: \$? = $ac_status" >&5
21271  (exit "$ac_status"); } &&
21272         { ac_try='test -s "conftest$ac_exeext"'
21273  { (eval echo "$as_me:21273: \"$ac_try\"") >&5
21274  (eval $ac_try) 2>&5
21275  ac_status=$?
21276  echo "$as_me:21276: \$? = $ac_status" >&5
21277  (exit "$ac_status"); }; }; then
21278  ac_cv_lib_gnurx_regcomp=yes
21279else
21280  echo "$as_me: failed program was:" >&5
21281cat "conftest.$ac_ext" >&5
21282ac_cv_lib_gnurx_regcomp=no
21283fi
21284rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21285LIBS=$ac_check_lib_save_LIBS
21286fi
21287echo "$as_me:21287: result: $ac_cv_lib_gnurx_regcomp" >&5
21288echo "${ECHO_T}$ac_cv_lib_gnurx_regcomp" >&6
21289if test "$ac_cv_lib_gnurx_regcomp" = yes; then
21290
21291cf_add_libs="$LIBS"
21292# reverse order
21293cf_add_0lib=
21294for cf_add_1lib in -lgnurx; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
21295# filter duplicates
21296for cf_add_1lib in $cf_add_0lib; do
21297	for cf_add_2lib in $cf_add_libs; do
21298		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
21299			cf_add_1lib=
21300			break
21301		fi
21302	done
21303	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
21304done
21305LIBS="$cf_add_libs"
21306
21307			cf_regex_func=regcomp
21308fi
21309
21310fi
21311
21312	;;
21313(*)
21314	cf_regex_libs="regex re"
21315	echo "$as_me:21315: checking for regcomp" >&5
21316echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
21317if test "${ac_cv_func_regcomp+set}" = set; then
21318  echo $ECHO_N "(cached) $ECHO_C" >&6
21319else
21320  cat >"conftest.$ac_ext" <<_ACEOF
21321#line 21321 "configure"
21322#include "confdefs.h"
21323#define regcomp autoconf_temporary
21324#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
21325#undef regcomp
21326
21327#ifdef __cplusplus
21328extern "C"
21329#endif
21330
21331/* We use char because int might match the return type of a gcc2
21332   builtin and then its argument prototype would still apply.  */
21333char regcomp (void);
21334
21335int
21336main (void)
21337{
21338
21339/* The GNU C library defines stubs for functions which it implements
21340    to always fail with ENOSYS.  Some functions are actually named
21341    something starting with __ and the normal name is an alias.  */
21342#if defined (__stub_regcomp) || defined (__stub___regcomp)
21343#error found stub for regcomp
21344#endif
21345
21346	return regcomp ();
21347  ;
21348  return 0;
21349}
21350_ACEOF
21351rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21352if { (eval echo "$as_me:21352: \"$ac_link\"") >&5
21353  (eval $ac_link) 2>&5
21354  ac_status=$?
21355  echo "$as_me:21355: \$? = $ac_status" >&5
21356  (exit "$ac_status"); } &&
21357         { ac_try='test -s "conftest$ac_exeext"'
21358  { (eval echo "$as_me:21358: \"$ac_try\"") >&5
21359  (eval $ac_try) 2>&5
21360  ac_status=$?
21361  echo "$as_me:21361: \$? = $ac_status" >&5
21362  (exit "$ac_status"); }; }; then
21363  ac_cv_func_regcomp=yes
21364else
21365  echo "$as_me: failed program was:" >&5
21366cat "conftest.$ac_ext" >&5
21367ac_cv_func_regcomp=no
21368fi
21369rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21370fi
21371echo "$as_me:21371: result: $ac_cv_func_regcomp" >&5
21372echo "${ECHO_T}$ac_cv_func_regcomp" >&6
21373if test "$ac_cv_func_regcomp" = yes; then
21374  cf_regex_func=regcomp
21375else
21376
21377		for cf_regex_lib in $cf_regex_libs
21378		do
21379			as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
21380echo "$as_me:21380: checking for regcomp in -l$cf_regex_lib" >&5
21381echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
21382if eval "test \"\${$as_ac_Lib+set}\" = set"; then
21383  echo $ECHO_N "(cached) $ECHO_C" >&6
21384else
21385  ac_check_lib_save_LIBS=$LIBS
21386LIBS="-l$cf_regex_lib  $LIBS"
21387cat >"conftest.$ac_ext" <<_ACEOF
21388#line 21388 "configure"
21389#include "confdefs.h"
21390
21391/* Override any gcc2 internal prototype to avoid an error.  */
21392#ifdef __cplusplus
21393extern "C"
21394#endif
21395/* We use char because int might match the return type of a gcc2
21396   builtin and then its argument prototype would still apply.  */
21397char regcomp ();
21398int
21399main (void)
21400{
21401regcomp ();
21402  ;
21403  return 0;
21404}
21405_ACEOF
21406rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21407if { (eval echo "$as_me:21407: \"$ac_link\"") >&5
21408  (eval $ac_link) 2>&5
21409  ac_status=$?
21410  echo "$as_me:21410: \$? = $ac_status" >&5
21411  (exit "$ac_status"); } &&
21412         { ac_try='test -s "conftest$ac_exeext"'
21413  { (eval echo "$as_me:21413: \"$ac_try\"") >&5
21414  (eval $ac_try) 2>&5
21415  ac_status=$?
21416  echo "$as_me:21416: \$? = $ac_status" >&5
21417  (exit "$ac_status"); }; }; then
21418  eval "$as_ac_Lib=yes"
21419else
21420  echo "$as_me: failed program was:" >&5
21421cat "conftest.$ac_ext" >&5
21422eval "$as_ac_Lib=no"
21423fi
21424rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21425LIBS=$ac_check_lib_save_LIBS
21426fi
21427echo "$as_me:21427: result: `eval echo '${'"$as_ac_Lib"'}'`" >&5
21428echo "${ECHO_T}`eval echo '${'"$as_ac_Lib"'}'`" >&6
21429if test "`eval echo '${'"$as_ac_Lib"'}'`" = yes; then
21430
21431cf_add_libs="$LIBS"
21432# reverse order
21433cf_add_0lib=
21434for cf_add_1lib in -l$cf_regex_lib; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
21435# filter duplicates
21436for cf_add_1lib in $cf_add_0lib; do
21437	for cf_add_2lib in $cf_add_libs; do
21438		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
21439			cf_add_1lib=
21440			break
21441		fi
21442	done
21443	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
21444done
21445LIBS="$cf_add_libs"
21446
21447					cf_regex_func=regcomp
21448					break
21449fi
21450
21451		done
21452
21453fi
21454
21455	;;
21456esac
21457
21458if test "$cf_regex_func" = no ; then
21459	echo "$as_me:21459: checking for compile" >&5
21460echo $ECHO_N "checking for compile... $ECHO_C" >&6
21461if test "${ac_cv_func_compile+set}" = set; then
21462  echo $ECHO_N "(cached) $ECHO_C" >&6
21463else
21464  cat >"conftest.$ac_ext" <<_ACEOF
21465#line 21465 "configure"
21466#include "confdefs.h"
21467#define compile autoconf_temporary
21468#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
21469#undef compile
21470
21471#ifdef __cplusplus
21472extern "C"
21473#endif
21474
21475/* We use char because int might match the return type of a gcc2
21476   builtin and then its argument prototype would still apply.  */
21477char compile (void);
21478
21479int
21480main (void)
21481{
21482
21483/* The GNU C library defines stubs for functions which it implements
21484    to always fail with ENOSYS.  Some functions are actually named
21485    something starting with __ and the normal name is an alias.  */
21486#if defined (__stub_compile) || defined (__stub___compile)
21487#error found stub for compile
21488#endif
21489
21490	return compile ();
21491  ;
21492  return 0;
21493}
21494_ACEOF
21495rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21496if { (eval echo "$as_me:21496: \"$ac_link\"") >&5
21497  (eval $ac_link) 2>&5
21498  ac_status=$?
21499  echo "$as_me:21499: \$? = $ac_status" >&5
21500  (exit "$ac_status"); } &&
21501         { ac_try='test -s "conftest$ac_exeext"'
21502  { (eval echo "$as_me:21502: \"$ac_try\"") >&5
21503  (eval $ac_try) 2>&5
21504  ac_status=$?
21505  echo "$as_me:21505: \$? = $ac_status" >&5
21506  (exit "$ac_status"); }; }; then
21507  ac_cv_func_compile=yes
21508else
21509  echo "$as_me: failed program was:" >&5
21510cat "conftest.$ac_ext" >&5
21511ac_cv_func_compile=no
21512fi
21513rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21514fi
21515echo "$as_me:21515: result: $ac_cv_func_compile" >&5
21516echo "${ECHO_T}$ac_cv_func_compile" >&6
21517if test "$ac_cv_func_compile" = yes; then
21518  cf_regex_func=compile
21519else
21520
21521		echo "$as_me:21521: checking for compile in -lgen" >&5
21522echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
21523if test "${ac_cv_lib_gen_compile+set}" = set; then
21524  echo $ECHO_N "(cached) $ECHO_C" >&6
21525else
21526  ac_check_lib_save_LIBS=$LIBS
21527LIBS="-lgen  $LIBS"
21528cat >"conftest.$ac_ext" <<_ACEOF
21529#line 21529 "configure"
21530#include "confdefs.h"
21531
21532/* Override any gcc2 internal prototype to avoid an error.  */
21533#ifdef __cplusplus
21534extern "C"
21535#endif
21536/* We use char because int might match the return type of a gcc2
21537   builtin and then its argument prototype would still apply.  */
21538char compile ();
21539int
21540main (void)
21541{
21542compile ();
21543  ;
21544  return 0;
21545}
21546_ACEOF
21547rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21548if { (eval echo "$as_me:21548: \"$ac_link\"") >&5
21549  (eval $ac_link) 2>&5
21550  ac_status=$?
21551  echo "$as_me:21551: \$? = $ac_status" >&5
21552  (exit "$ac_status"); } &&
21553         { ac_try='test -s "conftest$ac_exeext"'
21554  { (eval echo "$as_me:21554: \"$ac_try\"") >&5
21555  (eval $ac_try) 2>&5
21556  ac_status=$?
21557  echo "$as_me:21557: \$? = $ac_status" >&5
21558  (exit "$ac_status"); }; }; then
21559  ac_cv_lib_gen_compile=yes
21560else
21561  echo "$as_me: failed program was:" >&5
21562cat "conftest.$ac_ext" >&5
21563ac_cv_lib_gen_compile=no
21564fi
21565rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21566LIBS=$ac_check_lib_save_LIBS
21567fi
21568echo "$as_me:21568: result: $ac_cv_lib_gen_compile" >&5
21569echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
21570if test "$ac_cv_lib_gen_compile" = yes; then
21571
21572cf_add_libs="$LIBS"
21573# reverse order
21574cf_add_0lib=
21575for cf_add_1lib in -lgen; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
21576# filter duplicates
21577for cf_add_1lib in $cf_add_0lib; do
21578	for cf_add_2lib in $cf_add_libs; do
21579		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
21580			cf_add_1lib=
21581			break
21582		fi
21583	done
21584	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
21585done
21586LIBS="$cf_add_libs"
21587
21588				cf_regex_func=compile
21589fi
21590
21591fi
21592
21593fi
21594
21595if test "$cf_regex_func" = no ; then
21596	{ echo "$as_me:21596: WARNING: cannot find regular expression library" >&5
21597echo "$as_me: WARNING: cannot find regular expression library" >&2;}
21598fi
21599
21600echo "$as_me:21600: checking for regular-expression headers" >&5
21601echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
21602if test "${cf_cv_regex_hdrs+set}" = set; then
21603  echo $ECHO_N "(cached) $ECHO_C" >&6
21604else
21605
21606cf_cv_regex_hdrs=no
21607case "$cf_regex_func" in
21608(compile)
21609	for cf_regex_hdr in regexp.h regexpr.h
21610	do
21611		cat >"conftest.$ac_ext" <<_ACEOF
21612#line 21612 "configure"
21613#include "confdefs.h"
21614#include <$cf_regex_hdr>
21615int
21616main (void)
21617{
21618
21619			char *p = compile("", "", "", 0);
21620			int x = step("", "");
21621			(void)p;
21622			(void)x;
21623
21624  ;
21625  return 0;
21626}
21627_ACEOF
21628rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21629if { (eval echo "$as_me:21629: \"$ac_link\"") >&5
21630  (eval $ac_link) 2>&5
21631  ac_status=$?
21632  echo "$as_me:21632: \$? = $ac_status" >&5
21633  (exit "$ac_status"); } &&
21634         { ac_try='test -s "conftest$ac_exeext"'
21635  { (eval echo "$as_me:21635: \"$ac_try\"") >&5
21636  (eval $ac_try) 2>&5
21637  ac_status=$?
21638  echo "$as_me:21638: \$? = $ac_status" >&5
21639  (exit "$ac_status"); }; }; then
21640
21641			cf_cv_regex_hdrs=$cf_regex_hdr
21642			break
21643
21644else
21645  echo "$as_me: failed program was:" >&5
21646cat "conftest.$ac_ext" >&5
21647fi
21648rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21649	done
21650	;;
21651(*)
21652	for cf_regex_hdr in regex.h
21653	do
21654		cat >"conftest.$ac_ext" <<_ACEOF
21655#line 21655 "configure"
21656#include "confdefs.h"
21657#include <sys/types.h>
21658#include <$cf_regex_hdr>
21659int
21660main (void)
21661{
21662
21663			regex_t *p = 0;
21664			int x = regcomp(p, "", 0);
21665			int y = regexec(p, "", 0, 0, 0);
21666			(void)x;
21667			(void)y;
21668			regfree(p);
21669
21670  ;
21671  return 0;
21672}
21673_ACEOF
21674rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21675if { (eval echo "$as_me:21675: \"$ac_link\"") >&5
21676  (eval $ac_link) 2>&5
21677  ac_status=$?
21678  echo "$as_me:21678: \$? = $ac_status" >&5
21679  (exit "$ac_status"); } &&
21680         { ac_try='test -s "conftest$ac_exeext"'
21681  { (eval echo "$as_me:21681: \"$ac_try\"") >&5
21682  (eval $ac_try) 2>&5
21683  ac_status=$?
21684  echo "$as_me:21684: \$? = $ac_status" >&5
21685  (exit "$ac_status"); }; }; then
21686
21687			cf_cv_regex_hdrs=$cf_regex_hdr
21688			break
21689
21690else
21691  echo "$as_me: failed program was:" >&5
21692cat "conftest.$ac_ext" >&5
21693fi
21694rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21695	done
21696	;;
21697esac
21698
21699fi
21700echo "$as_me:21700: result: $cf_cv_regex_hdrs" >&5
21701echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
21702
21703case "$cf_cv_regex_hdrs" in
21704	(no)		{ echo "$as_me:21704: WARNING: no regular expression header found" >&5
21705echo "$as_me: WARNING: no regular expression header found" >&2;} ;;
21706	(regex.h)
21707cat >>confdefs.h <<\EOF
21708#define HAVE_REGEX_H_FUNCS 1
21709EOF
21710 ;;
21711	(regexp.h)
21712cat >>confdefs.h <<\EOF
21713#define HAVE_REGEXP_H_FUNCS 1
21714EOF
21715 ;;
21716	(regexpr.h)
21717cat >>confdefs.h <<\EOF
21718#define HAVE_REGEXPR_H_FUNCS 1
21719EOF
21720 ;;
21721esac
21722
21723			if test "X$cf_cv_regex_hdrs" != "Xregex.h" ; then
21724				{ { echo "$as_me:21724: error: Only POSIX, PCRE, or PCRE2 regular expressions are supported" >&5
21725echo "$as_me: error: Only POSIX, PCRE, or PCRE2 regular expressions are supported" >&2;}
21726   { (exit 1); exit 1; }; }
21727			fi
21728		fi
21729	fi
21730
21731cat >>confdefs.h <<\EOF
21732#define OPT_SELECT_REGEX 1
21733EOF
21734
21735fi
21736
21737echo "$as_me:21737: checking if you want support for right-scrollbar" >&5
21738echo $ECHO_N "checking if you want support for right-scrollbar... $ECHO_C" >&6
21739
21740# Check whether --enable-rightbar or --disable-rightbar was given.
21741if test "${enable_rightbar+set}" = set; then
21742  enableval="$enable_rightbar"
21743  test "$enableval" != no && enableval=yes
21744	if test "$enableval" != "yes" ; then
21745    enable_rightbar=no
21746	else
21747		enable_rightbar=yes
21748	fi
21749else
21750  enableval=yes
21751	enable_rightbar=yes
21752
21753fi;
21754echo "$as_me:21754: result: $enable_rightbar" >&5
21755echo "${ECHO_T}$enable_rightbar" >&6
21756if test "$enable_rightbar" = yes ; then
21757
21758cat >>confdefs.h <<\EOF
21759#define SCROLLBAR_RIGHT 1
21760EOF
21761
21762fi
21763
21764echo "$as_me:21764: checking if you want check for redundant name-change" >&5
21765echo $ECHO_N "checking if you want check for redundant name-change... $ECHO_C" >&6
21766
21767# Check whether --enable-samename or --disable-samename was given.
21768if test "${enable_samename+set}" = set; then
21769  enableval="$enable_samename"
21770  test "$enableval" != no && enableval=yes
21771	if test "$enableval" != "yes" ; then
21772    enable_samename=no
21773	else
21774		enable_samename=yes
21775	fi
21776else
21777  enableval=yes
21778	enable_samename=yes
21779
21780fi;
21781echo "$as_me:21781: result: $enable_samename" >&5
21782echo "${ECHO_T}$enable_samename" >&6
21783test "$enable_samename" = no &&
21784cat >>confdefs.h <<\EOF
21785#define OPT_SAME_NAME 0
21786EOF
21787
21788echo "$as_me:21788: checking if you want support for selection-actions" >&5
21789echo $ECHO_N "checking if you want support for selection-actions... $ECHO_C" >&6
21790
21791# Check whether --enable-selection-ops or --disable-selection-ops was given.
21792if test "${enable_selection_ops+set}" = set; then
21793  enableval="$enable_selection_ops"
21794  test "$enableval" != no && enableval=yes
21795	if test "$enableval" != "yes" ; then
21796    enable_selection_ops=no
21797	else
21798		enable_selection_ops=yes
21799	fi
21800else
21801  enableval=yes
21802	enable_selection_ops=yes
21803
21804fi;
21805echo "$as_me:21805: result: $enable_selection_ops" >&5
21806echo "${ECHO_T}$enable_selection_ops" >&6
21807test "$enable_selection_ops" = no &&
21808cat >>confdefs.h <<\EOF
21809#define OPT_SELECTION_OPS 0
21810EOF
21811
21812echo "$as_me:21812: checking if you want support for session management" >&5
21813echo $ECHO_N "checking if you want support for session management... $ECHO_C" >&6
21814
21815# Check whether --enable-session-mgt or --disable-session-mgt was given.
21816if test "${enable_session_mgt+set}" = set; then
21817  enableval="$enable_session_mgt"
21818  test "$enableval" != no && enableval=yes
21819	if test "$enableval" != "yes" ; then
21820    enable_session_mgt=no
21821	else
21822		enable_session_mgt=yes
21823	fi
21824else
21825  enableval=yes
21826	enable_session_mgt=yes
21827
21828fi;
21829echo "$as_me:21829: result: $enable_session_mgt" >&5
21830echo "${ECHO_T}$enable_session_mgt" >&6
21831test "$enable_session_mgt" = no &&
21832cat >>confdefs.h <<\EOF
21833#define OPT_SESSION_MGT 0
21834EOF
21835
21836echo "$as_me:21836: checking if you want to use termcap function-keys" >&5
21837echo $ECHO_N "checking if you want to use termcap function-keys... $ECHO_C" >&6
21838
21839# Check whether --enable-tcap-fkeys or --disable-tcap-fkeys was given.
21840if test "${enable_tcap_fkeys+set}" = set; then
21841  enableval="$enable_tcap_fkeys"
21842  test "$enableval" != no && enableval=yes
21843	if test "$enableval" != "yes" ; then
21844    enable_tcap_fkeys=no
21845	else
21846		enable_tcap_fkeys=yes
21847	fi
21848else
21849  enableval=yes
21850	enable_tcap_fkeys=yes
21851
21852fi;
21853echo "$as_me:21853: result: $enable_tcap_fkeys" >&5
21854echo "${ECHO_T}$enable_tcap_fkeys" >&6
21855test "$enable_tcap_fkeys" = yes &&
21856cat >>confdefs.h <<\EOF
21857#define OPT_TCAP_FKEYS 1
21858EOF
21859
21860echo "$as_me:21860: checking if you want to use termcap-query/report" >&5
21861echo $ECHO_N "checking if you want to use termcap-query/report... $ECHO_C" >&6
21862
21863# Check whether --enable-tcap-query or --disable-tcap-query was given.
21864if test "${enable_tcap_query+set}" = set; then
21865  enableval="$enable_tcap_query"
21866  test "$enableval" != no && enableval=yes
21867	if test "$enableval" != "yes" ; then
21868    enable_tcap_query=no
21869	else
21870		enable_tcap_query=yes
21871	fi
21872else
21873  enableval=yes
21874	enable_tcap_query=yes
21875
21876fi;
21877echo "$as_me:21877: result: $enable_tcap_query" >&5
21878echo "${ECHO_T}$enable_tcap_query" >&6
21879test "$enable_tcap_query" = yes &&
21880cat >>confdefs.h <<\EOF
21881#define OPT_TCAP_QUERY 1
21882EOF
21883
21884echo "$as_me:21884: checking if you want support for tek4014" >&5
21885echo $ECHO_N "checking if you want support for tek4014... $ECHO_C" >&6
21886
21887# Check whether --enable-tek4014 or --disable-tek4014 was given.
21888if test "${enable_tek4014+set}" = set; then
21889  enableval="$enable_tek4014"
21890  test "$enableval" != no && enableval=yes
21891	if test "$enableval" != "yes" ; then
21892    enable_tek4014=no
21893	else
21894		enable_tek4014=yes
21895	fi
21896else
21897  enableval=yes
21898	enable_tek4014=yes
21899
21900fi;
21901echo "$as_me:21901: result: $enable_tek4014" >&5
21902echo "${ECHO_T}$enable_tek4014" >&6
21903if test "$enable_tek4014" = no ; then
21904
21905cat >>confdefs.h <<\EOF
21906#define OPT_TEK4014 0
21907EOF
21908
21909else
21910	EXTRAHDRS="$EXTRAHDRS Tekparse.h"
21911	EXTRASRCS="$EXTRASRCS TekPrsTbl.c Tekproc.c"
21912	EXTRAOBJS="$EXTRAOBJS TekPrsTbl.o Tekproc.o"
21913fi
21914
21915echo "$as_me:21915: checking if you want pulldown menus with a toolbar" >&5
21916echo $ECHO_N "checking if you want pulldown menus with a toolbar... $ECHO_C" >&6
21917
21918# Check whether --enable-toolbar or --disable-toolbar was given.
21919if test "${enable_toolbar+set}" = set; then
21920  enableval="$enable_toolbar"
21921  test "$enableval" != yes && enableval=no
21922	if test "$enableval" != "no" ; then
21923    enable_toolbar=yes
21924	else
21925		enable_toolbar=no
21926	fi
21927else
21928  enableval=no
21929	enable_toolbar=no
21930
21931fi;
21932echo "$as_me:21932: result: $enable_toolbar" >&5
21933echo "${ECHO_T}$enable_toolbar" >&6
21934if test "$enable_toolbar" = yes ; then
21935
21936cat >>confdefs.h <<\EOF
21937#define OPT_TOOLBAR 1
21938EOF
21939
21940fi
21941
21942echo "$as_me:21942: checking if you want VT52 emulation" >&5
21943echo $ECHO_N "checking if you want VT52 emulation... $ECHO_C" >&6
21944
21945# Check whether --enable-vt52 or --disable-vt52 was given.
21946if test "${enable_vt52+set}" = set; then
21947  enableval="$enable_vt52"
21948  test "$enableval" != no && enableval=yes
21949	if test "$enableval" != "yes" ; then
21950    enable_vt52=no
21951	else
21952		enable_vt52=yes
21953	fi
21954else
21955  enableval=yes
21956	enable_vt52=yes
21957
21958fi;
21959echo "$as_me:21959: result: $enable_vt52" >&5
21960echo "${ECHO_T}$enable_vt52" >&6
21961test "$enable_vt52" = no &&
21962cat >>confdefs.h <<\EOF
21963#define OPT_VT52_MODE 0
21964EOF
21965
21966echo "$as_me:21966: checking if you want wide-attribute support" >&5
21967echo $ECHO_N "checking if you want wide-attribute support... $ECHO_C" >&6
21968
21969# Check whether --enable-wide-attrs or --disable-wide-attrs was given.
21970if test "${enable_wide_attrs+set}" = set; then
21971  enableval="$enable_wide_attrs"
21972  test "$enableval" != no && enableval=yes
21973	if test "$enableval" != "yes" ; then
21974    enable_wattr=no
21975	else
21976		enable_wattr=yes
21977	fi
21978else
21979  enableval=yes
21980	enable_wattr=yes
21981
21982fi;
21983echo "$as_me:21983: result: $enable_wattr" >&5
21984echo "${ECHO_T}$enable_wattr" >&6
21985
21986if test x$enable_wattr = xno && test x$enable_direct_color = xyes ; then
21987	{ echo "$as_me:21987: WARNING: overriding wide-attributes to support direct color" >&5
21988echo "$as_me: WARNING: overriding wide-attributes to support direct color" >&2;}
21989	enable_wattr=yes
21990fi
21991
21992echo "$as_me:21992: checking if you want wide-character support" >&5
21993echo $ECHO_N "checking if you want wide-character support... $ECHO_C" >&6
21994
21995# Check whether --enable-wide-chars or --disable-wide-chars was given.
21996if test "${enable_wide_chars+set}" = set; then
21997  enableval="$enable_wide_chars"
21998  test "$enableval" != no && enableval=yes
21999	if test "$enableval" != "yes" ; then
22000    enable_wchar=no
22001	else
22002		enable_wchar=yes
22003	fi
22004else
22005  enableval=yes
22006	enable_wchar=yes
22007
22008fi;
22009echo "$as_me:22009: result: $enable_wchar" >&5
22010echo "${ECHO_T}$enable_wchar" >&6
22011test "x$enable_wattr" = xno &&
22012cat >>confdefs.h <<\EOF
22013#define OPT_WIDE_ATTRS 0
22014EOF
22015
22016echo "$as_me:22016: checking if you want only 16-bit character support" >&5
22017echo $ECHO_N "checking if you want only 16-bit character support... $ECHO_C" >&6
22018
22019# Check whether --enable-16bit-chars or --disable-16bit-chars was given.
22020if test "${enable_16bit_chars+set}" = set; then
22021  enableval="$enable_16bit_chars"
22022  test "$enableval" != yes && enableval=no
22023	if test "$enableval" != "no" ; then
22024    enable_16bit_chars=yes
22025	else
22026		enable_16bit_chars=no
22027	fi
22028else
22029  enableval=no
22030	enable_16bit_chars=no
22031
22032fi;
22033echo "$as_me:22033: result: $enable_16bit_chars" >&5
22034echo "${ECHO_T}$enable_16bit_chars" >&6
22035
22036if test "$enable_16bit_chars" = yes ; then
22037
22038cat >>confdefs.h <<\EOF
22039#define OPT_WIDER_ICHAR 0
22040EOF
22041
22042	enable_wchar=yes
22043fi
22044
22045if test "$enable_wchar" = yes ; then
22046
22047echo "$as_me:22047: checking if you want to use mini-luit/Latin9 built-in support" >&5
22048echo $ECHO_N "checking if you want to use mini-luit/Latin9 built-in support... $ECHO_C" >&6
22049
22050# Check whether --enable-mini-luit or --disable-mini-luit was given.
22051if test "${enable_mini_luit+set}" = set; then
22052  enableval="$enable_mini_luit"
22053  test "$enableval" != yes && enableval=no
22054	if test "$enableval" != "no" ; then
22055    enable_mini_luit=yes
22056	else
22057		enable_mini_luit=no
22058	fi
22059else
22060  enableval=no
22061	enable_mini_luit=no
22062
22063fi;
22064echo "$as_me:22064: result: $enable_mini_luit" >&5
22065echo "${ECHO_T}$enable_mini_luit" >&6
22066if test "$enable_mini_luit" = yes ; then
22067
22068cat >>confdefs.h <<\EOF
22069#define OPT_MINI_LUIT 1
22070EOF
22071
22072fi
22073
22074echo "$as_me:22074: checking if you want to use luit" >&5
22075echo $ECHO_N "checking if you want to use luit... $ECHO_C" >&6
22076
22077# Check whether --enable-luit or --disable-luit was given.
22078if test "${enable_luit+set}" = set; then
22079  enableval="$enable_luit"
22080  test "$enableval" != no && enableval=yes
22081	if test "$enableval" != "yes" ; then
22082    enable_luit=no
22083	else
22084		enable_luit=yes
22085	fi
22086else
22087  enableval=yes
22088	enable_luit=yes
22089
22090fi;
22091echo "$as_me:22091: result: $enable_luit" >&5
22092echo "${ECHO_T}$enable_luit" >&6
22093if test "$enable_luit" = yes ; then
22094
22095cat >>confdefs.h <<\EOF
22096#define OPT_LUIT_PROG 1
22097EOF
22098
22099test -z "$LUIT" && LUIT="xterm-filter"
22100for ac_prog in $LUIT xterm-filter bluit luit
22101do
22102  # Extract the first word of "$ac_prog", so it can be a program name with args.
22103set dummy $ac_prog; ac_word=$2
22104echo "$as_me:22104: checking for $ac_word" >&5
22105echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22106if test "${ac_cv_path_LUIT+set}" = set; then
22107  echo $ECHO_N "(cached) $ECHO_C" >&6
22108else
22109  case $LUIT in
22110  [\\/]* | ?:[\\/]*)
22111  ac_cv_path_LUIT="$LUIT" # Let the user override the test with a path.
22112  ;;
22113  *)
22114  ac_save_IFS=$IFS; IFS=$ac_path_separator
22115ac_dummy="$PATH"
22116for ac_dir in $ac_dummy; do
22117  IFS=$ac_save_IFS
22118  test -z "$ac_dir" && ac_dir=.
22119  if $as_executable_p "$ac_dir/$ac_word"; then
22120   ac_cv_path_LUIT="$ac_dir/$ac_word"
22121   echo "$as_me:22121: found $ac_dir/$ac_word" >&5
22122   break
22123fi
22124done
22125
22126  ;;
22127esac
22128fi
22129LUIT=$ac_cv_path_LUIT
22130
22131if test -n "$LUIT"; then
22132  echo "$as_me:22132: result: $LUIT" >&5
22133echo "${ECHO_T}$LUIT" >&6
22134else
22135  echo "$as_me:22135: result: no" >&5
22136echo "${ECHO_T}no" >&6
22137fi
22138
22139  test -n "$LUIT" && break
22140done
22141test -n "$LUIT" || LUIT="$LUIT"
22142
22143cf_path_prog=""
22144cf_path_args=""
22145IFS="${IFS:- 	}"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
22146for cf_temp in $ac_cv_path_LUIT
22147do
22148	if test -z "$cf_path_prog" ; then
22149		if test "$with_full_paths" = yes ; then
22150
22151if test "x$prefix" != xNONE; then
22152	cf_path_syntax="$prefix"
22153else
22154	cf_path_syntax="$ac_default_prefix"
22155fi
22156
22157case ".$cf_temp" in
22158(.\$\(*\)*|.\'*\'*)
22159	;;
22160(..|./*|.\\*)
22161	;;
22162(.[a-zA-Z]:[\\/]*) # OS/2 EMX
22163	;;
22164(.\$\{*prefix\}*|.\$\{*dir\}*)
22165	eval cf_temp="$cf_temp"
22166	case ".$cf_temp" in
22167	(.NONE/*)
22168		cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
22169		;;
22170	esac
22171	;;
22172(.no|.NONE/*)
22173	cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
22174	;;
22175(*)
22176	break
22177	;;
22178esac
22179
22180			cf_path_prog="$cf_temp"
22181		else
22182			cf_path_prog="`basename "$cf_temp"`"
22183		fi
22184	elif test -z "$cf_path_args" ; then
22185		cf_path_args="$cf_temp"
22186	else
22187		cf_path_args="$cf_path_args $cf_temp"
22188	fi
22189done
22190IFS="$cf_save_ifs"
22191
22192if test -n "$cf_path_prog" ; then
22193
22194echo "${as_me:-configure}:22194: testing defining path for ${cf_path_prog} ..." 1>&5
22195
22196cat >>confdefs.h <<EOF
22197#define LUIT_PATH "$cf_path_prog"
22198EOF
22199
22200	test -n "$cf_path_args" &&
22201cat >>confdefs.h <<EOF
22202#define LUIT_ARGS "$cf_path_args"
22203EOF
22204
22205fi
22206
22207fi
22208
22209cat >>confdefs.h <<\EOF
22210#define OPT_WIDE_CHARS 1
22211EOF
22212
22213	EXTRAHDRS="$EXTRAHDRS charclass.h precompose.h wcwidth.h"
22214	EXTRASRCS="$EXTRASRCS charclass.c precompose.c wcwidth.c"
22215	EXTRAOBJS="$EXTRAOBJS charclass.o precompose.o wcwidth.o"
22216fi
22217
22218echo "$as_me:22218: checking if you want dynamic-abbreviation support" >&5
22219echo $ECHO_N "checking if you want dynamic-abbreviation support... $ECHO_C" >&6
22220
22221# Check whether --enable-dabbrev or --disable-dabbrev was given.
22222if test "${enable_dabbrev+set}" = set; then
22223  enableval="$enable_dabbrev"
22224  test "$enableval" != yes && enableval=no
22225	if test "$enableval" != "no" ; then
22226    enable_dabbrev=yes
22227	else
22228		enable_dabbrev=no
22229	fi
22230else
22231  enableval=no
22232	enable_dabbrev=no
22233
22234fi;
22235echo "$as_me:22235: result: $enable_dabbrev" >&5
22236echo "${ECHO_T}$enable_dabbrev" >&6
22237if test "$enable_dabbrev" = yes ; then
22238
22239cat >>confdefs.h <<\EOF
22240#define OPT_DABBREV 1
22241EOF
22242
22243fi
22244
22245echo "$as_me:22245: checking if you want DECterm Locator support" >&5
22246echo $ECHO_N "checking if you want DECterm Locator support... $ECHO_C" >&6
22247
22248# Check whether --enable-dec-locator or --disable-dec-locator was given.
22249if test "${enable_dec_locator+set}" = set; then
22250  enableval="$enable_dec_locator"
22251  test "$enableval" != yes && enableval=no
22252	if test "$enableval" != "no" ; then
22253    enable_dec_locator=yes
22254	else
22255		enable_dec_locator=no
22256	fi
22257else
22258  enableval=no
22259	enable_dec_locator=no
22260
22261fi;
22262echo "$as_me:22262: result: $enable_dec_locator" >&5
22263echo "${ECHO_T}$enable_dec_locator" >&6
22264if test "$enable_dec_locator" = yes ; then
22265
22266cat >>confdefs.h <<\EOF
22267#define OPT_DEC_LOCATOR 1
22268EOF
22269
22270fi
22271
22272echo "$as_me:22272: checking if you want XHTML and SVG screen dump support" >&5
22273echo $ECHO_N "checking if you want XHTML and SVG screen dump support... $ECHO_C" >&6
22274
22275# Check whether --enable-screen-dumps or --disable-screen-dumps was given.
22276if test "${enable_screen_dumps+set}" = set; then
22277  enableval="$enable_screen_dumps"
22278  test "$enableval" != no && enableval=yes
22279	if test "$enableval" != "yes" ; then
22280    enable_screen_dumps=no
22281	else
22282		enable_screen_dumps=yes
22283	fi
22284else
22285  enableval=yes
22286	enable_screen_dumps=yes
22287
22288fi;
22289echo "$as_me:22289: result: $enable_screen_dumps" >&5
22290echo "${ECHO_T}$enable_screen_dumps" >&6
22291if test "$enable_screen_dumps" = yes ; then
22292	EXTRASRCS="$EXTRASRCS html.c svg.c"
22293	EXTRAOBJS="$EXTRAOBJS html.o svg.o"
22294else
22295
22296cat >>confdefs.h <<\EOF
22297#define OPT_SCREEN_DUMPS 0
22298EOF
22299
22300fi
22301
22302echo "$as_me:22302: checking if you want ReGIS graphics support" >&5
22303echo $ECHO_N "checking if you want ReGIS graphics support... $ECHO_C" >&6
22304
22305# Check whether --enable-regis-graphics or --disable-regis-graphics was given.
22306if test "${enable_regis_graphics+set}" = set; then
22307  enableval="$enable_regis_graphics"
22308  test "$enableval" != yes && enableval=no
22309	if test "$enableval" != "no" ; then
22310    enable_regis_graphics=yes
22311	else
22312		enable_regis_graphics=no
22313	fi
22314else
22315  enableval=no
22316	enable_regis_graphics=no
22317
22318fi;
22319echo "$as_me:22319: result: $enable_regis_graphics" >&5
22320echo "${ECHO_T}$enable_regis_graphics" >&6
22321if test "$enable_regis_graphics" = yes ; then
22322
22323cat >>confdefs.h <<\EOF
22324#define OPT_REGIS_GRAPHICS 1
22325EOF
22326
22327	EXTRAHDRS="$EXTRAHDRS graphics_regis.h"
22328	EXTRASRCS="$EXTRASRCS graphics_regis.c"
22329	EXTRAOBJS="$EXTRAOBJS graphics_regis.o"
22330
22331echo "$as_me:22331: checking if -lm needed for math functions" >&5
22332echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
22333if test "${cf_cv_need_libm+set}" = set; then
22334  echo $ECHO_N "(cached) $ECHO_C" >&6
22335else
22336
22337	cat >"conftest.$ac_ext" <<_ACEOF
22338#line 22338 "configure"
22339#include "confdefs.h"
22340
22341	#include <stdio.h>
22342	#include <stdlib.h>
22343	#include <math.h>
22344
22345int
22346main (void)
22347{
22348double x = rand(); printf("result = %g\\n", sin(x))
22349  ;
22350  return 0;
22351}
22352_ACEOF
22353rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22354if { (eval echo "$as_me:22354: \"$ac_link\"") >&5
22355  (eval $ac_link) 2>&5
22356  ac_status=$?
22357  echo "$as_me:22357: \$? = $ac_status" >&5
22358  (exit "$ac_status"); } &&
22359         { ac_try='test -s "conftest$ac_exeext"'
22360  { (eval echo "$as_me:22360: \"$ac_try\"") >&5
22361  (eval $ac_try) 2>&5
22362  ac_status=$?
22363  echo "$as_me:22363: \$? = $ac_status" >&5
22364  (exit "$ac_status"); }; }; then
22365  cf_cv_need_libm=no
22366else
22367  echo "$as_me: failed program was:" >&5
22368cat "conftest.$ac_ext" >&5
22369cf_cv_need_libm=yes
22370fi
22371rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22372fi
22373echo "$as_me:22373: result: $cf_cv_need_libm" >&5
22374echo "${ECHO_T}$cf_cv_need_libm" >&6
22375if test "$cf_cv_need_libm" = yes
22376then
22377
22378cf_add_libs="$LIBS"
22379# reverse order
22380cf_add_0lib=
22381for cf_add_1lib in -lm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
22382# filter duplicates
22383for cf_add_1lib in $cf_add_0lib; do
22384	for cf_add_2lib in $cf_add_libs; do
22385		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
22386			cf_add_1lib=
22387			break
22388		fi
22389	done
22390	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
22391done
22392LIBS="$cf_add_libs"
22393
22394fi
22395
22396fi
22397
22398echo "$as_me:22398: checking if you want sixel graphics support" >&5
22399echo $ECHO_N "checking if you want sixel graphics support... $ECHO_C" >&6
22400
22401# Check whether --enable-sixel-graphics or --disable-sixel-graphics was given.
22402if test "${enable_sixel_graphics+set}" = set; then
22403  enableval="$enable_sixel_graphics"
22404  test "$enableval" != no && enableval=yes
22405	if test "$enableval" != "yes" ; then
22406    enable_sixel_graphics=no
22407	else
22408		enable_sixel_graphics=yes
22409	fi
22410else
22411  enableval=yes
22412	enable_sixel_graphics=yes
22413
22414fi;
22415echo "$as_me:22415: result: $enable_sixel_graphics" >&5
22416echo "${ECHO_T}$enable_sixel_graphics" >&6
22417if test "$enable_sixel_graphics" = yes ; then
22418
22419cat >>confdefs.h <<\EOF
22420#define OPT_SIXEL_GRAPHICS 1
22421EOF
22422
22423	EXTRAHDRS="$EXTRAHDRS graphics_sixel.h"
22424	EXTRASRCS="$EXTRASRCS graphics_sixel.c"
22425	EXTRAOBJS="$EXTRAOBJS graphics_sixel.o"
22426fi
22427
22428if test "$enable_regis_graphics" = yes || test "$enable_sixel_graphics" = yes ; then
22429
22430cat >>confdefs.h <<\EOF
22431#define OPT_GRAPHICS 1
22432EOF
22433
22434	EXTRAHDRS="$EXTRAHDRS graphics.h"
22435	EXTRASRCS="$EXTRASRCS graphics.c"
22436	EXTRAOBJS="$EXTRAOBJS graphics.o"
22437fi
22438
22439echo "$as_me:22439: checking if you want sixel screen dump support" >&5
22440echo $ECHO_N "checking if you want sixel screen dump support... $ECHO_C" >&6
22441
22442# Check whether --enable-print-graphics or --disable-print-graphics was given.
22443if test "${enable_print_graphics+set}" = set; then
22444  enableval="$enable_print_graphics"
22445  test "$enableval" != no && enableval=yes
22446	if test "$enableval" != "yes" ; then
22447    enable_print_graphics=no
22448	else
22449		enable_print_graphics=$enable_regis_graphics
22450	fi
22451else
22452  enableval=yes
22453	enable_print_graphics=$enable_regis_graphics
22454
22455fi;
22456echo "$as_me:22456: result: $enable_print_graphics" >&5
22457echo "${ECHO_T}$enable_print_graphics" >&6
22458if test "$enable_print_graphics" = yes ; then
22459
22460cat >>confdefs.h <<\EOF
22461#define OPT_PRINT_GRAPHICS 1
22462EOF
22463
22464fi
22465
22466echo "$as_me:22466: checking if you want VT420 rectangle support" >&5
22467echo $ECHO_N "checking if you want VT420 rectangle support... $ECHO_C" >&6
22468
22469# Check whether --enable-rectangles or --disable-rectangles was given.
22470if test "${enable_rectangles+set}" = set; then
22471  enableval="$enable_rectangles"
22472  test "$enableval" != no && enableval=yes
22473	if test "$enableval" != "yes" ; then
22474    enable_rectangles=no
22475	else
22476		enable_rectangles=yes
22477	fi
22478else
22479  enableval=yes
22480	enable_rectangles=yes
22481
22482fi;
22483echo "$as_me:22483: result: $enable_rectangles" >&5
22484echo "${ECHO_T}$enable_rectangles" >&6
22485if test "$enable_rectangles" = yes ; then
22486
22487cat >>confdefs.h <<\EOF
22488#define OPT_DEC_RECTOPS 1
22489EOF
22490
22491fi
22492
22493echo "$as_me:22493: checking if you want -ziconbeep option" >&5
22494echo $ECHO_N "checking if you want -ziconbeep option... $ECHO_C" >&6
22495
22496# Check whether --enable-ziconbeep or --disable-ziconbeep was given.
22497if test "${enable_ziconbeep+set}" = set; then
22498  enableval="$enable_ziconbeep"
22499  test "$enableval" != no && enableval=yes
22500	if test "$enableval" != "yes" ; then
22501    enable_ziconbeep=no
22502	else
22503		enable_ziconbeep=yes
22504	fi
22505else
22506  enableval=yes
22507	enable_ziconbeep=yes
22508
22509fi;
22510echo "$as_me:22510: result: $enable_ziconbeep" >&5
22511echo "${ECHO_T}$enable_ziconbeep" >&6
22512test "$enable_ziconbeep" = no &&
22513cat >>confdefs.h <<\EOF
22514#define OPT_ZICONBEEP 0
22515EOF
22516
22517###############################################################################
22518
22519echo "$as_me:22519: checking if you want debugging traces" >&5
22520echo $ECHO_N "checking if you want debugging traces... $ECHO_C" >&6
22521
22522# Check whether --enable-trace or --disable-trace was given.
22523if test "${enable_trace+set}" = set; then
22524  enableval="$enable_trace"
22525  test "$enableval" != yes && enableval=no
22526	if test "$enableval" != "no" ; then
22527    enable_trace=yes
22528	else
22529		enable_trace=no
22530	fi
22531else
22532  enableval=no
22533	enable_trace=no
22534
22535fi;
22536echo "$as_me:22536: result: $enable_trace" >&5
22537echo "${ECHO_T}$enable_trace" >&6
22538if test "$enable_trace" = yes ; then
22539
22540cat >>confdefs.h <<\EOF
22541#define OPT_TRACE 1
22542EOF
22543
22544	EXTRASRCS="$EXTRASRCS trace.c"
22545	EXTRAOBJS="$EXTRAOBJS trace.o"
22546fi
22547
22548echo "$as_me:22548: checking if you want to use dmalloc for testing" >&5
22549echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
22550
22551# Check whether --with-dmalloc or --without-dmalloc was given.
22552if test "${with_dmalloc+set}" = set; then
22553  withval="$with_dmalloc"
22554
22555cat >>confdefs.h <<EOF
22556#define USE_DMALLOC 1
22557EOF
22558
22559	: "${with_cflags:=-g}"
22560	: "${enable_leaks:=no}"
22561	 with_dmalloc=yes
22562else
22563  with_dmalloc=
22564fi;
22565echo "$as_me:22565: result: ${with_dmalloc:-no}" >&5
22566echo "${ECHO_T}${with_dmalloc:-no}" >&6
22567
22568case ".$with_cflags" in
22569(.*-g*)
22570	case .$CFLAGS in
22571	(.*-g*)
22572		;;
22573	(*)
22574
22575cf_fix_cppflags=no
22576cf_new_cflags=
22577cf_new_cppflags=
22578cf_new_extra_cppflags=
22579
22580for cf_add_cflags in -g
22581do
22582case "$cf_fix_cppflags" in
22583(no)
22584	case "$cf_add_cflags" in
22585	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
22586		case "$cf_add_cflags" in
22587		(-D*)
22588			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
22589
22590			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
22591				&& test -z "${cf_tst_cflags}" \
22592				&& cf_fix_cppflags=yes
22593
22594			if test "$cf_fix_cppflags" = yes ; then
22595
22596	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
22597	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
22598
22599				continue
22600			elif test "${cf_tst_cflags}" = "\"'" ; then
22601
22602	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
22603	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
22604
22605				continue
22606			fi
22607			;;
22608		esac
22609		case "$CPPFLAGS" in
22610		(*$cf_add_cflags)
22611			;;
22612		(*)
22613			case "$cf_add_cflags" in
22614			(-D*)
22615				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
22616
22617CPPFLAGS=`echo "$CPPFLAGS" | \
22618	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
22619		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
22620
22621				;;
22622			esac
22623
22624	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
22625	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
22626
22627			;;
22628		esac
22629		;;
22630	(*)
22631
22632	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
22633	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
22634
22635		;;
22636	esac
22637	;;
22638(yes)
22639
22640	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
22641	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
22642
22643	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
22644
22645	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
22646		&& test -z "${cf_tst_cflags}" \
22647		&& cf_fix_cppflags=no
22648	;;
22649esac
22650done
22651
22652if test -n "$cf_new_cflags" ; then
22653
22654	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
22655	CFLAGS="${CFLAGS}$cf_new_cflags"
22656
22657fi
22658
22659if test -n "$cf_new_cppflags" ; then
22660
22661	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
22662	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
22663
22664fi
22665
22666if test -n "$cf_new_extra_cppflags" ; then
22667
22668	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
22669	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
22670
22671fi
22672
22673		;;
22674	esac
22675	;;
22676esac
22677
22678if test "$with_dmalloc" = yes ; then
22679	echo "$as_me:22679: checking for dmalloc.h" >&5
22680echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
22681if test "${ac_cv_header_dmalloc_h+set}" = set; then
22682  echo $ECHO_N "(cached) $ECHO_C" >&6
22683else
22684  cat >"conftest.$ac_ext" <<_ACEOF
22685#line 22685 "configure"
22686#include "confdefs.h"
22687#include <dmalloc.h>
22688_ACEOF
22689if { (eval echo "$as_me:22689: \"$ac_cpp "conftest.$ac_ext"\"") >&5
22690  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
22691  ac_status=$?
22692  $EGREP -v '^ *\+' conftest.er1 >conftest.err
22693  rm -f conftest.er1
22694  cat conftest.err >&5
22695  echo "$as_me:22695: \$? = $ac_status" >&5
22696  (exit "$ac_status"); } >/dev/null; then
22697  if test -s conftest.err; then
22698    ac_cpp_err=$ac_c_preproc_warn_flag
22699  else
22700    ac_cpp_err=
22701  fi
22702else
22703  ac_cpp_err=yes
22704fi
22705if test -z "$ac_cpp_err"; then
22706  ac_cv_header_dmalloc_h=yes
22707else
22708  echo "$as_me: failed program was:" >&5
22709  cat "conftest.$ac_ext" >&5
22710  ac_cv_header_dmalloc_h=no
22711fi
22712rm -f conftest.err "conftest.$ac_ext"
22713fi
22714echo "$as_me:22714: result: $ac_cv_header_dmalloc_h" >&5
22715echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
22716if test "$ac_cv_header_dmalloc_h" = yes; then
22717
22718echo "$as_me:22718: checking for dmalloc_debug in -ldmalloc" >&5
22719echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
22720if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
22721  echo $ECHO_N "(cached) $ECHO_C" >&6
22722else
22723  ac_check_lib_save_LIBS=$LIBS
22724LIBS="-ldmalloc  $LIBS"
22725cat >"conftest.$ac_ext" <<_ACEOF
22726#line 22726 "configure"
22727#include "confdefs.h"
22728
22729/* Override any gcc2 internal prototype to avoid an error.  */
22730#ifdef __cplusplus
22731extern "C"
22732#endif
22733/* We use char because int might match the return type of a gcc2
22734   builtin and then its argument prototype would still apply.  */
22735char dmalloc_debug ();
22736int
22737main (void)
22738{
22739dmalloc_debug ();
22740  ;
22741  return 0;
22742}
22743_ACEOF
22744rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22745if { (eval echo "$as_me:22745: \"$ac_link\"") >&5
22746  (eval $ac_link) 2>&5
22747  ac_status=$?
22748  echo "$as_me:22748: \$? = $ac_status" >&5
22749  (exit "$ac_status"); } &&
22750         { ac_try='test -s "conftest$ac_exeext"'
22751  { (eval echo "$as_me:22751: \"$ac_try\"") >&5
22752  (eval $ac_try) 2>&5
22753  ac_status=$?
22754  echo "$as_me:22754: \$? = $ac_status" >&5
22755  (exit "$ac_status"); }; }; then
22756  ac_cv_lib_dmalloc_dmalloc_debug=yes
22757else
22758  echo "$as_me: failed program was:" >&5
22759cat "conftest.$ac_ext" >&5
22760ac_cv_lib_dmalloc_dmalloc_debug=no
22761fi
22762rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22763LIBS=$ac_check_lib_save_LIBS
22764fi
22765echo "$as_me:22765: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
22766echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
22767if test "$ac_cv_lib_dmalloc_dmalloc_debug" = yes; then
22768  cat >>confdefs.h <<EOF
22769#define HAVE_LIBDMALLOC 1
22770EOF
22771
22772  LIBS="-ldmalloc $LIBS"
22773
22774fi
22775
22776fi
22777
22778fi
22779
22780echo "$as_me:22780: checking if you want to use dbmalloc for testing" >&5
22781echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
22782
22783# Check whether --with-dbmalloc or --without-dbmalloc was given.
22784if test "${with_dbmalloc+set}" = set; then
22785  withval="$with_dbmalloc"
22786
22787cat >>confdefs.h <<EOF
22788#define USE_DBMALLOC 1
22789EOF
22790
22791	: "${with_cflags:=-g}"
22792	: "${enable_leaks:=no}"
22793	 with_dbmalloc=yes
22794else
22795  with_dbmalloc=
22796fi;
22797echo "$as_me:22797: result: ${with_dbmalloc:-no}" >&5
22798echo "${ECHO_T}${with_dbmalloc:-no}" >&6
22799
22800case ".$with_cflags" in
22801(.*-g*)
22802	case .$CFLAGS in
22803	(.*-g*)
22804		;;
22805	(*)
22806
22807cf_fix_cppflags=no
22808cf_new_cflags=
22809cf_new_cppflags=
22810cf_new_extra_cppflags=
22811
22812for cf_add_cflags in -g
22813do
22814case "$cf_fix_cppflags" in
22815(no)
22816	case "$cf_add_cflags" in
22817	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
22818		case "$cf_add_cflags" in
22819		(-D*)
22820			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
22821
22822			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
22823				&& test -z "${cf_tst_cflags}" \
22824				&& cf_fix_cppflags=yes
22825
22826			if test "$cf_fix_cppflags" = yes ; then
22827
22828	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
22829	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
22830
22831				continue
22832			elif test "${cf_tst_cflags}" = "\"'" ; then
22833
22834	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
22835	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
22836
22837				continue
22838			fi
22839			;;
22840		esac
22841		case "$CPPFLAGS" in
22842		(*$cf_add_cflags)
22843			;;
22844		(*)
22845			case "$cf_add_cflags" in
22846			(-D*)
22847				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
22848
22849CPPFLAGS=`echo "$CPPFLAGS" | \
22850	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
22851		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
22852
22853				;;
22854			esac
22855
22856	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
22857	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
22858
22859			;;
22860		esac
22861		;;
22862	(*)
22863
22864	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
22865	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
22866
22867		;;
22868	esac
22869	;;
22870(yes)
22871
22872	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
22873	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
22874
22875	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
22876
22877	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
22878		&& test -z "${cf_tst_cflags}" \
22879		&& cf_fix_cppflags=no
22880	;;
22881esac
22882done
22883
22884if test -n "$cf_new_cflags" ; then
22885
22886	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
22887	CFLAGS="${CFLAGS}$cf_new_cflags"
22888
22889fi
22890
22891if test -n "$cf_new_cppflags" ; then
22892
22893	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
22894	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
22895
22896fi
22897
22898if test -n "$cf_new_extra_cppflags" ; then
22899
22900	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
22901	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
22902
22903fi
22904
22905		;;
22906	esac
22907	;;
22908esac
22909
22910if test "$with_dbmalloc" = yes ; then
22911	echo "$as_me:22911: checking for dbmalloc.h" >&5
22912echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
22913if test "${ac_cv_header_dbmalloc_h+set}" = set; then
22914  echo $ECHO_N "(cached) $ECHO_C" >&6
22915else
22916  cat >"conftest.$ac_ext" <<_ACEOF
22917#line 22917 "configure"
22918#include "confdefs.h"
22919#include <dbmalloc.h>
22920_ACEOF
22921if { (eval echo "$as_me:22921: \"$ac_cpp "conftest.$ac_ext"\"") >&5
22922  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
22923  ac_status=$?
22924  $EGREP -v '^ *\+' conftest.er1 >conftest.err
22925  rm -f conftest.er1
22926  cat conftest.err >&5
22927  echo "$as_me:22927: \$? = $ac_status" >&5
22928  (exit "$ac_status"); } >/dev/null; then
22929  if test -s conftest.err; then
22930    ac_cpp_err=$ac_c_preproc_warn_flag
22931  else
22932    ac_cpp_err=
22933  fi
22934else
22935  ac_cpp_err=yes
22936fi
22937if test -z "$ac_cpp_err"; then
22938  ac_cv_header_dbmalloc_h=yes
22939else
22940  echo "$as_me: failed program was:" >&5
22941  cat "conftest.$ac_ext" >&5
22942  ac_cv_header_dbmalloc_h=no
22943fi
22944rm -f conftest.err "conftest.$ac_ext"
22945fi
22946echo "$as_me:22946: result: $ac_cv_header_dbmalloc_h" >&5
22947echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
22948if test "$ac_cv_header_dbmalloc_h" = yes; then
22949
22950echo "$as_me:22950: checking for debug_malloc in -ldbmalloc" >&5
22951echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
22952if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
22953  echo $ECHO_N "(cached) $ECHO_C" >&6
22954else
22955  ac_check_lib_save_LIBS=$LIBS
22956LIBS="-ldbmalloc  $LIBS"
22957cat >"conftest.$ac_ext" <<_ACEOF
22958#line 22958 "configure"
22959#include "confdefs.h"
22960
22961/* Override any gcc2 internal prototype to avoid an error.  */
22962#ifdef __cplusplus
22963extern "C"
22964#endif
22965/* We use char because int might match the return type of a gcc2
22966   builtin and then its argument prototype would still apply.  */
22967char debug_malloc ();
22968int
22969main (void)
22970{
22971debug_malloc ();
22972  ;
22973  return 0;
22974}
22975_ACEOF
22976rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22977if { (eval echo "$as_me:22977: \"$ac_link\"") >&5
22978  (eval $ac_link) 2>&5
22979  ac_status=$?
22980  echo "$as_me:22980: \$? = $ac_status" >&5
22981  (exit "$ac_status"); } &&
22982         { ac_try='test -s "conftest$ac_exeext"'
22983  { (eval echo "$as_me:22983: \"$ac_try\"") >&5
22984  (eval $ac_try) 2>&5
22985  ac_status=$?
22986  echo "$as_me:22986: \$? = $ac_status" >&5
22987  (exit "$ac_status"); }; }; then
22988  ac_cv_lib_dbmalloc_debug_malloc=yes
22989else
22990  echo "$as_me: failed program was:" >&5
22991cat "conftest.$ac_ext" >&5
22992ac_cv_lib_dbmalloc_debug_malloc=no
22993fi
22994rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22995LIBS=$ac_check_lib_save_LIBS
22996fi
22997echo "$as_me:22997: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
22998echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
22999if test "$ac_cv_lib_dbmalloc_debug_malloc" = yes; then
23000  cat >>confdefs.h <<EOF
23001#define HAVE_LIBDBMALLOC 1
23002EOF
23003
23004  LIBS="-ldbmalloc $LIBS"
23005
23006fi
23007
23008fi
23009
23010fi
23011
23012echo "$as_me:23012: checking if you want to use valgrind for testing" >&5
23013echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
23014
23015# Check whether --with-valgrind or --without-valgrind was given.
23016if test "${with_valgrind+set}" = set; then
23017  withval="$with_valgrind"
23018
23019cat >>confdefs.h <<EOF
23020#define USE_VALGRIND 1
23021EOF
23022
23023	: "${with_cflags:=-g}"
23024	: "${enable_leaks:=no}"
23025	 with_valgrind=yes
23026else
23027  with_valgrind=
23028fi;
23029echo "$as_me:23029: result: ${with_valgrind:-no}" >&5
23030echo "${ECHO_T}${with_valgrind:-no}" >&6
23031
23032case ".$with_cflags" in
23033(.*-g*)
23034	case .$CFLAGS in
23035	(.*-g*)
23036		;;
23037	(*)
23038
23039cf_fix_cppflags=no
23040cf_new_cflags=
23041cf_new_cppflags=
23042cf_new_extra_cppflags=
23043
23044for cf_add_cflags in -g
23045do
23046case "$cf_fix_cppflags" in
23047(no)
23048	case "$cf_add_cflags" in
23049	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
23050		case "$cf_add_cflags" in
23051		(-D*)
23052			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
23053
23054			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
23055				&& test -z "${cf_tst_cflags}" \
23056				&& cf_fix_cppflags=yes
23057
23058			if test "$cf_fix_cppflags" = yes ; then
23059
23060	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
23061	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
23062
23063				continue
23064			elif test "${cf_tst_cflags}" = "\"'" ; then
23065
23066	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
23067	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
23068
23069				continue
23070			fi
23071			;;
23072		esac
23073		case "$CPPFLAGS" in
23074		(*$cf_add_cflags)
23075			;;
23076		(*)
23077			case "$cf_add_cflags" in
23078			(-D*)
23079				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
23080
23081CPPFLAGS=`echo "$CPPFLAGS" | \
23082	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
23083		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
23084
23085				;;
23086			esac
23087
23088	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
23089	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
23090
23091			;;
23092		esac
23093		;;
23094	(*)
23095
23096	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
23097	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
23098
23099		;;
23100	esac
23101	;;
23102(yes)
23103
23104	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
23105	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
23106
23107	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
23108
23109	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
23110		&& test -z "${cf_tst_cflags}" \
23111		&& cf_fix_cppflags=no
23112	;;
23113esac
23114done
23115
23116if test -n "$cf_new_cflags" ; then
23117
23118	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
23119	CFLAGS="${CFLAGS}$cf_new_cflags"
23120
23121fi
23122
23123if test -n "$cf_new_cppflags" ; then
23124
23125	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
23126	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
23127
23128fi
23129
23130if test -n "$cf_new_extra_cppflags" ; then
23131
23132	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
23133	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
23134
23135fi
23136
23137		;;
23138	esac
23139	;;
23140esac
23141
23142echo "$as_me:23142: checking if you want to perform memory-leak testing" >&5
23143echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
23144
23145# Check whether --enable-leaks or --disable-leaks was given.
23146if test "${enable_leaks+set}" = set; then
23147  enableval="$enable_leaks"
23148  enable_leaks=no
23149else
23150  enable_leaks=yes
23151fi;
23152if test "x$enable_leaks" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
23153echo "$as_me:23153: result: $with_no_leaks" >&5
23154echo "${ECHO_T}$with_no_leaks" >&6
23155
23156if test "$enable_leaks" = no ; then
23157
23158cat >>confdefs.h <<\EOF
23159#define NO_LEAKS 1
23160EOF
23161
23162cat >>confdefs.h <<\EOF
23163#define YY_NO_LEAKS 1
23164EOF
23165
23166fi
23167
23168echo "$as_me:23168: checking if you want to see long compiling messages" >&5
23169echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
23170
23171# Check whether --enable-echo or --disable-echo was given.
23172if test "${enable_echo+set}" = set; then
23173  enableval="$enable_echo"
23174  test "$enableval" != no && enableval=yes
23175	if test "$enableval" != "yes" ; then
23176
23177	ECHO_LT='--silent'
23178	ECHO_LD='@echo linking $@;'
23179	RULE_CC='@echo compiling $<'
23180	SHOW_CC='@echo compiling $@'
23181	ECHO_CC='@'
23182
23183	else
23184
23185	ECHO_LT=''
23186	ECHO_LD=''
23187	RULE_CC=''
23188	SHOW_CC=''
23189	ECHO_CC=''
23190
23191	fi
23192else
23193  enableval=yes
23194
23195	ECHO_LT=''
23196	ECHO_LD=''
23197	RULE_CC=''
23198	SHOW_CC=''
23199	ECHO_CC=''
23200
23201fi;
23202echo "$as_me:23202: result: $enableval" >&5
23203echo "${ECHO_T}$enableval" >&6
23204
23205echo "$as_me:23205: checking if you want magic cookie emulation" >&5
23206echo $ECHO_N "checking if you want magic cookie emulation... $ECHO_C" >&6
23207
23208# Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
23209if test "${enable_xmc_glitch+set}" = set; then
23210  enableval="$enable_xmc_glitch"
23211  test "$enableval" != yes && enableval=no
23212	if test "$enableval" != "no" ; then
23213    enable_xmc=yes
23214	else
23215		enable_xmc=no
23216	fi
23217else
23218  enableval=no
23219	enable_xmc=no
23220
23221fi;
23222echo "$as_me:23222: result: $enable_xmc" >&5
23223echo "${ECHO_T}$enable_xmc" >&6
23224if test "$enable_xmc" = yes ; then
23225
23226cat >>confdefs.h <<\EOF
23227#define OPT_XMC_GLITCH 1
23228EOF
23229
23230	EXTRASRCS="$EXTRASRCS testxmc.c"
23231	EXTRAOBJS="$EXTRAOBJS testxmc.o"
23232fi
23233
23234for ac_func in tigetstr
23235do
23236as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23237echo "$as_me:23237: checking for $ac_func" >&5
23238echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
23239if eval "test \"\${$as_ac_var+set}\" = set"; then
23240  echo $ECHO_N "(cached) $ECHO_C" >&6
23241else
23242  cat >"conftest.$ac_ext" <<_ACEOF
23243#line 23243 "configure"
23244#include "confdefs.h"
23245#define $ac_func autoconf_temporary
23246#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
23247#undef $ac_func
23248
23249#ifdef __cplusplus
23250extern "C"
23251#endif
23252
23253/* We use char because int might match the return type of a gcc2
23254   builtin and then its argument prototype would still apply.  */
23255char $ac_func (void);
23256
23257int
23258main (void)
23259{
23260
23261/* The GNU C library defines stubs for functions which it implements
23262    to always fail with ENOSYS.  Some functions are actually named
23263    something starting with __ and the normal name is an alias.  */
23264#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23265#error found stub for $ac_func
23266#endif
23267
23268	return $ac_func ();
23269  ;
23270  return 0;
23271}
23272_ACEOF
23273rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23274if { (eval echo "$as_me:23274: \"$ac_link\"") >&5
23275  (eval $ac_link) 2>&5
23276  ac_status=$?
23277  echo "$as_me:23277: \$? = $ac_status" >&5
23278  (exit "$ac_status"); } &&
23279         { ac_try='test -s "conftest$ac_exeext"'
23280  { (eval echo "$as_me:23280: \"$ac_try\"") >&5
23281  (eval $ac_try) 2>&5
23282  ac_status=$?
23283  echo "$as_me:23283: \$? = $ac_status" >&5
23284  (exit "$ac_status"); }; }; then
23285  eval "$as_ac_var=yes"
23286else
23287  echo "$as_me: failed program was:" >&5
23288cat "conftest.$ac_ext" >&5
23289eval "$as_ac_var=no"
23290fi
23291rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23292fi
23293echo "$as_me:23293: result: `eval echo '${'"$as_ac_var"'}'`" >&5
23294echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
23295if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
23296  cat >>confdefs.h <<EOF
23297#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
23298EOF
23299
23300fi
23301done
23302
23303if test -n "$cf_cv_lib_part_tgetent"; then
23304
23305for ac_func in use_extended_names
23306do
23307as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23308echo "$as_me:23308: checking for $ac_func" >&5
23309echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
23310if eval "test \"\${$as_ac_var+set}\" = set"; then
23311  echo $ECHO_N "(cached) $ECHO_C" >&6
23312else
23313  cat >"conftest.$ac_ext" <<_ACEOF
23314#line 23314 "configure"
23315#include "confdefs.h"
23316#define $ac_func autoconf_temporary
23317#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
23318#undef $ac_func
23319
23320#ifdef __cplusplus
23321extern "C"
23322#endif
23323
23324/* We use char because int might match the return type of a gcc2
23325   builtin and then its argument prototype would still apply.  */
23326char $ac_func (void);
23327
23328int
23329main (void)
23330{
23331
23332/* The GNU C library defines stubs for functions which it implements
23333    to always fail with ENOSYS.  Some functions are actually named
23334    something starting with __ and the normal name is an alias.  */
23335#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23336#error found stub for $ac_func
23337#endif
23338
23339	return $ac_func ();
23340  ;
23341  return 0;
23342}
23343_ACEOF
23344rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23345if { (eval echo "$as_me:23345: \"$ac_link\"") >&5
23346  (eval $ac_link) 2>&5
23347  ac_status=$?
23348  echo "$as_me:23348: \$? = $ac_status" >&5
23349  (exit "$ac_status"); } &&
23350         { ac_try='test -s "conftest$ac_exeext"'
23351  { (eval echo "$as_me:23351: \"$ac_try\"") >&5
23352  (eval $ac_try) 2>&5
23353  ac_status=$?
23354  echo "$as_me:23354: \$? = $ac_status" >&5
23355  (exit "$ac_status"); }; }; then
23356  eval "$as_ac_var=yes"
23357else
23358  echo "$as_me: failed program was:" >&5
23359cat "conftest.$ac_ext" >&5
23360eval "$as_ac_var=no"
23361fi
23362rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23363fi
23364echo "$as_me:23364: result: `eval echo '${'"$as_ac_var"'}'`" >&5
23365echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
23366if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
23367  cat >>confdefs.h <<EOF
23368#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
23369EOF
23370
23371fi
23372done
23373
23374fi
23375
23376echo "$as_me:23376: checking if you want to use C11 _Noreturn feature" >&5
23377echo $ECHO_N "checking if you want to use C11 _Noreturn feature... $ECHO_C" >&6
23378
23379# Check whether --enable-stdnoreturn or --disable-stdnoreturn was given.
23380if test "${enable_stdnoreturn+set}" = set; then
23381  enableval="$enable_stdnoreturn"
23382  test "$enableval" != yes && enableval=no
23383	if test "$enableval" != "no" ; then
23384    enable_stdnoreturn=yes
23385	else
23386		enable_stdnoreturn=no
23387	fi
23388else
23389  enableval=no
23390	enable_stdnoreturn=no
23391
23392fi;
23393echo "$as_me:23393: result: $enable_stdnoreturn" >&5
23394echo "${ECHO_T}$enable_stdnoreturn" >&6
23395
23396if test $enable_stdnoreturn = yes; then
23397echo "$as_me:23397: checking for C11 _Noreturn feature" >&5
23398echo $ECHO_N "checking for C11 _Noreturn feature... $ECHO_C" >&6
23399if test "${cf_cv_c11_noreturn+set}" = set; then
23400  echo $ECHO_N "(cached) $ECHO_C" >&6
23401else
23402  cat >"conftest.$ac_ext" <<_ACEOF
23403#line 23403 "configure"
23404#include "confdefs.h"
23405
23406#include <stdio.h>
23407#include <stdlib.h>
23408#include <stdnoreturn.h>
23409static void giveup(void) { exit(0); }
23410
23411int
23412main (void)
23413{
23414if (feof(stdin)) giveup()
23415  ;
23416  return 0;
23417}
23418_ACEOF
23419rm -f "conftest.$ac_objext"
23420if { (eval echo "$as_me:23420: \"$ac_compile\"") >&5
23421  (eval $ac_compile) 2>&5
23422  ac_status=$?
23423  echo "$as_me:23423: \$? = $ac_status" >&5
23424  (exit "$ac_status"); } &&
23425         { ac_try='test -s "conftest.$ac_objext"'
23426  { (eval echo "$as_me:23426: \"$ac_try\"") >&5
23427  (eval $ac_try) 2>&5
23428  ac_status=$?
23429  echo "$as_me:23429: \$? = $ac_status" >&5
23430  (exit "$ac_status"); }; }; then
23431  cf_cv_c11_noreturn=yes
23432else
23433  echo "$as_me: failed program was:" >&5
23434cat "conftest.$ac_ext" >&5
23435cf_cv_c11_noreturn=no
23436fi
23437rm -f "conftest.$ac_objext" "conftest.$ac_ext"
23438
23439fi
23440echo "$as_me:23440: result: $cf_cv_c11_noreturn" >&5
23441echo "${ECHO_T}$cf_cv_c11_noreturn" >&6
23442else
23443	cf_cv_c11_noreturn=no,
23444fi
23445
23446if test "$cf_cv_c11_noreturn" = yes; then
23447	cat >>confdefs.h <<\EOF
23448#define HAVE_STDNORETURN_H 1
23449EOF
23450
23451cat >>confdefs.h <<EOF
23452#define STDC_NORETURN _Noreturn
23453EOF
23454
23455	HAVE_STDNORETURN_H=1
23456else
23457	HAVE_STDNORETURN_H=0
23458fi
23459
23460if test "$GCC" = yes || test "$GXX" = yes
23461then
23462
23463if test "$GCC" = yes || test "$GXX" = yes
23464then
23465	case $CFLAGS in
23466	(*-Werror=*)
23467		test -n "$verbose" && echo "	repairing CFLAGS: $CFLAGS" 1>&6
23468
23469echo "${as_me:-configure}:23469: testing repairing CFLAGS: $CFLAGS ..." 1>&5
23470
23471		cf_temp_flags=
23472		for cf_temp_scan in $CFLAGS
23473		do
23474			case "x$cf_temp_scan" in
23475			(x-Werror=*)
23476
23477	test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
23478	EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
23479
23480				;;
23481			(*)
23482
23483	test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
23484	cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
23485
23486				;;
23487			esac
23488		done
23489		CFLAGS="$cf_temp_flags"
23490		test -n "$verbose" && echo "	... fixed $CFLAGS" 1>&6
23491
23492echo "${as_me:-configure}:23492: testing ... fixed $CFLAGS ..." 1>&5
23493
23494		test -n "$verbose" && echo "	... extra $EXTRA_CFLAGS" 1>&6
23495
23496echo "${as_me:-configure}:23496: testing ... extra $EXTRA_CFLAGS ..." 1>&5
23497
23498		;;
23499	esac
23500fi
23501
23502if test "$GCC" = yes || test "$GXX" = yes
23503then
23504	case $CPPFLAGS in
23505	(*-Werror=*)
23506		test -n "$verbose" && echo "	repairing CPPFLAGS: $CPPFLAGS" 1>&6
23507
23508echo "${as_me:-configure}:23508: testing repairing CPPFLAGS: $CPPFLAGS ..." 1>&5
23509
23510		cf_temp_flags=
23511		for cf_temp_scan in $CPPFLAGS
23512		do
23513			case "x$cf_temp_scan" in
23514			(x-Werror=*)
23515
23516	test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
23517	EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
23518
23519				;;
23520			(*)
23521
23522	test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
23523	cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
23524
23525				;;
23526			esac
23527		done
23528		CPPFLAGS="$cf_temp_flags"
23529		test -n "$verbose" && echo "	... fixed $CPPFLAGS" 1>&6
23530
23531echo "${as_me:-configure}:23531: testing ... fixed $CPPFLAGS ..." 1>&5
23532
23533		test -n "$verbose" && echo "	... extra $EXTRA_CFLAGS" 1>&6
23534
23535echo "${as_me:-configure}:23535: testing ... extra $EXTRA_CFLAGS ..." 1>&5
23536
23537		;;
23538	esac
23539fi
23540
23541if test "$GCC" = yes || test "$GXX" = yes
23542then
23543	case $LDFLAGS in
23544	(*-Werror=*)
23545		test -n "$verbose" && echo "	repairing LDFLAGS: $LDFLAGS" 1>&6
23546
23547echo "${as_me:-configure}:23547: testing repairing LDFLAGS: $LDFLAGS ..." 1>&5
23548
23549		cf_temp_flags=
23550		for cf_temp_scan in $LDFLAGS
23551		do
23552			case "x$cf_temp_scan" in
23553			(x-Werror=*)
23554
23555	test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
23556	EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
23557
23558				;;
23559			(*)
23560
23561	test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
23562	cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
23563
23564				;;
23565			esac
23566		done
23567		LDFLAGS="$cf_temp_flags"
23568		test -n "$verbose" && echo "	... fixed $LDFLAGS" 1>&6
23569
23570echo "${as_me:-configure}:23570: testing ... fixed $LDFLAGS ..." 1>&5
23571
23572		test -n "$verbose" && echo "	... extra $EXTRA_CFLAGS" 1>&6
23573
23574echo "${as_me:-configure}:23574: testing ... extra $EXTRA_CFLAGS ..." 1>&5
23575
23576		;;
23577	esac
23578fi
23579
23580echo "$as_me:23580: checking if you want to turn on gcc warnings" >&5
23581echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6
23582
23583# Check whether --enable-warnings or --disable-warnings was given.
23584if test "${enable_warnings+set}" = set; then
23585  enableval="$enable_warnings"
23586  test "$enableval" != yes && enableval=no
23587	if test "$enableval" != "no" ; then
23588    enable_warnings=yes
23589	else
23590		enable_warnings=no
23591	fi
23592else
23593  enableval=no
23594	enable_warnings=no
23595
23596fi;
23597echo "$as_me:23597: result: $enable_warnings" >&5
23598echo "${ECHO_T}$enable_warnings" >&6
23599if test "$enable_warnings" = "yes"
23600then
23601
23602if test "$GCC" = yes || test "$GXX" = yes
23603then
23604cat > conftest.i <<EOF
23605#ifndef GCC_PRINTF
23606#define GCC_PRINTF 0
23607#endif
23608#ifndef GCC_SCANF
23609#define GCC_SCANF 0
23610#endif
23611#ifndef GCC_NORETURN
23612#define GCC_NORETURN /* nothing */
23613#endif
23614#ifndef GCC_UNUSED
23615#define GCC_UNUSED /* nothing */
23616#endif
23617EOF
23618if test "$GCC" = yes
23619then
23620	{ echo "$as_me:23620: checking for $CC __attribute__ directives..." >&5
23621echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
23622cat > "conftest.$ac_ext" <<EOF
23623#line 23623 "${as_me:-configure}"
23624#include "confdefs.h"
23625#include "conftest.h"
23626#include "conftest.i"
23627#if	GCC_PRINTF
23628#define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
23629#else
23630#define GCC_PRINTFLIKE(fmt,var) /*nothing*/
23631#endif
23632#if	GCC_SCANF
23633#define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
23634#else
23635#define GCC_SCANFLIKE(fmt,var)  /*nothing*/
23636#endif
23637extern void wow(char *,...) GCC_SCANFLIKE(1,2);
23638extern GCC_NORETURN void oops(char *,...) GCC_PRINTFLIKE(1,2);
23639extern GCC_NORETURN void foo(void);
23640int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { (void)argc; (void)argv; return 0; }
23641EOF
23642	cf_printf_attribute=no
23643	cf_scanf_attribute=no
23644	for cf_attribute in scanf printf unused noreturn
23645	do
23646
23647cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
23648
23649		cf_directive="__attribute__(($cf_attribute))"
23650		echo "checking for $CC $cf_directive" 1>&5
23651
23652		case "$cf_attribute" in
23653		(printf)
23654			cf_printf_attribute=yes
23655			cat >conftest.h <<EOF
23656#define GCC_$cf_ATTRIBUTE 1
23657EOF
23658			;;
23659		(scanf)
23660			cf_scanf_attribute=yes
23661			cat >conftest.h <<EOF
23662#define GCC_$cf_ATTRIBUTE 1
23663EOF
23664			;;
23665		(*)
23666			cat >conftest.h <<EOF
23667#define GCC_$cf_ATTRIBUTE $cf_directive
23668EOF
23669			;;
23670		esac
23671
23672		if { (eval echo "$as_me:23672: \"$ac_compile\"") >&5
23673  (eval $ac_compile) 2>&5
23674  ac_status=$?
23675  echo "$as_me:23675: \$? = $ac_status" >&5
23676  (exit "$ac_status"); }; then
23677			test -n "$verbose" && echo "$as_me:23677: result: ... $cf_attribute" >&5
23678echo "${ECHO_T}... $cf_attribute" >&6
23679			cat conftest.h >>confdefs.h
23680			case "$cf_attribute" in
23681			(noreturn)
23682
23683cat >>confdefs.h <<EOF
23684#define GCC_NORETURN $cf_directive
23685EOF
23686
23687				;;
23688			(printf)
23689				cf_value='/* nothing */'
23690				if test "$cf_printf_attribute" != no ; then
23691					cf_value='__attribute__((format(printf,fmt,var)))'
23692
23693cat >>confdefs.h <<\EOF
23694#define GCC_PRINTF 1
23695EOF
23696
23697				fi
23698
23699cat >>confdefs.h <<EOF
23700#define GCC_PRINTFLIKE(fmt,var) $cf_value
23701EOF
23702
23703				;;
23704			(scanf)
23705				cf_value='/* nothing */'
23706				if test "$cf_scanf_attribute" != no ; then
23707					cf_value='__attribute__((format(scanf,fmt,var)))'
23708
23709cat >>confdefs.h <<\EOF
23710#define GCC_SCANF 1
23711EOF
23712
23713				fi
23714
23715cat >>confdefs.h <<EOF
23716#define GCC_SCANFLIKE(fmt,var) $cf_value
23717EOF
23718
23719				;;
23720			(unused)
23721
23722cat >>confdefs.h <<EOF
23723#define GCC_UNUSED $cf_directive
23724EOF
23725
23726				;;
23727			esac
23728		fi
23729	done
23730else
23731	${FGREP-fgrep} define conftest.i >>confdefs.h
23732fi
23733rm -rf ./conftest*
23734fi
23735
23736if test "x$have_x" = xyes; then
23737
23738cf_save_LIBS_CF_CONST_X_STRING="$LIBS"
23739cf_save_CFLAGS_CF_CONST_X_STRING="$CFLAGS"
23740cf_save_CPPFLAGS_CF_CONST_X_STRING="$CPPFLAGS"
23741LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
23742for cf_X_CFLAGS in $X_CFLAGS
23743do
23744	case "x$cf_X_CFLAGS" in
23745	x-[IUD]*)
23746		CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
23747		;;
23748	*)
23749		CFLAGS="$CFLAGS $cf_X_CFLAGS"
23750		;;
23751	esac
23752done
23753
23754cat >"conftest.$ac_ext" <<_ACEOF
23755#line 23755 "configure"
23756#include "confdefs.h"
23757
23758#include <stdlib.h>
23759#include <X11/Intrinsic.h>
23760
23761int
23762main (void)
23763{
23764String foo = malloc(1); (void)foo
23765  ;
23766  return 0;
23767}
23768_ACEOF
23769rm -f "conftest.$ac_objext"
23770if { (eval echo "$as_me:23770: \"$ac_compile\"") >&5
23771  (eval $ac_compile) 2>&5
23772  ac_status=$?
23773  echo "$as_me:23773: \$? = $ac_status" >&5
23774  (exit "$ac_status"); } &&
23775         { ac_try='test -s "conftest.$ac_objext"'
23776  { (eval echo "$as_me:23776: \"$ac_try\"") >&5
23777  (eval $ac_try) 2>&5
23778  ac_status=$?
23779  echo "$as_me:23779: \$? = $ac_status" >&5
23780  (exit "$ac_status"); }; }; then
23781
23782echo "$as_me:23782: checking for X11/Xt const-feature" >&5
23783echo $ECHO_N "checking for X11/Xt const-feature... $ECHO_C" >&6
23784if test "${cf_cv_const_x_string+set}" = set; then
23785  echo $ECHO_N "(cached) $ECHO_C" >&6
23786else
23787
23788	cat >"conftest.$ac_ext" <<_ACEOF
23789#line 23789 "configure"
23790#include "confdefs.h"
23791
23792#define _CONST_X_STRING	/* X11R7.8 (perhaps) */
23793#undef  XTSTRINGDEFINES	/* X11R5 and later */
23794#include <stdlib.h>
23795#include <X11/Intrinsic.h>
23796
23797int
23798main (void)
23799{
23800String foo = malloc(1); *foo = 0
23801  ;
23802  return 0;
23803}
23804_ACEOF
23805rm -f "conftest.$ac_objext"
23806if { (eval echo "$as_me:23806: \"$ac_compile\"") >&5
23807  (eval $ac_compile) 2>&5
23808  ac_status=$?
23809  echo "$as_me:23809: \$? = $ac_status" >&5
23810  (exit "$ac_status"); } &&
23811         { ac_try='test -s "conftest.$ac_objext"'
23812  { (eval echo "$as_me:23812: \"$ac_try\"") >&5
23813  (eval $ac_try) 2>&5
23814  ac_status=$?
23815  echo "$as_me:23815: \$? = $ac_status" >&5
23816  (exit "$ac_status"); }; }; then
23817
23818			cf_cv_const_x_string=no
23819
23820else
23821  echo "$as_me: failed program was:" >&5
23822cat "conftest.$ac_ext" >&5
23823
23824			cf_cv_const_x_string=yes
23825
23826fi
23827rm -f "conftest.$ac_objext" "conftest.$ac_ext"
23828
23829fi
23830echo "$as_me:23830: result: $cf_cv_const_x_string" >&5
23831echo "${ECHO_T}$cf_cv_const_x_string" >&6
23832
23833LIBS="$cf_save_LIBS_CF_CONST_X_STRING"
23834CFLAGS="$cf_save_CFLAGS_CF_CONST_X_STRING"
23835CPPFLAGS="$cf_save_CPPFLAGS_CF_CONST_X_STRING"
23836
23837case "$cf_cv_const_x_string" in
23838(no)
23839
23840	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
23841	CPPFLAGS="${CPPFLAGS}-DXTSTRINGDEFINES"
23842
23843	;;
23844(*)
23845
23846	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
23847	CPPFLAGS="${CPPFLAGS}-D_CONST_X_STRING"
23848
23849	;;
23850esac
23851
23852else
23853  echo "$as_me: failed program was:" >&5
23854cat "conftest.$ac_ext" >&5
23855fi
23856rm -f "conftest.$ac_objext" "conftest.$ac_ext"
23857 fi
23858cat > "conftest.$ac_ext" <<EOF
23859#line 23859 "${as_me:-configure}"
23860int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
23861EOF
23862if test "$INTEL_COMPILER" = yes
23863then
23864# The "-wdXXX" options suppress warnings:
23865# remark #1419: external declaration in primary source file
23866# remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
23867# remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
23868# remark #193: zero used for undefined preprocessing identifier
23869# remark #593: variable "curs_sb_left_arrow" was set but never used
23870# remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
23871# remark #869: parameter "tw" was never referenced
23872# remark #981: operands are evaluated in unspecified order
23873# warning #279: controlling expression is constant
23874
23875	{ echo "$as_me:23875: checking for $CC warning options..." >&5
23876echo "$as_me: checking for $CC warning options..." >&6;}
23877	cf_save_CFLAGS="$CFLAGS"
23878	EXTRA_CFLAGS="$EXTRA_CFLAGS -Wall"
23879	for cf_opt in \
23880		wd1419 \
23881		wd1683 \
23882		wd1684 \
23883		wd193 \
23884		wd593 \
23885		wd279 \
23886		wd810 \
23887		wd869 \
23888		wd981
23889	do
23890		CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
23891		if { (eval echo "$as_me:23891: \"$ac_compile\"") >&5
23892  (eval $ac_compile) 2>&5
23893  ac_status=$?
23894  echo "$as_me:23894: \$? = $ac_status" >&5
23895  (exit "$ac_status"); }; then
23896			test -n "$verbose" && echo "$as_me:23896: result: ... -$cf_opt" >&5
23897echo "${ECHO_T}... -$cf_opt" >&6
23898			EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
23899		fi
23900	done
23901	CFLAGS="$cf_save_CFLAGS"
23902elif test "$GCC" = yes && test "$GCC_VERSION" != "unknown"
23903then
23904	{ echo "$as_me:23904: checking for $CC warning options..." >&5
23905echo "$as_me: checking for $CC warning options..." >&6;}
23906	cf_save_CFLAGS="$CFLAGS"
23907	cf_warn_CONST=""
23908	test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
23909	cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
23910	test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
23911	for cf_opt in W Wall \
23912		Wbad-function-cast \
23913		Wcast-align \
23914		Wcast-qual \
23915		Wdeclaration-after-statement \
23916		Wextra \
23917		Winline \
23918		Wmissing-declarations \
23919		Wmissing-prototypes \
23920		Wnested-externs \
23921		Wpointer-arith \
23922		Wshadow \
23923		Wstrict-prototypes \
23924		Wundef Wno-inline $cf_gcc_warnings $cf_warn_CONST Wdeclaration-after-statement Wextra Wno-unknown-pragmas Wswitch-enum Wno-cast-qual
23925	do
23926		CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
23927		if { (eval echo "$as_me:23927: \"$ac_compile\"") >&5
23928  (eval $ac_compile) 2>&5
23929  ac_status=$?
23930  echo "$as_me:23930: \$? = $ac_status" >&5
23931  (exit "$ac_status"); }; then
23932			test -n "$verbose" && echo "$as_me:23932: result: ... -$cf_opt" >&5
23933echo "${ECHO_T}... -$cf_opt" >&6
23934			case "$cf_opt" in
23935			(Winline)
23936				case "$GCC_VERSION" in
23937				([34].*)
23938					test -n "$verbose" && echo "	feature is broken in gcc $GCC_VERSION" 1>&6
23939
23940echo "${as_me:-configure}:23940: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
23941
23942					continue;;
23943				esac
23944				;;
23945			(Wpointer-arith)
23946				case "$GCC_VERSION" in
23947				([12].*)
23948					test -n "$verbose" && echo "	feature is broken in gcc $GCC_VERSION" 1>&6
23949
23950echo "${as_me:-configure}:23950: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
23951
23952					continue;;
23953				esac
23954				;;
23955			esac
23956			EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
23957		fi
23958	done
23959	CFLAGS="$cf_save_CFLAGS"
23960fi
23961rm -rf ./conftest*
23962
23963fi
23964
23965fi
23966
23967test "$disable_setuid" = yes &&
23968cat >>confdefs.h <<\EOF
23969#define DISABLE_SETUID 1
23970EOF
23971
23972test "$disable_setgid" = yes &&
23973cat >>confdefs.h <<\EOF
23974#define DISABLE_SETGID 1
23975EOF
23976
23977if test $disable_setuid = yes ; then
23978	MAY_SETUID="#"
23979	NOT_SETUID=
23980elif test $disable_setgid = yes ; then
23981	MAY_SETUID="#"
23982	NOT_SETUID=
23983else
23984	MAY_SETUID=
23985	NOT_SETUID="#"
23986fi
23987
23988###	remove from CPPFLAGS the optional features we define in xtermcfg.h
23989###	or other conflicting symbols that may be defined via imake:
23990for cf_def in \
23991	__STDC__ \
23992	ALLOWLOGGING \
23993	ALLOWLOGFILEEXEC \
23994	OPT_LUIT_PROG \
23995	OPT_WIDE_CHARS \
23996	SCROLLBAR_RIGHT \
23997	USE_TTY_GROUP \
23998	USE_UTEMPTER \
23999	XRENDERFONT
24000do
24001	CPPFLAGS=`echo "$CPPFLAGS" | sed -e s/-D$cf_def//`
24002done
24003
24004echo "$as_me:24004: checking if filesystem supports mixed-case filenames" >&5
24005echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
24006if test "${cf_cv_mixedcase+set}" = set; then
24007  echo $ECHO_N "(cached) $ECHO_C" >&6
24008else
24009
24010if test "$cross_compiling" = yes ; then
24011	case "$target_alias" in
24012	(*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*|darwin*)
24013		cf_cv_mixedcase=no
24014		;;
24015	(*)
24016		cf_cv_mixedcase=yes
24017		;;
24018	esac
24019else
24020	rm -f conftest CONFTEST
24021	echo test >conftest
24022	if test -f CONFTEST ; then
24023		cf_cv_mixedcase=no
24024	else
24025		cf_cv_mixedcase=yes
24026	fi
24027	rm -f conftest CONFTEST
24028fi
24029
24030fi
24031echo "$as_me:24031: result: $cf_cv_mixedcase" >&5
24032echo "${ECHO_T}$cf_cv_mixedcase" >&6
24033test "$cf_cv_mixedcase" = yes &&
24034cat >>confdefs.h <<\EOF
24035#define MIXEDCASE_FILENAMES 1
24036EOF
24037
24038for ac_prog in exctags ctags
24039do
24040  # Extract the first word of "$ac_prog", so it can be a program name with args.
24041set dummy $ac_prog; ac_word=$2
24042echo "$as_me:24042: checking for $ac_word" >&5
24043echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
24044if test "${ac_cv_prog_CTAGS+set}" = set; then
24045  echo $ECHO_N "(cached) $ECHO_C" >&6
24046else
24047  if test -n "$CTAGS"; then
24048  ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
24049else
24050  ac_save_IFS=$IFS; IFS=$ac_path_separator
24051ac_dummy="$PATH"
24052for ac_dir in $ac_dummy; do
24053  IFS=$ac_save_IFS
24054  test -z "$ac_dir" && ac_dir=.
24055  $as_executable_p "$ac_dir/$ac_word" || continue
24056ac_cv_prog_CTAGS="$ac_prog"
24057echo "$as_me:24057: found $ac_dir/$ac_word" >&5
24058break
24059done
24060
24061fi
24062fi
24063CTAGS=$ac_cv_prog_CTAGS
24064if test -n "$CTAGS"; then
24065  echo "$as_me:24065: result: $CTAGS" >&5
24066echo "${ECHO_T}$CTAGS" >&6
24067else
24068  echo "$as_me:24068: result: no" >&5
24069echo "${ECHO_T}no" >&6
24070fi
24071
24072  test -n "$CTAGS" && break
24073done
24074
24075for ac_prog in exetags etags
24076do
24077  # Extract the first word of "$ac_prog", so it can be a program name with args.
24078set dummy $ac_prog; ac_word=$2
24079echo "$as_me:24079: checking for $ac_word" >&5
24080echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
24081if test "${ac_cv_prog_ETAGS+set}" = set; then
24082  echo $ECHO_N "(cached) $ECHO_C" >&6
24083else
24084  if test -n "$ETAGS"; then
24085  ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
24086else
24087  ac_save_IFS=$IFS; IFS=$ac_path_separator
24088ac_dummy="$PATH"
24089for ac_dir in $ac_dummy; do
24090  IFS=$ac_save_IFS
24091  test -z "$ac_dir" && ac_dir=.
24092  $as_executable_p "$ac_dir/$ac_word" || continue
24093ac_cv_prog_ETAGS="$ac_prog"
24094echo "$as_me:24094: found $ac_dir/$ac_word" >&5
24095break
24096done
24097
24098fi
24099fi
24100ETAGS=$ac_cv_prog_ETAGS
24101if test -n "$ETAGS"; then
24102  echo "$as_me:24102: result: $ETAGS" >&5
24103echo "${ECHO_T}$ETAGS" >&6
24104else
24105  echo "$as_me:24105: result: no" >&5
24106echo "${ECHO_T}no" >&6
24107fi
24108
24109  test -n "$ETAGS" && break
24110done
24111
24112# Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
24113set dummy ${CTAGS:-ctags}; ac_word=$2
24114echo "$as_me:24114: checking for $ac_word" >&5
24115echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
24116if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
24117  echo $ECHO_N "(cached) $ECHO_C" >&6
24118else
24119  if test -n "$MAKE_LOWER_TAGS"; then
24120  ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
24121else
24122  ac_save_IFS=$IFS; IFS=$ac_path_separator
24123ac_dummy="$PATH"
24124for ac_dir in $ac_dummy; do
24125  IFS=$ac_save_IFS
24126  test -z "$ac_dir" && ac_dir=.
24127  $as_executable_p "$ac_dir/$ac_word" || continue
24128ac_cv_prog_MAKE_LOWER_TAGS="yes"
24129echo "$as_me:24129: found $ac_dir/$ac_word" >&5
24130break
24131done
24132
24133  test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
24134fi
24135fi
24136MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
24137if test -n "$MAKE_LOWER_TAGS"; then
24138  echo "$as_me:24138: result: $MAKE_LOWER_TAGS" >&5
24139echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
24140else
24141  echo "$as_me:24141: result: no" >&5
24142echo "${ECHO_T}no" >&6
24143fi
24144
24145if test "$cf_cv_mixedcase" = yes ; then
24146	# Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
24147set dummy ${ETAGS:-etags}; ac_word=$2
24148echo "$as_me:24148: checking for $ac_word" >&5
24149echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
24150if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
24151  echo $ECHO_N "(cached) $ECHO_C" >&6
24152else
24153  if test -n "$MAKE_UPPER_TAGS"; then
24154  ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
24155else
24156  ac_save_IFS=$IFS; IFS=$ac_path_separator
24157ac_dummy="$PATH"
24158for ac_dir in $ac_dummy; do
24159  IFS=$ac_save_IFS
24160  test -z "$ac_dir" && ac_dir=.
24161  $as_executable_p "$ac_dir/$ac_word" || continue
24162ac_cv_prog_MAKE_UPPER_TAGS="yes"
24163echo "$as_me:24163: found $ac_dir/$ac_word" >&5
24164break
24165done
24166
24167  test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
24168fi
24169fi
24170MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
24171if test -n "$MAKE_UPPER_TAGS"; then
24172  echo "$as_me:24172: result: $MAKE_UPPER_TAGS" >&5
24173echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
24174else
24175  echo "$as_me:24175: result: no" >&5
24176echo "${ECHO_T}no" >&6
24177fi
24178
24179else
24180	MAKE_UPPER_TAGS=no
24181fi
24182
24183if test "$MAKE_UPPER_TAGS" = yes ; then
24184	MAKE_UPPER_TAGS=
24185else
24186	MAKE_UPPER_TAGS="#"
24187fi
24188
24189if test "$MAKE_LOWER_TAGS" = yes ; then
24190	MAKE_LOWER_TAGS=
24191else
24192	MAKE_LOWER_TAGS="#"
24193fi
24194
24195LD_RPATH_OPT=
24196if test "x$cf_cv_enable_rpath" != xno
24197then
24198	echo "$as_me:24198: checking for an rpath option" >&5
24199echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
24200	case "$cf_cv_system_name" in
24201	(irix*)
24202		if test "$GCC" = yes; then
24203			LD_RPATH_OPT="-Wl,-rpath,"
24204		else
24205			LD_RPATH_OPT="-rpath "
24206		fi
24207		;;
24208	(linux*|gnu*|k*bsd*-gnu|freebsd*)
24209		LD_RPATH_OPT="-Wl,-rpath,"
24210		;;
24211	(openbsd[2-9].*|mirbsd*)
24212		LD_RPATH_OPT="-Wl,-rpath,"
24213		;;
24214	(dragonfly*)
24215		LD_RPATH_OPT="-rpath "
24216		;;
24217	(netbsd*)
24218		LD_RPATH_OPT="-Wl,-rpath,"
24219		;;
24220	(osf*|mls+*)
24221		LD_RPATH_OPT="-rpath "
24222		;;
24223	(solaris2*)
24224		LD_RPATH_OPT="-R"
24225		;;
24226	(*)
24227		;;
24228	esac
24229	echo "$as_me:24229: result: $LD_RPATH_OPT" >&5
24230echo "${ECHO_T}$LD_RPATH_OPT" >&6
24231
24232	case "x$LD_RPATH_OPT" in
24233	(x-R*)
24234		echo "$as_me:24234: checking if we need a space after rpath option" >&5
24235echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
24236		cf_save_LIBS="$LIBS"
24237
24238cf_add_libs="$LIBS"
24239# reverse order
24240cf_add_0lib=
24241for cf_add_1lib in ${LD_RPATH_OPT}$libdir; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24242# filter duplicates
24243for cf_add_1lib in $cf_add_0lib; do
24244	for cf_add_2lib in $cf_add_libs; do
24245		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24246			cf_add_1lib=
24247			break
24248		fi
24249	done
24250	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24251done
24252LIBS="$cf_add_libs"
24253
24254		cat >"conftest.$ac_ext" <<_ACEOF
24255#line 24255 "configure"
24256#include "confdefs.h"
24257
24258int
24259main (void)
24260{
24261
24262  ;
24263  return 0;
24264}
24265_ACEOF
24266rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24267if { (eval echo "$as_me:24267: \"$ac_link\"") >&5
24268  (eval $ac_link) 2>&5
24269  ac_status=$?
24270  echo "$as_me:24270: \$? = $ac_status" >&5
24271  (exit "$ac_status"); } &&
24272         { ac_try='test -s "conftest$ac_exeext"'
24273  { (eval echo "$as_me:24273: \"$ac_try\"") >&5
24274  (eval $ac_try) 2>&5
24275  ac_status=$?
24276  echo "$as_me:24276: \$? = $ac_status" >&5
24277  (exit "$ac_status"); }; }; then
24278  cf_rpath_space=no
24279else
24280  echo "$as_me: failed program was:" >&5
24281cat "conftest.$ac_ext" >&5
24282cf_rpath_space=yes
24283fi
24284rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24285		LIBS="$cf_save_LIBS"
24286		echo "$as_me:24286: result: $cf_rpath_space" >&5
24287echo "${ECHO_T}$cf_rpath_space" >&6
24288		test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
24289		;;
24290	esac
24291fi
24292
24293echo "$as_me:24293: checking if rpath-hack should be disabled" >&5
24294echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
24295
24296# Check whether --enable-rpath-hack or --disable-rpath-hack was given.
24297if test "${enable_rpath_hack+set}" = set; then
24298  enableval="$enable_rpath_hack"
24299  test "$enableval" != no && enableval=yes
24300	if test "$enableval" != "yes" ; then
24301    enable_rpath_hack=no
24302	else
24303		enable_rpath_hack=yes
24304	fi
24305else
24306  enableval=yes
24307	enable_rpath_hack=yes
24308
24309fi;
24310if test "x$enable_rpath_hack" = xno; then cf_disable_rpath_hack=yes; else cf_disable_rpath_hack=no; fi
24311echo "$as_me:24311: result: $cf_disable_rpath_hack" >&5
24312echo "${ECHO_T}$cf_disable_rpath_hack" >&6
24313
24314if test "$enable_rpath_hack" = yes ; then
24315
24316echo "$as_me:24316: checking for updated LDFLAGS" >&5
24317echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
24318if test -n "$LD_RPATH_OPT" ; then
24319	echo "$as_me:24319: result: maybe" >&5
24320echo "${ECHO_T}maybe" >&6
24321
24322	for ac_prog in ldd
24323do
24324  # Extract the first word of "$ac_prog", so it can be a program name with args.
24325set dummy $ac_prog; ac_word=$2
24326echo "$as_me:24326: checking for $ac_word" >&5
24327echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
24328if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
24329  echo $ECHO_N "(cached) $ECHO_C" >&6
24330else
24331  if test -n "$cf_ldd_prog"; then
24332  ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
24333else
24334  ac_save_IFS=$IFS; IFS=$ac_path_separator
24335ac_dummy="$PATH"
24336for ac_dir in $ac_dummy; do
24337  IFS=$ac_save_IFS
24338  test -z "$ac_dir" && ac_dir=.
24339  $as_executable_p "$ac_dir/$ac_word" || continue
24340ac_cv_prog_cf_ldd_prog="$ac_prog"
24341echo "$as_me:24341: found $ac_dir/$ac_word" >&5
24342break
24343done
24344
24345fi
24346fi
24347cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
24348if test -n "$cf_ldd_prog"; then
24349  echo "$as_me:24349: result: $cf_ldd_prog" >&5
24350echo "${ECHO_T}$cf_ldd_prog" >&6
24351else
24352  echo "$as_me:24352: result: no" >&5
24353echo "${ECHO_T}no" >&6
24354fi
24355
24356  test -n "$cf_ldd_prog" && break
24357done
24358test -n "$cf_ldd_prog" || cf_ldd_prog="no"
24359
24360	cf_rpath_list="/usr/lib /lib"
24361	if test "$cf_ldd_prog" != no
24362	then
24363		cf_rpath_oops=
24364
24365cat >"conftest.$ac_ext" <<_ACEOF
24366#line 24366 "configure"
24367#include "confdefs.h"
24368#include <stdio.h>
24369int
24370main (void)
24371{
24372printf("Hello");
24373  ;
24374  return 0;
24375}
24376_ACEOF
24377rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24378if { (eval echo "$as_me:24378: \"$ac_link\"") >&5
24379  (eval $ac_link) 2>&5
24380  ac_status=$?
24381  echo "$as_me:24381: \$? = $ac_status" >&5
24382  (exit "$ac_status"); } &&
24383         { ac_try='test -s "conftest$ac_exeext"'
24384  { (eval echo "$as_me:24384: \"$ac_try\"") >&5
24385  (eval $ac_try) 2>&5
24386  ac_status=$?
24387  echo "$as_me:24387: \$? = $ac_status" >&5
24388  (exit "$ac_status"); }; }; then
24389  cf_rpath_oops=`"$cf_ldd_prog" "conftest$ac_exeext" | ${FGREP-fgrep} ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
24390		 cf_rpath_list=`"$cf_ldd_prog" "conftest$ac_exeext" | ${FGREP-fgrep} / | sed -e 's%^.*[ 	]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
24391else
24392  echo "$as_me: failed program was:" >&5
24393cat "conftest.$ac_ext" >&5
24394fi
24395rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24396
24397		# If we passed the link-test, but get a "not found" on a given library,
24398		# this could be due to inept reconfiguration of gcc to make it only
24399		# partly honor /usr/local/lib (or whatever).  Sometimes this behavior
24400		# is intentional, e.g., installing gcc in /usr/bin and suppressing the
24401		# /usr/local libraries.
24402		if test -n "$cf_rpath_oops"
24403		then
24404			for cf_rpath_src in $cf_rpath_oops
24405			do
24406				for cf_rpath_dir in \
24407					/usr/local \
24408					/usr/pkg \
24409					/opt/sfw
24410				do
24411					if test -f "$cf_rpath_dir/lib/$cf_rpath_src"
24412					then
24413						test -n "$verbose" && echo "	...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
24414
24415echo "${as_me:-configure}:24415: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
24416
24417						LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
24418						break
24419					fi
24420				done
24421			done
24422		fi
24423	fi
24424
24425	test -n "$verbose" && echo "	...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
24426
24427echo "${as_me:-configure}:24427: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
24428
24429test -n "$verbose" && echo "	...checking LDFLAGS $LDFLAGS" 1>&6
24430
24431echo "${as_me:-configure}:24431: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
24432
24433cf_rpath_dst=
24434for cf_rpath_src in $LDFLAGS
24435do
24436	case "$cf_rpath_src" in
24437	(-L*)
24438
24439		# check if this refers to a directory which we will ignore
24440		cf_rpath_skip=no
24441		if test -n "$cf_rpath_list"
24442		then
24443			for cf_rpath_item in $cf_rpath_list
24444			do
24445				if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
24446				then
24447					cf_rpath_skip=yes
24448					break
24449				fi
24450			done
24451		fi
24452
24453		if test "$cf_rpath_skip" = no
24454		then
24455			# transform the option
24456			if test "$LD_RPATH_OPT" = "-R " ; then
24457				cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
24458			else
24459				cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
24460			fi
24461
24462			# if we have not already added this, add it now
24463			cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
24464			if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
24465			then
24466				test -n "$verbose" && echo "	...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
24467
24468echo "${as_me:-configure}:24468: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
24469
24470				EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
24471			fi
24472		fi
24473		;;
24474	esac
24475	cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
24476done
24477LDFLAGS=$cf_rpath_dst
24478
24479test -n "$verbose" && echo "	...checked LDFLAGS $LDFLAGS" 1>&6
24480
24481echo "${as_me:-configure}:24481: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
24482
24483test -n "$verbose" && echo "	...checking LIBS $LIBS" 1>&6
24484
24485echo "${as_me:-configure}:24485: testing ...checking LIBS $LIBS ..." 1>&5
24486
24487cf_rpath_dst=
24488for cf_rpath_src in $LIBS
24489do
24490	case "$cf_rpath_src" in
24491	(-L*)
24492
24493		# check if this refers to a directory which we will ignore
24494		cf_rpath_skip=no
24495		if test -n "$cf_rpath_list"
24496		then
24497			for cf_rpath_item in $cf_rpath_list
24498			do
24499				if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
24500				then
24501					cf_rpath_skip=yes
24502					break
24503				fi
24504			done
24505		fi
24506
24507		if test "$cf_rpath_skip" = no
24508		then
24509			# transform the option
24510			if test "$LD_RPATH_OPT" = "-R " ; then
24511				cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
24512			else
24513				cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
24514			fi
24515
24516			# if we have not already added this, add it now
24517			cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
24518			if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
24519			then
24520				test -n "$verbose" && echo "	...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
24521
24522echo "${as_me:-configure}:24522: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
24523
24524				EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
24525			fi
24526		fi
24527		;;
24528	esac
24529	cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
24530done
24531LIBS=$cf_rpath_dst
24532
24533test -n "$verbose" && echo "	...checked LIBS $LIBS" 1>&6
24534
24535echo "${as_me:-configure}:24535: testing ...checked LIBS $LIBS ..." 1>&5
24536
24537	test -n "$verbose" && echo "	...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
24538
24539echo "${as_me:-configure}:24539: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
24540
24541else
24542	echo "$as_me:24542: result: no" >&5
24543echo "${ECHO_T}no" >&6
24544fi
24545
24546fi
24547
24548# Force plink.sh to not trim pcre's libraries, which have the same symbol
24549# names as the system regexp.
24550if test "$with_pcre" != no
24551then
24552	LIBS=`echo "$LIBS" | sed -e 's/-lpcre/-kpcre/g'`
24553fi
24554
24555###	output xtermcfg.h, etc
24556ac_config_files="$ac_config_files Makefile df-install minstall:minstall.in"
24557
24558cat >confcache <<\_ACEOF
24559# This file is a shell script that caches the results of configure
24560# tests run on this system so they can be shared between configure
24561# scripts and configure runs, see configure's option --config-cache.
24562# It is not useful on other systems.  If it contains results you don't
24563# want to keep, you may remove or edit it.
24564#
24565# config.status only pays attention to the cache file if you give it
24566# the --recheck option to rerun configure.
24567#
24568# `ac_cv_env_foo' variables (set or unset) will be overriden when
24569# loading this file, other *unset* `ac_cv_foo' will be assigned the
24570# following values.
24571
24572_ACEOF
24573
24574# The following way of writing the cache mishandles newlines in values,
24575# but we know of no workaround that is simple, portable, and efficient.
24576# So, don't put newlines in cache variables' values.
24577# Ultrix sh set writes to stderr and can't be redirected directly,
24578# and sets the high bit in the cache file unless we assign to the vars.
24579{
24580  (set) 2>&1 |
24581    case `(ac_space=' '; set | grep ac_space) 2>&1` in
24582    *ac_space=\ *)
24583      # `set' does not quote correctly, so add quotes (double-quote
24584      # substitution turns \\\\ into \\, and sed turns \\ into \).
24585      sed -n \
24586        "s/'/'\\\\''/g;
24587    	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
24588      ;;
24589    *)
24590      # `set' quotes correctly as required by POSIX, so do not add quotes.
24591      sed -n \
24592        "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
24593      ;;
24594    esac;
24595} |
24596  sed '
24597     t clear
24598     : clear
24599     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
24600     t end
24601     /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
24602     : end' >>confcache
24603if cmp -s $cache_file confcache; then :; else
24604  if test -w $cache_file; then
24605    test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
24606    cat confcache >$cache_file
24607  else
24608    echo "not updating unwritable cache $cache_file"
24609  fi
24610fi
24611rm -f confcache
24612
24613test "x$prefix" = xNONE && prefix=$ac_default_prefix
24614# Let make expand exec_prefix.
24615test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
24616
24617# VPATH may cause trouble with some makes, so we remove $(srcdir),
24618# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
24619# trailing colons and then remove the whole line if VPATH becomes empty
24620# (actually we leave an empty line to preserve line numbers).
24621if test "x$srcdir" = x.; then
24622  ac_vpsub='/^[ 	]*VPATH[ 	]*=/{
24623s/:*\$(srcdir):*/:/;
24624s/:*\${srcdir}:*/:/;
24625s/:*@srcdir@:*/:/;
24626s/^\([^=]*=[ 	]*\):*/\1/;
24627s/:*$//;
24628s/^[^=]*=[ 	]*$//;
24629}'
24630fi
24631
24632DEFS=-DHAVE_CONFIG_H
24633
24634: "${CONFIG_STATUS=./config.status}"
24635ac_clean_files_save=$ac_clean_files
24636ac_clean_files="$ac_clean_files $CONFIG_STATUS"
24637{ echo "$as_me:24637: creating $CONFIG_STATUS" >&5
24638echo "$as_me: creating $CONFIG_STATUS" >&6;}
24639cat >"$CONFIG_STATUS" <<_ACEOF
24640#! $SHELL
24641# Generated automatically by configure.
24642# Run this file to recreate the current configuration.
24643# Compiler output produced by configure, useful for debugging
24644# configure, is in config.log if it exists.
24645
24646debug=false
24647SHELL=\${CONFIG_SHELL-$SHELL}
24648ac_cs_invocation="\$0 \$@"
24649
24650CLICOLOR_FORCE= GREP_OPTIONS=
24651unset CLICOLOR_FORCE GREP_OPTIONS
24652_ACEOF
24653
24654cat >>"$CONFIG_STATUS" <<\_ACEOF
24655# Be Bourne compatible
24656if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
24657  emulate sh
24658  NULLCMD=:
24659elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
24660  set -o posix
24661fi
24662
24663# Name of the executable.
24664as_me=`echo "$0" |sed 's,.*[\\/],,'`
24665
24666if expr a : '\(a\)' >/dev/null 2>&1; then
24667  as_expr=expr
24668else
24669  as_expr=false
24670fi
24671
24672rm -f conf$$ conf$$.exe conf$$.file
24673echo >conf$$.file
24674if ln -s conf$$.file conf$$ 2>/dev/null; then
24675  # We could just check for DJGPP; but this test a) works b) is more generic
24676  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
24677  if test -f conf$$.exe; then
24678    # Don't use ln at all; we don't have any links
24679    as_ln_s='cp -p'
24680  else
24681    as_ln_s='ln -s'
24682  fi
24683elif ln conf$$.file conf$$ 2>/dev/null; then
24684  as_ln_s=ln
24685else
24686  as_ln_s='cp -p'
24687fi
24688rm -f conf$$ conf$$.exe conf$$.file
24689
24690as_executable_p="test -f"
24691
24692# Support unset when possible.
24693if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
24694  as_unset="unset"
24695else
24696  as_unset="false"
24697fi
24698
24699# NLS nuisances.
24700$as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
24701$as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
24702$as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
24703$as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
24704$as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
24705$as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
24706$as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
24707$as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
24708
24709# IFS
24710# We need space, tab and new line, in precisely that order.
24711as_nl='
24712'
24713IFS=" 	$as_nl"
24714
24715# CDPATH.
24716$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
24717
24718exec 6>&1
24719
24720_ACEOF
24721
24722# Files that config.status was made for.
24723if test -n "$ac_config_files"; then
24724  echo "config_files=\"$ac_config_files\"" >>"$CONFIG_STATUS"
24725fi
24726
24727if test -n "$ac_config_headers"; then
24728  echo "config_headers=\"$ac_config_headers\"" >>"$CONFIG_STATUS"
24729fi
24730
24731if test -n "$ac_config_links"; then
24732  echo "config_links=\"$ac_config_links\"" >>"$CONFIG_STATUS"
24733fi
24734
24735if test -n "$ac_config_commands"; then
24736  echo "config_commands=\"$ac_config_commands\"" >>"$CONFIG_STATUS"
24737fi
24738
24739cat >>"$CONFIG_STATUS" <<\EOF
24740
24741ac_cs_usage="\
24742\`$as_me' instantiates files from templates according to the
24743current configuration.
24744
24745Usage: $0 [OPTIONS] [FILE]...
24746
24747  -h, --help       print this help, then exit
24748  -V, --version    print version number, then exit
24749  -d, --debug      don't remove temporary files
24750      --recheck    update $as_me by reconfiguring in the same conditions
24751  --file=FILE[:TEMPLATE]
24752                   instantiate the configuration file FILE
24753  --header=FILE[:TEMPLATE]
24754                   instantiate the configuration header FILE
24755
24756Configuration files:
24757$config_files
24758
24759Configuration headers:
24760$config_headers
24761
24762Report bugs to <dickey@invisible-island.net>."
24763EOF
24764
24765cat >>"$CONFIG_STATUS" <<EOF
24766ac_cs_version="\\
24767config.status
24768configured by $0, generated by GNU Autoconf 2.52.20210105,
24769  with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
24770
24771Copyright 2003-2020,2021	Thomas E. Dickey
24772Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
24773Free Software Foundation, Inc.
24774This config.status script is free software; the Free Software Foundation
24775gives unlimited permission to copy, distribute and modify it."
24776srcdir="$srcdir"
24777INSTALL="$INSTALL"
24778EOF
24779
24780cat >>"$CONFIG_STATUS" <<\EOF
24781# If no file are specified by the user, then we need to provide default
24782# value.  By we need to know if files were specified by the user.
24783ac_need_defaults=:
24784while test $# != 0
24785do
24786  case $1 in
24787  --*=*)
24788    ac_option=`expr "x$1" : 'x\([^=]*\)='`
24789    ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
24790    shift
24791    set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
24792    shift
24793    ;;
24794  -*);;
24795  *) # This is not an option, so the user has probably given explicit
24796     # arguments.
24797     ac_need_defaults=false;;
24798  esac
24799
24800  case $1 in
24801  # Handling of the options.
24802EOF
24803cat >>"$CONFIG_STATUS" <<EOF
24804  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
24805    echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
24806    exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
24807EOF
24808cat >>"$CONFIG_STATUS" <<\EOF
24809  --version | --vers* | -V )
24810    echo "$ac_cs_version"; exit 0 ;;
24811  --he | --h)
24812    # Conflict between --help and --header
24813    { { echo "$as_me:24813: error: ambiguous option: $1
24814Try \`$0 --help' for more information." >&5
24815echo "$as_me: error: ambiguous option: $1
24816Try \`$0 --help' for more information." >&2;}
24817   { (exit 1); exit 1; }; };;
24818  --help | --hel | -h )
24819    echo "$ac_cs_usage"; exit 0 ;;
24820  --debug | --d* | -d )
24821    debug=: ;;
24822  --file | --fil | --fi | --f )
24823    shift
24824    CONFIG_FILES="$CONFIG_FILES $1"
24825    ac_need_defaults=false;;
24826  --header | --heade | --head | --hea )
24827    shift
24828    CONFIG_HEADERS="$CONFIG_HEADERS $1"
24829    ac_need_defaults=false;;
24830
24831  # This is an error.
24832  -*) { { echo "$as_me:24832: error: unrecognized option: $1
24833Try \`$0 --help' for more information." >&5
24834echo "$as_me: error: unrecognized option: $1
24835Try \`$0 --help' for more information." >&2;}
24836   { (exit 1); exit 1; }; } ;;
24837
24838  *) ac_config_targets="$ac_config_targets $1" ;;
24839
24840  esac
24841  shift
24842done
24843
24844exec 5>>config.log
24845cat >&5 << _ACEOF
24846
24847## ----------------------- ##
24848## Running config.status.  ##
24849## ----------------------- ##
24850
24851This file was extended by $as_me 2.52.20210105, executed with
24852  CONFIG_FILES    = $CONFIG_FILES
24853  CONFIG_HEADERS  = $CONFIG_HEADERS
24854  CONFIG_LINKS    = $CONFIG_LINKS
24855  CONFIG_COMMANDS = $CONFIG_COMMANDS
24856  > "$ac_cs_invocation"
24857on `(hostname || uname -n) 2>/dev/null | sed 1q`
24858
24859_ACEOF
24860EOF
24861
24862cat >>"$CONFIG_STATUS" <<\EOF
24863for ac_config_target in $ac_config_targets
24864do
24865  case "$ac_config_target" in
24866  # Handling of arguments.
24867  "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
24868  "df-install" ) CONFIG_FILES="$CONFIG_FILES df-install" ;;
24869  "minstall" ) CONFIG_FILES="$CONFIG_FILES minstall:minstall.in" ;;
24870  "xtermcfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS xtermcfg.h:xtermcfg.hin" ;;
24871  *) { { echo "$as_me:24871: error: invalid argument: $ac_config_target" >&5
24872echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
24873   { (exit 1); exit 1; }; };;
24874  esac
24875done
24876
24877# If the user did not use the arguments to specify the items to instantiate,
24878# then the envvar interface is used.  Set only those that are not.
24879# We use the long form for the default assignment because of an extremely
24880# bizarre bug on SunOS 4.1.3.
24881if "$ac_need_defaults"; then
24882  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
24883  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
24884fi
24885
24886# Create a temporary directory, and hook for its removal unless debugging.
24887$debug ||
24888{
24889  trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
24890  trap '{ (exit 1); exit 1; }' 1 2 13 15
24891}
24892
24893# Create a (secure) tmp directory for tmp files.
24894: ${TMPDIR=/tmp}
24895{
24896  tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
24897  test -n "$tmp" && test -d "$tmp"
24898}  ||
24899{
24900  tmp=$TMPDIR/cs$$-$RANDOM
24901  (umask 077 && mkdir $tmp)
24902} ||
24903{
24904   echo "$me: cannot create a temporary directory in $TMPDIR" >&2
24905   { (exit 1); exit 1; }
24906}
24907
24908EOF
24909
24910cat >>"$CONFIG_STATUS" <<EOF
24911
24912#
24913# CONFIG_FILES section.
24914#
24915
24916# No need to generate the scripts if there are no CONFIG_FILES.
24917# This happens for instance when ./config.status config.h
24918if test -n "\$CONFIG_FILES"; then
24919  # Protect against being on the right side of a sed subst in config.status.
24920  sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
24921   s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
24922s,@SHELL@,$SHELL,;t t
24923s,@exec_prefix@,$exec_prefix,;t t
24924s,@prefix@,$prefix,;t t
24925s,@program_transform_name@,$program_transform_name,;t t
24926s,@bindir@,$bindir,;t t
24927s,@sbindir@,$sbindir,;t t
24928s,@libexecdir@,$libexecdir,;t t
24929s,@datarootdir@,$datarootdir,;t t
24930s,@datadir@,$datadir,;t t
24931s,@sysconfdir@,$sysconfdir,;t t
24932s,@sharedstatedir@,$sharedstatedir,;t t
24933s,@localstatedir@,$localstatedir,;t t
24934s,@runstatedir@,$runstatedir,;t t
24935s,@libdir@,$libdir,;t t
24936s,@includedir@,$includedir,;t t
24937s,@oldincludedir@,$oldincludedir,;t t
24938s,@infodir@,$infodir,;t t
24939s,@mandir@,$mandir,;t t
24940s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
24941s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
24942s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
24943s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
24944s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
24945s,@build_alias@,$build_alias,;t t
24946s,@host_alias@,$host_alias,;t t
24947s,@target_alias@,$target_alias,;t t
24948s,@ECHO_C@,$ECHO_C,;t t
24949s,@ECHO_N@,$ECHO_N,;t t
24950s,@ECHO_T@,$ECHO_T,;t t
24951s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
24952s,@DEFS@,$DEFS,;t t
24953s,@LIBS@,$LIBS,;t t
24954s,@build@,$build,;t t
24955s,@build_cpu@,$build_cpu,;t t
24956s,@build_vendor@,$build_vendor,;t t
24957s,@build_os@,$build_os,;t t
24958s,@host@,$host,;t t
24959s,@host_cpu@,$host_cpu,;t t
24960s,@host_vendor@,$host_vendor,;t t
24961s,@host_os@,$host_os,;t t
24962s,@CC@,$CC,;t t
24963s,@CFLAGS@,$CFLAGS,;t t
24964s,@LDFLAGS@,$LDFLAGS,;t t
24965s,@CPPFLAGS@,$CPPFLAGS,;t t
24966s,@ac_ct_CC@,$ac_ct_CC,;t t
24967s,@EXEEXT@,$EXEEXT,;t t
24968s,@OBJEXT@,$OBJEXT,;t t
24969s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
24970s,@CPP@,$CPP,;t t
24971s,@GREP@,$GREP,;t t
24972s,@EGREP@,$EGREP,;t t
24973s,@AWK@,$AWK,;t t
24974s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
24975s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
24976s,@INSTALL_DATA@,$INSTALL_DATA,;t t
24977s,@LN_S@,$LN_S,;t t
24978s,@LINT@,$LINT,;t t
24979s,@LINT_OPTS@,$LINT_OPTS,;t t
24980s,@APP_CLASS@,$APP_CLASS,;t t
24981s,@APPSDIR@,$APPSDIR,;t t
24982s,@no_appsdir@,$no_appsdir,;t t
24983s,@ICON_NAME@,$ICON_NAME,;t t
24984s,@ICON_SYMLINK@,$ICON_SYMLINK,;t t
24985s,@PIXMAPDIR@,$PIXMAPDIR,;t t
24986s,@no_pixmapdir@,$no_pixmapdir,;t t
24987s,@ICONDIR@,$ICONDIR,;t t
24988s,@no_icondir@,$no_icondir,;t t
24989s,@ICON_FORMAT@,$ICON_FORMAT,;t t
24990s,@ICON_THEME@,$ICON_THEME,;t t
24991s,@ICON_LIST@,$ICON_LIST,;t t
24992s,@desktop_utils@,$desktop_utils,;t t
24993s,@DESKTOP_FLAGS@,$DESKTOP_FLAGS,;t t
24994s,@DESKTOP_CATEGORY@,$DESKTOP_CATEGORY,;t t
24995s,@XTERM_PATH@,$XTERM_PATH,;t t
24996s,@XTERM_SYMLINK@,$XTERM_SYMLINK,;t t
24997s,@SINSTALL_OPTS@,$SINSTALL_OPTS,;t t
24998s,@X_CFLAGS@,$X_CFLAGS,;t t
24999s,@X_PRE_LIBS@,$X_PRE_LIBS,;t t
25000s,@X_LIBS@,$X_LIBS,;t t
25001s,@X_EXTRA_LIBS@,$X_EXTRA_LIBS,;t t
25002s,@PKG_CONFIG@,$PKG_CONFIG,;t t
25003s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
25004s,@ICON_SUFFIX@,$ICON_SUFFIX,;t t
25005s,@IMAKE@,$IMAKE,;t t
25006s,@IMAKE_CFLAGS@,$IMAKE_CFLAGS,;t t
25007s,@IMAKE_LOADFLAGS@,$IMAKE_LOADFLAGS,;t t
25008s,@GROFF_PATH@,$GROFF_PATH,;t t
25009s,@NROFF_PATH@,$NROFF_PATH,;t t
25010s,@TBL_PATH@,$TBL_PATH,;t t
25011s,@GROFF_NOTE@,$GROFF_NOTE,;t t
25012s,@NROFF_NOTE@,$NROFF_NOTE,;t t
25013s,@FGREP@,$FGREP,;t t
25014s,@cf_man2html@,$cf_man2html,;t t
25015s,@MAN2HTML_NOTE@,$MAN2HTML_NOTE,;t t
25016s,@MAN2HTML_PATH@,$MAN2HTML_PATH,;t t
25017s,@MAN2HTML_TEMP@,$MAN2HTML_TEMP,;t t
25018s,@default_termid@,$default_termid,;t t
25019s,@default_TERM@,$default_TERM,;t t
25020s,@backarrow_is_bs@,$backarrow_is_bs,;t t
25021s,@backarrow_is_erase@,$backarrow_is_erase,;t t
25022s,@delete_is_del@,$delete_is_del,;t t
25023s,@initial_erase@,$initial_erase,;t t
25024s,@alt_sends_esc@,$alt_sends_esc,;t t
25025s,@meta_sends_esc@,$meta_sends_esc,;t t
25026s,@cf_tic_prog@,$cf_tic_prog,;t t
25027s,@no_ticprog@,$no_ticprog,;t t
25028s,@TERMINFO_DIR@,$TERMINFO_DIR,;t t
25029s,@SET_TERMINFO@,$SET_TERMINFO,;t t
25030s,@double_buffer@,$double_buffer,;t t
25031s,@FREETYPE_CONFIG@,$FREETYPE_CONFIG,;t t
25032s,@FREETYPE_OLD_CONFIG@,$FREETYPE_OLD_CONFIG,;t t
25033s,@FREETYPE_XFT_CONFIG@,$FREETYPE_XFT_CONFIG,;t t
25034s,@HAVE_TYPE_FCCHAR32@,$HAVE_TYPE_FCCHAR32,;t t
25035s,@HAVE_TYPE_XFTCHARSPEC@,$HAVE_TYPE_XFTCHARSPEC,;t t
25036s,@LUIT@,$LUIT,;t t
25037s,@ECHO_LT@,$ECHO_LT,;t t
25038s,@ECHO_LD@,$ECHO_LD,;t t
25039s,@RULE_CC@,$RULE_CC,;t t
25040s,@SHOW_CC@,$SHOW_CC,;t t
25041s,@ECHO_CC@,$ECHO_CC,;t t
25042s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
25043s,@HAVE_STDNORETURN_H@,$HAVE_STDNORETURN_H,;t t
25044s,@CHARPROC_DEPS@,$CHARPROC_DEPS,;t t
25045s,@EXTRAHDRS@,$EXTRAHDRS,;t t
25046s,@EXTRASRCS@,$EXTRASRCS,;t t
25047s,@EXTRAOBJS@,$EXTRAOBJS,;t t
25048s,@MAY_SETUID@,$MAY_SETUID,;t t
25049s,@NOT_SETUID@,$NOT_SETUID,;t t
25050s,@CTAGS@,$CTAGS,;t t
25051s,@ETAGS@,$ETAGS,;t t
25052s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
25053s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
25054s,@cf_ldd_prog@,$cf_ldd_prog,;t t
25055s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
25056CEOF
25057
25058EOF
25059
25060  cat >>"$CONFIG_STATUS" <<\EOF
25061  # Split the substitutions into bite-sized pieces for seds with
25062  # small command number limits, like on Digital OSF/1 and HP-UX.
25063  ac_max_sed_lines=48
25064  ac_sed_frag=1 # Number of current file.
25065  ac_beg=1 # First line for current file.
25066  ac_end=$ac_max_sed_lines # Line after last line for current file.
25067  ac_more_lines=:
25068  ac_sed_cmds=
25069  while "$ac_more_lines"; do
25070    if test "$ac_beg" -gt 1; then
25071      sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
25072    else
25073      sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
25074    fi
25075    if test ! -s $tmp/subs.frag; then
25076      ac_more_lines=false
25077    else
25078      # The purpose of the label and of the branching condition is to
25079      # speed up the sed processing (if there are no `@' at all, there
25080      # is no need to browse any of the substitutions).
25081      # These are the two extra sed commands mentioned above.
25082      (echo ':t
25083  /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
25084      # It is possible to make a multiline substitution using escaped newlines.
25085      # Ensure that we do not split the substitution between script fragments.
25086      ac_BEG=$ac_end
25087      ac_END=`expr "$ac_end" + "$ac_max_sed_lines"`
25088      sed "1,${ac_BEG}d; ${ac_END}p; q" $tmp/subs.sed >$tmp/subs.next
25089      if test -s $tmp/subs.next; then
25090        grep '^s,@[^@,][^@,]*@,.*\\$' $tmp/subs.next >$tmp/subs.edit
25091        if test ! -s $tmp/subs.edit; then
25092          grep "^s,@[^@,][^@,]*@,.*,;t t$" $tmp/subs.next >$tmp/subs.edit
25093          if test ! -s $tmp/subs.edit; then
25094            if test "$ac_beg" -gt 1; then
25095              ac_end=`expr "$ac_end" - 1`
25096              continue
25097            fi
25098          fi
25099        fi
25100      fi
25101
25102      if test -z "$ac_sed_cmds"; then
25103        ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
25104      else
25105        ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
25106      fi
25107      ac_sed_frag=`expr "$ac_sed_frag" + 1`
25108      ac_beg=$ac_end
25109      ac_end=`expr "$ac_end" + "$ac_max_sed_lines"`
25110    fi
25111  done
25112  if test -z "$ac_sed_cmds"; then
25113    ac_sed_cmds=cat
25114  fi
25115fi # test -n "$CONFIG_FILES"
25116
25117EOF
25118cat >>"$CONFIG_STATUS" <<\EOF
25119for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
25120  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
25121  case "$ac_file" in
25122  - | *:- | *:-:* ) # input from stdin
25123        cat >$tmp/stdin
25124        ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
25125        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
25126  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
25127        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
25128  * )   ac_file_in=$ac_file.in ;;
25129  esac
25130
25131  # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
25132  ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
25133         X"$ac_file" : 'X\(//\)[^/]' \| \
25134         X"$ac_file" : 'X\(//\)$' \| \
25135         X"$ac_file" : 'X\(/\)' \| \
25136         .     : '\(.\)' 2>/dev/null ||
25137echo X"$ac_file" |
25138    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
25139  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
25140  	  /^X\(\/\/\)$/{ s//\1/; q; }
25141  	  /^X\(\/\).*/{ s//\1/; q; }
25142  	  s/.*/./; q'`
25143  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
25144    { case "$ac_dir" in
25145  [\\/]* | ?:[\\/]* ) as_incr_dir=;;
25146  *)                      as_incr_dir=.;;
25147esac
25148as_dummy="$ac_dir"
25149for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
25150  case $as_mkdir_dir in
25151    # Skip DOS drivespec
25152    ?:) as_incr_dir=$as_mkdir_dir ;;
25153    *)
25154      as_incr_dir=$as_incr_dir/$as_mkdir_dir
25155      test -d "$as_incr_dir" || mkdir "$as_incr_dir"
25156    ;;
25157  esac
25158done; }
25159
25160    ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
25161    # A "../" for each directory in $ac_dir_suffix.
25162    ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
25163  else
25164    ac_dir_suffix= ac_dots=
25165  fi
25166
25167  case "$srcdir" in
25168  .)  ac_srcdir=.
25169      if test -z "$ac_dots"; then
25170         ac_top_srcdir=.
25171      else
25172         ac_top_srcdir=`echo "$ac_dots" | sed 's,/$,,'`
25173      fi ;;
25174  [\\/]* | ?:[\\/]* )
25175      ac_srcdir="$srcdir$ac_dir_suffix";
25176      ac_top_srcdir="$srcdir" ;;
25177  *) # Relative path.
25178    ac_srcdir="$ac_dots$srcdir$ac_dir_suffix"
25179    ac_top_srcdir="$ac_dots$srcdir" ;;
25180  esac
25181
25182  case $INSTALL in
25183  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
25184  *) ac_INSTALL=$ac_dots$INSTALL ;;
25185  esac
25186
25187  if test x"$ac_file" != x-; then
25188    { echo "$as_me:25188: creating $ac_file" >&5
25189echo "$as_me: creating $ac_file" >&6;}
25190    rm -f "$ac_file"
25191  fi
25192  # Let's still pretend it is `configure' which instantiates (i.e., don't
25193  # use $as_me), people would be surprised to read:
25194  #    /* config.h.  Generated automatically by config.status.  */
25195  configure_input="Generated automatically from `echo $ac_file_in |
25196                                                 sed 's,.*/,,'` by configure."
25197
25198  # First look for the input files in the build tree, otherwise in the
25199  # src tree.
25200  ac_file_inputs=`IFS=:
25201    for f in $ac_file_in; do
25202      case $f in
25203      -) echo $tmp/stdin ;;
25204      [\\/$]*)
25205         # Absolute (can't be DOS-style, as IFS=:)
25206         test -f "$f" || { { echo "$as_me:25206: error: cannot find input file: $f" >&5
25207echo "$as_me: error: cannot find input file: $f" >&2;}
25208   { (exit 1); exit 1; }; }
25209         echo $f;;
25210      *) # Relative
25211         if test -f "$f"; then
25212           # Build tree
25213           echo $f
25214         elif test -f "$srcdir/$f"; then
25215           # Source tree
25216           echo "$srcdir/$f"
25217         else
25218           # /dev/null tree
25219           { { echo "$as_me:25219: error: cannot find input file: $f" >&5
25220echo "$as_me: error: cannot find input file: $f" >&2;}
25221   { (exit 1); exit 1; }; }
25222         fi;;
25223      esac
25224    done` || { (exit 1); exit 1; }
25225EOF
25226cat >>"$CONFIG_STATUS" <<\EOF
25227  ac_warn_datarootdir=no
25228  if test x"$ac_file" != x-; then
25229    for ac_item in $ac_file_inputs
25230    do
25231      ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' "$ac_item"`
25232      if test -n "$ac_seen"; then
25233        ac_used=`grep '@datarootdir@' "$ac_item"`
25234        if test -z "$ac_used"; then
25235          { echo "$as_me:25235: WARNING: datarootdir was used implicitly but not set:
25236$ac_seen" >&5
25237echo "$as_me: WARNING: datarootdir was used implicitly but not set:
25238$ac_seen" >&2;}
25239          ac_warn_datarootdir=yes
25240        fi
25241      fi
25242      ac_seen=`grep '${datarootdir}' "$ac_item"`
25243      if test -n "$ac_seen"; then
25244        { echo "$as_me:25244: WARNING: datarootdir was used explicitly but not set:
25245$ac_seen" >&5
25246echo "$as_me: WARNING: datarootdir was used explicitly but not set:
25247$ac_seen" >&2;}
25248        ac_warn_datarootdir=yes
25249      fi
25250    done
25251  fi
25252
25253if test "x$ac_warn_datarootdir" = xyes; then
25254  ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
25255fi
25256
25257EOF
25258cat >>"$CONFIG_STATUS" <<EOF
25259  sed "$ac_vpsub
25260$extrasub
25261EOF
25262cat >>"$CONFIG_STATUS" <<\EOF
25263:t
25264/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
25265s,@configure_input@,$configure_input,;t t
25266s,@srcdir@,$ac_srcdir,;t t
25267s,@top_srcdir@,$ac_top_srcdir,;t t
25268s,@INSTALL@,$ac_INSTALL,;t t
25269" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
25270  rm -f $tmp/stdin
25271  if test x"$ac_file" != x-; then
25272    cp "$tmp/out" "$ac_file"
25273
25274    for ac_name in prefix exec_prefix datarootdir
25275    do
25276        ac_seen=`${FGREP-fgrep} -n '${'$ac_name'[:=].*}' "$ac_file"`
25277        if test -n "$ac_seen"; then
25278            ac_init=`${EGREP-egrep} '[ 	]*'$ac_name'[ 	]*=' "$ac_file"`
25279            if test -z "$ac_init"; then
25280              ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
25281              { echo "$as_me:25281: WARNING: Variable $ac_name is used but was not set:
25282$ac_seen" >&5
25283echo "$as_me: WARNING: Variable $ac_name is used but was not set:
25284$ac_seen" >&2;}
25285            fi
25286        fi
25287    done
25288    ${EGREP-egrep} -n '@[a-z_][a-z_0-9]+@' "$ac_file" >$tmp/out
25289    ${EGREP-egrep} -n '@[A-Z_][A-Z_0-9]+@' "$ac_file" >>$tmp/out
25290    if test -s $tmp/out; then
25291      ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
25292      { echo "$as_me:25292: WARNING: Some variables may not be substituted:
25293$ac_seen" >&5
25294echo "$as_me: WARNING: Some variables may not be substituted:
25295$ac_seen" >&2;}
25296    fi
25297  else
25298    cat $tmp/out
25299  fi
25300  rm -f $tmp/out
25301
25302done
25303EOF
25304cat >>"$CONFIG_STATUS" <<\EOF
25305
25306#
25307# CONFIG_HEADER section.
25308#
25309
25310# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
25311# NAME is the cpp macro being defined and VALUE is the value it is being given.
25312#
25313# ac_d sets the value in "#define NAME VALUE" lines.
25314ac_dA='s,^\([ 	]*\)#\([ 	]*define[ 	][ 	]*\)'
25315ac_dB='[ 	].*$,\1#\2'
25316ac_dC=' '
25317ac_dD=',;t'
25318# ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
25319ac_iA='s,^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
25320ac_iB='\([ 	]\),\1#\2define\3'
25321ac_iC=' '
25322ac_iD='\4,;t'
25323# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
25324ac_uA='s,^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
25325ac_uB='$,\1#\2define\3'
25326ac_uC=' '
25327ac_uD=',;t'
25328
25329for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
25330  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
25331  case "$ac_file" in
25332  - | *:- | *:-:* ) # input from stdin
25333        cat >$tmp/stdin
25334        ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
25335        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
25336  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
25337        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
25338  * )   ac_file_in=$ac_file.in ;;
25339  esac
25340
25341  test x"$ac_file" != x- && { echo "$as_me:25341: creating $ac_file" >&5
25342echo "$as_me: creating $ac_file" >&6;}
25343
25344  # First look for the input files in the build tree, otherwise in the
25345  # src tree.
25346  ac_file_inputs=`IFS=:
25347    for f in $ac_file_in; do
25348      case $f in
25349      -) echo $tmp/stdin ;;
25350      [\\/$]*)
25351         # Absolute (can't be DOS-style, as IFS=:)
25352         test -f "$f" || { { echo "$as_me:25352: error: cannot find input file: $f" >&5
25353echo "$as_me: error: cannot find input file: $f" >&2;}
25354   { (exit 1); exit 1; }; }
25355         echo $f;;
25356      *) # Relative
25357         if test -f "$f"; then
25358           # Build tree
25359           echo $f
25360         elif test -f "$srcdir/$f"; then
25361           # Source tree
25362           echo "$srcdir/$f"
25363         else
25364           # /dev/null tree
25365           { { echo "$as_me:25365: error: cannot find input file: $f" >&5
25366echo "$as_me: error: cannot find input file: $f" >&2;}
25367   { (exit 1); exit 1; }; }
25368         fi;;
25369      esac
25370    done` || { (exit 1); exit 1; }
25371  # Remove the trailing spaces.
25372  sed 's/[ 	]*$//' $ac_file_inputs >$tmp/in
25373
25374EOF
25375
25376# Transform confdefs.h into two sed scripts, `conftest.defines' and
25377# `conftest.undefs', that substitutes the proper values into
25378# config.h.in to produce config.h.  The first handles `#define'
25379# templates, and the second `#undef' templates.
25380# And first: Protect against being on the right side of a sed subst in
25381# config.status.  Protect against being in an unquoted here document
25382# in config.status.
25383rm -f conftest.defines conftest.undefs
25384# Using a here document instead of a string reduces the quoting nightmare.
25385# Putting comments in sed scripts is not portable.
25386#
25387# `end' is used to avoid that the second main sed command (meant for
25388# 0-ary CPP macros) applies to n-ary macro definitions.
25389# See the Autoconf documentation for `clear'.
25390cat >confdef2sed.sed <<\EOF
25391s/[\\&,]/\\&/g
25392s,[\\$`],\\&,g
25393t clear
25394: clear
25395s,^[ 	]*#[ 	]*define[ 	][ 	]*\(\([^ 	(][^ 	(]*\)([^)]*)\)[ 	]*\(.*\)$,${ac_dA}\2${ac_dB}\1${ac_dC}\3${ac_dD},gp
25396t end
25397s,^[ 	]*#[ 	]*define[ 	][ 	]*\([^ 	][^ 	]*\)[ 	]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
25398: end
25399EOF
25400# If some macros were called several times there might be several times
25401# the same #defines, which is useless.  Nevertheless, we may not want to
25402# sort them, since we want the *last* AC-DEFINE to be honored.
25403uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
25404sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
25405sed 's/ac_d/ac_i/g' conftest.defines >>conftest.undefs
25406rm -f confdef2sed.sed
25407
25408# This sed command replaces #undef with comments.  This is necessary, for
25409# example, in the case of _POSIX_SOURCE, which is predefined and required
25410# on some systems where configure will not decide to define it.
25411cat >>conftest.undefs <<\EOF
25412s,^[ 	]*#[ 	]*undef[ 	][ 	]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
25413EOF
25414
25415# Break up conftest.defines because some shells have a limit on the size
25416# of here documents, and old seds have small limits too (100 cmds).
25417echo '  # Handle all the #define templates only if necessary.' >>"$CONFIG_STATUS"
25418echo '  if egrep "^[ 	]*#[ 	]*define" $tmp/in >/dev/null; then' >>"$CONFIG_STATUS"
25419echo '  # If there are no defines, we may have an empty if/fi' >>"$CONFIG_STATUS"
25420echo '  :' >>"$CONFIG_STATUS"
25421rm -f conftest.tail
25422while grep . conftest.defines >/dev/null
25423do
25424  # Write a limited-size here document to $tmp/defines.sed.
25425  echo '  cat >$tmp/defines.sed <<CEOF' >>"$CONFIG_STATUS"
25426  # Speed up: don't consider the non `#define' lines.
25427  echo '/^[ 	]*#[ 	]*define/!b' >>"$CONFIG_STATUS"
25428  # Work around the forget-to-reset-the-flag bug.
25429  echo 't clr' >>"$CONFIG_STATUS"
25430  echo ': clr' >>"$CONFIG_STATUS"
25431  sed "${ac_max_here_lines}q" conftest.defines >>"$CONFIG_STATUS"
25432  echo 'CEOF
25433  sed -f $tmp/defines.sed $tmp/in >$tmp/out
25434  rm -f $tmp/in
25435  mv $tmp/out $tmp/in
25436' >>"$CONFIG_STATUS"
25437  sed "1,${ac_max_here_lines}d" conftest.defines >conftest.tail
25438  rm -f conftest.defines
25439  mv conftest.tail conftest.defines
25440done
25441rm -f conftest.defines
25442echo '  fi # egrep' >>"$CONFIG_STATUS"
25443echo >>"$CONFIG_STATUS"
25444
25445# Break up conftest.undefs because some shells have a limit on the size
25446# of here documents, and old seds have small limits too (100 cmds).
25447echo '  # Handle all the #undef templates' >>"$CONFIG_STATUS"
25448rm -f conftest.tail
25449while grep . conftest.undefs >/dev/null
25450do
25451  # Write a limited-size here document to $tmp/undefs.sed.
25452  echo '  cat >$tmp/undefs.sed <<CEOF' >>"$CONFIG_STATUS"
25453  # Speed up: don't consider the non `#undef'
25454  echo '/^[ 	]*#[ 	]*undef/!b' >>"$CONFIG_STATUS"
25455  # Work around the forget-to-reset-the-flag bug.
25456  echo 't clr' >>"$CONFIG_STATUS"
25457  echo ': clr' >>"$CONFIG_STATUS"
25458  sed "${ac_max_here_lines}q" conftest.undefs >>"$CONFIG_STATUS"
25459  echo 'CEOF
25460  sed -f $tmp/undefs.sed $tmp/in >$tmp/out
25461  rm -f $tmp/in
25462  mv $tmp/out $tmp/in
25463' >>"$CONFIG_STATUS"
25464  sed "1,${ac_max_here_lines}d" conftest.undefs >conftest.tail
25465  rm -f conftest.undefs
25466  mv conftest.tail conftest.undefs
25467done
25468rm -f conftest.undefs
25469
25470cat >>"$CONFIG_STATUS" <<\EOF
25471  # Let's still pretend it is `configure' which instantiates (i.e., don't
25472  # use $as_me), people would be surprised to read:
25473  #    /* config.h.  Generated automatically by config.status.  */
25474  if test x"$ac_file" = x-; then
25475    echo "/* Generated automatically by configure.  */" >$tmp/config.h
25476  else
25477    echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
25478  fi
25479  cat $tmp/in >>$tmp/config.h
25480  rm -f $tmp/in
25481  if test x"$ac_file" != x-; then
25482    if cmp -s "$ac_file" "$tmp/config.h" 2>/dev/null; then
25483      { echo "$as_me:25483: $ac_file is unchanged" >&5
25484echo "$as_me: $ac_file is unchanged" >&6;}
25485    else
25486      ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
25487         X"$ac_file" : 'X\(//\)[^/]' \| \
25488         X"$ac_file" : 'X\(//\)$' \| \
25489         X"$ac_file" : 'X\(/\)' \| \
25490         .     : '\(.\)' 2>/dev/null ||
25491echo X"$ac_file" |
25492    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
25493  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
25494  	  /^X\(\/\/\)$/{ s//\1/; q; }
25495  	  /^X\(\/\).*/{ s//\1/; q; }
25496  	  s/.*/./; q'`
25497      if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
25498        { case "$ac_dir" in
25499  [\\/]* | ?:[\\/]* ) as_incr_dir=;;
25500  *)                      as_incr_dir=.;;
25501esac
25502as_dummy="$ac_dir"
25503for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
25504  case $as_mkdir_dir in
25505    # Skip DOS drivespec
25506    ?:) as_incr_dir=$as_mkdir_dir ;;
25507    *)
25508      as_incr_dir=$as_incr_dir/$as_mkdir_dir
25509      test -d "$as_incr_dir" || mkdir "$as_incr_dir"
25510    ;;
25511  esac
25512done; }
25513
25514      fi
25515      rm -f "$ac_file"
25516      mv "$tmp/config.h" "$ac_file"
25517    fi
25518  else
25519    cat $tmp/config.h
25520    rm -f $tmp/config.h
25521  fi
25522done
25523EOF
25524
25525cat >>"$CONFIG_STATUS" <<\EOF
25526
25527{ (exit 0); exit 0; }
25528EOF
25529chmod +x "$CONFIG_STATUS"
25530ac_clean_files=$ac_clean_files_save
25531
25532# configure is writing to config.log, and then calls config.status.
25533# config.status does its own redirection, appending to config.log.
25534# Unfortunately, on DOS this fails, as config.log is still kept open
25535# by configure, so config.status won't be able to write to it; its
25536# output is simply discarded.  So we exec the FD to /dev/null,
25537# effectively closing config.log, so it can be properly (re)opened and
25538# appended to by config.status.  When coming back to configure, we
25539# need to make the FD available again.
25540if test "$no_create" != yes; then
25541  ac_cs_success=:
25542  exec 5>/dev/null
25543  $SHELL "$CONFIG_STATUS" || ac_cs_success=false
25544  exec 5>>config.log
25545  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
25546  # would make configure fail if this is the last instruction.
25547  "$ac_cs_success" || { (exit 1); exit 1; }
25548fi
25549
25550