configure revision ae137402
1#! /bin/sh
2# Guess values for system-dependent variables and create Makefiles.
3# Generated by Autoconf 2.52.20210509.
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.20210509.  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[6-9]*)
3840	# OpenBSD 6.x has broken locale support, both compile-time and runtime.
3841	# see https://www.mail-archive.com/bugs@openbsd.org/msg13200.html
3842	# Abusing the conformance level is a workaround.
3843	{ echo "$as_me:3843: WARNING: this system does not provide usable locale support" >&5
3844echo "$as_me: WARNING: this system does not provide usable locale support" >&2;}
3845	cf_xopen_source="-D_BSD_SOURCE"
3846	cf_XOPEN_SOURCE=700
3847	;;
3848(openbsd[4-5]*)
3849	# setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
3850	cf_xopen_source="-D_BSD_SOURCE"
3851	cf_XOPEN_SOURCE=600
3852	;;
3853(openbsd*)
3854	# setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
3855	;;
3856(osf[45]*)
3857	cf_xopen_source="-D_OSF_SOURCE"
3858	;;
3859(nto-qnx*)
3860	cf_xopen_source="-D_QNX_SOURCE"
3861	;;
3862(sco*)
3863	# setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
3864	;;
3865(solaris2.*)
3866	cf_xopen_source="-D__EXTENSIONS__"
3867	cf_cv_xopen_source=broken
3868	;;
3869(sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
3870	cf_XOPEN_SOURCE=
3871	cf_POSIX_C_SOURCE=
3872	;;
3873(*)
3874
3875echo "$as_me:3875: checking if we should define _XOPEN_SOURCE" >&5
3876echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
3877if test "${cf_cv_xopen_source+set}" = set; then
3878  echo $ECHO_N "(cached) $ECHO_C" >&6
3879else
3880
3881	cat >"conftest.$ac_ext" <<_ACEOF
3882#line 3882 "configure"
3883#include "confdefs.h"
3884
3885#include <stdlib.h>
3886#include <string.h>
3887#include <sys/types.h>
3888
3889int
3890main (void)
3891{
3892
3893#ifndef _XOPEN_SOURCE
3894make an error
3895#endif
3896  ;
3897  return 0;
3898}
3899_ACEOF
3900rm -f "conftest.$ac_objext"
3901if { (eval echo "$as_me:3901: \"$ac_compile\"") >&5
3902  (eval $ac_compile) 2>&5
3903  ac_status=$?
3904  echo "$as_me:3904: \$? = $ac_status" >&5
3905  (exit "$ac_status"); } &&
3906         { ac_try='test -s "conftest.$ac_objext"'
3907  { (eval echo "$as_me:3907: \"$ac_try\"") >&5
3908  (eval $ac_try) 2>&5
3909  ac_status=$?
3910  echo "$as_me:3910: \$? = $ac_status" >&5
3911  (exit "$ac_status"); }; }; then
3912  cf_cv_xopen_source=no
3913else
3914  echo "$as_me: failed program was:" >&5
3915cat "conftest.$ac_ext" >&5
3916cf_save="$CPPFLAGS"
3917
3918	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3919	CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
3920
3921	 cat >"conftest.$ac_ext" <<_ACEOF
3922#line 3922 "configure"
3923#include "confdefs.h"
3924
3925#include <stdlib.h>
3926#include <string.h>
3927#include <sys/types.h>
3928
3929int
3930main (void)
3931{
3932
3933#ifdef _XOPEN_SOURCE
3934make an error
3935#endif
3936  ;
3937  return 0;
3938}
3939_ACEOF
3940rm -f "conftest.$ac_objext"
3941if { (eval echo "$as_me:3941: \"$ac_compile\"") >&5
3942  (eval $ac_compile) 2>&5
3943  ac_status=$?
3944  echo "$as_me:3944: \$? = $ac_status" >&5
3945  (exit "$ac_status"); } &&
3946         { ac_try='test -s "conftest.$ac_objext"'
3947  { (eval echo "$as_me:3947: \"$ac_try\"") >&5
3948  (eval $ac_try) 2>&5
3949  ac_status=$?
3950  echo "$as_me:3950: \$? = $ac_status" >&5
3951  (exit "$ac_status"); }; }; then
3952  cf_cv_xopen_source=no
3953else
3954  echo "$as_me: failed program was:" >&5
3955cat "conftest.$ac_ext" >&5
3956cf_cv_xopen_source=$cf_XOPEN_SOURCE
3957fi
3958rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3959	CPPFLAGS="$cf_save"
3960
3961fi
3962rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3963
3964fi
3965echo "$as_me:3965: result: $cf_cv_xopen_source" >&5
3966echo "${ECHO_T}$cf_cv_xopen_source" >&6
3967
3968if test "$cf_cv_xopen_source" != no ; then
3969
3970CFLAGS=`echo "$CFLAGS" | \
3971	sed	-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
3972		-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?$//g'`
3973
3974CPPFLAGS=`echo "$CPPFLAGS" | \
3975	sed	-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
3976		-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?$//g'`
3977
3978	cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
3979
3980cf_fix_cppflags=no
3981cf_new_cflags=
3982cf_new_cppflags=
3983cf_new_extra_cppflags=
3984
3985for cf_add_cflags in $cf_temp_xopen_source
3986do
3987case "$cf_fix_cppflags" in
3988(no)
3989	case "$cf_add_cflags" in
3990	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
3991		case "$cf_add_cflags" in
3992		(-D*)
3993			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3994
3995			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3996				&& test -z "${cf_tst_cflags}" \
3997				&& cf_fix_cppflags=yes
3998
3999			if test "$cf_fix_cppflags" = yes ; then
4000
4001	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4002	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4003
4004				continue
4005			elif test "${cf_tst_cflags}" = "\"'" ; then
4006
4007	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4008	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4009
4010				continue
4011			fi
4012			;;
4013		esac
4014		case "$CPPFLAGS" in
4015		(*$cf_add_cflags)
4016			;;
4017		(*)
4018			case "$cf_add_cflags" in
4019			(-D*)
4020				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4021
4022CPPFLAGS=`echo "$CPPFLAGS" | \
4023	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
4024		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
4025
4026				;;
4027			esac
4028
4029	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4030	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4031
4032			;;
4033		esac
4034		;;
4035	(*)
4036
4037	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4038	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4039
4040		;;
4041	esac
4042	;;
4043(yes)
4044
4045	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4046	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4047
4048	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
4049
4050	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4051		&& test -z "${cf_tst_cflags}" \
4052		&& cf_fix_cppflags=no
4053	;;
4054esac
4055done
4056
4057if test -n "$cf_new_cflags" ; then
4058
4059	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4060	CFLAGS="${CFLAGS}$cf_new_cflags"
4061
4062fi
4063
4064if test -n "$cf_new_cppflags" ; then
4065
4066	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4067	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4068
4069fi
4070
4071if test -n "$cf_new_extra_cppflags" ; then
4072
4073	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4074	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4075
4076fi
4077
4078fi
4079
4080if test "$cf_cv_posix_visible" = no; then
4081
4082cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
4083
4084cf_save_CFLAGS="$CFLAGS"
4085cf_save_CPPFLAGS="$CPPFLAGS"
4086
4087cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
4088	sed	-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
4089		-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?$//g'`
4090
4091cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
4092	sed	-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
4093		-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?$//g'`
4094
4095echo "$as_me:4095: checking if we should define _POSIX_C_SOURCE" >&5
4096echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
4097if test "${cf_cv_posix_c_source+set}" = set; then
4098  echo $ECHO_N "(cached) $ECHO_C" >&6
4099else
4100
4101echo "${as_me:-configure}:4101: testing if the symbol is already defined go no further ..." 1>&5
4102
4103	cat >"conftest.$ac_ext" <<_ACEOF
4104#line 4104 "configure"
4105#include "confdefs.h"
4106#include <sys/types.h>
4107int
4108main (void)
4109{
4110
4111#ifndef _POSIX_C_SOURCE
4112make an error
4113#endif
4114  ;
4115  return 0;
4116}
4117_ACEOF
4118rm -f "conftest.$ac_objext"
4119if { (eval echo "$as_me:4119: \"$ac_compile\"") >&5
4120  (eval $ac_compile) 2>&5
4121  ac_status=$?
4122  echo "$as_me:4122: \$? = $ac_status" >&5
4123  (exit "$ac_status"); } &&
4124         { ac_try='test -s "conftest.$ac_objext"'
4125  { (eval echo "$as_me:4125: \"$ac_try\"") >&5
4126  (eval $ac_try) 2>&5
4127  ac_status=$?
4128  echo "$as_me:4128: \$? = $ac_status" >&5
4129  (exit "$ac_status"); }; }; then
4130  cf_cv_posix_c_source=no
4131else
4132  echo "$as_me: failed program was:" >&5
4133cat "conftest.$ac_ext" >&5
4134cf_want_posix_source=no
4135	 case .$cf_POSIX_C_SOURCE in
4136	 (.[12]??*)
4137		cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
4138		;;
4139	 (.2)
4140		cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
4141		cf_want_posix_source=yes
4142		;;
4143	 (.*)
4144		cf_want_posix_source=yes
4145		;;
4146	 esac
4147	 if test "$cf_want_posix_source" = yes ; then
4148		cat >"conftest.$ac_ext" <<_ACEOF
4149#line 4149 "configure"
4150#include "confdefs.h"
4151#include <sys/types.h>
4152int
4153main (void)
4154{
4155
4156#ifdef _POSIX_SOURCE
4157make an error
4158#endif
4159  ;
4160  return 0;
4161}
4162_ACEOF
4163rm -f "conftest.$ac_objext"
4164if { (eval echo "$as_me:4164: \"$ac_compile\"") >&5
4165  (eval $ac_compile) 2>&5
4166  ac_status=$?
4167  echo "$as_me:4167: \$? = $ac_status" >&5
4168  (exit "$ac_status"); } &&
4169         { ac_try='test -s "conftest.$ac_objext"'
4170  { (eval echo "$as_me:4170: \"$ac_try\"") >&5
4171  (eval $ac_try) 2>&5
4172  ac_status=$?
4173  echo "$as_me:4173: \$? = $ac_status" >&5
4174  (exit "$ac_status"); }; }; then
4175  :
4176else
4177  echo "$as_me: failed program was:" >&5
4178cat "conftest.$ac_ext" >&5
4179cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
4180fi
4181rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4182	 fi
4183
4184echo "${as_me:-configure}:4184: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
4185
4186	 CFLAGS="$cf_trim_CFLAGS"
4187	 CPPFLAGS="$cf_trim_CPPFLAGS"
4188
4189	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4190	CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
4191
4192echo "${as_me:-configure}:4192: testing if the second compile does not leave our definition intact error ..." 1>&5
4193
4194	 cat >"conftest.$ac_ext" <<_ACEOF
4195#line 4195 "configure"
4196#include "confdefs.h"
4197#include <sys/types.h>
4198int
4199main (void)
4200{
4201
4202#ifndef _POSIX_C_SOURCE
4203make an error
4204#endif
4205  ;
4206  return 0;
4207}
4208_ACEOF
4209rm -f "conftest.$ac_objext"
4210if { (eval echo "$as_me:4210: \"$ac_compile\"") >&5
4211  (eval $ac_compile) 2>&5
4212  ac_status=$?
4213  echo "$as_me:4213: \$? = $ac_status" >&5
4214  (exit "$ac_status"); } &&
4215         { ac_try='test -s "conftest.$ac_objext"'
4216  { (eval echo "$as_me:4216: \"$ac_try\"") >&5
4217  (eval $ac_try) 2>&5
4218  ac_status=$?
4219  echo "$as_me:4219: \$? = $ac_status" >&5
4220  (exit "$ac_status"); }; }; then
4221  :
4222else
4223  echo "$as_me: failed program was:" >&5
4224cat "conftest.$ac_ext" >&5
4225cf_cv_posix_c_source=no
4226fi
4227rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4228	 CFLAGS="$cf_save_CFLAGS"
4229	 CPPFLAGS="$cf_save_CPPFLAGS"
4230
4231fi
4232rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4233
4234fi
4235echo "$as_me:4235: result: $cf_cv_posix_c_source" >&5
4236echo "${ECHO_T}$cf_cv_posix_c_source" >&6
4237
4238if test "$cf_cv_posix_c_source" != no ; then
4239	CFLAGS="$cf_trim_CFLAGS"
4240	CPPFLAGS="$cf_trim_CPPFLAGS"
4241
4242cf_fix_cppflags=no
4243cf_new_cflags=
4244cf_new_cppflags=
4245cf_new_extra_cppflags=
4246
4247for cf_add_cflags in $cf_cv_posix_c_source
4248do
4249case "$cf_fix_cppflags" in
4250(no)
4251	case "$cf_add_cflags" in
4252	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4253		case "$cf_add_cflags" in
4254		(-D*)
4255			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4256
4257			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4258				&& test -z "${cf_tst_cflags}" \
4259				&& cf_fix_cppflags=yes
4260
4261			if test "$cf_fix_cppflags" = yes ; then
4262
4263	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4264	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4265
4266				continue
4267			elif test "${cf_tst_cflags}" = "\"'" ; then
4268
4269	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4270	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4271
4272				continue
4273			fi
4274			;;
4275		esac
4276		case "$CPPFLAGS" in
4277		(*$cf_add_cflags)
4278			;;
4279		(*)
4280			case "$cf_add_cflags" in
4281			(-D*)
4282				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4283
4284CPPFLAGS=`echo "$CPPFLAGS" | \
4285	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
4286		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
4287
4288				;;
4289			esac
4290
4291	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4292	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4293
4294			;;
4295		esac
4296		;;
4297	(*)
4298
4299	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4300	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4301
4302		;;
4303	esac
4304	;;
4305(yes)
4306
4307	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4308	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4309
4310	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
4311
4312	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4313		&& test -z "${cf_tst_cflags}" \
4314		&& cf_fix_cppflags=no
4315	;;
4316esac
4317done
4318
4319if test -n "$cf_new_cflags" ; then
4320
4321	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4322	CFLAGS="${CFLAGS}$cf_new_cflags"
4323
4324fi
4325
4326if test -n "$cf_new_cppflags" ; then
4327
4328	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4329	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4330
4331fi
4332
4333if test -n "$cf_new_extra_cppflags" ; then
4334
4335	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4336	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4337
4338fi
4339
4340fi
4341
4342fi # cf_cv_posix_visible
4343
4344	;;
4345esac
4346
4347if test -n "$cf_xopen_source" ; then
4348
4349cf_fix_cppflags=no
4350cf_new_cflags=
4351cf_new_cppflags=
4352cf_new_extra_cppflags=
4353
4354for cf_add_cflags in $cf_xopen_source
4355do
4356case "$cf_fix_cppflags" in
4357(no)
4358	case "$cf_add_cflags" in
4359	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4360		case "$cf_add_cflags" in
4361		(-D*)
4362			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4363
4364			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4365				&& test -z "${cf_tst_cflags}" \
4366				&& cf_fix_cppflags=yes
4367
4368			if test "$cf_fix_cppflags" = yes ; then
4369
4370	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4371	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4372
4373				continue
4374			elif test "${cf_tst_cflags}" = "\"'" ; then
4375
4376	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4377	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4378
4379				continue
4380			fi
4381			;;
4382		esac
4383		case "$CPPFLAGS" in
4384		(*$cf_add_cflags)
4385			;;
4386		(*)
4387			case "$cf_add_cflags" in
4388			(-D*)
4389				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4390
4391CPPFLAGS=`echo "$CPPFLAGS" | \
4392	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
4393		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
4394
4395				;;
4396			esac
4397
4398	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4399	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4400
4401			;;
4402		esac
4403		;;
4404	(*)
4405
4406	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4407	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4408
4409		;;
4410	esac
4411	;;
4412(yes)
4413
4414	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4415	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4416
4417	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
4418
4419	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4420		&& test -z "${cf_tst_cflags}" \
4421		&& cf_fix_cppflags=no
4422	;;
4423esac
4424done
4425
4426if test -n "$cf_new_cflags" ; then
4427	test -n "$verbose" && echo "	add to \$CFLAGS $cf_new_cflags" 1>&6
4428
4429echo "${as_me:-configure}:4429: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
4430
4431	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4432	CFLAGS="${CFLAGS}$cf_new_cflags"
4433
4434fi
4435
4436if test -n "$cf_new_cppflags" ; then
4437	test -n "$verbose" && echo "	add to \$CPPFLAGS $cf_new_cppflags" 1>&6
4438
4439echo "${as_me:-configure}:4439: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
4440
4441	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4442	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4443
4444fi
4445
4446if test -n "$cf_new_extra_cppflags" ; then
4447	test -n "$verbose" && echo "	add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
4448
4449echo "${as_me:-configure}:4449: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
4450
4451	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4452	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4453
4454fi
4455
4456fi
4457
4458if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
4459	echo "$as_me:4459: checking if _XOPEN_SOURCE really is set" >&5
4460echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
4461	cat >"conftest.$ac_ext" <<_ACEOF
4462#line 4462 "configure"
4463#include "confdefs.h"
4464#include <stdlib.h>
4465int
4466main (void)
4467{
4468
4469#ifndef _XOPEN_SOURCE
4470make an error
4471#endif
4472  ;
4473  return 0;
4474}
4475_ACEOF
4476rm -f "conftest.$ac_objext"
4477if { (eval echo "$as_me:4477: \"$ac_compile\"") >&5
4478  (eval $ac_compile) 2>&5
4479  ac_status=$?
4480  echo "$as_me:4480: \$? = $ac_status" >&5
4481  (exit "$ac_status"); } &&
4482         { ac_try='test -s "conftest.$ac_objext"'
4483  { (eval echo "$as_me:4483: \"$ac_try\"") >&5
4484  (eval $ac_try) 2>&5
4485  ac_status=$?
4486  echo "$as_me:4486: \$? = $ac_status" >&5
4487  (exit "$ac_status"); }; }; then
4488  cf_XOPEN_SOURCE_set=yes
4489else
4490  echo "$as_me: failed program was:" >&5
4491cat "conftest.$ac_ext" >&5
4492cf_XOPEN_SOURCE_set=no
4493fi
4494rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4495	echo "$as_me:4495: result: $cf_XOPEN_SOURCE_set" >&5
4496echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
4497	if test "$cf_XOPEN_SOURCE_set" = yes
4498	then
4499		cat >"conftest.$ac_ext" <<_ACEOF
4500#line 4500 "configure"
4501#include "confdefs.h"
4502#include <stdlib.h>
4503int
4504main (void)
4505{
4506
4507#if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
4508make an error
4509#endif
4510  ;
4511  return 0;
4512}
4513_ACEOF
4514rm -f "conftest.$ac_objext"
4515if { (eval echo "$as_me:4515: \"$ac_compile\"") >&5
4516  (eval $ac_compile) 2>&5
4517  ac_status=$?
4518  echo "$as_me:4518: \$? = $ac_status" >&5
4519  (exit "$ac_status"); } &&
4520         { ac_try='test -s "conftest.$ac_objext"'
4521  { (eval echo "$as_me:4521: \"$ac_try\"") >&5
4522  (eval $ac_try) 2>&5
4523  ac_status=$?
4524  echo "$as_me:4524: \$? = $ac_status" >&5
4525  (exit "$ac_status"); }; }; then
4526  cf_XOPEN_SOURCE_set_ok=yes
4527else
4528  echo "$as_me: failed program was:" >&5
4529cat "conftest.$ac_ext" >&5
4530cf_XOPEN_SOURCE_set_ok=no
4531fi
4532rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4533		if test "$cf_XOPEN_SOURCE_set_ok" = no
4534		then
4535			{ echo "$as_me:4535: WARNING: _XOPEN_SOURCE is lower than requested" >&5
4536echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
4537		fi
4538	else
4539
4540echo "$as_me:4540: checking if we should define _XOPEN_SOURCE" >&5
4541echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
4542if test "${cf_cv_xopen_source+set}" = set; then
4543  echo $ECHO_N "(cached) $ECHO_C" >&6
4544else
4545
4546	cat >"conftest.$ac_ext" <<_ACEOF
4547#line 4547 "configure"
4548#include "confdefs.h"
4549
4550#include <stdlib.h>
4551#include <string.h>
4552#include <sys/types.h>
4553
4554int
4555main (void)
4556{
4557
4558#ifndef _XOPEN_SOURCE
4559make an error
4560#endif
4561  ;
4562  return 0;
4563}
4564_ACEOF
4565rm -f "conftest.$ac_objext"
4566if { (eval echo "$as_me:4566: \"$ac_compile\"") >&5
4567  (eval $ac_compile) 2>&5
4568  ac_status=$?
4569  echo "$as_me:4569: \$? = $ac_status" >&5
4570  (exit "$ac_status"); } &&
4571         { ac_try='test -s "conftest.$ac_objext"'
4572  { (eval echo "$as_me:4572: \"$ac_try\"") >&5
4573  (eval $ac_try) 2>&5
4574  ac_status=$?
4575  echo "$as_me:4575: \$? = $ac_status" >&5
4576  (exit "$ac_status"); }; }; then
4577  cf_cv_xopen_source=no
4578else
4579  echo "$as_me: failed program was:" >&5
4580cat "conftest.$ac_ext" >&5
4581cf_save="$CPPFLAGS"
4582
4583	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4584	CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
4585
4586	 cat >"conftest.$ac_ext" <<_ACEOF
4587#line 4587 "configure"
4588#include "confdefs.h"
4589
4590#include <stdlib.h>
4591#include <string.h>
4592#include <sys/types.h>
4593
4594int
4595main (void)
4596{
4597
4598#ifdef _XOPEN_SOURCE
4599make an error
4600#endif
4601  ;
4602  return 0;
4603}
4604_ACEOF
4605rm -f "conftest.$ac_objext"
4606if { (eval echo "$as_me:4606: \"$ac_compile\"") >&5
4607  (eval $ac_compile) 2>&5
4608  ac_status=$?
4609  echo "$as_me:4609: \$? = $ac_status" >&5
4610  (exit "$ac_status"); } &&
4611         { ac_try='test -s "conftest.$ac_objext"'
4612  { (eval echo "$as_me:4612: \"$ac_try\"") >&5
4613  (eval $ac_try) 2>&5
4614  ac_status=$?
4615  echo "$as_me:4615: \$? = $ac_status" >&5
4616  (exit "$ac_status"); }; }; then
4617  cf_cv_xopen_source=no
4618else
4619  echo "$as_me: failed program was:" >&5
4620cat "conftest.$ac_ext" >&5
4621cf_cv_xopen_source=$cf_XOPEN_SOURCE
4622fi
4623rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4624	CPPFLAGS="$cf_save"
4625
4626fi
4627rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4628
4629fi
4630echo "$as_me:4630: result: $cf_cv_xopen_source" >&5
4631echo "${ECHO_T}$cf_cv_xopen_source" >&6
4632
4633if test "$cf_cv_xopen_source" != no ; then
4634
4635CFLAGS=`echo "$CFLAGS" | \
4636	sed	-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
4637		-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?$//g'`
4638
4639CPPFLAGS=`echo "$CPPFLAGS" | \
4640	sed	-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
4641		-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?$//g'`
4642
4643	cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
4644
4645cf_fix_cppflags=no
4646cf_new_cflags=
4647cf_new_cppflags=
4648cf_new_extra_cppflags=
4649
4650for cf_add_cflags in $cf_temp_xopen_source
4651do
4652case "$cf_fix_cppflags" in
4653(no)
4654	case "$cf_add_cflags" in
4655	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4656		case "$cf_add_cflags" in
4657		(-D*)
4658			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4659
4660			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4661				&& test -z "${cf_tst_cflags}" \
4662				&& cf_fix_cppflags=yes
4663
4664			if test "$cf_fix_cppflags" = yes ; then
4665
4666	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4667	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4668
4669				continue
4670			elif test "${cf_tst_cflags}" = "\"'" ; then
4671
4672	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4673	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4674
4675				continue
4676			fi
4677			;;
4678		esac
4679		case "$CPPFLAGS" in
4680		(*$cf_add_cflags)
4681			;;
4682		(*)
4683			case "$cf_add_cflags" in
4684			(-D*)
4685				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4686
4687CPPFLAGS=`echo "$CPPFLAGS" | \
4688	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
4689		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
4690
4691				;;
4692			esac
4693
4694	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4695	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4696
4697			;;
4698		esac
4699		;;
4700	(*)
4701
4702	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4703	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4704
4705		;;
4706	esac
4707	;;
4708(yes)
4709
4710	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4711	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4712
4713	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
4714
4715	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4716		&& test -z "${cf_tst_cflags}" \
4717		&& cf_fix_cppflags=no
4718	;;
4719esac
4720done
4721
4722if test -n "$cf_new_cflags" ; then
4723
4724	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4725	CFLAGS="${CFLAGS}$cf_new_cflags"
4726
4727fi
4728
4729if test -n "$cf_new_cppflags" ; then
4730
4731	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4732	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4733
4734fi
4735
4736if test -n "$cf_new_extra_cppflags" ; then
4737
4738	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4739	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4740
4741fi
4742
4743fi
4744
4745	fi
4746fi
4747fi # cf_cv_posix_visible
4748
4749echo "$as_me:4749: checking if SIGWINCH is defined" >&5
4750echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
4751if test "${cf_cv_define_sigwinch+set}" = set; then
4752  echo $ECHO_N "(cached) $ECHO_C" >&6
4753else
4754
4755	cat >"conftest.$ac_ext" <<_ACEOF
4756#line 4756 "configure"
4757#include "confdefs.h"
4758
4759#include <sys/types.h>
4760#include <sys/signal.h>
4761
4762int
4763main (void)
4764{
4765int x = SIGWINCH; (void)x
4766  ;
4767  return 0;
4768}
4769_ACEOF
4770rm -f "conftest.$ac_objext"
4771if { (eval echo "$as_me:4771: \"$ac_compile\"") >&5
4772  (eval $ac_compile) 2>&5
4773  ac_status=$?
4774  echo "$as_me:4774: \$? = $ac_status" >&5
4775  (exit "$ac_status"); } &&
4776         { ac_try='test -s "conftest.$ac_objext"'
4777  { (eval echo "$as_me:4777: \"$ac_try\"") >&5
4778  (eval $ac_try) 2>&5
4779  ac_status=$?
4780  echo "$as_me:4780: \$? = $ac_status" >&5
4781  (exit "$ac_status"); }; }; then
4782  cf_cv_define_sigwinch=yes
4783else
4784  echo "$as_me: failed program was:" >&5
4785cat "conftest.$ac_ext" >&5
4786cat >"conftest.$ac_ext" <<_ACEOF
4787#line 4787 "configure"
4788#include "confdefs.h"
4789
4790#undef _XOPEN_SOURCE
4791#undef _POSIX_SOURCE
4792#undef _POSIX_C_SOURCE
4793#include <sys/types.h>
4794#include <sys/signal.h>
4795
4796int
4797main (void)
4798{
4799int x = SIGWINCH; (void)x
4800  ;
4801  return 0;
4802}
4803_ACEOF
4804rm -f "conftest.$ac_objext"
4805if { (eval echo "$as_me:4805: \"$ac_compile\"") >&5
4806  (eval $ac_compile) 2>&5
4807  ac_status=$?
4808  echo "$as_me:4808: \$? = $ac_status" >&5
4809  (exit "$ac_status"); } &&
4810         { ac_try='test -s "conftest.$ac_objext"'
4811  { (eval echo "$as_me:4811: \"$ac_try\"") >&5
4812  (eval $ac_try) 2>&5
4813  ac_status=$?
4814  echo "$as_me:4814: \$? = $ac_status" >&5
4815  (exit "$ac_status"); }; }; then
4816  cf_cv_define_sigwinch=maybe
4817else
4818  echo "$as_me: failed program was:" >&5
4819cat "conftest.$ac_ext" >&5
4820cf_cv_define_sigwinch=no
4821fi
4822rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4823
4824fi
4825rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4826
4827fi
4828echo "$as_me:4828: result: $cf_cv_define_sigwinch" >&5
4829echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
4830
4831if test "$cf_cv_define_sigwinch" = maybe ; then
4832echo "$as_me:4832: checking for actual SIGWINCH definition" >&5
4833echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
4834if test "${cf_cv_fixup_sigwinch+set}" = set; then
4835  echo $ECHO_N "(cached) $ECHO_C" >&6
4836else
4837
4838cf_cv_fixup_sigwinch=unknown
4839cf_sigwinch=32
4840while test "$cf_sigwinch" != 1
4841do
4842	cat >"conftest.$ac_ext" <<_ACEOF
4843#line 4843 "configure"
4844#include "confdefs.h"
4845
4846#undef _XOPEN_SOURCE
4847#undef _POSIX_SOURCE
4848#undef _POSIX_C_SOURCE
4849#include <sys/types.h>
4850#include <sys/signal.h>
4851
4852int
4853main (void)
4854{
4855
4856#if SIGWINCH != $cf_sigwinch
4857make an error
4858#endif
4859int x = SIGWINCH; (void)x
4860  ;
4861  return 0;
4862}
4863_ACEOF
4864rm -f "conftest.$ac_objext"
4865if { (eval echo "$as_me:4865: \"$ac_compile\"") >&5
4866  (eval $ac_compile) 2>&5
4867  ac_status=$?
4868  echo "$as_me:4868: \$? = $ac_status" >&5
4869  (exit "$ac_status"); } &&
4870         { ac_try='test -s "conftest.$ac_objext"'
4871  { (eval echo "$as_me:4871: \"$ac_try\"") >&5
4872  (eval $ac_try) 2>&5
4873  ac_status=$?
4874  echo "$as_me:4874: \$? = $ac_status" >&5
4875  (exit "$ac_status"); }; }; then
4876  cf_cv_fixup_sigwinch=$cf_sigwinch
4877	 break
4878else
4879  echo "$as_me: failed program was:" >&5
4880cat "conftest.$ac_ext" >&5
4881fi
4882rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4883
4884cf_sigwinch="`expr "$cf_sigwinch" - 1`"
4885done
4886
4887fi
4888echo "$as_me:4888: result: $cf_cv_fixup_sigwinch" >&5
4889echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
4890
4891	if test "$cf_cv_fixup_sigwinch" != unknown ; then
4892		CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
4893	fi
4894fi
4895
4896###	checks for header files
4897
4898for ac_header in \
4899ncurses/curses.h \
4900ncurses/term.h \
4901stdlib.h \
4902sys/ptem.h sys/ttydefaults.h \
4903term.h \
4904termios.h \
4905unistd.h \
4906wchar.h \
4907
4908do
4909as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4910echo "$as_me:4910: checking for $ac_header" >&5
4911echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4912if eval "test \"\${$as_ac_Header+set}\" = set"; then
4913  echo $ECHO_N "(cached) $ECHO_C" >&6
4914else
4915  cat >"conftest.$ac_ext" <<_ACEOF
4916#line 4916 "configure"
4917#include "confdefs.h"
4918#include <$ac_header>
4919_ACEOF
4920if { (eval echo "$as_me:4920: \"$ac_cpp "conftest.$ac_ext"\"") >&5
4921  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
4922  ac_status=$?
4923  $EGREP -v '^ *\+' conftest.er1 >conftest.err
4924  rm -f conftest.er1
4925  cat conftest.err >&5
4926  echo "$as_me:4926: \$? = $ac_status" >&5
4927  (exit "$ac_status"); } >/dev/null; then
4928  if test -s conftest.err; then
4929    ac_cpp_err=$ac_c_preproc_warn_flag
4930  else
4931    ac_cpp_err=
4932  fi
4933else
4934  ac_cpp_err=yes
4935fi
4936if test -z "$ac_cpp_err"; then
4937  eval "$as_ac_Header=yes"
4938else
4939  echo "$as_me: failed program was:" >&5
4940  cat "conftest.$ac_ext" >&5
4941  eval "$as_ac_Header=no"
4942fi
4943rm -f conftest.err "conftest.$ac_ext"
4944fi
4945echo "$as_me:4945: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
4946echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
4947if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
4948  cat >>confdefs.h <<EOF
4949#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4950EOF
4951
4952fi
4953done
4954
4955echo "$as_me:4955: checking whether time.h and sys/time.h may both be included" >&5
4956echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
4957if test "${ac_cv_header_time+set}" = set; then
4958  echo $ECHO_N "(cached) $ECHO_C" >&6
4959else
4960  cat >"conftest.$ac_ext" <<_ACEOF
4961#line 4961 "configure"
4962#include "confdefs.h"
4963#include <sys/types.h>
4964#include <sys/time.h>
4965#include <time.h>
4966
4967int
4968main (void)
4969{
4970if ((struct tm *) 0)
4971return 0;
4972  ;
4973  return 0;
4974}
4975_ACEOF
4976rm -f "conftest.$ac_objext"
4977if { (eval echo "$as_me:4977: \"$ac_compile\"") >&5
4978  (eval $ac_compile) 2>&5
4979  ac_status=$?
4980  echo "$as_me:4980: \$? = $ac_status" >&5
4981  (exit "$ac_status"); } &&
4982         { ac_try='test -s "conftest.$ac_objext"'
4983  { (eval echo "$as_me:4983: \"$ac_try\"") >&5
4984  (eval $ac_try) 2>&5
4985  ac_status=$?
4986  echo "$as_me:4986: \$? = $ac_status" >&5
4987  (exit "$ac_status"); }; }; then
4988  ac_cv_header_time=yes
4989else
4990  echo "$as_me: failed program was:" >&5
4991cat "conftest.$ac_ext" >&5
4992ac_cv_header_time=no
4993fi
4994rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4995fi
4996echo "$as_me:4996: result: $ac_cv_header_time" >&5
4997echo "${ECHO_T}$ac_cv_header_time" >&6
4998if test $ac_cv_header_time = yes; then
4999
5000cat >>confdefs.h <<\EOF
5001#define TIME_WITH_SYS_TIME 1
5002EOF
5003
5004fi
5005
5006echo "$as_me:5006: checking for nl_langinfo and CODESET" >&5
5007echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
5008if test "${am_cv_langinfo_codeset+set}" = set; then
5009  echo $ECHO_N "(cached) $ECHO_C" >&6
5010else
5011  cat >"conftest.$ac_ext" <<_ACEOF
5012#line 5012 "configure"
5013#include "confdefs.h"
5014#include <langinfo.h>
5015int
5016main (void)
5017{
5018char* cs = nl_langinfo(CODESET); (void)cs
5019  ;
5020  return 0;
5021}
5022_ACEOF
5023rm -f "conftest.$ac_objext" "conftest$ac_exeext"
5024if { (eval echo "$as_me:5024: \"$ac_link\"") >&5
5025  (eval $ac_link) 2>&5
5026  ac_status=$?
5027  echo "$as_me:5027: \$? = $ac_status" >&5
5028  (exit "$ac_status"); } &&
5029         { ac_try='test -s "conftest$ac_exeext"'
5030  { (eval echo "$as_me:5030: \"$ac_try\"") >&5
5031  (eval $ac_try) 2>&5
5032  ac_status=$?
5033  echo "$as_me:5033: \$? = $ac_status" >&5
5034  (exit "$ac_status"); }; }; then
5035  am_cv_langinfo_codeset=yes
5036else
5037  echo "$as_me: failed program was:" >&5
5038cat "conftest.$ac_ext" >&5
5039am_cv_langinfo_codeset=no
5040fi
5041rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
5042
5043fi
5044echo "$as_me:5044: result: $am_cv_langinfo_codeset" >&5
5045echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
5046	if test "$am_cv_langinfo_codeset" = yes; then
5047
5048cat >>confdefs.h <<\EOF
5049#define HAVE_LANGINFO_CODESET 1
5050EOF
5051
5052	fi
5053
5054###	checks for typedefs
5055
5056echo "$as_me:5056: checking for signal global datatype" >&5
5057echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
5058if test "${cf_cv_sig_atomic_t+set}" = set; then
5059  echo $ECHO_N "(cached) $ECHO_C" >&6
5060else
5061
5062	for cf_type in \
5063		"volatile sig_atomic_t" \
5064		"sig_atomic_t" \
5065		"int"
5066	do
5067	cat >"conftest.$ac_ext" <<_ACEOF
5068#line 5068 "configure"
5069#include "confdefs.h"
5070
5071#include <sys/types.h>
5072#include <signal.h>
5073#include <stdio.h>
5074
5075extern $cf_type x;
5076$cf_type x;
5077static void handler(int sig)
5078{
5079	(void)sig;
5080	x = 5;
5081}
5082int
5083main (void)
5084{
5085signal(SIGINT, handler);
5086		 x = 1
5087  ;
5088  return 0;
5089}
5090_ACEOF
5091rm -f "conftest.$ac_objext"
5092if { (eval echo "$as_me:5092: \"$ac_compile\"") >&5
5093  (eval $ac_compile) 2>&5
5094  ac_status=$?
5095  echo "$as_me:5095: \$? = $ac_status" >&5
5096  (exit "$ac_status"); } &&
5097         { ac_try='test -s "conftest.$ac_objext"'
5098  { (eval echo "$as_me:5098: \"$ac_try\"") >&5
5099  (eval $ac_try) 2>&5
5100  ac_status=$?
5101  echo "$as_me:5101: \$? = $ac_status" >&5
5102  (exit "$ac_status"); }; }; then
5103  cf_cv_sig_atomic_t=$cf_type
5104else
5105  echo "$as_me: failed program was:" >&5
5106cat "conftest.$ac_ext" >&5
5107cf_cv_sig_atomic_t=no
5108fi
5109rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5110		test "$cf_cv_sig_atomic_t" != no && break
5111	done
5112
5113fi
5114
5115echo "$as_me:5115: result: $cf_cv_sig_atomic_t" >&5
5116echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
5117test "$cf_cv_sig_atomic_t" != no &&
5118cat >>confdefs.h <<EOF
5119#define SIG_ATOMIC_T $cf_cv_sig_atomic_t
5120EOF
5121
5122echo "$as_me:5122: checking for ANSI C header files" >&5
5123echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
5124if test "${ac_cv_header_stdc+set}" = set; then
5125  echo $ECHO_N "(cached) $ECHO_C" >&6
5126else
5127  cat >"conftest.$ac_ext" <<_ACEOF
5128#line 5128 "configure"
5129#include "confdefs.h"
5130#include <stdlib.h>
5131#include <stdarg.h>
5132#include <string.h>
5133#include <float.h>
5134
5135_ACEOF
5136if { (eval echo "$as_me:5136: \"$ac_cpp "conftest.$ac_ext"\"") >&5
5137  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
5138  ac_status=$?
5139  $EGREP -v '^ *\+' conftest.er1 >conftest.err
5140  rm -f conftest.er1
5141  cat conftest.err >&5
5142  echo "$as_me:5142: \$? = $ac_status" >&5
5143  (exit "$ac_status"); } >/dev/null; then
5144  if test -s conftest.err; then
5145    ac_cpp_err=$ac_c_preproc_warn_flag
5146  else
5147    ac_cpp_err=
5148  fi
5149else
5150  ac_cpp_err=yes
5151fi
5152if test -z "$ac_cpp_err"; then
5153  ac_cv_header_stdc=yes
5154else
5155  echo "$as_me: failed program was:" >&5
5156  cat "conftest.$ac_ext" >&5
5157  ac_cv_header_stdc=no
5158fi
5159rm -f conftest.err "conftest.$ac_ext"
5160
5161if test $ac_cv_header_stdc = yes; then
5162  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5163  cat >"conftest.$ac_ext" <<_ACEOF
5164#line 5164 "configure"
5165#include "confdefs.h"
5166#include <string.h>
5167
5168_ACEOF
5169if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5170  $EGREP "memchr" >/dev/null 2>&1; then
5171  :
5172else
5173  ac_cv_header_stdc=no
5174fi
5175rm -rf conftest*
5176
5177fi
5178
5179if test $ac_cv_header_stdc = yes; then
5180  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5181  cat >"conftest.$ac_ext" <<_ACEOF
5182#line 5182 "configure"
5183#include "confdefs.h"
5184#include <stdlib.h>
5185
5186_ACEOF
5187if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5188  $EGREP "free" >/dev/null 2>&1; then
5189  :
5190else
5191  ac_cv_header_stdc=no
5192fi
5193rm -rf conftest*
5194
5195fi
5196
5197if test $ac_cv_header_stdc = yes; then
5198  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5199  if test "$cross_compiling" = yes; then
5200  :
5201else
5202  cat >"conftest.$ac_ext" <<_ACEOF
5203#line 5203 "configure"
5204#include "confdefs.h"
5205#include <ctype.h>
5206#if ((' ' & 0x0FF) == 0x020)
5207# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5208# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5209#else
5210# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
5211                     || ('j' <= (c) && (c) <= 'r') \
5212                     || ('s' <= (c) && (c) <= 'z'))
5213# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5214#endif
5215
5216#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5217int
5218main (void)
5219{
5220  int i;
5221  for (i = 0; i < 256; i++)
5222    if (XOR (islower (i), ISLOWER (i))
5223        || toupper (i) != TOUPPER (i))
5224      $ac_main_return(2);
5225  $ac_main_return (0);
5226}
5227_ACEOF
5228rm -f "conftest$ac_exeext"
5229if { (eval echo "$as_me:5229: \"$ac_link\"") >&5
5230  (eval $ac_link) 2>&5
5231  ac_status=$?
5232  echo "$as_me:5232: \$? = $ac_status" >&5
5233  (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
5234  { (eval echo "$as_me:5234: \"$ac_try\"") >&5
5235  (eval $ac_try) 2>&5
5236  ac_status=$?
5237  echo "$as_me:5237: \$? = $ac_status" >&5
5238  (exit "$ac_status"); }; }; then
5239  :
5240else
5241  echo "$as_me: program exited with status $ac_status" >&5
5242echo "$as_me: failed program was:" >&5
5243cat "conftest.$ac_ext" >&5
5244ac_cv_header_stdc=no
5245fi
5246rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
5247fi
5248fi
5249fi
5250echo "$as_me:5250: result: $ac_cv_header_stdc" >&5
5251echo "${ECHO_T}$ac_cv_header_stdc" >&6
5252if test $ac_cv_header_stdc = yes; then
5253
5254cat >>confdefs.h <<\EOF
5255#define STDC_HEADERS 1
5256EOF
5257
5258fi
5259
5260# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5261
5262for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5263                  inttypes.h stdint.h unistd.h
5264do
5265as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5266echo "$as_me:5266: checking for $ac_header" >&5
5267echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5268if eval "test \"\${$as_ac_Header+set}\" = set"; then
5269  echo $ECHO_N "(cached) $ECHO_C" >&6
5270else
5271  cat >"conftest.$ac_ext" <<_ACEOF
5272#line 5272 "configure"
5273#include "confdefs.h"
5274$ac_includes_default
5275#include <$ac_header>
5276_ACEOF
5277rm -f "conftest.$ac_objext"
5278if { (eval echo "$as_me:5278: \"$ac_compile\"") >&5
5279  (eval $ac_compile) 2>&5
5280  ac_status=$?
5281  echo "$as_me:5281: \$? = $ac_status" >&5
5282  (exit "$ac_status"); } &&
5283         { ac_try='test -s "conftest.$ac_objext"'
5284  { (eval echo "$as_me:5284: \"$ac_try\"") >&5
5285  (eval $ac_try) 2>&5
5286  ac_status=$?
5287  echo "$as_me:5287: \$? = $ac_status" >&5
5288  (exit "$ac_status"); }; }; then
5289  eval "$as_ac_Header=yes"
5290else
5291  echo "$as_me: failed program was:" >&5
5292cat "conftest.$ac_ext" >&5
5293eval "$as_ac_Header=no"
5294fi
5295rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5296fi
5297echo "$as_me:5297: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
5298echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
5299if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
5300  cat >>confdefs.h <<EOF
5301#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5302EOF
5303
5304fi
5305done
5306
5307echo "$as_me:5307: checking for time_t" >&5
5308echo $ECHO_N "checking for time_t... $ECHO_C" >&6
5309if test "${ac_cv_type_time_t+set}" = set; then
5310  echo $ECHO_N "(cached) $ECHO_C" >&6
5311else
5312  cat >"conftest.$ac_ext" <<_ACEOF
5313#line 5313 "configure"
5314#include "confdefs.h"
5315$ac_includes_default
5316int
5317main (void)
5318{
5319if ((time_t *) 0)
5320  return 0;
5321if (sizeof (time_t))
5322  return 0;
5323  ;
5324  return 0;
5325}
5326_ACEOF
5327rm -f "conftest.$ac_objext"
5328if { (eval echo "$as_me:5328: \"$ac_compile\"") >&5
5329  (eval $ac_compile) 2>&5
5330  ac_status=$?
5331  echo "$as_me:5331: \$? = $ac_status" >&5
5332  (exit "$ac_status"); } &&
5333         { ac_try='test -s "conftest.$ac_objext"'
5334  { (eval echo "$as_me:5334: \"$ac_try\"") >&5
5335  (eval $ac_try) 2>&5
5336  ac_status=$?
5337  echo "$as_me:5337: \$? = $ac_status" >&5
5338  (exit "$ac_status"); }; }; then
5339  ac_cv_type_time_t=yes
5340else
5341  echo "$as_me: failed program was:" >&5
5342cat "conftest.$ac_ext" >&5
5343ac_cv_type_time_t=no
5344fi
5345rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5346fi
5347echo "$as_me:5347: result: $ac_cv_type_time_t" >&5
5348echo "${ECHO_T}$ac_cv_type_time_t" >&6
5349if test "$ac_cv_type_time_t" = yes; then
5350  :
5351else
5352
5353cat >>confdefs.h <<EOF
5354#define time_t long
5355EOF
5356
5357fi
5358
5359echo "$as_me:5359: checking for cc_t in <termios.h> or <termio.h>" >&5
5360echo $ECHO_N "checking for cc_t in <termios.h> or <termio.h>... $ECHO_C" >&6
5361if test "${cf_cv_type_cc_t+set}" = set; then
5362  echo $ECHO_N "(cached) $ECHO_C" >&6
5363else
5364
5365	cat >"conftest.$ac_ext" <<_ACEOF
5366#line 5366 "configure"
5367#include "confdefs.h"
5368
5369#include <sys/types.h>
5370#if defined(HAVE_TERMIOS_H)
5371#include <termios.h>
5372#else
5373#include <termio.h>
5374#include <sys/ioctl.h>
5375#endif
5376
5377int
5378main (void)
5379{
5380cc_t x; (void)x
5381  ;
5382  return 0;
5383}
5384_ACEOF
5385rm -f "conftest.$ac_objext"
5386if { (eval echo "$as_me:5386: \"$ac_compile\"") >&5
5387  (eval $ac_compile) 2>&5
5388  ac_status=$?
5389  echo "$as_me:5389: \$? = $ac_status" >&5
5390  (exit "$ac_status"); } &&
5391         { ac_try='test -s "conftest.$ac_objext"'
5392  { (eval echo "$as_me:5392: \"$ac_try\"") >&5
5393  (eval $ac_try) 2>&5
5394  ac_status=$?
5395  echo "$as_me:5395: \$? = $ac_status" >&5
5396  (exit "$ac_status"); }; }; then
5397  cf_cv_type_cc_t=yes
5398else
5399  echo "$as_me: failed program was:" >&5
5400cat "conftest.$ac_ext" >&5
5401cf_cv_type_cc_t=no
5402fi
5403rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5404
5405fi
5406
5407echo "$as_me:5407: result: $cf_cv_type_cc_t" >&5
5408echo "${ECHO_T}$cf_cv_type_cc_t" >&6
5409test $cf_cv_type_cc_t = no &&
5410cat >>confdefs.h <<\EOF
5411#define cc_t unsigned char
5412EOF
5413
5414echo "$as_me:5414: checking for mode_t" >&5
5415echo $ECHO_N "checking for mode_t... $ECHO_C" >&6
5416if test "${ac_cv_type_mode_t+set}" = set; then
5417  echo $ECHO_N "(cached) $ECHO_C" >&6
5418else
5419  cat >"conftest.$ac_ext" <<_ACEOF
5420#line 5420 "configure"
5421#include "confdefs.h"
5422$ac_includes_default
5423int
5424main (void)
5425{
5426if ((mode_t *) 0)
5427  return 0;
5428if (sizeof (mode_t))
5429  return 0;
5430  ;
5431  return 0;
5432}
5433_ACEOF
5434rm -f "conftest.$ac_objext"
5435if { (eval echo "$as_me:5435: \"$ac_compile\"") >&5
5436  (eval $ac_compile) 2>&5
5437  ac_status=$?
5438  echo "$as_me:5438: \$? = $ac_status" >&5
5439  (exit "$ac_status"); } &&
5440         { ac_try='test -s "conftest.$ac_objext"'
5441  { (eval echo "$as_me:5441: \"$ac_try\"") >&5
5442  (eval $ac_try) 2>&5
5443  ac_status=$?
5444  echo "$as_me:5444: \$? = $ac_status" >&5
5445  (exit "$ac_status"); }; }; then
5446  ac_cv_type_mode_t=yes
5447else
5448  echo "$as_me: failed program was:" >&5
5449cat "conftest.$ac_ext" >&5
5450ac_cv_type_mode_t=no
5451fi
5452rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5453fi
5454echo "$as_me:5454: result: $ac_cv_type_mode_t" >&5
5455echo "${ECHO_T}$ac_cv_type_mode_t" >&6
5456if test "$ac_cv_type_mode_t" = yes; then
5457  :
5458else
5459
5460cat >>confdefs.h <<EOF
5461#define mode_t int
5462EOF
5463
5464fi
5465
5466echo "$as_me:5466: checking for pid_t" >&5
5467echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
5468if test "${ac_cv_type_pid_t+set}" = set; then
5469  echo $ECHO_N "(cached) $ECHO_C" >&6
5470else
5471  cat >"conftest.$ac_ext" <<_ACEOF
5472#line 5472 "configure"
5473#include "confdefs.h"
5474$ac_includes_default
5475int
5476main (void)
5477{
5478if ((pid_t *) 0)
5479  return 0;
5480if (sizeof (pid_t))
5481  return 0;
5482  ;
5483  return 0;
5484}
5485_ACEOF
5486rm -f "conftest.$ac_objext"
5487if { (eval echo "$as_me:5487: \"$ac_compile\"") >&5
5488  (eval $ac_compile) 2>&5
5489  ac_status=$?
5490  echo "$as_me:5490: \$? = $ac_status" >&5
5491  (exit "$ac_status"); } &&
5492         { ac_try='test -s "conftest.$ac_objext"'
5493  { (eval echo "$as_me:5493: \"$ac_try\"") >&5
5494  (eval $ac_try) 2>&5
5495  ac_status=$?
5496  echo "$as_me:5496: \$? = $ac_status" >&5
5497  (exit "$ac_status"); }; }; then
5498  ac_cv_type_pid_t=yes
5499else
5500  echo "$as_me: failed program was:" >&5
5501cat "conftest.$ac_ext" >&5
5502ac_cv_type_pid_t=no
5503fi
5504rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5505fi
5506echo "$as_me:5506: result: $ac_cv_type_pid_t" >&5
5507echo "${ECHO_T}$ac_cv_type_pid_t" >&6
5508if test "$ac_cv_type_pid_t" = yes; then
5509  :
5510else
5511
5512cat >>confdefs.h <<EOF
5513#define pid_t int
5514EOF
5515
5516fi
5517
5518echo "$as_me:5518: checking for uid_t in sys/types.h" >&5
5519echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
5520if test "${ac_cv_type_uid_t+set}" = set; then
5521  echo $ECHO_N "(cached) $ECHO_C" >&6
5522else
5523  cat >"conftest.$ac_ext" <<_ACEOF
5524#line 5524 "configure"
5525#include "confdefs.h"
5526#include <sys/types.h>
5527
5528_ACEOF
5529if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5530  $EGREP "uid_t" >/dev/null 2>&1; then
5531  ac_cv_type_uid_t=yes
5532else
5533  ac_cv_type_uid_t=no
5534fi
5535rm -rf conftest*
5536
5537fi
5538echo "$as_me:5538: result: $ac_cv_type_uid_t" >&5
5539echo "${ECHO_T}$ac_cv_type_uid_t" >&6
5540if test $ac_cv_type_uid_t = no; then
5541
5542cat >>confdefs.h <<\EOF
5543#define uid_t int
5544EOF
5545
5546cat >>confdefs.h <<\EOF
5547#define gid_t int
5548EOF
5549
5550fi
5551
5552echo "$as_me:5552: checking for off_t" >&5
5553echo $ECHO_N "checking for off_t... $ECHO_C" >&6
5554if test "${ac_cv_type_off_t+set}" = set; then
5555  echo $ECHO_N "(cached) $ECHO_C" >&6
5556else
5557  cat >"conftest.$ac_ext" <<_ACEOF
5558#line 5558 "configure"
5559#include "confdefs.h"
5560$ac_includes_default
5561int
5562main (void)
5563{
5564if ((off_t *) 0)
5565  return 0;
5566if (sizeof (off_t))
5567  return 0;
5568  ;
5569  return 0;
5570}
5571_ACEOF
5572rm -f "conftest.$ac_objext"
5573if { (eval echo "$as_me:5573: \"$ac_compile\"") >&5
5574  (eval $ac_compile) 2>&5
5575  ac_status=$?
5576  echo "$as_me:5576: \$? = $ac_status" >&5
5577  (exit "$ac_status"); } &&
5578         { ac_try='test -s "conftest.$ac_objext"'
5579  { (eval echo "$as_me:5579: \"$ac_try\"") >&5
5580  (eval $ac_try) 2>&5
5581  ac_status=$?
5582  echo "$as_me:5582: \$? = $ac_status" >&5
5583  (exit "$ac_status"); }; }; then
5584  ac_cv_type_off_t=yes
5585else
5586  echo "$as_me: failed program was:" >&5
5587cat "conftest.$ac_ext" >&5
5588ac_cv_type_off_t=no
5589fi
5590rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5591fi
5592echo "$as_me:5592: result: $ac_cv_type_off_t" >&5
5593echo "${ECHO_T}$ac_cv_type_off_t" >&6
5594if test "$ac_cv_type_off_t" = yes; then
5595  :
5596else
5597
5598cat >>confdefs.h <<EOF
5599#define off_t long
5600EOF
5601
5602fi
5603
5604###	checks for library functions
5605
5606for ac_func in \
5607	gethostname \
5608	getusershell \
5609	endusershell \
5610	getlogin \
5611	initgroups \
5612	mkdtemp \
5613	putenv \
5614	unsetenv \
5615	sched_yield \
5616	setpgid \
5617	strftime \
5618	tcgetattr \
5619	waitpid \
5620	wcswidth \
5621	wcwidth
5622do
5623as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
5624echo "$as_me:5624: checking for $ac_func" >&5
5625echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
5626if eval "test \"\${$as_ac_var+set}\" = set"; then
5627  echo $ECHO_N "(cached) $ECHO_C" >&6
5628else
5629  cat >"conftest.$ac_ext" <<_ACEOF
5630#line 5630 "configure"
5631#include "confdefs.h"
5632#define $ac_func autoconf_temporary
5633#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
5634#undef $ac_func
5635
5636#ifdef __cplusplus
5637extern "C"
5638#endif
5639
5640/* We use char because int might match the return type of a gcc2
5641   builtin and then its argument prototype would still apply.  */
5642char $ac_func (void);
5643
5644int
5645main (void)
5646{
5647
5648/* The GNU C library defines stubs for functions which it implements
5649    to always fail with ENOSYS.  Some functions are actually named
5650    something starting with __ and the normal name is an alias.  */
5651#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5652#error found stub for $ac_func
5653#endif
5654
5655	return $ac_func ();
5656  ;
5657  return 0;
5658}
5659_ACEOF
5660rm -f "conftest.$ac_objext" "conftest$ac_exeext"
5661if { (eval echo "$as_me:5661: \"$ac_link\"") >&5
5662  (eval $ac_link) 2>&5
5663  ac_status=$?
5664  echo "$as_me:5664: \$? = $ac_status" >&5
5665  (exit "$ac_status"); } &&
5666         { ac_try='test -s "conftest$ac_exeext"'
5667  { (eval echo "$as_me:5667: \"$ac_try\"") >&5
5668  (eval $ac_try) 2>&5
5669  ac_status=$?
5670  echo "$as_me:5670: \$? = $ac_status" >&5
5671  (exit "$ac_status"); }; }; then
5672  eval "$as_ac_var=yes"
5673else
5674  echo "$as_me: failed program was:" >&5
5675cat "conftest.$ac_ext" >&5
5676eval "$as_ac_var=no"
5677fi
5678rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
5679fi
5680echo "$as_me:5680: result: `eval echo '${'"$as_ac_var"'}'`" >&5
5681echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
5682if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
5683  cat >>confdefs.h <<EOF
5684#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
5685EOF
5686
5687fi
5688done
5689
5690for ac_header in lastlog.h paths.h
5691do
5692as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5693echo "$as_me:5693: checking for $ac_header" >&5
5694echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5695if eval "test \"\${$as_ac_Header+set}\" = set"; then
5696  echo $ECHO_N "(cached) $ECHO_C" >&6
5697else
5698  cat >"conftest.$ac_ext" <<_ACEOF
5699#line 5699 "configure"
5700#include "confdefs.h"
5701#include <$ac_header>
5702_ACEOF
5703if { (eval echo "$as_me:5703: \"$ac_cpp "conftest.$ac_ext"\"") >&5
5704  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
5705  ac_status=$?
5706  $EGREP -v '^ *\+' conftest.er1 >conftest.err
5707  rm -f conftest.er1
5708  cat conftest.err >&5
5709  echo "$as_me:5709: \$? = $ac_status" >&5
5710  (exit "$ac_status"); } >/dev/null; then
5711  if test -s conftest.err; then
5712    ac_cpp_err=$ac_c_preproc_warn_flag
5713  else
5714    ac_cpp_err=
5715  fi
5716else
5717  ac_cpp_err=yes
5718fi
5719if test -z "$ac_cpp_err"; then
5720  eval "$as_ac_Header=yes"
5721else
5722  echo "$as_me: failed program was:" >&5
5723  cat "conftest.$ac_ext" >&5
5724  eval "$as_ac_Header=no"
5725fi
5726rm -f conftest.err "conftest.$ac_ext"
5727fi
5728echo "$as_me:5728: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
5729echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
5730if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
5731  cat >>confdefs.h <<EOF
5732#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5733EOF
5734
5735fi
5736done
5737
5738echo "$as_me:5738: checking for lastlog path" >&5
5739echo $ECHO_N "checking for lastlog path... $ECHO_C" >&6
5740if test "${cf_cv_path_lastlog+set}" = set; then
5741  echo $ECHO_N "(cached) $ECHO_C" >&6
5742else
5743
5744cat >"conftest.$ac_ext" <<_ACEOF
5745#line 5745 "configure"
5746#include "confdefs.h"
5747
5748#include <sys/types.h>
5749#ifdef HAVE_LASTLOG_H
5750#include <lastlog.h>
5751#else
5752#ifdef HAVE_PATHS_H
5753#include <paths.h>
5754#endif
5755#endif
5756int
5757main (void)
5758{
5759char *path = _PATH_LASTLOG; (void)path
5760  ;
5761  return 0;
5762}
5763_ACEOF
5764rm -f "conftest.$ac_objext"
5765if { (eval echo "$as_me:5765: \"$ac_compile\"") >&5
5766  (eval $ac_compile) 2>&5
5767  ac_status=$?
5768  echo "$as_me:5768: \$? = $ac_status" >&5
5769  (exit "$ac_status"); } &&
5770         { ac_try='test -s "conftest.$ac_objext"'
5771  { (eval echo "$as_me:5771: \"$ac_try\"") >&5
5772  (eval $ac_try) 2>&5
5773  ac_status=$?
5774  echo "$as_me:5774: \$? = $ac_status" >&5
5775  (exit "$ac_status"); }; }; then
5776  cf_cv_path_lastlog="_PATH_LASTLOG"
5777else
5778  echo "$as_me: failed program was:" >&5
5779cat "conftest.$ac_ext" >&5
5780if test -f /usr/adm/lastlog ; then
5781	 	cf_cv_path_lastlog=/usr/adm/lastlog
5782	else
5783		cf_cv_path_lastlog=no
5784	fi
5785fi
5786rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5787
5788fi
5789echo "$as_me:5789: result: $cf_cv_path_lastlog" >&5
5790echo "${ECHO_T}$cf_cv_path_lastlog" >&6
5791test "$cf_cv_path_lastlog" != no &&
5792cat >>confdefs.h <<\EOF
5793#define USE_LASTLOG 1
5794EOF
5795
5796echo "$as_me:5796: checking for utmp implementation" >&5
5797echo $ECHO_N "checking for utmp implementation... $ECHO_C" >&6
5798if test "${cf_cv_have_utmp+set}" = set; then
5799  echo $ECHO_N "(cached) $ECHO_C" >&6
5800else
5801
5802	cf_cv_have_utmp=no
5803for cf_header in utmpx utmp ; do
5804cf_utmp_includes="
5805#include <sys/types.h>
5806#include <${cf_header}.h>
5807#define getutent getutxent
5808#ifdef USE_LASTLOG
5809#include <lastlog.h>	/* may conflict with utmpx.h on Linux */
5810#endif
5811"
5812	cat >"conftest.$ac_ext" <<_ACEOF
5813#line 5813 "configure"
5814#include "confdefs.h"
5815$cf_utmp_includes
5816int
5817main (void)
5818{
5819struct $cf_header x;
5820	 char *name = x.ut_name; /* utmp.h and compatible definitions */
5821	 (void)x;
5822	 (void)name;
5823
5824  ;
5825  return 0;
5826}
5827_ACEOF
5828rm -f "conftest.$ac_objext"
5829if { (eval echo "$as_me:5829: \"$ac_compile\"") >&5
5830  (eval $ac_compile) 2>&5
5831  ac_status=$?
5832  echo "$as_me:5832: \$? = $ac_status" >&5
5833  (exit "$ac_status"); } &&
5834         { ac_try='test -s "conftest.$ac_objext"'
5835  { (eval echo "$as_me:5835: \"$ac_try\"") >&5
5836  (eval $ac_try) 2>&5
5837  ac_status=$?
5838  echo "$as_me:5838: \$? = $ac_status" >&5
5839  (exit "$ac_status"); }; }; then
5840  cf_cv_have_utmp=$cf_header
5841	 break
5842else
5843  echo "$as_me: failed program was:" >&5
5844cat "conftest.$ac_ext" >&5
5845
5846	cat >"conftest.$ac_ext" <<_ACEOF
5847#line 5847 "configure"
5848#include "confdefs.h"
5849$cf_utmp_includes
5850int
5851main (void)
5852{
5853struct $cf_header x;
5854	 char *name = x.ut_user; /* utmpx.h must declare this */
5855	 (void)x;
5856	 (void)name;
5857
5858  ;
5859  return 0;
5860}
5861_ACEOF
5862rm -f "conftest.$ac_objext"
5863if { (eval echo "$as_me:5863: \"$ac_compile\"") >&5
5864  (eval $ac_compile) 2>&5
5865  ac_status=$?
5866  echo "$as_me:5866: \$? = $ac_status" >&5
5867  (exit "$ac_status"); } &&
5868         { ac_try='test -s "conftest.$ac_objext"'
5869  { (eval echo "$as_me:5869: \"$ac_try\"") >&5
5870  (eval $ac_try) 2>&5
5871  ac_status=$?
5872  echo "$as_me:5872: \$? = $ac_status" >&5
5873  (exit "$ac_status"); }; }; then
5874  cf_cv_have_utmp=$cf_header
5875	 break
5876
5877else
5878  echo "$as_me: failed program was:" >&5
5879cat "conftest.$ac_ext" >&5
5880fi
5881rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5882fi
5883rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5884done
5885
5886fi
5887echo "$as_me:5887: result: $cf_cv_have_utmp" >&5
5888echo "${ECHO_T}$cf_cv_have_utmp" >&6
5889
5890if test "$cf_cv_have_utmp" != no ; then
5891
5892cat >>confdefs.h <<\EOF
5893#define HAVE_UTMP 1
5894EOF
5895
5896	test "$cf_cv_have_utmp" = utmpx &&
5897cat >>confdefs.h <<\EOF
5898#define UTMPX_FOR_UTMP 1
5899EOF
5900
5901if test "$cf_cv_have_utmp" != no ; then
5902echo "$as_me:5902: checking if ${cf_cv_have_utmp}.ut_host is declared" >&5
5903echo $ECHO_N "checking if ${cf_cv_have_utmp}.ut_host is declared... $ECHO_C" >&6
5904if test "${cf_cv_have_utmp_ut_host+set}" = set; then
5905  echo $ECHO_N "(cached) $ECHO_C" >&6
5906else
5907
5908	cat >"conftest.$ac_ext" <<_ACEOF
5909#line 5909 "configure"
5910#include "confdefs.h"
5911
5912#include <sys/types.h>
5913#include <${cf_cv_have_utmp}.h>
5914int
5915main (void)
5916{
5917struct $cf_cv_have_utmp x;
5918	 char *y = &x.ut_host[0];
5919	 (void)x;
5920	 (void)y
5921  ;
5922  return 0;
5923}
5924_ACEOF
5925rm -f "conftest.$ac_objext"
5926if { (eval echo "$as_me:5926: \"$ac_compile\"") >&5
5927  (eval $ac_compile) 2>&5
5928  ac_status=$?
5929  echo "$as_me:5929: \$? = $ac_status" >&5
5930  (exit "$ac_status"); } &&
5931         { ac_try='test -s "conftest.$ac_objext"'
5932  { (eval echo "$as_me:5932: \"$ac_try\"") >&5
5933  (eval $ac_try) 2>&5
5934  ac_status=$?
5935  echo "$as_me:5935: \$? = $ac_status" >&5
5936  (exit "$ac_status"); }; }; then
5937  cf_cv_have_utmp_ut_host=yes
5938else
5939  echo "$as_me: failed program was:" >&5
5940cat "conftest.$ac_ext" >&5
5941cf_cv_have_utmp_ut_host=no
5942fi
5943rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5944
5945fi
5946
5947echo "$as_me:5947: result: $cf_cv_have_utmp_ut_host" >&5
5948echo "${ECHO_T}$cf_cv_have_utmp_ut_host" >&6
5949test "$cf_cv_have_utmp_ut_host" != no &&
5950cat >>confdefs.h <<\EOF
5951#define HAVE_UTMP_UT_HOST 1
5952EOF
5953
5954fi
5955
5956if test "$cf_cv_have_utmp" != no ; then
5957echo "$as_me:5957: checking if ${cf_cv_have_utmp}.ut_syslen is declared" >&5
5958echo $ECHO_N "checking if ${cf_cv_have_utmp}.ut_syslen is declared... $ECHO_C" >&6
5959if test "${cf_cv_have_utmp_ut_syslen+set}" = set; then
5960  echo $ECHO_N "(cached) $ECHO_C" >&6
5961else
5962
5963	cat >"conftest.$ac_ext" <<_ACEOF
5964#line 5964 "configure"
5965#include "confdefs.h"
5966
5967#include <sys/types.h>
5968#include <${cf_cv_have_utmp}.h>
5969int
5970main (void)
5971{
5972struct $cf_cv_have_utmp x;
5973	 int y = x.ut_syslen;
5974	 (void)x;
5975	 (void)y
5976  ;
5977  return 0;
5978}
5979_ACEOF
5980rm -f "conftest.$ac_objext"
5981if { (eval echo "$as_me:5981: \"$ac_compile\"") >&5
5982  (eval $ac_compile) 2>&5
5983  ac_status=$?
5984  echo "$as_me:5984: \$? = $ac_status" >&5
5985  (exit "$ac_status"); } &&
5986         { ac_try='test -s "conftest.$ac_objext"'
5987  { (eval echo "$as_me:5987: \"$ac_try\"") >&5
5988  (eval $ac_try) 2>&5
5989  ac_status=$?
5990  echo "$as_me:5990: \$? = $ac_status" >&5
5991  (exit "$ac_status"); }; }; then
5992  cf_cv_have_utmp_ut_syslen=yes
5993else
5994  echo "$as_me: failed program was:" >&5
5995cat "conftest.$ac_ext" >&5
5996cf_cv_have_utmp_ut_syslen=no
5997fi
5998rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5999
6000fi
6001
6002echo "$as_me:6002: result: $cf_cv_have_utmp_ut_syslen" >&5
6003echo "${ECHO_T}$cf_cv_have_utmp_ut_syslen" >&6
6004test "$cf_cv_have_utmp_ut_syslen" != no &&
6005cat >>confdefs.h <<\EOF
6006#define HAVE_UTMP_UT_SYSLEN 1
6007EOF
6008
6009fi
6010
6011if test "$cf_cv_have_utmp" != no ; then
6012echo "$as_me:6012: checking if ${cf_cv_have_utmp}.ut_name is declared" >&5
6013echo $ECHO_N "checking if ${cf_cv_have_utmp}.ut_name is declared... $ECHO_C" >&6
6014if test "${cf_cv_have_utmp_ut_name+set}" = set; then
6015  echo $ECHO_N "(cached) $ECHO_C" >&6
6016else
6017
6018	cf_cv_have_utmp_ut_name=no
6019cf_utmp_includes="
6020#include <sys/types.h>
6021#include <${cf_cv_have_utmp}.h>
6022#define getutent getutxent
6023#ifdef USE_LASTLOG
6024#include <lastlog.h>		/* may conflict with utmpx.h on Linux */
6025#endif
6026"
6027for cf_header in ut_name ut_user ; do
6028	cat >"conftest.$ac_ext" <<_ACEOF
6029#line 6029 "configure"
6030#include "confdefs.h"
6031$cf_utmp_includes
6032int
6033main (void)
6034{
6035struct $cf_cv_have_utmp x;
6036	 char *name = x.$cf_header;
6037	 (void)x;
6038	 (void)name;
6039
6040  ;
6041  return 0;
6042}
6043_ACEOF
6044rm -f "conftest.$ac_objext"
6045if { (eval echo "$as_me:6045: \"$ac_compile\"") >&5
6046  (eval $ac_compile) 2>&5
6047  ac_status=$?
6048  echo "$as_me:6048: \$? = $ac_status" >&5
6049  (exit "$ac_status"); } &&
6050         { ac_try='test -s "conftest.$ac_objext"'
6051  { (eval echo "$as_me:6051: \"$ac_try\"") >&5
6052  (eval $ac_try) 2>&5
6053  ac_status=$?
6054  echo "$as_me:6054: \$? = $ac_status" >&5
6055  (exit "$ac_status"); }; }; then
6056  cf_cv_have_utmp_ut_name=$cf_header
6057	 break
6058else
6059  echo "$as_me: failed program was:" >&5
6060cat "conftest.$ac_ext" >&5
6061fi
6062rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6063done
6064
6065fi
6066echo "$as_me:6066: result: $cf_cv_have_utmp_ut_name" >&5
6067echo "${ECHO_T}$cf_cv_have_utmp_ut_name" >&6
6068
6069case "$cf_cv_have_utmp_ut_name" in
6070(no)
6071	{ { echo "$as_me:6071: error: Cannot find declaration for ut.ut_name" >&5
6072echo "$as_me: error: Cannot find declaration for ut.ut_name" >&2;}
6073   { (exit 1); exit 1; }; }
6074	;;
6075(ut_user)
6076
6077cat >>confdefs.h <<\EOF
6078#define ut_name ut_user
6079EOF
6080
6081	;;
6082esac
6083fi
6084
6085if test "$cf_cv_have_utmp" != no ; then
6086echo "$as_me:6086: checking for exit-status in $cf_cv_have_utmp" >&5
6087echo $ECHO_N "checking for exit-status in $cf_cv_have_utmp... $ECHO_C" >&6
6088if test "${cf_cv_have_utmp_ut_xstatus+set}" = set; then
6089  echo $ECHO_N "(cached) $ECHO_C" >&6
6090else
6091
6092for cf_result in \
6093	ut_exit.__e_exit \
6094	ut_exit.e_exit \
6095	ut_exit.ut_e_exit \
6096	ut_exit.ut_exit
6097do
6098cat >"conftest.$ac_ext" <<_ACEOF
6099#line 6099 "configure"
6100#include "confdefs.h"
6101
6102#include <sys/types.h>
6103#include <${cf_cv_have_utmp}.h>
6104int
6105main (void)
6106{
6107struct $cf_cv_have_utmp x;
6108	 long y = x.$cf_result = 0;
6109	 (void)x;
6110	 (void)y
6111  ;
6112  return 0;
6113}
6114_ACEOF
6115rm -f "conftest.$ac_objext"
6116if { (eval echo "$as_me:6116: \"$ac_compile\"") >&5
6117  (eval $ac_compile) 2>&5
6118  ac_status=$?
6119  echo "$as_me:6119: \$? = $ac_status" >&5
6120  (exit "$ac_status"); } &&
6121         { ac_try='test -s "conftest.$ac_objext"'
6122  { (eval echo "$as_me:6122: \"$ac_try\"") >&5
6123  (eval $ac_try) 2>&5
6124  ac_status=$?
6125  echo "$as_me:6125: \$? = $ac_status" >&5
6126  (exit "$ac_status"); }; }; then
6127  cf_cv_have_utmp_ut_xstatus=$cf_result
6128	 break
6129else
6130  echo "$as_me: failed program was:" >&5
6131cat "conftest.$ac_ext" >&5
6132cf_cv_have_utmp_ut_xstatus=no
6133fi
6134rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6135done
6136
6137fi
6138echo "$as_me:6138: result: $cf_cv_have_utmp_ut_xstatus" >&5
6139echo "${ECHO_T}$cf_cv_have_utmp_ut_xstatus" >&6
6140if test "$cf_cv_have_utmp_ut_xstatus" != no ; then
6141
6142cat >>confdefs.h <<\EOF
6143#define HAVE_UTMP_UT_XSTATUS 1
6144EOF
6145
6146cat >>confdefs.h <<EOF
6147#define ut_xstatus $cf_cv_have_utmp_ut_xstatus
6148EOF
6149
6150fi
6151fi
6152
6153if test "$cf_cv_have_utmp" != no ; then
6154echo "$as_me:6154: checking if ${cf_cv_have_utmp}.ut_xtime is declared" >&5
6155echo $ECHO_N "checking if ${cf_cv_have_utmp}.ut_xtime is declared... $ECHO_C" >&6
6156if test "${cf_cv_have_utmp_ut_xtime+set}" = set; then
6157  echo $ECHO_N "(cached) $ECHO_C" >&6
6158else
6159
6160	cat >"conftest.$ac_ext" <<_ACEOF
6161#line 6161 "configure"
6162#include "confdefs.h"
6163
6164#include <sys/types.h>
6165#include <${cf_cv_have_utmp}.h>
6166int
6167main (void)
6168{
6169struct $cf_cv_have_utmp x;
6170	 long y = x.ut_xtime = 0;
6171	 (void)x;
6172	 (void)y
6173  ;
6174  return 0;
6175}
6176_ACEOF
6177rm -f "conftest.$ac_objext"
6178if { (eval echo "$as_me:6178: \"$ac_compile\"") >&5
6179  (eval $ac_compile) 2>&5
6180  ac_status=$?
6181  echo "$as_me:6181: \$? = $ac_status" >&5
6182  (exit "$ac_status"); } &&
6183         { ac_try='test -s "conftest.$ac_objext"'
6184  { (eval echo "$as_me:6184: \"$ac_try\"") >&5
6185  (eval $ac_try) 2>&5
6186  ac_status=$?
6187  echo "$as_me:6187: \$? = $ac_status" >&5
6188  (exit "$ac_status"); }; }; then
6189  cf_cv_have_utmp_ut_xtime=yes
6190else
6191  echo "$as_me: failed program was:" >&5
6192cat "conftest.$ac_ext" >&5
6193cat >"conftest.$ac_ext" <<_ACEOF
6194#line 6194 "configure"
6195#include "confdefs.h"
6196
6197#include <sys/types.h>
6198#include <${cf_cv_have_utmp}.h>
6199int
6200main (void)
6201{
6202struct $cf_cv_have_utmp x;
6203	 long y = x.ut_tv.tv_sec;
6204	 (void)x;
6205	 (void)y
6206  ;
6207  return 0;
6208}
6209_ACEOF
6210rm -f "conftest.$ac_objext"
6211if { (eval echo "$as_me:6211: \"$ac_compile\"") >&5
6212  (eval $ac_compile) 2>&5
6213  ac_status=$?
6214  echo "$as_me:6214: \$? = $ac_status" >&5
6215  (exit "$ac_status"); } &&
6216         { ac_try='test -s "conftest.$ac_objext"'
6217  { (eval echo "$as_me:6217: \"$ac_try\"") >&5
6218  (eval $ac_try) 2>&5
6219  ac_status=$?
6220  echo "$as_me:6220: \$? = $ac_status" >&5
6221  (exit "$ac_status"); }; }; then
6222  cf_cv_have_utmp_ut_xtime=define
6223else
6224  echo "$as_me: failed program was:" >&5
6225cat "conftest.$ac_ext" >&5
6226cf_cv_have_utmp_ut_xtime=no
6227fi
6228rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6229
6230fi
6231rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6232
6233fi
6234echo "$as_me:6234: result: $cf_cv_have_utmp_ut_xtime" >&5
6235echo "${ECHO_T}$cf_cv_have_utmp_ut_xtime" >&6
6236if test "$cf_cv_have_utmp_ut_xtime" != no ; then
6237
6238cat >>confdefs.h <<\EOF
6239#define HAVE_UTMP_UT_XTIME 1
6240EOF
6241
6242	if test "$cf_cv_have_utmp_ut_xtime" = define ; then
6243
6244cat >>confdefs.h <<\EOF
6245#define ut_xtime ut_tv.tv_sec
6246EOF
6247
6248	fi
6249fi
6250fi
6251
6252if test "$cf_cv_have_utmp" != no ; then
6253echo "$as_me:6253: checking if ${cf_cv_have_utmp}.ut_session is declared" >&5
6254echo $ECHO_N "checking if ${cf_cv_have_utmp}.ut_session is declared... $ECHO_C" >&6
6255if test "${cf_cv_have_utmp_ut_session+set}" = set; then
6256  echo $ECHO_N "(cached) $ECHO_C" >&6
6257else
6258
6259	cat >"conftest.$ac_ext" <<_ACEOF
6260#line 6260 "configure"
6261#include "confdefs.h"
6262
6263#include <sys/types.h>
6264#include <${cf_cv_have_utmp}.h>
6265int
6266main (void)
6267{
6268static struct $cf_cv_have_utmp x;
6269	 long y = x.ut_session;
6270	 (void)x;
6271	 (void)y
6272  ;
6273  return 0;
6274}
6275_ACEOF
6276rm -f "conftest.$ac_objext"
6277if { (eval echo "$as_me:6277: \"$ac_compile\"") >&5
6278  (eval $ac_compile) 2>&5
6279  ac_status=$?
6280  echo "$as_me:6280: \$? = $ac_status" >&5
6281  (exit "$ac_status"); } &&
6282         { ac_try='test -s "conftest.$ac_objext"'
6283  { (eval echo "$as_me:6283: \"$ac_try\"") >&5
6284  (eval $ac_try) 2>&5
6285  ac_status=$?
6286  echo "$as_me:6286: \$? = $ac_status" >&5
6287  (exit "$ac_status"); }; }; then
6288  cf_cv_have_utmp_ut_session=yes
6289else
6290  echo "$as_me: failed program was:" >&5
6291cat "conftest.$ac_ext" >&5
6292cf_cv_have_utmp_ut_session=no
6293fi
6294rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6295
6296fi
6297echo "$as_me:6297: result: $cf_cv_have_utmp_ut_session" >&5
6298echo "${ECHO_T}$cf_cv_have_utmp_ut_session" >&6
6299if test "$cf_cv_have_utmp_ut_session" != no ; then
6300
6301cat >>confdefs.h <<\EOF
6302#define HAVE_UTMP_UT_SESSION 1
6303EOF
6304
6305fi
6306fi
6307
6308echo "$as_me:6308: checking if $cf_cv_have_utmp is SYSV flavor" >&5
6309echo $ECHO_N "checking if $cf_cv_have_utmp is SYSV flavor... $ECHO_C" >&6
6310if test "${cf_cv_sysv_utmp+set}" = set; then
6311  echo $ECHO_N "(cached) $ECHO_C" >&6
6312else
6313
6314test "$cf_cv_have_utmp" = "utmp" && cf_prefix="ut" || cf_prefix="utx"
6315cat >"conftest.$ac_ext" <<_ACEOF
6316#line 6316 "configure"
6317#include "confdefs.h"
6318
6319#include <sys/types.h>
6320#include <${cf_cv_have_utmp}.h>
6321int
6322main (void)
6323{
6324
6325struct $cf_cv_have_utmp x;
6326	set${cf_prefix}ent ();
6327	get${cf_prefix}id(&x);
6328	put${cf_prefix}line(&x);
6329	end${cf_prefix}ent();
6330  ;
6331  return 0;
6332}
6333_ACEOF
6334rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6335if { (eval echo "$as_me:6335: \"$ac_link\"") >&5
6336  (eval $ac_link) 2>&5
6337  ac_status=$?
6338  echo "$as_me:6338: \$? = $ac_status" >&5
6339  (exit "$ac_status"); } &&
6340         { ac_try='test -s "conftest$ac_exeext"'
6341  { (eval echo "$as_me:6341: \"$ac_try\"") >&5
6342  (eval $ac_try) 2>&5
6343  ac_status=$?
6344  echo "$as_me:6344: \$? = $ac_status" >&5
6345  (exit "$ac_status"); }; }; then
6346  cf_cv_sysv_utmp=yes
6347else
6348  echo "$as_me: failed program was:" >&5
6349cat "conftest.$ac_ext" >&5
6350cf_cv_sysv_utmp=no
6351fi
6352rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6353
6354fi
6355echo "$as_me:6355: result: $cf_cv_sysv_utmp" >&5
6356echo "${ECHO_T}$cf_cv_sysv_utmp" >&6
6357test "$cf_cv_sysv_utmp" = yes &&
6358cat >>confdefs.h <<\EOF
6359#define USE_SYSV_UTMP 1
6360EOF
6361
6362fi
6363
6364for ac_header in lastlog.h
6365do
6366as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6367echo "$as_me:6367: checking for $ac_header" >&5
6368echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6369if eval "test \"\${$as_ac_Header+set}\" = set"; then
6370  echo $ECHO_N "(cached) $ECHO_C" >&6
6371else
6372  cat >"conftest.$ac_ext" <<_ACEOF
6373#line 6373 "configure"
6374#include "confdefs.h"
6375#include <$ac_header>
6376_ACEOF
6377if { (eval echo "$as_me:6377: \"$ac_cpp "conftest.$ac_ext"\"") >&5
6378  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
6379  ac_status=$?
6380  $EGREP -v '^ *\+' conftest.er1 >conftest.err
6381  rm -f conftest.er1
6382  cat conftest.err >&5
6383  echo "$as_me:6383: \$? = $ac_status" >&5
6384  (exit "$ac_status"); } >/dev/null; then
6385  if test -s conftest.err; then
6386    ac_cpp_err=$ac_c_preproc_warn_flag
6387  else
6388    ac_cpp_err=
6389  fi
6390else
6391  ac_cpp_err=yes
6392fi
6393if test -z "$ac_cpp_err"; then
6394  eval "$as_ac_Header=yes"
6395else
6396  echo "$as_me: failed program was:" >&5
6397  cat "conftest.$ac_ext" >&5
6398  eval "$as_ac_Header=no"
6399fi
6400rm -f conftest.err "conftest.$ac_ext"
6401fi
6402echo "$as_me:6402: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
6403echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
6404if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
6405  cat >>confdefs.h <<EOF
6406#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6407EOF
6408
6409fi
6410done
6411
6412echo "$as_me:6412: checking for struct lastlog" >&5
6413echo $ECHO_N "checking for struct lastlog... $ECHO_C" >&6
6414if test "${cf_cv_struct_lastlog+set}" = set; then
6415  echo $ECHO_N "(cached) $ECHO_C" >&6
6416else
6417
6418if test "$cross_compiling" = yes; then
6419
6420cf_cv_struct_lastlog=unknown
6421else
6422  cat >"conftest.$ac_ext" <<_ACEOF
6423#line 6423 "configure"
6424#include "confdefs.h"
6425
6426#include <sys/types.h>
6427#include <time.h>
6428#include <lastlog.h>
6429
6430int main(void)
6431{
6432	struct lastlog data;
6433	return (sizeof(data.ll_time) != sizeof(time_t));
6434}
6435_ACEOF
6436rm -f "conftest$ac_exeext"
6437if { (eval echo "$as_me:6437: \"$ac_link\"") >&5
6438  (eval $ac_link) 2>&5
6439  ac_status=$?
6440  echo "$as_me:6440: \$? = $ac_status" >&5
6441  (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
6442  { (eval echo "$as_me:6442: \"$ac_try\"") >&5
6443  (eval $ac_try) 2>&5
6444  ac_status=$?
6445  echo "$as_me:6445: \$? = $ac_status" >&5
6446  (exit "$ac_status"); }; }; then
6447
6448cf_cv_struct_lastlog=yes
6449else
6450  echo "$as_me: program exited with status $ac_status" >&5
6451echo "$as_me: failed program was:" >&5
6452cat "conftest.$ac_ext" >&5
6453
6454cf_cv_struct_lastlog=no
6455fi
6456rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
6457fi
6458fi
6459echo "$as_me:6459: result: $cf_cv_struct_lastlog" >&5
6460echo "${ECHO_T}$cf_cv_struct_lastlog" >&6
6461
6462test $cf_cv_struct_lastlog != no &&
6463cat >>confdefs.h <<\EOF
6464#define USE_STRUCT_LASTLOG 1
6465EOF
6466
6467for ac_header in \
6468sys/param.h \
6469
6470do
6471as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6472echo "$as_me:6472: checking for $ac_header" >&5
6473echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6474if eval "test \"\${$as_ac_Header+set}\" = set"; then
6475  echo $ECHO_N "(cached) $ECHO_C" >&6
6476else
6477  cat >"conftest.$ac_ext" <<_ACEOF
6478#line 6478 "configure"
6479#include "confdefs.h"
6480#include <$ac_header>
6481_ACEOF
6482if { (eval echo "$as_me:6482: \"$ac_cpp "conftest.$ac_ext"\"") >&5
6483  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
6484  ac_status=$?
6485  $EGREP -v '^ *\+' conftest.er1 >conftest.err
6486  rm -f conftest.er1
6487  cat conftest.err >&5
6488  echo "$as_me:6488: \$? = $ac_status" >&5
6489  (exit "$ac_status"); } >/dev/null; then
6490  if test -s conftest.err; then
6491    ac_cpp_err=$ac_c_preproc_warn_flag
6492  else
6493    ac_cpp_err=
6494  fi
6495else
6496  ac_cpp_err=yes
6497fi
6498if test -z "$ac_cpp_err"; then
6499  eval "$as_ac_Header=yes"
6500else
6501  echo "$as_me: failed program was:" >&5
6502  cat "conftest.$ac_ext" >&5
6503  eval "$as_ac_Header=no"
6504fi
6505rm -f conftest.err "conftest.$ac_ext"
6506fi
6507echo "$as_me:6507: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
6508echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
6509if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
6510  cat >>confdefs.h <<EOF
6511#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6512EOF
6513
6514fi
6515done
6516
6517echo "$as_me:6517: checking if POSIX saved-ids are supported" >&5
6518echo $ECHO_N "checking if POSIX saved-ids are supported... $ECHO_C" >&6
6519if test "${cf_cv_posix_saved_ids+set}" = set; then
6520  echo $ECHO_N "(cached) $ECHO_C" >&6
6521else
6522
6523cat >"conftest.$ac_ext" <<_ACEOF
6524#line 6524 "configure"
6525#include "confdefs.h"
6526
6527#include <unistd.h>
6528#ifdef HAVE_SYS_PARAM_H
6529#include <sys/param.h>		/* this may define "BSD" */
6530#endif
6531
6532int
6533main (void)
6534{
6535
6536#if defined(_POSIX_SAVED_IDS) && (_POSIX_SAVED_IDS > 0)
6537	void *p = (void *) seteuid;
6538	int x = seteuid(geteuid());
6539	(void)p;
6540	(void)x;
6541#elif defined(BSD) && (BSD >= 199103)
6542/* The BSD's may implement the runtime check - and it fails.
6543 * However, saved-ids work almost like POSIX (close enough for most uses).
6544 */
6545#else
6546make an error
6547#endif
6548
6549  ;
6550  return 0;
6551}
6552_ACEOF
6553rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6554if { (eval echo "$as_me:6554: \"$ac_link\"") >&5
6555  (eval $ac_link) 2>&5
6556  ac_status=$?
6557  echo "$as_me:6557: \$? = $ac_status" >&5
6558  (exit "$ac_status"); } &&
6559         { ac_try='test -s "conftest$ac_exeext"'
6560  { (eval echo "$as_me:6560: \"$ac_try\"") >&5
6561  (eval $ac_try) 2>&5
6562  ac_status=$?
6563  echo "$as_me:6563: \$? = $ac_status" >&5
6564  (exit "$ac_status"); }; }; then
6565  cf_cv_posix_saved_ids=yes
6566
6567else
6568  echo "$as_me: failed program was:" >&5
6569cat "conftest.$ac_ext" >&5
6570
6571if test "$cross_compiling" = yes; then
6572  cf_cv_posix_saved_ids=unknown
6573else
6574  cat >"conftest.$ac_ext" <<_ACEOF
6575#line 6575 "configure"
6576#include "confdefs.h"
6577
6578#ifdef HAVE_STDLIB_H
6579#include <stdlib.h>
6580#endif
6581#include <unistd.h>
6582int main(void)
6583{
6584	void *p = (void *) seteuid;
6585	long code = sysconf(_SC_SAVED_IDS);
6586	(void)p;
6587	${cf_cv_main_return:-return}  ((code > 0) ? 0 : 1);
6588}
6589_ACEOF
6590rm -f "conftest$ac_exeext"
6591if { (eval echo "$as_me:6591: \"$ac_link\"") >&5
6592  (eval $ac_link) 2>&5
6593  ac_status=$?
6594  echo "$as_me:6594: \$? = $ac_status" >&5
6595  (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
6596  { (eval echo "$as_me:6596: \"$ac_try\"") >&5
6597  (eval $ac_try) 2>&5
6598  ac_status=$?
6599  echo "$as_me:6599: \$? = $ac_status" >&5
6600  (exit "$ac_status"); }; }; then
6601  cf_cv_posix_saved_ids=yes
6602else
6603  echo "$as_me: program exited with status $ac_status" >&5
6604echo "$as_me: failed program was:" >&5
6605cat "conftest.$ac_ext" >&5
6606cf_cv_posix_saved_ids=no
6607fi
6608rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
6609fi
6610
6611fi
6612rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6613
6614fi
6615echo "$as_me:6615: result: $cf_cv_posix_saved_ids" >&5
6616echo "${ECHO_T}$cf_cv_posix_saved_ids" >&6
6617
6618test "$cf_cv_posix_saved_ids" = yes &&
6619cat >>confdefs.h <<\EOF
6620#define HAVE_POSIX_SAVED_IDS 1
6621EOF
6622
6623# compute a reasonable value for $TERM to give tgetent(), since we may be
6624# running in 'screen', which sets $TERMCAP to a specific entry that is not
6625# necessarily in /etc/termcap - unsetenv is not portable, so we cannot simply
6626# discard $TERMCAP.
6627cf_TERMVAR=vt100
6628if test -n "$TERMCAP"
6629then
6630	cf_TERMCAP=`echo "$TERMCAP" | tr '\n' ' ' | sed -e 's/^..|//' -e 's/|.*//'`
6631	case "$cf_TERMCAP" in
6632	(screen*.*)
6633		;;
6634	(*)
6635		cf_TERMVAR="$cf_TERMCAP"
6636		;;
6637	esac
6638fi
6639test -z "$cf_TERMVAR" && cf_TERMVAR=vt100
6640
6641# BSD termcap used no header file
6642# SVr4 provided termcap prototypes as a legacy feature in term.h
6643# GNU termcap provided termcap prototypes in termcap.h
6644# ncurses provides termcap prototypes in both term.h and termcap.h
6645#
6646# The terminfo-based termcap interfaces do not provide a full tgetent (i.e., do
6647# not return the text of the termcap entry in the buffer), but as a special
6648# case, FreeBSD provides ncurses' termcap.h with a modified termcap reader that
6649# returns the termcap text.
6650
6651for ac_header in termcap.h
6652do
6653as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6654echo "$as_me:6654: checking for $ac_header" >&5
6655echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6656if eval "test \"\${$as_ac_Header+set}\" = set"; then
6657  echo $ECHO_N "(cached) $ECHO_C" >&6
6658else
6659  cat >"conftest.$ac_ext" <<_ACEOF
6660#line 6660 "configure"
6661#include "confdefs.h"
6662#include <$ac_header>
6663_ACEOF
6664if { (eval echo "$as_me:6664: \"$ac_cpp "conftest.$ac_ext"\"") >&5
6665  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
6666  ac_status=$?
6667  $EGREP -v '^ *\+' conftest.er1 >conftest.err
6668  rm -f conftest.er1
6669  cat conftest.err >&5
6670  echo "$as_me:6670: \$? = $ac_status" >&5
6671  (exit "$ac_status"); } >/dev/null; then
6672  if test -s conftest.err; then
6673    ac_cpp_err=$ac_c_preproc_warn_flag
6674  else
6675    ac_cpp_err=
6676  fi
6677else
6678  ac_cpp_err=yes
6679fi
6680if test -z "$ac_cpp_err"; then
6681  eval "$as_ac_Header=yes"
6682else
6683  echo "$as_me: failed program was:" >&5
6684  cat "conftest.$ac_ext" >&5
6685  eval "$as_ac_Header=no"
6686fi
6687rm -f conftest.err "conftest.$ac_ext"
6688fi
6689echo "$as_me:6689: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
6690echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
6691if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
6692  cat >>confdefs.h <<EOF
6693#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6694EOF
6695
6696fi
6697done
6698
6699echo "$as_me:6699: checking if we want full tgetent function" >&5
6700echo $ECHO_N "checking if we want full tgetent function... $ECHO_C" >&6
6701
6702# Check whether --enable-full-tgetent or --disable-full-tgetent was given.
6703if test "${enable_full_tgetent+set}" = set; then
6704  enableval="$enable_full_tgetent"
6705  test "$enableval" != no && enableval=yes
6706	if test "$enableval" != "yes" ; then
6707    cf_full_tgetent=no
6708	else
6709		cf_full_tgetent=yes
6710	fi
6711else
6712  enableval=yes
6713	cf_full_tgetent=yes
6714
6715fi;
6716echo "$as_me:6716: result: $cf_full_tgetent" >&5
6717echo "${ECHO_T}$cf_full_tgetent" >&6
6718
6719if test "$cf_full_tgetent" = yes ; then
6720	cf_test_message="full tgetent"
6721else
6722	cf_test_message="tgetent"
6723fi
6724
6725echo "$as_me:6725: checking for $cf_test_message function" >&5
6726echo $ECHO_N "checking for $cf_test_message function... $ECHO_C" >&6
6727if test "${cf_cv_lib_tgetent+set}" = set; then
6728  echo $ECHO_N "(cached) $ECHO_C" >&6
6729else
6730
6731cf_save_LIBS="$LIBS"
6732cf_cv_lib_tgetent=no
6733if test "$cf_full_tgetent" = yes ; then
6734	cf_TERMLIB="otermcap termcap termlib ncurses curses"
6735	cf_TERMTST="buffer[0] == 0"
6736else
6737	cf_TERMLIB="termlib ncurses curses"
6738	cf_TERMTST="0"
6739fi
6740for cf_termlib in '' $cf_TERMLIB ; do
6741	LIBS="$cf_save_LIBS"
6742	test -n "$cf_termlib" && {
6743cf_add_libs="$LIBS"
6744# reverse order
6745cf_add_0lib=
6746for cf_add_1lib in -l$cf_termlib; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6747# filter duplicates
6748for cf_add_1lib in $cf_add_0lib; do
6749	for cf_add_2lib in $cf_add_libs; do
6750		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6751			cf_add_1lib=
6752			break
6753		fi
6754	done
6755	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6756done
6757LIBS="$cf_add_libs"
6758 }
6759	if test "$cross_compiling" = yes; then
6760  echo "cross-compiling, cannot verify if a termcap/tgetent is present in $cf_termlib" 1>&5
6761else
6762  cat >"conftest.$ac_ext" <<_ACEOF
6763#line 6763 "configure"
6764#include "confdefs.h"
6765
6766#ifdef HAVE_TERMCAP_H
6767#include <termcap.h>
6768#endif
6769/* terminfo implementations ignore the buffer argument, making it useless for
6770 * the xterm application, which uses this information to make a new TERMCAP
6771 * environment variable.
6772 */
6773int main(void)
6774{
6775	char buffer[1024];
6776	buffer[0] = 0;
6777	tgetent(buffer, "$cf_TERMVAR");
6778	${cf_cv_main_return:-return} ($cf_TERMTST); }
6779_ACEOF
6780rm -f "conftest$ac_exeext"
6781if { (eval echo "$as_me:6781: \"$ac_link\"") >&5
6782  (eval $ac_link) 2>&5
6783  ac_status=$?
6784  echo "$as_me:6784: \$? = $ac_status" >&5
6785  (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
6786  { (eval echo "$as_me:6786: \"$ac_try\"") >&5
6787  (eval $ac_try) 2>&5
6788  ac_status=$?
6789  echo "$as_me:6789: \$? = $ac_status" >&5
6790  (exit "$ac_status"); }; }; then
6791  echo "yes, there is a termcap/tgetent in $cf_termlib" 1>&5
6792	 if test -n "$cf_termlib" ; then
6793	 	cf_cv_lib_tgetent="-l$cf_termlib"
6794	 else
6795	 	cf_cv_lib_tgetent=yes
6796	 fi
6797	 break
6798else
6799  echo "$as_me: program exited with status $ac_status" >&5
6800echo "$as_me: failed program was:" >&5
6801cat "conftest.$ac_ext" >&5
6802echo "no, there is no termcap/tgetent in $cf_termlib" 1>&5
6803fi
6804rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
6805fi
6806done
6807LIBS="$cf_save_LIBS"
6808
6809fi
6810echo "$as_me:6810: result: $cf_cv_lib_tgetent" >&5
6811echo "${ECHO_T}$cf_cv_lib_tgetent" >&6
6812
6813# If we found a working tgetent(), set LIBS and check for termcap.h.
6814# (LIBS cannot be set inside AC_CACHE_CHECK; the commands there should
6815# not have side effects other than setting the cache variable, because
6816# they are not executed when a cached value exists.)
6817if test "x$cf_cv_lib_tgetent" != xno ; then
6818	test "x$cf_cv_lib_tgetent" != xyes && {
6819cf_add_libs="$LIBS"
6820# reverse order
6821cf_add_0lib=
6822for cf_add_1lib in $cf_cv_lib_tgetent; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6823# filter duplicates
6824for cf_add_1lib in $cf_add_0lib; do
6825	for cf_add_2lib in $cf_add_libs; do
6826		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6827			cf_add_1lib=
6828			break
6829		fi
6830	done
6831	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6832done
6833LIBS="$cf_add_libs"
6834 }
6835
6836cat >>confdefs.h <<\EOF
6837#define USE_TERMCAP 1
6838EOF
6839
6840	if test "$cf_full_tgetent" = no ; then
6841		cat >"conftest.$ac_ext" <<_ACEOF
6842#line 6842 "configure"
6843#include "confdefs.h"
6844
6845#include <termcap.h>
6846int
6847main (void)
6848{
6849
6850#ifdef NCURSES_VERSION
6851make an error
6852#endif
6853  ;
6854  return 0;
6855}
6856_ACEOF
6857rm -f "conftest.$ac_objext"
6858if { (eval echo "$as_me:6858: \"$ac_compile\"") >&5
6859  (eval $ac_compile) 2>&5
6860  ac_status=$?
6861  echo "$as_me:6861: \$? = $ac_status" >&5
6862  (exit "$ac_status"); } &&
6863         { ac_try='test -s "conftest.$ac_objext"'
6864  { (eval echo "$as_me:6864: \"$ac_try\"") >&5
6865  (eval $ac_try) 2>&5
6866  ac_status=$?
6867  echo "$as_me:6867: \$? = $ac_status" >&5
6868  (exit "$ac_status"); }; }; then
6869  cat >>confdefs.h <<\EOF
6870#define HAVE_TERMCAP_H 1
6871EOF
6872
6873else
6874  echo "$as_me: failed program was:" >&5
6875cat "conftest.$ac_ext" >&5
6876fi
6877rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6878	else
6879
6880for ac_header in termcap.h
6881do
6882as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6883echo "$as_me:6883: checking for $ac_header" >&5
6884echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6885if eval "test \"\${$as_ac_Header+set}\" = set"; then
6886  echo $ECHO_N "(cached) $ECHO_C" >&6
6887else
6888  cat >"conftest.$ac_ext" <<_ACEOF
6889#line 6889 "configure"
6890#include "confdefs.h"
6891#include <$ac_header>
6892_ACEOF
6893if { (eval echo "$as_me:6893: \"$ac_cpp "conftest.$ac_ext"\"") >&5
6894  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
6895  ac_status=$?
6896  $EGREP -v '^ *\+' conftest.er1 >conftest.err
6897  rm -f conftest.er1
6898  cat conftest.err >&5
6899  echo "$as_me:6899: \$? = $ac_status" >&5
6900  (exit "$ac_status"); } >/dev/null; then
6901  if test -s conftest.err; then
6902    ac_cpp_err=$ac_c_preproc_warn_flag
6903  else
6904    ac_cpp_err=
6905  fi
6906else
6907  ac_cpp_err=yes
6908fi
6909if test -z "$ac_cpp_err"; then
6910  eval "$as_ac_Header=yes"
6911else
6912  echo "$as_me: failed program was:" >&5
6913  cat "conftest.$ac_ext" >&5
6914  eval "$as_ac_Header=no"
6915fi
6916rm -f conftest.err "conftest.$ac_ext"
6917fi
6918echo "$as_me:6918: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
6919echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
6920if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
6921  cat >>confdefs.h <<EOF
6922#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6923EOF
6924
6925fi
6926done
6927
6928	fi
6929else
6930        # If we didn't find a tgetent() that supports the buffer
6931        # argument, look again to see whether we can find even
6932        # a crippled one.  A crippled tgetent() is still useful to
6933        # validate values for the TERM environment variable given to
6934        # child processes.
6935	echo "$as_me:6935: checking for partial tgetent function" >&5
6936echo $ECHO_N "checking for partial tgetent function... $ECHO_C" >&6
6937if test "${cf_cv_lib_part_tgetent+set}" = set; then
6938  echo $ECHO_N "(cached) $ECHO_C" >&6
6939else
6940
6941	cf_cv_lib_part_tgetent=no
6942	for cf_termlib in $cf_TERMLIB ; do
6943		LIBS="$cf_save_LIBS -l$cf_termlib"
6944		cat >"conftest.$ac_ext" <<_ACEOF
6945#line 6945 "configure"
6946#include "confdefs.h"
6947
6948int
6949main (void)
6950{
6951tgetent(0, "$cf_TERMVAR")
6952  ;
6953  return 0;
6954}
6955_ACEOF
6956rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6957if { (eval echo "$as_me:6957: \"$ac_link\"") >&5
6958  (eval $ac_link) 2>&5
6959  ac_status=$?
6960  echo "$as_me:6960: \$? = $ac_status" >&5
6961  (exit "$ac_status"); } &&
6962         { ac_try='test -s "conftest$ac_exeext"'
6963  { (eval echo "$as_me:6963: \"$ac_try\"") >&5
6964  (eval $ac_try) 2>&5
6965  ac_status=$?
6966  echo "$as_me:6966: \$? = $ac_status" >&5
6967  (exit "$ac_status"); }; }; then
6968  echo "there is a terminfo/tgetent in $cf_termlib" 1>&5
6969			 cf_cv_lib_part_tgetent="-l$cf_termlib"
6970			 break
6971else
6972  echo "$as_me: failed program was:" >&5
6973cat "conftest.$ac_ext" >&5
6974fi
6975rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6976	done
6977	LIBS="$cf_save_LIBS"
6978
6979fi
6980echo "$as_me:6980: result: $cf_cv_lib_part_tgetent" >&5
6981echo "${ECHO_T}$cf_cv_lib_part_tgetent" >&6
6982
6983	if test "$cf_cv_lib_part_tgetent" != no ; then
6984
6985cf_add_libs="$LIBS"
6986# reverse order
6987cf_add_0lib=
6988for cf_add_1lib in $cf_cv_lib_part_tgetent; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6989# filter duplicates
6990for cf_add_1lib in $cf_add_0lib; do
6991	for cf_add_2lib in $cf_add_libs; do
6992		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6993			cf_add_1lib=
6994			break
6995		fi
6996	done
6997	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6998done
6999LIBS="$cf_add_libs"
7000
7001for ac_header in termcap.h
7002do
7003as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7004echo "$as_me:7004: checking for $ac_header" >&5
7005echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7006if eval "test \"\${$as_ac_Header+set}\" = set"; then
7007  echo $ECHO_N "(cached) $ECHO_C" >&6
7008else
7009  cat >"conftest.$ac_ext" <<_ACEOF
7010#line 7010 "configure"
7011#include "confdefs.h"
7012#include <$ac_header>
7013_ACEOF
7014if { (eval echo "$as_me:7014: \"$ac_cpp "conftest.$ac_ext"\"") >&5
7015  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
7016  ac_status=$?
7017  $EGREP -v '^ *\+' conftest.er1 >conftest.err
7018  rm -f conftest.er1
7019  cat conftest.err >&5
7020  echo "$as_me:7020: \$? = $ac_status" >&5
7021  (exit "$ac_status"); } >/dev/null; then
7022  if test -s conftest.err; then
7023    ac_cpp_err=$ac_c_preproc_warn_flag
7024  else
7025    ac_cpp_err=
7026  fi
7027else
7028  ac_cpp_err=yes
7029fi
7030if test -z "$ac_cpp_err"; then
7031  eval "$as_ac_Header=yes"
7032else
7033  echo "$as_me: failed program was:" >&5
7034  cat "conftest.$ac_ext" >&5
7035  eval "$as_ac_Header=no"
7036fi
7037rm -f conftest.err "conftest.$ac_ext"
7038fi
7039echo "$as_me:7039: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
7040echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
7041if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
7042  cat >>confdefs.h <<EOF
7043#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7044EOF
7045
7046fi
7047done
7048
7049                # If this is linking against ncurses, we'll trigger the
7050                # ifdef in resize.c that turns the termcap stuff back off.
7051
7052cat >>confdefs.h <<\EOF
7053#define USE_TERMINFO 1
7054EOF
7055
7056	fi
7057fi
7058
7059echo "$as_me:7059: checking for X applications class" >&5
7060echo $ECHO_N "checking for X applications class... $ECHO_C" >&6
7061
7062# Check whether --with-app-class or --without-app-class was given.
7063if test "${with_app_class+set}" = set; then
7064  withval="$with_app_class"
7065  APP_CLASS=$withval
7066else
7067  APP_CLASS=XTerm
7068fi;
7069
7070case x$APP_CLASS in
7071(*[/@,%]*)
7072	{ echo "$as_me:7072: WARNING: X applications class cannot contain punctuation" >&5
7073echo "$as_me: WARNING: X applications class cannot contain punctuation" >&2;}
7074	APP_CLASS=XTerm
7075	;;
7076(x[A-Z]*)
7077	;;
7078(*)
7079	{ echo "$as_me:7079: WARNING: X applications class must start with capital, ignoring $APP_CLASS" >&5
7080echo "$as_me: WARNING: X applications class must start with capital, ignoring $APP_CLASS" >&2;}
7081	APP_CLASS=XTerm
7082	;;
7083esac
7084
7085echo "$as_me:7085: result: $APP_CLASS" >&5
7086echo "${ECHO_T}$APP_CLASS" >&6
7087
7088echo "$as_me:7088: checking for directory to install resource files" >&5
7089echo $ECHO_N "checking for directory to install resource files... $ECHO_C" >&6
7090
7091# Check whether --with-app-defaults or --without-app-defaults was given.
7092if test "${with_app_defaults+set}" = set; then
7093  withval="$with_app_defaults"
7094  APPSDIR=$withval
7095else
7096  APPSDIR='${exec_prefix}/lib/X11/app-defaults'
7097fi;
7098
7099if test "x$APPSDIR" = xauto
7100then
7101	APPSDIR='${exec_prefix}/lib/X11/app-defaults'
7102	for cf_path in \
7103		/opt/local/share/X11/app-defaults \
7104		/opt/X11/share/X11/app-defaults \
7105		/usr/share/X11/app-defaults \
7106		/usr/X11/share/X11/app-defaults \
7107		/usr/X11/lib/X11/app-defaults \
7108		/usr/lib/X11/app-defaults \
7109		/etc/X11/app-defaults \
7110		/usr/pkg/lib/X11/app-defaults \
7111		/usr/X11R7/lib/X11/app-defaults \
7112		/usr/X11R6/lib/X11/app-defaults \
7113		/usr/X11R5/lib/X11/app-defaults \
7114		/usr/X11R4/lib/X11/app-defaults \
7115		/usr/local/lib/X11/app-defaults \
7116		/usr/local/share/X11/app-defaults \
7117		/usr/lib64/X11/app-defaults
7118	do
7119		if test -d "$cf_path" ; then
7120			APPSDIR="$cf_path"
7121			break
7122		fi
7123	done
7124else
7125	cf_path=$APPSDIR
7126
7127if test "x$prefix" != xNONE; then
7128	cf_path_syntax="$prefix"
7129else
7130	cf_path_syntax="$ac_default_prefix"
7131fi
7132
7133case ".$cf_path" in
7134(.\$\(*\)*|.\'*\'*)
7135	;;
7136(..|./*|.\\*)
7137	;;
7138(.[a-zA-Z]:[\\/]*) # OS/2 EMX
7139	;;
7140(.\$\{*prefix\}*|.\$\{*dir\}*)
7141	eval cf_path="$cf_path"
7142	case ".$cf_path" in
7143	(.NONE/*)
7144		cf_path=`echo "$cf_path" | sed -e s%NONE%$cf_path_syntax%`
7145		;;
7146	esac
7147	;;
7148(.no|.NONE/*)
7149	cf_path=`echo "$cf_path" | sed -e s%NONE%$cf_path_syntax%`
7150	;;
7151(*)
7152	{ { echo "$as_me:7152: error: expected a pathname, not \"$cf_path\"" >&5
7153echo "$as_me: error: expected a pathname, not \"$cf_path\"" >&2;}
7154   { (exit 1); exit 1; }; }
7155	;;
7156esac
7157
7158fi
7159
7160echo "$as_me:7160: result: $APPSDIR" >&5
7161echo "${ECHO_T}$APPSDIR" >&6
7162
7163no_appsdir=
7164if test "$APPSDIR" = no
7165then
7166	no_appsdir="#"
7167else
7168	EXTRA_INSTALL_DIRS="$EXTRA_INSTALL_DIRS \$(APPSDIR)"
7169fi
7170
7171echo "$as_me:7171: checking for the icon name" >&5
7172echo $ECHO_N "checking for the icon name... $ECHO_C" >&6
7173
7174# Check whether --with-icon-name or --without-icon-name was given.
7175if test "${with_icon_name+set}" = set; then
7176  withval="$with_icon_name"
7177  ICON_NAME="$withval"
7178else
7179  ICON_NAME=mini.xterm
7180fi;
7181case "x$ICON_NAME" in
7182(xyes|xno|x)
7183	ICON_NAME=mini.xterm
7184	;;
7185esac
7186
7187echo "$as_me:7187: result: $ICON_NAME" >&5
7188echo "${ECHO_T}$ICON_NAME" >&6
7189
7190echo "$as_me:7190: checking for icon symlink to use" >&5
7191echo $ECHO_N "checking for icon symlink to use... $ECHO_C" >&6
7192
7193# Check whether --with-icon-symlink or --without-icon-symlink was given.
7194if test "${with_icon_symlink+set}" = set; then
7195  withval="$with_icon_symlink"
7196  ICON_SYMLINK="$withval"
7197else
7198  ICON_SYMLINK=NONE
7199fi;
7200case "x$ICON_SYMLINK" in
7201(xyes)
7202	ICON_SYMLINK=xterm
7203	;;
7204(xno|x)
7205	ICON_SYMLINK=NONE
7206	;;
7207esac
7208
7209echo "$as_me:7209: result: $ICON_SYMLINK" >&5
7210echo "${ECHO_T}$ICON_SYMLINK" >&6
7211
7212# Install all icons except for the overused "terminal".
7213cf_cv_icon_list=
7214for my_item in $srcdir/icons/*.svg
7215do
7216	test -f "$my_item" || continue
7217	cf_icon_name=`echo "$my_item" |sed -e "s,.svg,," -e "s,^$srcdir/,,"`
7218	case $cf_icon_name in
7219	(*_48x48)
7220		continue
7221		;;
7222	esac
7223	test -n "$verbose" && echo "	adding $cf_icon_name to icon-list" 1>&6
7224
7225echo "${as_me:-configure}:7225: testing adding $cf_icon_name to icon-list ..." 1>&5
7226
7227	cf_cv_icon_list="$cf_cv_icon_list $cf_icon_name"
7228	if test -f "${cf_icon_name}_48x48.png"
7229	then
7230		test -n "$verbose" && echo "	adding ${cf_icon_name}_48x48 to icon-list" 1>&6
7231
7232echo "${as_me:-configure}:7232: testing adding ${cf_icon_name}_48x48 to icon-list ..." 1>&5
7233
7234		cf_cv_icon_list="$cf_cv_icon_list ${cf_icon_name}_48x48"
7235	fi
7236done
7237
7238echo "$as_me:7238: checking for directory to install pixmaps" >&5
7239echo $ECHO_N "checking for directory to install pixmaps... $ECHO_C" >&6
7240
7241# Check whether --with-pixmapdir or --without-pixmapdir was given.
7242if test "${with_pixmapdir+set}" = set; then
7243  withval="$with_pixmapdir"
7244  PIXMAPDIR=$withval
7245else
7246  test -z "$PIXMAPDIR" && PIXMAPDIR='${datadir}/pixmaps'
7247fi;
7248
7249if test "x$PIXMAPDIR" = xauto
7250then
7251	PIXMAPDIR='${datadir}/pixmaps'
7252	for cf_path in \
7253		/usr/share/pixmaps \
7254		/usr/X11R6/share/pixmaps
7255	do
7256		if test -d "$cf_path" ; then
7257			PIXMAPDIR="$cf_path"
7258			break
7259		fi
7260	done
7261else
7262	cf_path=$PIXMAPDIR
7263
7264if test "x$prefix" != xNONE; then
7265	cf_path_syntax="$prefix"
7266else
7267	cf_path_syntax="$ac_default_prefix"
7268fi
7269
7270case ".$cf_path" in
7271(.\$\(*\)*|.\'*\'*)
7272	;;
7273(..|./*|.\\*)
7274	;;
7275(.[a-zA-Z]:[\\/]*) # OS/2 EMX
7276	;;
7277(.\$\{*prefix\}*|.\$\{*dir\}*)
7278	eval cf_path="$cf_path"
7279	case ".$cf_path" in
7280	(.NONE/*)
7281		cf_path=`echo "$cf_path" | sed -e s%NONE%$cf_path_syntax%`
7282		;;
7283	esac
7284	;;
7285(.no|.NONE/*)
7286	cf_path=`echo "$cf_path" | sed -e s%NONE%$cf_path_syntax%`
7287	;;
7288(*)
7289	{ { echo "$as_me:7289: error: expected a pathname, not \"$cf_path\"" >&5
7290echo "$as_me: error: expected a pathname, not \"$cf_path\"" >&2;}
7291   { (exit 1); exit 1; }; }
7292	;;
7293esac
7294
7295fi
7296echo "$as_me:7296: result: $PIXMAPDIR" >&5
7297echo "${ECHO_T}$PIXMAPDIR" >&6
7298
7299no_pixmapdir=
7300if test "$PIXMAPDIR" = no
7301then
7302	no_pixmapdir="#"
7303else
7304	EXTRA_INSTALL_DIRS="$EXTRA_INSTALL_DIRS \$(PIXMAPDIR)"
7305fi
7306
7307echo "$as_me:7307: checking for directory to install icons" >&5
7308echo $ECHO_N "checking for directory to install icons... $ECHO_C" >&6
7309
7310# Check whether --with-icondir or --without-icondir was given.
7311if test "${with_icondir+set}" = set; then
7312  withval="$with_icondir"
7313  ICONDIR=$withval
7314else
7315  test -z "$ICONDIR" && ICONDIR=no
7316fi;
7317
7318if test "x$ICONDIR" = xauto
7319then
7320	ICONDIR='${datadir}/icons'
7321	for cf_path in \
7322		/usr/share/icons \
7323		/usr/X11R6/share/icons
7324	do
7325		if test -d "$cf_path" ; then
7326			ICONDIR="$cf_path"
7327			break
7328		fi
7329	done
7330else
7331	cf_path=$ICONDIR
7332
7333if test "x$prefix" != xNONE; then
7334	cf_path_syntax="$prefix"
7335else
7336	cf_path_syntax="$ac_default_prefix"
7337fi
7338
7339case ".$cf_path" in
7340(.\$\(*\)*|.\'*\'*)
7341	;;
7342(..|./*|.\\*)
7343	;;
7344(.[a-zA-Z]:[\\/]*) # OS/2 EMX
7345	;;
7346(.\$\{*prefix\}*|.\$\{*dir\}*)
7347	eval cf_path="$cf_path"
7348	case ".$cf_path" in
7349	(.NONE/*)
7350		cf_path=`echo "$cf_path" | sed -e s%NONE%$cf_path_syntax%`
7351		;;
7352	esac
7353	;;
7354(.no|.NONE/*)
7355	cf_path=`echo "$cf_path" | sed -e s%NONE%$cf_path_syntax%`
7356	;;
7357(*)
7358	{ { echo "$as_me:7358: error: expected a pathname, not \"$cf_path\"" >&5
7359echo "$as_me: error: expected a pathname, not \"$cf_path\"" >&2;}
7360   { (exit 1); exit 1; }; }
7361	;;
7362esac
7363
7364fi
7365echo "$as_me:7365: result: $ICONDIR" >&5
7366echo "${ECHO_T}$ICONDIR" >&6
7367
7368no_icondir=
7369if test "$ICONDIR" = no
7370then
7371	no_icondir="#"
7372else
7373	EXTRA_INSTALL_DIRS="$EXTRA_INSTALL_DIRS \$(ICONDIR)"
7374fi
7375
7376echo "$as_me:7376: checking if icon theme should be used" >&5
7377echo $ECHO_N "checking if icon theme should be used... $ECHO_C" >&6
7378
7379# Check whether --with-icon-theme or --without-icon-theme was given.
7380if test "${with_icon_theme+set}" = set; then
7381  withval="$with_icon_theme"
7382  ICON_THEME=$withval
7383else
7384  ICON_THEME=no
7385fi;
7386
7387case "x$ICON_THEME" in
7388(xno)
7389	;;
7390(x|xyes)
7391	ICON_THEME=hicolor
7392	;;
7393esac
7394echo "$as_me:7394: result: $ICON_THEME" >&5
7395echo "${ECHO_T}$ICON_THEME" >&6
7396
7397if test "x$ICON_THEME" = xno
7398then
7399	if test "x$ICONDIR" != xno
7400	then
7401		test -n "$verbose" && echo "	ignoring icondir without theme" 1>&6
7402
7403echo "${as_me:-configure}:7403: testing ignoring icondir without theme ..." 1>&5
7404
7405		no_icondir="#"
7406	fi
7407else
7408	if test "x$ICONDIR" = xno
7409	then
7410		{ { echo "$as_me:7410: error: icondir must be set for icon theme" >&5
7411echo "$as_me: error: icondir must be set for icon theme" >&2;}
7412   { (exit 1); exit 1; }; }
7413	fi
7414fi
7415
7416: ${ICON_FORMAT:=".svg .png .xpm"}
7417
7418ICON_LIST=
7419
7420if test "x$ICON_THEME" != xno
7421then
7422	cf_icon_list="$cf_cv_icon_list"
7423else
7424	cf_icon_list="icons/${ICON_NAME}_48x48"
7425fi
7426
7427echo "$as_me:7427: checking for icon(s) to install" >&5
7428echo $ECHO_N "checking for icon(s) to install... $ECHO_C" >&6
7429for cf_name in $cf_icon_list
7430do
7431	test -n "$verbose" && echo "	using $ICON_FORMAT" 1>&6
7432
7433echo "${as_me:-configure}:7433: testing using $ICON_FORMAT ..." 1>&5
7434
7435	for cf_suffix in $ICON_FORMAT
7436	do
7437		cf_icon="${cf_name}${cf_suffix}"
7438		cf_left=`echo "$cf_icon" | sed -e 's/:.*//'`
7439		if test ! -f "${cf_left}"
7440		then
7441			if test "x$srcdir" != "x."
7442			then
7443				cf_icon="${srcdir}/${cf_left}"
7444				cf_left=`echo "$cf_icon" | sed -e 's/:.*//'`
7445				if test ! -f "${cf_left}"
7446				then
7447					continue
7448				fi
7449			else
7450				continue
7451			fi
7452		fi
7453		if test "x$ICON_THEME" != xno
7454		then
7455			cf_base=`basename "$cf_left"`
7456			cf_trim=`echo "$cf_base" | sed -e 's/_[0-9][0-9]x[0-9][0-9]\././'`
7457			case "x${cf_base}" in
7458			(*:*)
7459				cf_next=$cf_base
7460				# user-defined mapping
7461				;;
7462			(*.png)
7463				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'`
7464				if test -z "$cf_size"
7465				then
7466					{ echo "$as_me:7466: WARNING: cannot determine size of $cf_left" >&5
7467echo "$as_me: WARNING: cannot determine size of $cf_left" >&2;}
7468					continue
7469				fi
7470				cf_next="$cf_size/apps/$cf_trim"
7471				;;
7472			(*.svg)
7473				cf_next="scalable/apps/$cf_trim"
7474				;;
7475			(*.xpm)
7476				test -n "$verbose" && echo "	ignored XPM file in icon theme" 1>&6
7477
7478echo "${as_me:-configure}:7478: testing ignored XPM file in icon theme ..." 1>&5
7479
7480				continue
7481				;;
7482			(*_[0-9][0-9]*x[0-9][0-9]*.*)
7483				cf_size=`echo "$cf_left"|sed -e 's/^.*_\([0-9][0-9]*x[0-9][0-9]*\)\..*$/\1/'`
7484				cf_left=`echo "$cf_left"|sed -e 's/^\(.*\)_\([0-9][0-9]*x[0-9][0-9]*\)\(\..*\)$/\1\3/'`
7485				cf_next="$cf_size/apps/$cf_base"
7486				;;
7487			esac
7488			test -n "$verbose" && echo "	adding $cf_next" 1>&6
7489
7490echo "${as_me:-configure}:7490: testing adding $cf_next ..." 1>&5
7491
7492			cf_icon="${cf_icon}:${cf_next}"
7493		fi
7494		test -n "$ICON_LIST" && ICON_LIST="$ICON_LIST "
7495		ICON_LIST="$ICON_LIST${cf_icon}"
7496		if test -z "$ICON_NAME"
7497		then
7498			ICON_NAME=`basename "$cf_icon" | sed -e 's/[.:].*//'`
7499		fi
7500	done
7501done
7502
7503if test -n "$verbose"
7504then
7505	echo "$as_me:7505: checking result" >&5
7506echo $ECHO_N "checking result... $ECHO_C" >&6
7507fi
7508echo "$as_me:7508: result: $ICON_LIST" >&5
7509echo "${ECHO_T}$ICON_LIST" >&6
7510
7511if test -z "$ICON_LIST"
7512then
7513	{ { echo "$as_me:7513: error: no icons found" >&5
7514echo "$as_me: error: no icons found" >&2;}
7515   { (exit 1); exit 1; }; }
7516fi
7517
7518echo "$as_me:7518: checking for icon name" >&5
7519echo $ECHO_N "checking for icon name... $ECHO_C" >&6
7520echo "$as_me:7520: result: $ICON_NAME" >&5
7521echo "${ECHO_T}$ICON_NAME" >&6
7522
7523# Comment-out the install-desktop rule if the desktop-utils are not found.
7524echo "$as_me:7524: checking if you want to install desktop files" >&5
7525echo $ECHO_N "checking if you want to install desktop files... $ECHO_C" >&6
7526
7527# Check whether --enable-desktop or --disable-desktop was given.
7528if test "${enable_desktop+set}" = set; then
7529  enableval="$enable_desktop"
7530  test "$enableval" != no && enableval=yes
7531	if test "$enableval" != "yes" ; then
7532    enable_desktop=$enableval
7533	else
7534		enable_desktop=$enableval
7535	fi
7536else
7537  enableval=yes
7538	enable_desktop=$enableval
7539
7540fi;
7541echo "$as_me:7541: result: $enable_desktop" >&5
7542echo "${ECHO_T}$enable_desktop" >&6
7543
7544desktop_utils=
7545if test "$enable_desktop" = yes ; then
7546# Extract the first word of "desktop-file-install", so it can be a program name with args.
7547set dummy desktop-file-install; ac_word=$2
7548echo "$as_me:7548: checking for $ac_word" >&5
7549echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7550if test "${ac_cv_prog_desktop_utils+set}" = set; then
7551  echo $ECHO_N "(cached) $ECHO_C" >&6
7552else
7553  if test -n "$desktop_utils"; then
7554  ac_cv_prog_desktop_utils="$desktop_utils" # Let the user override the test.
7555else
7556  ac_save_IFS=$IFS; IFS=$ac_path_separator
7557ac_dummy="$PATH"
7558for ac_dir in $ac_dummy; do
7559  IFS=$ac_save_IFS
7560  test -z "$ac_dir" && ac_dir=.
7561  $as_executable_p "$ac_dir/$ac_word" || continue
7562ac_cv_prog_desktop_utils="yes"
7563echo "$as_me:7563: found $ac_dir/$ac_word" >&5
7564break
7565done
7566
7567  test -z "$ac_cv_prog_desktop_utils" && ac_cv_prog_desktop_utils="no"
7568fi
7569fi
7570desktop_utils=$ac_cv_prog_desktop_utils
7571if test -n "$desktop_utils"; then
7572  echo "$as_me:7572: result: $desktop_utils" >&5
7573echo "${ECHO_T}$desktop_utils" >&6
7574else
7575  echo "$as_me:7575: result: no" >&5
7576echo "${ECHO_T}no" >&6
7577fi
7578
7579fi
7580
7581test "$desktop_utils" = yes && desktop_utils= || desktop_utils="#"
7582
7583if test -z "$desktop_utils"
7584then
7585	echo "$as_me:7585: checking for requested desktop-category" >&5
7586echo $ECHO_N "checking for requested desktop-category... $ECHO_C" >&6
7587
7588# Check whether --with-desktop-category or --without-desktop-category was given.
7589if test "${with_desktop_category+set}" = set; then
7590  withval="$with_desktop_category"
7591  cf_desktop_want=$withval
7592else
7593  cf_desktop_want=auto
7594fi;
7595	echo "$as_me:7595: result: $cf_desktop_want" >&5
7596echo "${ECHO_T}$cf_desktop_want" >&6
7597
7598	if test "$cf_desktop_want" = auto
7599	then
7600		rm -rf conftest*
7601		cf_desktop_also=
7602		for cf_desktop_dir in  \
7603			/usr/share/app-install \
7604			/usr/share/applications
7605		do
7606			if test -d $cf_desktop_dir
7607			then
7608				find $cf_desktop_dir -name '*.desktop' | \
7609				while true
7610				do
7611					read cf_desktop_path
7612					test -z "$cf_desktop_path" && break
7613					cf_desktop_name=`basename "$cf_desktop_path" .desktop`
7614					case $cf_desktop_name in
7615					(xterm|*-xterm|*rxvt*|*konsole|*[Tt]erminal)
7616						test -n "$verbose" && echo "	inspect $cf_desktop_path" 1>&6
7617
7618echo "${as_me:-configure}:7618: testing inspect $cf_desktop_path ..." 1>&5
7619
7620						${EGREP-egrep} '^Categories=' "$cf_desktop_path" | \
7621							tr ';' '\n' | \
7622							sed -e 's%^.*=%%' -e '/^$/d' >>conftest.1
7623						;;
7624					esac
7625				done
7626			fi
7627		done
7628		if test -s conftest.1
7629		then
7630			cf_desktop_last=
7631			sort conftest.1 | \
7632			while true
7633			do
7634				read cf_desktop_this
7635				test -z "$cf_desktop_this" && break
7636				if test -s conftest.2
7637				then
7638					grep -w "$cf_desktop_this" conftest.2 >/dev/null && continue
7639				elif test -s conftest.3
7640				then
7641					grep -w "$cf_desktop_this" conftest.3 >/dev/null && continue
7642				fi
7643				case "$cf_desktop_this" in
7644				(-*)
7645					;;
7646				(Qt*|*Xfce*|*[ABCDEFGHIJKLMNOPQRSTUVWXYZ][ABCDEFGHIJKLMNOPQRSTUVWXYZ]*)
7647					test -n "$verbose" && echo "	ignored $cf_desktop_this" 1>&6
7648
7649echo "${as_me:-configure}:7649: testing ignored $cf_desktop_this ..." 1>&5
7650
7651					echo "$cf_desktop_this" >> conftest.3
7652					;;
7653				(System|TerminalEmulator|*)
7654					test -n "$verbose" && echo "	applied $cf_desktop_this" 1>&6
7655
7656echo "${as_me:-configure}:7656: testing applied $cf_desktop_this ..." 1>&5
7657
7658					test "x$cf_desktop_last" != "x$cf_desktop_this" && echo "$cf_desktop_this" >>conftest.2
7659					;;
7660				esac
7661				cf_desktop_last=$cf_desktop_this
7662			done
7663			cf_desktop_want="`tr '\n' ';' < conftest.2`"
7664		fi
7665		if test -n "$cf_desktop_want"
7666		then
7667			if test "$cf_desktop_want" = auto
7668			then
7669				cf_desktop_want=
7670			else
7671				# do a sanity check on the semicolon-separated list, ignore on failure
7672				cf_desktop_test=`echo "$cf_desktop_want" | sed -e 's/[^;]//g'`
7673				test -z "$cf_desktop_test" && cf_desktop_want=
7674				cf_desktop_test=`echo "$cf_desktop_want" | sed -e 's/^.*;$/./g'`
7675				test -z "$cf_desktop_test" && cf_desktop_want=
7676			fi
7677		fi
7678		if test -z "$cf_desktop_want"
7679		then
7680			cf_desktop_want="`echo "System|TerminalEmulator|*" | sed -e 's/\*//g' -e 's/|/;/g' -e 's/;*$/;/g'`"
7681			test -n "$verbose" && echo "	no usable value found for desktop category" 1>&6
7682
7683echo "${as_me:-configure}:7683: testing no usable value found for desktop category ..." 1>&5
7684
7685		fi
7686	fi
7687	DESKTOP_CATEGORY=`echo "$cf_desktop_want" | sed -e 's/[ ,]/;/g'`
7688	test -n "$verbose" && echo "	will use Categories=$DESKTOP_CATEGORY" 1>&6
7689
7690echo "${as_me:-configure}:7690: testing will use Categories=$DESKTOP_CATEGORY ..." 1>&5
7691
7692fi
7693
7694echo "$as_me:7694: checking for install-permissions reference" >&5
7695echo $ECHO_N "checking for install-permissions reference... $ECHO_C" >&6
7696
7697# Check whether --with-reference or --without-reference was given.
7698if test "${with_reference+set}" = set; then
7699  withval="$with_reference"
7700  with_reference=$withval
7701else
7702  with_reference=xterm
7703fi;
7704echo "$as_me:7704: result: $with_reference" >&5
7705echo "${ECHO_T}$with_reference" >&6
7706
7707with_full_paths=yes
7708
7709	echo "$as_me:7709: checking for PATH separator" >&5
7710echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
7711	case "$cf_cv_system_name" in
7712	(os2*)	PATH_SEPARATOR=';'  ;;
7713	(*)	${PATH_SEPARATOR:=':'}  ;;
7714	esac
7715
7716	echo "$as_me:7716: result: $PATH_SEPARATOR" >&5
7717echo "${ECHO_T}$PATH_SEPARATOR" >&6
7718
7719test -z "$XTERM_PATH" && XTERM_PATH="$with_reference"
7720for ac_prog in $XTERM_PATH $with_reference
7721do
7722  # Extract the first word of "$ac_prog", so it can be a program name with args.
7723set dummy $ac_prog; ac_word=$2
7724echo "$as_me:7724: checking for $ac_word" >&5
7725echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7726if test "${ac_cv_path_XTERM_PATH+set}" = set; then
7727  echo $ECHO_N "(cached) $ECHO_C" >&6
7728else
7729  case $XTERM_PATH in
7730  [\\/]* | ?:[\\/]*)
7731  ac_cv_path_XTERM_PATH="$XTERM_PATH" # Let the user override the test with a path.
7732  ;;
7733  *)
7734  ac_save_IFS=$IFS; IFS=$ac_path_separator
7735ac_dummy="$PATH"
7736for ac_dir in $ac_dummy; do
7737  IFS=$ac_save_IFS
7738  test -z "$ac_dir" && ac_dir=.
7739  if $as_executable_p "$ac_dir/$ac_word"; then
7740   ac_cv_path_XTERM_PATH="$ac_dir/$ac_word"
7741   echo "$as_me:7741: found $ac_dir/$ac_word" >&5
7742   break
7743fi
7744done
7745
7746  ;;
7747esac
7748fi
7749XTERM_PATH=$ac_cv_path_XTERM_PATH
7750
7751if test -n "$XTERM_PATH"; then
7752  echo "$as_me:7752: result: $XTERM_PATH" >&5
7753echo "${ECHO_T}$XTERM_PATH" >&6
7754else
7755  echo "$as_me:7755: result: no" >&5
7756echo "${ECHO_T}no" >&6
7757fi
7758
7759  test -n "$XTERM_PATH" && break
7760done
7761test -n "$XTERM_PATH" || XTERM_PATH="$XTERM_PATH"
7762
7763cf_path_prog=""
7764cf_path_args=""
7765IFS="${IFS:- 	}"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
7766for cf_temp in $ac_cv_path_XTERM_PATH
7767do
7768	if test -z "$cf_path_prog" ; then
7769		if test "$with_full_paths" = yes ; then
7770
7771if test "x$prefix" != xNONE; then
7772	cf_path_syntax="$prefix"
7773else
7774	cf_path_syntax="$ac_default_prefix"
7775fi
7776
7777case ".$cf_temp" in
7778(.\$\(*\)*|.\'*\'*)
7779	;;
7780(..|./*|.\\*)
7781	;;
7782(.[a-zA-Z]:[\\/]*) # OS/2 EMX
7783	;;
7784(.\$\{*prefix\}*|.\$\{*dir\}*)
7785	eval cf_temp="$cf_temp"
7786	case ".$cf_temp" in
7787	(.NONE/*)
7788		cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
7789		;;
7790	esac
7791	;;
7792(.no|.NONE/*)
7793	cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
7794	;;
7795(*)
7796	break
7797	;;
7798esac
7799
7800			cf_path_prog="$cf_temp"
7801		else
7802			cf_path_prog="`basename "$cf_temp"`"
7803		fi
7804	elif test -z "$cf_path_args" ; then
7805		cf_path_args="$cf_temp"
7806	else
7807		cf_path_args="$cf_path_args $cf_temp"
7808	fi
7809done
7810IFS="$cf_save_ifs"
7811
7812if test -n "$cf_path_prog" ; then
7813
7814echo "${as_me:-configure}:7814: testing defining path for ${cf_path_prog} ..." 1>&5
7815
7816cat >>confdefs.h <<EOF
7817#define XTERM_PATH_PATH "$cf_path_prog"
7818EOF
7819
7820	test -n "$cf_path_args" &&
7821cat >>confdefs.h <<EOF
7822#define XTERM_PATH_ARGS "$cf_path_args"
7823EOF
7824
7825fi
7826
7827# If any of --program-prefix, --program-suffix or --program-transform-name is
7828# given, accept an option tell the makefile to create a symbolic link, e.g.,
7829# to "xterm" on install.
7830XTERM_SYMLINK=NONE
7831
7832if test "$program_transform_name" != "'s,,,'" ; then
7833cf_name=`echo "$program_transform_name" | sed -e 's,\\$\\$,$,g'`
7834cf_name=`echo xterm |sed -e "$cf_name"`
7835echo "$as_me:7835: checking for symbolic link to create to $cf_name" >&5
7836echo $ECHO_N "checking for symbolic link to create to $cf_name... $ECHO_C" >&6
7837
7838# Check whether --with-xterm-symlink or --without-xterm-symlink was given.
7839if test "${with_xterm_symlink+set}" = set; then
7840  withval="$with_xterm_symlink"
7841  with_symlink=$withval
7842else
7843  with_symlink=xterm
7844fi;
7845echo "$as_me:7845: result: $with_symlink" >&5
7846echo "${ECHO_T}$with_symlink" >&6
7847test "$with_symlink" = yes && with_symlink=xterm
7848test -n "$with_symlink" && \
7849	test "$with_symlink" != no && \
7850	test "$with_symlink" != "$cf_name" && \
7851	XTERM_SYMLINK="$with_symlink"
7852fi
7853
7854echo "$as_me:7854: checking if you want to disable openpty" >&5
7855echo $ECHO_N "checking if you want to disable openpty... $ECHO_C" >&6
7856
7857# Check whether --enable-openpty or --disable-openpty was given.
7858if test "${enable_openpty+set}" = set; then
7859  enableval="$enable_openpty"
7860  test "$enableval" != no && enableval=yes
7861	if test "$enableval" != "yes" ; then
7862    disable_openpty=yes
7863	else
7864		disable_openpty=no
7865	fi
7866else
7867  enableval=yes
7868	disable_openpty=no
7869
7870fi;
7871echo "$as_me:7871: result: $disable_openpty" >&5
7872echo "${ECHO_T}$disable_openpty" >&6
7873
7874echo "$as_me:7874: checking if you want to disable setuid" >&5
7875echo $ECHO_N "checking if you want to disable setuid... $ECHO_C" >&6
7876
7877# Check whether --enable-setuid or --disable-setuid was given.
7878if test "${enable_setuid+set}" = set; then
7879  enableval="$enable_setuid"
7880  test "$enableval" != no && enableval=yes
7881	if test "$enableval" != "yes" ; then
7882    disable_setuid=yes
7883	else
7884		disable_setuid=no
7885	fi
7886else
7887  enableval=yes
7888	disable_setuid=no
7889
7890fi;
7891echo "$as_me:7891: result: $disable_setuid" >&5
7892echo "${ECHO_T}$disable_setuid" >&6
7893
7894echo "$as_me:7894: checking if you want to disable setgid" >&5
7895echo $ECHO_N "checking if you want to disable setgid... $ECHO_C" >&6
7896
7897# Check whether --enable-setgid or --disable-setgid was given.
7898if test "${enable_setgid+set}" = set; then
7899  enableval="$enable_setgid"
7900  test "$enableval" != no && enableval=yes
7901	if test "$enableval" != "yes" ; then
7902    disable_setgid=yes
7903	else
7904		disable_setgid=no
7905	fi
7906else
7907  enableval=yes
7908	disable_setgid=no
7909
7910fi;
7911echo "$as_me:7911: result: $disable_setgid" >&5
7912echo "${ECHO_T}$disable_setgid" >&6
7913
7914echo "$as_me:7914: checking if you want to run xterm setuid to a given user" >&5
7915echo $ECHO_N "checking if you want to run xterm setuid to a given user... $ECHO_C" >&6
7916
7917# Check whether --with-setuid or --without-setuid was given.
7918if test "${with_setuid+set}" = set; then
7919  withval="$with_setuid"
7920  use_given_setuid=$withval
7921else
7922  use_given_setuid=no
7923fi;
7924echo "$as_me:7924: result: $use_given_setuid" >&5
7925echo "${ECHO_T}$use_given_setuid" >&6
7926
7927if test "$use_given_setuid" != no ; then
7928	if test "$use_given_setuid" = yes ; then
7929		cf_cv_given_setuid=root
7930	else
7931		cf_cv_given_setuid=$use_given_setuid
7932	fi
7933	# inherit SINSTALL_OPTS from environment to allow packager to customize it.
7934	SINSTALL_OPTS="$SINSTALL_OPTS u+s -u $cf_cv_given_setuid"
7935fi
7936
7937echo "$as_me:7937: checking if you want to run xterm setgid to match utmp/utmpx file" >&5
7938echo $ECHO_N "checking if you want to run xterm setgid to match utmp/utmpx file... $ECHO_C" >&6
7939
7940# Check whether --with-utmp-setgid or --without-utmp-setgid was given.
7941if test "${with_utmp_setgid+set}" = set; then
7942  withval="$with_utmp_setgid"
7943  use_utmp_setgid=$withval
7944else
7945  use_utmp_setgid=no
7946fi;
7947echo "$as_me:7947: result: $use_utmp_setgid" >&5
7948echo "${ECHO_T}$use_utmp_setgid" >&6
7949
7950if test "$use_utmp_setgid" != no ; then
7951	if test "$use_utmp_setgid" = yes ; then
7952
7953if test $cf_cv_have_utmp != no ; then
7954echo "$as_me:7954: checking for utmp/utmpx group" >&5
7955echo $ECHO_N "checking for utmp/utmpx group... $ECHO_C" >&6
7956if test "${cf_cv_utmp_group+set}" = set; then
7957  echo $ECHO_N "(cached) $ECHO_C" >&6
7958else
7959
7960for cf_utmp_path in /var/adm /var/run
7961do
7962	for cf_utmp_file in utmpx utmp
7963	do
7964		if test -f $cf_utmp_path/$cf_utmp_file
7965		then
7966			cf_cv_utmp_group=root
7967
7968			cf_option="-lL"
7969
7970			# Expect listing to have fields like this:
7971			#-r--r--r--   1 user      group       34293 Jul 18 16:29 pathname
7972			ls "$cf_option" "$cf_utmp_path/$cf_utmp_file" >conftest
7973			read cf_mode cf_links cf_usr cf_grp cf_size cf_date1 cf_date2 cf_date3 cf_rest <conftest
7974			if test -z "$cf_rest" ; then
7975				cf_option="${cf_option}g"
7976				ls "$cf_option" "$cf_utmp_path/$cf_utmp_file" >conftest
7977				read cf_mode cf_links cf_usr cf_grp cf_size cf_date1 cf_date2 cf_date3 cf_rest <conftest
7978			fi
7979			rm -f conftest
7980
7981			# If we have a pathname, and the date fields look right, assume we've
7982			# captured the group as well.
7983			if test -n "$cf_rest" ; then
7984				cf_test=`echo "${cf_date2}${cf_date3}" | sed -e 's/[0-9:]//g'`
7985				if test -z "$cf_test" ; then
7986					cf_cv_utmp_group=$cf_grp;
7987				fi
7988			fi
7989			break
7990		fi
7991	done
7992	test -n "$cf_cv_utmp_group" && break
7993done
7994
7995fi
7996echo "$as_me:7996: result: $cf_cv_utmp_group" >&5
7997echo "${ECHO_T}$cf_cv_utmp_group" >&6
7998else
7999	{ { echo "$as_me:7999: error: cannot find utmp group" >&5
8000echo "$as_me: error: cannot find utmp group" >&2;}
8001   { (exit 1); exit 1; }; }
8002fi
8003
8004	else
8005		cf_cv_utmp_group=$use_utmp_setgid
8006	fi
8007	if test "$cf_cv_posix_saved_ids" != yes ; then
8008		{ { echo "$as_me:8008: error: Your system does not support POSIX saved-ids" >&5
8009echo "$as_me: error: Your system does not support POSIX saved-ids" >&2;}
8010   { (exit 1); exit 1; }; }
8011	fi
8012
8013cat >>confdefs.h <<\EOF
8014#define USE_UTMP_SETGID 1
8015EOF
8016
8017	SINSTALL_OPTS="$SINSTALL_OPTS g+s -g $cf_cv_utmp_group"
8018fi
8019
8020echo "$as_me:8020: checking if you want to link with utempter" >&5
8021echo $ECHO_N "checking if you want to link with utempter... $ECHO_C" >&6
8022
8023# Check whether --with-utempter or --without-utempter was given.
8024if test "${with_utempter+set}" = set; then
8025  withval="$with_utempter"
8026  use_utempter=$withval
8027else
8028  use_utempter=no
8029fi;
8030echo "$as_me:8030: result: $use_utempter" >&5
8031echo "${ECHO_T}$use_utempter" >&6
8032
8033if test "$use_utempter" = yes ; then
8034
8035echo "$as_me:8035: checking if we can link with utempter library" >&5
8036echo $ECHO_N "checking if we can link with utempter library... $ECHO_C" >&6
8037if test "${cf_cv_have_utempter+set}" = set; then
8038  echo $ECHO_N "(cached) $ECHO_C" >&6
8039else
8040
8041cf_save_LIBS="$LIBS"
8042
8043cf_add_libs="$LIBS"
8044# reverse order
8045cf_add_0lib=
8046for cf_add_1lib in -lutempter; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8047# filter duplicates
8048for cf_add_1lib in $cf_add_0lib; do
8049	for cf_add_2lib in $cf_add_libs; do
8050		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8051			cf_add_1lib=
8052			break
8053		fi
8054	done
8055	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8056done
8057LIBS="$cf_add_libs"
8058
8059cat >"conftest.$ac_ext" <<_ACEOF
8060#line 8060 "configure"
8061#include "confdefs.h"
8062
8063#include <utempter.h>
8064
8065int
8066main (void)
8067{
8068
8069	addToUtmp("/dev/tty", 0, 1);
8070	removeFromUtmp();
8071
8072  ;
8073  return 0;
8074}
8075_ACEOF
8076rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8077if { (eval echo "$as_me:8077: \"$ac_link\"") >&5
8078  (eval $ac_link) 2>&5
8079  ac_status=$?
8080  echo "$as_me:8080: \$? = $ac_status" >&5
8081  (exit "$ac_status"); } &&
8082         { ac_try='test -s "conftest$ac_exeext"'
8083  { (eval echo "$as_me:8083: \"$ac_try\"") >&5
8084  (eval $ac_try) 2>&5
8085  ac_status=$?
8086  echo "$as_me:8086: \$? = $ac_status" >&5
8087  (exit "$ac_status"); }; }; then
8088
8089	cf_cv_have_utempter=yes
8090else
8091  echo "$as_me: failed program was:" >&5
8092cat "conftest.$ac_ext" >&5
8093
8094	cf_cv_have_utempter=no
8095fi
8096rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8097LIBS="$cf_save_LIBS"
8098
8099fi
8100echo "$as_me:8100: result: $cf_cv_have_utempter" >&5
8101echo "${ECHO_T}$cf_cv_have_utempter" >&6
8102if test "$cf_cv_have_utempter" = yes ; then
8103
8104cat >>confdefs.h <<\EOF
8105#define USE_UTEMPTER 1
8106EOF
8107
8108cf_add_libs="$LIBS"
8109# reverse order
8110cf_add_0lib=
8111for cf_add_1lib in -lutempter; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8112# filter duplicates
8113for cf_add_1lib in $cf_add_0lib; do
8114	for cf_add_2lib in $cf_add_libs; do
8115		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8116			cf_add_1lib=
8117			break
8118		fi
8119	done
8120	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8121done
8122LIBS="$cf_add_libs"
8123
8124fi
8125
8126	test "$cf_cv_have_utempter" != yes && use_utempter=no
8127else
8128	use_utempter=no
8129fi
8130
8131# Some configurations permit (or require) either setuid or setgid mode.
8132# Let the user decide.
8133if test "$use_utempter" = yes ; then
8134	if test "${enable_setuid+set}" != set ; then
8135		disable_setuid=yes
8136		test -n "$verbose" && echo "	No --disable-setuid option given, force to yes" 1>&6
8137
8138echo "${as_me:-configure}:8138: testing No --disable-setuid option given, force to yes ..." 1>&5
8139
8140	fi
8141fi
8142
8143###	checks for external data
8144
8145echo "$as_me:8145: checking if external errno is declared" >&5
8146echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
8147if test "${cf_cv_dcl_errno+set}" = set; then
8148  echo $ECHO_N "(cached) $ECHO_C" >&6
8149else
8150
8151	cat >"conftest.$ac_ext" <<_ACEOF
8152#line 8152 "configure"
8153#include "confdefs.h"
8154
8155#ifdef HAVE_STDLIB_H
8156#include <stdlib.h>
8157#endif
8158#include <stdio.h>
8159#include <sys/types.h>
8160#include <errno.h>
8161int
8162main (void)
8163{
8164int x = (int) errno; (void)x
8165  ;
8166  return 0;
8167}
8168_ACEOF
8169rm -f "conftest.$ac_objext"
8170if { (eval echo "$as_me:8170: \"$ac_compile\"") >&5
8171  (eval $ac_compile) 2>&5
8172  ac_status=$?
8173  echo "$as_me:8173: \$? = $ac_status" >&5
8174  (exit "$ac_status"); } &&
8175         { ac_try='test -s "conftest.$ac_objext"'
8176  { (eval echo "$as_me:8176: \"$ac_try\"") >&5
8177  (eval $ac_try) 2>&5
8178  ac_status=$?
8179  echo "$as_me:8179: \$? = $ac_status" >&5
8180  (exit "$ac_status"); }; }; then
8181  cf_cv_dcl_errno=yes
8182else
8183  echo "$as_me: failed program was:" >&5
8184cat "conftest.$ac_ext" >&5
8185cf_cv_dcl_errno=no
8186fi
8187rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8188
8189fi
8190echo "$as_me:8190: result: $cf_cv_dcl_errno" >&5
8191echo "${ECHO_T}$cf_cv_dcl_errno" >&6
8192
8193if test "$cf_cv_dcl_errno" = no ; then
8194
8195cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
8196
8197	cat >>confdefs.h <<EOF
8198#define $cf_result 1
8199EOF
8200
8201fi
8202
8203# It's possible (for near-UNIX clones) that the data doesn't exist
8204
8205echo "$as_me:8205: checking if external errno exists" >&5
8206echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
8207if test "${cf_cv_have_errno+set}" = set; then
8208  echo $ECHO_N "(cached) $ECHO_C" >&6
8209else
8210
8211	cat >"conftest.$ac_ext" <<_ACEOF
8212#line 8212 "configure"
8213#include "confdefs.h"
8214
8215#undef errno
8216extern int errno;
8217
8218int
8219main (void)
8220{
8221errno = 2
8222  ;
8223  return 0;
8224}
8225_ACEOF
8226rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8227if { (eval echo "$as_me:8227: \"$ac_link\"") >&5
8228  (eval $ac_link) 2>&5
8229  ac_status=$?
8230  echo "$as_me:8230: \$? = $ac_status" >&5
8231  (exit "$ac_status"); } &&
8232         { ac_try='test -s "conftest$ac_exeext"'
8233  { (eval echo "$as_me:8233: \"$ac_try\"") >&5
8234  (eval $ac_try) 2>&5
8235  ac_status=$?
8236  echo "$as_me:8236: \$? = $ac_status" >&5
8237  (exit "$ac_status"); }; }; then
8238  cf_cv_have_errno=yes
8239else
8240  echo "$as_me: failed program was:" >&5
8241cat "conftest.$ac_ext" >&5
8242cf_cv_have_errno=no
8243fi
8244rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8245
8246fi
8247echo "$as_me:8247: result: $cf_cv_have_errno" >&5
8248echo "${ECHO_T}$cf_cv_have_errno" >&6
8249
8250if test "$cf_cv_have_errno" = yes ; then
8251
8252cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
8253
8254	cat >>confdefs.h <<EOF
8255#define $cf_result 1
8256EOF
8257
8258fi
8259
8260echo "$as_me:8260: checking for explicit tty group name" >&5
8261echo $ECHO_N "checking for explicit tty group name... $ECHO_C" >&6
8262
8263# Check whether --with-tty-group or --without-tty-group was given.
8264if test "${with_tty_group+set}" = set; then
8265  withval="$with_tty_group"
8266  cf_tty_group=$withval
8267else
8268  cf_tty_group=auto...
8269fi;
8270test -z "$cf_tty_group"    && cf_tty_group=auto...
8271test "$cf_tty_group" = yes && cf_tty_group=auto...
8272echo "$as_me:8272: result: $cf_tty_group" >&5
8273echo "${ECHO_T}$cf_tty_group" >&6
8274
8275if test "$cf_tty_group" = "auto..." ; then
8276echo "$as_me:8276: checking for tty group name" >&5
8277echo $ECHO_N "checking for tty group name... $ECHO_C" >&6
8278if test "${cf_cv_tty_group_name+set}" = set; then
8279  echo $ECHO_N "(cached) $ECHO_C" >&6
8280else
8281
8282# If we are configuring as root, it is hard to get a clue about the tty group.
8283# But we'll guess based on how our connection is set up - assuming it is done
8284# properly.
8285
8286cf_uid="`id | sed -e 's/^^=*=//' -e 's/(.*$//'`"
8287# )vi
8288if test "$cf_uid" != 0 ; then
8289cf_cv_tty_group_name=
8290cf_tty_name="`tty`"
8291test "$cf_tty_name" = "not a tty" && cf_tty_name=/dev/tty
8292test -z "$cf_tty_name" && cf_tty_name=/dev/tty
8293if test -c "$cf_tty_name"
8294then
8295	cf_option="-lL"
8296
8297	# Expect listing to have fields like this:
8298	#-rwxrwxrwx   1 user      group       34293 Jul 18 16:29 pathname
8299	ls $cf_option "$cf_tty_name" >conftest.out
8300	read cf_mode cf_links cf_usr cf_grp cf_size cf_date1 cf_date2 cf_date3 cf_rest <conftest.out
8301	if test -z "$cf_rest" ; then
8302		cf_option="${cf_option}g"
8303		ls "$cf_option" "$cf_tty_name" >conftest.out
8304		read cf_mode cf_links cf_usr cf_grp cf_size cf_date1 cf_date2 cf_date3 cf_rest <conftest.out
8305	fi
8306	rm -f conftest.out
8307	cf_cv_tty_group_name=$cf_grp
8308fi
8309fi
8310
8311# If we cannot deduce the tty group, fall back on hardcoded cases
8312
8313if test -z "$cf_cv_tty_group_name"
8314then
8315case $host_os in
8316(osf*)
8317	cf_cv_tty_group_name="terminal"
8318	;;
8319(*)
8320	cf_cv_tty_group_name="unknown"
8321	if ( ${EGREP-egrep} '^tty:' /etc/group 2>/dev/null 1>/dev/null ) then
8322		cf_cv_tty_group_name="tty"
8323	fi
8324	;;
8325esac
8326fi
8327
8328fi
8329echo "$as_me:8329: result: $cf_cv_tty_group_name" >&5
8330echo "${ECHO_T}$cf_cv_tty_group_name" >&6
8331cf_tty_group="$cf_cv_tty_group_name"
8332else
8333	# if configure option, always do this
8334
8335cat >>confdefs.h <<\EOF
8336#define USE_TTY_GROUP 1
8337EOF
8338
8339fi
8340
8341cat >>confdefs.h <<EOF
8342#define TTY_GROUP_NAME "$cf_tty_group"
8343EOF
8344
8345# This is only a double-check that the group-name we obtained above really
8346# does apply to the device.  We cannot perform this test if we are in batch
8347# mode, or if we are cross-compiling.
8348
8349echo "$as_me:8349: checking if we may use the $cf_tty_group group" >&5
8350echo $ECHO_N "checking if we may use the $cf_tty_group group... $ECHO_C" >&6
8351if test "${cf_cv_tty_group+set}" = set; then
8352  echo $ECHO_N "(cached) $ECHO_C" >&6
8353else
8354
8355cf_tty_name="`tty`"
8356if test "$cf_tty_name" != "not a tty"
8357then
8358if test "$cross_compiling" = yes; then
8359  cf_cv_tty_group=unknown
8360else
8361  cat >"conftest.$ac_ext" <<_ACEOF
8362#line 8362 "configure"
8363#include "confdefs.h"
8364
8365#include <unistd.h>
8366#include <sys/types.h>
8367#include <sys/stat.h>
8368#include <grp.h>
8369int main(void)
8370{
8371	struct stat sb;
8372	struct group *ttygrp;
8373	int fd;
8374	char *name;
8375
8376	for (fd = 0; fd < 3; ++fd) {
8377		if ((name = ttyname(fd)) != 0)
8378			break;
8379	}
8380	if (name == 0)
8381		name = "/dev/tty";
8382
8383	ttygrp = getgrnam(TTY_GROUP_NAME);
8384	endgrent();
8385
8386	if (ttygrp != 0
8387	 && name != 0
8388	 && stat(name, &sb) == 0
8389	 && sb.st_gid != getgid()
8390	 && sb.st_gid == ttygrp->gr_gid) {
8391		${cf_cv_main_return:-return} (0);
8392	}
8393	${cf_cv_main_return:-return} (1);
8394}
8395
8396_ACEOF
8397rm -f "conftest$ac_exeext"
8398if { (eval echo "$as_me:8398: \"$ac_link\"") >&5
8399  (eval $ac_link) 2>&5
8400  ac_status=$?
8401  echo "$as_me:8401: \$? = $ac_status" >&5
8402  (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
8403  { (eval echo "$as_me:8403: \"$ac_try\"") >&5
8404  (eval $ac_try) 2>&5
8405  ac_status=$?
8406  echo "$as_me:8406: \$? = $ac_status" >&5
8407  (exit "$ac_status"); }; }; then
8408  cf_cv_tty_group=yes
8409else
8410  echo "$as_me: program exited with status $ac_status" >&5
8411echo "$as_me: failed program was:" >&5
8412cat "conftest.$ac_ext" >&5
8413cf_cv_tty_group=no
8414fi
8415rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
8416fi
8417elif test "$cross_compiling" = yes; then
8418	cf_cv_tty_group=unknown
8419else
8420	cf_cv_tty_group=yes
8421fi
8422
8423fi
8424echo "$as_me:8424: result: $cf_cv_tty_group" >&5
8425echo "${ECHO_T}$cf_cv_tty_group" >&6
8426
8427if test $cf_cv_tty_group = no ; then
8428	{ echo "$as_me:8428: WARNING: Cannot use $cf_tty_group group" >&5
8429echo "$as_me: WARNING: Cannot use $cf_tty_group group" >&2;}
8430else
8431	cat >>confdefs.h <<\EOF
8432#define USE_TTY_GROUP 1
8433EOF
8434
8435fi
8436
8437###	checks for system services and user specified options
8438
8439echo "$as_me:8439: checking for X" >&5
8440echo $ECHO_N "checking for X... $ECHO_C" >&6
8441
8442# Check whether --with-x or --without-x was given.
8443if test "${with_x+set}" = set; then
8444  withval="$with_x"
8445
8446fi;
8447# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
8448if test "x$with_x" = xno; then
8449  # The user explicitly disabled X.
8450  have_x=disabled
8451else
8452  if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
8453    # Both variables are already set.
8454    have_x=yes
8455  else
8456    if test "${ac_cv_have_x+set}" = set; then
8457  echo $ECHO_N "(cached) $ECHO_C" >&6
8458else
8459  # One or both of the vars are not set, and there is no cached value.
8460ac_x_includes=no ac_x_libraries=no
8461rm -fr conftest.dir
8462if mkdir conftest.dir; then
8463  cd conftest.dir
8464  # Make sure to not put "make" in the Imakefile rules, since we grep it out.
8465  cat >Imakefile <<'EOF'
8466acfindx:
8467	@echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
8468EOF
8469  if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
8470    # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
8471    eval "`${MAKE-make} acfindx 2>/dev/null | grep -v make`"
8472    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
8473    for ac_extension in a so sl dylib dll; do
8474      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
8475         test -f "$ac_im_libdir/libX11.$ac_extension"; then
8476        ac_im_usrlibdir=$ac_im_libdir; break
8477      fi
8478    done
8479    # Screen out bogus values from the imake configuration.  They are
8480    # bogus both because they are the default anyway, and because
8481    # using them would break gcc on systems where it needs fixed includes.
8482    case $ac_im_incroot in
8483	/usr/include) ;;
8484	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
8485    esac
8486    case $ac_im_usrlibdir in
8487	/usr/lib | /lib) ;;
8488	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
8489    esac
8490  fi
8491  cd ..
8492  rm -fr conftest.dir
8493fi
8494
8495# Standard set of common directories for X headers.
8496# Check X11 before X11Rn because it is often a symlink to the current release.
8497ac_x_header_dirs='
8498/usr/X11/include
8499/usr/X11R7/include
8500/usr/X11R6/include
8501/usr/X11R5/include
8502/usr/X11R4/include
8503
8504/opt/local/include
8505/opt/X11/include
8506
8507/usr/include/X11
8508/usr/include/X11R7
8509/usr/include/X11R6
8510/usr/include/X11R5
8511/usr/include/X11R4
8512
8513/usr/local/X11/include
8514/usr/local/X11R7/include
8515/usr/local/X11R6/include
8516/usr/local/X11R5/include
8517/usr/local/X11R4/include
8518
8519/usr/local/include/X11
8520/usr/local/include/X11R7
8521/usr/local/include/X11R6
8522/usr/local/include/X11R5
8523/usr/local/include/X11R4
8524
8525/usr/X386/include
8526/usr/x386/include
8527/usr/XFree86/include/X11
8528
8529/usr/include
8530/usr/local/include
8531/usr/unsupported/include
8532/usr/athena/include
8533/usr/local/x11r5/include
8534/usr/lpp/Xamples/include
8535
8536/usr/openwin/include
8537/usr/openwin/share/include'
8538
8539if test "$ac_x_includes" = no; then
8540  # Guess where to find include files, by looking for Intrinsic.h.
8541  # First, try using that file with no special directory specified.
8542  cat >"conftest.$ac_ext" <<_ACEOF
8543#line 8543 "configure"
8544#include "confdefs.h"
8545#include <X11/Intrinsic.h>
8546_ACEOF
8547if { (eval echo "$as_me:8547: \"$ac_cpp "conftest.$ac_ext"\"") >&5
8548  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
8549  ac_status=$?
8550  $EGREP -v '^ *\+' conftest.er1 >conftest.err
8551  rm -f conftest.er1
8552  cat conftest.err >&5
8553  echo "$as_me:8553: \$? = $ac_status" >&5
8554  (exit "$ac_status"); } >/dev/null; then
8555  if test -s conftest.err; then
8556    ac_cpp_err=$ac_c_preproc_warn_flag
8557  else
8558    ac_cpp_err=
8559  fi
8560else
8561  ac_cpp_err=yes
8562fi
8563if test -z "$ac_cpp_err"; then
8564  # We can compile using X headers with no special include directory.
8565ac_x_includes=
8566else
8567  echo "$as_me: failed program was:" >&5
8568  cat "conftest.$ac_ext" >&5
8569  for ac_dir in $ac_x_header_dirs; do
8570  if test -r "$ac_dir/X11/Intrinsic.h"; then
8571    ac_x_includes=$ac_dir
8572    break
8573  fi
8574done
8575fi
8576rm -f conftest.err "conftest.$ac_ext"
8577fi # $ac_x_includes = no
8578
8579if test "$ac_x_libraries" = no; then
8580  # Check for the libraries.
8581  # See if we find them without any special options.
8582  # Don't add to $LIBS permanently.
8583  ac_save_LIBS=$LIBS
8584  LIBS="-lXt $LIBS"
8585  cat >"conftest.$ac_ext" <<_ACEOF
8586#line 8586 "configure"
8587#include "confdefs.h"
8588#include <X11/Intrinsic.h>
8589int
8590main (void)
8591{
8592XtMalloc (0)
8593  ;
8594  return 0;
8595}
8596_ACEOF
8597rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8598if { (eval echo "$as_me:8598: \"$ac_link\"") >&5
8599  (eval $ac_link) 2>&5
8600  ac_status=$?
8601  echo "$as_me:8601: \$? = $ac_status" >&5
8602  (exit "$ac_status"); } &&
8603         { ac_try='test -s "conftest$ac_exeext"'
8604  { (eval echo "$as_me:8604: \"$ac_try\"") >&5
8605  (eval $ac_try) 2>&5
8606  ac_status=$?
8607  echo "$as_me:8607: \$? = $ac_status" >&5
8608  (exit "$ac_status"); }; }; then
8609  LIBS=$ac_save_LIBS
8610# We can link X programs with no special library path.
8611ac_x_libraries=
8612else
8613  echo "$as_me: failed program was:" >&5
8614cat "conftest.$ac_ext" >&5
8615LIBS=$ac_save_LIBS
8616for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
8617do
8618  # Don't even attempt the hair of trying to link an X program!
8619  for ac_extension in a so sl dylib dll; do
8620    if test -r "$ac_dir/libXt.$ac_extension"; then
8621      ac_x_libraries=$ac_dir
8622      break 2
8623    fi
8624  done
8625done
8626fi
8627rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8628fi # $ac_x_libraries = no
8629
8630if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
8631  # Didn't find X anywhere.  Cache the known absence of X.
8632  ac_cv_have_x="have_x=no"
8633else
8634  # Record where we found X for the cache.
8635  ac_cv_have_x="have_x=yes \
8636	        ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
8637fi
8638fi
8639
8640  fi
8641  eval "$ac_cv_have_x"
8642fi # $with_x != no
8643
8644if test "$have_x" != yes; then
8645  echo "$as_me:8645: result: $have_x" >&5
8646echo "${ECHO_T}$have_x" >&6
8647  no_x=yes
8648else
8649  # If each of the values was on the command line, it overrides each guess.
8650  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
8651  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
8652  # Update the cache value to reflect the command line values.
8653  ac_cv_have_x="have_x=yes \
8654		ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
8655  echo "$as_me:8655: result: libraries $x_libraries, headers $x_includes" >&5
8656echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6
8657fi
8658
8659if test "$no_x" = yes; then
8660  # Not all programs may use this symbol, but it does not hurt to define it.
8661
8662cat >>confdefs.h <<\EOF
8663#define X_DISPLAY_MISSING 1
8664EOF
8665
8666  X_CFLAGS=
8667  X_PRE_LIBS=
8668  X_LIBS=
8669  X_EXTRA_LIBS=
8670else
8671  if test -n "$x_includes"; then
8672    X_CFLAGS="$X_CFLAGS -I$x_includes"
8673  fi
8674
8675  # It would also be nice to do this for all -L options, not just this one.
8676  if test -n "$x_libraries"; then
8677    X_LIBS="$X_LIBS -L$x_libraries"
8678    # For Solaris; some versions of Sun CC require a space after -R and
8679    # others require no space.  Words are not sufficient . . . .
8680    case `(uname -sr) 2>/dev/null` in
8681    "SunOS 5"*)
8682      echo "$as_me:8682: checking whether -R must be followed by a space" >&5
8683echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6
8684      ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
8685      cat >"conftest.$ac_ext" <<_ACEOF
8686#line 8686 "configure"
8687#include "confdefs.h"
8688
8689int
8690main (void)
8691{
8692
8693  ;
8694  return 0;
8695}
8696_ACEOF
8697rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8698if { (eval echo "$as_me:8698: \"$ac_link\"") >&5
8699  (eval $ac_link) 2>&5
8700  ac_status=$?
8701  echo "$as_me:8701: \$? = $ac_status" >&5
8702  (exit "$ac_status"); } &&
8703         { ac_try='test -s "conftest$ac_exeext"'
8704  { (eval echo "$as_me:8704: \"$ac_try\"") >&5
8705  (eval $ac_try) 2>&5
8706  ac_status=$?
8707  echo "$as_me:8707: \$? = $ac_status" >&5
8708  (exit "$ac_status"); }; }; then
8709  ac_R_nospace=yes
8710else
8711  echo "$as_me: failed program was:" >&5
8712cat "conftest.$ac_ext" >&5
8713ac_R_nospace=no
8714fi
8715rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8716      if test $ac_R_nospace = yes; then
8717	echo "$as_me:8717: result: no" >&5
8718echo "${ECHO_T}no" >&6
8719	X_LIBS="$X_LIBS -R$x_libraries"
8720      else
8721	LIBS="$ac_xsave_LIBS -R $x_libraries"
8722	cat >"conftest.$ac_ext" <<_ACEOF
8723#line 8723 "configure"
8724#include "confdefs.h"
8725
8726int
8727main (void)
8728{
8729
8730  ;
8731  return 0;
8732}
8733_ACEOF
8734rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8735if { (eval echo "$as_me:8735: \"$ac_link\"") >&5
8736  (eval $ac_link) 2>&5
8737  ac_status=$?
8738  echo "$as_me:8738: \$? = $ac_status" >&5
8739  (exit "$ac_status"); } &&
8740         { ac_try='test -s "conftest$ac_exeext"'
8741  { (eval echo "$as_me:8741: \"$ac_try\"") >&5
8742  (eval $ac_try) 2>&5
8743  ac_status=$?
8744  echo "$as_me:8744: \$? = $ac_status" >&5
8745  (exit "$ac_status"); }; }; then
8746  ac_R_space=yes
8747else
8748  echo "$as_me: failed program was:" >&5
8749cat "conftest.$ac_ext" >&5
8750ac_R_space=no
8751fi
8752rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8753	if test $ac_R_space = yes; then
8754	  echo "$as_me:8754: result: yes" >&5
8755echo "${ECHO_T}yes" >&6
8756	  X_LIBS="$X_LIBS -R $x_libraries"
8757	else
8758	  echo "$as_me:8758: result: neither works" >&5
8759echo "${ECHO_T}neither works" >&6
8760	fi
8761      fi
8762      LIBS=$ac_xsave_LIBS
8763    esac
8764  fi
8765
8766  # Check for system-dependent libraries X programs must link with.
8767  # Do this before checking for the system-independent R6 libraries
8768  # (-lICE), since we may need -lsocket or whatever for X linking.
8769
8770  if test "$ISC" = yes; then
8771    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
8772  else
8773    # Martyn Johnson says this is needed for Ultrix, if the X
8774    # libraries were built with DECnet support.  And Karl Berry says
8775    # the Alpha needs dnet_stub (dnet does not exist).
8776    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
8777    cat >"conftest.$ac_ext" <<_ACEOF
8778#line 8778 "configure"
8779#include "confdefs.h"
8780
8781/* Override any gcc2 internal prototype to avoid an error.  */
8782#ifdef __cplusplus
8783extern "C"
8784#endif
8785/* We use char because int might match the return type of a gcc2
8786   builtin and then its argument prototype would still apply.  */
8787char XOpenDisplay ();
8788int
8789main (void)
8790{
8791XOpenDisplay ();
8792  ;
8793  return 0;
8794}
8795_ACEOF
8796rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8797if { (eval echo "$as_me:8797: \"$ac_link\"") >&5
8798  (eval $ac_link) 2>&5
8799  ac_status=$?
8800  echo "$as_me:8800: \$? = $ac_status" >&5
8801  (exit "$ac_status"); } &&
8802         { ac_try='test -s "conftest$ac_exeext"'
8803  { (eval echo "$as_me:8803: \"$ac_try\"") >&5
8804  (eval $ac_try) 2>&5
8805  ac_status=$?
8806  echo "$as_me:8806: \$? = $ac_status" >&5
8807  (exit "$ac_status"); }; }; then
8808  :
8809else
8810  echo "$as_me: failed program was:" >&5
8811cat "conftest.$ac_ext" >&5
8812echo "$as_me:8812: checking for dnet_ntoa in -ldnet" >&5
8813echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6
8814if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
8815  echo $ECHO_N "(cached) $ECHO_C" >&6
8816else
8817  ac_check_lib_save_LIBS=$LIBS
8818LIBS="-ldnet  $LIBS"
8819cat >"conftest.$ac_ext" <<_ACEOF
8820#line 8820 "configure"
8821#include "confdefs.h"
8822
8823/* Override any gcc2 internal prototype to avoid an error.  */
8824#ifdef __cplusplus
8825extern "C"
8826#endif
8827/* We use char because int might match the return type of a gcc2
8828   builtin and then its argument prototype would still apply.  */
8829char dnet_ntoa ();
8830int
8831main (void)
8832{
8833dnet_ntoa ();
8834  ;
8835  return 0;
8836}
8837_ACEOF
8838rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8839if { (eval echo "$as_me:8839: \"$ac_link\"") >&5
8840  (eval $ac_link) 2>&5
8841  ac_status=$?
8842  echo "$as_me:8842: \$? = $ac_status" >&5
8843  (exit "$ac_status"); } &&
8844         { ac_try='test -s "conftest$ac_exeext"'
8845  { (eval echo "$as_me:8845: \"$ac_try\"") >&5
8846  (eval $ac_try) 2>&5
8847  ac_status=$?
8848  echo "$as_me:8848: \$? = $ac_status" >&5
8849  (exit "$ac_status"); }; }; then
8850  ac_cv_lib_dnet_dnet_ntoa=yes
8851else
8852  echo "$as_me: failed program was:" >&5
8853cat "conftest.$ac_ext" >&5
8854ac_cv_lib_dnet_dnet_ntoa=no
8855fi
8856rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8857LIBS=$ac_check_lib_save_LIBS
8858fi
8859echo "$as_me:8859: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
8860echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6
8861if test "$ac_cv_lib_dnet_dnet_ntoa" = yes; then
8862  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
8863fi
8864
8865    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
8866      echo "$as_me:8866: checking for dnet_ntoa in -ldnet_stub" >&5
8867echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6
8868if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then
8869  echo $ECHO_N "(cached) $ECHO_C" >&6
8870else
8871  ac_check_lib_save_LIBS=$LIBS
8872LIBS="-ldnet_stub  $LIBS"
8873cat >"conftest.$ac_ext" <<_ACEOF
8874#line 8874 "configure"
8875#include "confdefs.h"
8876
8877/* Override any gcc2 internal prototype to avoid an error.  */
8878#ifdef __cplusplus
8879extern "C"
8880#endif
8881/* We use char because int might match the return type of a gcc2
8882   builtin and then its argument prototype would still apply.  */
8883char dnet_ntoa ();
8884int
8885main (void)
8886{
8887dnet_ntoa ();
8888  ;
8889  return 0;
8890}
8891_ACEOF
8892rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8893if { (eval echo "$as_me:8893: \"$ac_link\"") >&5
8894  (eval $ac_link) 2>&5
8895  ac_status=$?
8896  echo "$as_me:8896: \$? = $ac_status" >&5
8897  (exit "$ac_status"); } &&
8898         { ac_try='test -s "conftest$ac_exeext"'
8899  { (eval echo "$as_me:8899: \"$ac_try\"") >&5
8900  (eval $ac_try) 2>&5
8901  ac_status=$?
8902  echo "$as_me:8902: \$? = $ac_status" >&5
8903  (exit "$ac_status"); }; }; then
8904  ac_cv_lib_dnet_stub_dnet_ntoa=yes
8905else
8906  echo "$as_me: failed program was:" >&5
8907cat "conftest.$ac_ext" >&5
8908ac_cv_lib_dnet_stub_dnet_ntoa=no
8909fi
8910rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8911LIBS=$ac_check_lib_save_LIBS
8912fi
8913echo "$as_me:8913: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
8914echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6
8915if test "$ac_cv_lib_dnet_stub_dnet_ntoa" = yes; then
8916  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
8917fi
8918
8919    fi
8920fi
8921rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8922    LIBS="$ac_xsave_LIBS"
8923
8924    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
8925    # to get the SysV transport functions.
8926    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
8927    # needs -lnsl.
8928    # The nsl library prevents programs from opening the X display
8929    # on Irix 5.2, according to T.E. Dickey.
8930    # The functions gethostbyname, getservbyname, and inet_addr are
8931    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
8932    echo "$as_me:8932: checking for gethostbyname" >&5
8933echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6
8934if test "${ac_cv_func_gethostbyname+set}" = set; then
8935  echo $ECHO_N "(cached) $ECHO_C" >&6
8936else
8937  cat >"conftest.$ac_ext" <<_ACEOF
8938#line 8938 "configure"
8939#include "confdefs.h"
8940#define gethostbyname autoconf_temporary
8941#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
8942#undef gethostbyname
8943
8944#ifdef __cplusplus
8945extern "C"
8946#endif
8947
8948/* We use char because int might match the return type of a gcc2
8949   builtin and then its argument prototype would still apply.  */
8950char gethostbyname (void);
8951
8952int
8953main (void)
8954{
8955
8956/* The GNU C library defines stubs for functions which it implements
8957    to always fail with ENOSYS.  Some functions are actually named
8958    something starting with __ and the normal name is an alias.  */
8959#if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
8960#error found stub for gethostbyname
8961#endif
8962
8963	return gethostbyname ();
8964  ;
8965  return 0;
8966}
8967_ACEOF
8968rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8969if { (eval echo "$as_me:8969: \"$ac_link\"") >&5
8970  (eval $ac_link) 2>&5
8971  ac_status=$?
8972  echo "$as_me:8972: \$? = $ac_status" >&5
8973  (exit "$ac_status"); } &&
8974         { ac_try='test -s "conftest$ac_exeext"'
8975  { (eval echo "$as_me:8975: \"$ac_try\"") >&5
8976  (eval $ac_try) 2>&5
8977  ac_status=$?
8978  echo "$as_me:8978: \$? = $ac_status" >&5
8979  (exit "$ac_status"); }; }; then
8980  ac_cv_func_gethostbyname=yes
8981else
8982  echo "$as_me: failed program was:" >&5
8983cat "conftest.$ac_ext" >&5
8984ac_cv_func_gethostbyname=no
8985fi
8986rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8987fi
8988echo "$as_me:8988: result: $ac_cv_func_gethostbyname" >&5
8989echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6
8990
8991    if test $ac_cv_func_gethostbyname = no; then
8992      echo "$as_me:8992: checking for gethostbyname in -lnsl" >&5
8993echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6
8994if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
8995  echo $ECHO_N "(cached) $ECHO_C" >&6
8996else
8997  ac_check_lib_save_LIBS=$LIBS
8998LIBS="-lnsl  $LIBS"
8999cat >"conftest.$ac_ext" <<_ACEOF
9000#line 9000 "configure"
9001#include "confdefs.h"
9002
9003/* Override any gcc2 internal prototype to avoid an error.  */
9004#ifdef __cplusplus
9005extern "C"
9006#endif
9007/* We use char because int might match the return type of a gcc2
9008   builtin and then its argument prototype would still apply.  */
9009char gethostbyname ();
9010int
9011main (void)
9012{
9013gethostbyname ();
9014  ;
9015  return 0;
9016}
9017_ACEOF
9018rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9019if { (eval echo "$as_me:9019: \"$ac_link\"") >&5
9020  (eval $ac_link) 2>&5
9021  ac_status=$?
9022  echo "$as_me:9022: \$? = $ac_status" >&5
9023  (exit "$ac_status"); } &&
9024         { ac_try='test -s "conftest$ac_exeext"'
9025  { (eval echo "$as_me:9025: \"$ac_try\"") >&5
9026  (eval $ac_try) 2>&5
9027  ac_status=$?
9028  echo "$as_me:9028: \$? = $ac_status" >&5
9029  (exit "$ac_status"); }; }; then
9030  ac_cv_lib_nsl_gethostbyname=yes
9031else
9032  echo "$as_me: failed program was:" >&5
9033cat "conftest.$ac_ext" >&5
9034ac_cv_lib_nsl_gethostbyname=no
9035fi
9036rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9037LIBS=$ac_check_lib_save_LIBS
9038fi
9039echo "$as_me:9039: result: $ac_cv_lib_nsl_gethostbyname" >&5
9040echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6
9041if test "$ac_cv_lib_nsl_gethostbyname" = yes; then
9042  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
9043fi
9044
9045      if test $ac_cv_lib_nsl_gethostbyname = no; then
9046        echo "$as_me:9046: checking for gethostbyname in -lbsd" >&5
9047echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6
9048if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then
9049  echo $ECHO_N "(cached) $ECHO_C" >&6
9050else
9051  ac_check_lib_save_LIBS=$LIBS
9052LIBS="-lbsd  $LIBS"
9053cat >"conftest.$ac_ext" <<_ACEOF
9054#line 9054 "configure"
9055#include "confdefs.h"
9056
9057/* Override any gcc2 internal prototype to avoid an error.  */
9058#ifdef __cplusplus
9059extern "C"
9060#endif
9061/* We use char because int might match the return type of a gcc2
9062   builtin and then its argument prototype would still apply.  */
9063char gethostbyname ();
9064int
9065main (void)
9066{
9067gethostbyname ();
9068  ;
9069  return 0;
9070}
9071_ACEOF
9072rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9073if { (eval echo "$as_me:9073: \"$ac_link\"") >&5
9074  (eval $ac_link) 2>&5
9075  ac_status=$?
9076  echo "$as_me:9076: \$? = $ac_status" >&5
9077  (exit "$ac_status"); } &&
9078         { ac_try='test -s "conftest$ac_exeext"'
9079  { (eval echo "$as_me:9079: \"$ac_try\"") >&5
9080  (eval $ac_try) 2>&5
9081  ac_status=$?
9082  echo "$as_me:9082: \$? = $ac_status" >&5
9083  (exit "$ac_status"); }; }; then
9084  ac_cv_lib_bsd_gethostbyname=yes
9085else
9086  echo "$as_me: failed program was:" >&5
9087cat "conftest.$ac_ext" >&5
9088ac_cv_lib_bsd_gethostbyname=no
9089fi
9090rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9091LIBS=$ac_check_lib_save_LIBS
9092fi
9093echo "$as_me:9093: result: $ac_cv_lib_bsd_gethostbyname" >&5
9094echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6
9095if test "$ac_cv_lib_bsd_gethostbyname" = yes; then
9096  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
9097fi
9098
9099      fi
9100    fi
9101
9102    # lieder@skyler.mavd.honeywell.com says without -lsocket,
9103    # socket/setsockopt and other routines are undefined under SCO ODT
9104    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
9105    # on later versions), says Simon Leinen: it contains gethostby*
9106    # variants that don't use the nameserver (or something).  -lsocket
9107    # must be given before -lnsl if both are needed.  We assume that
9108    # if connect needs -lnsl, so does gethostbyname.
9109    echo "$as_me:9109: checking for connect" >&5
9110echo $ECHO_N "checking for connect... $ECHO_C" >&6
9111if test "${ac_cv_func_connect+set}" = set; then
9112  echo $ECHO_N "(cached) $ECHO_C" >&6
9113else
9114  cat >"conftest.$ac_ext" <<_ACEOF
9115#line 9115 "configure"
9116#include "confdefs.h"
9117#define connect autoconf_temporary
9118#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
9119#undef connect
9120
9121#ifdef __cplusplus
9122extern "C"
9123#endif
9124
9125/* We use char because int might match the return type of a gcc2
9126   builtin and then its argument prototype would still apply.  */
9127char connect (void);
9128
9129int
9130main (void)
9131{
9132
9133/* The GNU C library defines stubs for functions which it implements
9134    to always fail with ENOSYS.  Some functions are actually named
9135    something starting with __ and the normal name is an alias.  */
9136#if defined (__stub_connect) || defined (__stub___connect)
9137#error found stub for connect
9138#endif
9139
9140	return connect ();
9141  ;
9142  return 0;
9143}
9144_ACEOF
9145rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9146if { (eval echo "$as_me:9146: \"$ac_link\"") >&5
9147  (eval $ac_link) 2>&5
9148  ac_status=$?
9149  echo "$as_me:9149: \$? = $ac_status" >&5
9150  (exit "$ac_status"); } &&
9151         { ac_try='test -s "conftest$ac_exeext"'
9152  { (eval echo "$as_me:9152: \"$ac_try\"") >&5
9153  (eval $ac_try) 2>&5
9154  ac_status=$?
9155  echo "$as_me:9155: \$? = $ac_status" >&5
9156  (exit "$ac_status"); }; }; then
9157  ac_cv_func_connect=yes
9158else
9159  echo "$as_me: failed program was:" >&5
9160cat "conftest.$ac_ext" >&5
9161ac_cv_func_connect=no
9162fi
9163rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9164fi
9165echo "$as_me:9165: result: $ac_cv_func_connect" >&5
9166echo "${ECHO_T}$ac_cv_func_connect" >&6
9167
9168    if test $ac_cv_func_connect = no; then
9169      echo "$as_me:9169: checking for connect in -lsocket" >&5
9170echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6
9171if test "${ac_cv_lib_socket_connect+set}" = set; then
9172  echo $ECHO_N "(cached) $ECHO_C" >&6
9173else
9174  ac_check_lib_save_LIBS=$LIBS
9175LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
9176cat >"conftest.$ac_ext" <<_ACEOF
9177#line 9177 "configure"
9178#include "confdefs.h"
9179
9180/* Override any gcc2 internal prototype to avoid an error.  */
9181#ifdef __cplusplus
9182extern "C"
9183#endif
9184/* We use char because int might match the return type of a gcc2
9185   builtin and then its argument prototype would still apply.  */
9186char connect ();
9187int
9188main (void)
9189{
9190connect ();
9191  ;
9192  return 0;
9193}
9194_ACEOF
9195rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9196if { (eval echo "$as_me:9196: \"$ac_link\"") >&5
9197  (eval $ac_link) 2>&5
9198  ac_status=$?
9199  echo "$as_me:9199: \$? = $ac_status" >&5
9200  (exit "$ac_status"); } &&
9201         { ac_try='test -s "conftest$ac_exeext"'
9202  { (eval echo "$as_me:9202: \"$ac_try\"") >&5
9203  (eval $ac_try) 2>&5
9204  ac_status=$?
9205  echo "$as_me:9205: \$? = $ac_status" >&5
9206  (exit "$ac_status"); }; }; then
9207  ac_cv_lib_socket_connect=yes
9208else
9209  echo "$as_me: failed program was:" >&5
9210cat "conftest.$ac_ext" >&5
9211ac_cv_lib_socket_connect=no
9212fi
9213rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9214LIBS=$ac_check_lib_save_LIBS
9215fi
9216echo "$as_me:9216: result: $ac_cv_lib_socket_connect" >&5
9217echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6
9218if test "$ac_cv_lib_socket_connect" = yes; then
9219  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
9220fi
9221
9222    fi
9223
9224    # Guillermo Gomez says -lposix is necessary on A/UX.
9225    echo "$as_me:9225: checking for remove" >&5
9226echo $ECHO_N "checking for remove... $ECHO_C" >&6
9227if test "${ac_cv_func_remove+set}" = set; then
9228  echo $ECHO_N "(cached) $ECHO_C" >&6
9229else
9230  cat >"conftest.$ac_ext" <<_ACEOF
9231#line 9231 "configure"
9232#include "confdefs.h"
9233#define remove autoconf_temporary
9234#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
9235#undef remove
9236
9237#ifdef __cplusplus
9238extern "C"
9239#endif
9240
9241/* We use char because int might match the return type of a gcc2
9242   builtin and then its argument prototype would still apply.  */
9243char remove (void);
9244
9245int
9246main (void)
9247{
9248
9249/* The GNU C library defines stubs for functions which it implements
9250    to always fail with ENOSYS.  Some functions are actually named
9251    something starting with __ and the normal name is an alias.  */
9252#if defined (__stub_remove) || defined (__stub___remove)
9253#error found stub for remove
9254#endif
9255
9256	return remove ();
9257  ;
9258  return 0;
9259}
9260_ACEOF
9261rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9262if { (eval echo "$as_me:9262: \"$ac_link\"") >&5
9263  (eval $ac_link) 2>&5
9264  ac_status=$?
9265  echo "$as_me:9265: \$? = $ac_status" >&5
9266  (exit "$ac_status"); } &&
9267         { ac_try='test -s "conftest$ac_exeext"'
9268  { (eval echo "$as_me:9268: \"$ac_try\"") >&5
9269  (eval $ac_try) 2>&5
9270  ac_status=$?
9271  echo "$as_me:9271: \$? = $ac_status" >&5
9272  (exit "$ac_status"); }; }; then
9273  ac_cv_func_remove=yes
9274else
9275  echo "$as_me: failed program was:" >&5
9276cat "conftest.$ac_ext" >&5
9277ac_cv_func_remove=no
9278fi
9279rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9280fi
9281echo "$as_me:9281: result: $ac_cv_func_remove" >&5
9282echo "${ECHO_T}$ac_cv_func_remove" >&6
9283
9284    if test $ac_cv_func_remove = no; then
9285      echo "$as_me:9285: checking for remove in -lposix" >&5
9286echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6
9287if test "${ac_cv_lib_posix_remove+set}" = set; then
9288  echo $ECHO_N "(cached) $ECHO_C" >&6
9289else
9290  ac_check_lib_save_LIBS=$LIBS
9291LIBS="-lposix  $LIBS"
9292cat >"conftest.$ac_ext" <<_ACEOF
9293#line 9293 "configure"
9294#include "confdefs.h"
9295
9296/* Override any gcc2 internal prototype to avoid an error.  */
9297#ifdef __cplusplus
9298extern "C"
9299#endif
9300/* We use char because int might match the return type of a gcc2
9301   builtin and then its argument prototype would still apply.  */
9302char remove ();
9303int
9304main (void)
9305{
9306remove ();
9307  ;
9308  return 0;
9309}
9310_ACEOF
9311rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9312if { (eval echo "$as_me:9312: \"$ac_link\"") >&5
9313  (eval $ac_link) 2>&5
9314  ac_status=$?
9315  echo "$as_me:9315: \$? = $ac_status" >&5
9316  (exit "$ac_status"); } &&
9317         { ac_try='test -s "conftest$ac_exeext"'
9318  { (eval echo "$as_me:9318: \"$ac_try\"") >&5
9319  (eval $ac_try) 2>&5
9320  ac_status=$?
9321  echo "$as_me:9321: \$? = $ac_status" >&5
9322  (exit "$ac_status"); }; }; then
9323  ac_cv_lib_posix_remove=yes
9324else
9325  echo "$as_me: failed program was:" >&5
9326cat "conftest.$ac_ext" >&5
9327ac_cv_lib_posix_remove=no
9328fi
9329rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9330LIBS=$ac_check_lib_save_LIBS
9331fi
9332echo "$as_me:9332: result: $ac_cv_lib_posix_remove" >&5
9333echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6
9334if test "$ac_cv_lib_posix_remove" = yes; then
9335  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
9336fi
9337
9338    fi
9339
9340    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
9341    echo "$as_me:9341: checking for shmat" >&5
9342echo $ECHO_N "checking for shmat... $ECHO_C" >&6
9343if test "${ac_cv_func_shmat+set}" = set; then
9344  echo $ECHO_N "(cached) $ECHO_C" >&6
9345else
9346  cat >"conftest.$ac_ext" <<_ACEOF
9347#line 9347 "configure"
9348#include "confdefs.h"
9349#define shmat autoconf_temporary
9350#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
9351#undef shmat
9352
9353#ifdef __cplusplus
9354extern "C"
9355#endif
9356
9357/* We use char because int might match the return type of a gcc2
9358   builtin and then its argument prototype would still apply.  */
9359char shmat (void);
9360
9361int
9362main (void)
9363{
9364
9365/* The GNU C library defines stubs for functions which it implements
9366    to always fail with ENOSYS.  Some functions are actually named
9367    something starting with __ and the normal name is an alias.  */
9368#if defined (__stub_shmat) || defined (__stub___shmat)
9369#error found stub for shmat
9370#endif
9371
9372	return shmat ();
9373  ;
9374  return 0;
9375}
9376_ACEOF
9377rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9378if { (eval echo "$as_me:9378: \"$ac_link\"") >&5
9379  (eval $ac_link) 2>&5
9380  ac_status=$?
9381  echo "$as_me:9381: \$? = $ac_status" >&5
9382  (exit "$ac_status"); } &&
9383         { ac_try='test -s "conftest$ac_exeext"'
9384  { (eval echo "$as_me:9384: \"$ac_try\"") >&5
9385  (eval $ac_try) 2>&5
9386  ac_status=$?
9387  echo "$as_me:9387: \$? = $ac_status" >&5
9388  (exit "$ac_status"); }; }; then
9389  ac_cv_func_shmat=yes
9390else
9391  echo "$as_me: failed program was:" >&5
9392cat "conftest.$ac_ext" >&5
9393ac_cv_func_shmat=no
9394fi
9395rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9396fi
9397echo "$as_me:9397: result: $ac_cv_func_shmat" >&5
9398echo "${ECHO_T}$ac_cv_func_shmat" >&6
9399
9400    if test $ac_cv_func_shmat = no; then
9401      echo "$as_me:9401: checking for shmat in -lipc" >&5
9402echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6
9403if test "${ac_cv_lib_ipc_shmat+set}" = set; then
9404  echo $ECHO_N "(cached) $ECHO_C" >&6
9405else
9406  ac_check_lib_save_LIBS=$LIBS
9407LIBS="-lipc  $LIBS"
9408cat >"conftest.$ac_ext" <<_ACEOF
9409#line 9409 "configure"
9410#include "confdefs.h"
9411
9412/* Override any gcc2 internal prototype to avoid an error.  */
9413#ifdef __cplusplus
9414extern "C"
9415#endif
9416/* We use char because int might match the return type of a gcc2
9417   builtin and then its argument prototype would still apply.  */
9418char shmat ();
9419int
9420main (void)
9421{
9422shmat ();
9423  ;
9424  return 0;
9425}
9426_ACEOF
9427rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9428if { (eval echo "$as_me:9428: \"$ac_link\"") >&5
9429  (eval $ac_link) 2>&5
9430  ac_status=$?
9431  echo "$as_me:9431: \$? = $ac_status" >&5
9432  (exit "$ac_status"); } &&
9433         { ac_try='test -s "conftest$ac_exeext"'
9434  { (eval echo "$as_me:9434: \"$ac_try\"") >&5
9435  (eval $ac_try) 2>&5
9436  ac_status=$?
9437  echo "$as_me:9437: \$? = $ac_status" >&5
9438  (exit "$ac_status"); }; }; then
9439  ac_cv_lib_ipc_shmat=yes
9440else
9441  echo "$as_me: failed program was:" >&5
9442cat "conftest.$ac_ext" >&5
9443ac_cv_lib_ipc_shmat=no
9444fi
9445rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9446LIBS=$ac_check_lib_save_LIBS
9447fi
9448echo "$as_me:9448: result: $ac_cv_lib_ipc_shmat" >&5
9449echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6
9450if test "$ac_cv_lib_ipc_shmat" = yes; then
9451  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
9452fi
9453
9454    fi
9455  fi
9456
9457  # Check for libraries that X11R6 Xt/Xaw programs need.
9458  ac_save_LDFLAGS=$LDFLAGS
9459  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
9460  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
9461  # check for ICE first), but we must link in the order -lSM -lICE or
9462  # we get undefined symbols.  So assume we have SM if we have ICE.
9463  # These have to be linked with before -lX11, unlike the other
9464  # libraries we check for below, so use a different variable.
9465  # John Interrante, Karl Berry
9466  echo "$as_me:9466: checking for IceConnectionNumber in -lICE" >&5
9467echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6
9468if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then
9469  echo $ECHO_N "(cached) $ECHO_C" >&6
9470else
9471  ac_check_lib_save_LIBS=$LIBS
9472LIBS="-lICE $X_EXTRA_LIBS $LIBS"
9473cat >"conftest.$ac_ext" <<_ACEOF
9474#line 9474 "configure"
9475#include "confdefs.h"
9476
9477/* Override any gcc2 internal prototype to avoid an error.  */
9478#ifdef __cplusplus
9479extern "C"
9480#endif
9481/* We use char because int might match the return type of a gcc2
9482   builtin and then its argument prototype would still apply.  */
9483char IceConnectionNumber ();
9484int
9485main (void)
9486{
9487IceConnectionNumber ();
9488  ;
9489  return 0;
9490}
9491_ACEOF
9492rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9493if { (eval echo "$as_me:9493: \"$ac_link\"") >&5
9494  (eval $ac_link) 2>&5
9495  ac_status=$?
9496  echo "$as_me:9496: \$? = $ac_status" >&5
9497  (exit "$ac_status"); } &&
9498         { ac_try='test -s "conftest$ac_exeext"'
9499  { (eval echo "$as_me:9499: \"$ac_try\"") >&5
9500  (eval $ac_try) 2>&5
9501  ac_status=$?
9502  echo "$as_me:9502: \$? = $ac_status" >&5
9503  (exit "$ac_status"); }; }; then
9504  ac_cv_lib_ICE_IceConnectionNumber=yes
9505else
9506  echo "$as_me: failed program was:" >&5
9507cat "conftest.$ac_ext" >&5
9508ac_cv_lib_ICE_IceConnectionNumber=no
9509fi
9510rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9511LIBS=$ac_check_lib_save_LIBS
9512fi
9513echo "$as_me:9513: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
9514echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6
9515if test "$ac_cv_lib_ICE_IceConnectionNumber" = yes; then
9516  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
9517fi
9518
9519  LDFLAGS=$ac_save_LDFLAGS
9520
9521fi
9522
9523echo "$as_me:9523: checking for sys/wait.h that is POSIX.1 compatible" >&5
9524echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6
9525if test "${ac_cv_header_sys_wait_h+set}" = set; then
9526  echo $ECHO_N "(cached) $ECHO_C" >&6
9527else
9528  cat >"conftest.$ac_ext" <<_ACEOF
9529#line 9529 "configure"
9530#include "confdefs.h"
9531#include <sys/types.h>
9532#include <sys/wait.h>
9533#ifndef WEXITSTATUS
9534# define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
9535#endif
9536#ifndef WIFEXITED
9537# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
9538#endif
9539
9540int
9541main (void)
9542{
9543  int s;
9544  wait (&s);
9545  s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
9546  ;
9547  return 0;
9548}
9549_ACEOF
9550rm -f "conftest.$ac_objext"
9551if { (eval echo "$as_me:9551: \"$ac_compile\"") >&5
9552  (eval $ac_compile) 2>&5
9553  ac_status=$?
9554  echo "$as_me:9554: \$? = $ac_status" >&5
9555  (exit "$ac_status"); } &&
9556         { ac_try='test -s "conftest.$ac_objext"'
9557  { (eval echo "$as_me:9557: \"$ac_try\"") >&5
9558  (eval $ac_try) 2>&5
9559  ac_status=$?
9560  echo "$as_me:9560: \$? = $ac_status" >&5
9561  (exit "$ac_status"); }; }; then
9562  ac_cv_header_sys_wait_h=yes
9563else
9564  echo "$as_me: failed program was:" >&5
9565cat "conftest.$ac_ext" >&5
9566ac_cv_header_sys_wait_h=no
9567fi
9568rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9569fi
9570echo "$as_me:9570: result: $ac_cv_header_sys_wait_h" >&5
9571echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6
9572if test $ac_cv_header_sys_wait_h = yes; then
9573
9574cat >>confdefs.h <<\EOF
9575#define HAVE_SYS_WAIT_H 1
9576EOF
9577
9578fi
9579
9580echo "$as_me:9580: checking for POSIX wait functions" >&5
9581echo $ECHO_N "checking for POSIX wait functions... $ECHO_C" >&6
9582if test "${cf_cv_posix_wait+set}" = set; then
9583  echo $ECHO_N "(cached) $ECHO_C" >&6
9584else
9585
9586cat >"conftest.$ac_ext" <<_ACEOF
9587#line 9587 "configure"
9588#include "confdefs.h"
9589
9590#include <stdlib.h>
9591#include <stdio.h>
9592#include <sys/types.h>
9593#ifdef HAVE_SYS_WAIT_H
9594#include <sys/wait.h>
9595#endif
9596
9597int
9598main (void)
9599{
9600
9601	int stat_loc;
9602	pid_t pid = waitpid(-1, &stat_loc, WNOHANG|WUNTRACED);
9603	pid_t pid2 = wait(&stat_loc);
9604	(void)pid;
9605	(void)pid2;
9606
9607  ;
9608  return 0;
9609}
9610_ACEOF
9611rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9612if { (eval echo "$as_me:9612: \"$ac_link\"") >&5
9613  (eval $ac_link) 2>&5
9614  ac_status=$?
9615  echo "$as_me:9615: \$? = $ac_status" >&5
9616  (exit "$ac_status"); } &&
9617         { ac_try='test -s "conftest$ac_exeext"'
9618  { (eval echo "$as_me:9618: \"$ac_try\"") >&5
9619  (eval $ac_try) 2>&5
9620  ac_status=$?
9621  echo "$as_me:9621: \$? = $ac_status" >&5
9622  (exit "$ac_status"); }; }; then
9623  cf_cv_posix_wait=yes
9624else
9625  echo "$as_me: failed program was:" >&5
9626cat "conftest.$ac_ext" >&5
9627cf_cv_posix_wait=no
9628fi
9629rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9630
9631fi
9632echo "$as_me:9632: result: $cf_cv_posix_wait" >&5
9633echo "${ECHO_T}$cf_cv_posix_wait" >&6
9634test "$cf_cv_posix_wait" = yes &&
9635cat >>confdefs.h <<\EOF
9636#define USE_POSIX_WAIT 1
9637EOF
9638
9639echo "$as_me:9639: checking if external sys_nerr is declared" >&5
9640echo $ECHO_N "checking if external sys_nerr is declared... $ECHO_C" >&6
9641if test "${cf_cv_dcl_sys_nerr+set}" = set; then
9642  echo $ECHO_N "(cached) $ECHO_C" >&6
9643else
9644
9645	cat >"conftest.$ac_ext" <<_ACEOF
9646#line 9646 "configure"
9647#include "confdefs.h"
9648
9649#ifdef HAVE_STDLIB_H
9650#include <stdlib.h>
9651#endif
9652#include <stdio.h>
9653#include <sys/types.h>
9654#include <errno.h>
9655int
9656main (void)
9657{
9658int x = (int) sys_nerr; (void)x
9659  ;
9660  return 0;
9661}
9662_ACEOF
9663rm -f "conftest.$ac_objext"
9664if { (eval echo "$as_me:9664: \"$ac_compile\"") >&5
9665  (eval $ac_compile) 2>&5
9666  ac_status=$?
9667  echo "$as_me:9667: \$? = $ac_status" >&5
9668  (exit "$ac_status"); } &&
9669         { ac_try='test -s "conftest.$ac_objext"'
9670  { (eval echo "$as_me:9670: \"$ac_try\"") >&5
9671  (eval $ac_try) 2>&5
9672  ac_status=$?
9673  echo "$as_me:9673: \$? = $ac_status" >&5
9674  (exit "$ac_status"); }; }; then
9675  cf_cv_dcl_sys_nerr=yes
9676else
9677  echo "$as_me: failed program was:" >&5
9678cat "conftest.$ac_ext" >&5
9679cf_cv_dcl_sys_nerr=no
9680fi
9681rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9682
9683fi
9684echo "$as_me:9684: result: $cf_cv_dcl_sys_nerr" >&5
9685echo "${ECHO_T}$cf_cv_dcl_sys_nerr" >&6
9686
9687if test "$cf_cv_dcl_sys_nerr" = no ; then
9688
9689cf_result=`echo "decl_sys_nerr" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9690
9691	cat >>confdefs.h <<EOF
9692#define $cf_result 1
9693EOF
9694
9695fi
9696
9697# It's possible (for near-UNIX clones) that the data doesn't exist
9698
9699echo "$as_me:9699: checking if external sys_nerr exists" >&5
9700echo $ECHO_N "checking if external sys_nerr exists... $ECHO_C" >&6
9701if test "${cf_cv_have_sys_nerr+set}" = set; then
9702  echo $ECHO_N "(cached) $ECHO_C" >&6
9703else
9704
9705	cat >"conftest.$ac_ext" <<_ACEOF
9706#line 9706 "configure"
9707#include "confdefs.h"
9708
9709#undef sys_nerr
9710extern int sys_nerr;
9711
9712int
9713main (void)
9714{
9715sys_nerr = 2
9716  ;
9717  return 0;
9718}
9719_ACEOF
9720rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9721if { (eval echo "$as_me:9721: \"$ac_link\"") >&5
9722  (eval $ac_link) 2>&5
9723  ac_status=$?
9724  echo "$as_me:9724: \$? = $ac_status" >&5
9725  (exit "$ac_status"); } &&
9726         { ac_try='test -s "conftest$ac_exeext"'
9727  { (eval echo "$as_me:9727: \"$ac_try\"") >&5
9728  (eval $ac_try) 2>&5
9729  ac_status=$?
9730  echo "$as_me:9730: \$? = $ac_status" >&5
9731  (exit "$ac_status"); }; }; then
9732  cf_cv_have_sys_nerr=yes
9733else
9734  echo "$as_me: failed program was:" >&5
9735cat "conftest.$ac_ext" >&5
9736cf_cv_have_sys_nerr=no
9737fi
9738rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9739
9740fi
9741echo "$as_me:9741: result: $cf_cv_have_sys_nerr" >&5
9742echo "${ECHO_T}$cf_cv_have_sys_nerr" >&6
9743
9744if test "$cf_cv_have_sys_nerr" = yes ; then
9745
9746cf_result=`echo "have_sys_nerr" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9747
9748	cat >>confdefs.h <<EOF
9749#define $cf_result 1
9750EOF
9751
9752fi
9753
9754echo "$as_me:9754: checking if external sys_errlist is declared" >&5
9755echo $ECHO_N "checking if external sys_errlist is declared... $ECHO_C" >&6
9756if test "${cf_cv_dcl_sys_errlist+set}" = set; then
9757  echo $ECHO_N "(cached) $ECHO_C" >&6
9758else
9759
9760	cat >"conftest.$ac_ext" <<_ACEOF
9761#line 9761 "configure"
9762#include "confdefs.h"
9763
9764#ifdef HAVE_STDLIB_H
9765#include <stdlib.h>
9766#endif
9767#include <stdio.h>
9768#include <sys/types.h>
9769#include <errno.h>
9770int
9771main (void)
9772{
9773int x = (int) sys_errlist; (void)x
9774  ;
9775  return 0;
9776}
9777_ACEOF
9778rm -f "conftest.$ac_objext"
9779if { (eval echo "$as_me:9779: \"$ac_compile\"") >&5
9780  (eval $ac_compile) 2>&5
9781  ac_status=$?
9782  echo "$as_me:9782: \$? = $ac_status" >&5
9783  (exit "$ac_status"); } &&
9784         { ac_try='test -s "conftest.$ac_objext"'
9785  { (eval echo "$as_me:9785: \"$ac_try\"") >&5
9786  (eval $ac_try) 2>&5
9787  ac_status=$?
9788  echo "$as_me:9788: \$? = $ac_status" >&5
9789  (exit "$ac_status"); }; }; then
9790  cf_cv_dcl_sys_errlist=yes
9791else
9792  echo "$as_me: failed program was:" >&5
9793cat "conftest.$ac_ext" >&5
9794cf_cv_dcl_sys_errlist=no
9795fi
9796rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9797
9798fi
9799echo "$as_me:9799: result: $cf_cv_dcl_sys_errlist" >&5
9800echo "${ECHO_T}$cf_cv_dcl_sys_errlist" >&6
9801
9802if test "$cf_cv_dcl_sys_errlist" = no ; then
9803
9804cf_result=`echo "decl_sys_errlist" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9805
9806	cat >>confdefs.h <<EOF
9807#define $cf_result 1
9808EOF
9809
9810fi
9811
9812# It's possible (for near-UNIX clones) that the data doesn't exist
9813
9814echo "$as_me:9814: checking if external sys_errlist exists" >&5
9815echo $ECHO_N "checking if external sys_errlist exists... $ECHO_C" >&6
9816if test "${cf_cv_have_sys_errlist+set}" = set; then
9817  echo $ECHO_N "(cached) $ECHO_C" >&6
9818else
9819
9820	cat >"conftest.$ac_ext" <<_ACEOF
9821#line 9821 "configure"
9822#include "confdefs.h"
9823
9824#undef sys_errlist
9825extern int sys_errlist;
9826
9827int
9828main (void)
9829{
9830sys_errlist = 2
9831  ;
9832  return 0;
9833}
9834_ACEOF
9835rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9836if { (eval echo "$as_me:9836: \"$ac_link\"") >&5
9837  (eval $ac_link) 2>&5
9838  ac_status=$?
9839  echo "$as_me:9839: \$? = $ac_status" >&5
9840  (exit "$ac_status"); } &&
9841         { ac_try='test -s "conftest$ac_exeext"'
9842  { (eval echo "$as_me:9842: \"$ac_try\"") >&5
9843  (eval $ac_try) 2>&5
9844  ac_status=$?
9845  echo "$as_me:9845: \$? = $ac_status" >&5
9846  (exit "$ac_status"); }; }; then
9847  cf_cv_have_sys_errlist=yes
9848else
9849  echo "$as_me: failed program was:" >&5
9850cat "conftest.$ac_ext" >&5
9851cf_cv_have_sys_errlist=no
9852fi
9853rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9854
9855fi
9856echo "$as_me:9856: result: $cf_cv_have_sys_errlist" >&5
9857echo "${ECHO_T}$cf_cv_have_sys_errlist" >&6
9858
9859if test "$cf_cv_have_sys_errlist" = yes ; then
9860
9861cf_result=`echo "have_sys_errlist" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9862
9863	cat >>confdefs.h <<EOF
9864#define $cf_result 1
9865EOF
9866
9867fi
9868
9869cf_save_LIBS_CF_SYSV="$LIBS"
9870cf_save_CFLAGS_CF_SYSV="$CFLAGS"
9871cf_save_CPPFLAGS_CF_SYSV="$CPPFLAGS"
9872LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
9873for cf_X_CFLAGS in $X_CFLAGS
9874do
9875	case "x$cf_X_CFLAGS" in
9876	x-[IUD]*)
9877		CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
9878		;;
9879	*)
9880		CFLAGS="$CFLAGS $cf_X_CFLAGS"
9881		;;
9882	esac
9883done
9884
9885for ac_header in \
9886termios.h \
9887stdlib.h \
9888X11/Intrinsic.h \
9889
9890do
9891as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9892echo "$as_me:9892: checking for $ac_header" >&5
9893echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9894if eval "test \"\${$as_ac_Header+set}\" = set"; then
9895  echo $ECHO_N "(cached) $ECHO_C" >&6
9896else
9897  cat >"conftest.$ac_ext" <<_ACEOF
9898#line 9898 "configure"
9899#include "confdefs.h"
9900#include <$ac_header>
9901_ACEOF
9902if { (eval echo "$as_me:9902: \"$ac_cpp "conftest.$ac_ext"\"") >&5
9903  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
9904  ac_status=$?
9905  $EGREP -v '^ *\+' conftest.er1 >conftest.err
9906  rm -f conftest.er1
9907  cat conftest.err >&5
9908  echo "$as_me:9908: \$? = $ac_status" >&5
9909  (exit "$ac_status"); } >/dev/null; then
9910  if test -s conftest.err; then
9911    ac_cpp_err=$ac_c_preproc_warn_flag
9912  else
9913    ac_cpp_err=
9914  fi
9915else
9916  ac_cpp_err=yes
9917fi
9918if test -z "$ac_cpp_err"; then
9919  eval "$as_ac_Header=yes"
9920else
9921  echo "$as_me: failed program was:" >&5
9922  cat "conftest.$ac_ext" >&5
9923  eval "$as_ac_Header=no"
9924fi
9925rm -f conftest.err "conftest.$ac_ext"
9926fi
9927echo "$as_me:9927: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
9928echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
9929if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
9930  cat >>confdefs.h <<EOF
9931#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9932EOF
9933
9934fi
9935done
9936
9937echo "$as_me:9937: checking if we should define SYSV" >&5
9938echo $ECHO_N "checking if we should define SYSV... $ECHO_C" >&6
9939if test "${cf_cv_sysv+set}" = set; then
9940  echo $ECHO_N "(cached) $ECHO_C" >&6
9941else
9942
9943cat >"conftest.$ac_ext" <<_ACEOF
9944#line 9944 "configure"
9945#include "confdefs.h"
9946
9947#undef  SYSV
9948#define SYSV 1			/* get Xos.h to declare sys_errlist[] */
9949#ifdef HAVE_STDLIB_H
9950#include <stdlib.h>		/* look for wchar_t */
9951#endif
9952#ifdef HAVE_X11_INTRINSIC_H
9953#include <X11/Intrinsic.h>	/* Intrinsic.h has other traps... */
9954#endif
9955#ifdef HAVE_TERMIOS_H		/* needed for HPUX 10.20 */
9956#include <termios.h>
9957#define STRUCT_TERMIOS struct termios
9958#else
9959#define STRUCT_TERMIOS struct termio
9960#endif
9961#include <curses.h>
9962#include <term.h>		/* eliminate most BSD hacks */
9963#include <errno.h>		/* declare sys_errlist on older systems */
9964#include <sys/termio.h>		/* eliminate most of the remaining ones */
9965
9966int
9967main (void)
9968{
9969
9970static STRUCT_TERMIOS d_tio;
9971	d_tio.c_cc[VINTR] = 0;
9972	d_tio.c_cc[VQUIT] = 0;
9973	d_tio.c_cc[VERASE] = 0;
9974	d_tio.c_cc[VKILL] = 0;
9975	d_tio.c_cc[VEOF] = 0;
9976	d_tio.c_cc[VEOL] = 0;
9977	d_tio.c_cc[VMIN] = 0;
9978	d_tio.c_cc[VTIME] = 0;
9979#if defined(HAVE_SYS_ERRLIST) && !defined(DECL_SYS_ERRLIST)
9980sys_errlist[0] = "";		/* Cygwin mis-declares this */
9981#endif
9982
9983  ;
9984  return 0;
9985}
9986_ACEOF
9987rm -f "conftest.$ac_objext"
9988if { (eval echo "$as_me:9988: \"$ac_compile\"") >&5
9989  (eval $ac_compile) 2>&5
9990  ac_status=$?
9991  echo "$as_me:9991: \$? = $ac_status" >&5
9992  (exit "$ac_status"); } &&
9993         { ac_try='test -s "conftest.$ac_objext"'
9994  { (eval echo "$as_me:9994: \"$ac_try\"") >&5
9995  (eval $ac_try) 2>&5
9996  ac_status=$?
9997  echo "$as_me:9997: \$? = $ac_status" >&5
9998  (exit "$ac_status"); }; }; then
9999  cf_cv_sysv=yes
10000else
10001  echo "$as_me: failed program was:" >&5
10002cat "conftest.$ac_ext" >&5
10003cf_cv_sysv=no
10004fi
10005rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10006
10007fi
10008echo "$as_me:10008: result: $cf_cv_sysv" >&5
10009echo "${ECHO_T}$cf_cv_sysv" >&6
10010test "$cf_cv_sysv" = yes &&
10011cat >>confdefs.h <<\EOF
10012#define SYSV 1
10013EOF
10014
10015LIBS="$cf_save_LIBS_CF_SYSV"
10016CFLAGS="$cf_save_CFLAGS_CF_SYSV"
10017CPPFLAGS="$cf_save_CPPFLAGS_CF_SYSV"
10018
10019echo "$as_me:10019: checking for elf_begin in -lelf" >&5
10020echo $ECHO_N "checking for elf_begin in -lelf... $ECHO_C" >&6
10021if test "${ac_cv_lib_elf_elf_begin+set}" = set; then
10022  echo $ECHO_N "(cached) $ECHO_C" >&6
10023else
10024  ac_check_lib_save_LIBS=$LIBS
10025LIBS="-lelf  $LIBS"
10026cat >"conftest.$ac_ext" <<_ACEOF
10027#line 10027 "configure"
10028#include "confdefs.h"
10029
10030/* Override any gcc2 internal prototype to avoid an error.  */
10031#ifdef __cplusplus
10032extern "C"
10033#endif
10034/* We use char because int might match the return type of a gcc2
10035   builtin and then its argument prototype would still apply.  */
10036char elf_begin ();
10037int
10038main (void)
10039{
10040elf_begin ();
10041  ;
10042  return 0;
10043}
10044_ACEOF
10045rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10046if { (eval echo "$as_me:10046: \"$ac_link\"") >&5
10047  (eval $ac_link) 2>&5
10048  ac_status=$?
10049  echo "$as_me:10049: \$? = $ac_status" >&5
10050  (exit "$ac_status"); } &&
10051         { ac_try='test -s "conftest$ac_exeext"'
10052  { (eval echo "$as_me:10052: \"$ac_try\"") >&5
10053  (eval $ac_try) 2>&5
10054  ac_status=$?
10055  echo "$as_me:10055: \$? = $ac_status" >&5
10056  (exit "$ac_status"); }; }; then
10057  ac_cv_lib_elf_elf_begin=yes
10058else
10059  echo "$as_me: failed program was:" >&5
10060cat "conftest.$ac_ext" >&5
10061ac_cv_lib_elf_elf_begin=no
10062fi
10063rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10064LIBS=$ac_check_lib_save_LIBS
10065fi
10066echo "$as_me:10066: result: $ac_cv_lib_elf_elf_begin" >&5
10067echo "${ECHO_T}$ac_cv_lib_elf_elf_begin" >&6
10068if test "$ac_cv_lib_elf_elf_begin" = yes; then
10069
10070echo "$as_me:10070: checking if this is an SVR4 system" >&5
10071echo $ECHO_N "checking if this is an SVR4 system... $ECHO_C" >&6
10072if test "${cf_cv_svr4+set}" = set; then
10073  echo $ECHO_N "(cached) $ECHO_C" >&6
10074else
10075
10076cat >"conftest.$ac_ext" <<_ACEOF
10077#line 10077 "configure"
10078#include "confdefs.h"
10079
10080#if defined(__CYGWIN__)
10081make an error
10082#endif
10083#include <elf.h>
10084#include <sys/termio.h>
10085
10086int
10087main (void)
10088{
10089
10090static struct termio d_tio;
10091	d_tio.c_cc[VINTR] = 0;
10092	d_tio.c_cc[VQUIT] = 0;
10093	d_tio.c_cc[VERASE] = 0;
10094	d_tio.c_cc[VKILL] = 0;
10095	d_tio.c_cc[VEOF] = 0;
10096	d_tio.c_cc[VEOL] = 0;
10097	d_tio.c_cc[VMIN] = 0;
10098	d_tio.c_cc[VTIME] = 0;
10099	d_tio.c_cc[VLNEXT] = 0;
10100
10101  ;
10102  return 0;
10103}
10104_ACEOF
10105rm -f "conftest.$ac_objext"
10106if { (eval echo "$as_me:10106: \"$ac_compile\"") >&5
10107  (eval $ac_compile) 2>&5
10108  ac_status=$?
10109  echo "$as_me:10109: \$? = $ac_status" >&5
10110  (exit "$ac_status"); } &&
10111         { ac_try='test -s "conftest.$ac_objext"'
10112  { (eval echo "$as_me:10112: \"$ac_try\"") >&5
10113  (eval $ac_try) 2>&5
10114  ac_status=$?
10115  echo "$as_me:10115: \$? = $ac_status" >&5
10116  (exit "$ac_status"); }; }; then
10117  cf_cv_svr4=yes
10118else
10119  echo "$as_me: failed program was:" >&5
10120cat "conftest.$ac_ext" >&5
10121cf_cv_svr4=no
10122fi
10123rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10124
10125fi
10126echo "$as_me:10126: result: $cf_cv_svr4" >&5
10127echo "${ECHO_T}$cf_cv_svr4" >&6
10128
10129fi
10130
10131test "$cf_cv_svr4" = yes &&
10132cat >>confdefs.h <<\EOF
10133#define SVR4 1
10134EOF
10135
10136echo "$as_me:10136: checking if you want to use pkg-config" >&5
10137echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
10138
10139# Check whether --with-pkg-config or --without-pkg-config was given.
10140if test "${with_pkg_config+set}" = set; then
10141  withval="$with_pkg_config"
10142  cf_pkg_config=$withval
10143else
10144  cf_pkg_config=yes
10145fi;
10146echo "$as_me:10146: result: $cf_pkg_config" >&5
10147echo "${ECHO_T}$cf_pkg_config" >&6
10148
10149case "$cf_pkg_config" in
10150(no)
10151	PKG_CONFIG=none
10152	;;
10153(yes)
10154
10155if test -n "$ac_tool_prefix"; then
10156  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10157set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
10158echo "$as_me:10158: checking for $ac_word" >&5
10159echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
10160if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
10161  echo $ECHO_N "(cached) $ECHO_C" >&6
10162else
10163  case $PKG_CONFIG in
10164  [\\/]* | ?:[\\/]*)
10165  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10166  ;;
10167  *)
10168  ac_save_IFS=$IFS; IFS=$ac_path_separator
10169ac_dummy="$PATH"
10170for ac_dir in $ac_dummy; do
10171  IFS=$ac_save_IFS
10172  test -z "$ac_dir" && ac_dir=.
10173  if $as_executable_p "$ac_dir/$ac_word"; then
10174   ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
10175   echo "$as_me:10175: found $ac_dir/$ac_word" >&5
10176   break
10177fi
10178done
10179
10180  ;;
10181esac
10182fi
10183PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10184
10185if test -n "$PKG_CONFIG"; then
10186  echo "$as_me:10186: result: $PKG_CONFIG" >&5
10187echo "${ECHO_T}$PKG_CONFIG" >&6
10188else
10189  echo "$as_me:10189: result: no" >&5
10190echo "${ECHO_T}no" >&6
10191fi
10192
10193fi
10194if test -z "$ac_cv_path_PKG_CONFIG"; then
10195  ac_pt_PKG_CONFIG=$PKG_CONFIG
10196  # Extract the first word of "pkg-config", so it can be a program name with args.
10197set dummy pkg-config; ac_word=$2
10198echo "$as_me:10198: checking for $ac_word" >&5
10199echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
10200if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
10201  echo $ECHO_N "(cached) $ECHO_C" >&6
10202else
10203  case $ac_pt_PKG_CONFIG in
10204  [\\/]* | ?:[\\/]*)
10205  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10206  ;;
10207  *)
10208  ac_save_IFS=$IFS; IFS=$ac_path_separator
10209ac_dummy="$PATH"
10210for ac_dir in $ac_dummy; do
10211  IFS=$ac_save_IFS
10212  test -z "$ac_dir" && ac_dir=.
10213  if $as_executable_p "$ac_dir/$ac_word"; then
10214   ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
10215   echo "$as_me:10215: found $ac_dir/$ac_word" >&5
10216   break
10217fi
10218done
10219
10220  test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
10221  ;;
10222esac
10223fi
10224ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10225
10226if test -n "$ac_pt_PKG_CONFIG"; then
10227  echo "$as_me:10227: result: $ac_pt_PKG_CONFIG" >&5
10228echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
10229else
10230  echo "$as_me:10230: result: no" >&5
10231echo "${ECHO_T}no" >&6
10232fi
10233
10234  PKG_CONFIG=$ac_pt_PKG_CONFIG
10235else
10236  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10237fi
10238
10239	;;
10240(*)
10241	PKG_CONFIG=$withval
10242	;;
10243esac
10244
10245test -z "$PKG_CONFIG" && PKG_CONFIG=none
10246if test "$PKG_CONFIG" != none ; then
10247
10248if test "x$prefix" != xNONE; then
10249	cf_path_syntax="$prefix"
10250else
10251	cf_path_syntax="$ac_default_prefix"
10252fi
10253
10254case ".$PKG_CONFIG" in
10255(.\$\(*\)*|.\'*\'*)
10256	;;
10257(..|./*|.\\*)
10258	;;
10259(.[a-zA-Z]:[\\/]*) # OS/2 EMX
10260	;;
10261(.\$\{*prefix\}*|.\$\{*dir\}*)
10262	eval PKG_CONFIG="$PKG_CONFIG"
10263	case ".$PKG_CONFIG" in
10264	(.NONE/*)
10265		PKG_CONFIG=`echo "$PKG_CONFIG" | sed -e s%NONE%$cf_path_syntax%`
10266		;;
10267	esac
10268	;;
10269(.no|.NONE/*)
10270	PKG_CONFIG=`echo "$PKG_CONFIG" | sed -e s%NONE%$cf_path_syntax%`
10271	;;
10272(*)
10273	{ { echo "$as_me:10273: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
10274echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
10275   { (exit 1); exit 1; }; }
10276	;;
10277esac
10278
10279elif test "x$cf_pkg_config" != xno ; then
10280	{ echo "$as_me:10280: WARNING: pkg-config is not installed" >&5
10281echo "$as_me: WARNING: pkg-config is not installed" >&2;}
10282fi
10283
10284# OSX is schizoid about who owns /usr/X11 (old) versus /opt/X11 (new) (and
10285# in some cases has installed dummy files in the former, other cases replaced
10286# it with a link to the new location).  This complicates the configure script.
10287# Check for that pitfall, and recover using pkg-config
10288#
10289# If none of these are set, the configuration is almost certainly broken.
10290if test -z "${X_CFLAGS}${X_PRE_LIBS}${X_LIBS}${X_EXTRA_LIBS}"
10291then
10292
10293if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "x11"; then
10294	test -n "$verbose" && echo "	found package x11" 1>&6
10295
10296echo "${as_me:-configure}:10296: testing found package x11 ..." 1>&5
10297
10298	cf_pkgconfig_incs="`$PKG_CONFIG --cflags "x11" 2>/dev/null`"
10299	cf_pkgconfig_libs="`$PKG_CONFIG --libs   "x11" 2>/dev/null`"
10300	test -n "$verbose" && echo "	package x11 CFLAGS: $cf_pkgconfig_incs" 1>&6
10301
10302echo "${as_me:-configure}:10302: testing package x11 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
10303
10304	test -n "$verbose" && echo "	package x11 LIBS: $cf_pkgconfig_libs" 1>&6
10305
10306echo "${as_me:-configure}:10306: testing package x11 LIBS: $cf_pkgconfig_libs ..." 1>&5
10307
10308cf_fix_cppflags=no
10309cf_new_cflags=
10310cf_new_cppflags=
10311cf_new_extra_cppflags=
10312
10313for cf_add_cflags in $cf_pkgconfig_incs
10314do
10315case "$cf_fix_cppflags" in
10316(no)
10317	case "$cf_add_cflags" in
10318	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10319		case "$cf_add_cflags" in
10320		(-D*)
10321			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10322
10323			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10324				&& test -z "${cf_tst_cflags}" \
10325				&& cf_fix_cppflags=yes
10326
10327			if test "$cf_fix_cppflags" = yes ; then
10328
10329	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10330	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10331
10332				continue
10333			elif test "${cf_tst_cflags}" = "\"'" ; then
10334
10335	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10336	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10337
10338				continue
10339			fi
10340			;;
10341		esac
10342		case "$CPPFLAGS" in
10343		(*$cf_add_cflags)
10344			;;
10345		(*)
10346			case "$cf_add_cflags" in
10347			(-D*)
10348				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10349
10350CPPFLAGS=`echo "$CPPFLAGS" | \
10351	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
10352		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
10353
10354				;;
10355			esac
10356
10357	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10358	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10359
10360			;;
10361		esac
10362		;;
10363	(*)
10364
10365	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10366	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10367
10368		;;
10369	esac
10370	;;
10371(yes)
10372
10373	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10374	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10375
10376	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10377
10378	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10379		&& test -z "${cf_tst_cflags}" \
10380		&& cf_fix_cppflags=no
10381	;;
10382esac
10383done
10384
10385if test -n "$cf_new_cflags" ; then
10386
10387	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10388	CFLAGS="${CFLAGS}$cf_new_cflags"
10389
10390fi
10391
10392if test -n "$cf_new_cppflags" ; then
10393
10394	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10395	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10396
10397fi
10398
10399if test -n "$cf_new_extra_cppflags" ; then
10400
10401	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10402	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10403
10404fi
10405
10406cf_add_libs="$LIBS"
10407# reverse order
10408cf_add_0lib=
10409for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
10410# filter duplicates
10411for cf_add_1lib in $cf_add_0lib; do
10412	for cf_add_2lib in $cf_add_libs; do
10413		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
10414			cf_add_1lib=
10415			break
10416		fi
10417	done
10418	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
10419done
10420LIBS="$cf_add_libs"
10421
10422	:
10423else
10424	cf_pkgconfig_incs=
10425	cf_pkgconfig_libs=
10426	{ echo "$as_me:10426: WARNING: unable to find X11 library" >&5
10427echo "$as_me: WARNING: unable to find X11 library" >&2;}
10428fi
10429
10430if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "ice"; then
10431	test -n "$verbose" && echo "	found package ice" 1>&6
10432
10433echo "${as_me:-configure}:10433: testing found package ice ..." 1>&5
10434
10435	cf_pkgconfig_incs="`$PKG_CONFIG --cflags "ice" 2>/dev/null`"
10436	cf_pkgconfig_libs="`$PKG_CONFIG --libs   "ice" 2>/dev/null`"
10437	test -n "$verbose" && echo "	package ice CFLAGS: $cf_pkgconfig_incs" 1>&6
10438
10439echo "${as_me:-configure}:10439: testing package ice CFLAGS: $cf_pkgconfig_incs ..." 1>&5
10440
10441	test -n "$verbose" && echo "	package ice LIBS: $cf_pkgconfig_libs" 1>&6
10442
10443echo "${as_me:-configure}:10443: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5
10444
10445cf_fix_cppflags=no
10446cf_new_cflags=
10447cf_new_cppflags=
10448cf_new_extra_cppflags=
10449
10450for cf_add_cflags in $cf_pkgconfig_incs
10451do
10452case "$cf_fix_cppflags" in
10453(no)
10454	case "$cf_add_cflags" in
10455	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10456		case "$cf_add_cflags" in
10457		(-D*)
10458			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10459
10460			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10461				&& test -z "${cf_tst_cflags}" \
10462				&& cf_fix_cppflags=yes
10463
10464			if test "$cf_fix_cppflags" = yes ; then
10465
10466	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10467	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10468
10469				continue
10470			elif test "${cf_tst_cflags}" = "\"'" ; then
10471
10472	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10473	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10474
10475				continue
10476			fi
10477			;;
10478		esac
10479		case "$CPPFLAGS" in
10480		(*$cf_add_cflags)
10481			;;
10482		(*)
10483			case "$cf_add_cflags" in
10484			(-D*)
10485				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10486
10487CPPFLAGS=`echo "$CPPFLAGS" | \
10488	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
10489		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
10490
10491				;;
10492			esac
10493
10494	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10495	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10496
10497			;;
10498		esac
10499		;;
10500	(*)
10501
10502	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10503	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10504
10505		;;
10506	esac
10507	;;
10508(yes)
10509
10510	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10511	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10512
10513	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10514
10515	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10516		&& test -z "${cf_tst_cflags}" \
10517		&& cf_fix_cppflags=no
10518	;;
10519esac
10520done
10521
10522if test -n "$cf_new_cflags" ; then
10523
10524	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10525	CFLAGS="${CFLAGS}$cf_new_cflags"
10526
10527fi
10528
10529if test -n "$cf_new_cppflags" ; then
10530
10531	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10532	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10533
10534fi
10535
10536if test -n "$cf_new_extra_cppflags" ; then
10537
10538	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10539	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10540
10541fi
10542
10543cf_add_libs="$LIBS"
10544# reverse order
10545cf_add_0lib=
10546for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
10547# filter duplicates
10548for cf_add_1lib in $cf_add_0lib; do
10549	for cf_add_2lib in $cf_add_libs; do
10550		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
10551			cf_add_1lib=
10552			break
10553		fi
10554	done
10555	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
10556done
10557LIBS="$cf_add_libs"
10558
10559	:
10560else
10561	cf_pkgconfig_incs=
10562	cf_pkgconfig_libs=
10563	{ echo "$as_me:10563: WARNING: unable to find ICE library" >&5
10564echo "$as_me: WARNING: unable to find ICE library" >&2;}
10565fi
10566
10567if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "sm"; then
10568	test -n "$verbose" && echo "	found package sm" 1>&6
10569
10570echo "${as_me:-configure}:10570: testing found package sm ..." 1>&5
10571
10572	cf_pkgconfig_incs="`$PKG_CONFIG --cflags "sm" 2>/dev/null`"
10573	cf_pkgconfig_libs="`$PKG_CONFIG --libs   "sm" 2>/dev/null`"
10574	test -n "$verbose" && echo "	package sm CFLAGS: $cf_pkgconfig_incs" 1>&6
10575
10576echo "${as_me:-configure}:10576: testing package sm CFLAGS: $cf_pkgconfig_incs ..." 1>&5
10577
10578	test -n "$verbose" && echo "	package sm LIBS: $cf_pkgconfig_libs" 1>&6
10579
10580echo "${as_me:-configure}:10580: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5
10581
10582cf_fix_cppflags=no
10583cf_new_cflags=
10584cf_new_cppflags=
10585cf_new_extra_cppflags=
10586
10587for cf_add_cflags in $cf_pkgconfig_incs
10588do
10589case "$cf_fix_cppflags" in
10590(no)
10591	case "$cf_add_cflags" in
10592	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10593		case "$cf_add_cflags" in
10594		(-D*)
10595			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10596
10597			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10598				&& test -z "${cf_tst_cflags}" \
10599				&& cf_fix_cppflags=yes
10600
10601			if test "$cf_fix_cppflags" = yes ; then
10602
10603	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10604	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10605
10606				continue
10607			elif test "${cf_tst_cflags}" = "\"'" ; then
10608
10609	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10610	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10611
10612				continue
10613			fi
10614			;;
10615		esac
10616		case "$CPPFLAGS" in
10617		(*$cf_add_cflags)
10618			;;
10619		(*)
10620			case "$cf_add_cflags" in
10621			(-D*)
10622				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10623
10624CPPFLAGS=`echo "$CPPFLAGS" | \
10625	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
10626		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
10627
10628				;;
10629			esac
10630
10631	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10632	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10633
10634			;;
10635		esac
10636		;;
10637	(*)
10638
10639	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10640	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10641
10642		;;
10643	esac
10644	;;
10645(yes)
10646
10647	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10648	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10649
10650	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10651
10652	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10653		&& test -z "${cf_tst_cflags}" \
10654		&& cf_fix_cppflags=no
10655	;;
10656esac
10657done
10658
10659if test -n "$cf_new_cflags" ; then
10660
10661	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10662	CFLAGS="${CFLAGS}$cf_new_cflags"
10663
10664fi
10665
10666if test -n "$cf_new_cppflags" ; then
10667
10668	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10669	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10670
10671fi
10672
10673if test -n "$cf_new_extra_cppflags" ; then
10674
10675	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10676	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10677
10678fi
10679
10680cf_add_libs="$LIBS"
10681# reverse order
10682cf_add_0lib=
10683for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
10684# filter duplicates
10685for cf_add_1lib in $cf_add_0lib; do
10686	for cf_add_2lib in $cf_add_libs; do
10687		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
10688			cf_add_1lib=
10689			break
10690		fi
10691	done
10692	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
10693done
10694LIBS="$cf_add_libs"
10695
10696	:
10697else
10698	cf_pkgconfig_incs=
10699	cf_pkgconfig_libs=
10700	{ echo "$as_me:10700: WARNING: unable to find SM library" >&5
10701echo "$as_me: WARNING: unable to find SM library" >&2;}
10702fi
10703
10704if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "xt"; then
10705	test -n "$verbose" && echo "	found package xt" 1>&6
10706
10707echo "${as_me:-configure}:10707: testing found package xt ..." 1>&5
10708
10709	cf_pkgconfig_incs="`$PKG_CONFIG --cflags "xt" 2>/dev/null`"
10710	cf_pkgconfig_libs="`$PKG_CONFIG --libs   "xt" 2>/dev/null`"
10711	test -n "$verbose" && echo "	package xt CFLAGS: $cf_pkgconfig_incs" 1>&6
10712
10713echo "${as_me:-configure}:10713: testing package xt CFLAGS: $cf_pkgconfig_incs ..." 1>&5
10714
10715	test -n "$verbose" && echo "	package xt LIBS: $cf_pkgconfig_libs" 1>&6
10716
10717echo "${as_me:-configure}:10717: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5
10718
10719cf_fix_cppflags=no
10720cf_new_cflags=
10721cf_new_cppflags=
10722cf_new_extra_cppflags=
10723
10724for cf_add_cflags in $cf_pkgconfig_incs
10725do
10726case "$cf_fix_cppflags" in
10727(no)
10728	case "$cf_add_cflags" in
10729	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10730		case "$cf_add_cflags" in
10731		(-D*)
10732			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10733
10734			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10735				&& test -z "${cf_tst_cflags}" \
10736				&& cf_fix_cppflags=yes
10737
10738			if test "$cf_fix_cppflags" = yes ; then
10739
10740	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10741	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10742
10743				continue
10744			elif test "${cf_tst_cflags}" = "\"'" ; then
10745
10746	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10747	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10748
10749				continue
10750			fi
10751			;;
10752		esac
10753		case "$CPPFLAGS" in
10754		(*$cf_add_cflags)
10755			;;
10756		(*)
10757			case "$cf_add_cflags" in
10758			(-D*)
10759				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10760
10761CPPFLAGS=`echo "$CPPFLAGS" | \
10762	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
10763		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
10764
10765				;;
10766			esac
10767
10768	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10769	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10770
10771			;;
10772		esac
10773		;;
10774	(*)
10775
10776	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10777	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10778
10779		;;
10780	esac
10781	;;
10782(yes)
10783
10784	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10785	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10786
10787	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10788
10789	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10790		&& test -z "${cf_tst_cflags}" \
10791		&& cf_fix_cppflags=no
10792	;;
10793esac
10794done
10795
10796if test -n "$cf_new_cflags" ; then
10797
10798	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10799	CFLAGS="${CFLAGS}$cf_new_cflags"
10800
10801fi
10802
10803if test -n "$cf_new_cppflags" ; then
10804
10805	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10806	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10807
10808fi
10809
10810if test -n "$cf_new_extra_cppflags" ; then
10811
10812	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10813	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10814
10815fi
10816
10817cf_add_libs="$LIBS"
10818# reverse order
10819cf_add_0lib=
10820for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
10821# filter duplicates
10822for cf_add_1lib in $cf_add_0lib; do
10823	for cf_add_2lib in $cf_add_libs; do
10824		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
10825			cf_add_1lib=
10826			break
10827		fi
10828	done
10829	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
10830done
10831LIBS="$cf_add_libs"
10832
10833	:
10834else
10835	cf_pkgconfig_incs=
10836	cf_pkgconfig_libs=
10837	{ echo "$as_me:10837: WARNING: unable to find Xt library" >&5
10838echo "$as_me: WARNING: unable to find Xt library" >&2;}
10839fi
10840
10841else
10842	LIBS="$X_PRE_LIBS $LIBS $X_EXTRA_LIBS"
10843fi
10844
10845cf_have_X_LIBS=no
10846
10847if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "xt"; then
10848	test -n "$verbose" && echo "	found package xt" 1>&6
10849
10850echo "${as_me:-configure}:10850: testing found package xt ..." 1>&5
10851
10852	cf_pkgconfig_incs="`$PKG_CONFIG --cflags "xt" 2>/dev/null`"
10853	cf_pkgconfig_libs="`$PKG_CONFIG --libs   "xt" 2>/dev/null`"
10854	test -n "$verbose" && echo "	package xt CFLAGS: $cf_pkgconfig_incs" 1>&6
10855
10856echo "${as_me:-configure}:10856: testing package xt CFLAGS: $cf_pkgconfig_incs ..." 1>&5
10857
10858	test -n "$verbose" && echo "	package xt LIBS: $cf_pkgconfig_libs" 1>&6
10859
10860echo "${as_me:-configure}:10860: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5
10861
10862cf_fix_cppflags=no
10863cf_new_cflags=
10864cf_new_cppflags=
10865cf_new_extra_cppflags=
10866
10867for cf_add_cflags in $cf_pkgconfig_incs
10868do
10869case "$cf_fix_cppflags" in
10870(no)
10871	case "$cf_add_cflags" in
10872	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10873		case "$cf_add_cflags" in
10874		(-D*)
10875			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10876
10877			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10878				&& test -z "${cf_tst_cflags}" \
10879				&& cf_fix_cppflags=yes
10880
10881			if test "$cf_fix_cppflags" = yes ; then
10882
10883	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10884	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10885
10886				continue
10887			elif test "${cf_tst_cflags}" = "\"'" ; then
10888
10889	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10890	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10891
10892				continue
10893			fi
10894			;;
10895		esac
10896		case "$CPPFLAGS" in
10897		(*$cf_add_cflags)
10898			;;
10899		(*)
10900			case "$cf_add_cflags" in
10901			(-D*)
10902				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10903
10904CPPFLAGS=`echo "$CPPFLAGS" | \
10905	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
10906		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
10907
10908				;;
10909			esac
10910
10911	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10912	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10913
10914			;;
10915		esac
10916		;;
10917	(*)
10918
10919	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10920	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10921
10922		;;
10923	esac
10924	;;
10925(yes)
10926
10927	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10928	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10929
10930	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10931
10932	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10933		&& test -z "${cf_tst_cflags}" \
10934		&& cf_fix_cppflags=no
10935	;;
10936esac
10937done
10938
10939if test -n "$cf_new_cflags" ; then
10940
10941	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10942	CFLAGS="${CFLAGS}$cf_new_cflags"
10943
10944fi
10945
10946if test -n "$cf_new_cppflags" ; then
10947
10948	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10949	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10950
10951fi
10952
10953if test -n "$cf_new_extra_cppflags" ; then
10954
10955	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10956	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10957
10958fi
10959
10960cf_add_libs="$LIBS"
10961# reverse order
10962cf_add_0lib=
10963for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
10964# filter duplicates
10965for cf_add_1lib in $cf_add_0lib; do
10966	for cf_add_2lib in $cf_add_libs; do
10967		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
10968			cf_add_1lib=
10969			break
10970		fi
10971	done
10972	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
10973done
10974LIBS="$cf_add_libs"
10975
10976	case "x$LIBS" in
10977	(*-lX11*)
10978		;;
10979	(*)
10980# we have an "xt" package, but it may omit Xt's dependency on X11
10981echo "$as_me:10981: checking for usable X dependency" >&5
10982echo $ECHO_N "checking for usable X dependency... $ECHO_C" >&6
10983if test "${cf_cv_xt_x11_compat+set}" = set; then
10984  echo $ECHO_N "(cached) $ECHO_C" >&6
10985else
10986
10987cat >"conftest.$ac_ext" <<_ACEOF
10988#line 10988 "configure"
10989#include "confdefs.h"
10990
10991#include <X11/Xlib.h>
10992
10993int
10994main (void)
10995{
10996
10997	int rc1 = XDrawLine((Display*) 0, (Drawable) 0, (GC) 0, 0, 0, 0, 0);
10998	int rc2 = XClearWindow((Display*) 0, (Window) 0);
10999	int rc3 = XMoveWindow((Display*) 0, (Window) 0, 0, 0);
11000	int rc4 = XMoveResizeWindow((Display*)0, (Window)0, 0, 0, 0, 0);
11001
11002  ;
11003  return 0;
11004}
11005_ACEOF
11006rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11007if { (eval echo "$as_me:11007: \"$ac_link\"") >&5
11008  (eval $ac_link) 2>&5
11009  ac_status=$?
11010  echo "$as_me:11010: \$? = $ac_status" >&5
11011  (exit "$ac_status"); } &&
11012         { ac_try='test -s "conftest$ac_exeext"'
11013  { (eval echo "$as_me:11013: \"$ac_try\"") >&5
11014  (eval $ac_try) 2>&5
11015  ac_status=$?
11016  echo "$as_me:11016: \$? = $ac_status" >&5
11017  (exit "$ac_status"); }; }; then
11018  cf_cv_xt_x11_compat=yes
11019else
11020  echo "$as_me: failed program was:" >&5
11021cat "conftest.$ac_ext" >&5
11022cf_cv_xt_x11_compat=no
11023fi
11024rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11025fi
11026echo "$as_me:11026: result: $cf_cv_xt_x11_compat" >&5
11027echo "${ECHO_T}$cf_cv_xt_x11_compat" >&6
11028		if test "$cf_cv_xt_x11_compat" = no
11029		then
11030			test -n "$verbose" && echo "	work around broken X11 dependency" 1>&6
11031
11032echo "${as_me:-configure}:11032: testing work around broken X11 dependency ..." 1>&5
11033
11034			# 2010/11/19 - good enough until a working Xt on Xcb is delivered.
11035
11036if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "x11"; then
11037	test -n "$verbose" && echo "	found package x11" 1>&6
11038
11039echo "${as_me:-configure}:11039: testing found package x11 ..." 1>&5
11040
11041	cf_pkgconfig_incs="`$PKG_CONFIG --cflags "x11" 2>/dev/null`"
11042	cf_pkgconfig_libs="`$PKG_CONFIG --libs   "x11" 2>/dev/null`"
11043	test -n "$verbose" && echo "	package x11 CFLAGS: $cf_pkgconfig_incs" 1>&6
11044
11045echo "${as_me:-configure}:11045: testing package x11 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11046
11047	test -n "$verbose" && echo "	package x11 LIBS: $cf_pkgconfig_libs" 1>&6
11048
11049echo "${as_me:-configure}:11049: testing package x11 LIBS: $cf_pkgconfig_libs ..." 1>&5
11050
11051cf_fix_cppflags=no
11052cf_new_cflags=
11053cf_new_cppflags=
11054cf_new_extra_cppflags=
11055
11056for cf_add_cflags in $cf_pkgconfig_incs
11057do
11058case "$cf_fix_cppflags" in
11059(no)
11060	case "$cf_add_cflags" in
11061	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11062		case "$cf_add_cflags" in
11063		(-D*)
11064			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11065
11066			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11067				&& test -z "${cf_tst_cflags}" \
11068				&& cf_fix_cppflags=yes
11069
11070			if test "$cf_fix_cppflags" = yes ; then
11071
11072	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11073	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11074
11075				continue
11076			elif test "${cf_tst_cflags}" = "\"'" ; then
11077
11078	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11079	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11080
11081				continue
11082			fi
11083			;;
11084		esac
11085		case "$CPPFLAGS" in
11086		(*$cf_add_cflags)
11087			;;
11088		(*)
11089			case "$cf_add_cflags" in
11090			(-D*)
11091				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11092
11093CPPFLAGS=`echo "$CPPFLAGS" | \
11094	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
11095		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
11096
11097				;;
11098			esac
11099
11100	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11101	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11102
11103			;;
11104		esac
11105		;;
11106	(*)
11107
11108	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11109	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11110
11111		;;
11112	esac
11113	;;
11114(yes)
11115
11116	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11117	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11118
11119	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11120
11121	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11122		&& test -z "${cf_tst_cflags}" \
11123		&& cf_fix_cppflags=no
11124	;;
11125esac
11126done
11127
11128if test -n "$cf_new_cflags" ; then
11129
11130	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11131	CFLAGS="${CFLAGS}$cf_new_cflags"
11132
11133fi
11134
11135if test -n "$cf_new_cppflags" ; then
11136
11137	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11138	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11139
11140fi
11141
11142if test -n "$cf_new_extra_cppflags" ; then
11143
11144	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11145	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11146
11147fi
11148
11149cf_add_libs="$LIBS"
11150# reverse order
11151cf_add_0lib=
11152for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
11153# filter duplicates
11154for cf_add_1lib in $cf_add_0lib; do
11155	for cf_add_2lib in $cf_add_libs; do
11156		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
11157			cf_add_1lib=
11158			break
11159		fi
11160	done
11161	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
11162done
11163LIBS="$cf_add_libs"
11164
11165	:
11166else
11167	cf_pkgconfig_incs=
11168	cf_pkgconfig_libs=
11169
11170test -n "$verbose" && echo "	...before $LIBS" 1>&6
11171
11172echo "${as_me:-configure}:11172: testing ...before $LIBS ..." 1>&5
11173
11174LIBS=`echo "$LIBS" | sed -e "s/[ 	][ 	]*/ /g" -e "s%-lXt %-lXt -lX11 %" -e 's%  % %g'`
11175test -n "$verbose" && echo "	...after  $LIBS" 1>&6
11176
11177echo "${as_me:-configure}:11177: testing ...after  $LIBS ..." 1>&5
11178
11179fi
11180
11181		fi
11182		;;
11183	esac
11184
11185echo "$as_me:11185: checking for usable X Toolkit package" >&5
11186echo $ECHO_N "checking for usable X Toolkit package... $ECHO_C" >&6
11187if test "${cf_cv_xt_ice_compat+set}" = set; then
11188  echo $ECHO_N "(cached) $ECHO_C" >&6
11189else
11190
11191cat >"conftest.$ac_ext" <<_ACEOF
11192#line 11192 "configure"
11193#include "confdefs.h"
11194
11195#include <X11/Shell.h>
11196
11197int
11198main (void)
11199{
11200int num = IceConnectionNumber(0); (void) num
11201
11202  ;
11203  return 0;
11204}
11205_ACEOF
11206rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11207if { (eval echo "$as_me:11207: \"$ac_link\"") >&5
11208  (eval $ac_link) 2>&5
11209  ac_status=$?
11210  echo "$as_me:11210: \$? = $ac_status" >&5
11211  (exit "$ac_status"); } &&
11212         { ac_try='test -s "conftest$ac_exeext"'
11213  { (eval echo "$as_me:11213: \"$ac_try\"") >&5
11214  (eval $ac_try) 2>&5
11215  ac_status=$?
11216  echo "$as_me:11216: \$? = $ac_status" >&5
11217  (exit "$ac_status"); }; }; then
11218  cf_cv_xt_ice_compat=yes
11219else
11220  echo "$as_me: failed program was:" >&5
11221cat "conftest.$ac_ext" >&5
11222cf_cv_xt_ice_compat=no
11223fi
11224rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11225fi
11226echo "$as_me:11226: result: $cf_cv_xt_ice_compat" >&5
11227echo "${ECHO_T}$cf_cv_xt_ice_compat" >&6
11228
11229	if test "$cf_cv_xt_ice_compat" = no
11230	then
11231		# workaround for broken ".pc" files used for X Toolkit.
11232		case "x$X_PRE_LIBS" in
11233		(*-lICE*)
11234			case "x$LIBS" in
11235			(*-lICE*)
11236				;;
11237			(*)
11238				test -n "$verbose" && echo "	work around broken ICE dependency" 1>&6
11239
11240echo "${as_me:-configure}:11240: testing work around broken ICE dependency ..." 1>&5
11241
11242if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "ice"; then
11243	test -n "$verbose" && echo "	found package ice" 1>&6
11244
11245echo "${as_me:-configure}:11245: testing found package ice ..." 1>&5
11246
11247	cf_pkgconfig_incs="`$PKG_CONFIG --cflags "ice" 2>/dev/null`"
11248	cf_pkgconfig_libs="`$PKG_CONFIG --libs   "ice" 2>/dev/null`"
11249	test -n "$verbose" && echo "	package ice CFLAGS: $cf_pkgconfig_incs" 1>&6
11250
11251echo "${as_me:-configure}:11251: testing package ice CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11252
11253	test -n "$verbose" && echo "	package ice LIBS: $cf_pkgconfig_libs" 1>&6
11254
11255echo "${as_me:-configure}:11255: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5
11256
11257cf_fix_cppflags=no
11258cf_new_cflags=
11259cf_new_cppflags=
11260cf_new_extra_cppflags=
11261
11262for cf_add_cflags in $cf_pkgconfig_incs
11263do
11264case "$cf_fix_cppflags" in
11265(no)
11266	case "$cf_add_cflags" in
11267	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11268		case "$cf_add_cflags" in
11269		(-D*)
11270			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11271
11272			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11273				&& test -z "${cf_tst_cflags}" \
11274				&& cf_fix_cppflags=yes
11275
11276			if test "$cf_fix_cppflags" = yes ; then
11277
11278	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11279	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11280
11281				continue
11282			elif test "${cf_tst_cflags}" = "\"'" ; then
11283
11284	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11285	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11286
11287				continue
11288			fi
11289			;;
11290		esac
11291		case "$CPPFLAGS" in
11292		(*$cf_add_cflags)
11293			;;
11294		(*)
11295			case "$cf_add_cflags" in
11296			(-D*)
11297				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11298
11299CPPFLAGS=`echo "$CPPFLAGS" | \
11300	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
11301		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
11302
11303				;;
11304			esac
11305
11306	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11307	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11308
11309			;;
11310		esac
11311		;;
11312	(*)
11313
11314	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11315	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11316
11317		;;
11318	esac
11319	;;
11320(yes)
11321
11322	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11323	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11324
11325	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11326
11327	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11328		&& test -z "${cf_tst_cflags}" \
11329		&& cf_fix_cppflags=no
11330	;;
11331esac
11332done
11333
11334if test -n "$cf_new_cflags" ; then
11335
11336	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11337	CFLAGS="${CFLAGS}$cf_new_cflags"
11338
11339fi
11340
11341if test -n "$cf_new_cppflags" ; then
11342
11343	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11344	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11345
11346fi
11347
11348if test -n "$cf_new_extra_cppflags" ; then
11349
11350	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11351	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11352
11353fi
11354
11355cf_add_libs="$LIBS"
11356# reverse order
11357cf_add_0lib=
11358for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
11359# filter duplicates
11360for cf_add_1lib in $cf_add_0lib; do
11361	for cf_add_2lib in $cf_add_libs; do
11362		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
11363			cf_add_1lib=
11364			break
11365		fi
11366	done
11367	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
11368done
11369LIBS="$cf_add_libs"
11370
11371if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "sm"; then
11372	test -n "$verbose" && echo "	found package sm" 1>&6
11373
11374echo "${as_me:-configure}:11374: testing found package sm ..." 1>&5
11375
11376	cf_pkgconfig_incs="`$PKG_CONFIG --cflags "sm" 2>/dev/null`"
11377	cf_pkgconfig_libs="`$PKG_CONFIG --libs   "sm" 2>/dev/null`"
11378	test -n "$verbose" && echo "	package sm CFLAGS: $cf_pkgconfig_incs" 1>&6
11379
11380echo "${as_me:-configure}:11380: testing package sm CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11381
11382	test -n "$verbose" && echo "	package sm LIBS: $cf_pkgconfig_libs" 1>&6
11383
11384echo "${as_me:-configure}:11384: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5
11385
11386cf_fix_cppflags=no
11387cf_new_cflags=
11388cf_new_cppflags=
11389cf_new_extra_cppflags=
11390
11391for cf_add_cflags in $cf_pkgconfig_incs
11392do
11393case "$cf_fix_cppflags" in
11394(no)
11395	case "$cf_add_cflags" in
11396	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11397		case "$cf_add_cflags" in
11398		(-D*)
11399			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11400
11401			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11402				&& test -z "${cf_tst_cflags}" \
11403				&& cf_fix_cppflags=yes
11404
11405			if test "$cf_fix_cppflags" = yes ; then
11406
11407	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11408	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11409
11410				continue
11411			elif test "${cf_tst_cflags}" = "\"'" ; then
11412
11413	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11414	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11415
11416				continue
11417			fi
11418			;;
11419		esac
11420		case "$CPPFLAGS" in
11421		(*$cf_add_cflags)
11422			;;
11423		(*)
11424			case "$cf_add_cflags" in
11425			(-D*)
11426				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11427
11428CPPFLAGS=`echo "$CPPFLAGS" | \
11429	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
11430		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
11431
11432				;;
11433			esac
11434
11435	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11436	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11437
11438			;;
11439		esac
11440		;;
11441	(*)
11442
11443	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11444	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11445
11446		;;
11447	esac
11448	;;
11449(yes)
11450
11451	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11452	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11453
11454	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11455
11456	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11457		&& test -z "${cf_tst_cflags}" \
11458		&& cf_fix_cppflags=no
11459	;;
11460esac
11461done
11462
11463if test -n "$cf_new_cflags" ; then
11464
11465	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11466	CFLAGS="${CFLAGS}$cf_new_cflags"
11467
11468fi
11469
11470if test -n "$cf_new_cppflags" ; then
11471
11472	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11473	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11474
11475fi
11476
11477if test -n "$cf_new_extra_cppflags" ; then
11478
11479	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11480	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11481
11482fi
11483
11484cf_add_libs="$LIBS"
11485# reverse order
11486cf_add_0lib=
11487for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
11488# filter duplicates
11489for cf_add_1lib in $cf_add_0lib; do
11490	for cf_add_2lib in $cf_add_libs; do
11491		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
11492			cf_add_1lib=
11493			break
11494		fi
11495	done
11496	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
11497done
11498LIBS="$cf_add_libs"
11499
11500	:
11501else
11502	cf_pkgconfig_incs=
11503	cf_pkgconfig_libs=
11504	:
11505fi
11506
11507else
11508	cf_pkgconfig_incs=
11509	cf_pkgconfig_libs=
11510
11511test -n "$verbose" && echo "	...before $LIBS" 1>&6
11512
11513echo "${as_me:-configure}:11513: testing ...before $LIBS ..." 1>&5
11514
11515LIBS=`echo "$LIBS" | sed -e "s/[ 	][ 	]*/ /g" -e "s%-lXt %-lXt $X_PRE_LIBS %" -e 's%  % %g'`
11516test -n "$verbose" && echo "	...after  $LIBS" 1>&6
11517
11518echo "${as_me:-configure}:11518: testing ...after  $LIBS ..." 1>&5
11519
11520fi
11521
11522				;;
11523			esac
11524			;;
11525		esac
11526	fi
11527
11528	cf_have_X_LIBS=yes
11529
11530else
11531	cf_pkgconfig_incs=
11532	cf_pkgconfig_libs=
11533
11534	LDFLAGS="$X_LIBS $LDFLAGS"
11535
11536test -n "$verbose" && echo "	checking additions to CFLAGS" 1>&6
11537
11538echo "${as_me:-configure}:11538: testing checking additions to CFLAGS ..." 1>&5
11539
11540cf_check_cflags="$CFLAGS"
11541cf_check_cppflags="$CPPFLAGS"
11542
11543cf_fix_cppflags=no
11544cf_new_cflags=
11545cf_new_cppflags=
11546cf_new_extra_cppflags=
11547
11548for cf_add_cflags in $X_CFLAGS
11549do
11550case "$cf_fix_cppflags" in
11551(no)
11552	case "$cf_add_cflags" in
11553	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11554		case "$cf_add_cflags" in
11555		(-D*)
11556			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11557
11558			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11559				&& test -z "${cf_tst_cflags}" \
11560				&& cf_fix_cppflags=yes
11561
11562			if test "$cf_fix_cppflags" = yes ; then
11563
11564	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11565	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11566
11567				continue
11568			elif test "${cf_tst_cflags}" = "\"'" ; then
11569
11570	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11571	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11572
11573				continue
11574			fi
11575			;;
11576		esac
11577		case "$CPPFLAGS" in
11578		(*$cf_add_cflags)
11579			;;
11580		(*)
11581			case "$cf_add_cflags" in
11582			(-D*)
11583				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11584
11585CPPFLAGS=`echo "$CPPFLAGS" | \
11586	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
11587		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
11588
11589				;;
11590			esac
11591
11592	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11593	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11594
11595			;;
11596		esac
11597		;;
11598	(*)
11599
11600	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11601	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11602
11603		;;
11604	esac
11605	;;
11606(yes)
11607
11608	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11609	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11610
11611	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11612
11613	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11614		&& test -z "${cf_tst_cflags}" \
11615		&& cf_fix_cppflags=no
11616	;;
11617esac
11618done
11619
11620if test -n "$cf_new_cflags" ; then
11621	test -n "$verbose" && echo "	add to \$CFLAGS $cf_new_cflags" 1>&6
11622
11623echo "${as_me:-configure}:11623: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
11624
11625	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11626	CFLAGS="${CFLAGS}$cf_new_cflags"
11627
11628fi
11629
11630if test -n "$cf_new_cppflags" ; then
11631	test -n "$verbose" && echo "	add to \$CPPFLAGS $cf_new_cppflags" 1>&6
11632
11633echo "${as_me:-configure}:11633: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
11634
11635	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11636	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11637
11638fi
11639
11640if test -n "$cf_new_extra_cppflags" ; then
11641	test -n "$verbose" && echo "	add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
11642
11643echo "${as_me:-configure}:11643: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
11644
11645	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11646	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11647
11648fi
11649
11650if test "x$cf_check_cflags" != "x$CFLAGS" ; then
11651cat >"conftest.$ac_ext" <<_ACEOF
11652#line 11652 "configure"
11653#include "confdefs.h"
11654#include <stdio.h>
11655int
11656main (void)
11657{
11658printf("Hello world");
11659  ;
11660  return 0;
11661}
11662_ACEOF
11663rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11664if { (eval echo "$as_me:11664: \"$ac_link\"") >&5
11665  (eval $ac_link) 2>&5
11666  ac_status=$?
11667  echo "$as_me:11667: \$? = $ac_status" >&5
11668  (exit "$ac_status"); } &&
11669         { ac_try='test -s "conftest$ac_exeext"'
11670  { (eval echo "$as_me:11670: \"$ac_try\"") >&5
11671  (eval $ac_try) 2>&5
11672  ac_status=$?
11673  echo "$as_me:11673: \$? = $ac_status" >&5
11674  (exit "$ac_status"); }; }; then
11675  :
11676else
11677  echo "$as_me: failed program was:" >&5
11678cat "conftest.$ac_ext" >&5
11679test -n "$verbose" && echo "	test-compile failed.  Undoing change to \$CFLAGS" 1>&6
11680
11681echo "${as_me:-configure}:11681: testing test-compile failed.  Undoing change to \$CFLAGS ..." 1>&5
11682
11683	 if test "x$cf_check_cppflags" != "x$CPPFLAGS" ; then
11684		 test -n "$verbose" && echo "	but keeping change to \$CPPFLAGS" 1>&6
11685
11686echo "${as_me:-configure}:11686: testing but keeping change to \$CPPFLAGS ..." 1>&5
11687
11688	 fi
11689	 CFLAGS="$cf_check_cflags"
11690fi
11691rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11692fi
11693
11694	echo "$as_me:11694: checking for XOpenDisplay" >&5
11695echo $ECHO_N "checking for XOpenDisplay... $ECHO_C" >&6
11696if test "${ac_cv_func_XOpenDisplay+set}" = set; then
11697  echo $ECHO_N "(cached) $ECHO_C" >&6
11698else
11699  cat >"conftest.$ac_ext" <<_ACEOF
11700#line 11700 "configure"
11701#include "confdefs.h"
11702#define XOpenDisplay autoconf_temporary
11703#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
11704#undef XOpenDisplay
11705
11706#ifdef __cplusplus
11707extern "C"
11708#endif
11709
11710/* We use char because int might match the return type of a gcc2
11711   builtin and then its argument prototype would still apply.  */
11712char XOpenDisplay (void);
11713
11714int
11715main (void)
11716{
11717
11718/* The GNU C library defines stubs for functions which it implements
11719    to always fail with ENOSYS.  Some functions are actually named
11720    something starting with __ and the normal name is an alias.  */
11721#if defined (__stub_XOpenDisplay) || defined (__stub___XOpenDisplay)
11722#error found stub for XOpenDisplay
11723#endif
11724
11725	return XOpenDisplay ();
11726  ;
11727  return 0;
11728}
11729_ACEOF
11730rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11731if { (eval echo "$as_me:11731: \"$ac_link\"") >&5
11732  (eval $ac_link) 2>&5
11733  ac_status=$?
11734  echo "$as_me:11734: \$? = $ac_status" >&5
11735  (exit "$ac_status"); } &&
11736         { ac_try='test -s "conftest$ac_exeext"'
11737  { (eval echo "$as_me:11737: \"$ac_try\"") >&5
11738  (eval $ac_try) 2>&5
11739  ac_status=$?
11740  echo "$as_me:11740: \$? = $ac_status" >&5
11741  (exit "$ac_status"); }; }; then
11742  ac_cv_func_XOpenDisplay=yes
11743else
11744  echo "$as_me: failed program was:" >&5
11745cat "conftest.$ac_ext" >&5
11746ac_cv_func_XOpenDisplay=no
11747fi
11748rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11749fi
11750echo "$as_me:11750: result: $ac_cv_func_XOpenDisplay" >&5
11751echo "${ECHO_T}$ac_cv_func_XOpenDisplay" >&6
11752if test "$ac_cv_func_XOpenDisplay" = yes; then
11753  :
11754else
11755
11756	echo "$as_me:11756: checking for XOpenDisplay in -lX11" >&5
11757echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6
11758if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then
11759  echo $ECHO_N "(cached) $ECHO_C" >&6
11760else
11761  ac_check_lib_save_LIBS=$LIBS
11762LIBS="-lX11  $LIBS"
11763cat >"conftest.$ac_ext" <<_ACEOF
11764#line 11764 "configure"
11765#include "confdefs.h"
11766
11767/* Override any gcc2 internal prototype to avoid an error.  */
11768#ifdef __cplusplus
11769extern "C"
11770#endif
11771/* We use char because int might match the return type of a gcc2
11772   builtin and then its argument prototype would still apply.  */
11773char XOpenDisplay ();
11774int
11775main (void)
11776{
11777XOpenDisplay ();
11778  ;
11779  return 0;
11780}
11781_ACEOF
11782rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11783if { (eval echo "$as_me:11783: \"$ac_link\"") >&5
11784  (eval $ac_link) 2>&5
11785  ac_status=$?
11786  echo "$as_me:11786: \$? = $ac_status" >&5
11787  (exit "$ac_status"); } &&
11788         { ac_try='test -s "conftest$ac_exeext"'
11789  { (eval echo "$as_me:11789: \"$ac_try\"") >&5
11790  (eval $ac_try) 2>&5
11791  ac_status=$?
11792  echo "$as_me:11792: \$? = $ac_status" >&5
11793  (exit "$ac_status"); }; }; then
11794  ac_cv_lib_X11_XOpenDisplay=yes
11795else
11796  echo "$as_me: failed program was:" >&5
11797cat "conftest.$ac_ext" >&5
11798ac_cv_lib_X11_XOpenDisplay=no
11799fi
11800rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11801LIBS=$ac_check_lib_save_LIBS
11802fi
11803echo "$as_me:11803: result: $ac_cv_lib_X11_XOpenDisplay" >&5
11804echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6
11805if test "$ac_cv_lib_X11_XOpenDisplay" = yes; then
11806
11807cf_add_libs="$LIBS"
11808# reverse order
11809cf_add_0lib=
11810for cf_add_1lib in -lX11; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
11811# filter duplicates
11812for cf_add_1lib in $cf_add_0lib; do
11813	for cf_add_2lib in $cf_add_libs; do
11814		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
11815			cf_add_1lib=
11816			break
11817		fi
11818	done
11819	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
11820done
11821LIBS="$cf_add_libs"
11822
11823fi
11824
11825fi
11826
11827	echo "$as_me:11827: checking for XtAppInitialize" >&5
11828echo $ECHO_N "checking for XtAppInitialize... $ECHO_C" >&6
11829if test "${ac_cv_func_XtAppInitialize+set}" = set; then
11830  echo $ECHO_N "(cached) $ECHO_C" >&6
11831else
11832  cat >"conftest.$ac_ext" <<_ACEOF
11833#line 11833 "configure"
11834#include "confdefs.h"
11835#define XtAppInitialize autoconf_temporary
11836#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
11837#undef XtAppInitialize
11838
11839#ifdef __cplusplus
11840extern "C"
11841#endif
11842
11843/* We use char because int might match the return type of a gcc2
11844   builtin and then its argument prototype would still apply.  */
11845char XtAppInitialize (void);
11846
11847int
11848main (void)
11849{
11850
11851/* The GNU C library defines stubs for functions which it implements
11852    to always fail with ENOSYS.  Some functions are actually named
11853    something starting with __ and the normal name is an alias.  */
11854#if defined (__stub_XtAppInitialize) || defined (__stub___XtAppInitialize)
11855#error found stub for XtAppInitialize
11856#endif
11857
11858	return XtAppInitialize ();
11859  ;
11860  return 0;
11861}
11862_ACEOF
11863rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11864if { (eval echo "$as_me:11864: \"$ac_link\"") >&5
11865  (eval $ac_link) 2>&5
11866  ac_status=$?
11867  echo "$as_me:11867: \$? = $ac_status" >&5
11868  (exit "$ac_status"); } &&
11869         { ac_try='test -s "conftest$ac_exeext"'
11870  { (eval echo "$as_me:11870: \"$ac_try\"") >&5
11871  (eval $ac_try) 2>&5
11872  ac_status=$?
11873  echo "$as_me:11873: \$? = $ac_status" >&5
11874  (exit "$ac_status"); }; }; then
11875  ac_cv_func_XtAppInitialize=yes
11876else
11877  echo "$as_me: failed program was:" >&5
11878cat "conftest.$ac_ext" >&5
11879ac_cv_func_XtAppInitialize=no
11880fi
11881rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11882fi
11883echo "$as_me:11883: result: $ac_cv_func_XtAppInitialize" >&5
11884echo "${ECHO_T}$ac_cv_func_XtAppInitialize" >&6
11885if test "$ac_cv_func_XtAppInitialize" = yes; then
11886  :
11887else
11888
11889	echo "$as_me:11889: checking for XtAppInitialize in -lXt" >&5
11890echo $ECHO_N "checking for XtAppInitialize in -lXt... $ECHO_C" >&6
11891if test "${ac_cv_lib_Xt_XtAppInitialize+set}" = set; then
11892  echo $ECHO_N "(cached) $ECHO_C" >&6
11893else
11894  ac_check_lib_save_LIBS=$LIBS
11895LIBS="-lXt  $LIBS"
11896cat >"conftest.$ac_ext" <<_ACEOF
11897#line 11897 "configure"
11898#include "confdefs.h"
11899
11900/* Override any gcc2 internal prototype to avoid an error.  */
11901#ifdef __cplusplus
11902extern "C"
11903#endif
11904/* We use char because int might match the return type of a gcc2
11905   builtin and then its argument prototype would still apply.  */
11906char XtAppInitialize ();
11907int
11908main (void)
11909{
11910XtAppInitialize ();
11911  ;
11912  return 0;
11913}
11914_ACEOF
11915rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11916if { (eval echo "$as_me:11916: \"$ac_link\"") >&5
11917  (eval $ac_link) 2>&5
11918  ac_status=$?
11919  echo "$as_me:11919: \$? = $ac_status" >&5
11920  (exit "$ac_status"); } &&
11921         { ac_try='test -s "conftest$ac_exeext"'
11922  { (eval echo "$as_me:11922: \"$ac_try\"") >&5
11923  (eval $ac_try) 2>&5
11924  ac_status=$?
11925  echo "$as_me:11925: \$? = $ac_status" >&5
11926  (exit "$ac_status"); }; }; then
11927  ac_cv_lib_Xt_XtAppInitialize=yes
11928else
11929  echo "$as_me: failed program was:" >&5
11930cat "conftest.$ac_ext" >&5
11931ac_cv_lib_Xt_XtAppInitialize=no
11932fi
11933rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11934LIBS=$ac_check_lib_save_LIBS
11935fi
11936echo "$as_me:11936: result: $ac_cv_lib_Xt_XtAppInitialize" >&5
11937echo "${ECHO_T}$ac_cv_lib_Xt_XtAppInitialize" >&6
11938if test "$ac_cv_lib_Xt_XtAppInitialize" = yes; then
11939
11940cat >>confdefs.h <<\EOF
11941#define HAVE_LIBXT 1
11942EOF
11943
11944		 cf_have_X_LIBS=Xt
11945		 LIBS="-lXt $LIBS"
11946fi
11947
11948fi
11949
11950fi
11951
11952if test "$cf_have_X_LIBS" = no ; then
11953	{ echo "$as_me:11953: WARNING: Unable to successfully link X Toolkit library (-lXt) with
11954test program.  You will have to check and add the proper libraries by hand
11955to makefile." >&5
11956echo "$as_me: WARNING: Unable to successfully link X Toolkit library (-lXt) with
11957test program.  You will have to check and add the proper libraries by hand
11958to makefile." >&2;}
11959fi
11960
11961for ac_header in \
11962	X11/DECkeysym.h \
11963	X11/Sunkeysym.h \
11964	X11/XF86keysym.h \
11965	X11/XKBlib.h \
11966	X11/TranslateI.h \
11967	X11/Xpoll.h \
11968	X11/extensions/XKB.h \
11969
11970do
11971as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11972echo "$as_me:11972: checking for $ac_header" >&5
11973echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11974if eval "test \"\${$as_ac_Header+set}\" = set"; then
11975  echo $ECHO_N "(cached) $ECHO_C" >&6
11976else
11977  cat >"conftest.$ac_ext" <<_ACEOF
11978#line 11978 "configure"
11979#include "confdefs.h"
11980#include <$ac_header>
11981_ACEOF
11982if { (eval echo "$as_me:11982: \"$ac_cpp "conftest.$ac_ext"\"") >&5
11983  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
11984  ac_status=$?
11985  $EGREP -v '^ *\+' conftest.er1 >conftest.err
11986  rm -f conftest.er1
11987  cat conftest.err >&5
11988  echo "$as_me:11988: \$? = $ac_status" >&5
11989  (exit "$ac_status"); } >/dev/null; then
11990  if test -s conftest.err; then
11991    ac_cpp_err=$ac_c_preproc_warn_flag
11992  else
11993    ac_cpp_err=
11994  fi
11995else
11996  ac_cpp_err=yes
11997fi
11998if test -z "$ac_cpp_err"; then
11999  eval "$as_ac_Header=yes"
12000else
12001  echo "$as_me: failed program was:" >&5
12002  cat "conftest.$ac_ext" >&5
12003  eval "$as_ac_Header=no"
12004fi
12005rm -f conftest.err "conftest.$ac_ext"
12006fi
12007echo "$as_me:12007: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
12008echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
12009if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
12010  cat >>confdefs.h <<EOF
12011#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12012EOF
12013
12014fi
12015done
12016
12017ICON_SUFFIX=.xbm
12018
12019cf_save_cppflags="${CPPFLAGS}"
12020cf_save_ldflags="${LDFLAGS}"
12021
12022echo "$as_me:12022: checking if you want to use the Xpm library for colored icon" >&5
12023echo $ECHO_N "checking if you want to use the Xpm library for colored icon... $ECHO_C" >&6
12024
12025# Check whether --with-xpm or --without-xpm was given.
12026if test "${with_xpm+set}" = set; then
12027  withval="$with_xpm"
12028  cf_Xpm_library="$withval"
12029else
12030  cf_Xpm_library=yes
12031fi;
12032echo "$as_me:12032: result: $cf_Xpm_library" >&5
12033echo "${ECHO_T}$cf_Xpm_library" >&6
12034
12035if test "$cf_Xpm_library" != no ; then
12036    if test "$cf_Xpm_library" != yes ; then
12037	CPPFLAGS="$CPPFLAGS -I$withval/include"
12038	LDFLAGS="$LDFLAGS -L$withval/lib"
12039    fi
12040    echo "$as_me:12040: checking for X11/xpm.h" >&5
12041echo $ECHO_N "checking for X11/xpm.h... $ECHO_C" >&6
12042if test "${ac_cv_header_X11_xpm_h+set}" = set; then
12043  echo $ECHO_N "(cached) $ECHO_C" >&6
12044else
12045  cat >"conftest.$ac_ext" <<_ACEOF
12046#line 12046 "configure"
12047#include "confdefs.h"
12048#include <X11/xpm.h>
12049_ACEOF
12050if { (eval echo "$as_me:12050: \"$ac_cpp "conftest.$ac_ext"\"") >&5
12051  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
12052  ac_status=$?
12053  $EGREP -v '^ *\+' conftest.er1 >conftest.err
12054  rm -f conftest.er1
12055  cat conftest.err >&5
12056  echo "$as_me:12056: \$? = $ac_status" >&5
12057  (exit "$ac_status"); } >/dev/null; then
12058  if test -s conftest.err; then
12059    ac_cpp_err=$ac_c_preproc_warn_flag
12060  else
12061    ac_cpp_err=
12062  fi
12063else
12064  ac_cpp_err=yes
12065fi
12066if test -z "$ac_cpp_err"; then
12067  ac_cv_header_X11_xpm_h=yes
12068else
12069  echo "$as_me: failed program was:" >&5
12070  cat "conftest.$ac_ext" >&5
12071  ac_cv_header_X11_xpm_h=no
12072fi
12073rm -f conftest.err "conftest.$ac_ext"
12074fi
12075echo "$as_me:12075: result: $ac_cv_header_X11_xpm_h" >&5
12076echo "${ECHO_T}$ac_cv_header_X11_xpm_h" >&6
12077if test "$ac_cv_header_X11_xpm_h" = yes; then
12078
12079	echo "$as_me:12079: checking for XpmCreatePixmapFromData in -lXpm" >&5
12080echo $ECHO_N "checking for XpmCreatePixmapFromData in -lXpm... $ECHO_C" >&6
12081if test "${ac_cv_lib_Xpm_XpmCreatePixmapFromData+set}" = set; then
12082  echo $ECHO_N "(cached) $ECHO_C" >&6
12083else
12084  ac_check_lib_save_LIBS=$LIBS
12085LIBS="-lXpm -lX11 $X_LIBS $LIBS"
12086cat >"conftest.$ac_ext" <<_ACEOF
12087#line 12087 "configure"
12088#include "confdefs.h"
12089
12090/* Override any gcc2 internal prototype to avoid an error.  */
12091#ifdef __cplusplus
12092extern "C"
12093#endif
12094/* We use char because int might match the return type of a gcc2
12095   builtin and then its argument prototype would still apply.  */
12096char XpmCreatePixmapFromData ();
12097int
12098main (void)
12099{
12100XpmCreatePixmapFromData ();
12101  ;
12102  return 0;
12103}
12104_ACEOF
12105rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12106if { (eval echo "$as_me:12106: \"$ac_link\"") >&5
12107  (eval $ac_link) 2>&5
12108  ac_status=$?
12109  echo "$as_me:12109: \$? = $ac_status" >&5
12110  (exit "$ac_status"); } &&
12111         { ac_try='test -s "conftest$ac_exeext"'
12112  { (eval echo "$as_me:12112: \"$ac_try\"") >&5
12113  (eval $ac_try) 2>&5
12114  ac_status=$?
12115  echo "$as_me:12115: \$? = $ac_status" >&5
12116  (exit "$ac_status"); }; }; then
12117  ac_cv_lib_Xpm_XpmCreatePixmapFromData=yes
12118else
12119  echo "$as_me: failed program was:" >&5
12120cat "conftest.$ac_ext" >&5
12121ac_cv_lib_Xpm_XpmCreatePixmapFromData=no
12122fi
12123rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12124LIBS=$ac_check_lib_save_LIBS
12125fi
12126echo "$as_me:12126: result: $ac_cv_lib_Xpm_XpmCreatePixmapFromData" >&5
12127echo "${ECHO_T}$ac_cv_lib_Xpm_XpmCreatePixmapFromData" >&6
12128if test "$ac_cv_lib_Xpm_XpmCreatePixmapFromData" = yes; then
12129
12130cat >>confdefs.h <<\EOF
12131#define HAVE_LIBXPM 1
12132EOF
12133
12134	    ICON_SUFFIX=.xpm
12135	    LIBS="-lXpm $LIBS"
12136else
12137  CPPFLAGS="${cf_save_cppflags}" LDFLAGS="${cf_save_ldflags}"
12138fi
12139
12140else
12141  CPPFLAGS="${cf_save_cppflags}" LDFLAGS="${cf_save_ldflags}"
12142fi
12143
12144fi
12145
12146echo "$as_me:12146: checking if you want to use the Xinerama extension" >&5
12147echo $ECHO_N "checking if you want to use the Xinerama extension... $ECHO_C" >&6
12148
12149# Check whether --with-xinerama or --without-xinerama was given.
12150if test "${with_xinerama+set}" = set; then
12151  withval="$with_xinerama"
12152  cf_with_xinerama="$withval"
12153else
12154  cf_with_xinerama=yes
12155fi;
12156echo "$as_me:12156: result: $cf_with_xinerama" >&5
12157echo "${ECHO_T}$cf_with_xinerama" >&6
12158if test "$cf_with_xinerama" = yes; then
12159
12160if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "xinerama"; then
12161	test -n "$verbose" && echo "	found package xinerama" 1>&6
12162
12163echo "${as_me:-configure}:12163: testing found package xinerama ..." 1>&5
12164
12165	cf_pkgconfig_incs="`$PKG_CONFIG --cflags "xinerama" 2>/dev/null`"
12166	cf_pkgconfig_libs="`$PKG_CONFIG --libs   "xinerama" 2>/dev/null`"
12167	test -n "$verbose" && echo "	package xinerama CFLAGS: $cf_pkgconfig_incs" 1>&6
12168
12169echo "${as_me:-configure}:12169: testing package xinerama CFLAGS: $cf_pkgconfig_incs ..." 1>&5
12170
12171	test -n "$verbose" && echo "	package xinerama LIBS: $cf_pkgconfig_libs" 1>&6
12172
12173echo "${as_me:-configure}:12173: testing package xinerama LIBS: $cf_pkgconfig_libs ..." 1>&5
12174
12175cf_fix_cppflags=no
12176cf_new_cflags=
12177cf_new_cppflags=
12178cf_new_extra_cppflags=
12179
12180for cf_add_cflags in $cf_pkgconfig_incs
12181do
12182case "$cf_fix_cppflags" in
12183(no)
12184	case "$cf_add_cflags" in
12185	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12186		case "$cf_add_cflags" in
12187		(-D*)
12188			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12189
12190			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12191				&& test -z "${cf_tst_cflags}" \
12192				&& cf_fix_cppflags=yes
12193
12194			if test "$cf_fix_cppflags" = yes ; then
12195
12196	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12197	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12198
12199				continue
12200			elif test "${cf_tst_cflags}" = "\"'" ; then
12201
12202	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12203	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12204
12205				continue
12206			fi
12207			;;
12208		esac
12209		case "$CPPFLAGS" in
12210		(*$cf_add_cflags)
12211			;;
12212		(*)
12213			case "$cf_add_cflags" in
12214			(-D*)
12215				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12216
12217CPPFLAGS=`echo "$CPPFLAGS" | \
12218	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
12219		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
12220
12221				;;
12222			esac
12223
12224	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12225	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12226
12227			;;
12228		esac
12229		;;
12230	(*)
12231
12232	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12233	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12234
12235		;;
12236	esac
12237	;;
12238(yes)
12239
12240	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12241	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12242
12243	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
12244
12245	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12246		&& test -z "${cf_tst_cflags}" \
12247		&& cf_fix_cppflags=no
12248	;;
12249esac
12250done
12251
12252if test -n "$cf_new_cflags" ; then
12253
12254	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12255	CFLAGS="${CFLAGS}$cf_new_cflags"
12256
12257fi
12258
12259if test -n "$cf_new_cppflags" ; then
12260
12261	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12262	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12263
12264fi
12265
12266if test -n "$cf_new_extra_cppflags" ; then
12267
12268	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12269	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12270
12271fi
12272
12273cf_add_libs="$LIBS"
12274# reverse order
12275cf_add_0lib=
12276for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
12277# filter duplicates
12278for cf_add_1lib in $cf_add_0lib; do
12279	for cf_add_2lib in $cf_add_libs; do
12280		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
12281			cf_add_1lib=
12282			break
12283		fi
12284	done
12285	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
12286done
12287LIBS="$cf_add_libs"
12288
12289	cat >>confdefs.h <<\EOF
12290#define HAVE_X11_EXTENSIONS_XINERAMA_H 1
12291EOF
12292
12293else
12294	cf_pkgconfig_incs=
12295	cf_pkgconfig_libs=
12296
12297	echo "$as_me:12297: checking for XineramaQueryScreens in -lXinerama" >&5
12298echo $ECHO_N "checking for XineramaQueryScreens in -lXinerama... $ECHO_C" >&6
12299if test "${ac_cv_lib_Xinerama_XineramaQueryScreens+set}" = set; then
12300  echo $ECHO_N "(cached) $ECHO_C" >&6
12301else
12302  ac_check_lib_save_LIBS=$LIBS
12303LIBS="-lXinerama  $LIBS"
12304cat >"conftest.$ac_ext" <<_ACEOF
12305#line 12305 "configure"
12306#include "confdefs.h"
12307
12308/* Override any gcc2 internal prototype to avoid an error.  */
12309#ifdef __cplusplus
12310extern "C"
12311#endif
12312/* We use char because int might match the return type of a gcc2
12313   builtin and then its argument prototype would still apply.  */
12314char XineramaQueryScreens ();
12315int
12316main (void)
12317{
12318XineramaQueryScreens ();
12319  ;
12320  return 0;
12321}
12322_ACEOF
12323rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12324if { (eval echo "$as_me:12324: \"$ac_link\"") >&5
12325  (eval $ac_link) 2>&5
12326  ac_status=$?
12327  echo "$as_me:12327: \$? = $ac_status" >&5
12328  (exit "$ac_status"); } &&
12329         { ac_try='test -s "conftest$ac_exeext"'
12330  { (eval echo "$as_me:12330: \"$ac_try\"") >&5
12331  (eval $ac_try) 2>&5
12332  ac_status=$?
12333  echo "$as_me:12333: \$? = $ac_status" >&5
12334  (exit "$ac_status"); }; }; then
12335  ac_cv_lib_Xinerama_XineramaQueryScreens=yes
12336else
12337  echo "$as_me: failed program was:" >&5
12338cat "conftest.$ac_ext" >&5
12339ac_cv_lib_Xinerama_XineramaQueryScreens=no
12340fi
12341rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12342LIBS=$ac_check_lib_save_LIBS
12343fi
12344echo "$as_me:12344: result: $ac_cv_lib_Xinerama_XineramaQueryScreens" >&5
12345echo "${ECHO_T}$ac_cv_lib_Xinerama_XineramaQueryScreens" >&6
12346if test "$ac_cv_lib_Xinerama_XineramaQueryScreens" = yes; then
12347
12348cf_add_libs="$LIBS"
12349# reverse order
12350cf_add_0lib=
12351for cf_add_1lib in -lXinerama; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
12352# filter duplicates
12353for cf_add_1lib in $cf_add_0lib; do
12354	for cf_add_2lib in $cf_add_libs; do
12355		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
12356			cf_add_1lib=
12357			break
12358		fi
12359	done
12360	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
12361done
12362LIBS="$cf_add_libs"
12363
12364for ac_header in \
12365			X11/extensions/Xinerama.h \
12366
12367do
12368as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12369echo "$as_me:12369: checking for $ac_header" >&5
12370echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12371if eval "test \"\${$as_ac_Header+set}\" = set"; then
12372  echo $ECHO_N "(cached) $ECHO_C" >&6
12373else
12374  cat >"conftest.$ac_ext" <<_ACEOF
12375#line 12375 "configure"
12376#include "confdefs.h"
12377#include <$ac_header>
12378_ACEOF
12379if { (eval echo "$as_me:12379: \"$ac_cpp "conftest.$ac_ext"\"") >&5
12380  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
12381  ac_status=$?
12382  $EGREP -v '^ *\+' conftest.er1 >conftest.err
12383  rm -f conftest.er1
12384  cat conftest.err >&5
12385  echo "$as_me:12385: \$? = $ac_status" >&5
12386  (exit "$ac_status"); } >/dev/null; then
12387  if test -s conftest.err; then
12388    ac_cpp_err=$ac_c_preproc_warn_flag
12389  else
12390    ac_cpp_err=
12391  fi
12392else
12393  ac_cpp_err=yes
12394fi
12395if test -z "$ac_cpp_err"; then
12396  eval "$as_ac_Header=yes"
12397else
12398  echo "$as_me: failed program was:" >&5
12399  cat "conftest.$ac_ext" >&5
12400  eval "$as_ac_Header=no"
12401fi
12402rm -f conftest.err "conftest.$ac_ext"
12403fi
12404echo "$as_me:12404: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
12405echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
12406if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
12407  cat >>confdefs.h <<EOF
12408#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12409EOF
12410
12411fi
12412done
12413
12414fi
12415
12416fi
12417
12418fi
12419
12420cf_x_athena=${cf_x_athena:-Xaw}
12421
12422echo "$as_me:12422: checking if you want to link with Xaw 3d library" >&5
12423echo $ECHO_N "checking if you want to link with Xaw 3d library... $ECHO_C" >&6
12424withval=
12425
12426# Check whether --with-Xaw3d or --without-Xaw3d was given.
12427if test "${with_Xaw3d+set}" = set; then
12428  withval="$with_Xaw3d"
12429
12430fi;
12431if test "$withval" = yes ; then
12432	cf_x_athena=Xaw3d
12433	echo "$as_me:12433: result: yes" >&5
12434echo "${ECHO_T}yes" >&6
12435else
12436	echo "$as_me:12436: result: no" >&5
12437echo "${ECHO_T}no" >&6
12438fi
12439
12440echo "$as_me:12440: checking if you want to link with Xaw 3d xft library" >&5
12441echo $ECHO_N "checking if you want to link with Xaw 3d xft library... $ECHO_C" >&6
12442withval=
12443
12444# Check whether --with-Xaw3dxft or --without-Xaw3dxft was given.
12445if test "${with_Xaw3dxft+set}" = set; then
12446  withval="$with_Xaw3dxft"
12447
12448fi;
12449if test "$withval" = yes ; then
12450	cf_x_athena=Xaw3dxft
12451	echo "$as_me:12451: result: yes" >&5
12452echo "${ECHO_T}yes" >&6
12453else
12454	echo "$as_me:12454: result: no" >&5
12455echo "${ECHO_T}no" >&6
12456fi
12457
12458echo "$as_me:12458: checking if you want to link with neXT Athena library" >&5
12459echo $ECHO_N "checking if you want to link with neXT Athena library... $ECHO_C" >&6
12460withval=
12461
12462# Check whether --with-neXtaw or --without-neXtaw was given.
12463if test "${with_neXtaw+set}" = set; then
12464  withval="$with_neXtaw"
12465
12466fi;
12467if test "$withval" = yes ; then
12468	cf_x_athena=neXtaw
12469	echo "$as_me:12469: result: yes" >&5
12470echo "${ECHO_T}yes" >&6
12471else
12472	echo "$as_me:12472: result: no" >&5
12473echo "${ECHO_T}no" >&6
12474fi
12475
12476echo "$as_me:12476: checking if you want to link with Athena-Plus library" >&5
12477echo $ECHO_N "checking if you want to link with Athena-Plus library... $ECHO_C" >&6
12478withval=
12479
12480# Check whether --with-XawPlus or --without-XawPlus was given.
12481if test "${with_XawPlus+set}" = set; then
12482  withval="$with_XawPlus"
12483
12484fi;
12485if test "$withval" = yes ; then
12486	cf_x_athena=XawPlus
12487	echo "$as_me:12487: result: yes" >&5
12488echo "${ECHO_T}yes" >&6
12489else
12490	echo "$as_me:12490: result: no" >&5
12491echo "${ECHO_T}no" >&6
12492fi
12493
12494cf_x_athena_lib=""
12495
12496if test "$PKG_CONFIG" != none ; then
12497	cf_athena_list=
12498	test "$cf_x_athena" = Xaw && cf_athena_list="xaw8 xaw7 xaw6"
12499	for cf_athena_pkg in \
12500		$cf_athena_list \
12501		${cf_x_athena} \
12502		${cf_x_athena}-devel \
12503		lib${cf_x_athena} \
12504		lib${cf_x_athena}-devel
12505	do
12506
12507if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "$cf_athena_pkg"; then
12508	test -n "$verbose" && echo "	found package $cf_athena_pkg" 1>&6
12509
12510echo "${as_me:-configure}:12510: testing found package $cf_athena_pkg ..." 1>&5
12511
12512	cf_pkgconfig_incs="`$PKG_CONFIG --cflags "$cf_athena_pkg" 2>/dev/null`"
12513	cf_pkgconfig_libs="`$PKG_CONFIG --libs   "$cf_athena_pkg" 2>/dev/null`"
12514	test -n "$verbose" && echo "	package $cf_athena_pkg CFLAGS: $cf_pkgconfig_incs" 1>&6
12515
12516echo "${as_me:-configure}:12516: testing package $cf_athena_pkg CFLAGS: $cf_pkgconfig_incs ..." 1>&5
12517
12518	test -n "$verbose" && echo "	package $cf_athena_pkg LIBS: $cf_pkgconfig_libs" 1>&6
12519
12520echo "${as_me:-configure}:12520: testing package $cf_athena_pkg LIBS: $cf_pkgconfig_libs ..." 1>&5
12521
12522cf_fix_cppflags=no
12523cf_new_cflags=
12524cf_new_cppflags=
12525cf_new_extra_cppflags=
12526
12527for cf_add_cflags in $cf_pkgconfig_incs
12528do
12529case "$cf_fix_cppflags" in
12530(no)
12531	case "$cf_add_cflags" in
12532	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12533		case "$cf_add_cflags" in
12534		(-D*)
12535			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12536
12537			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12538				&& test -z "${cf_tst_cflags}" \
12539				&& cf_fix_cppflags=yes
12540
12541			if test "$cf_fix_cppflags" = yes ; then
12542
12543	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12544	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12545
12546				continue
12547			elif test "${cf_tst_cflags}" = "\"'" ; then
12548
12549	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12550	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12551
12552				continue
12553			fi
12554			;;
12555		esac
12556		case "$CPPFLAGS" in
12557		(*$cf_add_cflags)
12558			;;
12559		(*)
12560			case "$cf_add_cflags" in
12561			(-D*)
12562				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12563
12564CPPFLAGS=`echo "$CPPFLAGS" | \
12565	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
12566		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
12567
12568				;;
12569			esac
12570
12571	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12572	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12573
12574			;;
12575		esac
12576		;;
12577	(*)
12578
12579	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12580	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12581
12582		;;
12583	esac
12584	;;
12585(yes)
12586
12587	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12588	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12589
12590	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
12591
12592	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12593		&& test -z "${cf_tst_cflags}" \
12594		&& cf_fix_cppflags=no
12595	;;
12596esac
12597done
12598
12599if test -n "$cf_new_cflags" ; then
12600
12601	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12602	CFLAGS="${CFLAGS}$cf_new_cflags"
12603
12604fi
12605
12606if test -n "$cf_new_cppflags" ; then
12607
12608	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12609	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12610
12611fi
12612
12613if test -n "$cf_new_extra_cppflags" ; then
12614
12615	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12616	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12617
12618fi
12619
12620cf_add_libs="$LIBS"
12621# reverse order
12622cf_add_0lib=
12623for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
12624# filter duplicates
12625for cf_add_1lib in $cf_add_0lib; do
12626	for cf_add_2lib in $cf_add_libs; do
12627		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
12628			cf_add_1lib=
12629			break
12630		fi
12631	done
12632	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
12633done
12634LIBS="$cf_add_libs"
12635
12636			cf_x_athena_lib="$cf_pkgconfig_libs"
12637
12638cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
12639
12640			cat >>confdefs.h <<EOF
12641#define $cf_x_athena_LIBS 1
12642EOF
12643
12644	for cf_trim_lib in Xmu Xt X11
12645	do
12646		case "$LIBS" in
12647		(*-l$cf_trim_lib\ *-l$cf_trim_lib*)
12648			LIBS=`echo "$LIBS " | sed -e 's/  / /g' -e 's%-l'"$cf_trim_lib"' %%' -e 's/ $//'`
12649			test -n "$verbose" && echo "	..trimmed $LIBS" 1>&6
12650
12651echo "${as_me:-configure}:12651: testing ..trimmed $LIBS ..." 1>&5
12652
12653			;;
12654		esac
12655	done
12656
12657echo "$as_me:12657: checking for usable $cf_x_athena/Xmu package" >&5
12658echo $ECHO_N "checking for usable $cf_x_athena/Xmu package... $ECHO_C" >&6
12659if test "${cf_cv_xaw_compat+set}" = set; then
12660  echo $ECHO_N "(cached) $ECHO_C" >&6
12661else
12662
12663cat >"conftest.$ac_ext" <<_ACEOF
12664#line 12664 "configure"
12665#include "confdefs.h"
12666
12667#include <X11/Xmu/CharSet.h>
12668
12669int
12670main (void)
12671{
12672
12673int check = XmuCompareISOLatin1("big", "small");
12674(void)check;
12675
12676  ;
12677  return 0;
12678}
12679_ACEOF
12680rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12681if { (eval echo "$as_me:12681: \"$ac_link\"") >&5
12682  (eval $ac_link) 2>&5
12683  ac_status=$?
12684  echo "$as_me:12684: \$? = $ac_status" >&5
12685  (exit "$ac_status"); } &&
12686         { ac_try='test -s "conftest$ac_exeext"'
12687  { (eval echo "$as_me:12687: \"$ac_try\"") >&5
12688  (eval $ac_try) 2>&5
12689  ac_status=$?
12690  echo "$as_me:12690: \$? = $ac_status" >&5
12691  (exit "$ac_status"); }; }; then
12692  cf_cv_xaw_compat=yes
12693else
12694  echo "$as_me: failed program was:" >&5
12695cat "conftest.$ac_ext" >&5
12696cf_cv_xaw_compat=no
12697fi
12698rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12699fi
12700echo "$as_me:12700: result: $cf_cv_xaw_compat" >&5
12701echo "${ECHO_T}$cf_cv_xaw_compat" >&6
12702
12703			if test "$cf_cv_xaw_compat" = no
12704			then
12705				# workaround for broken ".pc" files...
12706				case "$cf_x_athena_lib" in
12707				(*-lXmu*)
12708					;;
12709				(*)
12710					test -n "$verbose" && echo "	work around broken package" 1>&6
12711
12712echo "${as_me:-configure}:12712: testing work around broken package ..." 1>&5
12713
12714					cf_save_xmu="$LIBS"
12715					cf_first_lib=`echo "$cf_save_xmu" | sed -e 's/^  *//' -e 's/ .*//'`
12716
12717if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "xmu"; then
12718	test -n "$verbose" && echo "	found package xmu" 1>&6
12719
12720echo "${as_me:-configure}:12720: testing found package xmu ..." 1>&5
12721
12722	cf_pkgconfig_incs="`$PKG_CONFIG --cflags "xmu" 2>/dev/null`"
12723	cf_pkgconfig_libs="`$PKG_CONFIG --libs   "xmu" 2>/dev/null`"
12724	test -n "$verbose" && echo "	package xmu CFLAGS: $cf_pkgconfig_incs" 1>&6
12725
12726echo "${as_me:-configure}:12726: testing package xmu CFLAGS: $cf_pkgconfig_incs ..." 1>&5
12727
12728	test -n "$verbose" && echo "	package xmu LIBS: $cf_pkgconfig_libs" 1>&6
12729
12730echo "${as_me:-configure}:12730: testing package xmu LIBS: $cf_pkgconfig_libs ..." 1>&5
12731
12732cf_fix_cppflags=no
12733cf_new_cflags=
12734cf_new_cppflags=
12735cf_new_extra_cppflags=
12736
12737for cf_add_cflags in $cf_pkgconfig_incs
12738do
12739case "$cf_fix_cppflags" in
12740(no)
12741	case "$cf_add_cflags" in
12742	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12743		case "$cf_add_cflags" in
12744		(-D*)
12745			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12746
12747			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12748				&& test -z "${cf_tst_cflags}" \
12749				&& cf_fix_cppflags=yes
12750
12751			if test "$cf_fix_cppflags" = yes ; then
12752
12753	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12754	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12755
12756				continue
12757			elif test "${cf_tst_cflags}" = "\"'" ; then
12758
12759	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12760	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12761
12762				continue
12763			fi
12764			;;
12765		esac
12766		case "$CPPFLAGS" in
12767		(*$cf_add_cflags)
12768			;;
12769		(*)
12770			case "$cf_add_cflags" in
12771			(-D*)
12772				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12773
12774CPPFLAGS=`echo "$CPPFLAGS" | \
12775	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
12776		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
12777
12778				;;
12779			esac
12780
12781	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12782	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12783
12784			;;
12785		esac
12786		;;
12787	(*)
12788
12789	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12790	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12791
12792		;;
12793	esac
12794	;;
12795(yes)
12796
12797	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12798	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12799
12800	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
12801
12802	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12803		&& test -z "${cf_tst_cflags}" \
12804		&& cf_fix_cppflags=no
12805	;;
12806esac
12807done
12808
12809if test -n "$cf_new_cflags" ; then
12810
12811	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12812	CFLAGS="${CFLAGS}$cf_new_cflags"
12813
12814fi
12815
12816if test -n "$cf_new_cppflags" ; then
12817
12818	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12819	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12820
12821fi
12822
12823if test -n "$cf_new_extra_cppflags" ; then
12824
12825	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12826	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12827
12828fi
12829
12830cf_add_libs="$LIBS"
12831# reverse order
12832cf_add_0lib=
12833for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
12834# filter duplicates
12835for cf_add_1lib in $cf_add_0lib; do
12836	for cf_add_2lib in $cf_add_libs; do
12837		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
12838			cf_add_1lib=
12839			break
12840		fi
12841	done
12842	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
12843done
12844LIBS="$cf_add_libs"
12845
12846							LIBS="$cf_save_xmu"
12847
12848test -n "$verbose" && echo "	...before $LIBS" 1>&6
12849
12850echo "${as_me:-configure}:12850: testing ...before $LIBS ..." 1>&5
12851
12852LIBS=`echo "$LIBS" | sed -e "s/[ 	][ 	]*/ /g" -e "s%$cf_first_lib %$cf_first_lib $cf_pkgconfig_libs %" -e 's%  % %g'`
12853test -n "$verbose" && echo "	...after  $LIBS" 1>&6
12854
12855echo "${as_me:-configure}:12855: testing ...after  $LIBS ..." 1>&5
12856
12857else
12858	cf_pkgconfig_incs=
12859	cf_pkgconfig_libs=
12860
12861test -n "$verbose" && echo "	...before $LIBS" 1>&6
12862
12863echo "${as_me:-configure}:12863: testing ...before $LIBS ..." 1>&5
12864
12865LIBS=`echo "$LIBS" | sed -e "s/[ 	][ 	]*/ /g" -e "s%$cf_first_lib %$cf_first_lib -lXmu %" -e 's%  % %g'`
12866test -n "$verbose" && echo "	...after  $LIBS" 1>&6
12867
12868echo "${as_me:-configure}:12868: testing ...after  $LIBS ..." 1>&5
12869
12870fi
12871
12872	for cf_trim_lib in Xmu Xt X11
12873	do
12874		case "$LIBS" in
12875		(*-l$cf_trim_lib\ *-l$cf_trim_lib*)
12876			LIBS=`echo "$LIBS " | sed -e 's/  / /g' -e 's%-l'"$cf_trim_lib"' %%' -e 's/ $//'`
12877			test -n "$verbose" && echo "	..trimmed $LIBS" 1>&6
12878
12879echo "${as_me:-configure}:12879: testing ..trimmed $LIBS ..." 1>&5
12880
12881			;;
12882		esac
12883	done
12884
12885					;;
12886				esac
12887			fi
12888
12889			break
12890else
12891	cf_pkgconfig_incs=
12892	cf_pkgconfig_libs=
12893	:
12894fi
12895
12896	done
12897fi
12898
12899if test -z "$cf_x_athena_lib" ; then
12900
12901if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "Xext"; then
12902	test -n "$verbose" && echo "	found package Xext" 1>&6
12903
12904echo "${as_me:-configure}:12904: testing found package Xext ..." 1>&5
12905
12906	cf_pkgconfig_incs="`$PKG_CONFIG --cflags "Xext" 2>/dev/null`"
12907	cf_pkgconfig_libs="`$PKG_CONFIG --libs   "Xext" 2>/dev/null`"
12908	test -n "$verbose" && echo "	package Xext CFLAGS: $cf_pkgconfig_incs" 1>&6
12909
12910echo "${as_me:-configure}:12910: testing package Xext CFLAGS: $cf_pkgconfig_incs ..." 1>&5
12911
12912	test -n "$verbose" && echo "	package Xext LIBS: $cf_pkgconfig_libs" 1>&6
12913
12914echo "${as_me:-configure}:12914: testing package Xext LIBS: $cf_pkgconfig_libs ..." 1>&5
12915
12916cf_fix_cppflags=no
12917cf_new_cflags=
12918cf_new_cppflags=
12919cf_new_extra_cppflags=
12920
12921for cf_add_cflags in $cf_pkgconfig_incs
12922do
12923case "$cf_fix_cppflags" in
12924(no)
12925	case "$cf_add_cflags" in
12926	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12927		case "$cf_add_cflags" in
12928		(-D*)
12929			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12930
12931			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12932				&& test -z "${cf_tst_cflags}" \
12933				&& cf_fix_cppflags=yes
12934
12935			if test "$cf_fix_cppflags" = yes ; then
12936
12937	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12938	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12939
12940				continue
12941			elif test "${cf_tst_cflags}" = "\"'" ; then
12942
12943	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12944	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12945
12946				continue
12947			fi
12948			;;
12949		esac
12950		case "$CPPFLAGS" in
12951		(*$cf_add_cflags)
12952			;;
12953		(*)
12954			case "$cf_add_cflags" in
12955			(-D*)
12956				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12957
12958CPPFLAGS=`echo "$CPPFLAGS" | \
12959	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
12960		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
12961
12962				;;
12963			esac
12964
12965	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12966	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12967
12968			;;
12969		esac
12970		;;
12971	(*)
12972
12973	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12974	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12975
12976		;;
12977	esac
12978	;;
12979(yes)
12980
12981	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12982	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12983
12984	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
12985
12986	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12987		&& test -z "${cf_tst_cflags}" \
12988		&& cf_fix_cppflags=no
12989	;;
12990esac
12991done
12992
12993if test -n "$cf_new_cflags" ; then
12994
12995	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12996	CFLAGS="${CFLAGS}$cf_new_cflags"
12997
12998fi
12999
13000if test -n "$cf_new_cppflags" ; then
13001
13002	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13003	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13004
13005fi
13006
13007if test -n "$cf_new_extra_cppflags" ; then
13008
13009	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13010	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13011
13012fi
13013
13014cf_add_libs="$LIBS"
13015# reverse order
13016cf_add_0lib=
13017for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
13018# filter duplicates
13019for cf_add_1lib in $cf_add_0lib; do
13020	for cf_add_2lib in $cf_add_libs; do
13021		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
13022			cf_add_1lib=
13023			break
13024		fi
13025	done
13026	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
13027done
13028LIBS="$cf_add_libs"
13029
13030	:
13031else
13032	cf_pkgconfig_incs=
13033	cf_pkgconfig_libs=
13034
13035	echo "$as_me:13035: checking for XextCreateExtension in -lXext" >&5
13036echo $ECHO_N "checking for XextCreateExtension in -lXext... $ECHO_C" >&6
13037if test "${ac_cv_lib_Xext_XextCreateExtension+set}" = set; then
13038  echo $ECHO_N "(cached) $ECHO_C" >&6
13039else
13040  ac_check_lib_save_LIBS=$LIBS
13041LIBS="-lXext  $LIBS"
13042cat >"conftest.$ac_ext" <<_ACEOF
13043#line 13043 "configure"
13044#include "confdefs.h"
13045
13046/* Override any gcc2 internal prototype to avoid an error.  */
13047#ifdef __cplusplus
13048extern "C"
13049#endif
13050/* We use char because int might match the return type of a gcc2
13051   builtin and then its argument prototype would still apply.  */
13052char XextCreateExtension ();
13053int
13054main (void)
13055{
13056XextCreateExtension ();
13057  ;
13058  return 0;
13059}
13060_ACEOF
13061rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13062if { (eval echo "$as_me:13062: \"$ac_link\"") >&5
13063  (eval $ac_link) 2>&5
13064  ac_status=$?
13065  echo "$as_me:13065: \$? = $ac_status" >&5
13066  (exit "$ac_status"); } &&
13067         { ac_try='test -s "conftest$ac_exeext"'
13068  { (eval echo "$as_me:13068: \"$ac_try\"") >&5
13069  (eval $ac_try) 2>&5
13070  ac_status=$?
13071  echo "$as_me:13071: \$? = $ac_status" >&5
13072  (exit "$ac_status"); }; }; then
13073  ac_cv_lib_Xext_XextCreateExtension=yes
13074else
13075  echo "$as_me: failed program was:" >&5
13076cat "conftest.$ac_ext" >&5
13077ac_cv_lib_Xext_XextCreateExtension=no
13078fi
13079rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13080LIBS=$ac_check_lib_save_LIBS
13081fi
13082echo "$as_me:13082: result: $ac_cv_lib_Xext_XextCreateExtension" >&5
13083echo "${ECHO_T}$ac_cv_lib_Xext_XextCreateExtension" >&6
13084if test "$ac_cv_lib_Xext_XextCreateExtension" = yes; then
13085
13086cf_add_libs="$LIBS"
13087# reverse order
13088cf_add_0lib=
13089for cf_add_1lib in -lXext; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
13090# filter duplicates
13091for cf_add_1lib in $cf_add_0lib; do
13092	for cf_add_2lib in $cf_add_libs; do
13093		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
13094			cf_add_1lib=
13095			break
13096		fi
13097	done
13098	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
13099done
13100LIBS="$cf_add_libs"
13101
13102fi
13103
13104fi
13105
13106# OSX is schizoid about who owns /usr/X11 (old) versus /opt/X11 (new) (and
13107# in some cases has installed dummy files in the former, other cases replaced
13108# it with a link to the new location).  This complicates the configure script.
13109# Check for that pitfall, and recover using pkg-config
13110#
13111# If none of these are set, the configuration is almost certainly broken.
13112if test -z "${X_CFLAGS}${X_PRE_LIBS}${X_LIBS}${X_EXTRA_LIBS}"
13113then
13114
13115if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "x11"; then
13116	test -n "$verbose" && echo "	found package x11" 1>&6
13117
13118echo "${as_me:-configure}:13118: testing found package x11 ..." 1>&5
13119
13120	cf_pkgconfig_incs="`$PKG_CONFIG --cflags "x11" 2>/dev/null`"
13121	cf_pkgconfig_libs="`$PKG_CONFIG --libs   "x11" 2>/dev/null`"
13122	test -n "$verbose" && echo "	package x11 CFLAGS: $cf_pkgconfig_incs" 1>&6
13123
13124echo "${as_me:-configure}:13124: testing package x11 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
13125
13126	test -n "$verbose" && echo "	package x11 LIBS: $cf_pkgconfig_libs" 1>&6
13127
13128echo "${as_me:-configure}:13128: testing package x11 LIBS: $cf_pkgconfig_libs ..." 1>&5
13129
13130cf_fix_cppflags=no
13131cf_new_cflags=
13132cf_new_cppflags=
13133cf_new_extra_cppflags=
13134
13135for cf_add_cflags in $cf_pkgconfig_incs
13136do
13137case "$cf_fix_cppflags" in
13138(no)
13139	case "$cf_add_cflags" in
13140	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13141		case "$cf_add_cflags" in
13142		(-D*)
13143			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13144
13145			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13146				&& test -z "${cf_tst_cflags}" \
13147				&& cf_fix_cppflags=yes
13148
13149			if test "$cf_fix_cppflags" = yes ; then
13150
13151	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13152	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13153
13154				continue
13155			elif test "${cf_tst_cflags}" = "\"'" ; then
13156
13157	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13158	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13159
13160				continue
13161			fi
13162			;;
13163		esac
13164		case "$CPPFLAGS" in
13165		(*$cf_add_cflags)
13166			;;
13167		(*)
13168			case "$cf_add_cflags" in
13169			(-D*)
13170				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13171
13172CPPFLAGS=`echo "$CPPFLAGS" | \
13173	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
13174		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
13175
13176				;;
13177			esac
13178
13179	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13180	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13181
13182			;;
13183		esac
13184		;;
13185	(*)
13186
13187	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13188	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13189
13190		;;
13191	esac
13192	;;
13193(yes)
13194
13195	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13196	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13197
13198	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13199
13200	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13201		&& test -z "${cf_tst_cflags}" \
13202		&& cf_fix_cppflags=no
13203	;;
13204esac
13205done
13206
13207if test -n "$cf_new_cflags" ; then
13208
13209	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13210	CFLAGS="${CFLAGS}$cf_new_cflags"
13211
13212fi
13213
13214if test -n "$cf_new_cppflags" ; then
13215
13216	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13217	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13218
13219fi
13220
13221if test -n "$cf_new_extra_cppflags" ; then
13222
13223	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13224	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13225
13226fi
13227
13228cf_add_libs="$LIBS"
13229# reverse order
13230cf_add_0lib=
13231for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
13232# filter duplicates
13233for cf_add_1lib in $cf_add_0lib; do
13234	for cf_add_2lib in $cf_add_libs; do
13235		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
13236			cf_add_1lib=
13237			break
13238		fi
13239	done
13240	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
13241done
13242LIBS="$cf_add_libs"
13243
13244	:
13245else
13246	cf_pkgconfig_incs=
13247	cf_pkgconfig_libs=
13248	{ echo "$as_me:13248: WARNING: unable to find X11 library" >&5
13249echo "$as_me: WARNING: unable to find X11 library" >&2;}
13250fi
13251
13252if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "ice"; then
13253	test -n "$verbose" && echo "	found package ice" 1>&6
13254
13255echo "${as_me:-configure}:13255: testing found package ice ..." 1>&5
13256
13257	cf_pkgconfig_incs="`$PKG_CONFIG --cflags "ice" 2>/dev/null`"
13258	cf_pkgconfig_libs="`$PKG_CONFIG --libs   "ice" 2>/dev/null`"
13259	test -n "$verbose" && echo "	package ice CFLAGS: $cf_pkgconfig_incs" 1>&6
13260
13261echo "${as_me:-configure}:13261: testing package ice CFLAGS: $cf_pkgconfig_incs ..." 1>&5
13262
13263	test -n "$verbose" && echo "	package ice LIBS: $cf_pkgconfig_libs" 1>&6
13264
13265echo "${as_me:-configure}:13265: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5
13266
13267cf_fix_cppflags=no
13268cf_new_cflags=
13269cf_new_cppflags=
13270cf_new_extra_cppflags=
13271
13272for cf_add_cflags in $cf_pkgconfig_incs
13273do
13274case "$cf_fix_cppflags" in
13275(no)
13276	case "$cf_add_cflags" in
13277	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13278		case "$cf_add_cflags" in
13279		(-D*)
13280			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13281
13282			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13283				&& test -z "${cf_tst_cflags}" \
13284				&& cf_fix_cppflags=yes
13285
13286			if test "$cf_fix_cppflags" = yes ; then
13287
13288	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13289	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13290
13291				continue
13292			elif test "${cf_tst_cflags}" = "\"'" ; then
13293
13294	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13295	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13296
13297				continue
13298			fi
13299			;;
13300		esac
13301		case "$CPPFLAGS" in
13302		(*$cf_add_cflags)
13303			;;
13304		(*)
13305			case "$cf_add_cflags" in
13306			(-D*)
13307				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13308
13309CPPFLAGS=`echo "$CPPFLAGS" | \
13310	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
13311		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
13312
13313				;;
13314			esac
13315
13316	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13317	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13318
13319			;;
13320		esac
13321		;;
13322	(*)
13323
13324	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13325	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13326
13327		;;
13328	esac
13329	;;
13330(yes)
13331
13332	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13333	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13334
13335	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13336
13337	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13338		&& test -z "${cf_tst_cflags}" \
13339		&& cf_fix_cppflags=no
13340	;;
13341esac
13342done
13343
13344if test -n "$cf_new_cflags" ; then
13345
13346	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13347	CFLAGS="${CFLAGS}$cf_new_cflags"
13348
13349fi
13350
13351if test -n "$cf_new_cppflags" ; then
13352
13353	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13354	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13355
13356fi
13357
13358if test -n "$cf_new_extra_cppflags" ; then
13359
13360	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13361	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13362
13363fi
13364
13365cf_add_libs="$LIBS"
13366# reverse order
13367cf_add_0lib=
13368for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
13369# filter duplicates
13370for cf_add_1lib in $cf_add_0lib; do
13371	for cf_add_2lib in $cf_add_libs; do
13372		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
13373			cf_add_1lib=
13374			break
13375		fi
13376	done
13377	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
13378done
13379LIBS="$cf_add_libs"
13380
13381	:
13382else
13383	cf_pkgconfig_incs=
13384	cf_pkgconfig_libs=
13385	{ echo "$as_me:13385: WARNING: unable to find ICE library" >&5
13386echo "$as_me: WARNING: unable to find ICE library" >&2;}
13387fi
13388
13389if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "sm"; then
13390	test -n "$verbose" && echo "	found package sm" 1>&6
13391
13392echo "${as_me:-configure}:13392: testing found package sm ..." 1>&5
13393
13394	cf_pkgconfig_incs="`$PKG_CONFIG --cflags "sm" 2>/dev/null`"
13395	cf_pkgconfig_libs="`$PKG_CONFIG --libs   "sm" 2>/dev/null`"
13396	test -n "$verbose" && echo "	package sm CFLAGS: $cf_pkgconfig_incs" 1>&6
13397
13398echo "${as_me:-configure}:13398: testing package sm CFLAGS: $cf_pkgconfig_incs ..." 1>&5
13399
13400	test -n "$verbose" && echo "	package sm LIBS: $cf_pkgconfig_libs" 1>&6
13401
13402echo "${as_me:-configure}:13402: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5
13403
13404cf_fix_cppflags=no
13405cf_new_cflags=
13406cf_new_cppflags=
13407cf_new_extra_cppflags=
13408
13409for cf_add_cflags in $cf_pkgconfig_incs
13410do
13411case "$cf_fix_cppflags" in
13412(no)
13413	case "$cf_add_cflags" in
13414	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13415		case "$cf_add_cflags" in
13416		(-D*)
13417			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13418
13419			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13420				&& test -z "${cf_tst_cflags}" \
13421				&& cf_fix_cppflags=yes
13422
13423			if test "$cf_fix_cppflags" = yes ; then
13424
13425	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13426	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13427
13428				continue
13429			elif test "${cf_tst_cflags}" = "\"'" ; then
13430
13431	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13432	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13433
13434				continue
13435			fi
13436			;;
13437		esac
13438		case "$CPPFLAGS" in
13439		(*$cf_add_cflags)
13440			;;
13441		(*)
13442			case "$cf_add_cflags" in
13443			(-D*)
13444				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13445
13446CPPFLAGS=`echo "$CPPFLAGS" | \
13447	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
13448		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
13449
13450				;;
13451			esac
13452
13453	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13454	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13455
13456			;;
13457		esac
13458		;;
13459	(*)
13460
13461	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13462	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13463
13464		;;
13465	esac
13466	;;
13467(yes)
13468
13469	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13470	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13471
13472	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13473
13474	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13475		&& test -z "${cf_tst_cflags}" \
13476		&& cf_fix_cppflags=no
13477	;;
13478esac
13479done
13480
13481if test -n "$cf_new_cflags" ; then
13482
13483	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13484	CFLAGS="${CFLAGS}$cf_new_cflags"
13485
13486fi
13487
13488if test -n "$cf_new_cppflags" ; then
13489
13490	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13491	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13492
13493fi
13494
13495if test -n "$cf_new_extra_cppflags" ; then
13496
13497	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13498	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13499
13500fi
13501
13502cf_add_libs="$LIBS"
13503# reverse order
13504cf_add_0lib=
13505for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
13506# filter duplicates
13507for cf_add_1lib in $cf_add_0lib; do
13508	for cf_add_2lib in $cf_add_libs; do
13509		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
13510			cf_add_1lib=
13511			break
13512		fi
13513	done
13514	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
13515done
13516LIBS="$cf_add_libs"
13517
13518	:
13519else
13520	cf_pkgconfig_incs=
13521	cf_pkgconfig_libs=
13522	{ echo "$as_me:13522: WARNING: unable to find SM library" >&5
13523echo "$as_me: WARNING: unable to find SM library" >&2;}
13524fi
13525
13526if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "xt"; then
13527	test -n "$verbose" && echo "	found package xt" 1>&6
13528
13529echo "${as_me:-configure}:13529: testing found package xt ..." 1>&5
13530
13531	cf_pkgconfig_incs="`$PKG_CONFIG --cflags "xt" 2>/dev/null`"
13532	cf_pkgconfig_libs="`$PKG_CONFIG --libs   "xt" 2>/dev/null`"
13533	test -n "$verbose" && echo "	package xt CFLAGS: $cf_pkgconfig_incs" 1>&6
13534
13535echo "${as_me:-configure}:13535: testing package xt CFLAGS: $cf_pkgconfig_incs ..." 1>&5
13536
13537	test -n "$verbose" && echo "	package xt LIBS: $cf_pkgconfig_libs" 1>&6
13538
13539echo "${as_me:-configure}:13539: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5
13540
13541cf_fix_cppflags=no
13542cf_new_cflags=
13543cf_new_cppflags=
13544cf_new_extra_cppflags=
13545
13546for cf_add_cflags in $cf_pkgconfig_incs
13547do
13548case "$cf_fix_cppflags" in
13549(no)
13550	case "$cf_add_cflags" in
13551	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13552		case "$cf_add_cflags" in
13553		(-D*)
13554			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13555
13556			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13557				&& test -z "${cf_tst_cflags}" \
13558				&& cf_fix_cppflags=yes
13559
13560			if test "$cf_fix_cppflags" = yes ; then
13561
13562	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13563	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13564
13565				continue
13566			elif test "${cf_tst_cflags}" = "\"'" ; then
13567
13568	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13569	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13570
13571				continue
13572			fi
13573			;;
13574		esac
13575		case "$CPPFLAGS" in
13576		(*$cf_add_cflags)
13577			;;
13578		(*)
13579			case "$cf_add_cflags" in
13580			(-D*)
13581				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13582
13583CPPFLAGS=`echo "$CPPFLAGS" | \
13584	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
13585		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
13586
13587				;;
13588			esac
13589
13590	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13591	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13592
13593			;;
13594		esac
13595		;;
13596	(*)
13597
13598	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13599	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13600
13601		;;
13602	esac
13603	;;
13604(yes)
13605
13606	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13607	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13608
13609	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13610
13611	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13612		&& test -z "${cf_tst_cflags}" \
13613		&& cf_fix_cppflags=no
13614	;;
13615esac
13616done
13617
13618if test -n "$cf_new_cflags" ; then
13619
13620	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13621	CFLAGS="${CFLAGS}$cf_new_cflags"
13622
13623fi
13624
13625if test -n "$cf_new_cppflags" ; then
13626
13627	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13628	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13629
13630fi
13631
13632if test -n "$cf_new_extra_cppflags" ; then
13633
13634	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13635	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13636
13637fi
13638
13639cf_add_libs="$LIBS"
13640# reverse order
13641cf_add_0lib=
13642for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
13643# filter duplicates
13644for cf_add_1lib in $cf_add_0lib; do
13645	for cf_add_2lib in $cf_add_libs; do
13646		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
13647			cf_add_1lib=
13648			break
13649		fi
13650	done
13651	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
13652done
13653LIBS="$cf_add_libs"
13654
13655	:
13656else
13657	cf_pkgconfig_incs=
13658	cf_pkgconfig_libs=
13659	{ echo "$as_me:13659: WARNING: unable to find Xt library" >&5
13660echo "$as_me: WARNING: unable to find Xt library" >&2;}
13661fi
13662
13663else
13664	LIBS="$X_PRE_LIBS $LIBS $X_EXTRA_LIBS"
13665fi
13666
13667cf_have_X_LIBS=no
13668
13669if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "xt"; then
13670	test -n "$verbose" && echo "	found package xt" 1>&6
13671
13672echo "${as_me:-configure}:13672: testing found package xt ..." 1>&5
13673
13674	cf_pkgconfig_incs="`$PKG_CONFIG --cflags "xt" 2>/dev/null`"
13675	cf_pkgconfig_libs="`$PKG_CONFIG --libs   "xt" 2>/dev/null`"
13676	test -n "$verbose" && echo "	package xt CFLAGS: $cf_pkgconfig_incs" 1>&6
13677
13678echo "${as_me:-configure}:13678: testing package xt CFLAGS: $cf_pkgconfig_incs ..." 1>&5
13679
13680	test -n "$verbose" && echo "	package xt LIBS: $cf_pkgconfig_libs" 1>&6
13681
13682echo "${as_me:-configure}:13682: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5
13683
13684cf_fix_cppflags=no
13685cf_new_cflags=
13686cf_new_cppflags=
13687cf_new_extra_cppflags=
13688
13689for cf_add_cflags in $cf_pkgconfig_incs
13690do
13691case "$cf_fix_cppflags" in
13692(no)
13693	case "$cf_add_cflags" in
13694	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13695		case "$cf_add_cflags" in
13696		(-D*)
13697			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13698
13699			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13700				&& test -z "${cf_tst_cflags}" \
13701				&& cf_fix_cppflags=yes
13702
13703			if test "$cf_fix_cppflags" = yes ; then
13704
13705	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13706	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13707
13708				continue
13709			elif test "${cf_tst_cflags}" = "\"'" ; then
13710
13711	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13712	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13713
13714				continue
13715			fi
13716			;;
13717		esac
13718		case "$CPPFLAGS" in
13719		(*$cf_add_cflags)
13720			;;
13721		(*)
13722			case "$cf_add_cflags" in
13723			(-D*)
13724				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13725
13726CPPFLAGS=`echo "$CPPFLAGS" | \
13727	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
13728		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
13729
13730				;;
13731			esac
13732
13733	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13734	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13735
13736			;;
13737		esac
13738		;;
13739	(*)
13740
13741	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13742	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13743
13744		;;
13745	esac
13746	;;
13747(yes)
13748
13749	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13750	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13751
13752	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13753
13754	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13755		&& test -z "${cf_tst_cflags}" \
13756		&& cf_fix_cppflags=no
13757	;;
13758esac
13759done
13760
13761if test -n "$cf_new_cflags" ; then
13762
13763	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13764	CFLAGS="${CFLAGS}$cf_new_cflags"
13765
13766fi
13767
13768if test -n "$cf_new_cppflags" ; then
13769
13770	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13771	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13772
13773fi
13774
13775if test -n "$cf_new_extra_cppflags" ; then
13776
13777	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13778	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13779
13780fi
13781
13782cf_add_libs="$LIBS"
13783# reverse order
13784cf_add_0lib=
13785for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
13786# filter duplicates
13787for cf_add_1lib in $cf_add_0lib; do
13788	for cf_add_2lib in $cf_add_libs; do
13789		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
13790			cf_add_1lib=
13791			break
13792		fi
13793	done
13794	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
13795done
13796LIBS="$cf_add_libs"
13797
13798	case "x$LIBS" in
13799	(*-lX11*)
13800		;;
13801	(*)
13802# we have an "xt" package, but it may omit Xt's dependency on X11
13803echo "$as_me:13803: checking for usable X dependency" >&5
13804echo $ECHO_N "checking for usable X dependency... $ECHO_C" >&6
13805if test "${cf_cv_xt_x11_compat+set}" = set; then
13806  echo $ECHO_N "(cached) $ECHO_C" >&6
13807else
13808
13809cat >"conftest.$ac_ext" <<_ACEOF
13810#line 13810 "configure"
13811#include "confdefs.h"
13812
13813#include <X11/Xlib.h>
13814
13815int
13816main (void)
13817{
13818
13819	int rc1 = XDrawLine((Display*) 0, (Drawable) 0, (GC) 0, 0, 0, 0, 0);
13820	int rc2 = XClearWindow((Display*) 0, (Window) 0);
13821	int rc3 = XMoveWindow((Display*) 0, (Window) 0, 0, 0);
13822	int rc4 = XMoveResizeWindow((Display*)0, (Window)0, 0, 0, 0, 0);
13823
13824  ;
13825  return 0;
13826}
13827_ACEOF
13828rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13829if { (eval echo "$as_me:13829: \"$ac_link\"") >&5
13830  (eval $ac_link) 2>&5
13831  ac_status=$?
13832  echo "$as_me:13832: \$? = $ac_status" >&5
13833  (exit "$ac_status"); } &&
13834         { ac_try='test -s "conftest$ac_exeext"'
13835  { (eval echo "$as_me:13835: \"$ac_try\"") >&5
13836  (eval $ac_try) 2>&5
13837  ac_status=$?
13838  echo "$as_me:13838: \$? = $ac_status" >&5
13839  (exit "$ac_status"); }; }; then
13840  cf_cv_xt_x11_compat=yes
13841else
13842  echo "$as_me: failed program was:" >&5
13843cat "conftest.$ac_ext" >&5
13844cf_cv_xt_x11_compat=no
13845fi
13846rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13847fi
13848echo "$as_me:13848: result: $cf_cv_xt_x11_compat" >&5
13849echo "${ECHO_T}$cf_cv_xt_x11_compat" >&6
13850		if test "$cf_cv_xt_x11_compat" = no
13851		then
13852			test -n "$verbose" && echo "	work around broken X11 dependency" 1>&6
13853
13854echo "${as_me:-configure}:13854: testing work around broken X11 dependency ..." 1>&5
13855
13856			# 2010/11/19 - good enough until a working Xt on Xcb is delivered.
13857
13858if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "x11"; then
13859	test -n "$verbose" && echo "	found package x11" 1>&6
13860
13861echo "${as_me:-configure}:13861: testing found package x11 ..." 1>&5
13862
13863	cf_pkgconfig_incs="`$PKG_CONFIG --cflags "x11" 2>/dev/null`"
13864	cf_pkgconfig_libs="`$PKG_CONFIG --libs   "x11" 2>/dev/null`"
13865	test -n "$verbose" && echo "	package x11 CFLAGS: $cf_pkgconfig_incs" 1>&6
13866
13867echo "${as_me:-configure}:13867: testing package x11 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
13868
13869	test -n "$verbose" && echo "	package x11 LIBS: $cf_pkgconfig_libs" 1>&6
13870
13871echo "${as_me:-configure}:13871: testing package x11 LIBS: $cf_pkgconfig_libs ..." 1>&5
13872
13873cf_fix_cppflags=no
13874cf_new_cflags=
13875cf_new_cppflags=
13876cf_new_extra_cppflags=
13877
13878for cf_add_cflags in $cf_pkgconfig_incs
13879do
13880case "$cf_fix_cppflags" in
13881(no)
13882	case "$cf_add_cflags" in
13883	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13884		case "$cf_add_cflags" in
13885		(-D*)
13886			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13887
13888			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13889				&& test -z "${cf_tst_cflags}" \
13890				&& cf_fix_cppflags=yes
13891
13892			if test "$cf_fix_cppflags" = yes ; then
13893
13894	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13895	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13896
13897				continue
13898			elif test "${cf_tst_cflags}" = "\"'" ; then
13899
13900	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13901	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13902
13903				continue
13904			fi
13905			;;
13906		esac
13907		case "$CPPFLAGS" in
13908		(*$cf_add_cflags)
13909			;;
13910		(*)
13911			case "$cf_add_cflags" in
13912			(-D*)
13913				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13914
13915CPPFLAGS=`echo "$CPPFLAGS" | \
13916	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
13917		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
13918
13919				;;
13920			esac
13921
13922	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13923	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13924
13925			;;
13926		esac
13927		;;
13928	(*)
13929
13930	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13931	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13932
13933		;;
13934	esac
13935	;;
13936(yes)
13937
13938	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13939	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13940
13941	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13942
13943	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13944		&& test -z "${cf_tst_cflags}" \
13945		&& cf_fix_cppflags=no
13946	;;
13947esac
13948done
13949
13950if test -n "$cf_new_cflags" ; then
13951
13952	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13953	CFLAGS="${CFLAGS}$cf_new_cflags"
13954
13955fi
13956
13957if test -n "$cf_new_cppflags" ; then
13958
13959	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13960	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13961
13962fi
13963
13964if test -n "$cf_new_extra_cppflags" ; then
13965
13966	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13967	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13968
13969fi
13970
13971cf_add_libs="$LIBS"
13972# reverse order
13973cf_add_0lib=
13974for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
13975# filter duplicates
13976for cf_add_1lib in $cf_add_0lib; do
13977	for cf_add_2lib in $cf_add_libs; do
13978		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
13979			cf_add_1lib=
13980			break
13981		fi
13982	done
13983	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
13984done
13985LIBS="$cf_add_libs"
13986
13987	:
13988else
13989	cf_pkgconfig_incs=
13990	cf_pkgconfig_libs=
13991
13992test -n "$verbose" && echo "	...before $LIBS" 1>&6
13993
13994echo "${as_me:-configure}:13994: testing ...before $LIBS ..." 1>&5
13995
13996LIBS=`echo "$LIBS" | sed -e "s/[ 	][ 	]*/ /g" -e "s%-lXt %-lXt -lX11 %" -e 's%  % %g'`
13997test -n "$verbose" && echo "	...after  $LIBS" 1>&6
13998
13999echo "${as_me:-configure}:13999: testing ...after  $LIBS ..." 1>&5
14000
14001fi
14002
14003		fi
14004		;;
14005	esac
14006
14007echo "$as_me:14007: checking for usable X Toolkit package" >&5
14008echo $ECHO_N "checking for usable X Toolkit package... $ECHO_C" >&6
14009if test "${cf_cv_xt_ice_compat+set}" = set; then
14010  echo $ECHO_N "(cached) $ECHO_C" >&6
14011else
14012
14013cat >"conftest.$ac_ext" <<_ACEOF
14014#line 14014 "configure"
14015#include "confdefs.h"
14016
14017#include <X11/Shell.h>
14018
14019int
14020main (void)
14021{
14022int num = IceConnectionNumber(0); (void) num
14023
14024  ;
14025  return 0;
14026}
14027_ACEOF
14028rm -f "conftest.$ac_objext" "conftest$ac_exeext"
14029if { (eval echo "$as_me:14029: \"$ac_link\"") >&5
14030  (eval $ac_link) 2>&5
14031  ac_status=$?
14032  echo "$as_me:14032: \$? = $ac_status" >&5
14033  (exit "$ac_status"); } &&
14034         { ac_try='test -s "conftest$ac_exeext"'
14035  { (eval echo "$as_me:14035: \"$ac_try\"") >&5
14036  (eval $ac_try) 2>&5
14037  ac_status=$?
14038  echo "$as_me:14038: \$? = $ac_status" >&5
14039  (exit "$ac_status"); }; }; then
14040  cf_cv_xt_ice_compat=yes
14041else
14042  echo "$as_me: failed program was:" >&5
14043cat "conftest.$ac_ext" >&5
14044cf_cv_xt_ice_compat=no
14045fi
14046rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
14047fi
14048echo "$as_me:14048: result: $cf_cv_xt_ice_compat" >&5
14049echo "${ECHO_T}$cf_cv_xt_ice_compat" >&6
14050
14051	if test "$cf_cv_xt_ice_compat" = no
14052	then
14053		# workaround for broken ".pc" files used for X Toolkit.
14054		case "x$X_PRE_LIBS" in
14055		(*-lICE*)
14056			case "x$LIBS" in
14057			(*-lICE*)
14058				;;
14059			(*)
14060				test -n "$verbose" && echo "	work around broken ICE dependency" 1>&6
14061
14062echo "${as_me:-configure}:14062: testing work around broken ICE dependency ..." 1>&5
14063
14064if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "ice"; then
14065	test -n "$verbose" && echo "	found package ice" 1>&6
14066
14067echo "${as_me:-configure}:14067: testing found package ice ..." 1>&5
14068
14069	cf_pkgconfig_incs="`$PKG_CONFIG --cflags "ice" 2>/dev/null`"
14070	cf_pkgconfig_libs="`$PKG_CONFIG --libs   "ice" 2>/dev/null`"
14071	test -n "$verbose" && echo "	package ice CFLAGS: $cf_pkgconfig_incs" 1>&6
14072
14073echo "${as_me:-configure}:14073: testing package ice CFLAGS: $cf_pkgconfig_incs ..." 1>&5
14074
14075	test -n "$verbose" && echo "	package ice LIBS: $cf_pkgconfig_libs" 1>&6
14076
14077echo "${as_me:-configure}:14077: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5
14078
14079cf_fix_cppflags=no
14080cf_new_cflags=
14081cf_new_cppflags=
14082cf_new_extra_cppflags=
14083
14084for cf_add_cflags in $cf_pkgconfig_incs
14085do
14086case "$cf_fix_cppflags" in
14087(no)
14088	case "$cf_add_cflags" in
14089	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14090		case "$cf_add_cflags" in
14091		(-D*)
14092			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14093
14094			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14095				&& test -z "${cf_tst_cflags}" \
14096				&& cf_fix_cppflags=yes
14097
14098			if test "$cf_fix_cppflags" = yes ; then
14099
14100	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14101	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14102
14103				continue
14104			elif test "${cf_tst_cflags}" = "\"'" ; then
14105
14106	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14107	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14108
14109				continue
14110			fi
14111			;;
14112		esac
14113		case "$CPPFLAGS" in
14114		(*$cf_add_cflags)
14115			;;
14116		(*)
14117			case "$cf_add_cflags" in
14118			(-D*)
14119				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14120
14121CPPFLAGS=`echo "$CPPFLAGS" | \
14122	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
14123		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
14124
14125				;;
14126			esac
14127
14128	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14129	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14130
14131			;;
14132		esac
14133		;;
14134	(*)
14135
14136	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14137	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14138
14139		;;
14140	esac
14141	;;
14142(yes)
14143
14144	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14145	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14146
14147	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
14148
14149	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14150		&& test -z "${cf_tst_cflags}" \
14151		&& cf_fix_cppflags=no
14152	;;
14153esac
14154done
14155
14156if test -n "$cf_new_cflags" ; then
14157
14158	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14159	CFLAGS="${CFLAGS}$cf_new_cflags"
14160
14161fi
14162
14163if test -n "$cf_new_cppflags" ; then
14164
14165	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14166	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14167
14168fi
14169
14170if test -n "$cf_new_extra_cppflags" ; then
14171
14172	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14173	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14174
14175fi
14176
14177cf_add_libs="$LIBS"
14178# reverse order
14179cf_add_0lib=
14180for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14181# filter duplicates
14182for cf_add_1lib in $cf_add_0lib; do
14183	for cf_add_2lib in $cf_add_libs; do
14184		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14185			cf_add_1lib=
14186			break
14187		fi
14188	done
14189	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14190done
14191LIBS="$cf_add_libs"
14192
14193if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "sm"; then
14194	test -n "$verbose" && echo "	found package sm" 1>&6
14195
14196echo "${as_me:-configure}:14196: testing found package sm ..." 1>&5
14197
14198	cf_pkgconfig_incs="`$PKG_CONFIG --cflags "sm" 2>/dev/null`"
14199	cf_pkgconfig_libs="`$PKG_CONFIG --libs   "sm" 2>/dev/null`"
14200	test -n "$verbose" && echo "	package sm CFLAGS: $cf_pkgconfig_incs" 1>&6
14201
14202echo "${as_me:-configure}:14202: testing package sm CFLAGS: $cf_pkgconfig_incs ..." 1>&5
14203
14204	test -n "$verbose" && echo "	package sm LIBS: $cf_pkgconfig_libs" 1>&6
14205
14206echo "${as_me:-configure}:14206: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5
14207
14208cf_fix_cppflags=no
14209cf_new_cflags=
14210cf_new_cppflags=
14211cf_new_extra_cppflags=
14212
14213for cf_add_cflags in $cf_pkgconfig_incs
14214do
14215case "$cf_fix_cppflags" in
14216(no)
14217	case "$cf_add_cflags" in
14218	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14219		case "$cf_add_cflags" in
14220		(-D*)
14221			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14222
14223			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14224				&& test -z "${cf_tst_cflags}" \
14225				&& cf_fix_cppflags=yes
14226
14227			if test "$cf_fix_cppflags" = yes ; then
14228
14229	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14230	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14231
14232				continue
14233			elif test "${cf_tst_cflags}" = "\"'" ; then
14234
14235	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14236	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14237
14238				continue
14239			fi
14240			;;
14241		esac
14242		case "$CPPFLAGS" in
14243		(*$cf_add_cflags)
14244			;;
14245		(*)
14246			case "$cf_add_cflags" in
14247			(-D*)
14248				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14249
14250CPPFLAGS=`echo "$CPPFLAGS" | \
14251	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
14252		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
14253
14254				;;
14255			esac
14256
14257	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14258	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14259
14260			;;
14261		esac
14262		;;
14263	(*)
14264
14265	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14266	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14267
14268		;;
14269	esac
14270	;;
14271(yes)
14272
14273	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14274	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14275
14276	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
14277
14278	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14279		&& test -z "${cf_tst_cflags}" \
14280		&& cf_fix_cppflags=no
14281	;;
14282esac
14283done
14284
14285if test -n "$cf_new_cflags" ; then
14286
14287	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14288	CFLAGS="${CFLAGS}$cf_new_cflags"
14289
14290fi
14291
14292if test -n "$cf_new_cppflags" ; then
14293
14294	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14295	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14296
14297fi
14298
14299if test -n "$cf_new_extra_cppflags" ; then
14300
14301	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14302	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14303
14304fi
14305
14306cf_add_libs="$LIBS"
14307# reverse order
14308cf_add_0lib=
14309for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14310# filter duplicates
14311for cf_add_1lib in $cf_add_0lib; do
14312	for cf_add_2lib in $cf_add_libs; do
14313		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14314			cf_add_1lib=
14315			break
14316		fi
14317	done
14318	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14319done
14320LIBS="$cf_add_libs"
14321
14322	:
14323else
14324	cf_pkgconfig_incs=
14325	cf_pkgconfig_libs=
14326	:
14327fi
14328
14329else
14330	cf_pkgconfig_incs=
14331	cf_pkgconfig_libs=
14332
14333test -n "$verbose" && echo "	...before $LIBS" 1>&6
14334
14335echo "${as_me:-configure}:14335: testing ...before $LIBS ..." 1>&5
14336
14337LIBS=`echo "$LIBS" | sed -e "s/[ 	][ 	]*/ /g" -e "s%-lXt %-lXt $X_PRE_LIBS %" -e 's%  % %g'`
14338test -n "$verbose" && echo "	...after  $LIBS" 1>&6
14339
14340echo "${as_me:-configure}:14340: testing ...after  $LIBS ..." 1>&5
14341
14342fi
14343
14344				;;
14345			esac
14346			;;
14347		esac
14348	fi
14349
14350	cf_have_X_LIBS=yes
14351
14352else
14353	cf_pkgconfig_incs=
14354	cf_pkgconfig_libs=
14355
14356	LDFLAGS="$X_LIBS $LDFLAGS"
14357
14358test -n "$verbose" && echo "	checking additions to CFLAGS" 1>&6
14359
14360echo "${as_me:-configure}:14360: testing checking additions to CFLAGS ..." 1>&5
14361
14362cf_check_cflags="$CFLAGS"
14363cf_check_cppflags="$CPPFLAGS"
14364
14365cf_fix_cppflags=no
14366cf_new_cflags=
14367cf_new_cppflags=
14368cf_new_extra_cppflags=
14369
14370for cf_add_cflags in $X_CFLAGS
14371do
14372case "$cf_fix_cppflags" in
14373(no)
14374	case "$cf_add_cflags" in
14375	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14376		case "$cf_add_cflags" in
14377		(-D*)
14378			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14379
14380			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14381				&& test -z "${cf_tst_cflags}" \
14382				&& cf_fix_cppflags=yes
14383
14384			if test "$cf_fix_cppflags" = yes ; then
14385
14386	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14387	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14388
14389				continue
14390			elif test "${cf_tst_cflags}" = "\"'" ; then
14391
14392	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14393	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14394
14395				continue
14396			fi
14397			;;
14398		esac
14399		case "$CPPFLAGS" in
14400		(*$cf_add_cflags)
14401			;;
14402		(*)
14403			case "$cf_add_cflags" in
14404			(-D*)
14405				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14406
14407CPPFLAGS=`echo "$CPPFLAGS" | \
14408	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
14409		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
14410
14411				;;
14412			esac
14413
14414	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14415	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14416
14417			;;
14418		esac
14419		;;
14420	(*)
14421
14422	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14423	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14424
14425		;;
14426	esac
14427	;;
14428(yes)
14429
14430	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14431	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14432
14433	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
14434
14435	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14436		&& test -z "${cf_tst_cflags}" \
14437		&& cf_fix_cppflags=no
14438	;;
14439esac
14440done
14441
14442if test -n "$cf_new_cflags" ; then
14443	test -n "$verbose" && echo "	add to \$CFLAGS $cf_new_cflags" 1>&6
14444
14445echo "${as_me:-configure}:14445: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
14446
14447	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14448	CFLAGS="${CFLAGS}$cf_new_cflags"
14449
14450fi
14451
14452if test -n "$cf_new_cppflags" ; then
14453	test -n "$verbose" && echo "	add to \$CPPFLAGS $cf_new_cppflags" 1>&6
14454
14455echo "${as_me:-configure}:14455: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
14456
14457	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14458	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14459
14460fi
14461
14462if test -n "$cf_new_extra_cppflags" ; then
14463	test -n "$verbose" && echo "	add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
14464
14465echo "${as_me:-configure}:14465: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
14466
14467	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14468	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14469
14470fi
14471
14472if test "x$cf_check_cflags" != "x$CFLAGS" ; then
14473cat >"conftest.$ac_ext" <<_ACEOF
14474#line 14474 "configure"
14475#include "confdefs.h"
14476#include <stdio.h>
14477int
14478main (void)
14479{
14480printf("Hello world");
14481  ;
14482  return 0;
14483}
14484_ACEOF
14485rm -f "conftest.$ac_objext" "conftest$ac_exeext"
14486if { (eval echo "$as_me:14486: \"$ac_link\"") >&5
14487  (eval $ac_link) 2>&5
14488  ac_status=$?
14489  echo "$as_me:14489: \$? = $ac_status" >&5
14490  (exit "$ac_status"); } &&
14491         { ac_try='test -s "conftest$ac_exeext"'
14492  { (eval echo "$as_me:14492: \"$ac_try\"") >&5
14493  (eval $ac_try) 2>&5
14494  ac_status=$?
14495  echo "$as_me:14495: \$? = $ac_status" >&5
14496  (exit "$ac_status"); }; }; then
14497  :
14498else
14499  echo "$as_me: failed program was:" >&5
14500cat "conftest.$ac_ext" >&5
14501test -n "$verbose" && echo "	test-compile failed.  Undoing change to \$CFLAGS" 1>&6
14502
14503echo "${as_me:-configure}:14503: testing test-compile failed.  Undoing change to \$CFLAGS ..." 1>&5
14504
14505	 if test "x$cf_check_cppflags" != "x$CPPFLAGS" ; then
14506		 test -n "$verbose" && echo "	but keeping change to \$CPPFLAGS" 1>&6
14507
14508echo "${as_me:-configure}:14508: testing but keeping change to \$CPPFLAGS ..." 1>&5
14509
14510	 fi
14511	 CFLAGS="$cf_check_cflags"
14512fi
14513rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
14514fi
14515
14516	echo "$as_me:14516: checking for XOpenDisplay" >&5
14517echo $ECHO_N "checking for XOpenDisplay... $ECHO_C" >&6
14518if test "${ac_cv_func_XOpenDisplay+set}" = set; then
14519  echo $ECHO_N "(cached) $ECHO_C" >&6
14520else
14521  cat >"conftest.$ac_ext" <<_ACEOF
14522#line 14522 "configure"
14523#include "confdefs.h"
14524#define XOpenDisplay autoconf_temporary
14525#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
14526#undef XOpenDisplay
14527
14528#ifdef __cplusplus
14529extern "C"
14530#endif
14531
14532/* We use char because int might match the return type of a gcc2
14533   builtin and then its argument prototype would still apply.  */
14534char XOpenDisplay (void);
14535
14536int
14537main (void)
14538{
14539
14540/* The GNU C library defines stubs for functions which it implements
14541    to always fail with ENOSYS.  Some functions are actually named
14542    something starting with __ and the normal name is an alias.  */
14543#if defined (__stub_XOpenDisplay) || defined (__stub___XOpenDisplay)
14544#error found stub for XOpenDisplay
14545#endif
14546
14547	return XOpenDisplay ();
14548  ;
14549  return 0;
14550}
14551_ACEOF
14552rm -f "conftest.$ac_objext" "conftest$ac_exeext"
14553if { (eval echo "$as_me:14553: \"$ac_link\"") >&5
14554  (eval $ac_link) 2>&5
14555  ac_status=$?
14556  echo "$as_me:14556: \$? = $ac_status" >&5
14557  (exit "$ac_status"); } &&
14558         { ac_try='test -s "conftest$ac_exeext"'
14559  { (eval echo "$as_me:14559: \"$ac_try\"") >&5
14560  (eval $ac_try) 2>&5
14561  ac_status=$?
14562  echo "$as_me:14562: \$? = $ac_status" >&5
14563  (exit "$ac_status"); }; }; then
14564  ac_cv_func_XOpenDisplay=yes
14565else
14566  echo "$as_me: failed program was:" >&5
14567cat "conftest.$ac_ext" >&5
14568ac_cv_func_XOpenDisplay=no
14569fi
14570rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
14571fi
14572echo "$as_me:14572: result: $ac_cv_func_XOpenDisplay" >&5
14573echo "${ECHO_T}$ac_cv_func_XOpenDisplay" >&6
14574if test "$ac_cv_func_XOpenDisplay" = yes; then
14575  :
14576else
14577
14578	echo "$as_me:14578: checking for XOpenDisplay in -lX11" >&5
14579echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6
14580if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then
14581  echo $ECHO_N "(cached) $ECHO_C" >&6
14582else
14583  ac_check_lib_save_LIBS=$LIBS
14584LIBS="-lX11  $LIBS"
14585cat >"conftest.$ac_ext" <<_ACEOF
14586#line 14586 "configure"
14587#include "confdefs.h"
14588
14589/* Override any gcc2 internal prototype to avoid an error.  */
14590#ifdef __cplusplus
14591extern "C"
14592#endif
14593/* We use char because int might match the return type of a gcc2
14594   builtin and then its argument prototype would still apply.  */
14595char XOpenDisplay ();
14596int
14597main (void)
14598{
14599XOpenDisplay ();
14600  ;
14601  return 0;
14602}
14603_ACEOF
14604rm -f "conftest.$ac_objext" "conftest$ac_exeext"
14605if { (eval echo "$as_me:14605: \"$ac_link\"") >&5
14606  (eval $ac_link) 2>&5
14607  ac_status=$?
14608  echo "$as_me:14608: \$? = $ac_status" >&5
14609  (exit "$ac_status"); } &&
14610         { ac_try='test -s "conftest$ac_exeext"'
14611  { (eval echo "$as_me:14611: \"$ac_try\"") >&5
14612  (eval $ac_try) 2>&5
14613  ac_status=$?
14614  echo "$as_me:14614: \$? = $ac_status" >&5
14615  (exit "$ac_status"); }; }; then
14616  ac_cv_lib_X11_XOpenDisplay=yes
14617else
14618  echo "$as_me: failed program was:" >&5
14619cat "conftest.$ac_ext" >&5
14620ac_cv_lib_X11_XOpenDisplay=no
14621fi
14622rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
14623LIBS=$ac_check_lib_save_LIBS
14624fi
14625echo "$as_me:14625: result: $ac_cv_lib_X11_XOpenDisplay" >&5
14626echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6
14627if test "$ac_cv_lib_X11_XOpenDisplay" = yes; then
14628
14629cf_add_libs="$LIBS"
14630# reverse order
14631cf_add_0lib=
14632for cf_add_1lib in -lX11; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14633# filter duplicates
14634for cf_add_1lib in $cf_add_0lib; do
14635	for cf_add_2lib in $cf_add_libs; do
14636		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14637			cf_add_1lib=
14638			break
14639		fi
14640	done
14641	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14642done
14643LIBS="$cf_add_libs"
14644
14645fi
14646
14647fi
14648
14649	echo "$as_me:14649: checking for XtAppInitialize" >&5
14650echo $ECHO_N "checking for XtAppInitialize... $ECHO_C" >&6
14651if test "${ac_cv_func_XtAppInitialize+set}" = set; then
14652  echo $ECHO_N "(cached) $ECHO_C" >&6
14653else
14654  cat >"conftest.$ac_ext" <<_ACEOF
14655#line 14655 "configure"
14656#include "confdefs.h"
14657#define XtAppInitialize autoconf_temporary
14658#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
14659#undef XtAppInitialize
14660
14661#ifdef __cplusplus
14662extern "C"
14663#endif
14664
14665/* We use char because int might match the return type of a gcc2
14666   builtin and then its argument prototype would still apply.  */
14667char XtAppInitialize (void);
14668
14669int
14670main (void)
14671{
14672
14673/* The GNU C library defines stubs for functions which it implements
14674    to always fail with ENOSYS.  Some functions are actually named
14675    something starting with __ and the normal name is an alias.  */
14676#if defined (__stub_XtAppInitialize) || defined (__stub___XtAppInitialize)
14677#error found stub for XtAppInitialize
14678#endif
14679
14680	return XtAppInitialize ();
14681  ;
14682  return 0;
14683}
14684_ACEOF
14685rm -f "conftest.$ac_objext" "conftest$ac_exeext"
14686if { (eval echo "$as_me:14686: \"$ac_link\"") >&5
14687  (eval $ac_link) 2>&5
14688  ac_status=$?
14689  echo "$as_me:14689: \$? = $ac_status" >&5
14690  (exit "$ac_status"); } &&
14691         { ac_try='test -s "conftest$ac_exeext"'
14692  { (eval echo "$as_me:14692: \"$ac_try\"") >&5
14693  (eval $ac_try) 2>&5
14694  ac_status=$?
14695  echo "$as_me:14695: \$? = $ac_status" >&5
14696  (exit "$ac_status"); }; }; then
14697  ac_cv_func_XtAppInitialize=yes
14698else
14699  echo "$as_me: failed program was:" >&5
14700cat "conftest.$ac_ext" >&5
14701ac_cv_func_XtAppInitialize=no
14702fi
14703rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
14704fi
14705echo "$as_me:14705: result: $ac_cv_func_XtAppInitialize" >&5
14706echo "${ECHO_T}$ac_cv_func_XtAppInitialize" >&6
14707if test "$ac_cv_func_XtAppInitialize" = yes; then
14708  :
14709else
14710
14711	echo "$as_me:14711: checking for XtAppInitialize in -lXt" >&5
14712echo $ECHO_N "checking for XtAppInitialize in -lXt... $ECHO_C" >&6
14713if test "${ac_cv_lib_Xt_XtAppInitialize+set}" = set; then
14714  echo $ECHO_N "(cached) $ECHO_C" >&6
14715else
14716  ac_check_lib_save_LIBS=$LIBS
14717LIBS="-lXt  $LIBS"
14718cat >"conftest.$ac_ext" <<_ACEOF
14719#line 14719 "configure"
14720#include "confdefs.h"
14721
14722/* Override any gcc2 internal prototype to avoid an error.  */
14723#ifdef __cplusplus
14724extern "C"
14725#endif
14726/* We use char because int might match the return type of a gcc2
14727   builtin and then its argument prototype would still apply.  */
14728char XtAppInitialize ();
14729int
14730main (void)
14731{
14732XtAppInitialize ();
14733  ;
14734  return 0;
14735}
14736_ACEOF
14737rm -f "conftest.$ac_objext" "conftest$ac_exeext"
14738if { (eval echo "$as_me:14738: \"$ac_link\"") >&5
14739  (eval $ac_link) 2>&5
14740  ac_status=$?
14741  echo "$as_me:14741: \$? = $ac_status" >&5
14742  (exit "$ac_status"); } &&
14743         { ac_try='test -s "conftest$ac_exeext"'
14744  { (eval echo "$as_me:14744: \"$ac_try\"") >&5
14745  (eval $ac_try) 2>&5
14746  ac_status=$?
14747  echo "$as_me:14747: \$? = $ac_status" >&5
14748  (exit "$ac_status"); }; }; then
14749  ac_cv_lib_Xt_XtAppInitialize=yes
14750else
14751  echo "$as_me: failed program was:" >&5
14752cat "conftest.$ac_ext" >&5
14753ac_cv_lib_Xt_XtAppInitialize=no
14754fi
14755rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
14756LIBS=$ac_check_lib_save_LIBS
14757fi
14758echo "$as_me:14758: result: $ac_cv_lib_Xt_XtAppInitialize" >&5
14759echo "${ECHO_T}$ac_cv_lib_Xt_XtAppInitialize" >&6
14760if test "$ac_cv_lib_Xt_XtAppInitialize" = yes; then
14761
14762cat >>confdefs.h <<\EOF
14763#define HAVE_LIBXT 1
14764EOF
14765
14766		 cf_have_X_LIBS=Xt
14767		 LIBS="-lXt $LIBS"
14768fi
14769
14770fi
14771
14772fi
14773
14774if test "$cf_have_X_LIBS" = no ; then
14775	{ echo "$as_me:14775: WARNING: Unable to successfully link X Toolkit library (-lXt) with
14776test program.  You will have to check and add the proper libraries by hand
14777to makefile." >&5
14778echo "$as_me: WARNING: Unable to successfully link X Toolkit library (-lXt) with
14779test program.  You will have to check and add the proper libraries by hand
14780to makefile." >&2;}
14781fi
14782
14783cf_x_athena_root=$cf_x_athena
14784cf_x_athena_inc=""
14785
14786for cf_path in default \
14787	/usr/contrib/X11R6 \
14788	/usr/contrib/X11R5 \
14789	/usr/lib/X11R5 \
14790	/usr/local
14791do
14792	if test -z "$cf_x_athena_inc" ; then
14793
14794cf_save_LIBS_CF_X_ATHENA_CPPFLAGS="$LIBS"
14795cf_save_CFLAGS_CF_X_ATHENA_CPPFLAGS="$CFLAGS"
14796cf_save_CPPFLAGS_CF_X_ATHENA_CPPFLAGS="$CPPFLAGS"
14797LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
14798for cf_X_CFLAGS in $X_CFLAGS
14799do
14800	case "x$cf_X_CFLAGS" in
14801	x-[IUD]*)
14802		CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
14803		;;
14804	*)
14805		CFLAGS="$CFLAGS $cf_X_CFLAGS"
14806		;;
14807	esac
14808done
14809
14810		cf_test=X11/$cf_x_athena_root/SimpleMenu.h
14811		if test "$cf_path" != default ; then
14812
14813	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14814	CPPFLAGS="${CPPFLAGS}-I$cf_path/include"
14815
14816			echo "$as_me:14816: checking for $cf_test in $cf_path" >&5
14817echo $ECHO_N "checking for $cf_test in $cf_path... $ECHO_C" >&6
14818		else
14819			echo "$as_me:14819: checking for $cf_test" >&5
14820echo $ECHO_N "checking for $cf_test... $ECHO_C" >&6
14821		fi
14822		cat >"conftest.$ac_ext" <<_ACEOF
14823#line 14823 "configure"
14824#include "confdefs.h"
14825
14826#include <X11/Intrinsic.h>
14827#include <$cf_test>
14828int
14829main (void)
14830{
14831
14832  ;
14833  return 0;
14834}
14835_ACEOF
14836rm -f "conftest.$ac_objext"
14837if { (eval echo "$as_me:14837: \"$ac_compile\"") >&5
14838  (eval $ac_compile) 2>&5
14839  ac_status=$?
14840  echo "$as_me:14840: \$? = $ac_status" >&5
14841  (exit "$ac_status"); } &&
14842         { ac_try='test -s "conftest.$ac_objext"'
14843  { (eval echo "$as_me:14843: \"$ac_try\"") >&5
14844  (eval $ac_try) 2>&5
14845  ac_status=$?
14846  echo "$as_me:14846: \$? = $ac_status" >&5
14847  (exit "$ac_status"); }; }; then
14848  cf_result=yes
14849else
14850  echo "$as_me: failed program was:" >&5
14851cat "conftest.$ac_ext" >&5
14852cf_result=no
14853fi
14854rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14855		echo "$as_me:14855: result: $cf_result" >&5
14856echo "${ECHO_T}$cf_result" >&6
14857
14858LIBS="$cf_save_LIBS_CF_X_ATHENA_CPPFLAGS"
14859CFLAGS="$cf_save_CFLAGS_CF_X_ATHENA_CPPFLAGS"
14860CPPFLAGS="$cf_save_CPPFLAGS_CF_X_ATHENA_CPPFLAGS"
14861
14862		if test "$cf_result" = yes ; then
14863			test "$cf_path"  = default && cf_x_athena_inc=default
14864			test "$cf_path" != default && cf_x_athena_inc="$cf_path/include"
14865			break
14866		fi
14867	fi
14868done
14869
14870if test -z "$cf_x_athena_inc" ; then
14871	{ echo "$as_me:14871: WARNING: Unable to find Athena header files" >&5
14872echo "$as_me: WARNING: Unable to find Athena header files" >&2;}
14873elif test "$cf_x_athena_inc" != default ; then
14874
14875	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14876	CPPFLAGS="${CPPFLAGS}-I$cf_x_athena_inc"
14877
14878fi
14879
14880cf_x_athena_root=$cf_x_athena
14881cf_x_athena_lib=""
14882
14883for cf_path in default \
14884	/usr/contrib/X11R6 \
14885	/usr/contrib/X11R5 \
14886	/usr/lib/X11R5 \
14887	/usr/local
14888do
14889	for cf_lib in \
14890		${cf_x_athena_root} \
14891		${cf_x_athena_root}7 \
14892		${cf_x_athena_root}6
14893	do
14894	for cf_libs in \
14895		"-l$cf_lib -lXmu" \
14896		"-l$cf_lib -lXpm -lXmu" \
14897		"-l${cf_lib}_s -lXmu_s"
14898	do
14899		test -n "$cf_x_athena_lib" && break
14900
14901cf_save_LIBS_CF_X_ATHENA_LIBS="$LIBS"
14902cf_save_CFLAGS_CF_X_ATHENA_LIBS="$CFLAGS"
14903cf_save_CPPFLAGS_CF_X_ATHENA_LIBS="$CPPFLAGS"
14904LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
14905for cf_X_CFLAGS in $X_CFLAGS
14906do
14907	case "x$cf_X_CFLAGS" in
14908	x-[IUD]*)
14909		CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
14910		;;
14911	*)
14912		CFLAGS="$CFLAGS $cf_X_CFLAGS"
14913		;;
14914	esac
14915done
14916
14917		cf_test=XawSimpleMenuAddGlobalActions
14918		test "$cf_path" != default && cf_libs="-L$cf_path/lib $cf_libs"
14919
14920cf_add_libs="$LIBS"
14921# reverse order
14922cf_add_0lib=
14923for cf_add_1lib in $cf_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14924# filter duplicates
14925for cf_add_1lib in $cf_add_0lib; do
14926	for cf_add_2lib in $cf_add_libs; do
14927		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14928			cf_add_1lib=
14929			break
14930		fi
14931	done
14932	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14933done
14934LIBS="$cf_add_libs"
14935
14936		echo "$as_me:14936: checking for $cf_test in $cf_libs" >&5
14937echo $ECHO_N "checking for $cf_test in $cf_libs... $ECHO_C" >&6
14938		cat >"conftest.$ac_ext" <<_ACEOF
14939#line 14939 "configure"
14940#include "confdefs.h"
14941
14942#include <X11/Intrinsic.h>
14943#include <X11/$cf_x_athena_root/SimpleMenu.h>
14944
14945int
14946main (void)
14947{
14948
14949$cf_test((XtAppContext) 0)
14950  ;
14951  return 0;
14952}
14953_ACEOF
14954rm -f "conftest.$ac_objext" "conftest$ac_exeext"
14955if { (eval echo "$as_me:14955: \"$ac_link\"") >&5
14956  (eval $ac_link) 2>&5
14957  ac_status=$?
14958  echo "$as_me:14958: \$? = $ac_status" >&5
14959  (exit "$ac_status"); } &&
14960         { ac_try='test -s "conftest$ac_exeext"'
14961  { (eval echo "$as_me:14961: \"$ac_try\"") >&5
14962  (eval $ac_try) 2>&5
14963  ac_status=$?
14964  echo "$as_me:14964: \$? = $ac_status" >&5
14965  (exit "$ac_status"); }; }; then
14966  cf_result=yes
14967else
14968  echo "$as_me: failed program was:" >&5
14969cat "conftest.$ac_ext" >&5
14970cf_result=no
14971fi
14972rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
14973		echo "$as_me:14973: result: $cf_result" >&5
14974echo "${ECHO_T}$cf_result" >&6
14975
14976LIBS="$cf_save_LIBS_CF_X_ATHENA_LIBS"
14977CFLAGS="$cf_save_CFLAGS_CF_X_ATHENA_LIBS"
14978CPPFLAGS="$cf_save_CPPFLAGS_CF_X_ATHENA_LIBS"
14979
14980		if test "$cf_result" = yes ; then
14981			cf_x_athena_lib="$cf_libs"
14982			break
14983		fi
14984	done # cf_libs
14985		test -n "$cf_x_athena_lib" && break
14986	done # cf_lib
14987done
14988
14989if test -z "$cf_x_athena_lib" ; then
14990	{ { echo "$as_me:14990: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&5
14991echo "$as_me: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&2;}
14992   { (exit 1); exit 1; }; }
14993fi
14994
14995cf_add_libs="$LIBS"
14996# reverse order
14997cf_add_0lib=
14998for cf_add_1lib in $cf_x_athena_lib; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14999# filter duplicates
15000for cf_add_1lib in $cf_add_0lib; do
15001	for cf_add_2lib in $cf_add_libs; do
15002		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15003			cf_add_1lib=
15004			break
15005		fi
15006	done
15007	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15008done
15009LIBS="$cf_add_libs"
15010
15011cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15012
15013cat >>confdefs.h <<EOF
15014#define $cf_x_athena_LIBS 1
15015EOF
15016
15017fi
15018
15019for ac_header in X11/Xpoll.h
15020do
15021as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15022echo "$as_me:15022: checking for $ac_header" >&5
15023echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15024if eval "test \"\${$as_ac_Header+set}\" = set"; then
15025  echo $ECHO_N "(cached) $ECHO_C" >&6
15026else
15027  cat >"conftest.$ac_ext" <<_ACEOF
15028#line 15028 "configure"
15029#include "confdefs.h"
15030#include <$ac_header>
15031_ACEOF
15032if { (eval echo "$as_me:15032: \"$ac_cpp "conftest.$ac_ext"\"") >&5
15033  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
15034  ac_status=$?
15035  $EGREP -v '^ *\+' conftest.er1 >conftest.err
15036  rm -f conftest.er1
15037  cat conftest.err >&5
15038  echo "$as_me:15038: \$? = $ac_status" >&5
15039  (exit "$ac_status"); } >/dev/null; then
15040  if test -s conftest.err; then
15041    ac_cpp_err=$ac_c_preproc_warn_flag
15042  else
15043    ac_cpp_err=
15044  fi
15045else
15046  ac_cpp_err=yes
15047fi
15048if test -z "$ac_cpp_err"; then
15049  eval "$as_ac_Header=yes"
15050else
15051  echo "$as_me: failed program was:" >&5
15052  cat "conftest.$ac_ext" >&5
15053  eval "$as_ac_Header=no"
15054fi
15055rm -f conftest.err "conftest.$ac_ext"
15056fi
15057echo "$as_me:15057: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
15058echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
15059if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
15060  cat >>confdefs.h <<EOF
15061#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15062EOF
15063
15064fi
15065done
15066
15067echo "$as_me:15067: checking for declaration of fd_set" >&5
15068echo $ECHO_N "checking for declaration of fd_set... $ECHO_C" >&6
15069if test "${cf_cv_type_fd_set+set}" = set; then
15070  echo $ECHO_N "(cached) $ECHO_C" >&6
15071else
15072
15073echo "${as_me:-configure}:15073: testing sys/types alone ..." 1>&5
15074
15075cat >"conftest.$ac_ext" <<_ACEOF
15076#line 15076 "configure"
15077#include "confdefs.h"
15078
15079#include <sys/types.h>
15080int
15081main (void)
15082{
15083fd_set x; (void)x
15084  ;
15085  return 0;
15086}
15087_ACEOF
15088rm -f "conftest.$ac_objext"
15089if { (eval echo "$as_me:15089: \"$ac_compile\"") >&5
15090  (eval $ac_compile) 2>&5
15091  ac_status=$?
15092  echo "$as_me:15092: \$? = $ac_status" >&5
15093  (exit "$ac_status"); } &&
15094         { ac_try='test -s "conftest.$ac_objext"'
15095  { (eval echo "$as_me:15095: \"$ac_try\"") >&5
15096  (eval $ac_try) 2>&5
15097  ac_status=$?
15098  echo "$as_me:15098: \$? = $ac_status" >&5
15099  (exit "$ac_status"); }; }; then
15100  cf_cv_type_fd_set=sys/types.h
15101else
15102  echo "$as_me: failed program was:" >&5
15103cat "conftest.$ac_ext" >&5
15104
15105echo "${as_me:-configure}:15105: testing X11/Xpoll.h ..." 1>&5
15106
15107cat >"conftest.$ac_ext" <<_ACEOF
15108#line 15108 "configure"
15109#include "confdefs.h"
15110
15111#ifdef HAVE_X11_XPOLL_H
15112#include <X11/Xpoll.h>
15113#endif
15114int
15115main (void)
15116{
15117fd_set x; (void)x
15118  ;
15119  return 0;
15120}
15121_ACEOF
15122rm -f "conftest.$ac_objext"
15123if { (eval echo "$as_me:15123: \"$ac_compile\"") >&5
15124  (eval $ac_compile) 2>&5
15125  ac_status=$?
15126  echo "$as_me:15126: \$? = $ac_status" >&5
15127  (exit "$ac_status"); } &&
15128         { ac_try='test -s "conftest.$ac_objext"'
15129  { (eval echo "$as_me:15129: \"$ac_try\"") >&5
15130  (eval $ac_try) 2>&5
15131  ac_status=$?
15132  echo "$as_me:15132: \$? = $ac_status" >&5
15133  (exit "$ac_status"); }; }; then
15134  cf_cv_type_fd_set=X11/Xpoll.h
15135else
15136  echo "$as_me: failed program was:" >&5
15137cat "conftest.$ac_ext" >&5
15138
15139echo "${as_me:-configure}:15139: testing sys/select.h ..." 1>&5
15140
15141cat >"conftest.$ac_ext" <<_ACEOF
15142#line 15142 "configure"
15143#include "confdefs.h"
15144
15145#include <sys/types.h>
15146#include <sys/select.h>
15147int
15148main (void)
15149{
15150fd_set x; (void)x
15151  ;
15152  return 0;
15153}
15154_ACEOF
15155rm -f "conftest.$ac_objext"
15156if { (eval echo "$as_me:15156: \"$ac_compile\"") >&5
15157  (eval $ac_compile) 2>&5
15158  ac_status=$?
15159  echo "$as_me:15159: \$? = $ac_status" >&5
15160  (exit "$ac_status"); } &&
15161         { ac_try='test -s "conftest.$ac_objext"'
15162  { (eval echo "$as_me:15162: \"$ac_try\"") >&5
15163  (eval $ac_try) 2>&5
15164  ac_status=$?
15165  echo "$as_me:15165: \$? = $ac_status" >&5
15166  (exit "$ac_status"); }; }; then
15167  cf_cv_type_fd_set=sys/select.h
15168else
15169  echo "$as_me: failed program was:" >&5
15170cat "conftest.$ac_ext" >&5
15171cf_cv_type_fd_set=unknown
15172fi
15173rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15174fi
15175rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15176fi
15177rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15178fi
15179echo "$as_me:15179: result: $cf_cv_type_fd_set" >&5
15180echo "${ECHO_T}$cf_cv_type_fd_set" >&6
15181if test $cf_cv_type_fd_set = sys/select.h ; then
15182
15183cat >>confdefs.h <<\EOF
15184#define USE_SYS_SELECT_H 1
15185EOF
15186
15187fi
15188
15189echo "$as_me:15189: checking for declaration of fd_mask" >&5
15190echo $ECHO_N "checking for declaration of fd_mask... $ECHO_C" >&6
15191if test "${cf_cv_type_fd_mask+set}" = set; then
15192  echo $ECHO_N "(cached) $ECHO_C" >&6
15193else
15194
15195    if test x$cf_cv_type_fd_set = xX11/Xpoll.h ; then
15196        cat >"conftest.$ac_ext" <<_ACEOF
15197#line 15197 "configure"
15198#include "confdefs.h"
15199
15200#include <X11/Xpoll.h>
15201int
15202main (void)
15203{
15204fd_mask x
15205  ;
15206  return 0;
15207}
15208_ACEOF
15209rm -f "conftest.$ac_objext"
15210if { (eval echo "$as_me:15210: \"$ac_compile\"") >&5
15211  (eval $ac_compile) 2>&5
15212  ac_status=$?
15213  echo "$as_me:15213: \$? = $ac_status" >&5
15214  (exit "$ac_status"); } &&
15215         { ac_try='test -s "conftest.$ac_objext"'
15216  { (eval echo "$as_me:15216: \"$ac_try\"") >&5
15217  (eval $ac_try) 2>&5
15218  ac_status=$?
15219  echo "$as_me:15219: \$? = $ac_status" >&5
15220  (exit "$ac_status"); }; }; then
15221  :
15222else
15223  echo "$as_me: failed program was:" >&5
15224cat "conftest.$ac_ext" >&5
15225
15226echo "${as_me:-configure}:15226: testing if we must define CSRG_BASED ..." 1>&5
15227
15228# Xosdefs.h on Mac OS X may not define this (but it should).
15229            cat >"conftest.$ac_ext" <<_ACEOF
15230#line 15230 "configure"
15231#include "confdefs.h"
15232
15233#define CSRG_BASED
15234#include <X11/Xpoll.h>
15235int
15236main (void)
15237{
15238fd_mask x
15239  ;
15240  return 0;
15241}
15242_ACEOF
15243rm -f "conftest.$ac_objext"
15244if { (eval echo "$as_me:15244: \"$ac_compile\"") >&5
15245  (eval $ac_compile) 2>&5
15246  ac_status=$?
15247  echo "$as_me:15247: \$? = $ac_status" >&5
15248  (exit "$ac_status"); } &&
15249         { ac_try='test -s "conftest.$ac_objext"'
15250  { (eval echo "$as_me:15250: \"$ac_try\"") >&5
15251  (eval $ac_try) 2>&5
15252  ac_status=$?
15253  echo "$as_me:15253: \$? = $ac_status" >&5
15254  (exit "$ac_status"); }; }; then
15255  cf_cv_type_fd_mask=CSRG_BASED
15256else
15257  echo "$as_me: failed program was:" >&5
15258cat "conftest.$ac_ext" >&5
15259fi
15260rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15261fi
15262rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15263    else
15264        cf_cv_type_fd_mask=$cf_cv_type_fd_set
15265    fi
15266
15267fi
15268echo "$as_me:15268: result: $cf_cv_type_fd_mask" >&5
15269echo "${ECHO_T}$cf_cv_type_fd_mask" >&6
15270if test x$cf_cv_type_fd_mask = xCSRG_BASED ; then
15271
15272cat >>confdefs.h <<\EOF
15273#define CSRG_BASED 1
15274EOF
15275
15276fi
15277
15278echo "$as_me:15278: checking for IRIX 6.5 baud-rate redefinitions" >&5
15279echo $ECHO_N "checking for IRIX 6.5 baud-rate redefinitions... $ECHO_C" >&6
15280if test "${cf_cv_termio_c_ispeed+set}" = set; then
15281  echo $ECHO_N "(cached) $ECHO_C" >&6
15282else
15283
15284cat >"conftest.$ac_ext" <<_ACEOF
15285#line 15285 "configure"
15286#include "confdefs.h"
15287
15288#include <sys/types.h>
15289#include <sys/termio.h>
15290int
15291main (void)
15292{
15293
15294struct termio foo;
15295foo.c_ispeed = B38400;
15296foo.c_ospeed = B9600;
15297(void)foo;
15298
15299  ;
15300  return 0;
15301}
15302_ACEOF
15303rm -f "conftest.$ac_objext"
15304if { (eval echo "$as_me:15304: \"$ac_compile\"") >&5
15305  (eval $ac_compile) 2>&5
15306  ac_status=$?
15307  echo "$as_me:15307: \$? = $ac_status" >&5
15308  (exit "$ac_status"); } &&
15309         { ac_try='test -s "conftest.$ac_objext"'
15310  { (eval echo "$as_me:15310: \"$ac_try\"") >&5
15311  (eval $ac_try) 2>&5
15312  ac_status=$?
15313  echo "$as_me:15313: \$? = $ac_status" >&5
15314  (exit "$ac_status"); }; }; then
15315  cf_cv_termio_c_ispeed=yes
15316
15317else
15318  echo "$as_me: failed program was:" >&5
15319cat "conftest.$ac_ext" >&5
15320cf_cv_termio_c_ispeed=no
15321fi
15322rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15323
15324fi
15325echo "$as_me:15325: result: $cf_cv_termio_c_ispeed" >&5
15326echo "${ECHO_T}$cf_cv_termio_c_ispeed" >&6
15327test "$cf_cv_termio_c_ispeed" = yes &&
15328cat >>confdefs.h <<\EOF
15329#define HAVE_TERMIO_C_ISPEED 1
15330EOF
15331
15332echo "$as_me:15332: checking for termios type tcflag_t" >&5
15333echo $ECHO_N "checking for termios type tcflag_t... $ECHO_C" >&6
15334if test "${cf_cv_havetype_tcflag_t+set}" = set; then
15335  echo $ECHO_N "(cached) $ECHO_C" >&6
15336else
15337
15338	cat >"conftest.$ac_ext" <<_ACEOF
15339#line 15339 "configure"
15340#include "confdefs.h"
15341#include <termios.h>
15342int
15343main (void)
15344{
15345
15346		tcflag_t x = 0; (void)x
15347  ;
15348  return 0;
15349}
15350_ACEOF
15351rm -f "conftest.$ac_objext"
15352if { (eval echo "$as_me:15352: \"$ac_compile\"") >&5
15353  (eval $ac_compile) 2>&5
15354  ac_status=$?
15355  echo "$as_me:15355: \$? = $ac_status" >&5
15356  (exit "$ac_status"); } &&
15357         { ac_try='test -s "conftest.$ac_objext"'
15358  { (eval echo "$as_me:15358: \"$ac_try\"") >&5
15359  (eval $ac_try) 2>&5
15360  ac_status=$?
15361  echo "$as_me:15361: \$? = $ac_status" >&5
15362  (exit "$ac_status"); }; }; then
15363  cf_cv_havetype_tcflag_t=yes
15364else
15365  echo "$as_me: failed program was:" >&5
15366cat "conftest.$ac_ext" >&5
15367cf_cv_havetype_tcflag_t=no
15368fi
15369rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15370
15371fi
15372echo "$as_me:15372: result: $cf_cv_havetype_tcflag_t" >&5
15373echo "${ECHO_T}$cf_cv_havetype_tcflag_t" >&6
15374test "$cf_cv_havetype_tcflag_t" = no &&
15375cat >>confdefs.h <<\EOF
15376#define tcflag_t unsigned long
15377EOF
15378
15379echo "$as_me:15379: checking for termios type speed_t" >&5
15380echo $ECHO_N "checking for termios type speed_t... $ECHO_C" >&6
15381if test "${cf_cv_havetype_speed_t+set}" = set; then
15382  echo $ECHO_N "(cached) $ECHO_C" >&6
15383else
15384
15385	cat >"conftest.$ac_ext" <<_ACEOF
15386#line 15386 "configure"
15387#include "confdefs.h"
15388#include <termios.h>
15389int
15390main (void)
15391{
15392
15393		speed_t x = 0; (void)x
15394  ;
15395  return 0;
15396}
15397_ACEOF
15398rm -f "conftest.$ac_objext"
15399if { (eval echo "$as_me:15399: \"$ac_compile\"") >&5
15400  (eval $ac_compile) 2>&5
15401  ac_status=$?
15402  echo "$as_me:15402: \$? = $ac_status" >&5
15403  (exit "$ac_status"); } &&
15404         { ac_try='test -s "conftest.$ac_objext"'
15405  { (eval echo "$as_me:15405: \"$ac_try\"") >&5
15406  (eval $ac_try) 2>&5
15407  ac_status=$?
15408  echo "$as_me:15408: \$? = $ac_status" >&5
15409  (exit "$ac_status"); }; }; then
15410  cf_cv_havetype_speed_t=yes
15411else
15412  echo "$as_me: failed program was:" >&5
15413cat "conftest.$ac_ext" >&5
15414cf_cv_havetype_speed_t=no
15415fi
15416rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15417
15418fi
15419echo "$as_me:15419: result: $cf_cv_havetype_speed_t" >&5
15420echo "${ECHO_T}$cf_cv_havetype_speed_t" >&6
15421test "$cf_cv_havetype_speed_t" = no &&
15422cat >>confdefs.h <<\EOF
15423#define speed_t unsigned short
15424EOF
15425
15426echo "$as_me:15426: checking for termios type cc_t" >&5
15427echo $ECHO_N "checking for termios type cc_t... $ECHO_C" >&6
15428if test "${cf_cv_havetype_cc_t+set}" = set; then
15429  echo $ECHO_N "(cached) $ECHO_C" >&6
15430else
15431
15432	cat >"conftest.$ac_ext" <<_ACEOF
15433#line 15433 "configure"
15434#include "confdefs.h"
15435#include <termios.h>
15436int
15437main (void)
15438{
15439
15440		cc_t x = 0; (void)x
15441  ;
15442  return 0;
15443}
15444_ACEOF
15445rm -f "conftest.$ac_objext"
15446if { (eval echo "$as_me:15446: \"$ac_compile\"") >&5
15447  (eval $ac_compile) 2>&5
15448  ac_status=$?
15449  echo "$as_me:15449: \$? = $ac_status" >&5
15450  (exit "$ac_status"); } &&
15451         { ac_try='test -s "conftest.$ac_objext"'
15452  { (eval echo "$as_me:15452: \"$ac_try\"") >&5
15453  (eval $ac_try) 2>&5
15454  ac_status=$?
15455  echo "$as_me:15455: \$? = $ac_status" >&5
15456  (exit "$ac_status"); }; }; then
15457  cf_cv_havetype_cc_t=yes
15458else
15459  echo "$as_me: failed program was:" >&5
15460cat "conftest.$ac_ext" >&5
15461cf_cv_havetype_cc_t=no
15462fi
15463rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15464
15465fi
15466echo "$as_me:15466: result: $cf_cv_havetype_cc_t" >&5
15467echo "${ECHO_T}$cf_cv_havetype_cc_t" >&6
15468test "$cf_cv_havetype_cc_t" = no &&
15469cat >>confdefs.h <<\EOF
15470#define cc_t unsigned char
15471EOF
15472
15473# The Xcursor library is normally (weakly) linked via the X11 library rather
15474# than directly to applications.  xterm can select a cursor theme; users can
15475# also use environment variables to select cursor size.  We would only notice
15476# the library if there are development files for it.  Provide a way to disable
15477# the feature if it is unwanted.
15478echo "$as_me:15478: checking if we expect to use the Xcursor library" >&5
15479echo $ECHO_N "checking if we expect to use the Xcursor library... $ECHO_C" >&6
15480
15481# Check whether --enable-xcursor or --disable-xcursor was given.
15482if test "${enable_xcursor+set}" = set; then
15483  enableval="$enable_xcursor"
15484  test "$enableval" != no && enableval=yes
15485	if test "$enableval" != "yes" ; then
15486    enable_xcursor=no
15487	else
15488		enable_xcursor=yes
15489	fi
15490else
15491  enableval=yes
15492	enable_xcursor=yes
15493
15494fi;
15495echo "$as_me:15495: result: $enable_xcursor" >&5
15496echo "${ECHO_T}$enable_xcursor" >&6
15497if test "$enable_xcursor" = yes; then
15498
15499cat >>confdefs.h <<\EOF
15500#define HAVE_LIB_XCURSOR 1
15501EOF
15502
15503fi
15504
15505LIBS="$LIBS $X_EXTRA_LIBS"
15506
15507for ac_header in \
15508stropts.h \
15509
15510do
15511as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15512echo "$as_me:15512: checking for $ac_header" >&5
15513echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15514if eval "test \"\${$as_ac_Header+set}\" = set"; then
15515  echo $ECHO_N "(cached) $ECHO_C" >&6
15516else
15517  cat >"conftest.$ac_ext" <<_ACEOF
15518#line 15518 "configure"
15519#include "confdefs.h"
15520#include <$ac_header>
15521_ACEOF
15522if { (eval echo "$as_me:15522: \"$ac_cpp "conftest.$ac_ext"\"") >&5
15523  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
15524  ac_status=$?
15525  $EGREP -v '^ *\+' conftest.er1 >conftest.err
15526  rm -f conftest.er1
15527  cat conftest.err >&5
15528  echo "$as_me:15528: \$? = $ac_status" >&5
15529  (exit "$ac_status"); } >/dev/null; then
15530  if test -s conftest.err; then
15531    ac_cpp_err=$ac_c_preproc_warn_flag
15532  else
15533    ac_cpp_err=
15534  fi
15535else
15536  ac_cpp_err=yes
15537fi
15538if test -z "$ac_cpp_err"; then
15539  eval "$as_ac_Header=yes"
15540else
15541  echo "$as_me: failed program was:" >&5
15542  cat "conftest.$ac_ext" >&5
15543  eval "$as_ac_Header=no"
15544fi
15545rm -f conftest.err "conftest.$ac_ext"
15546fi
15547echo "$as_me:15547: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
15548echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
15549if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
15550  cat >>confdefs.h <<EOF
15551#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15552EOF
15553
15554fi
15555done
15556
15557cf_func_grantpt="grantpt ptsname"
15558cf_prefer_openpt=no
15559case $host_os in
15560(darwin[0-9].*)
15561	;;
15562(openbsd[0-9].*)
15563	# The POSIX entrypoints exist, but have never worked.
15564	;;
15565(linux*)
15566	cf_func_grantpt="$cf_func_grantpt posix_openpt"
15567	cf_prefer_openpt=yes
15568	;;
15569(*)
15570	cf_func_grantpt="$cf_func_grantpt posix_openpt"
15571	;;
15572esac
15573
15574for ac_func in $cf_func_grantpt
15575do
15576as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15577echo "$as_me:15577: checking for $ac_func" >&5
15578echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15579if eval "test \"\${$as_ac_var+set}\" = set"; then
15580  echo $ECHO_N "(cached) $ECHO_C" >&6
15581else
15582  cat >"conftest.$ac_ext" <<_ACEOF
15583#line 15583 "configure"
15584#include "confdefs.h"
15585#define $ac_func autoconf_temporary
15586#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
15587#undef $ac_func
15588
15589#ifdef __cplusplus
15590extern "C"
15591#endif
15592
15593/* We use char because int might match the return type of a gcc2
15594   builtin and then its argument prototype would still apply.  */
15595char $ac_func (void);
15596
15597int
15598main (void)
15599{
15600
15601/* The GNU C library defines stubs for functions which it implements
15602    to always fail with ENOSYS.  Some functions are actually named
15603    something starting with __ and the normal name is an alias.  */
15604#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15605#error found stub for $ac_func
15606#endif
15607
15608	return $ac_func ();
15609  ;
15610  return 0;
15611}
15612_ACEOF
15613rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15614if { (eval echo "$as_me:15614: \"$ac_link\"") >&5
15615  (eval $ac_link) 2>&5
15616  ac_status=$?
15617  echo "$as_me:15617: \$? = $ac_status" >&5
15618  (exit "$ac_status"); } &&
15619         { ac_try='test -s "conftest$ac_exeext"'
15620  { (eval echo "$as_me:15620: \"$ac_try\"") >&5
15621  (eval $ac_try) 2>&5
15622  ac_status=$?
15623  echo "$as_me:15623: \$? = $ac_status" >&5
15624  (exit "$ac_status"); }; }; then
15625  eval "$as_ac_var=yes"
15626else
15627  echo "$as_me: failed program was:" >&5
15628cat "conftest.$ac_ext" >&5
15629eval "$as_ac_var=no"
15630fi
15631rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15632fi
15633echo "$as_me:15633: result: `eval echo '${'"$as_ac_var"'}'`" >&5
15634echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
15635if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
15636  cat >>confdefs.h <<EOF
15637#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15638EOF
15639
15640fi
15641done
15642
15643cf_grantpt_opts=
15644if test "x$ac_cv_func_grantpt" = "xyes" ; then
15645	echo "$as_me:15645: checking if grantpt really works" >&5
15646echo $ECHO_N "checking if grantpt really works... $ECHO_C" >&6
15647	cat >"conftest.$ac_ext" <<_ACEOF
15648#line 15648 "configure"
15649#include "confdefs.h"
15650
15651#include <stdlib.h>
15652#include <stdio.h>
15653#include <termios.h>
15654#include <unistd.h>
15655#include <signal.h>
15656#include <fcntl.h>
15657#include <errno.h>
15658
15659#ifndef HAVE_POSIX_OPENPT
15660#undef posix_openpt
15661#define posix_openpt(mode) open("/dev/ptmx", mode)
15662#endif
15663
15664#ifdef HAVE_STROPTS_H
15665#include <stropts.h>
15666#endif
15667
15668static void failed(int code)
15669{
15670	perror("conftest");
15671	exit(code);
15672}
15673
15674static void my_timeout(int sig)
15675{
15676	(void)sig;
15677	exit(99);
15678}
15679
15680int
15681main (void)
15682{
15683
15684	int code = 0;
15685	int pty;
15686	int tty;
15687	char *slave;
15688	struct termios tio;
15689
15690	(void)tio;
15691	signal(SIGALRM, my_timeout);
15692
15693	if (alarm(2) == 9)
15694		failed(9);
15695	else if ((pty = posix_openpt(O_RDWR)) < 0)
15696		failed(1);
15697	else if (grantpt(pty) < 0)
15698		failed(2);
15699	else if (unlockpt(pty) < 0)
15700		failed(3);
15701	else if ((slave = ptsname(pty)) == 0)
15702		failed(4);
15703#if (CONFTEST == 3) || defined(CONFTEST_isatty)
15704	else if (!isatty(pty))
15705		failed(4);
15706#endif
15707#if CONFTEST >= 4
15708    else if (tcgetattr(pty, &tio) < 0)
15709		failed(20);
15710    else if (tcsetattr(pty, TCSAFLUSH, &tio) < 0)
15711		failed(21);
15712#endif
15713	/* BSD posix_openpt does not treat pty as a terminal until slave is opened.
15714	 * Linux does treat it that way.
15715	 */
15716	else if ((tty = open(slave, O_RDWR)) < 0)
15717		failed(5);
15718#ifdef CONFTEST
15719#ifdef I_PUSH
15720#if (CONFTEST == 0) || defined(CONFTEST_ptem)
15721    else if (ioctl(tty, I_PUSH, "ptem") < 0)
15722		failed(10);
15723#endif
15724#if (CONFTEST == 1) || defined(CONFTEST_ldterm)
15725    else if (ioctl(tty, I_PUSH, "ldterm") < 0)
15726		failed(11);
15727#endif
15728#if (CONFTEST == 2) || defined(CONFTEST_ttcompat)
15729    else if (ioctl(tty, I_PUSH, "ttcompat") < 0)
15730		failed(12);
15731#endif
15732#endif /* I_PUSH */
15733#if CONFTEST >= 5
15734    else if (tcgetattr(tty, &tio) < 0)
15735		failed(30);
15736    else if (tcsetattr(tty, TCSAFLUSH, &tio) < 0)
15737		failed(31);
15738#endif
15739#endif /* CONFTEST */
15740    (void) tty;
15741	${cf_cv_main_return:-return}(code);
15742
15743  ;
15744  return 0;
15745}
15746_ACEOF
15747rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15748if { (eval echo "$as_me:15748: \"$ac_link\"") >&5
15749  (eval $ac_link) 2>&5
15750  ac_status=$?
15751  echo "$as_me:15751: \$? = $ac_status" >&5
15752  (exit "$ac_status"); } &&
15753         { ac_try='test -s "conftest$ac_exeext"'
15754  { (eval echo "$as_me:15754: \"$ac_try\"") >&5
15755  (eval $ac_try) 2>&5
15756  ac_status=$?
15757  echo "$as_me:15757: \$? = $ac_status" >&5
15758  (exit "$ac_status"); }; }; then
15759
15760	if test "$cross_compiling" = yes; then
15761  ac_cv_func_grantpt=maybe
15762else
15763  cat >"conftest.$ac_ext" <<_ACEOF
15764#line 15764 "configure"
15765#include "confdefs.h"
15766
15767#include <stdlib.h>
15768#include <stdio.h>
15769#include <termios.h>
15770#include <unistd.h>
15771#include <signal.h>
15772#include <fcntl.h>
15773#include <errno.h>
15774
15775#ifndef HAVE_POSIX_OPENPT
15776#undef posix_openpt
15777#define posix_openpt(mode) open("/dev/ptmx", mode)
15778#endif
15779
15780#ifdef HAVE_STROPTS_H
15781#include <stropts.h>
15782#endif
15783
15784static void failed(int code)
15785{
15786	perror("conftest");
15787	exit(code);
15788}
15789
15790static void my_timeout(int sig)
15791{
15792	(void)sig;
15793	exit(99);
15794}
15795
15796int main(void)
15797{
15798
15799	int code = 0;
15800	int pty;
15801	int tty;
15802	char *slave;
15803	struct termios tio;
15804
15805	(void)tio;
15806	signal(SIGALRM, my_timeout);
15807
15808	if (alarm(2) == 9)
15809		failed(9);
15810	else if ((pty = posix_openpt(O_RDWR)) < 0)
15811		failed(1);
15812	else if (grantpt(pty) < 0)
15813		failed(2);
15814	else if (unlockpt(pty) < 0)
15815		failed(3);
15816	else if ((slave = ptsname(pty)) == 0)
15817		failed(4);
15818#if (CONFTEST == 3) || defined(CONFTEST_isatty)
15819	else if (!isatty(pty))
15820		failed(4);
15821#endif
15822#if CONFTEST >= 4
15823    else if (tcgetattr(pty, &tio) < 0)
15824		failed(20);
15825    else if (tcsetattr(pty, TCSAFLUSH, &tio) < 0)
15826		failed(21);
15827#endif
15828	/* BSD posix_openpt does not treat pty as a terminal until slave is opened.
15829	 * Linux does treat it that way.
15830	 */
15831	else if ((tty = open(slave, O_RDWR)) < 0)
15832		failed(5);
15833#ifdef CONFTEST
15834#ifdef I_PUSH
15835#if (CONFTEST == 0) || defined(CONFTEST_ptem)
15836    else if (ioctl(tty, I_PUSH, "ptem") < 0)
15837		failed(10);
15838#endif
15839#if (CONFTEST == 1) || defined(CONFTEST_ldterm)
15840    else if (ioctl(tty, I_PUSH, "ldterm") < 0)
15841		failed(11);
15842#endif
15843#if (CONFTEST == 2) || defined(CONFTEST_ttcompat)
15844    else if (ioctl(tty, I_PUSH, "ttcompat") < 0)
15845		failed(12);
15846#endif
15847#endif /* I_PUSH */
15848#if CONFTEST >= 5
15849    else if (tcgetattr(tty, &tio) < 0)
15850		failed(30);
15851    else if (tcsetattr(tty, TCSAFLUSH, &tio) < 0)
15852		failed(31);
15853#endif
15854#endif /* CONFTEST */
15855    (void) tty;
15856	${cf_cv_main_return:-return}(code);
15857
15858}
15859
15860_ACEOF
15861rm -f "conftest$ac_exeext"
15862if { (eval echo "$as_me:15862: \"$ac_link\"") >&5
15863  (eval $ac_link) 2>&5
15864  ac_status=$?
15865  echo "$as_me:15865: \$? = $ac_status" >&5
15866  (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
15867  { (eval echo "$as_me:15867: \"$ac_try\"") >&5
15868  (eval $ac_try) 2>&5
15869  ac_status=$?
15870  echo "$as_me:15870: \$? = $ac_status" >&5
15871  (exit "$ac_status"); }; }; then
15872  :
15873else
15874  echo "$as_me: program exited with status $ac_status" >&5
15875echo "$as_me: failed program was:" >&5
15876cat "conftest.$ac_ext" >&5
15877ac_cv_func_grantpt=no
15878
15879fi
15880rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
15881fi
15882
15883else
15884  echo "$as_me: failed program was:" >&5
15885cat "conftest.$ac_ext" >&5
15886ac_cv_func_grantpt=no
15887fi
15888rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15889	echo "$as_me:15889: result: $ac_cv_func_grantpt" >&5
15890echo "${ECHO_T}$ac_cv_func_grantpt" >&6
15891
15892	if test "x$ac_cv_func_grantpt" != "xno" ; then
15893
15894		if test "x$ac_cv_func_grantpt" = "xyes" ; then
15895			echo "$as_me:15895: checking for pty features" >&5
15896echo $ECHO_N "checking for pty features... $ECHO_C" >&6
15897			if test "x$ac_cv_header_stropts_h" = xyes
15898			then
15899				cf_pty_this=0
15900			else
15901				cf_pty_this=3
15902			fi
15903
15904			cf_pty_defines=
15905			while test $cf_pty_this != 6
15906			do
15907
15908				cf_pty_feature=
15909				cf_pty_next="`expr $cf_pty_this + 1`"
15910
15911echo "${as_me:-configure}:15911: testing pty feature test $cf_pty_next:5 ..." 1>&5
15912
15913				if test "$cross_compiling" = yes; then
15914  { { echo "$as_me:15914: error: cannot run test program while cross compiling" >&5
15915echo "$as_me: error: cannot run test program while cross compiling" >&2;}
15916   { (exit 1); exit 1; }; }
15917else
15918  cat >"conftest.$ac_ext" <<_ACEOF
15919#line 15919 "configure"
15920#include "confdefs.h"
15921#define CONFTEST $cf_pty_this
15922$cf_pty_defines
15923
15924#include <stdlib.h>
15925#include <stdio.h>
15926#include <termios.h>
15927#include <unistd.h>
15928#include <signal.h>
15929#include <fcntl.h>
15930#include <errno.h>
15931
15932#ifndef HAVE_POSIX_OPENPT
15933#undef posix_openpt
15934#define posix_openpt(mode) open("/dev/ptmx", mode)
15935#endif
15936
15937#ifdef HAVE_STROPTS_H
15938#include <stropts.h>
15939#endif
15940
15941static void failed(int code)
15942{
15943	perror("conftest");
15944	exit(code);
15945}
15946
15947static void my_timeout(int sig)
15948{
15949	(void)sig;
15950	exit(99);
15951}
15952
15953int main(void)
15954{
15955
15956	int code = 0;
15957	int pty;
15958	int tty;
15959	char *slave;
15960	struct termios tio;
15961
15962	(void)tio;
15963	signal(SIGALRM, my_timeout);
15964
15965	if (alarm(2) == 9)
15966		failed(9);
15967	else if ((pty = posix_openpt(O_RDWR)) < 0)
15968		failed(1);
15969	else if (grantpt(pty) < 0)
15970		failed(2);
15971	else if (unlockpt(pty) < 0)
15972		failed(3);
15973	else if ((slave = ptsname(pty)) == 0)
15974		failed(4);
15975#if (CONFTEST == 3) || defined(CONFTEST_isatty)
15976	else if (!isatty(pty))
15977		failed(4);
15978#endif
15979#if CONFTEST >= 4
15980    else if (tcgetattr(pty, &tio) < 0)
15981		failed(20);
15982    else if (tcsetattr(pty, TCSAFLUSH, &tio) < 0)
15983		failed(21);
15984#endif
15985	/* BSD posix_openpt does not treat pty as a terminal until slave is opened.
15986	 * Linux does treat it that way.
15987	 */
15988	else if ((tty = open(slave, O_RDWR)) < 0)
15989		failed(5);
15990#ifdef CONFTEST
15991#ifdef I_PUSH
15992#if (CONFTEST == 0) || defined(CONFTEST_ptem)
15993    else if (ioctl(tty, I_PUSH, "ptem") < 0)
15994		failed(10);
15995#endif
15996#if (CONFTEST == 1) || defined(CONFTEST_ldterm)
15997    else if (ioctl(tty, I_PUSH, "ldterm") < 0)
15998		failed(11);
15999#endif
16000#if (CONFTEST == 2) || defined(CONFTEST_ttcompat)
16001    else if (ioctl(tty, I_PUSH, "ttcompat") < 0)
16002		failed(12);
16003#endif
16004#endif /* I_PUSH */
16005#if CONFTEST >= 5
16006    else if (tcgetattr(tty, &tio) < 0)
16007		failed(30);
16008    else if (tcsetattr(tty, TCSAFLUSH, &tio) < 0)
16009		failed(31);
16010#endif
16011#endif /* CONFTEST */
16012    (void) tty;
16013	${cf_cv_main_return:-return}(code);
16014
16015}
16016
16017_ACEOF
16018rm -f "conftest$ac_exeext"
16019if { (eval echo "$as_me:16019: \"$ac_link\"") >&5
16020  (eval $ac_link) 2>&5
16021  ac_status=$?
16022  echo "$as_me:16022: \$? = $ac_status" >&5
16023  (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
16024  { (eval echo "$as_me:16024: \"$ac_try\"") >&5
16025  (eval $ac_try) 2>&5
16026  ac_status=$?
16027  echo "$as_me:16027: \$? = $ac_status" >&5
16028  (exit "$ac_status"); }; }; then
16029
16030				case $cf_pty_next in
16031				(1) # - streams
16032					cf_pty_feature=ptem
16033					;;
16034				(2) # - streams
16035					cf_pty_feature=ldterm
16036					;;
16037				(3) # - streams
16038					cf_pty_feature=ttcompat
16039					;;
16040				(4)
16041					cf_pty_feature=pty_isatty
16042					;;
16043				(5)
16044					cf_pty_feature=pty_tcsetattr
16045					;;
16046				(6)
16047					cf_pty_feature=tty_tcsetattr
16048					;;
16049				esac
16050
16051else
16052  echo "$as_me: program exited with status $ac_status" >&5
16053echo "$as_me: failed program was:" >&5
16054cat "conftest.$ac_ext" >&5
16055
16056				case $cf_pty_next in
16057				(1|2|3)
16058
16059echo "${as_me:-configure}:16059: testing skipping remaining streams features $cf_pty_this..2 ..." 1>&5
16060
16061					cf_pty_next=3
16062					;;
16063				esac
16064
16065fi
16066rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
16067fi
16068				if test -n "$cf_pty_feature"
16069				then
16070					cf_pty_defines="$cf_pty_defines
16071#define CONFTEST_$cf_pty_feature 1
16072"
16073					cf_grantpt_opts="$cf_grantpt_opts $cf_pty_feature"
16074				fi
16075
16076				cf_pty_this=$cf_pty_next
16077			done
16078			echo "$as_me:16078: result: $cf_grantpt_opts" >&5
16079echo "${ECHO_T}$cf_grantpt_opts" >&6
16080			cf_grantpt_opts=`echo "$cf_grantpt_opts" | sed -e 's/ isatty//'`
16081		fi
16082	fi
16083fi
16084
16085if test "x$cf_prefer_posix_openpt" = "xyes" && test "x$ac_cv_func_posix_openpt" = "xyes" ; then
16086	test -n "$verbose" && echo "	prefer posix_openpt over openpty" 1>&6
16087
16088echo "${as_me:-configure}:16088: testing prefer posix_openpt over openpty ..." 1>&5
16089
16090elif test "x$disable_openpty" != "xyes" || test -z "$cf_grantpt_opts" ; then
16091	echo "$as_me:16091: checking for openpty in -lutil" >&5
16092echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
16093if test "${ac_cv_lib_util_openpty+set}" = set; then
16094  echo $ECHO_N "(cached) $ECHO_C" >&6
16095else
16096  ac_check_lib_save_LIBS=$LIBS
16097LIBS="-lutil  $LIBS"
16098cat >"conftest.$ac_ext" <<_ACEOF
16099#line 16099 "configure"
16100#include "confdefs.h"
16101
16102/* Override any gcc2 internal prototype to avoid an error.  */
16103#ifdef __cplusplus
16104extern "C"
16105#endif
16106/* We use char because int might match the return type of a gcc2
16107   builtin and then its argument prototype would still apply.  */
16108char openpty ();
16109int
16110main (void)
16111{
16112openpty ();
16113  ;
16114  return 0;
16115}
16116_ACEOF
16117rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16118if { (eval echo "$as_me:16118: \"$ac_link\"") >&5
16119  (eval $ac_link) 2>&5
16120  ac_status=$?
16121  echo "$as_me:16121: \$? = $ac_status" >&5
16122  (exit "$ac_status"); } &&
16123         { ac_try='test -s "conftest$ac_exeext"'
16124  { (eval echo "$as_me:16124: \"$ac_try\"") >&5
16125  (eval $ac_try) 2>&5
16126  ac_status=$?
16127  echo "$as_me:16127: \$? = $ac_status" >&5
16128  (exit "$ac_status"); }; }; then
16129  ac_cv_lib_util_openpty=yes
16130else
16131  echo "$as_me: failed program was:" >&5
16132cat "conftest.$ac_ext" >&5
16133ac_cv_lib_util_openpty=no
16134fi
16135rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16136LIBS=$ac_check_lib_save_LIBS
16137fi
16138echo "$as_me:16138: result: $ac_cv_lib_util_openpty" >&5
16139echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
16140if test "$ac_cv_lib_util_openpty" = yes; then
16141  cf_have_openpty=yes
16142else
16143  cf_have_openpty=no
16144fi
16145
16146	if test "$cf_have_openpty" = yes ; then
16147		ac_cv_func_grantpt=no
16148		LIBS="-lutil $LIBS"
16149
16150cat >>confdefs.h <<\EOF
16151#define HAVE_OPENPTY 1
16152EOF
16153
16154for ac_header in \
16155			util.h \
16156			libutil.h \
16157			pty.h \
16158
16159do
16160as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16161echo "$as_me:16161: checking for $ac_header" >&5
16162echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16163if eval "test \"\${$as_ac_Header+set}\" = set"; then
16164  echo $ECHO_N "(cached) $ECHO_C" >&6
16165else
16166  cat >"conftest.$ac_ext" <<_ACEOF
16167#line 16167 "configure"
16168#include "confdefs.h"
16169#include <$ac_header>
16170_ACEOF
16171if { (eval echo "$as_me:16171: \"$ac_cpp "conftest.$ac_ext"\"") >&5
16172  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
16173  ac_status=$?
16174  $EGREP -v '^ *\+' conftest.er1 >conftest.err
16175  rm -f conftest.er1
16176  cat conftest.err >&5
16177  echo "$as_me:16177: \$? = $ac_status" >&5
16178  (exit "$ac_status"); } >/dev/null; then
16179  if test -s conftest.err; then
16180    ac_cpp_err=$ac_c_preproc_warn_flag
16181  else
16182    ac_cpp_err=
16183  fi
16184else
16185  ac_cpp_err=yes
16186fi
16187if test -z "$ac_cpp_err"; then
16188  eval "$as_ac_Header=yes"
16189else
16190  echo "$as_me: failed program was:" >&5
16191  cat "conftest.$ac_ext" >&5
16192  eval "$as_ac_Header=no"
16193fi
16194rm -f conftest.err "conftest.$ac_ext"
16195fi
16196echo "$as_me:16196: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
16197echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
16198if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
16199  cat >>confdefs.h <<EOF
16200#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16201EOF
16202
16203fi
16204done
16205
16206	fi
16207fi
16208
16209if test "x$ac_cv_func_grantpt" != xno
16210then
16211	test -n "$verbose" && echo "	will rely upon grantpt" 1>&6
16212
16213echo "${as_me:-configure}:16213: testing will rely upon grantpt ..." 1>&5
16214
16215cat >>confdefs.h <<\EOF
16216#define HAVE_WORKING_GRANTPT 1
16217EOF
16218
16219	for cf_feature in $cf_grantpt_opts
16220	do
16221		cf_feature=`echo "$cf_feature" | sed -e 's/ //g'`
16222
16223cf_FEATURE=`echo "$cf_feature" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16224
16225		cat >>confdefs.h <<EOF
16226#define HAVE_GRANTPT_$cf_FEATURE 1
16227EOF
16228
16229	done
16230elif test "x$cf_have_openpty" = xno
16231then
16232	test -n "$verbose" && echo "	will rely upon BSD-pseudoterminals" 1>&6
16233
16234echo "${as_me:-configure}:16234: testing will rely upon BSD-pseudoterminals ..." 1>&5
16235
16236else
16237	test -n "$verbose" && echo "	will rely upon openpty" 1>&6
16238
16239echo "${as_me:-configure}:16239: testing will rely upon openpty ..." 1>&5
16240
16241fi
16242
16243echo "$as_me:16243: checking if we can use XkbQueryExtension" >&5
16244echo $ECHO_N "checking if we can use XkbQueryExtension... $ECHO_C" >&6
16245if test "${cf_cv_xkb_query_extension+set}" = set; then
16246  echo $ECHO_N "(cached) $ECHO_C" >&6
16247else
16248
16249cat >"conftest.$ac_ext" <<_ACEOF
16250#line 16250 "configure"
16251#include "confdefs.h"
16252
16253#include <X11/Xlib.h>
16254#include <X11/extensions/XKB.h>
16255#include <X11/XKBlib.h>
16256
16257int
16258main (void)
16259{
16260
16261	int xkbmajor = XkbMajorVersion;
16262	int xkbminor = XkbMinorVersion;
16263	int xkbopcode, xkbevent, xkberror;
16264
16265	if (XkbLibraryVersion(&xkbmajor, &xkbminor)
16266	    && XkbQueryExtension((Display *)0,
16267				 &xkbopcode,
16268				 &xkbevent,
16269				 &xkberror,
16270				 &xkbmajor,
16271				 &xkbminor))
16272		 return 0;
16273
16274  ;
16275  return 0;
16276}
16277_ACEOF
16278rm -f "conftest.$ac_objext"
16279if { (eval echo "$as_me:16279: \"$ac_compile\"") >&5
16280  (eval $ac_compile) 2>&5
16281  ac_status=$?
16282  echo "$as_me:16282: \$? = $ac_status" >&5
16283  (exit "$ac_status"); } &&
16284         { ac_try='test -s "conftest.$ac_objext"'
16285  { (eval echo "$as_me:16285: \"$ac_try\"") >&5
16286  (eval $ac_try) 2>&5
16287  ac_status=$?
16288  echo "$as_me:16288: \$? = $ac_status" >&5
16289  (exit "$ac_status"); }; }; then
16290
16291cf_cv_xkb_query_extension=yes
16292
16293else
16294  echo "$as_me: failed program was:" >&5
16295cat "conftest.$ac_ext" >&5
16296
16297cf_cv_xkb_query_extension=no
16298
16299fi
16300rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16301
16302fi
16303echo "$as_me:16303: result: $cf_cv_xkb_query_extension" >&5
16304echo "${ECHO_T}$cf_cv_xkb_query_extension" >&6
16305
16306if test $cf_cv_xkb_query_extension = yes
16307then
16308
16309for ac_func in XkbQueryExtension
16310do
16311as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16312echo "$as_me:16312: checking for $ac_func" >&5
16313echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16314if eval "test \"\${$as_ac_var+set}\" = set"; then
16315  echo $ECHO_N "(cached) $ECHO_C" >&6
16316else
16317  cat >"conftest.$ac_ext" <<_ACEOF
16318#line 16318 "configure"
16319#include "confdefs.h"
16320#define $ac_func autoconf_temporary
16321#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
16322#undef $ac_func
16323
16324#ifdef __cplusplus
16325extern "C"
16326#endif
16327
16328/* We use char because int might match the return type of a gcc2
16329   builtin and then its argument prototype would still apply.  */
16330char $ac_func (void);
16331
16332int
16333main (void)
16334{
16335
16336/* The GNU C library defines stubs for functions which it implements
16337    to always fail with ENOSYS.  Some functions are actually named
16338    something starting with __ and the normal name is an alias.  */
16339#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16340#error found stub for $ac_func
16341#endif
16342
16343	return $ac_func ();
16344  ;
16345  return 0;
16346}
16347_ACEOF
16348rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16349if { (eval echo "$as_me:16349: \"$ac_link\"") >&5
16350  (eval $ac_link) 2>&5
16351  ac_status=$?
16352  echo "$as_me:16352: \$? = $ac_status" >&5
16353  (exit "$ac_status"); } &&
16354         { ac_try='test -s "conftest$ac_exeext"'
16355  { (eval echo "$as_me:16355: \"$ac_try\"") >&5
16356  (eval $ac_try) 2>&5
16357  ac_status=$?
16358  echo "$as_me:16358: \$? = $ac_status" >&5
16359  (exit "$ac_status"); }; }; then
16360  eval "$as_ac_var=yes"
16361else
16362  echo "$as_me: failed program was:" >&5
16363cat "conftest.$ac_ext" >&5
16364eval "$as_ac_var=no"
16365fi
16366rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16367fi
16368echo "$as_me:16368: result: `eval echo '${'"$as_ac_var"'}'`" >&5
16369echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
16370if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
16371  cat >>confdefs.h <<EOF
16372#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16373EOF
16374
16375fi
16376done
16377
16378fi
16379
16380echo "$as_me:16380: checking if we can use XkbKeycodeToKeysym" >&5
16381echo $ECHO_N "checking if we can use XkbKeycodeToKeysym... $ECHO_C" >&6
16382if test "${cf_cv_xkb_keycode_to_keysym+set}" = set; then
16383  echo $ECHO_N "(cached) $ECHO_C" >&6
16384else
16385
16386cat >"conftest.$ac_ext" <<_ACEOF
16387#line 16387 "configure"
16388#include "confdefs.h"
16389
16390#include <X11/Xlib.h>
16391#include <X11/XKBlib.h>
16392
16393int
16394main (void)
16395{
16396
16397    KeySym keysym = XkbKeycodeToKeysym((Display *)0, 0, 0, 0);
16398	(void)keysym;
16399
16400  ;
16401  return 0;
16402}
16403_ACEOF
16404rm -f "conftest.$ac_objext"
16405if { (eval echo "$as_me:16405: \"$ac_compile\"") >&5
16406  (eval $ac_compile) 2>&5
16407  ac_status=$?
16408  echo "$as_me:16408: \$? = $ac_status" >&5
16409  (exit "$ac_status"); } &&
16410         { ac_try='test -s "conftest.$ac_objext"'
16411  { (eval echo "$as_me:16411: \"$ac_try\"") >&5
16412  (eval $ac_try) 2>&5
16413  ac_status=$?
16414  echo "$as_me:16414: \$? = $ac_status" >&5
16415  (exit "$ac_status"); }; }; then
16416
16417cf_cv_xkb_keycode_to_keysym=yes
16418
16419else
16420  echo "$as_me: failed program was:" >&5
16421cat "conftest.$ac_ext" >&5
16422
16423cf_cv_xkb_keycode_to_keysym=no
16424
16425fi
16426rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16427
16428fi
16429echo "$as_me:16429: result: $cf_cv_xkb_keycode_to_keysym" >&5
16430echo "${ECHO_T}$cf_cv_xkb_keycode_to_keysym" >&6
16431
16432if test $cf_cv_xkb_keycode_to_keysym = yes
16433then
16434
16435for ac_func in XkbKeycodeToKeysym
16436do
16437as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16438echo "$as_me:16438: checking for $ac_func" >&5
16439echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16440if eval "test \"\${$as_ac_var+set}\" = set"; then
16441  echo $ECHO_N "(cached) $ECHO_C" >&6
16442else
16443  cat >"conftest.$ac_ext" <<_ACEOF
16444#line 16444 "configure"
16445#include "confdefs.h"
16446#define $ac_func autoconf_temporary
16447#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
16448#undef $ac_func
16449
16450#ifdef __cplusplus
16451extern "C"
16452#endif
16453
16454/* We use char because int might match the return type of a gcc2
16455   builtin and then its argument prototype would still apply.  */
16456char $ac_func (void);
16457
16458int
16459main (void)
16460{
16461
16462/* The GNU C library defines stubs for functions which it implements
16463    to always fail with ENOSYS.  Some functions are actually named
16464    something starting with __ and the normal name is an alias.  */
16465#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16466#error found stub for $ac_func
16467#endif
16468
16469	return $ac_func ();
16470  ;
16471  return 0;
16472}
16473_ACEOF
16474rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16475if { (eval echo "$as_me:16475: \"$ac_link\"") >&5
16476  (eval $ac_link) 2>&5
16477  ac_status=$?
16478  echo "$as_me:16478: \$? = $ac_status" >&5
16479  (exit "$ac_status"); } &&
16480         { ac_try='test -s "conftest$ac_exeext"'
16481  { (eval echo "$as_me:16481: \"$ac_try\"") >&5
16482  (eval $ac_try) 2>&5
16483  ac_status=$?
16484  echo "$as_me:16484: \$? = $ac_status" >&5
16485  (exit "$ac_status"); }; }; then
16486  eval "$as_ac_var=yes"
16487else
16488  echo "$as_me: failed program was:" >&5
16489cat "conftest.$ac_ext" >&5
16490eval "$as_ac_var=no"
16491fi
16492rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16493fi
16494echo "$as_me:16494: result: `eval echo '${'"$as_ac_var"'}'`" >&5
16495echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
16496if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
16497  cat >>confdefs.h <<EOF
16498#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16499EOF
16500
16501fi
16502done
16503
16504fi
16505
16506cf_save_LIBS_CF_XKB_BELL_EXT="$LIBS"
16507cf_save_CFLAGS_CF_XKB_BELL_EXT="$CFLAGS"
16508cf_save_CPPFLAGS_CF_XKB_BELL_EXT="$CPPFLAGS"
16509LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
16510for cf_X_CFLAGS in $X_CFLAGS
16511do
16512	case "x$cf_X_CFLAGS" in
16513	x-[IUD]*)
16514		CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
16515		;;
16516	*)
16517		CFLAGS="$CFLAGS $cf_X_CFLAGS"
16518		;;
16519	esac
16520done
16521
16522echo "$as_me:16522: checking for XKB Bell extension" >&5
16523echo $ECHO_N "checking for XKB Bell extension... $ECHO_C" >&6
16524if test "${cf_cv_xkb_bell_ext+set}" = set; then
16525  echo $ECHO_N "(cached) $ECHO_C" >&6
16526else
16527
16528cat >"conftest.$ac_ext" <<_ACEOF
16529#line 16529 "configure"
16530#include "confdefs.h"
16531
16532#include <X11/Intrinsic.h>
16533#include <X11/XKBlib.h>		/* has the prototype */
16534#include <X11/extensions/XKBbells.h>	/* has the XkbBI_xxx definitions */
16535
16536int
16537main (void)
16538{
16539
16540	int x = (XkbBI_Info |XkbBI_MinorError |XkbBI_MajorError |XkbBI_TerminalBell |XkbBI_MarginBell);
16541	Atom y = 0;
16542	(void)x;
16543	XkbBell((Display *)0, (Widget)0, 0, y);
16544
16545  ;
16546  return 0;
16547}
16548_ACEOF
16549rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16550if { (eval echo "$as_me:16550: \"$ac_link\"") >&5
16551  (eval $ac_link) 2>&5
16552  ac_status=$?
16553  echo "$as_me:16553: \$? = $ac_status" >&5
16554  (exit "$ac_status"); } &&
16555         { ac_try='test -s "conftest$ac_exeext"'
16556  { (eval echo "$as_me:16556: \"$ac_try\"") >&5
16557  (eval $ac_try) 2>&5
16558  ac_status=$?
16559  echo "$as_me:16559: \$? = $ac_status" >&5
16560  (exit "$ac_status"); }; }; then
16561  cf_cv_xkb_bell_ext=yes
16562else
16563  echo "$as_me: failed program was:" >&5
16564cat "conftest.$ac_ext" >&5
16565cf_cv_xkb_bell_ext=no
16566fi
16567rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16568
16569fi
16570echo "$as_me:16570: result: $cf_cv_xkb_bell_ext" >&5
16571echo "${ECHO_T}$cf_cv_xkb_bell_ext" >&6
16572test "$cf_cv_xkb_bell_ext" = yes &&
16573cat >>confdefs.h <<\EOF
16574#define HAVE_XKB_BELL_EXT 1
16575EOF
16576
16577LIBS="$cf_save_LIBS_CF_XKB_BELL_EXT"
16578CFLAGS="$cf_save_CFLAGS_CF_XKB_BELL_EXT"
16579CPPFLAGS="$cf_save_CPPFLAGS_CF_XKB_BELL_EXT"
16580
16581for ac_func in Xutf8LookupString
16582do
16583as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16584echo "$as_me:16584: checking for $ac_func" >&5
16585echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16586if eval "test \"\${$as_ac_var+set}\" = set"; then
16587  echo $ECHO_N "(cached) $ECHO_C" >&6
16588else
16589  cat >"conftest.$ac_ext" <<_ACEOF
16590#line 16590 "configure"
16591#include "confdefs.h"
16592#define $ac_func autoconf_temporary
16593#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
16594#undef $ac_func
16595
16596#ifdef __cplusplus
16597extern "C"
16598#endif
16599
16600/* We use char because int might match the return type of a gcc2
16601   builtin and then its argument prototype would still apply.  */
16602char $ac_func (void);
16603
16604int
16605main (void)
16606{
16607
16608/* The GNU C library defines stubs for functions which it implements
16609    to always fail with ENOSYS.  Some functions are actually named
16610    something starting with __ and the normal name is an alias.  */
16611#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16612#error found stub for $ac_func
16613#endif
16614
16615	return $ac_func ();
16616  ;
16617  return 0;
16618}
16619_ACEOF
16620rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16621if { (eval echo "$as_me:16621: \"$ac_link\"") >&5
16622  (eval $ac_link) 2>&5
16623  ac_status=$?
16624  echo "$as_me:16624: \$? = $ac_status" >&5
16625  (exit "$ac_status"); } &&
16626         { ac_try='test -s "conftest$ac_exeext"'
16627  { (eval echo "$as_me:16627: \"$ac_try\"") >&5
16628  (eval $ac_try) 2>&5
16629  ac_status=$?
16630  echo "$as_me:16630: \$? = $ac_status" >&5
16631  (exit "$ac_status"); }; }; then
16632  eval "$as_ac_var=yes"
16633else
16634  echo "$as_me: failed program was:" >&5
16635cat "conftest.$ac_ext" >&5
16636eval "$as_ac_var=no"
16637fi
16638rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16639fi
16640echo "$as_me:16640: result: `eval echo '${'"$as_ac_var"'}'`" >&5
16641echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
16642if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
16643  cat >>confdefs.h <<EOF
16644#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16645EOF
16646
16647else
16648
16649	EXTRAHDRS="$EXTRAHDRS xutf8.h"
16650	EXTRASRCS="$EXTRASRCS xutf8.c"
16651	EXTRAOBJS="$EXTRAOBJS xutf8.o"
16652
16653fi
16654done
16655
16656echo "$as_me:16656: checking if you want narrow prototypes for X libraries" >&5
16657echo $ECHO_N "checking if you want narrow prototypes for X libraries... $ECHO_C" >&6
16658
16659case `$ac_config_guess` in
16660(*freebsd*|*gnu*|*irix5*|*irix6*|*netbsd*|*openbsd*|*qnx*|*sco*|*sgi*)
16661	cf_default_narrowproto=yes
16662	;;
16663(*)
16664	cf_default_narrowproto=no
16665	;;
16666esac
16667
16668# Check whether --enable-narrowproto or --disable-narrowproto was given.
16669if test "${enable_narrowproto+set}" = set; then
16670  enableval="$enable_narrowproto"
16671  test "$enableval" != no && enableval=yes
16672	if test "$enableval" != "$cf_default_narrowproto" ; then
16673    enable_narrowproto=$enableval
16674	else
16675		enable_narrowproto=$cf_default_narrowproto
16676	fi
16677else
16678  enableval=$cf_default_narrowproto
16679	enable_narrowproto=$cf_default_narrowproto
16680
16681fi;
16682echo "$as_me:16682: result: $enable_narrowproto" >&5
16683echo "${ECHO_T}$enable_narrowproto" >&6
16684
16685echo "$as_me:16685: checking if we should use imake to help" >&5
16686echo $ECHO_N "checking if we should use imake to help... $ECHO_C" >&6
16687
16688# Check whether --enable-imake or --disable-imake was given.
16689if test "${enable_imake+set}" = set; then
16690  enableval="$enable_imake"
16691  test "$enableval" != no && enableval=yes
16692	if test "$enableval" != "yes" ; then
16693    enable_imake=no
16694	else
16695		enable_imake=yes
16696	fi
16697else
16698  enableval=yes
16699	enable_imake=yes
16700
16701fi;
16702echo "$as_me:16702: result: $enable_imake" >&5
16703echo "${ECHO_T}$enable_imake" >&6
16704
16705if test "$enable_imake" = yes ; then
16706
16707for ac_prog in xmkmf imake
16708do
16709  # Extract the first word of "$ac_prog", so it can be a program name with args.
16710set dummy $ac_prog; ac_word=$2
16711echo "$as_me:16711: checking for $ac_word" >&5
16712echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
16713if test "${ac_cv_path_IMAKE+set}" = set; then
16714  echo $ECHO_N "(cached) $ECHO_C" >&6
16715else
16716  case $IMAKE in
16717  [\\/]* | ?:[\\/]*)
16718  ac_cv_path_IMAKE="$IMAKE" # Let the user override the test with a path.
16719  ;;
16720  *)
16721  ac_save_IFS=$IFS; IFS=$ac_path_separator
16722ac_dummy="$PATH"
16723for ac_dir in $ac_dummy; do
16724  IFS=$ac_save_IFS
16725  test -z "$ac_dir" && ac_dir=.
16726  if $as_executable_p "$ac_dir/$ac_word"; then
16727   ac_cv_path_IMAKE="$ac_dir/$ac_word"
16728   echo "$as_me:16728: found $ac_dir/$ac_word" >&5
16729   break
16730fi
16731done
16732
16733  ;;
16734esac
16735fi
16736IMAKE=$ac_cv_path_IMAKE
16737
16738if test -n "$IMAKE"; then
16739  echo "$as_me:16739: result: $IMAKE" >&5
16740echo "${ECHO_T}$IMAKE" >&6
16741else
16742  echo "$as_me:16742: result: no" >&5
16743echo "${ECHO_T}no" >&6
16744fi
16745
16746  test -n "$IMAKE" && break
16747done
16748
16749if test -n "$IMAKE" ; then
16750
16751case $IMAKE in
16752(*/imake)
16753	cf_imake_opts="-DUseInstalled=YES"
16754	;;
16755(*/util/xmkmf)
16756	# A single parameter tells xmkmf where the config-files are:
16757	cf_imake_opts="`echo "$IMAKE"|sed -e s,/config/util/xmkmf,,`"
16758	;;
16759(*)
16760	cf_imake_opts=
16761	;;
16762esac
16763
16764# If it's installed properly, imake (or its wrapper, xmkmf) will point to the
16765# config directory.
16766if mkdir conftestdir; then
16767	CDPATH=; export CDPATH
16768	cf_makefile=`cd "$srcdir" || exit;pwd`/Imakefile
16769	cd conftestdir
16770
16771	cat >fix_cflags.sed <<'CF_EOF'
16772s/\\//g
16773s/[ 	][ 	]*/ /g
16774s/"//g
16775:pack
16776s/\(=[^ ][^ ]*\) \([^-]\)/\1	\2/g
16777t pack
16778s/\(-D[a-zA-Z0-9_][a-zA-Z0-9_]*\)=\([^\'0-9 ][^ ]*\)/\1='\\"\2\\"'/g
16779s/^IMAKE[ ]/IMAKE_CFLAGS="/
16780s/	/ /g
16781s/$/"/
16782CF_EOF
16783
16784	cat >fix_lflags.sed <<'CF_EOF'
16785s/^IMAKE[ 	]*/IMAKE_LOADFLAGS="/
16786s/$/"/
16787CF_EOF
16788
16789	echo >./Imakefile
16790	test -f "$cf_makefile" && cat "$cf_makefile" >>./Imakefile
16791
16792	cat >> ./Imakefile <<'CF_EOF'
16793findstddefs:
16794	@echo IMAKE ${ALLDEFINES} $(MAIN_DEFINES) $(VENDORMANDEFS)       | sed -f fix_cflags.sed
16795	@echo IMAKE ${EXTRA_LOAD_FLAGS} | sed -f fix_lflags.sed
16796CF_EOF
16797
16798	if ( $IMAKE "$cf_imake_opts" 1>/dev/null 2>&5 && test -f Makefile)
16799	then
16800		test -n "$verbose" && echo "	Using $IMAKE $cf_imake_opts" 1>&6
16801
16802echo "${as_me:-configure}:16802: testing Using $IMAKE $cf_imake_opts ..." 1>&5
16803
16804	else
16805		# sometimes imake doesn't have the config path compiled in.  Find it.
16806		cf_config=
16807		for cf_libpath in $X_LIBS $LIBS ; do
16808			case "$cf_libpath" in
16809			(-L*)
16810				cf_libpath=`echo ".$cf_libpath" | sed -e 's/^...//'`
16811				cf_libpath="$cf_libpath/X11/config"
16812				if test -d "$cf_libpath" ; then
16813					cf_config="$cf_libpath"
16814					break
16815				fi
16816				;;
16817			esac
16818		done
16819		if test -z "$cf_config" ; then
16820			{ echo "$as_me:16820: WARNING: Could not find imake config-directory" >&5
16821echo "$as_me: WARNING: Could not find imake config-directory" >&2;}
16822		else
16823			cf_imake_opts="$cf_imake_opts -I$cf_config"
16824			if ( "$IMAKE" -v "$cf_imake_opts" 2>&5)
16825			then
16826				test -n "$verbose" && echo "	Using $IMAKE $cf_config" 1>&6
16827
16828echo "${as_me:-configure}:16828: testing Using $IMAKE $cf_config ..." 1>&5
16829
16830			else
16831				{ echo "$as_me:16831: WARNING: Cannot run $IMAKE" >&5
16832echo "$as_me: WARNING: Cannot run $IMAKE" >&2;}
16833			fi
16834		fi
16835	fi
16836
16837	# GNU make sometimes prints "make[1]: Entering...", which
16838	# would confuse us.
16839	eval "`make findstddefs 2>/dev/null | grep -v make`"
16840
16841	cd ..
16842	rm -rf conftestdir
16843
16844	# We use ${ALLDEFINES} rather than ${STD_DEFINES} because the former
16845	# declares XTFUNCPROTO there.  However, some vendors (e.g., SGI) have
16846	# modified it to support site.cf, adding a kludge for the /usr/include
16847	# directory.  Try to filter that out, otherwise gcc won't find its
16848	# headers.
16849	if test -n "$GCC" ; then
16850	    if test -n "$IMAKE_CFLAGS" ; then
16851		cf_nostdinc=""
16852		cf_std_incl=""
16853		cf_cpp_opts=""
16854		for cf_opt in $IMAKE_CFLAGS
16855		do
16856		    case "$cf_opt" in
16857		    (-nostdinc)
16858			cf_nostdinc="$cf_opt"
16859			;;
16860		    (-I/usr/include)
16861			cf_std_incl="$cf_opt"
16862			;;
16863		    (*)
16864			cf_cpp_opts="$cf_cpp_opts $cf_opt"
16865			;;
16866		    esac
16867		done
16868		if test -z "$cf_nostdinc" ; then
16869		    IMAKE_CFLAGS="$cf_cpp_opts $cf_std_incl"
16870		elif test -z "$cf_std_incl" ; then
16871		    IMAKE_CFLAGS="$cf_cpp_opts $cf_nostdinc"
16872		else
16873		    test -n "$verbose" && echo "	suppressed \"$cf_nostdinc\" and \"$cf_std_incl\"" 1>&6
16874
16875echo "${as_me:-configure}:16875: testing suppressed \"$cf_nostdinc\" and \"$cf_std_incl\" ..." 1>&5
16876
16877		    IMAKE_CFLAGS="$cf_cpp_opts"
16878		fi
16879	    fi
16880	fi
16881fi
16882
16883# Some imake configurations define PROJECTROOT with an empty value.  Remove
16884# the empty definition.
16885case $IMAKE_CFLAGS in
16886(*-DPROJECTROOT=/*)
16887	;;
16888(*)
16889	IMAKE_CFLAGS=`echo "$IMAKE_CFLAGS" |sed -e "s,-DPROJECTROOT=[ 	], ,"`
16890	;;
16891esac
16892
16893fi
16894
16895test -n "$verbose" && echo "	IMAKE_CFLAGS $IMAKE_CFLAGS" 1>&6
16896
16897echo "${as_me:-configure}:16897: testing IMAKE_CFLAGS $IMAKE_CFLAGS ..." 1>&5
16898
16899test -n "$verbose" && echo "	IMAKE_LOADFLAGS $IMAKE_LOADFLAGS" 1>&6
16900
16901echo "${as_me:-configure}:16901: testing IMAKE_LOADFLAGS $IMAKE_LOADFLAGS ..." 1>&5
16902
16903fi
16904
16905if test -n "$IMAKE" && test -n "$IMAKE_CFLAGS" ; then
16906
16907cf_fix_cppflags=no
16908cf_new_cflags=
16909cf_new_cppflags=
16910cf_new_extra_cppflags=
16911
16912for cf_add_cflags in $IMAKE_CFLAGS
16913do
16914case "$cf_fix_cppflags" in
16915(no)
16916	case "$cf_add_cflags" in
16917	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16918		case "$cf_add_cflags" in
16919		(-D*)
16920			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16921
16922			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16923				&& test -z "${cf_tst_cflags}" \
16924				&& cf_fix_cppflags=yes
16925
16926			if test "$cf_fix_cppflags" = yes ; 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			elif test "${cf_tst_cflags}" = "\"'" ; then
16933
16934	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16935	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16936
16937				continue
16938			fi
16939			;;
16940		esac
16941		case "$CPPFLAGS" in
16942		(*$cf_add_cflags)
16943			;;
16944		(*)
16945			case "$cf_add_cflags" in
16946			(-D*)
16947				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16948
16949CPPFLAGS=`echo "$CPPFLAGS" | \
16950	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
16951		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
16952
16953				;;
16954			esac
16955
16956	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16957	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16958
16959			;;
16960		esac
16961		;;
16962	(*)
16963
16964	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16965	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16966
16967		;;
16968	esac
16969	;;
16970(yes)
16971
16972	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16973	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16974
16975	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
16976
16977	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16978		&& test -z "${cf_tst_cflags}" \
16979		&& cf_fix_cppflags=no
16980	;;
16981esac
16982done
16983
16984if test -n "$cf_new_cflags" ; then
16985
16986	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16987	CFLAGS="${CFLAGS}$cf_new_cflags"
16988
16989fi
16990
16991if test -n "$cf_new_cppflags" ; then
16992
16993	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16994	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16995
16996fi
16997
16998if test -n "$cf_new_extra_cppflags" ; then
16999
17000	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
17001	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
17002
17003fi
17004
17005else
17006	IMAKE_CFLAGS=
17007	IMAKE_LOADFLAGS=
17008	test -n "$verbose" && echo "	make fallback definitions" 1>&6
17009
17010echo "${as_me:-configure}:17010: testing make fallback definitions ..." 1>&5
17011
17012	# We prefer config.guess' values when we can get them, to avoid
17013	# inconsistent results with uname (AIX for instance).  However,
17014	# config.guess is not always consistent either.
17015	case $host_os in
17016	(*[0-9].[0-9]*)
17017		UNAME_RELEASE="$host_os"
17018		;;
17019	(*)
17020		UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
17021		;;
17022	esac
17023
17024	case .$UNAME_RELEASE in
17025	(*[0-9].[0-9]*)
17026		OSMAJORVERSION=`echo "$UNAME_RELEASE" |sed -e 's/^[^0-9]*//' -e 's/\..*//'`
17027		OSMINORVERSION=`echo "$UNAME_RELEASE" |sed -e 's/^[^0-9]*//' -e 's/^[^.]*\.//' -e 's/\..*//' -e 's/[^0-9].*//' `
17028		test -z "$OSMAJORVERSION" && OSMAJORVERSION=1
17029		test -z "$OSMINORVERSION" && OSMINORVERSION=0
17030		IMAKE_CFLAGS="-DOSMAJORVERSION=$OSMAJORVERSION -DOSMINORVERSION=$OSMINORVERSION $IMAKE_CFLAGS"
17031		;;
17032	esac
17033
17034	# FUNCPROTO is standard with X11R6, but XFree86 drops it, leaving some
17035	# fallback/fragments for NeedPrototypes, etc.
17036	IMAKE_CFLAGS="-DFUNCPROTO=15 $IMAKE_CFLAGS"
17037
17038	# If this is not set properly, Xaw's scrollbars will not work
17039	if test "$enable_narrowproto" = yes ; then
17040		IMAKE_CFLAGS="-DNARROWPROTO=1 $IMAKE_CFLAGS"
17041	fi
17042
17043	# Other special definitions:
17044	case $host_os in
17045	(aix*)
17046		# imake on AIX 5.1 defines AIXV3.  really.
17047		IMAKE_CFLAGS="-DAIXV3 -DAIXV4 $IMAKE_CFLAGS"
17048		;;
17049	(irix[56].*)
17050		# these are needed to make SIGWINCH work in xterm
17051		IMAKE_CFLAGS="-DSYSV -DSVR4 $IMAKE_CFLAGS"
17052		;;
17053	esac
17054
17055cf_fix_cppflags=no
17056cf_new_cflags=
17057cf_new_cppflags=
17058cf_new_extra_cppflags=
17059
17060for cf_add_cflags in $IMAKE_CFLAGS
17061do
17062case "$cf_fix_cppflags" in
17063(no)
17064	case "$cf_add_cflags" in
17065	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17066		case "$cf_add_cflags" in
17067		(-D*)
17068			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17069
17070			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17071				&& test -z "${cf_tst_cflags}" \
17072				&& cf_fix_cppflags=yes
17073
17074			if test "$cf_fix_cppflags" = yes ; 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			elif test "${cf_tst_cflags}" = "\"'" ; then
17081
17082	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17083	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17084
17085				continue
17086			fi
17087			;;
17088		esac
17089		case "$CPPFLAGS" in
17090		(*$cf_add_cflags)
17091			;;
17092		(*)
17093			case "$cf_add_cflags" in
17094			(-D*)
17095				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17096
17097CPPFLAGS=`echo "$CPPFLAGS" | \
17098	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
17099		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
17100
17101				;;
17102			esac
17103
17104	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
17105	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
17106
17107			;;
17108		esac
17109		;;
17110	(*)
17111
17112	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
17113	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
17114
17115		;;
17116	esac
17117	;;
17118(yes)
17119
17120	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17121	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17122
17123	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
17124
17125	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17126		&& test -z "${cf_tst_cflags}" \
17127		&& cf_fix_cppflags=no
17128	;;
17129esac
17130done
17131
17132if test -n "$cf_new_cflags" ; then
17133
17134	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17135	CFLAGS="${CFLAGS}$cf_new_cflags"
17136
17137fi
17138
17139if test -n "$cf_new_cppflags" ; then
17140
17141	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17142	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
17143
17144fi
17145
17146if test -n "$cf_new_extra_cppflags" ; then
17147
17148	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
17149	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
17150
17151fi
17152
17153fi
17154
17155# Extract the first word of "groff", so it can be a program name with args.
17156set dummy groff; ac_word=$2
17157echo "$as_me:17157: checking for $ac_word" >&5
17158echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
17159if test "${ac_cv_path_GROFF_PATH+set}" = set; then
17160  echo $ECHO_N "(cached) $ECHO_C" >&6
17161else
17162  case $GROFF_PATH in
17163  [\\/]* | ?:[\\/]*)
17164  ac_cv_path_GROFF_PATH="$GROFF_PATH" # Let the user override the test with a path.
17165  ;;
17166  *)
17167  ac_save_IFS=$IFS; IFS=$ac_path_separator
17168ac_dummy="$PATH"
17169for ac_dir in $ac_dummy; do
17170  IFS=$ac_save_IFS
17171  test -z "$ac_dir" && ac_dir=.
17172  if $as_executable_p "$ac_dir/$ac_word"; then
17173   ac_cv_path_GROFF_PATH="$ac_dir/$ac_word"
17174   echo "$as_me:17174: found $ac_dir/$ac_word" >&5
17175   break
17176fi
17177done
17178
17179  test -z "$ac_cv_path_GROFF_PATH" && ac_cv_path_GROFF_PATH="no"
17180  ;;
17181esac
17182fi
17183GROFF_PATH=$ac_cv_path_GROFF_PATH
17184
17185if test -n "$GROFF_PATH"; then
17186  echo "$as_me:17186: result: $GROFF_PATH" >&5
17187echo "${ECHO_T}$GROFF_PATH" >&6
17188else
17189  echo "$as_me:17189: result: no" >&5
17190echo "${ECHO_T}no" >&6
17191fi
17192
17193for ac_prog in nroff mandoc
17194do
17195  # Extract the first word of "$ac_prog", so it can be a program name with args.
17196set dummy $ac_prog; ac_word=$2
17197echo "$as_me:17197: checking for $ac_word" >&5
17198echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
17199if test "${ac_cv_path_NROFF_PATH+set}" = set; then
17200  echo $ECHO_N "(cached) $ECHO_C" >&6
17201else
17202  case $NROFF_PATH in
17203  [\\/]* | ?:[\\/]*)
17204  ac_cv_path_NROFF_PATH="$NROFF_PATH" # Let the user override the test with a path.
17205  ;;
17206  *)
17207  ac_save_IFS=$IFS; IFS=$ac_path_separator
17208ac_dummy="$PATH"
17209for ac_dir in $ac_dummy; do
17210  IFS=$ac_save_IFS
17211  test -z "$ac_dir" && ac_dir=.
17212  if $as_executable_p "$ac_dir/$ac_word"; then
17213   ac_cv_path_NROFF_PATH="$ac_dir/$ac_word"
17214   echo "$as_me:17214: found $ac_dir/$ac_word" >&5
17215   break
17216fi
17217done
17218
17219  ;;
17220esac
17221fi
17222NROFF_PATH=$ac_cv_path_NROFF_PATH
17223
17224if test -n "$NROFF_PATH"; then
17225  echo "$as_me:17225: result: $NROFF_PATH" >&5
17226echo "${ECHO_T}$NROFF_PATH" >&6
17227else
17228  echo "$as_me:17228: result: no" >&5
17229echo "${ECHO_T}no" >&6
17230fi
17231
17232  test -n "$NROFF_PATH" && break
17233done
17234test -n "$NROFF_PATH" || NROFF_PATH="no"
17235
17236# Extract the first word of "tbl", so it can be a program name with args.
17237set dummy tbl; ac_word=$2
17238echo "$as_me:17238: checking for $ac_word" >&5
17239echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
17240if test "${ac_cv_path_TBL_PATH+set}" = set; then
17241  echo $ECHO_N "(cached) $ECHO_C" >&6
17242else
17243  case $TBL_PATH in
17244  [\\/]* | ?:[\\/]*)
17245  ac_cv_path_TBL_PATH="$TBL_PATH" # Let the user override the test with a path.
17246  ;;
17247  *)
17248  ac_save_IFS=$IFS; IFS=$ac_path_separator
17249ac_dummy="$PATH"
17250for ac_dir in $ac_dummy; do
17251  IFS=$ac_save_IFS
17252  test -z "$ac_dir" && ac_dir=.
17253  if $as_executable_p "$ac_dir/$ac_word"; then
17254   ac_cv_path_TBL_PATH="$ac_dir/$ac_word"
17255   echo "$as_me:17255: found $ac_dir/$ac_word" >&5
17256   break
17257fi
17258done
17259
17260  test -z "$ac_cv_path_TBL_PATH" && ac_cv_path_TBL_PATH="cat"
17261  ;;
17262esac
17263fi
17264TBL_PATH=$ac_cv_path_TBL_PATH
17265
17266if test -n "$TBL_PATH"; then
17267  echo "$as_me:17267: result: $TBL_PATH" >&5
17268echo "${ECHO_T}$TBL_PATH" >&6
17269else
17270  echo "$as_me:17270: result: no" >&5
17271echo "${ECHO_T}no" >&6
17272fi
17273
17274if test "x$GROFF_PATH" = xno
17275then
17276	NROFF_NOTE=
17277	GROFF_NOTE="#"
17278else
17279	NROFF_NOTE="#"
17280	GROFF_NOTE=
17281fi
17282
17283echo "$as_me:17283: checking for fgrep" >&5
17284echo $ECHO_N "checking for fgrep... $ECHO_C" >&6
17285if test "${ac_cv_path_FGREP+set}" = set; then
17286  echo $ECHO_N "(cached) $ECHO_C" >&6
17287else
17288  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
17289   then ac_cv_path_FGREP="$GREP -F"
17290   else
17291     for ac_prog in gfgrep fgrep
17292do
17293  # Extract the first word of "$ac_prog", so it can be a program name with args.
17294set dummy $ac_prog; ac_word=$2
17295echo "$as_me:17295: checking for $ac_word" >&5
17296echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
17297if test "${ac_cv_path_FGREP+set}" = set; then
17298  echo $ECHO_N "(cached) $ECHO_C" >&6
17299else
17300  case $FGREP in
17301  [\\/]* | ?:[\\/]*)
17302  ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
17303  ;;
17304  *)
17305  ac_save_IFS=$IFS; IFS=$ac_path_separator
17306ac_dummy="$PATH"
17307for ac_dir in $ac_dummy; do
17308  IFS=$ac_save_IFS
17309  test -z "$ac_dir" && ac_dir=.
17310  if $as_executable_p "$ac_dir/$ac_word"; then
17311   ac_cv_path_FGREP="$ac_dir/$ac_word"
17312   echo "$as_me:17312: found $ac_dir/$ac_word" >&5
17313   break
17314fi
17315done
17316
17317  ;;
17318esac
17319fi
17320FGREP=$ac_cv_path_FGREP
17321
17322if test -n "$FGREP"; then
17323  echo "$as_me:17323: result: $FGREP" >&5
17324echo "${ECHO_T}$FGREP" >&6
17325else
17326  echo "$as_me:17326: result: no" >&5
17327echo "${ECHO_T}no" >&6
17328fi
17329
17330  test -n "$FGREP" && break
17331done
17332test -n "$FGREP" || FGREP=": "
17333
17334     test "x$ac_cv_path_FGREP" = "x:" && { { echo "$as_me:17334: error: cannot find workable fgrep" >&5
17335echo "$as_me: error: cannot find workable fgrep" >&2;}
17336   { (exit 1); exit 1; }; }
17337   fi
17338fi
17339echo "$as_me:17339: result: $ac_cv_path_FGREP" >&5
17340echo "${ECHO_T}$ac_cv_path_FGREP" >&6
17341 FGREP="$ac_cv_path_FGREP"
17342
17343case "x${with_man2html}" in
17344(xno)
17345	cf_man2html=no
17346	;;
17347(x|xyes)
17348	# Extract the first word of "man2html", so it can be a program name with args.
17349set dummy man2html; ac_word=$2
17350echo "$as_me:17350: checking for $ac_word" >&5
17351echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
17352if test "${ac_cv_path_cf_man2html+set}" = set; then
17353  echo $ECHO_N "(cached) $ECHO_C" >&6
17354else
17355  case $cf_man2html in
17356  [\\/]* | ?:[\\/]*)
17357  ac_cv_path_cf_man2html="$cf_man2html" # Let the user override the test with a path.
17358  ;;
17359  *)
17360  ac_save_IFS=$IFS; IFS=$ac_path_separator
17361ac_dummy="$PATH"
17362for ac_dir in $ac_dummy; do
17363  IFS=$ac_save_IFS
17364  test -z "$ac_dir" && ac_dir=.
17365  if $as_executable_p "$ac_dir/$ac_word"; then
17366   ac_cv_path_cf_man2html="$ac_dir/$ac_word"
17367   echo "$as_me:17367: found $ac_dir/$ac_word" >&5
17368   break
17369fi
17370done
17371
17372  test -z "$ac_cv_path_cf_man2html" && ac_cv_path_cf_man2html="no"
17373  ;;
17374esac
17375fi
17376cf_man2html=$ac_cv_path_cf_man2html
17377
17378if test -n "$cf_man2html"; then
17379  echo "$as_me:17379: result: $cf_man2html" >&5
17380echo "${ECHO_T}$cf_man2html" >&6
17381else
17382  echo "$as_me:17382: result: no" >&5
17383echo "${ECHO_T}no" >&6
17384fi
17385
17386	case "x$cf_man2html" in
17387	(x/*)
17388		echo "$as_me:17388: checking for the modified Earl Hood script" >&5
17389echo $ECHO_N "checking for the modified Earl Hood script... $ECHO_C" >&6
17390		if ( $cf_man2html -help 2>&1 | grep 'Make an index of headers at the end' >/dev/null )
17391		then
17392			cf_man2html_ok=yes
17393		else
17394			cf_man2html=no
17395			cf_man2html_ok=no
17396		fi
17397		echo "$as_me:17397: result: $cf_man2html_ok" >&5
17398echo "${ECHO_T}$cf_man2html_ok" >&6
17399		;;
17400	(*)
17401		cf_man2html=no
17402		;;
17403	esac
17404esac
17405
17406echo "$as_me:17406: checking for program to convert manpage to html" >&5
17407echo $ECHO_N "checking for program to convert manpage to html... $ECHO_C" >&6
17408
17409# Check whether --with-man2html or --without-man2html was given.
17410if test "${with_man2html+set}" = set; then
17411  withval="$with_man2html"
17412  cf_man2html=$withval
17413else
17414  cf_man2html=$cf_man2html
17415fi;
17416
17417cf_with_groff=no
17418
17419case $cf_man2html in
17420(yes)
17421	echo "$as_me:17421: result: man2html" >&5
17422echo "${ECHO_T}man2html" >&6
17423	# Extract the first word of "man2html", so it can be a program name with args.
17424set dummy man2html; ac_word=$2
17425echo "$as_me:17425: checking for $ac_word" >&5
17426echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
17427if test "${ac_cv_path_cf_man2html+set}" = set; then
17428  echo $ECHO_N "(cached) $ECHO_C" >&6
17429else
17430  case $cf_man2html in
17431  [\\/]* | ?:[\\/]*)
17432  ac_cv_path_cf_man2html="$cf_man2html" # Let the user override the test with a path.
17433  ;;
17434  *)
17435  ac_save_IFS=$IFS; IFS=$ac_path_separator
17436ac_dummy="$PATH"
17437for ac_dir in $ac_dummy; do
17438  IFS=$ac_save_IFS
17439  test -z "$ac_dir" && ac_dir=.
17440  if $as_executable_p "$ac_dir/$ac_word"; then
17441   ac_cv_path_cf_man2html="$ac_dir/$ac_word"
17442   echo "$as_me:17442: found $ac_dir/$ac_word" >&5
17443   break
17444fi
17445done
17446
17447  test -z "$ac_cv_path_cf_man2html" && ac_cv_path_cf_man2html="no"
17448  ;;
17449esac
17450fi
17451cf_man2html=$ac_cv_path_cf_man2html
17452
17453if test -n "$cf_man2html"; then
17454  echo "$as_me:17454: result: $cf_man2html" >&5
17455echo "${ECHO_T}$cf_man2html" >&6
17456else
17457  echo "$as_me:17457: result: no" >&5
17458echo "${ECHO_T}no" >&6
17459fi
17460
17461	;;
17462(no|groff|*/groff*)
17463	cf_with_groff=yes
17464	cf_man2html=$GROFF_PATH
17465	echo "$as_me:17465: result: $cf_man2html" >&5
17466echo "${ECHO_T}$cf_man2html" >&6
17467	;;
17468(*)
17469	echo "$as_me:17469: result: $cf_man2html" >&5
17470echo "${ECHO_T}$cf_man2html" >&6
17471	;;
17472esac
17473
17474MAN2HTML_TEMP="man2html.tmp"
17475	cat >$MAN2HTML_TEMP <<CF_EOF
17476#!$SHELL
17477# Temporary script generated by CF_WITH_MAN2HTML
17478# Convert inputs to html, sending result to standard output.
17479#
17480# Parameters:
17481# \${1} = rootname of file to convert
17482# \${2} = suffix of file to convert, e.g., "1"
17483# \${3} = macros to use, e.g., "man"
17484#
17485ROOT=\$1
17486TYPE=\$2
17487MACS=\$3
17488
17489unset LANG
17490unset LC_ALL
17491unset LC_CTYPE
17492unset LANGUAGE
17493GROFF_NO_SGR=stupid
17494export GROFF_NO_SGR
17495
17496CF_EOF
17497
17498NROFF_OPTS=
17499if test "x$cf_with_groff" = xyes
17500then
17501	MAN2HTML_NOTE="$GROFF_NOTE"
17502	MAN2HTML_PATH="$GROFF_PATH"
17503	cat >>$MAN2HTML_TEMP <<CF_EOF
17504$SHELL -c "$TBL_PATH \${ROOT}.\${TYPE} | $GROFF_PATH -P -o0 -I\${ROOT}_ -Thtml -\${MACS}"
17505CF_EOF
17506else
17507	# disable hyphenation if this is groff
17508	if test "x$GROFF_PATH" != xno
17509	then
17510		echo "$as_me:17510: checking if nroff is really groff" >&5
17511echo $ECHO_N "checking if nroff is really groff... $ECHO_C" >&6
17512		cf_check_groff="`$NROFF_PATH --version 2>/dev/null | grep groff`"
17513		test -n "$cf_check_groff" && cf_check_groff=yes
17514		test -n "$cf_check_groff" || cf_check_groff=no
17515		echo "$as_me:17515: result: $cf_check_groff" >&5
17516echo "${ECHO_T}$cf_check_groff" >&6
17517		test "x$cf_check_groff" = xyes && NROFF_OPTS="-rHY=0"
17518	fi
17519	MAN2HTML_NOTE=""
17520
17521if test "x$prefix" != xNONE; then
17522	cf_path_syntax="$prefix"
17523else
17524	cf_path_syntax="$ac_default_prefix"
17525fi
17526
17527case ".$cf_man2html" in
17528(.\$\(*\)*|.\'*\'*)
17529	;;
17530(..|./*|.\\*)
17531	;;
17532(.[a-zA-Z]:[\\/]*) # OS/2 EMX
17533	;;
17534(.\$\{*prefix\}*|.\$\{*dir\}*)
17535	eval cf_man2html="$cf_man2html"
17536	case ".$cf_man2html" in
17537	(.NONE/*)
17538		cf_man2html=`echo "$cf_man2html" | sed -e s%NONE%$cf_path_syntax%`
17539		;;
17540	esac
17541	;;
17542(.no|.NONE/*)
17543	cf_man2html=`echo "$cf_man2html" | sed -e s%NONE%$cf_path_syntax%`
17544	;;
17545(*)
17546	{ { echo "$as_me:17546: error: expected a pathname, not \"$cf_man2html\"" >&5
17547echo "$as_me: error: expected a pathname, not \"$cf_man2html\"" >&2;}
17548   { (exit 1); exit 1; }; }
17549	;;
17550esac
17551
17552	MAN2HTML_PATH="$cf_man2html"
17553	echo "$as_me:17553: checking for $cf_man2html top/bottom margins" >&5
17554echo $ECHO_N "checking for $cf_man2html top/bottom margins... $ECHO_C" >&6
17555
17556	# for this example, expect 3 lines of content, the remainder is head/foot
17557	cat >conftest.in <<CF_EOF
17558.TH HEAD1 HEAD2 HEAD3 HEAD4 HEAD5
17559.SH SECTION
17560MARKER
17561CF_EOF
17562
17563	LC_ALL=C LC_CTYPE=C LANG=C LANGUAGE=C $NROFF_PATH -man conftest.in >conftest.out
17564
17565	cf_man2html_1st="`${FGREP-fgrep} -n MARKER conftest.out |sed -e 's/^[^0-9]*://' -e 's/:.*//'`"
17566	cf_man2html_top=`expr "$cf_man2html_1st" - 2`
17567	cf_man2html_bot="`wc -l conftest.out |sed -e 's/[^0-9]//g'`"
17568	cf_man2html_bot=`expr "$cf_man2html_bot" - 2 - "$cf_man2html_top"`
17569	cf_man2html_top_bot="-topm=$cf_man2html_top -botm=$cf_man2html_bot"
17570
17571	echo "$as_me:17571: result: $cf_man2html_top_bot" >&5
17572echo "${ECHO_T}$cf_man2html_top_bot" >&6
17573
17574	echo "$as_me:17574: checking for pagesize to use" >&5
17575echo $ECHO_N "checking for pagesize to use... $ECHO_C" >&6
17576	for cf_block in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
17577	do
17578	cat >>conftest.in <<CF_EOF
17579.nf
175800
175811
175822
175833
175844
175855
175866
175877
175888
175899
17590CF_EOF
17591	done
17592
17593	LC_ALL=C LC_CTYPE=C LANG=C LANGUAGE=C $NROFF_PATH -man conftest.in >conftest.out
17594	cf_man2html_page="`${FGREP-fgrep} -n HEAD1 conftest.out |sed -n '$p' |sed -e 's/^[^0-9]*://' -e 's/:.*//'`"
17595	test -z "$cf_man2html_page" && cf_man2html_page=99999
17596	test "$cf_man2html_page" -gt 100 && cf_man2html_page=99999
17597
17598	rm -rf conftest*
17599	echo "$as_me:17599: result: $cf_man2html_page" >&5
17600echo "${ECHO_T}$cf_man2html_page" >&6
17601
17602	cat >>$MAN2HTML_TEMP <<CF_EOF
17603: \${MAN2HTML_PATH=$MAN2HTML_PATH}
17604MAN2HTML_OPTS="\$MAN2HTML_OPTS -index -title=\"\$ROOT(\$TYPE)\" -compress -pgsize $cf_man2html_page"
17605case \${TYPE} in
17606(ms)
17607	$TBL_PATH \${ROOT}.\${TYPE} | $NROFF_PATH $NROFF_OPTS -\${MACS} | \$MAN2HTML_PATH -topm=0 -botm=0 \$MAN2HTML_OPTS
17608	;;
17609(*)
17610	$TBL_PATH \${ROOT}.\${TYPE} | $NROFF_PATH $NROFF_OPTS -\${MACS} | \$MAN2HTML_PATH $cf_man2html_top_bot \$MAN2HTML_OPTS
17611	;;
17612esac
17613CF_EOF
17614fi
17615
17616chmod 700 $MAN2HTML_TEMP
17617
17618# If we have already established that there is a full termcap implementation,
17619# suppress the definitions for terminfo that we make have imported from the
17620# imake-file.
17621if test "x$cf_cv_lib_tgetent" != xno || test "x$cf_cv_lib_part_tgetent" != xno ; then
17622	case "$IMAKE_CFLAGS" in
17623	(*-DUSE_TERMINFO\ -DHAVE_TIGETSTR*)
17624
17625	test -n "$verbose" && echo "	removing terminfo flags from IMAKE_CFLAGS" 1>&6
17626
17627echo "${as_me:-configure}:17627: testing removing terminfo flags from IMAKE_CFLAGS ..." 1>&5
17628
17629	IMAKE_CFLAGS=`echo "$IMAKE_CFLAGS" | sed -e 's/-DUSE_TERMINFO[ 	]*-DHAVE_TIGETSTR[ 	]*//'`
17630	test -n "$verbose" && echo "	...result $IMAKE_CFLAGS" 1>&6
17631
17632echo "${as_me:-configure}:17632: testing ...result $IMAKE_CFLAGS ..." 1>&5
17633
17634	test -n "$verbose" && echo "	removing terminfo flags from CPPFLAGS" 1>&6
17635
17636echo "${as_me:-configure}:17636: testing removing terminfo flags from CPPFLAGS ..." 1>&5
17637
17638	CPPFLAGS=`echo "$CPPFLAGS" | sed -e 's/-DUSE_TERMINFO[ 	]*-DHAVE_TIGETSTR[ 	]*//'`
17639	test -n "$verbose" && echo "	...result $CPPFLAGS" 1>&6
17640
17641echo "${as_me:-configure}:17641: testing ...result $CPPFLAGS ..." 1>&5
17642
17643		;;
17644	esac
17645fi
17646
17647echo "$as_me:17647: checking for default terminal-id" >&5
17648echo $ECHO_N "checking for default terminal-id... $ECHO_C" >&6
17649
17650# Check whether --with-terminal-id or --without-terminal-id was given.
17651if test "${with_terminal_id+set}" = set; then
17652  withval="$with_terminal_id"
17653  default_termid=$withval
17654else
17655  default_termid=vt420
17656fi;
17657echo "$as_me:17657: result: $default_termid" >&5
17658echo "${ECHO_T}$default_termid" >&6
17659case $default_termid in
17660(vt*)	default_termid=`echo $default_termid | sed -e 's/^..//'`
17661	;;
17662esac
17663
17664cat >>confdefs.h <<EOF
17665#define DFT_DECID "$default_termid"
17666EOF
17667
17668echo "$as_me:17668: checking for default terminal-type" >&5
17669echo $ECHO_N "checking for default terminal-type... $ECHO_C" >&6
17670
17671# Check whether --with-terminal-type or --without-terminal-type was given.
17672if test "${with_terminal_type+set}" = set; then
17673  withval="$with_terminal_type"
17674  default_TERM=$withval
17675else
17676  default_TERM=xterm
17677fi;
17678echo "$as_me:17678: result: $default_TERM" >&5
17679echo "${ECHO_T}$default_TERM" >&6
17680
17681cat >>confdefs.h <<EOF
17682#define DFT_TERMTYPE "$default_TERM"
17683EOF
17684
17685###############################################################################
17686echo "$as_me:17686: checking if backarrow-key should be BS" >&5
17687echo $ECHO_N "checking if backarrow-key should be BS... $ECHO_C" >&6
17688
17689# Check whether --enable-backarrow-key or --disable-backarrow-key was given.
17690if test "${enable_backarrow_key+set}" = set; then
17691  enableval="$enable_backarrow_key"
17692  test "$enableval" != no && enableval=yes
17693	if test "$enableval" != "yes" ; then
17694    backarrow_is_bs=$enableval
17695	else
17696		backarrow_is_bs=yes
17697	fi
17698else
17699  enableval=yes
17700	backarrow_is_bs=yes
17701
17702fi;
17703
17704echo "$as_me:17704: result: $backarrow_is_bs" >&5
17705echo "${ECHO_T}$backarrow_is_bs" >&6
17706case $backarrow_is_bs in
17707(yes)
17708	backarrow_is_bs=true
17709	;;
17710(no)
17711	backarrow_is_bs=false
17712	;;
17713esac
17714cf_xbool1=`echo "$backarrow_is_bs"|sed -e 's/^\(.\).*/\1/'`
17715
17716cf_xbool1=`echo "$cf_xbool1" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17717
17718cf_xbool2=`echo "$backarrow_is_bs"|sed -e 's/^.//'`
17719backarrow_is_bs=${cf_xbool1}${cf_xbool2}
17720
17721cat >>confdefs.h <<EOF
17722#define DEF_BACKARO_BS $backarrow_is_bs
17723EOF
17724
17725echo "$as_me:17725: checking if backarrow-key should be treated as erase" >&5
17726echo $ECHO_N "checking if backarrow-key should be treated as erase... $ECHO_C" >&6
17727
17728# Check whether --enable-backarrow-is-erase or --disable-backarrow-is-erase was given.
17729if test "${enable_backarrow_is_erase+set}" = set; then
17730  enableval="$enable_backarrow_is_erase"
17731  test "$enableval" != yes && enableval=no
17732	if test "$enableval" != "no" ; then
17733    backarrow_is_erase=$enableval
17734	else
17735		backarrow_is_erase=no
17736	fi
17737else
17738  enableval=no
17739	backarrow_is_erase=no
17740
17741fi;
17742
17743echo "$as_me:17743: result: $backarrow_is_erase" >&5
17744echo "${ECHO_T}$backarrow_is_erase" >&6
17745case $backarrow_is_erase in
17746(yes)
17747	backarrow_is_erase=true
17748	;;
17749(no)
17750	backarrow_is_erase=false
17751	;;
17752esac
17753cf_xbool1=`echo "$backarrow_is_erase"|sed -e 's/^\(.\).*/\1/'`
17754
17755cf_xbool1=`echo "$cf_xbool1" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17756
17757cf_xbool2=`echo "$backarrow_is_erase"|sed -e 's/^.//'`
17758backarrow_is_erase=${cf_xbool1}${cf_xbool2}
17759
17760cat >>confdefs.h <<EOF
17761#define DEF_BACKARO_ERASE $backarrow_is_erase
17762EOF
17763
17764echo "$as_me:17764: checking for default backspace/DEL setting" >&5
17765echo $ECHO_N "checking for default backspace/DEL setting... $ECHO_C" >&6
17766
17767# Check whether --enable-delete-is-del or --disable-delete-is-del was given.
17768if test "${enable_delete_is_del+set}" = set; then
17769  enableval="$enable_delete_is_del"
17770  delete_is_del=$enableval
17771else
17772  delete_is_del=maybe
17773fi;
17774
17775echo "$as_me:17775: result: $delete_is_del" >&5
17776echo "${ECHO_T}$delete_is_del" >&6
17777case $delete_is_del in
17778(yes)
17779	delete_is_del=true
17780	;;
17781(no)
17782	delete_is_del=false
17783	;;
17784esac
17785cf_xbool1=`echo "$delete_is_del"|sed -e 's/^\(.\).*/\1/'`
17786
17787cf_xbool1=`echo "$cf_xbool1" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17788
17789cf_xbool2=`echo "$delete_is_del"|sed -e 's/^.//'`
17790delete_is_del=${cf_xbool1}${cf_xbool2}
17791
17792cat >>confdefs.h <<EOF
17793#define DEFDELETE_DEL $delete_is_del
17794EOF
17795
17796echo "$as_me:17796: checking for default pty initial erase setting" >&5
17797echo $ECHO_N "checking for default pty initial erase setting... $ECHO_C" >&6
17798
17799# Check whether --enable-pty-erase or --disable-pty-erase was given.
17800if test "${enable_pty_erase+set}" = set; then
17801  enableval="$enable_pty_erase"
17802  initial_erase=$enableval
17803else
17804  initial_erase=False
17805fi;
17806
17807echo "$as_me:17807: result: $initial_erase" >&5
17808echo "${ECHO_T}$initial_erase" >&6
17809case $initial_erase in
17810(yes)
17811	initial_erase=true
17812	;;
17813(no)
17814	initial_erase=false
17815	;;
17816esac
17817cf_xbool1=`echo "$initial_erase"|sed -e 's/^\(.\).*/\1/'`
17818
17819cf_xbool1=`echo "$cf_xbool1" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17820
17821cf_xbool2=`echo "$initial_erase"|sed -e 's/^.//'`
17822initial_erase=${cf_xbool1}${cf_xbool2}
17823
17824cat >>confdefs.h <<EOF
17825#define DEF_INITIAL_ERASE $initial_erase
17826EOF
17827
17828echo "$as_me:17828: checking if alt should send ESC" >&5
17829echo $ECHO_N "checking if alt should send ESC... $ECHO_C" >&6
17830
17831# Check whether --enable-alt-sends-esc or --disable-alt-sends-esc was given.
17832if test "${enable_alt_sends_esc+set}" = set; then
17833  enableval="$enable_alt_sends_esc"
17834  test "$enableval" != yes && enableval=no
17835	if test "$enableval" != "no" ; then
17836    alt_sends_esc=$enableval
17837	else
17838		alt_sends_esc=no
17839	fi
17840else
17841  enableval=no
17842	alt_sends_esc=no
17843
17844fi;
17845
17846echo "$as_me:17846: result: $alt_sends_esc" >&5
17847echo "${ECHO_T}$alt_sends_esc" >&6
17848case $alt_sends_esc in
17849(yes)
17850	alt_sends_esc=true
17851	;;
17852(no)
17853	alt_sends_esc=false
17854	;;
17855esac
17856cf_xbool1=`echo "$alt_sends_esc"|sed -e 's/^\(.\).*/\1/'`
17857
17858cf_xbool1=`echo "$cf_xbool1" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17859
17860cf_xbool2=`echo "$alt_sends_esc"|sed -e 's/^.//'`
17861alt_sends_esc=${cf_xbool1}${cf_xbool2}
17862
17863cat >>confdefs.h <<EOF
17864#define DEF_ALT_SENDS_ESC $alt_sends_esc
17865EOF
17866
17867echo "$as_me:17867: checking if meta should send ESC" >&5
17868echo $ECHO_N "checking if meta should send ESC... $ECHO_C" >&6
17869
17870# Check whether --enable-meta-sends-esc or --disable-meta-sends-esc was given.
17871if test "${enable_meta_sends_esc+set}" = set; then
17872  enableval="$enable_meta_sends_esc"
17873  test "$enableval" != yes && enableval=no
17874	if test "$enableval" != "no" ; then
17875    meta_sends_esc=$enableval
17876	else
17877		meta_sends_esc=no
17878	fi
17879else
17880  enableval=no
17881	meta_sends_esc=no
17882
17883fi;
17884
17885echo "$as_me:17885: result: $meta_sends_esc" >&5
17886echo "${ECHO_T}$meta_sends_esc" >&6
17887case $meta_sends_esc in
17888(yes)
17889	meta_sends_esc=true
17890	;;
17891(no)
17892	meta_sends_esc=false
17893	;;
17894esac
17895cf_xbool1=`echo "$meta_sends_esc"|sed -e 's/^\(.\).*/\1/'`
17896
17897cf_xbool1=`echo "$cf_xbool1" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17898
17899cf_xbool2=`echo "$meta_sends_esc"|sed -e 's/^.//'`
17900meta_sends_esc=${cf_xbool1}${cf_xbool2}
17901
17902cat >>confdefs.h <<EOF
17903#define DEF_META_SENDS_ESC $meta_sends_esc
17904EOF
17905
17906###############################################################################
17907# Extract the first word of "tic", so it can be a program name with args.
17908set dummy tic; ac_word=$2
17909echo "$as_me:17909: checking for $ac_word" >&5
17910echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
17911if test "${ac_cv_prog_cf_tic_prog+set}" = set; then
17912  echo $ECHO_N "(cached) $ECHO_C" >&6
17913else
17914  if test -n "$cf_tic_prog"; then
17915  ac_cv_prog_cf_tic_prog="$cf_tic_prog" # Let the user override the test.
17916else
17917  ac_save_IFS=$IFS; IFS=$ac_path_separator
17918ac_dummy="$PATH"
17919for ac_dir in $ac_dummy; do
17920  IFS=$ac_save_IFS
17921  test -z "$ac_dir" && ac_dir=.
17922  $as_executable_p "$ac_dir/$ac_word" || continue
17923ac_cv_prog_cf_tic_prog="yes"
17924echo "$as_me:17924: found $ac_dir/$ac_word" >&5
17925break
17926done
17927
17928  test -z "$ac_cv_prog_cf_tic_prog" && ac_cv_prog_cf_tic_prog="no"
17929fi
17930fi
17931cf_tic_prog=$ac_cv_prog_cf_tic_prog
17932if test -n "$cf_tic_prog"; then
17933  echo "$as_me:17933: result: $cf_tic_prog" >&5
17934echo "${ECHO_T}$cf_tic_prog" >&6
17935else
17936  echo "$as_me:17936: result: no" >&5
17937echo "${ECHO_T}no" >&6
17938fi
17939
17940if test "$cf_tic_prog" = yes ; then
17941	if test -n "$TERMINFO"
17942	then
17943		case "$TERMINFO" in
17944		(/*)
17945			test -d "$TERMINFO" || unset TERMINFO
17946			;;
17947		(*)
17948			unset TERMINFO
17949			;;
17950		esac
17951	fi
17952	echo "$as_me:17952: checking for private terminfo-directory" >&5
17953echo $ECHO_N "checking for private terminfo-directory... $ECHO_C" >&6
17954
17955# Check whether --with-own-terminfo or --without-own-terminfo was given.
17956if test "${with_own_terminfo+set}" = set; then
17957  withval="$with_own_terminfo"
17958  TERMINFO_DIR=$withval
17959else
17960  TERMINFO_DIR=${TERMINFO-none}
17961fi;
17962	echo "$as_me:17962: result: $TERMINFO_DIR" >&5
17963echo "${ECHO_T}$TERMINFO_DIR" >&6
17964	if test "$TERMINFO_DIR" = yes ; then
17965		{ echo "$as_me:17965: WARNING: no value given" >&5
17966echo "$as_me: WARNING: no value given" >&2;}
17967	elif test "$TERMINFO_DIR" != none ; then
17968		if test -d "$TERMINFO_DIR" ; then
17969
17970cat >>confdefs.h <<EOF
17971#define OWN_TERMINFO_DIR "$TERMINFO_DIR"
17972EOF
17973
17974			echo "$as_me:17974: checking if \$TERMINFO should also be set" >&5
17975echo $ECHO_N "checking if \$TERMINFO should also be set... $ECHO_C" >&6
17976
17977# Check whether --enable-env-terminfo or --disable-env-terminfo was given.
17978if test "${enable_env_terminfo+set}" = set; then
17979  enableval="$enable_env_terminfo"
17980  cf_env_terminfo=yes
17981else
17982  cf_env_terminfo=no
17983fi;
17984			echo "$as_me:17984: result: $cf_env_terminfo" >&5
17985echo "${ECHO_T}$cf_env_terminfo" >&6
17986			test $cf_env_terminfo = yes &&
17987
17988cat >>confdefs.h <<\EOF
17989#define OWN_TERMINFO_ENV 1
17990EOF
17991
17992		else
17993			{ echo "$as_me:17993: WARNING: not a directory" >&5
17994echo "$as_me: WARNING: not a directory" >&2;}
17995		fi
17996	elif test "$prefix" != NONE ; then
17997		TERMINFO_DIR='${prefix}/lib/terminfo'
17998	elif test -d /usr/lib/terminfo ; then
17999		TERMINFO_DIR=/usr/lib/terminfo
18000	else
18001		TERMINFO_DIR=
18002	fi
18003	SET_TERMINFO=
18004	if test -n "$TERMINFO_DIR" ; then
18005		TERMINFO_DIR='$(DESTDIR)'$TERMINFO_DIR
18006		SET_TERMINFO='TERMINFO=$(TERMINFO_DIR)'
18007	fi
18008	no_ticprog=
18009else
18010	no_ticprog="#"
18011	TERMINFO_DIR=
18012	SET_TERMINFO=
18013fi
18014
18015###############################################################################
18016
18017echo "$as_me:18017: checking if you want active-icons" >&5
18018echo $ECHO_N "checking if you want active-icons... $ECHO_C" >&6
18019
18020# Check whether --enable-active-icon or --disable-active-icon was given.
18021if test "${enable_active_icon+set}" = set; then
18022  enableval="$enable_active_icon"
18023  test "$enableval" != no && enableval=yes
18024	if test "$enableval" != "yes" ; then
18025    enable_active_icon=no
18026	else
18027		enable_active_icon=yes
18028	fi
18029else
18030  enableval=yes
18031	enable_active_icon=yes
18032
18033fi;
18034echo "$as_me:18034: result: $enable_active_icon" >&5
18035echo "${ECHO_T}$enable_active_icon" >&6
18036if test "$enable_active_icon" = no ; then
18037
18038cat >>confdefs.h <<\EOF
18039#define NO_ACTIVE_ICON 1
18040EOF
18041
18042fi
18043
18044echo "$as_me:18044: checking if you want ANSI color" >&5
18045echo $ECHO_N "checking if you want ANSI color... $ECHO_C" >&6
18046
18047# Check whether --enable-ansi-color or --disable-ansi-color was given.
18048if test "${enable_ansi_color+set}" = set; then
18049  enableval="$enable_ansi_color"
18050  test "$enableval" != no && enableval=yes
18051	if test "$enableval" != "yes" ; then
18052    enable_ansi_color=no
18053	else
18054		enable_ansi_color=yes
18055	fi
18056else
18057  enableval=yes
18058	enable_ansi_color=yes
18059
18060fi;
18061echo "$as_me:18061: result: $enable_ansi_color" >&5
18062echo "${ECHO_T}$enable_ansi_color" >&6
18063test "$enable_ansi_color" = no &&
18064cat >>confdefs.h <<\EOF
18065#define OPT_ISO_COLORS 0
18066EOF
18067
18068if test "$enable_ansi_color" = yes ; then
18069
18070	echo "$as_me:18070: checking if you want 16 colors like aixterm" >&5
18071echo $ECHO_N "checking if you want 16 colors like aixterm... $ECHO_C" >&6
18072
18073# Check whether --enable-16-color or --disable-16-color was given.
18074if test "${enable_16_color+set}" = set; then
18075  enableval="$enable_16_color"
18076  test "$enableval" != no && enableval=yes
18077	if test "$enableval" != "yes" ; then
18078    enable_16_color=no
18079	else
18080		enable_16_color=yes
18081	fi
18082else
18083  enableval=yes
18084	enable_16_color=yes
18085
18086fi;
18087	echo "$as_me:18087: result: $enable_16_color" >&5
18088echo "${ECHO_T}$enable_16_color" >&6
18089	test "$enable_16_color" = no &&
18090cat >>confdefs.h <<\EOF
18091#define OPT_AIX_COLORS 0
18092EOF
18093
18094	echo "$as_me:18094: checking if you want 256 colors" >&5
18095echo $ECHO_N "checking if you want 256 colors... $ECHO_C" >&6
18096
18097# Check whether --enable-256-color or --disable-256-color was given.
18098if test "${enable_256_color+set}" = set; then
18099  enableval="$enable_256_color"
18100  test "$enableval" != no && enableval=yes
18101	if test "$enableval" != "yes" ; then
18102    enable_256_color=no
18103	else
18104		enable_256_color=yes
18105	fi
18106else
18107  enableval=yes
18108	enable_256_color=yes
18109
18110fi;
18111	echo "$as_me:18111: result: $enable_256_color" >&5
18112echo "${ECHO_T}$enable_256_color" >&6
18113
18114	if test "$enable_256_color" = yes ; then
18115
18116		CHARPROC_DEPS="$CHARPROC_DEPS 256colres.h"
18117		EXTRAHDRS="$EXTRAHDRS 256colres.h"
18118
18119cat >>confdefs.h <<\EOF
18120#define OPT_256_COLORS 1
18121EOF
18122
18123		echo "$as_me:18123: checking if you want direct-color support" >&5
18124echo $ECHO_N "checking if you want direct-color support... $ECHO_C" >&6
18125
18126# Check whether --enable-direct-color or --disable-direct-color was given.
18127if test "${enable_direct_color+set}" = set; then
18128  enableval="$enable_direct_color"
18129  test "$enableval" != no && enableval=yes
18130	if test "$enableval" != "yes" ; then
18131    enable_direct_color=no
18132	else
18133		enable_direct_color=yes
18134	fi
18135else
18136  enableval=yes
18137	enable_direct_color=yes
18138
18139fi;
18140		echo "$as_me:18140: result: $enable_direct_color" >&5
18141echo "${ECHO_T}$enable_direct_color" >&6
18142		if test "$enable_direct_color" = yes ; then
18143
18144cat >>confdefs.h <<\EOF
18145#define OPT_DIRECT_COLOR 1
18146EOF
18147
18148		fi
18149
18150	else
18151
18152		echo "$as_me:18152: checking if you want 88 colors" >&5
18153echo $ECHO_N "checking if you want 88 colors... $ECHO_C" >&6
18154
18155# Check whether --enable-88-color or --disable-88-color was given.
18156if test "${enable_88_color+set}" = set; then
18157  enableval="$enable_88_color"
18158  test "$enableval" != no && enableval=yes
18159	if test "$enableval" != "yes" ; then
18160    enable_88_color=no
18161	else
18162		enable_88_color=yes
18163	fi
18164else
18165  enableval=yes
18166	enable_88_color=yes
18167
18168fi;
18169		echo "$as_me:18169: result: $enable_88_color" >&5
18170echo "${ECHO_T}$enable_88_color" >&6
18171		if test "$enable_88_color" = yes ; then
18172			CHARPROC_DEPS="$CHARPROC_DEPS 88colres.h"
18173			EXTRAHDRS="$EXTRAHDRS 88colres.h"
18174
18175cat >>confdefs.h <<\EOF
18176#define OPT_88_COLORS 1
18177EOF
18178
18179		fi
18180
18181	fi
18182
18183fi
18184
18185echo "$as_me:18185: checking if you want blinking cursor" >&5
18186echo $ECHO_N "checking if you want blinking cursor... $ECHO_C" >&6
18187
18188# Check whether --enable-blink-cursor or --disable-blink-cursor was given.
18189if test "${enable_blink_cursor+set}" = set; then
18190  enableval="$enable_blink_cursor"
18191  test "$enableval" != no && enableval=yes
18192	if test "$enableval" != "yes" ; then
18193    enable_blink_curs=no
18194	else
18195		enable_blink_curs=yes
18196	fi
18197else
18198  enableval=yes
18199	enable_blink_curs=yes
18200
18201fi;
18202echo "$as_me:18202: result: $enable_blink_curs" >&5
18203echo "${ECHO_T}$enable_blink_curs" >&6
18204test "$enable_blink_curs" = no &&
18205cat >>confdefs.h <<\EOF
18206#define OPT_BLINK_CURS 0
18207EOF
18208
18209echo "$as_me:18209: checking if you want to ignore Linux's broken palette-strings" >&5
18210echo $ECHO_N "checking if you want to ignore Linux's broken palette-strings... $ECHO_C" >&6
18211
18212case $host_os in
18213(linux*)
18214	assume_broken_osc=yes ;;
18215(*)
18216	assume_broken_osc=no ;;
18217esac
18218
18219# Check whether --enable-broken-osc or --disable-broken-osc was given.
18220if test "${enable_broken_osc+set}" = set; then
18221  enableval="$enable_broken_osc"
18222  test "$enableval" != no && enableval=yes
18223	if test "$enableval" != "$assume_broken_osc" ; then
18224    enable_broken_osc=$enableval
18225	else
18226		enable_broken_osc=$enableval
18227	fi
18228else
18229  enableval=$assume_broken_osc
18230	enable_broken_osc=$enableval
18231
18232fi;
18233echo "$as_me:18233: result: $enable_broken_osc" >&5
18234echo "${ECHO_T}$enable_broken_osc" >&6
18235if test "$enable_broken_osc" = yes ; then
18236
18237cat >>confdefs.h <<\EOF
18238#define OPT_BROKEN_OSC 1
18239EOF
18240
18241else
18242
18243cat >>confdefs.h <<\EOF
18244#define OPT_BROKEN_OSC 0
18245EOF
18246
18247fi
18248
18249echo "$as_me:18249: checking if you want to allow broken string-terminators" >&5
18250echo $ECHO_N "checking if you want to allow broken string-terminators... $ECHO_C" >&6
18251
18252# Check whether --enable-broken-st or --disable-broken-st was given.
18253if test "${enable_broken_st+set}" = set; then
18254  enableval="$enable_broken_st"
18255  test "$enableval" != yes && enableval=no
18256	if test "$enableval" != "no" ; then
18257    enable_broken_st=no
18258	else
18259		enable_broken_st=yes
18260	fi
18261else
18262  enableval=no
18263	enable_broken_st=yes
18264
18265fi;
18266echo "$as_me:18266: result: $enable_broken_st" >&5
18267echo "${ECHO_T}$enable_broken_st" >&6
18268test "$enable_broken_st" = no &&
18269cat >>confdefs.h <<\EOF
18270#define OPT_BROKEN_ST 0
18271EOF
18272
18273echo "$as_me:18273: checking if you want to compile-in icon data" >&5
18274echo $ECHO_N "checking if you want to compile-in icon data... $ECHO_C" >&6
18275
18276# Check whether --enable-builtin-xpms or --disable-builtin-xpms was given.
18277if test "${enable_builtin_xpms+set}" = set; then
18278  enableval="$enable_builtin_xpms"
18279  test "$enableval" != yes && enableval=no
18280	if test "$enableval" != "no" ; then
18281    enable_builtin_xpms=yes
18282	else
18283		enable_builtin_xpms=no
18284	fi
18285else
18286  enableval=no
18287	enable_builtin_xpms=no
18288
18289fi;
18290echo "$as_me:18290: result: $enable_builtin_xpms" >&5
18291echo "${ECHO_T}$enable_builtin_xpms" >&6
18292test "$enable_builtin_xpms" = yes &&
18293cat >>confdefs.h <<\EOF
18294#define OPT_BUILTIN_XPMS 1
18295EOF
18296
18297echo "$as_me:18297: checking if you want printable 128-159" >&5
18298echo $ECHO_N "checking if you want printable 128-159... $ECHO_C" >&6
18299
18300# Check whether --enable-c1-print or --disable-c1-print was given.
18301if test "${enable_c1_print+set}" = set; then
18302  enableval="$enable_c1_print"
18303  test "$enableval" != no && enableval=yes
18304	if test "$enableval" != "yes" ; then
18305    enable_c1_print=no
18306	else
18307		enable_c1_print=yes
18308	fi
18309else
18310  enableval=yes
18311	enable_c1_print=yes
18312
18313fi;
18314echo "$as_me:18314: result: $enable_c1_print" >&5
18315echo "${ECHO_T}$enable_c1_print" >&6
18316test "$enable_c1_print" = no &&
18317cat >>confdefs.h <<\EOF
18318#define OPT_C1_PRINT 0
18319EOF
18320
18321if test "$enable_ansi_color" = yes ; then
18322
18323	echo "$as_me:18323: checking if you want bold colors mapped like IBM PC" >&5
18324echo $ECHO_N "checking if you want bold colors mapped like IBM PC... $ECHO_C" >&6
18325
18326# Check whether --enable-bold-color or --disable-bold-color was given.
18327if test "${enable_bold_color+set}" = set; then
18328  enableval="$enable_bold_color"
18329  test "$enableval" != no && enableval=yes
18330	if test "$enableval" != "yes" ; then
18331    enable_pc_color=no
18332	else
18333		enable_pc_color=yes
18334	fi
18335else
18336  enableval=yes
18337	enable_pc_color=yes
18338
18339fi;
18340	echo "$as_me:18340: result: $enable_pc_color" >&5
18341echo "${ECHO_T}$enable_pc_color" >&6
18342	test "$enable_pc_color" = no &&
18343cat >>confdefs.h <<\EOF
18344#define OPT_PC_COLORS 0
18345EOF
18346
18347	echo "$as_me:18347: checking if you want separate color-classes" >&5
18348echo $ECHO_N "checking if you want separate color-classes... $ECHO_C" >&6
18349
18350# Check whether --enable-color-class or --disable-color-class was given.
18351if test "${enable_color_class+set}" = set; then
18352  enableval="$enable_color_class"
18353  test "$enableval" != no && enableval=yes
18354	if test "$enableval" != "yes" ; then
18355    enable_color_class=no
18356	else
18357		enable_color_class=yes
18358	fi
18359else
18360  enableval=yes
18361	enable_color_class=yes
18362
18363fi;
18364	echo "$as_me:18364: result: $enable_color_class" >&5
18365echo "${ECHO_T}$enable_color_class" >&6
18366	test "$enable_color_class" = no &&
18367cat >>confdefs.h <<\EOF
18368#define OPT_COLOR_CLASS 0
18369EOF
18370
18371	echo "$as_me:18371: checking if you want color-mode enabled by default" >&5
18372echo $ECHO_N "checking if you want color-mode enabled by default... $ECHO_C" >&6
18373
18374# Check whether --enable-color-mode or --disable-color-mode was given.
18375if test "${enable_color_mode+set}" = set; then
18376  enableval="$enable_color_mode"
18377  test "$enableval" != no && enableval=yes
18378	if test "$enableval" != "yes" ; then
18379    default_colormode=no
18380	else
18381		default_colormode=yes
18382	fi
18383else
18384  enableval=yes
18385	default_colormode=yes
18386
18387fi;
18388	echo "$as_me:18388: result: $default_colormode" >&5
18389echo "${ECHO_T}$default_colormode" >&6
18390	test "$default_colormode" = no &&
18391cat >>confdefs.h <<\EOF
18392#define DFT_COLORMODE 0
18393EOF
18394
18395fi
18396
18397echo "$as_me:18397: checking if you want support for color highlighting" >&5
18398echo $ECHO_N "checking if you want support for color highlighting... $ECHO_C" >&6
18399
18400# Check whether --enable-highlighting or --disable-highlighting was given.
18401if test "${enable_highlighting+set}" = set; then
18402  enableval="$enable_highlighting"
18403  test "$enableval" != no && enableval=yes
18404	if test "$enableval" != "yes" ; then
18405    default_highlight=no
18406	else
18407		default_highlight=yes
18408	fi
18409else
18410  enableval=yes
18411	default_highlight=yes
18412
18413fi;
18414echo "$as_me:18414: result: $default_highlight" >&5
18415echo "${ECHO_T}$default_highlight" >&6
18416test "$default_highlight" = no &&
18417cat >>confdefs.h <<\EOF
18418#define OPT_HIGHLIGHT_COLOR 0
18419EOF
18420
18421echo "$as_me:18421: checking if you want support for doublesize characters" >&5
18422echo $ECHO_N "checking if you want support for doublesize characters... $ECHO_C" >&6
18423
18424# Check whether --enable-doublechars or --disable-doublechars was given.
18425if test "${enable_doublechars+set}" = set; then
18426  enableval="$enable_doublechars"
18427  test "$enableval" != no && enableval=yes
18428	if test "$enableval" != "yes" ; then
18429    enable_doublechars=no
18430	else
18431		enable_doublechars=yes
18432	fi
18433else
18434  enableval=yes
18435	enable_doublechars=yes
18436
18437fi;
18438echo "$as_me:18438: result: $enable_doublechars" >&5
18439echo "${ECHO_T}$enable_doublechars" >&6
18440test "$enable_doublechars" = no &&
18441cat >>confdefs.h <<\EOF
18442#define OPT_DEC_CHRSET 0
18443EOF
18444
18445echo "$as_me:18445: checking if you want fallback-support for box characters" >&5
18446echo $ECHO_N "checking if you want fallback-support for box characters... $ECHO_C" >&6
18447
18448# Check whether --enable-boxchars or --disable-boxchars was given.
18449if test "${enable_boxchars+set}" = set; then
18450  enableval="$enable_boxchars"
18451  test "$enableval" != no && enableval=yes
18452	if test "$enableval" != "yes" ; then
18453    enable_boxchars=no
18454	else
18455		enable_boxchars=yes
18456	fi
18457else
18458  enableval=yes
18459	enable_boxchars=yes
18460
18461fi;
18462echo "$as_me:18462: result: $enable_boxchars" >&5
18463echo "${ECHO_T}$enable_boxchars" >&6
18464test "$enable_boxchars" = no &&
18465cat >>confdefs.h <<\EOF
18466#define OPT_BOX_CHARS 0
18467EOF
18468
18469echo "$as_me:18469: checking if you want to allow spawning new xterms" >&5
18470echo $ECHO_N "checking if you want to allow spawning new xterms... $ECHO_C" >&6
18471
18472# Check whether --enable-exec-xterm or --disable-exec-xterm was given.
18473if test "${enable_exec_xterm+set}" = set; then
18474  enableval="$enable_exec_xterm"
18475  test "$enableval" != yes && enableval=no
18476	if test "$enableval" != "no" ; then
18477    enable_exec_xterm=yes
18478	else
18479		enable_exec_xterm=no
18480	fi
18481else
18482  enableval=no
18483	enable_exec_xterm=no
18484
18485fi;
18486echo "$as_me:18486: result: $enable_exec_xterm" >&5
18487echo "${ECHO_T}$enable_exec_xterm" >&6
18488if test "$enable_exec_xterm" = yes ; then
18489
18490echo "$as_me:18490: checking for proc tree with cwd-support" >&5
18491echo $ECHO_N "checking for proc tree with cwd-support... $ECHO_C" >&6
18492if test "${cf_cv_procfs_cwd+set}" = set; then
18493  echo $ECHO_N "(cached) $ECHO_C" >&6
18494else
18495
18496cf_cv_procfs_cwd=no
18497for cf_path in /proc /compat/linux/proc /usr/compat/linux/proc
18498do
18499	if test -d "$cf_path" && \
18500	   test -d "$cf_path"/$$ && \
18501	   { test -d "$cf_path"/$$/cwd || \
18502	     test -L "$cf_path"/$$/cwd; }; then
18503		cf_cv_procfs_cwd="$cf_path"
18504		break
18505	fi
18506done
18507
18508fi
18509echo "$as_me:18509: result: $cf_cv_procfs_cwd" >&5
18510echo "${ECHO_T}$cf_cv_procfs_cwd" >&6
18511
18512	if test "$cf_cv_procfs_cwd" = no ; then
18513		{ echo "$as_me:18513: WARNING: no suitable proc filesystem found" >&5
18514echo "$as_me: WARNING: no suitable proc filesystem found" >&2;}
18515	else
18516
18517cat >>confdefs.h <<EOF
18518#define PROCFS_ROOT "$cf_cv_procfs_cwd"
18519EOF
18520
18521cat >>confdefs.h <<\EOF
18522#define OPT_EXEC_XTERM 1
18523EOF
18524
18525	fi
18526fi
18527
18528if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "Xext"; then
18529	test -n "$verbose" && echo "	found package Xext" 1>&6
18530
18531echo "${as_me:-configure}:18531: testing found package Xext ..." 1>&5
18532
18533	cf_pkgconfig_incs="`$PKG_CONFIG --cflags "Xext" 2>/dev/null`"
18534	cf_pkgconfig_libs="`$PKG_CONFIG --libs   "Xext" 2>/dev/null`"
18535	test -n "$verbose" && echo "	package Xext CFLAGS: $cf_pkgconfig_incs" 1>&6
18536
18537echo "${as_me:-configure}:18537: testing package Xext CFLAGS: $cf_pkgconfig_incs ..." 1>&5
18538
18539	test -n "$verbose" && echo "	package Xext LIBS: $cf_pkgconfig_libs" 1>&6
18540
18541echo "${as_me:-configure}:18541: testing package Xext LIBS: $cf_pkgconfig_libs ..." 1>&5
18542
18543cf_fix_cppflags=no
18544cf_new_cflags=
18545cf_new_cppflags=
18546cf_new_extra_cppflags=
18547
18548for cf_add_cflags in $cf_pkgconfig_incs
18549do
18550case "$cf_fix_cppflags" in
18551(no)
18552	case "$cf_add_cflags" in
18553	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18554		case "$cf_add_cflags" in
18555		(-D*)
18556			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18557
18558			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18559				&& test -z "${cf_tst_cflags}" \
18560				&& cf_fix_cppflags=yes
18561
18562			if test "$cf_fix_cppflags" = yes ; 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			elif test "${cf_tst_cflags}" = "\"'" ; then
18569
18570	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18571	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18572
18573				continue
18574			fi
18575			;;
18576		esac
18577		case "$CPPFLAGS" in
18578		(*$cf_add_cflags)
18579			;;
18580		(*)
18581			case "$cf_add_cflags" in
18582			(-D*)
18583				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18584
18585CPPFLAGS=`echo "$CPPFLAGS" | \
18586	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
18587		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
18588
18589				;;
18590			esac
18591
18592	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18593	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18594
18595			;;
18596		esac
18597		;;
18598	(*)
18599
18600	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18601	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18602
18603		;;
18604	esac
18605	;;
18606(yes)
18607
18608	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18609	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18610
18611	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
18612
18613	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18614		&& test -z "${cf_tst_cflags}" \
18615		&& cf_fix_cppflags=no
18616	;;
18617esac
18618done
18619
18620if test -n "$cf_new_cflags" ; then
18621
18622	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18623	CFLAGS="${CFLAGS}$cf_new_cflags"
18624
18625fi
18626
18627if test -n "$cf_new_cppflags" ; then
18628
18629	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18630	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18631
18632fi
18633
18634if test -n "$cf_new_extra_cppflags" ; then
18635
18636	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18637	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18638
18639fi
18640
18641cf_add_libs="$LIBS"
18642# reverse order
18643cf_add_0lib=
18644for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
18645# filter duplicates
18646for cf_add_1lib in $cf_add_0lib; do
18647	for cf_add_2lib in $cf_add_libs; do
18648		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
18649			cf_add_1lib=
18650			break
18651		fi
18652	done
18653	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
18654done
18655LIBS="$cf_add_libs"
18656
18657	:
18658else
18659	cf_pkgconfig_incs=
18660	cf_pkgconfig_libs=
18661
18662	echo "$as_me:18662: checking for XextCreateExtension in -lXext" >&5
18663echo $ECHO_N "checking for XextCreateExtension in -lXext... $ECHO_C" >&6
18664if test "${ac_cv_lib_Xext_XextCreateExtension+set}" = set; then
18665  echo $ECHO_N "(cached) $ECHO_C" >&6
18666else
18667  ac_check_lib_save_LIBS=$LIBS
18668LIBS="-lXext  $LIBS"
18669cat >"conftest.$ac_ext" <<_ACEOF
18670#line 18670 "configure"
18671#include "confdefs.h"
18672
18673/* Override any gcc2 internal prototype to avoid an error.  */
18674#ifdef __cplusplus
18675extern "C"
18676#endif
18677/* We use char because int might match the return type of a gcc2
18678   builtin and then its argument prototype would still apply.  */
18679char XextCreateExtension ();
18680int
18681main (void)
18682{
18683XextCreateExtension ();
18684  ;
18685  return 0;
18686}
18687_ACEOF
18688rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18689if { (eval echo "$as_me:18689: \"$ac_link\"") >&5
18690  (eval $ac_link) 2>&5
18691  ac_status=$?
18692  echo "$as_me:18692: \$? = $ac_status" >&5
18693  (exit "$ac_status"); } &&
18694         { ac_try='test -s "conftest$ac_exeext"'
18695  { (eval echo "$as_me:18695: \"$ac_try\"") >&5
18696  (eval $ac_try) 2>&5
18697  ac_status=$?
18698  echo "$as_me:18698: \$? = $ac_status" >&5
18699  (exit "$ac_status"); }; }; then
18700  ac_cv_lib_Xext_XextCreateExtension=yes
18701else
18702  echo "$as_me: failed program was:" >&5
18703cat "conftest.$ac_ext" >&5
18704ac_cv_lib_Xext_XextCreateExtension=no
18705fi
18706rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18707LIBS=$ac_check_lib_save_LIBS
18708fi
18709echo "$as_me:18709: result: $ac_cv_lib_Xext_XextCreateExtension" >&5
18710echo "${ECHO_T}$ac_cv_lib_Xext_XextCreateExtension" >&6
18711if test "$ac_cv_lib_Xext_XextCreateExtension" = yes; then
18712
18713cf_add_libs="$LIBS"
18714# reverse order
18715cf_add_0lib=
18716for cf_add_1lib in -lXext; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
18717# filter duplicates
18718for cf_add_1lib in $cf_add_0lib; do
18719	for cf_add_2lib in $cf_add_libs; do
18720		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
18721			cf_add_1lib=
18722			break
18723		fi
18724	done
18725	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
18726done
18727LIBS="$cf_add_libs"
18728
18729fi
18730
18731fi
18732
18733echo "$as_me:18733: checking for X11/extensions/Xdbe.h" >&5
18734echo $ECHO_N "checking for X11/extensions/Xdbe.h... $ECHO_C" >&6
18735if test "${ac_cv_header_X11_extensions_Xdbe_h+set}" = set; then
18736  echo $ECHO_N "(cached) $ECHO_C" >&6
18737else
18738  cat >"conftest.$ac_ext" <<_ACEOF
18739#line 18739 "configure"
18740#include "confdefs.h"
18741#include <X11/extensions/Xdbe.h>
18742_ACEOF
18743if { (eval echo "$as_me:18743: \"$ac_cpp "conftest.$ac_ext"\"") >&5
18744  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
18745  ac_status=$?
18746  $EGREP -v '^ *\+' conftest.er1 >conftest.err
18747  rm -f conftest.er1
18748  cat conftest.err >&5
18749  echo "$as_me:18749: \$? = $ac_status" >&5
18750  (exit "$ac_status"); } >/dev/null; then
18751  if test -s conftest.err; then
18752    ac_cpp_err=$ac_c_preproc_warn_flag
18753  else
18754    ac_cpp_err=
18755  fi
18756else
18757  ac_cpp_err=yes
18758fi
18759if test -z "$ac_cpp_err"; then
18760  ac_cv_header_X11_extensions_Xdbe_h=yes
18761else
18762  echo "$as_me: failed program was:" >&5
18763  cat "conftest.$ac_ext" >&5
18764  ac_cv_header_X11_extensions_Xdbe_h=no
18765fi
18766rm -f conftest.err "conftest.$ac_ext"
18767fi
18768echo "$as_me:18768: result: $ac_cv_header_X11_extensions_Xdbe_h" >&5
18769echo "${ECHO_T}$ac_cv_header_X11_extensions_Xdbe_h" >&6
18770if test "$ac_cv_header_X11_extensions_Xdbe_h" = yes; then
18771
18772cat >>confdefs.h <<\EOF
18773#define HAVE_X11_EXTENSIONS_XDBE_H 1
18774EOF
18775
18776	echo "$as_me:18776: checking for XdbeSwapBuffers" >&5
18777echo $ECHO_N "checking for XdbeSwapBuffers... $ECHO_C" >&6
18778if test "${ac_cv_func_XdbeSwapBuffers+set}" = set; then
18779  echo $ECHO_N "(cached) $ECHO_C" >&6
18780else
18781  cat >"conftest.$ac_ext" <<_ACEOF
18782#line 18782 "configure"
18783#include "confdefs.h"
18784#define XdbeSwapBuffers autoconf_temporary
18785#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
18786#undef XdbeSwapBuffers
18787
18788#ifdef __cplusplus
18789extern "C"
18790#endif
18791
18792/* We use char because int might match the return type of a gcc2
18793   builtin and then its argument prototype would still apply.  */
18794char XdbeSwapBuffers (void);
18795
18796int
18797main (void)
18798{
18799
18800/* The GNU C library defines stubs for functions which it implements
18801    to always fail with ENOSYS.  Some functions are actually named
18802    something starting with __ and the normal name is an alias.  */
18803#if defined (__stub_XdbeSwapBuffers) || defined (__stub___XdbeSwapBuffers)
18804#error found stub for XdbeSwapBuffers
18805#endif
18806
18807	return XdbeSwapBuffers ();
18808  ;
18809  return 0;
18810}
18811_ACEOF
18812rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18813if { (eval echo "$as_me:18813: \"$ac_link\"") >&5
18814  (eval $ac_link) 2>&5
18815  ac_status=$?
18816  echo "$as_me:18816: \$? = $ac_status" >&5
18817  (exit "$ac_status"); } &&
18818         { ac_try='test -s "conftest$ac_exeext"'
18819  { (eval echo "$as_me:18819: \"$ac_try\"") >&5
18820  (eval $ac_try) 2>&5
18821  ac_status=$?
18822  echo "$as_me:18822: \$? = $ac_status" >&5
18823  (exit "$ac_status"); }; }; then
18824  ac_cv_func_XdbeSwapBuffers=yes
18825else
18826  echo "$as_me: failed program was:" >&5
18827cat "conftest.$ac_ext" >&5
18828ac_cv_func_XdbeSwapBuffers=no
18829fi
18830rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18831fi
18832echo "$as_me:18832: result: $ac_cv_func_XdbeSwapBuffers" >&5
18833echo "${ECHO_T}$ac_cv_func_XdbeSwapBuffers" >&6
18834if test "$ac_cv_func_XdbeSwapBuffers" = yes; then
18835
18836cat >>confdefs.h <<\EOF
18837#define HAVE_XDBESWAPBUFFERS 1
18838EOF
18839
18840				   cf_x_ext_double_buffer=yes
18841fi
18842
18843fi
18844
18845double_buffer=False
18846if test "$cf_x_ext_double_buffer" = yes ; then
18847	echo "$as_me:18847: checking if you want to enable double-buffering in default resources" >&5
18848echo $ECHO_N "checking if you want to enable double-buffering in default resources... $ECHO_C" >&6
18849
18850# Check whether --enable-double-buffer or --disable-double-buffer was given.
18851if test "${enable_double_buffer+set}" = set; then
18852  enableval="$enable_double_buffer"
18853  test "$enableval" != yes && enableval=no
18854	if test "$enableval" != "no" ; then
18855    enable_double_bfr=yes
18856	else
18857		enable_double_bfr=no
18858	fi
18859else
18860  enableval=no
18861	enable_double_bfr=no
18862
18863fi;
18864	echo "$as_me:18864: result: $enable_double_bfr" >&5
18865echo "${ECHO_T}$enable_double_bfr" >&6
18866	if test "$enable_double_bfr" = yes ; then
18867
18868cat >>confdefs.h <<\EOF
18869#define OPT_DOUBLE_BUFFER 1
18870EOF
18871
18872		double_buffer=True
18873	fi
18874fi
18875
18876echo "$as_me:18876: checking if you want to use FreeType library" >&5
18877echo $ECHO_N "checking if you want to use FreeType library... $ECHO_C" >&6
18878
18879# Check whether --enable-freetype or --disable-freetype was given.
18880if test "${enable_freetype+set}" = set; then
18881  enableval="$enable_freetype"
18882  test "$enableval" != no && enableval=yes
18883	if test "$enableval" != "yes" ; then
18884    enable_freetype=no
18885	else
18886		enable_freetype=yes
18887	fi
18888else
18889  enableval=yes
18890	enable_freetype=yes
18891
18892fi;
18893echo "$as_me:18893: result: $enable_freetype" >&5
18894echo "${ECHO_T}$enable_freetype" >&6
18895if test "$enable_freetype" = yes ; then
18896
18897cf_cv_x_freetype_incs=no
18898cf_cv_x_freetype_libs=no
18899cf_extra_freetype_libs=
18900FREETYPE_CONFIG=none
18901FREETYPE_PARAMS=
18902
18903echo "$as_me:18903: checking for FreeType configuration script" >&5
18904echo $ECHO_N "checking for FreeType configuration script... $ECHO_C" >&6
18905
18906# Check whether --with-freetype-config or --without-freetype-config was given.
18907if test "${with_freetype_config+set}" = set; then
18908  withval="$with_freetype_config"
18909  cf_cv_x_freetype_cfgs="$withval"
18910else
18911  cf_cv_x_freetype_cfgs=auto
18912fi;
18913test -z $cf_cv_x_freetype_cfgs && cf_cv_x_freetype_cfgs=auto
18914test $cf_cv_x_freetype_cfgs = no && cf_cv_x_freetype_cfgs=none
18915echo "$as_me:18915: result: $cf_cv_x_freetype_cfgs" >&5
18916echo "${ECHO_T}$cf_cv_x_freetype_cfgs" >&6
18917
18918case $cf_cv_x_freetype_cfgs in
18919(none)
18920	echo "$as_me:18920: checking if you specified -D/-I options for FreeType" >&5
18921echo $ECHO_N "checking if you specified -D/-I options for FreeType... $ECHO_C" >&6
18922
18923# Check whether --with-freetype-cflags or --without-freetype-cflags was given.
18924if test "${with_freetype_cflags+set}" = set; then
18925  withval="$with_freetype_cflags"
18926  cf_cv_x_freetype_incs="$with_freetype_cflags"
18927else
18928  cf_cv_x_freetype_incs=no
18929fi;
18930	echo "$as_me:18930: result: $cf_cv_x_freetype_incs" >&5
18931echo "${ECHO_T}$cf_cv_x_freetype_incs" >&6
18932
18933	echo "$as_me:18933: checking if you specified -L/-l options for FreeType" >&5
18934echo $ECHO_N "checking if you specified -L/-l options for FreeType... $ECHO_C" >&6
18935
18936# Check whether --with-freetype-libs or --without-freetype-libs was given.
18937if test "${with_freetype_libs+set}" = set; then
18938  withval="$with_freetype_libs"
18939  cf_cv_x_freetype_libs="$with_freetype_libs"
18940else
18941  cf_cv_x_freetype_libs=no
18942fi;
18943	echo "$as_me:18943: result: $cf_cv_x_freetype_libs" >&5
18944echo "${ECHO_T}$cf_cv_x_freetype_libs" >&6
18945	;;
18946(auto)
18947	if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xft; then
18948		FREETYPE_CONFIG=$PKG_CONFIG
18949		FREETYPE_PARAMS=xft
18950	else
18951		# Extract the first word of "freetype-config", so it can be a program name with args.
18952set dummy freetype-config; ac_word=$2
18953echo "$as_me:18953: checking for $ac_word" >&5
18954echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
18955if test "${ac_cv_path_FREETYPE_CONFIG+set}" = set; then
18956  echo $ECHO_N "(cached) $ECHO_C" >&6
18957else
18958  case $FREETYPE_CONFIG in
18959  [\\/]* | ?:[\\/]*)
18960  ac_cv_path_FREETYPE_CONFIG="$FREETYPE_CONFIG" # Let the user override the test with a path.
18961  ;;
18962  *)
18963  ac_save_IFS=$IFS; IFS=$ac_path_separator
18964ac_dummy="$PATH"
18965for ac_dir in $ac_dummy; do
18966  IFS=$ac_save_IFS
18967  test -z "$ac_dir" && ac_dir=.
18968  if $as_executable_p "$ac_dir/$ac_word"; then
18969   ac_cv_path_FREETYPE_CONFIG="$ac_dir/$ac_word"
18970   echo "$as_me:18970: found $ac_dir/$ac_word" >&5
18971   break
18972fi
18973done
18974
18975  test -z "$ac_cv_path_FREETYPE_CONFIG" && ac_cv_path_FREETYPE_CONFIG="none"
18976  ;;
18977esac
18978fi
18979FREETYPE_CONFIG=$ac_cv_path_FREETYPE_CONFIG
18980
18981if test -n "$FREETYPE_CONFIG"; then
18982  echo "$as_me:18982: result: $FREETYPE_CONFIG" >&5
18983echo "${ECHO_T}$FREETYPE_CONFIG" >&6
18984else
18985  echo "$as_me:18985: result: no" >&5
18986echo "${ECHO_T}no" >&6
18987fi
18988
18989		if test "$FREETYPE_CONFIG" != none; then
18990			FREETYPE_CONFIG=$FREETYPE_CONFIG
18991			cf_extra_freetype_libs="-lXft"
18992		else
18993			# Extract the first word of "xft-config", so it can be a program name with args.
18994set dummy xft-config; ac_word=$2
18995echo "$as_me:18995: checking for $ac_word" >&5
18996echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
18997if test "${ac_cv_path_FREETYPE_OLD_CONFIG+set}" = set; then
18998  echo $ECHO_N "(cached) $ECHO_C" >&6
18999else
19000  case $FREETYPE_OLD_CONFIG in
19001  [\\/]* | ?:[\\/]*)
19002  ac_cv_path_FREETYPE_OLD_CONFIG="$FREETYPE_OLD_CONFIG" # Let the user override the test with a path.
19003  ;;
19004  *)
19005  ac_save_IFS=$IFS; IFS=$ac_path_separator
19006ac_dummy="$PATH"
19007for ac_dir in $ac_dummy; do
19008  IFS=$ac_save_IFS
19009  test -z "$ac_dir" && ac_dir=.
19010  if $as_executable_p "$ac_dir/$ac_word"; then
19011   ac_cv_path_FREETYPE_OLD_CONFIG="$ac_dir/$ac_word"
19012   echo "$as_me:19012: found $ac_dir/$ac_word" >&5
19013   break
19014fi
19015done
19016
19017  test -z "$ac_cv_path_FREETYPE_OLD_CONFIG" && ac_cv_path_FREETYPE_OLD_CONFIG="none"
19018  ;;
19019esac
19020fi
19021FREETYPE_OLD_CONFIG=$ac_cv_path_FREETYPE_OLD_CONFIG
19022
19023if test -n "$FREETYPE_OLD_CONFIG"; then
19024  echo "$as_me:19024: result: $FREETYPE_OLD_CONFIG" >&5
19025echo "${ECHO_T}$FREETYPE_OLD_CONFIG" >&6
19026else
19027  echo "$as_me:19027: result: no" >&5
19028echo "${ECHO_T}no" >&6
19029fi
19030
19031			if test "$FREETYPE_OLD_CONFIG" != none; then
19032				FREETYPE_CONFIG=$FREETYPE_OLD_CONFIG
19033			fi
19034		fi
19035	fi
19036	;;
19037(pkg*)
19038	if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xft; then
19039		FREETYPE_CONFIG=$cf_cv_x_freetype_cfgs
19040		FREETYPE_PARAMS=xft
19041	else
19042		{ echo "$as_me:19042: WARNING: cannot find pkg-config for Xft" >&5
19043echo "$as_me: WARNING: cannot find pkg-config for Xft" >&2;}
19044	fi
19045	;;
19046(*)
19047	# Extract the first word of "$cf_cv_x_freetype_cfgs", so it can be a program name with args.
19048set dummy $cf_cv_x_freetype_cfgs; ac_word=$2
19049echo "$as_me:19049: checking for $ac_word" >&5
19050echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
19051if test "${ac_cv_path_FREETYPE_XFT_CONFIG+set}" = set; then
19052  echo $ECHO_N "(cached) $ECHO_C" >&6
19053else
19054  case $FREETYPE_XFT_CONFIG in
19055  [\\/]* | ?:[\\/]*)
19056  ac_cv_path_FREETYPE_XFT_CONFIG="$FREETYPE_XFT_CONFIG" # Let the user override the test with a path.
19057  ;;
19058  *)
19059  ac_save_IFS=$IFS; IFS=$ac_path_separator
19060ac_dummy="$PATH"
19061for ac_dir in $ac_dummy; do
19062  IFS=$ac_save_IFS
19063  test -z "$ac_dir" && ac_dir=.
19064  if $as_executable_p "$ac_dir/$ac_word"; then
19065   ac_cv_path_FREETYPE_XFT_CONFIG="$ac_dir/$ac_word"
19066   echo "$as_me:19066: found $ac_dir/$ac_word" >&5
19067   break
19068fi
19069done
19070
19071  test -z "$ac_cv_path_FREETYPE_XFT_CONFIG" && ac_cv_path_FREETYPE_XFT_CONFIG="none"
19072  ;;
19073esac
19074fi
19075FREETYPE_XFT_CONFIG=$ac_cv_path_FREETYPE_XFT_CONFIG
19076
19077if test -n "$FREETYPE_XFT_CONFIG"; then
19078  echo "$as_me:19078: result: $FREETYPE_XFT_CONFIG" >&5
19079echo "${ECHO_T}$FREETYPE_XFT_CONFIG" >&6
19080else
19081  echo "$as_me:19081: result: no" >&5
19082echo "${ECHO_T}no" >&6
19083fi
19084
19085	if test "$FREETYPE_XFT_CONFIG" != none; then
19086		FREETYPE_CONFIG=$FREETYPE_XFT_CONFIG
19087	else
19088		{ echo "$as_me:19088: WARNING: cannot find config script for Xft" >&5
19089echo "$as_me: WARNING: cannot find config script for Xft" >&2;}
19090	fi
19091	;;
19092esac
19093
19094if test "$FREETYPE_CONFIG" != none ; then
19095	echo "$as_me:19095: checking for FreeType config" >&5
19096echo $ECHO_N "checking for FreeType config... $ECHO_C" >&6
19097	echo "$as_me:19097: result: $FREETYPE_CONFIG $FREETYPE_PARAMS" >&5
19098echo "${ECHO_T}$FREETYPE_CONFIG $FREETYPE_PARAMS" >&6
19099
19100	if test "$cf_cv_x_freetype_incs" = no ; then
19101		echo "$as_me:19101: checking for $FREETYPE_CONFIG cflags" >&5
19102echo $ECHO_N "checking for $FREETYPE_CONFIG cflags... $ECHO_C" >&6
19103		cf_cv_x_freetype_incs="`$FREETYPE_CONFIG $FREETYPE_PARAMS --cflags 2>/dev/null`"
19104		echo "$as_me:19104: result: $cf_cv_x_freetype_incs" >&5
19105echo "${ECHO_T}$cf_cv_x_freetype_incs" >&6
19106	fi
19107
19108	if test "$cf_cv_x_freetype_libs" = no ; then
19109		echo "$as_me:19109: checking for $FREETYPE_CONFIG libs" >&5
19110echo $ECHO_N "checking for $FREETYPE_CONFIG libs... $ECHO_C" >&6
19111		cf_cv_x_freetype_libs="$cf_extra_freetype_libs `$FREETYPE_CONFIG $FREETYPE_PARAMS --libs 2>/dev/null`"
19112		echo "$as_me:19112: result: $cf_cv_x_freetype_libs" >&5
19113echo "${ECHO_T}$cf_cv_x_freetype_libs" >&6
19114	fi
19115fi
19116
19117if test "$cf_cv_x_freetype_incs" = no ; then
19118	cf_cv_x_freetype_incs=
19119fi
19120
19121if test "$cf_cv_x_freetype_libs" = no ; then
19122	cf_cv_x_freetype_libs=-lXft
19123fi
19124
19125echo "$as_me:19125: checking if we can link with FreeType libraries" >&5
19126echo $ECHO_N "checking if we can link with FreeType libraries... $ECHO_C" >&6
19127
19128cf_save_LIBS="$LIBS"
19129cf_save_INCS="$CPPFLAGS"
19130
19131cf_add_libs="$LIBS"
19132# reverse order
19133cf_add_0lib=
19134for cf_add_1lib in $cf_cv_x_freetype_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19135# filter duplicates
19136for cf_add_1lib in $cf_add_0lib; do
19137	for cf_add_2lib in $cf_add_libs; do
19138		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19139			cf_add_1lib=
19140			break
19141		fi
19142	done
19143	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19144done
19145LIBS="$cf_add_libs"
19146
19147CPPFLAGS="$CPPFLAGS $cf_cv_x_freetype_incs"
19148
19149cat >"conftest.$ac_ext" <<_ACEOF
19150#line 19150 "configure"
19151#include "confdefs.h"
19152
19153#include <X11/Xlib.h>
19154#include <X11/extensions/Xrender.h>
19155#include <X11/Xft/Xft.h>
19156int
19157main (void)
19158{
19159
19160	XftPattern  *pat = XftNameParse ("name"); (void)pat
19161  ;
19162  return 0;
19163}
19164_ACEOF
19165rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19166if { (eval echo "$as_me:19166: \"$ac_link\"") >&5
19167  (eval $ac_link) 2>&5
19168  ac_status=$?
19169  echo "$as_me:19169: \$? = $ac_status" >&5
19170  (exit "$ac_status"); } &&
19171         { ac_try='test -s "conftest$ac_exeext"'
19172  { (eval echo "$as_me:19172: \"$ac_try\"") >&5
19173  (eval $ac_try) 2>&5
19174  ac_status=$?
19175  echo "$as_me:19175: \$? = $ac_status" >&5
19176  (exit "$ac_status"); }; }; then
19177  cf_cv_found_freetype=yes
19178else
19179  echo "$as_me: failed program was:" >&5
19180cat "conftest.$ac_ext" >&5
19181cf_cv_found_freetype=no
19182fi
19183rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19184echo "$as_me:19184: result: $cf_cv_found_freetype" >&5
19185echo "${ECHO_T}$cf_cv_found_freetype" >&6
19186
19187LIBS="$cf_save_LIBS"
19188CPPFLAGS="$cf_save_INCS"
19189
19190if test "$cf_cv_found_freetype" = yes ; then
19191
19192cf_add_libs="$LIBS"
19193# reverse order
19194cf_add_0lib=
19195for cf_add_1lib in $cf_cv_x_freetype_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19196# filter duplicates
19197for cf_add_1lib in $cf_add_0lib; do
19198	for cf_add_2lib in $cf_add_libs; do
19199		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19200			cf_add_1lib=
19201			break
19202		fi
19203	done
19204	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19205done
19206LIBS="$cf_add_libs"
19207
19208cf_fix_cppflags=no
19209cf_new_cflags=
19210cf_new_cppflags=
19211cf_new_extra_cppflags=
19212
19213for cf_add_cflags in $cf_cv_x_freetype_incs
19214do
19215case "$cf_fix_cppflags" in
19216(no)
19217	case "$cf_add_cflags" in
19218	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
19219		case "$cf_add_cflags" in
19220		(-D*)
19221			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
19222
19223			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19224				&& test -z "${cf_tst_cflags}" \
19225				&& cf_fix_cppflags=yes
19226
19227			if test "$cf_fix_cppflags" = yes ; 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			elif test "${cf_tst_cflags}" = "\"'" ; then
19234
19235	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19236	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19237
19238				continue
19239			fi
19240			;;
19241		esac
19242		case "$CPPFLAGS" in
19243		(*$cf_add_cflags)
19244			;;
19245		(*)
19246			case "$cf_add_cflags" in
19247			(-D*)
19248				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
19249
19250CPPFLAGS=`echo "$CPPFLAGS" | \
19251	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
19252		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
19253
19254				;;
19255			esac
19256
19257	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
19258	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
19259
19260			;;
19261		esac
19262		;;
19263	(*)
19264
19265	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
19266	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
19267
19268		;;
19269	esac
19270	;;
19271(yes)
19272
19273	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19274	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19275
19276	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
19277
19278	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19279		&& test -z "${cf_tst_cflags}" \
19280		&& cf_fix_cppflags=no
19281	;;
19282esac
19283done
19284
19285if test -n "$cf_new_cflags" ; then
19286
19287	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
19288	CFLAGS="${CFLAGS}$cf_new_cflags"
19289
19290fi
19291
19292if test -n "$cf_new_cppflags" ; then
19293
19294	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
19295	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
19296
19297fi
19298
19299if test -n "$cf_new_extra_cppflags" ; then
19300
19301	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
19302	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
19303
19304fi
19305
19306cat >>confdefs.h <<\EOF
19307#define XRENDERFONT 1
19308EOF
19309
19310for ac_func in \
19311	XftDrawCharSpec \
19312	XftDrawSetClip \
19313	XftDrawSetClipRectangles \
19314
19315do
19316as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19317echo "$as_me:19317: checking for $ac_func" >&5
19318echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
19319if eval "test \"\${$as_ac_var+set}\" = set"; then
19320  echo $ECHO_N "(cached) $ECHO_C" >&6
19321else
19322  cat >"conftest.$ac_ext" <<_ACEOF
19323#line 19323 "configure"
19324#include "confdefs.h"
19325#define $ac_func autoconf_temporary
19326#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
19327#undef $ac_func
19328
19329#ifdef __cplusplus
19330extern "C"
19331#endif
19332
19333/* We use char because int might match the return type of a gcc2
19334   builtin and then its argument prototype would still apply.  */
19335char $ac_func (void);
19336
19337int
19338main (void)
19339{
19340
19341/* The GNU C library defines stubs for functions which it implements
19342    to always fail with ENOSYS.  Some functions are actually named
19343    something starting with __ and the normal name is an alias.  */
19344#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
19345#error found stub for $ac_func
19346#endif
19347
19348	return $ac_func ();
19349  ;
19350  return 0;
19351}
19352_ACEOF
19353rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19354if { (eval echo "$as_me:19354: \"$ac_link\"") >&5
19355  (eval $ac_link) 2>&5
19356  ac_status=$?
19357  echo "$as_me:19357: \$? = $ac_status" >&5
19358  (exit "$ac_status"); } &&
19359         { ac_try='test -s "conftest$ac_exeext"'
19360  { (eval echo "$as_me:19360: \"$ac_try\"") >&5
19361  (eval $ac_try) 2>&5
19362  ac_status=$?
19363  echo "$as_me:19363: \$? = $ac_status" >&5
19364  (exit "$ac_status"); }; }; then
19365  eval "$as_ac_var=yes"
19366else
19367  echo "$as_me: failed program was:" >&5
19368cat "conftest.$ac_ext" >&5
19369eval "$as_ac_var=no"
19370fi
19371rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19372fi
19373echo "$as_me:19373: result: `eval echo '${'"$as_ac_var"'}'`" >&5
19374echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
19375if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
19376  cat >>confdefs.h <<EOF
19377#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
19378EOF
19379
19380fi
19381done
19382
19383else
19384	{ echo "$as_me:19384: WARNING: No libraries found for FreeType" >&5
19385echo "$as_me: WARNING: No libraries found for FreeType" >&2;}
19386	CPPFLAGS=`echo "$CPPFLAGS" | sed -e s/-DXRENDERFONT//`
19387fi
19388
19389# FIXME: revisit this if needed
19390
19391if test "$cf_cv_found_freetype" = yes ; then
19392echo "$as_me:19392: checking for usable Xft/fontconfig package" >&5
19393echo $ECHO_N "checking for usable Xft/fontconfig package... $ECHO_C" >&6
19394if test "${cf_cv_xft_compat+set}" = set; then
19395  echo $ECHO_N "(cached) $ECHO_C" >&6
19396else
19397
19398cat >"conftest.$ac_ext" <<_ACEOF
19399#line 19399 "configure"
19400#include "confdefs.h"
19401
19402#include <X11/Xft/Xft.h>
19403
19404int
19405main (void)
19406{
19407
19408	XftPattern *pat = 0;
19409	XftPatternBuild(pat,
19410					XFT_FAMILY, XftTypeString, "mono",
19411					(void *) 0);
19412
19413  ;
19414  return 0;
19415}
19416_ACEOF
19417rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19418if { (eval echo "$as_me:19418: \"$ac_link\"") >&5
19419  (eval $ac_link) 2>&5
19420  ac_status=$?
19421  echo "$as_me:19421: \$? = $ac_status" >&5
19422  (exit "$ac_status"); } &&
19423         { ac_try='test -s "conftest$ac_exeext"'
19424  { (eval echo "$as_me:19424: \"$ac_try\"") >&5
19425  (eval $ac_try) 2>&5
19426  ac_status=$?
19427  echo "$as_me:19427: \$? = $ac_status" >&5
19428  (exit "$ac_status"); }; }; then
19429  cf_cv_xft_compat=yes
19430else
19431  echo "$as_me: failed program was:" >&5
19432cat "conftest.$ac_ext" >&5
19433cf_cv_xft_compat=no
19434fi
19435rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19436
19437fi
19438echo "$as_me:19438: result: $cf_cv_xft_compat" >&5
19439echo "${ECHO_T}$cf_cv_xft_compat" >&6
19440
19441if test "$cf_cv_xft_compat" = no
19442then
19443	# workaround for broken ".pc" files used for Xft.
19444	case "$cf_cv_x_freetype_libs" in
19445	(*-lfontconfig*)
19446		;;
19447	(*)
19448		test -n "$verbose" && echo "	work around broken package" 1>&6
19449
19450echo "${as_me:-configure}:19450: testing work around broken package ..." 1>&5
19451
19452		cf_save_fontconfig="$LIBS"
19453
19454if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "fontconfig"; then
19455	test -n "$verbose" && echo "	found package fontconfig" 1>&6
19456
19457echo "${as_me:-configure}:19457: testing found package fontconfig ..." 1>&5
19458
19459	cf_pkgconfig_incs="`$PKG_CONFIG --cflags "fontconfig" 2>/dev/null`"
19460	cf_pkgconfig_libs="`$PKG_CONFIG --libs   "fontconfig" 2>/dev/null`"
19461	test -n "$verbose" && echo "	package fontconfig CFLAGS: $cf_pkgconfig_incs" 1>&6
19462
19463echo "${as_me:-configure}:19463: testing package fontconfig CFLAGS: $cf_pkgconfig_incs ..." 1>&5
19464
19465	test -n "$verbose" && echo "	package fontconfig LIBS: $cf_pkgconfig_libs" 1>&6
19466
19467echo "${as_me:-configure}:19467: testing package fontconfig LIBS: $cf_pkgconfig_libs ..." 1>&5
19468
19469cf_fix_cppflags=no
19470cf_new_cflags=
19471cf_new_cppflags=
19472cf_new_extra_cppflags=
19473
19474for cf_add_cflags in $cf_pkgconfig_incs
19475do
19476case "$cf_fix_cppflags" in
19477(no)
19478	case "$cf_add_cflags" in
19479	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
19480		case "$cf_add_cflags" in
19481		(-D*)
19482			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
19483
19484			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19485				&& test -z "${cf_tst_cflags}" \
19486				&& cf_fix_cppflags=yes
19487
19488			if test "$cf_fix_cppflags" = yes ; 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			elif test "${cf_tst_cflags}" = "\"'" ; then
19495
19496	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19497	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19498
19499				continue
19500			fi
19501			;;
19502		esac
19503		case "$CPPFLAGS" in
19504		(*$cf_add_cflags)
19505			;;
19506		(*)
19507			case "$cf_add_cflags" in
19508			(-D*)
19509				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
19510
19511CPPFLAGS=`echo "$CPPFLAGS" | \
19512	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
19513		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
19514
19515				;;
19516			esac
19517
19518	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
19519	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
19520
19521			;;
19522		esac
19523		;;
19524	(*)
19525
19526	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
19527	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
19528
19529		;;
19530	esac
19531	;;
19532(yes)
19533
19534	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19535	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19536
19537	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
19538
19539	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19540		&& test -z "${cf_tst_cflags}" \
19541		&& cf_fix_cppflags=no
19542	;;
19543esac
19544done
19545
19546if test -n "$cf_new_cflags" ; then
19547
19548	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
19549	CFLAGS="${CFLAGS}$cf_new_cflags"
19550
19551fi
19552
19553if test -n "$cf_new_cppflags" ; then
19554
19555	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
19556	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
19557
19558fi
19559
19560if test -n "$cf_new_extra_cppflags" ; then
19561
19562	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
19563	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
19564
19565fi
19566
19567cf_add_libs="$LIBS"
19568# reverse order
19569cf_add_0lib=
19570for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19571# filter duplicates
19572for cf_add_1lib in $cf_add_0lib; do
19573	for cf_add_2lib in $cf_add_libs; do
19574		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19575			cf_add_1lib=
19576			break
19577		fi
19578	done
19579	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19580done
19581LIBS="$cf_add_libs"
19582
19583cf_fix_cppflags=no
19584cf_new_cflags=
19585cf_new_cppflags=
19586cf_new_extra_cppflags=
19587
19588for cf_add_cflags in $cf_pkgconfig_incs
19589do
19590case "$cf_fix_cppflags" in
19591(no)
19592	case "$cf_add_cflags" in
19593	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
19594		case "$cf_add_cflags" in
19595		(-D*)
19596			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
19597
19598			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19599				&& test -z "${cf_tst_cflags}" \
19600				&& cf_fix_cppflags=yes
19601
19602			if test "$cf_fix_cppflags" = yes ; 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			elif test "${cf_tst_cflags}" = "\"'" ; then
19609
19610	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19611	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19612
19613				continue
19614			fi
19615			;;
19616		esac
19617		case "$CPPFLAGS" in
19618		(*$cf_add_cflags)
19619			;;
19620		(*)
19621			case "$cf_add_cflags" in
19622			(-D*)
19623				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
19624
19625CPPFLAGS=`echo "$CPPFLAGS" | \
19626	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
19627		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
19628
19629				;;
19630			esac
19631
19632	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
19633	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
19634
19635			;;
19636		esac
19637		;;
19638	(*)
19639
19640	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
19641	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
19642
19643		;;
19644	esac
19645	;;
19646(yes)
19647
19648	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19649	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19650
19651	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
19652
19653	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19654		&& test -z "${cf_tst_cflags}" \
19655		&& cf_fix_cppflags=no
19656	;;
19657esac
19658done
19659
19660if test -n "$cf_new_cflags" ; then
19661
19662	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
19663	CFLAGS="${CFLAGS}$cf_new_cflags"
19664
19665fi
19666
19667if test -n "$cf_new_cppflags" ; then
19668
19669	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
19670	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
19671
19672fi
19673
19674if test -n "$cf_new_extra_cppflags" ; then
19675
19676	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
19677	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
19678
19679fi
19680
19681				LIBS="$cf_save_fontconfig"
19682
19683test -n "$verbose" && echo "	...before $LIBS" 1>&6
19684
19685echo "${as_me:-configure}:19685: testing ...before $LIBS ..." 1>&5
19686
19687LIBS=`echo "$LIBS" | sed -e "s/[ 	][ 	]*/ /g" -e "s%-lXft %-lXft $cf_pkgconfig_libs %" -e 's%  % %g'`
19688test -n "$verbose" && echo "	...after  $LIBS" 1>&6
19689
19690echo "${as_me:-configure}:19690: testing ...after  $LIBS ..." 1>&5
19691
19692else
19693	cf_pkgconfig_incs=
19694	cf_pkgconfig_libs=
19695
19696test -n "$verbose" && echo "	...before $LIBS" 1>&6
19697
19698echo "${as_me:-configure}:19698: testing ...before $LIBS ..." 1>&5
19699
19700LIBS=`echo "$LIBS" | sed -e "s/[ 	][ 	]*/ /g" -e "s%-lXft %-lXft -lfontconfig %" -e 's%  % %g'`
19701test -n "$verbose" && echo "	...after  $LIBS" 1>&6
19702
19703echo "${as_me:-configure}:19703: testing ...after  $LIBS ..." 1>&5
19704
19705fi
19706
19707		;;
19708	esac
19709fi
19710fi
19711
19712else
19713	CPPFLAGS=`echo "$CPPFLAGS" | sed -e s/-DXRENDERFONT//`
19714fi
19715
19716echo "$as_me:19716: checking if you want support for HP-style function keys" >&5
19717echo $ECHO_N "checking if you want support for HP-style function keys... $ECHO_C" >&6
19718
19719# Check whether --enable-hp-fkeys or --disable-hp-fkeys was given.
19720if test "${enable_hp_fkeys+set}" = set; then
19721  enableval="$enable_hp_fkeys"
19722  test "$enableval" != yes && enableval=no
19723	if test "$enableval" != "no" ; then
19724    enable_hp_fkeys=yes
19725	else
19726		enable_hp_fkeys=no
19727	fi
19728else
19729  enableval=no
19730	enable_hp_fkeys=no
19731
19732fi;
19733echo "$as_me:19733: result: $enable_hp_fkeys" >&5
19734echo "${ECHO_T}$enable_hp_fkeys" >&6
19735if test "$enable_hp_fkeys" = yes ; then
19736
19737cat >>confdefs.h <<\EOF
19738#define OPT_HP_FUNC_KEYS 1
19739EOF
19740
19741fi
19742
19743echo "$as_me:19743: checking if you want support for SCO-style function keys" >&5
19744echo $ECHO_N "checking if you want support for SCO-style function keys... $ECHO_C" >&6
19745
19746# Check whether --enable-sco-fkeys or --disable-sco-fkeys was given.
19747if test "${enable_sco_fkeys+set}" = set; then
19748  enableval="$enable_sco_fkeys"
19749  test "$enableval" != yes && enableval=no
19750	if test "$enableval" != "no" ; then
19751    enable_sco_fkeys=yes
19752	else
19753		enable_sco_fkeys=no
19754	fi
19755else
19756  enableval=no
19757	enable_sco_fkeys=no
19758
19759fi;
19760echo "$as_me:19760: result: $enable_sco_fkeys" >&5
19761echo "${ECHO_T}$enable_sco_fkeys" >&6
19762if test "$enable_sco_fkeys" = yes ; then
19763
19764cat >>confdefs.h <<\EOF
19765#define OPT_SCO_FUNC_KEYS 1
19766EOF
19767
19768fi
19769
19770echo "$as_me:19770: checking if you want support for Sun-style function keys" >&5
19771echo $ECHO_N "checking if you want support for Sun-style function keys... $ECHO_C" >&6
19772
19773# Check whether --enable-sun-fkeys or --disable-sun-fkeys was given.
19774if test "${enable_sun_fkeys+set}" = set; then
19775  enableval="$enable_sun_fkeys"
19776  test "$enableval" != no && enableval=yes
19777	if test "$enableval" != "yes" ; then
19778    enable_sun_fkeys=no
19779	else
19780		enable_sun_fkeys=yes
19781	fi
19782else
19783  enableval=yes
19784	enable_sun_fkeys=yes
19785
19786fi;
19787echo "$as_me:19787: result: $enable_sun_fkeys" >&5
19788echo "${ECHO_T}$enable_sun_fkeys" >&6
19789if test "$enable_sun_fkeys" = no ; then
19790
19791cat >>confdefs.h <<\EOF
19792#define OPT_SUN_FUNC_KEYS 0
19793EOF
19794
19795fi
19796
19797echo "$as_me:19797: checking if you want saved-lines stored as a FIFO" >&5
19798echo $ECHO_N "checking if you want saved-lines stored as a FIFO... $ECHO_C" >&6
19799
19800# Check whether --enable-fifo-lines or --disable-fifo-lines was given.
19801if test "${enable_fifo_lines+set}" = set; then
19802  enableval="$enable_fifo_lines"
19803  test "$enableval" != no && enableval=yes
19804	if test "$enableval" != "yes" ; then
19805    enable_fifo_lines=no
19806	else
19807		enable_fifo_lines=yes
19808	fi
19809else
19810  enableval=yes
19811	enable_fifo_lines=yes
19812
19813fi;
19814echo "$as_me:19814: result: $enable_fifo_lines" >&5
19815echo "${ECHO_T}$enable_fifo_lines" >&6
19816if test "$enable_fifo_lines" = yes ; then
19817
19818cat >>confdefs.h <<\EOF
19819#define OPT_FIFO_LINES 1
19820EOF
19821
19822fi
19823
19824echo "$as_me:19824: checking if you want support for internationalization" >&5
19825echo $ECHO_N "checking if you want support for internationalization... $ECHO_C" >&6
19826
19827# Check whether --enable-i18n or --disable-i18n was given.
19828if test "${enable_i18n+set}" = set; then
19829  enableval="$enable_i18n"
19830  test "$enableval" != no && enableval=yes
19831	if test "$enableval" != "yes" ; then
19832    enable_i18n=no
19833	else
19834		enable_i18n=yes
19835	fi
19836else
19837  enableval=yes
19838	enable_i18n=yes
19839
19840fi;
19841echo "$as_me:19841: result: $enable_i18n" >&5
19842echo "${ECHO_T}$enable_i18n" >&6
19843if test "$enable_i18n" = no ; then
19844
19845cat >>confdefs.h <<\EOF
19846#define OPT_I18N_SUPPORT 0
19847EOF
19848
19849fi
19850
19851echo "$as_me:19851: checking if you want support for initial-erase setup" >&5
19852echo $ECHO_N "checking if you want support for initial-erase setup... $ECHO_C" >&6
19853
19854# Check whether --enable-initial-erase or --disable-initial-erase was given.
19855if test "${enable_initial_erase+set}" = set; then
19856  enableval="$enable_initial_erase"
19857  test "$enableval" != no && enableval=yes
19858	if test "$enableval" != "yes" ; then
19859    enable_ie=no
19860	else
19861		enable_ie=yes
19862	fi
19863else
19864  enableval=yes
19865	enable_ie=yes
19866
19867fi;
19868echo "$as_me:19868: result: $enable_ie" >&5
19869echo "${ECHO_T}$enable_ie" >&6
19870if test "$enable_ie" = no ; then
19871
19872cat >>confdefs.h <<\EOF
19873#define OPT_INITIAL_ERASE 0
19874EOF
19875
19876fi
19877
19878echo "$as_me:19878: checking if you want support for input-method" >&5
19879echo $ECHO_N "checking if you want support for input-method... $ECHO_C" >&6
19880
19881# Check whether --enable-input-method or --disable-input-method was given.
19882if test "${enable_input_method+set}" = set; then
19883  enableval="$enable_input_method"
19884  test "$enableval" != no && enableval=yes
19885	if test "$enableval" != "yes" ; then
19886    enable_ximp=no
19887	else
19888		enable_ximp=$enable_i18n
19889	fi
19890else
19891  enableval=yes
19892	enable_ximp=$enable_i18n
19893
19894fi;
19895echo "$as_me:19895: result: $enable_ximp" >&5
19896echo "${ECHO_T}$enable_ximp" >&6
19897
19898echo "$as_me:19898: checking if X libraries support input-method" >&5
19899echo $ECHO_N "checking if X libraries support input-method... $ECHO_C" >&6
19900if test "${cf_cv_input_method+set}" = set; then
19901  echo $ECHO_N "(cached) $ECHO_C" >&6
19902else
19903
19904cat >"conftest.$ac_ext" <<_ACEOF
19905#line 19905 "configure"
19906#include "confdefs.h"
19907
19908#include <X11/IntrinsicP.h>
19909#include <X11/Xatom.h>
19910#include <X11/Xutil.h>
19911#include <X11/Xmu/Atoms.h>
19912#include <X11/Xmu/Converters.h>
19913#include <X11/Xaw/XawImP.h>
19914
19915int
19916main (void)
19917{
19918
19919{
19920	XIM xim;
19921	XIMStyles *xim_styles = 0;
19922	XIMStyle input_style;
19923	Widget w = XtCreateWidget("none", (WidgetClass)0, None, (ArgList)0, 0);
19924
19925	XSetLocaleModifiers("@im=none");
19926	xim = XOpenIM(XtDisplay(w), NULL, NULL, NULL);
19927	XGetIMValues(xim, XNQueryInputStyle, &xim_styles, NULL);
19928	XCloseIM(xim);
19929	input_style = (XIMPreeditNothing | XIMStatusNothing);
19930	(void)xim_styles;
19931	(void)input_style;
19932}
19933
19934  ;
19935  return 0;
19936}
19937_ACEOF
19938rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19939if { (eval echo "$as_me:19939: \"$ac_link\"") >&5
19940  (eval $ac_link) 2>&5
19941  ac_status=$?
19942  echo "$as_me:19942: \$? = $ac_status" >&5
19943  (exit "$ac_status"); } &&
19944         { ac_try='test -s "conftest$ac_exeext"'
19945  { (eval echo "$as_me:19945: \"$ac_try\"") >&5
19946  (eval $ac_try) 2>&5
19947  ac_status=$?
19948  echo "$as_me:19948: \$? = $ac_status" >&5
19949  (exit "$ac_status"); }; }; then
19950  cf_cv_input_method=yes
19951else
19952  echo "$as_me: failed program was:" >&5
19953cat "conftest.$ac_ext" >&5
19954cf_cv_input_method=no
19955fi
19956rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19957fi
19958echo "$as_me:19958: result: $cf_cv_input_method" >&5
19959echo "${ECHO_T}$cf_cv_input_method" >&6
19960
19961test "$cf_cv_input_method" = no && enable_ximp=no
19962if test "$enable_ximp" != no ; then
19963	if test "$enable_i18n" = no ; then
19964		{ echo "$as_me:19964: WARNING: input-methor relies upon internationalization" >&5
19965echo "$as_me: WARNING: input-methor relies upon internationalization" >&2;}
19966		enable_ximp=no
19967	fi
19968fi
19969if test "$enable_ximp" = no ; then
19970
19971cat >>confdefs.h <<\EOF
19972#define OPT_INPUT_METHOD 0
19973EOF
19974
19975fi
19976
19977echo "$as_me:19977: checking if you want support for load-vt-fonts" >&5
19978echo $ECHO_N "checking if you want support for load-vt-fonts... $ECHO_C" >&6
19979
19980# Check whether --enable-load-vt-fonts or --disable-load-vt-fonts was given.
19981if test "${enable_load_vt_fonts+set}" = set; then
19982  enableval="$enable_load_vt_fonts"
19983  test "$enableval" != yes && enableval=no
19984	if test "$enableval" != "no" ; then
19985    enable_load_vt_fonts=yes
19986	else
19987		enable_load_vt_fonts=no
19988	fi
19989else
19990  enableval=no
19991	enable_load_vt_fonts=no
19992
19993fi;
19994echo "$as_me:19994: result: $enable_load_vt_fonts" >&5
19995echo "${ECHO_T}$enable_load_vt_fonts" >&6
19996if test "$enable_load_vt_fonts" = yes ; then
19997
19998cat >>confdefs.h <<\EOF
19999#define OPT_LOAD_VTFONTS 1
20000EOF
20001
20002fi
20003
20004echo "$as_me:20004: checking if you want support for logging" >&5
20005echo $ECHO_N "checking if you want support for logging... $ECHO_C" >&6
20006
20007# Check whether --enable-logging or --disable-logging was given.
20008if test "${enable_logging+set}" = set; then
20009  enableval="$enable_logging"
20010  test "$enableval" != yes && enableval=no
20011	if test "$enableval" != "no" ; then
20012    enable_logging=yes
20013	else
20014		enable_logging=no
20015	fi
20016else
20017  enableval=no
20018	enable_logging=no
20019
20020fi;
20021echo "$as_me:20021: result: $enable_logging" >&5
20022echo "${ECHO_T}$enable_logging" >&6
20023if test "$enable_logging" = yes ; then
20024
20025cat >>confdefs.h <<\EOF
20026#define ALLOWLOGGING 1
20027EOF
20028
20029	echo "$as_me:20029: checking if you want to allow logging via a pipe" >&5
20030echo $ECHO_N "checking if you want to allow logging via a pipe... $ECHO_C" >&6
20031
20032# Check whether --enable-logfile-exec or --disable-logfile-exec was given.
20033if test "${enable_logfile_exec+set}" = set; then
20034  enableval="$enable_logfile_exec"
20035  test "$enableval" != yes && enableval=no
20036	if test "$enableval" != "no" ; then
20037    enable_log_exec=yes
20038	else
20039		enable_log_exec=no
20040	fi
20041else
20042  enableval=no
20043	enable_log_exec=no
20044
20045fi;
20046	echo "$as_me:20046: result: $enable_log_exec" >&5
20047echo "${ECHO_T}$enable_log_exec" >&6
20048	if test "$enable_log_exec" = yes ; then
20049
20050cat >>confdefs.h <<\EOF
20051#define ALLOWLOGFILEEXEC 1
20052EOF
20053
20054	fi
20055fi
20056
20057echo "$as_me:20057: checking if you want support for iconify/maximize translations" >&5
20058echo $ECHO_N "checking if you want support for iconify/maximize translations... $ECHO_C" >&6
20059
20060# Check whether --enable-maximize or --disable-maximize was given.
20061if test "${enable_maximize+set}" = set; then
20062  enableval="$enable_maximize"
20063  test "$enableval" != no && enableval=yes
20064	if test "$enableval" != "yes" ; then
20065    enable_maximize=no
20066	else
20067		enable_maximize=yes
20068	fi
20069else
20070  enableval=yes
20071	enable_maximize=yes
20072
20073fi;
20074echo "$as_me:20074: result: $enable_maximize" >&5
20075echo "${ECHO_T}$enable_maximize" >&6
20076test "$enable_maximize" = no &&
20077cat >>confdefs.h <<\EOF
20078#define OPT_MAXIMIZE 0
20079EOF
20080
20081echo "$as_me:20081: checking if you want NumLock to override keyboard tables" >&5
20082echo $ECHO_N "checking if you want NumLock to override keyboard tables... $ECHO_C" >&6
20083
20084# Check whether --enable-num-lock or --disable-num-lock was given.
20085if test "${enable_num_lock+set}" = set; then
20086  enableval="$enable_num_lock"
20087  test "$enableval" != no && enableval=yes
20088	if test "$enableval" != "yes" ; then
20089    enable_numlock=no
20090	else
20091		enable_numlock=yes
20092	fi
20093else
20094  enableval=yes
20095	enable_numlock=yes
20096
20097fi;
20098echo "$as_me:20098: result: $enable_numlock" >&5
20099echo "${ECHO_T}$enable_numlock" >&6
20100test "$enable_numlock" = no &&
20101cat >>confdefs.h <<\EOF
20102#define OPT_NUM_LOCK 0
20103EOF
20104
20105echo "$as_me:20105: checking if you want support for get/set of base64 selection data" >&5
20106echo $ECHO_N "checking if you want support for get/set of base64 selection data... $ECHO_C" >&6
20107
20108# Check whether --enable-paste64 or --disable-paste64 was given.
20109if test "${enable_paste64+set}" = set; then
20110  enableval="$enable_paste64"
20111  test "$enableval" != no && enableval=yes
20112	if test "$enableval" != "yes" ; then
20113    enable_paste64=no
20114	else
20115		enable_paste64=yes
20116	fi
20117else
20118  enableval=yes
20119	enable_paste64=yes
20120
20121fi;
20122echo "$as_me:20122: result: $enable_paste64" >&5
20123echo "${ECHO_T}$enable_paste64" >&6
20124if test "$enable_paste64" = yes ; then
20125
20126cat >>confdefs.h <<\EOF
20127#define OPT_PASTE64 1
20128EOF
20129
20130else
20131
20132cat >>confdefs.h <<\EOF
20133#define OPT_PASTE64 0
20134EOF
20135
20136fi
20137
20138echo "$as_me:20138: checking if you want support for pty-handshaking" >&5
20139echo $ECHO_N "checking if you want support for pty-handshaking... $ECHO_C" >&6
20140
20141# Check whether --enable-pty-handshake or --disable-pty-handshake was given.
20142if test "${enable_pty_handshake+set}" = set; then
20143  enableval="$enable_pty_handshake"
20144  test "$enableval" != no && enableval=yes
20145	if test "$enableval" != "yes" ; then
20146    enable_pty_handshake=no
20147	else
20148		enable_pty_handshake=yes
20149	fi
20150else
20151  enableval=yes
20152	enable_pty_handshake=yes
20153
20154fi;
20155echo "$as_me:20155: result: $enable_pty_handshake" >&5
20156echo "${ECHO_T}$enable_pty_handshake" >&6
20157if test "$enable_pty_handshake" = yes ; then
20158
20159cat >>confdefs.h <<\EOF
20160#define OPT_PTY_HANDSHAKE 1
20161EOF
20162
20163else
20164
20165cat >>confdefs.h <<\EOF
20166#define OPT_PTY_HANDSHAKE 0
20167EOF
20168
20169fi
20170
20171echo "$as_me:20171: checking if you want support for mouse in readline applications" >&5
20172echo $ECHO_N "checking if you want support for mouse in readline applications... $ECHO_C" >&6
20173
20174# Check whether --enable-readline-mouse or --disable-readline-mouse was given.
20175if test "${enable_readline_mouse+set}" = set; then
20176  enableval="$enable_readline_mouse"
20177  test "$enableval" != yes && enableval=no
20178	if test "$enableval" != "no" ; then
20179    enable_readline_mouse=yes
20180	else
20181		enable_readline_mouse=no
20182	fi
20183else
20184  enableval=no
20185	enable_readline_mouse=no
20186
20187fi;
20188echo "$as_me:20188: result: $enable_readline_mouse" >&5
20189echo "${ECHO_T}$enable_readline_mouse" >&6
20190if test "$enable_readline_mouse" = yes ; then
20191
20192cat >>confdefs.h <<\EOF
20193#define OPT_READLINE 1
20194EOF
20195
20196fi
20197
20198echo "$as_me:20198: checking if you want support for regular-expression selections" >&5
20199echo $ECHO_N "checking if you want support for regular-expression selections... $ECHO_C" >&6
20200
20201# Check whether --enable-regex or --disable-regex was given.
20202if test "${enable_regex+set}" = set; then
20203  enableval="$enable_regex"
20204  test "$enableval" != no && enableval=yes
20205	if test "$enableval" != "yes" ; then
20206    enable_regex=no
20207	else
20208		enable_regex=yes
20209	fi
20210else
20211  enableval=yes
20212	enable_regex=yes
20213
20214fi;
20215echo "$as_me:20215: result: $enable_regex" >&5
20216echo "${ECHO_T}$enable_regex" >&6
20217if test "$enable_regex" = yes ; then
20218
20219echo "$as_me:20219: checking if you want to use PCRE2 for regular-expressions" >&5
20220echo $ECHO_N "checking if you want to use PCRE2 for regular-expressions... $ECHO_C" >&6
20221
20222# Check whether --with-pcre2 or --without-pcre2 was given.
20223if test "${with_pcre2+set}" = set; then
20224  withval="$with_pcre2"
20225
20226fi;
20227test -z "$with_pcre2" && with_pcre2=no
20228echo "$as_me:20228: result: $with_pcre2" >&5
20229echo "${ECHO_T}$with_pcre2" >&6
20230
20231if test "x$with_pcre2" != xno ; then
20232	cf_with_pcre2_ok=no
20233	for cf_with_pcre2 in libpcre2 libpcre2-posix libpcre
20234	do
20235
20236if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "$cf_with_pcre2"; then
20237	test -n "$verbose" && echo "	found package $cf_with_pcre2" 1>&6
20238
20239echo "${as_me:-configure}:20239: testing found package $cf_with_pcre2 ..." 1>&5
20240
20241	cf_pkgconfig_incs="`$PKG_CONFIG --cflags "$cf_with_pcre2" 2>/dev/null`"
20242	cf_pkgconfig_libs="`$PKG_CONFIG --libs   "$cf_with_pcre2" 2>/dev/null`"
20243	test -n "$verbose" && echo "	package $cf_with_pcre2 CFLAGS: $cf_pkgconfig_incs" 1>&6
20244
20245echo "${as_me:-configure}:20245: testing package $cf_with_pcre2 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
20246
20247	test -n "$verbose" && echo "	package $cf_with_pcre2 LIBS: $cf_pkgconfig_libs" 1>&6
20248
20249echo "${as_me:-configure}:20249: testing package $cf_with_pcre2 LIBS: $cf_pkgconfig_libs ..." 1>&5
20250
20251cf_fix_cppflags=no
20252cf_new_cflags=
20253cf_new_cppflags=
20254cf_new_extra_cppflags=
20255
20256for cf_add_cflags in $cf_pkgconfig_incs
20257do
20258case "$cf_fix_cppflags" in
20259(no)
20260	case "$cf_add_cflags" in
20261	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
20262		case "$cf_add_cflags" in
20263		(-D*)
20264			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
20265
20266			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20267				&& test -z "${cf_tst_cflags}" \
20268				&& cf_fix_cppflags=yes
20269
20270			if test "$cf_fix_cppflags" = yes ; 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			elif test "${cf_tst_cflags}" = "\"'" ; then
20277
20278	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20279	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20280
20281				continue
20282			fi
20283			;;
20284		esac
20285		case "$CPPFLAGS" in
20286		(*$cf_add_cflags)
20287			;;
20288		(*)
20289			case "$cf_add_cflags" in
20290			(-D*)
20291				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
20292
20293CPPFLAGS=`echo "$CPPFLAGS" | \
20294	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
20295		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
20296
20297				;;
20298			esac
20299
20300	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
20301	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
20302
20303			;;
20304		esac
20305		;;
20306	(*)
20307
20308	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
20309	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
20310
20311		;;
20312	esac
20313	;;
20314(yes)
20315
20316	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20317	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20318
20319	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
20320
20321	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20322		&& test -z "${cf_tst_cflags}" \
20323		&& cf_fix_cppflags=no
20324	;;
20325esac
20326done
20327
20328if test -n "$cf_new_cflags" ; then
20329
20330	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
20331	CFLAGS="${CFLAGS}$cf_new_cflags"
20332
20333fi
20334
20335if test -n "$cf_new_cppflags" ; then
20336
20337	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
20338	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
20339
20340fi
20341
20342if test -n "$cf_new_extra_cppflags" ; then
20343
20344	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
20345	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
20346
20347fi
20348
20349cf_add_libs="$LIBS"
20350# reverse order
20351cf_add_0lib=
20352for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
20353# filter duplicates
20354for cf_add_1lib in $cf_add_0lib; do
20355	for cf_add_2lib in $cf_add_libs; do
20356		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
20357			cf_add_1lib=
20358			break
20359		fi
20360	done
20361	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
20362done
20363LIBS="$cf_add_libs"
20364
20365	cf_with_pcre2_ok=yes; break
20366else
20367	cf_pkgconfig_incs=
20368	cf_pkgconfig_libs=
20369	:
20370fi
20371
20372	done
20373	cf_with_pcre2_ok=yes || { { echo "$as_me:20373: error: Cannot find PCRE2 library" >&5
20374echo "$as_me: error: Cannot find PCRE2 library" >&2;}
20375   { (exit 1); exit 1; }; }
20376
20377cat >>confdefs.h <<\EOF
20378#define HAVE_LIB_PCRE2 1
20379EOF
20380
20381	# if pkgconfig gave no results, look for the libraries directly
20382	case "$LIBS" in
20383	(*pcre2-posix*|*pcreposix*)
20384		;;
20385	(*)
20386		echo "$as_me:20386: checking for regcomp in -lpcre2-posix" >&5
20387echo $ECHO_N "checking for regcomp in -lpcre2-posix... $ECHO_C" >&6
20388if test "${ac_cv_lib_pcre2_posix_regcomp+set}" = set; then
20389  echo $ECHO_N "(cached) $ECHO_C" >&6
20390else
20391  ac_check_lib_save_LIBS=$LIBS
20392LIBS="-lpcre2-posix  $LIBS"
20393cat >"conftest.$ac_ext" <<_ACEOF
20394#line 20394 "configure"
20395#include "confdefs.h"
20396
20397/* Override any gcc2 internal prototype to avoid an error.  */
20398#ifdef __cplusplus
20399extern "C"
20400#endif
20401/* We use char because int might match the return type of a gcc2
20402   builtin and then its argument prototype would still apply.  */
20403char regcomp ();
20404int
20405main (void)
20406{
20407regcomp ();
20408  ;
20409  return 0;
20410}
20411_ACEOF
20412rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20413if { (eval echo "$as_me:20413: \"$ac_link\"") >&5
20414  (eval $ac_link) 2>&5
20415  ac_status=$?
20416  echo "$as_me:20416: \$? = $ac_status" >&5
20417  (exit "$ac_status"); } &&
20418         { ac_try='test -s "conftest$ac_exeext"'
20419  { (eval echo "$as_me:20419: \"$ac_try\"") >&5
20420  (eval $ac_try) 2>&5
20421  ac_status=$?
20422  echo "$as_me:20422: \$? = $ac_status" >&5
20423  (exit "$ac_status"); }; }; then
20424  ac_cv_lib_pcre2_posix_regcomp=yes
20425else
20426  echo "$as_me: failed program was:" >&5
20427cat "conftest.$ac_ext" >&5
20428ac_cv_lib_pcre2_posix_regcomp=no
20429fi
20430rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20431LIBS=$ac_check_lib_save_LIBS
20432fi
20433echo "$as_me:20433: result: $ac_cv_lib_pcre2_posix_regcomp" >&5
20434echo "${ECHO_T}$ac_cv_lib_pcre2_posix_regcomp" >&6
20435if test "$ac_cv_lib_pcre2_posix_regcomp" = yes; then
20436
20437cf_add_libs="$LIBS"
20438# reverse order
20439cf_add_0lib=
20440for cf_add_1lib in -lpcre2-posix; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
20441# filter duplicates
20442for cf_add_1lib in $cf_add_0lib; do
20443	for cf_add_2lib in $cf_add_libs; do
20444		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
20445			cf_add_1lib=
20446			break
20447		fi
20448	done
20449	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
20450done
20451LIBS="$cf_add_libs"
20452
20453else
20454  echo "$as_me:20454: checking for regcomp in -lpcreposix" >&5
20455echo $ECHO_N "checking for regcomp in -lpcreposix... $ECHO_C" >&6
20456if test "${ac_cv_lib_pcreposix_regcomp+set}" = set; then
20457  echo $ECHO_N "(cached) $ECHO_C" >&6
20458else
20459  ac_check_lib_save_LIBS=$LIBS
20460LIBS="-lpcreposix  $LIBS"
20461cat >"conftest.$ac_ext" <<_ACEOF
20462#line 20462 "configure"
20463#include "confdefs.h"
20464
20465/* Override any gcc2 internal prototype to avoid an error.  */
20466#ifdef __cplusplus
20467extern "C"
20468#endif
20469/* We use char because int might match the return type of a gcc2
20470   builtin and then its argument prototype would still apply.  */
20471char regcomp ();
20472int
20473main (void)
20474{
20475regcomp ();
20476  ;
20477  return 0;
20478}
20479_ACEOF
20480rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20481if { (eval echo "$as_me:20481: \"$ac_link\"") >&5
20482  (eval $ac_link) 2>&5
20483  ac_status=$?
20484  echo "$as_me:20484: \$? = $ac_status" >&5
20485  (exit "$ac_status"); } &&
20486         { ac_try='test -s "conftest$ac_exeext"'
20487  { (eval echo "$as_me:20487: \"$ac_try\"") >&5
20488  (eval $ac_try) 2>&5
20489  ac_status=$?
20490  echo "$as_me:20490: \$? = $ac_status" >&5
20491  (exit "$ac_status"); }; }; then
20492  ac_cv_lib_pcreposix_regcomp=yes
20493else
20494  echo "$as_me: failed program was:" >&5
20495cat "conftest.$ac_ext" >&5
20496ac_cv_lib_pcreposix_regcomp=no
20497fi
20498rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20499LIBS=$ac_check_lib_save_LIBS
20500fi
20501echo "$as_me:20501: result: $ac_cv_lib_pcreposix_regcomp" >&5
20502echo "${ECHO_T}$ac_cv_lib_pcreposix_regcomp" >&6
20503if test "$ac_cv_lib_pcreposix_regcomp" = yes; then
20504
20505cf_add_libs="$LIBS"
20506# reverse order
20507cf_add_0lib=
20508for cf_add_1lib in -lpcreposix; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
20509# filter duplicates
20510for cf_add_1lib in $cf_add_0lib; do
20511	for cf_add_2lib in $cf_add_libs; do
20512		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
20513			cf_add_1lib=
20514			break
20515		fi
20516	done
20517	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
20518done
20519LIBS="$cf_add_libs"
20520
20521else
20522  { { echo "$as_me:20522: error: Cannot find PCRE2 POSIX library" >&5
20523echo "$as_me: error: Cannot find PCRE2 POSIX library" >&2;}
20524   { (exit 1); exit 1; }; }
20525fi
20526
20527fi
20528
20529		;;
20530	esac
20531
20532	# either way, check for the library header files
20533
20534for ac_header in pcre2posix.h pcreposix.h
20535do
20536as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20537echo "$as_me:20537: checking for $ac_header" >&5
20538echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20539if eval "test \"\${$as_ac_Header+set}\" = set"; then
20540  echo $ECHO_N "(cached) $ECHO_C" >&6
20541else
20542  cat >"conftest.$ac_ext" <<_ACEOF
20543#line 20543 "configure"
20544#include "confdefs.h"
20545#include <$ac_header>
20546_ACEOF
20547if { (eval echo "$as_me:20547: \"$ac_cpp "conftest.$ac_ext"\"") >&5
20548  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
20549  ac_status=$?
20550  $EGREP -v '^ *\+' conftest.er1 >conftest.err
20551  rm -f conftest.er1
20552  cat conftest.err >&5
20553  echo "$as_me:20553: \$? = $ac_status" >&5
20554  (exit "$ac_status"); } >/dev/null; then
20555  if test -s conftest.err; then
20556    ac_cpp_err=$ac_c_preproc_warn_flag
20557  else
20558    ac_cpp_err=
20559  fi
20560else
20561  ac_cpp_err=yes
20562fi
20563if test -z "$ac_cpp_err"; then
20564  eval "$as_ac_Header=yes"
20565else
20566  echo "$as_me: failed program was:" >&5
20567  cat "conftest.$ac_ext" >&5
20568  eval "$as_ac_Header=no"
20569fi
20570rm -f conftest.err "conftest.$ac_ext"
20571fi
20572echo "$as_me:20572: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
20573echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
20574if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
20575  cat >>confdefs.h <<EOF
20576#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20577EOF
20578
20579fi
20580done
20581
20582fi
20583
20584	if test "$with_pcre2" = no ; then
20585
20586echo "$as_me:20586: checking if you want to use PCRE for regular-expressions" >&5
20587echo $ECHO_N "checking if you want to use PCRE for regular-expressions... $ECHO_C" >&6
20588
20589# Check whether --with-pcre or --without-pcre was given.
20590if test "${with_pcre+set}" = set; then
20591  withval="$with_pcre"
20592
20593fi;
20594test -z "$with_pcre" && with_pcre=no
20595echo "$as_me:20595: result: $with_pcre" >&5
20596echo "${ECHO_T}$with_pcre" >&6
20597
20598if test "$with_pcre" != no ; then
20599
20600if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "libpcre"; then
20601	test -n "$verbose" && echo "	found package libpcre" 1>&6
20602
20603echo "${as_me:-configure}:20603: testing found package libpcre ..." 1>&5
20604
20605	cf_pkgconfig_incs="`$PKG_CONFIG --cflags "libpcre" 2>/dev/null`"
20606	cf_pkgconfig_libs="`$PKG_CONFIG --libs   "libpcre" 2>/dev/null`"
20607	test -n "$verbose" && echo "	package libpcre CFLAGS: $cf_pkgconfig_incs" 1>&6
20608
20609echo "${as_me:-configure}:20609: testing package libpcre CFLAGS: $cf_pkgconfig_incs ..." 1>&5
20610
20611	test -n "$verbose" && echo "	package libpcre LIBS: $cf_pkgconfig_libs" 1>&6
20612
20613echo "${as_me:-configure}:20613: testing package libpcre LIBS: $cf_pkgconfig_libs ..." 1>&5
20614
20615cf_fix_cppflags=no
20616cf_new_cflags=
20617cf_new_cppflags=
20618cf_new_extra_cppflags=
20619
20620for cf_add_cflags in $cf_pkgconfig_incs
20621do
20622case "$cf_fix_cppflags" in
20623(no)
20624	case "$cf_add_cflags" in
20625	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
20626		case "$cf_add_cflags" in
20627		(-D*)
20628			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
20629
20630			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20631				&& test -z "${cf_tst_cflags}" \
20632				&& cf_fix_cppflags=yes
20633
20634			if test "$cf_fix_cppflags" = yes ; 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			elif test "${cf_tst_cflags}" = "\"'" ; then
20641
20642	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20643	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20644
20645				continue
20646			fi
20647			;;
20648		esac
20649		case "$CPPFLAGS" in
20650		(*$cf_add_cflags)
20651			;;
20652		(*)
20653			case "$cf_add_cflags" in
20654			(-D*)
20655				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
20656
20657CPPFLAGS=`echo "$CPPFLAGS" | \
20658	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
20659		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
20660
20661				;;
20662			esac
20663
20664	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
20665	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
20666
20667			;;
20668		esac
20669		;;
20670	(*)
20671
20672	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
20673	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
20674
20675		;;
20676	esac
20677	;;
20678(yes)
20679
20680	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20681	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20682
20683	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
20684
20685	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20686		&& test -z "${cf_tst_cflags}" \
20687		&& cf_fix_cppflags=no
20688	;;
20689esac
20690done
20691
20692if test -n "$cf_new_cflags" ; then
20693
20694	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
20695	CFLAGS="${CFLAGS}$cf_new_cflags"
20696
20697fi
20698
20699if test -n "$cf_new_cppflags" ; then
20700
20701	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
20702	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
20703
20704fi
20705
20706if test -n "$cf_new_extra_cppflags" ; then
20707
20708	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
20709	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
20710
20711fi
20712
20713cf_add_libs="$LIBS"
20714# reverse order
20715cf_add_0lib=
20716for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
20717# filter duplicates
20718for cf_add_1lib in $cf_add_0lib; do
20719	for cf_add_2lib in $cf_add_libs; do
20720		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
20721			cf_add_1lib=
20722			break
20723		fi
20724	done
20725	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
20726done
20727LIBS="$cf_add_libs"
20728
20729	:
20730else
20731	cf_pkgconfig_incs=
20732	cf_pkgconfig_libs=
20733
20734echo "$as_me:20734: checking for pcre_compile in -lpcre" >&5
20735echo $ECHO_N "checking for pcre_compile in -lpcre... $ECHO_C" >&6
20736if test "${ac_cv_lib_pcre_pcre_compile+set}" = set; then
20737  echo $ECHO_N "(cached) $ECHO_C" >&6
20738else
20739  ac_check_lib_save_LIBS=$LIBS
20740LIBS="-lpcre  $LIBS"
20741cat >"conftest.$ac_ext" <<_ACEOF
20742#line 20742 "configure"
20743#include "confdefs.h"
20744
20745/* Override any gcc2 internal prototype to avoid an error.  */
20746#ifdef __cplusplus
20747extern "C"
20748#endif
20749/* We use char because int might match the return type of a gcc2
20750   builtin and then its argument prototype would still apply.  */
20751char pcre_compile ();
20752int
20753main (void)
20754{
20755pcre_compile ();
20756  ;
20757  return 0;
20758}
20759_ACEOF
20760rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20761if { (eval echo "$as_me:20761: \"$ac_link\"") >&5
20762  (eval $ac_link) 2>&5
20763  ac_status=$?
20764  echo "$as_me:20764: \$? = $ac_status" >&5
20765  (exit "$ac_status"); } &&
20766         { ac_try='test -s "conftest$ac_exeext"'
20767  { (eval echo "$as_me:20767: \"$ac_try\"") >&5
20768  (eval $ac_try) 2>&5
20769  ac_status=$?
20770  echo "$as_me:20770: \$? = $ac_status" >&5
20771  (exit "$ac_status"); }; }; then
20772  ac_cv_lib_pcre_pcre_compile=yes
20773else
20774  echo "$as_me: failed program was:" >&5
20775cat "conftest.$ac_ext" >&5
20776ac_cv_lib_pcre_pcre_compile=no
20777fi
20778rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20779LIBS=$ac_check_lib_save_LIBS
20780fi
20781echo "$as_me:20781: result: $ac_cv_lib_pcre_pcre_compile" >&5
20782echo "${ECHO_T}$ac_cv_lib_pcre_pcre_compile" >&6
20783if test "$ac_cv_lib_pcre_pcre_compile" = yes; then
20784  cat >>confdefs.h <<EOF
20785#define HAVE_LIBPCRE 1
20786EOF
20787
20788  LIBS="-lpcre $LIBS"
20789
20790else
20791  { { echo "$as_me:20791: error: Cannot find PCRE library" >&5
20792echo "$as_me: error: Cannot find PCRE library" >&2;}
20793   { (exit 1); exit 1; }; }
20794fi
20795
20796fi
20797
20798cat >>confdefs.h <<\EOF
20799#define HAVE_LIB_PCRE 1
20800EOF
20801
20802	case $LIBS in
20803	(*pcreposix*)
20804		;;
20805	(*)
20806		echo "$as_me:20806: checking for pcreposix_regcomp in -lpcreposix" >&5
20807echo $ECHO_N "checking for pcreposix_regcomp in -lpcreposix... $ECHO_C" >&6
20808if test "${ac_cv_lib_pcreposix_pcreposix_regcomp+set}" = set; then
20809  echo $ECHO_N "(cached) $ECHO_C" >&6
20810else
20811  ac_check_lib_save_LIBS=$LIBS
20812LIBS="-lpcreposix  $LIBS"
20813cat >"conftest.$ac_ext" <<_ACEOF
20814#line 20814 "configure"
20815#include "confdefs.h"
20816
20817/* Override any gcc2 internal prototype to avoid an error.  */
20818#ifdef __cplusplus
20819extern "C"
20820#endif
20821/* We use char because int might match the return type of a gcc2
20822   builtin and then its argument prototype would still apply.  */
20823char pcreposix_regcomp ();
20824int
20825main (void)
20826{
20827pcreposix_regcomp ();
20828  ;
20829  return 0;
20830}
20831_ACEOF
20832rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20833if { (eval echo "$as_me:20833: \"$ac_link\"") >&5
20834  (eval $ac_link) 2>&5
20835  ac_status=$?
20836  echo "$as_me:20836: \$? = $ac_status" >&5
20837  (exit "$ac_status"); } &&
20838         { ac_try='test -s "conftest$ac_exeext"'
20839  { (eval echo "$as_me:20839: \"$ac_try\"") >&5
20840  (eval $ac_try) 2>&5
20841  ac_status=$?
20842  echo "$as_me:20842: \$? = $ac_status" >&5
20843  (exit "$ac_status"); }; }; then
20844  ac_cv_lib_pcreposix_pcreposix_regcomp=yes
20845else
20846  echo "$as_me: failed program was:" >&5
20847cat "conftest.$ac_ext" >&5
20848ac_cv_lib_pcreposix_pcreposix_regcomp=no
20849fi
20850rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20851LIBS=$ac_check_lib_save_LIBS
20852fi
20853echo "$as_me:20853: result: $ac_cv_lib_pcreposix_pcreposix_regcomp" >&5
20854echo "${ECHO_T}$ac_cv_lib_pcreposix_pcreposix_regcomp" >&6
20855if test "$ac_cv_lib_pcreposix_pcreposix_regcomp" = yes; then
20856
20857cat >>confdefs.h <<\EOF
20858#define HAVE_PCREPOSIX_H 1
20859EOF
20860
20861cf_add_libs="$LIBS"
20862# reverse order
20863cf_add_0lib=
20864for cf_add_1lib in -lpcreposix; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
20865# filter duplicates
20866for cf_add_1lib in $cf_add_0lib; do
20867	for cf_add_2lib in $cf_add_libs; do
20868		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
20869			cf_add_1lib=
20870			break
20871		fi
20872	done
20873	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
20874done
20875LIBS="$cf_add_libs"
20876
20877else
20878  echo "$as_me:20878: checking for regcomp in -lpcreposix" >&5
20879echo $ECHO_N "checking for regcomp in -lpcreposix... $ECHO_C" >&6
20880if test "${ac_cv_lib_pcreposix_regcomp+set}" = set; then
20881  echo $ECHO_N "(cached) $ECHO_C" >&6
20882else
20883  ac_check_lib_save_LIBS=$LIBS
20884LIBS="-lpcreposix  $LIBS"
20885cat >"conftest.$ac_ext" <<_ACEOF
20886#line 20886 "configure"
20887#include "confdefs.h"
20888
20889/* Override any gcc2 internal prototype to avoid an error.  */
20890#ifdef __cplusplus
20891extern "C"
20892#endif
20893/* We use char because int might match the return type of a gcc2
20894   builtin and then its argument prototype would still apply.  */
20895char regcomp ();
20896int
20897main (void)
20898{
20899regcomp ();
20900  ;
20901  return 0;
20902}
20903_ACEOF
20904rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20905if { (eval echo "$as_me:20905: \"$ac_link\"") >&5
20906  (eval $ac_link) 2>&5
20907  ac_status=$?
20908  echo "$as_me:20908: \$? = $ac_status" >&5
20909  (exit "$ac_status"); } &&
20910         { ac_try='test -s "conftest$ac_exeext"'
20911  { (eval echo "$as_me:20911: \"$ac_try\"") >&5
20912  (eval $ac_try) 2>&5
20913  ac_status=$?
20914  echo "$as_me:20914: \$? = $ac_status" >&5
20915  (exit "$ac_status"); }; }; then
20916  ac_cv_lib_pcreposix_regcomp=yes
20917else
20918  echo "$as_me: failed program was:" >&5
20919cat "conftest.$ac_ext" >&5
20920ac_cv_lib_pcreposix_regcomp=no
20921fi
20922rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20923LIBS=$ac_check_lib_save_LIBS
20924fi
20925echo "$as_me:20925: result: $ac_cv_lib_pcreposix_regcomp" >&5
20926echo "${ECHO_T}$ac_cv_lib_pcreposix_regcomp" >&6
20927if test "$ac_cv_lib_pcreposix_regcomp" = yes; then
20928
20929cat >>confdefs.h <<\EOF
20930#define HAVE_PCREPOSIX_H 1
20931EOF
20932
20933cf_add_libs="$LIBS"
20934# reverse order
20935cf_add_0lib=
20936for cf_add_1lib in -lpcreposix; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
20937# filter duplicates
20938for cf_add_1lib in $cf_add_0lib; do
20939	for cf_add_2lib in $cf_add_libs; do
20940		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
20941			cf_add_1lib=
20942			break
20943		fi
20944	done
20945	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
20946done
20947LIBS="$cf_add_libs"
20948
20949else
20950  { { echo "$as_me:20950: error: Cannot find PCRE POSIX library" >&5
20951echo "$as_me: error: Cannot find PCRE POSIX library" >&2;}
20952   { (exit 1); exit 1; }; }
20953fi
20954
20955fi
20956
20957		;;
20958	esac
20959fi
20960
20961		if test "$with_pcre" = no ; then
20962
20963cf_regex_func=no
20964cf_regex_libs=
20965case "$host_os" in
20966(mingw*)
20967	# -lsystre -ltre -lintl -liconv
20968	echo "$as_me:20968: checking for regcomp in -lsystre" >&5
20969echo $ECHO_N "checking for regcomp in -lsystre... $ECHO_C" >&6
20970if test "${ac_cv_lib_systre_regcomp+set}" = set; then
20971  echo $ECHO_N "(cached) $ECHO_C" >&6
20972else
20973  ac_check_lib_save_LIBS=$LIBS
20974LIBS="-lsystre  $LIBS"
20975cat >"conftest.$ac_ext" <<_ACEOF
20976#line 20976 "configure"
20977#include "confdefs.h"
20978
20979/* Override any gcc2 internal prototype to avoid an error.  */
20980#ifdef __cplusplus
20981extern "C"
20982#endif
20983/* We use char because int might match the return type of a gcc2
20984   builtin and then its argument prototype would still apply.  */
20985char regcomp ();
20986int
20987main (void)
20988{
20989regcomp ();
20990  ;
20991  return 0;
20992}
20993_ACEOF
20994rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20995if { (eval echo "$as_me:20995: \"$ac_link\"") >&5
20996  (eval $ac_link) 2>&5
20997  ac_status=$?
20998  echo "$as_me:20998: \$? = $ac_status" >&5
20999  (exit "$ac_status"); } &&
21000         { ac_try='test -s "conftest$ac_exeext"'
21001  { (eval echo "$as_me:21001: \"$ac_try\"") >&5
21002  (eval $ac_try) 2>&5
21003  ac_status=$?
21004  echo "$as_me:21004: \$? = $ac_status" >&5
21005  (exit "$ac_status"); }; }; then
21006  ac_cv_lib_systre_regcomp=yes
21007else
21008  echo "$as_me: failed program was:" >&5
21009cat "conftest.$ac_ext" >&5
21010ac_cv_lib_systre_regcomp=no
21011fi
21012rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21013LIBS=$ac_check_lib_save_LIBS
21014fi
21015echo "$as_me:21015: result: $ac_cv_lib_systre_regcomp" >&5
21016echo "${ECHO_T}$ac_cv_lib_systre_regcomp" >&6
21017if test "$ac_cv_lib_systre_regcomp" = yes; then
21018
21019		echo "$as_me:21019: checking for libiconv_open in -liconv" >&5
21020echo $ECHO_N "checking for libiconv_open in -liconv... $ECHO_C" >&6
21021if test "${ac_cv_lib_iconv_libiconv_open+set}" = set; then
21022  echo $ECHO_N "(cached) $ECHO_C" >&6
21023else
21024  ac_check_lib_save_LIBS=$LIBS
21025LIBS="-liconv  $LIBS"
21026cat >"conftest.$ac_ext" <<_ACEOF
21027#line 21027 "configure"
21028#include "confdefs.h"
21029
21030/* Override any gcc2 internal prototype to avoid an error.  */
21031#ifdef __cplusplus
21032extern "C"
21033#endif
21034/* We use char because int might match the return type of a gcc2
21035   builtin and then its argument prototype would still apply.  */
21036char libiconv_open ();
21037int
21038main (void)
21039{
21040libiconv_open ();
21041  ;
21042  return 0;
21043}
21044_ACEOF
21045rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21046if { (eval echo "$as_me:21046: \"$ac_link\"") >&5
21047  (eval $ac_link) 2>&5
21048  ac_status=$?
21049  echo "$as_me:21049: \$? = $ac_status" >&5
21050  (exit "$ac_status"); } &&
21051         { ac_try='test -s "conftest$ac_exeext"'
21052  { (eval echo "$as_me:21052: \"$ac_try\"") >&5
21053  (eval $ac_try) 2>&5
21054  ac_status=$?
21055  echo "$as_me:21055: \$? = $ac_status" >&5
21056  (exit "$ac_status"); }; }; then
21057  ac_cv_lib_iconv_libiconv_open=yes
21058else
21059  echo "$as_me: failed program was:" >&5
21060cat "conftest.$ac_ext" >&5
21061ac_cv_lib_iconv_libiconv_open=no
21062fi
21063rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21064LIBS=$ac_check_lib_save_LIBS
21065fi
21066echo "$as_me:21066: result: $ac_cv_lib_iconv_libiconv_open" >&5
21067echo "${ECHO_T}$ac_cv_lib_iconv_libiconv_open" >&6
21068if test "$ac_cv_lib_iconv_libiconv_open" = yes; then
21069
21070cf_add_libs="$LIBS"
21071# reverse order
21072cf_add_0lib=
21073for cf_add_1lib in -liconv; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
21074# filter duplicates
21075for cf_add_1lib in $cf_add_0lib; do
21076	for cf_add_2lib in $cf_add_libs; do
21077		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
21078			cf_add_1lib=
21079			break
21080		fi
21081	done
21082	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
21083done
21084LIBS="$cf_add_libs"
21085
21086fi
21087
21088		echo "$as_me:21088: checking for libintl_gettext in -lintl" >&5
21089echo $ECHO_N "checking for libintl_gettext in -lintl... $ECHO_C" >&6
21090if test "${ac_cv_lib_intl_libintl_gettext+set}" = set; then
21091  echo $ECHO_N "(cached) $ECHO_C" >&6
21092else
21093  ac_check_lib_save_LIBS=$LIBS
21094LIBS="-lintl  $LIBS"
21095cat >"conftest.$ac_ext" <<_ACEOF
21096#line 21096 "configure"
21097#include "confdefs.h"
21098
21099/* Override any gcc2 internal prototype to avoid an error.  */
21100#ifdef __cplusplus
21101extern "C"
21102#endif
21103/* We use char because int might match the return type of a gcc2
21104   builtin and then its argument prototype would still apply.  */
21105char libintl_gettext ();
21106int
21107main (void)
21108{
21109libintl_gettext ();
21110  ;
21111  return 0;
21112}
21113_ACEOF
21114rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21115if { (eval echo "$as_me:21115: \"$ac_link\"") >&5
21116  (eval $ac_link) 2>&5
21117  ac_status=$?
21118  echo "$as_me:21118: \$? = $ac_status" >&5
21119  (exit "$ac_status"); } &&
21120         { ac_try='test -s "conftest$ac_exeext"'
21121  { (eval echo "$as_me:21121: \"$ac_try\"") >&5
21122  (eval $ac_try) 2>&5
21123  ac_status=$?
21124  echo "$as_me:21124: \$? = $ac_status" >&5
21125  (exit "$ac_status"); }; }; then
21126  ac_cv_lib_intl_libintl_gettext=yes
21127else
21128  echo "$as_me: failed program was:" >&5
21129cat "conftest.$ac_ext" >&5
21130ac_cv_lib_intl_libintl_gettext=no
21131fi
21132rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21133LIBS=$ac_check_lib_save_LIBS
21134fi
21135echo "$as_me:21135: result: $ac_cv_lib_intl_libintl_gettext" >&5
21136echo "${ECHO_T}$ac_cv_lib_intl_libintl_gettext" >&6
21137if test "$ac_cv_lib_intl_libintl_gettext" = yes; then
21138
21139cf_add_libs="$LIBS"
21140# reverse order
21141cf_add_0lib=
21142for cf_add_1lib in -lintl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
21143# filter duplicates
21144for cf_add_1lib in $cf_add_0lib; do
21145	for cf_add_2lib in $cf_add_libs; do
21146		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
21147			cf_add_1lib=
21148			break
21149		fi
21150	done
21151	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
21152done
21153LIBS="$cf_add_libs"
21154
21155fi
21156
21157		echo "$as_me:21157: checking for tre_regcomp in -ltre" >&5
21158echo $ECHO_N "checking for tre_regcomp in -ltre... $ECHO_C" >&6
21159if test "${ac_cv_lib_tre_tre_regcomp+set}" = set; then
21160  echo $ECHO_N "(cached) $ECHO_C" >&6
21161else
21162  ac_check_lib_save_LIBS=$LIBS
21163LIBS="-ltre  $LIBS"
21164cat >"conftest.$ac_ext" <<_ACEOF
21165#line 21165 "configure"
21166#include "confdefs.h"
21167
21168/* Override any gcc2 internal prototype to avoid an error.  */
21169#ifdef __cplusplus
21170extern "C"
21171#endif
21172/* We use char because int might match the return type of a gcc2
21173   builtin and then its argument prototype would still apply.  */
21174char tre_regcomp ();
21175int
21176main (void)
21177{
21178tre_regcomp ();
21179  ;
21180  return 0;
21181}
21182_ACEOF
21183rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21184if { (eval echo "$as_me:21184: \"$ac_link\"") >&5
21185  (eval $ac_link) 2>&5
21186  ac_status=$?
21187  echo "$as_me:21187: \$? = $ac_status" >&5
21188  (exit "$ac_status"); } &&
21189         { ac_try='test -s "conftest$ac_exeext"'
21190  { (eval echo "$as_me:21190: \"$ac_try\"") >&5
21191  (eval $ac_try) 2>&5
21192  ac_status=$?
21193  echo "$as_me:21193: \$? = $ac_status" >&5
21194  (exit "$ac_status"); }; }; then
21195  ac_cv_lib_tre_tre_regcomp=yes
21196else
21197  echo "$as_me: failed program was:" >&5
21198cat "conftest.$ac_ext" >&5
21199ac_cv_lib_tre_tre_regcomp=no
21200fi
21201rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21202LIBS=$ac_check_lib_save_LIBS
21203fi
21204echo "$as_me:21204: result: $ac_cv_lib_tre_tre_regcomp" >&5
21205echo "${ECHO_T}$ac_cv_lib_tre_tre_regcomp" >&6
21206if test "$ac_cv_lib_tre_tre_regcomp" = yes; then
21207
21208cf_add_libs="$LIBS"
21209# reverse order
21210cf_add_0lib=
21211for cf_add_1lib in -ltre; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
21212# filter duplicates
21213for cf_add_1lib in $cf_add_0lib; do
21214	for cf_add_2lib in $cf_add_libs; do
21215		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
21216			cf_add_1lib=
21217			break
21218		fi
21219	done
21220	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
21221done
21222LIBS="$cf_add_libs"
21223
21224fi
21225
21226cf_add_libs="$LIBS"
21227# reverse order
21228cf_add_0lib=
21229for cf_add_1lib in -lsystre; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
21230# filter duplicates
21231for cf_add_1lib in $cf_add_0lib; do
21232	for cf_add_2lib in $cf_add_libs; do
21233		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
21234			cf_add_1lib=
21235			break
21236		fi
21237	done
21238	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
21239done
21240LIBS="$cf_add_libs"
21241
21242		cf_regex_func=regcomp
21243
21244else
21245
21246		echo "$as_me:21246: checking for regcomp in -lgnurx" >&5
21247echo $ECHO_N "checking for regcomp in -lgnurx... $ECHO_C" >&6
21248if test "${ac_cv_lib_gnurx_regcomp+set}" = set; then
21249  echo $ECHO_N "(cached) $ECHO_C" >&6
21250else
21251  ac_check_lib_save_LIBS=$LIBS
21252LIBS="-lgnurx  $LIBS"
21253cat >"conftest.$ac_ext" <<_ACEOF
21254#line 21254 "configure"
21255#include "confdefs.h"
21256
21257/* Override any gcc2 internal prototype to avoid an error.  */
21258#ifdef __cplusplus
21259extern "C"
21260#endif
21261/* We use char because int might match the return type of a gcc2
21262   builtin and then its argument prototype would still apply.  */
21263char regcomp ();
21264int
21265main (void)
21266{
21267regcomp ();
21268  ;
21269  return 0;
21270}
21271_ACEOF
21272rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21273if { (eval echo "$as_me:21273: \"$ac_link\"") >&5
21274  (eval $ac_link) 2>&5
21275  ac_status=$?
21276  echo "$as_me:21276: \$? = $ac_status" >&5
21277  (exit "$ac_status"); } &&
21278         { ac_try='test -s "conftest$ac_exeext"'
21279  { (eval echo "$as_me:21279: \"$ac_try\"") >&5
21280  (eval $ac_try) 2>&5
21281  ac_status=$?
21282  echo "$as_me:21282: \$? = $ac_status" >&5
21283  (exit "$ac_status"); }; }; then
21284  ac_cv_lib_gnurx_regcomp=yes
21285else
21286  echo "$as_me: failed program was:" >&5
21287cat "conftest.$ac_ext" >&5
21288ac_cv_lib_gnurx_regcomp=no
21289fi
21290rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21291LIBS=$ac_check_lib_save_LIBS
21292fi
21293echo "$as_me:21293: result: $ac_cv_lib_gnurx_regcomp" >&5
21294echo "${ECHO_T}$ac_cv_lib_gnurx_regcomp" >&6
21295if test "$ac_cv_lib_gnurx_regcomp" = yes; then
21296
21297cf_add_libs="$LIBS"
21298# reverse order
21299cf_add_0lib=
21300for cf_add_1lib in -lgnurx; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
21301# filter duplicates
21302for cf_add_1lib in $cf_add_0lib; do
21303	for cf_add_2lib in $cf_add_libs; do
21304		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
21305			cf_add_1lib=
21306			break
21307		fi
21308	done
21309	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
21310done
21311LIBS="$cf_add_libs"
21312
21313			cf_regex_func=regcomp
21314fi
21315
21316fi
21317
21318	;;
21319(*)
21320	cf_regex_libs="regex re"
21321	echo "$as_me:21321: checking for regcomp" >&5
21322echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
21323if test "${ac_cv_func_regcomp+set}" = set; then
21324  echo $ECHO_N "(cached) $ECHO_C" >&6
21325else
21326  cat >"conftest.$ac_ext" <<_ACEOF
21327#line 21327 "configure"
21328#include "confdefs.h"
21329#define regcomp autoconf_temporary
21330#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
21331#undef regcomp
21332
21333#ifdef __cplusplus
21334extern "C"
21335#endif
21336
21337/* We use char because int might match the return type of a gcc2
21338   builtin and then its argument prototype would still apply.  */
21339char regcomp (void);
21340
21341int
21342main (void)
21343{
21344
21345/* The GNU C library defines stubs for functions which it implements
21346    to always fail with ENOSYS.  Some functions are actually named
21347    something starting with __ and the normal name is an alias.  */
21348#if defined (__stub_regcomp) || defined (__stub___regcomp)
21349#error found stub for regcomp
21350#endif
21351
21352	return regcomp ();
21353  ;
21354  return 0;
21355}
21356_ACEOF
21357rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21358if { (eval echo "$as_me:21358: \"$ac_link\"") >&5
21359  (eval $ac_link) 2>&5
21360  ac_status=$?
21361  echo "$as_me:21361: \$? = $ac_status" >&5
21362  (exit "$ac_status"); } &&
21363         { ac_try='test -s "conftest$ac_exeext"'
21364  { (eval echo "$as_me:21364: \"$ac_try\"") >&5
21365  (eval $ac_try) 2>&5
21366  ac_status=$?
21367  echo "$as_me:21367: \$? = $ac_status" >&5
21368  (exit "$ac_status"); }; }; then
21369  ac_cv_func_regcomp=yes
21370else
21371  echo "$as_me: failed program was:" >&5
21372cat "conftest.$ac_ext" >&5
21373ac_cv_func_regcomp=no
21374fi
21375rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21376fi
21377echo "$as_me:21377: result: $ac_cv_func_regcomp" >&5
21378echo "${ECHO_T}$ac_cv_func_regcomp" >&6
21379if test "$ac_cv_func_regcomp" = yes; then
21380  cf_regex_func=regcomp
21381else
21382
21383		for cf_regex_lib in $cf_regex_libs
21384		do
21385			as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
21386echo "$as_me:21386: checking for regcomp in -l$cf_regex_lib" >&5
21387echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
21388if eval "test \"\${$as_ac_Lib+set}\" = set"; then
21389  echo $ECHO_N "(cached) $ECHO_C" >&6
21390else
21391  ac_check_lib_save_LIBS=$LIBS
21392LIBS="-l$cf_regex_lib  $LIBS"
21393cat >"conftest.$ac_ext" <<_ACEOF
21394#line 21394 "configure"
21395#include "confdefs.h"
21396
21397/* Override any gcc2 internal prototype to avoid an error.  */
21398#ifdef __cplusplus
21399extern "C"
21400#endif
21401/* We use char because int might match the return type of a gcc2
21402   builtin and then its argument prototype would still apply.  */
21403char regcomp ();
21404int
21405main (void)
21406{
21407regcomp ();
21408  ;
21409  return 0;
21410}
21411_ACEOF
21412rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21413if { (eval echo "$as_me:21413: \"$ac_link\"") >&5
21414  (eval $ac_link) 2>&5
21415  ac_status=$?
21416  echo "$as_me:21416: \$? = $ac_status" >&5
21417  (exit "$ac_status"); } &&
21418         { ac_try='test -s "conftest$ac_exeext"'
21419  { (eval echo "$as_me:21419: \"$ac_try\"") >&5
21420  (eval $ac_try) 2>&5
21421  ac_status=$?
21422  echo "$as_me:21422: \$? = $ac_status" >&5
21423  (exit "$ac_status"); }; }; then
21424  eval "$as_ac_Lib=yes"
21425else
21426  echo "$as_me: failed program was:" >&5
21427cat "conftest.$ac_ext" >&5
21428eval "$as_ac_Lib=no"
21429fi
21430rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21431LIBS=$ac_check_lib_save_LIBS
21432fi
21433echo "$as_me:21433: result: `eval echo '${'"$as_ac_Lib"'}'`" >&5
21434echo "${ECHO_T}`eval echo '${'"$as_ac_Lib"'}'`" >&6
21435if test "`eval echo '${'"$as_ac_Lib"'}'`" = yes; then
21436
21437cf_add_libs="$LIBS"
21438# reverse order
21439cf_add_0lib=
21440for cf_add_1lib in -l$cf_regex_lib; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
21441# filter duplicates
21442for cf_add_1lib in $cf_add_0lib; do
21443	for cf_add_2lib in $cf_add_libs; do
21444		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
21445			cf_add_1lib=
21446			break
21447		fi
21448	done
21449	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
21450done
21451LIBS="$cf_add_libs"
21452
21453					cf_regex_func=regcomp
21454					break
21455fi
21456
21457		done
21458
21459fi
21460
21461	;;
21462esac
21463
21464if test "$cf_regex_func" = no ; then
21465	echo "$as_me:21465: checking for compile" >&5
21466echo $ECHO_N "checking for compile... $ECHO_C" >&6
21467if test "${ac_cv_func_compile+set}" = set; then
21468  echo $ECHO_N "(cached) $ECHO_C" >&6
21469else
21470  cat >"conftest.$ac_ext" <<_ACEOF
21471#line 21471 "configure"
21472#include "confdefs.h"
21473#define compile autoconf_temporary
21474#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
21475#undef compile
21476
21477#ifdef __cplusplus
21478extern "C"
21479#endif
21480
21481/* We use char because int might match the return type of a gcc2
21482   builtin and then its argument prototype would still apply.  */
21483char compile (void);
21484
21485int
21486main (void)
21487{
21488
21489/* The GNU C library defines stubs for functions which it implements
21490    to always fail with ENOSYS.  Some functions are actually named
21491    something starting with __ and the normal name is an alias.  */
21492#if defined (__stub_compile) || defined (__stub___compile)
21493#error found stub for compile
21494#endif
21495
21496	return compile ();
21497  ;
21498  return 0;
21499}
21500_ACEOF
21501rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21502if { (eval echo "$as_me:21502: \"$ac_link\"") >&5
21503  (eval $ac_link) 2>&5
21504  ac_status=$?
21505  echo "$as_me:21505: \$? = $ac_status" >&5
21506  (exit "$ac_status"); } &&
21507         { ac_try='test -s "conftest$ac_exeext"'
21508  { (eval echo "$as_me:21508: \"$ac_try\"") >&5
21509  (eval $ac_try) 2>&5
21510  ac_status=$?
21511  echo "$as_me:21511: \$? = $ac_status" >&5
21512  (exit "$ac_status"); }; }; then
21513  ac_cv_func_compile=yes
21514else
21515  echo "$as_me: failed program was:" >&5
21516cat "conftest.$ac_ext" >&5
21517ac_cv_func_compile=no
21518fi
21519rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21520fi
21521echo "$as_me:21521: result: $ac_cv_func_compile" >&5
21522echo "${ECHO_T}$ac_cv_func_compile" >&6
21523if test "$ac_cv_func_compile" = yes; then
21524  cf_regex_func=compile
21525else
21526
21527		echo "$as_me:21527: checking for compile in -lgen" >&5
21528echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
21529if test "${ac_cv_lib_gen_compile+set}" = set; then
21530  echo $ECHO_N "(cached) $ECHO_C" >&6
21531else
21532  ac_check_lib_save_LIBS=$LIBS
21533LIBS="-lgen  $LIBS"
21534cat >"conftest.$ac_ext" <<_ACEOF
21535#line 21535 "configure"
21536#include "confdefs.h"
21537
21538/* Override any gcc2 internal prototype to avoid an error.  */
21539#ifdef __cplusplus
21540extern "C"
21541#endif
21542/* We use char because int might match the return type of a gcc2
21543   builtin and then its argument prototype would still apply.  */
21544char compile ();
21545int
21546main (void)
21547{
21548compile ();
21549  ;
21550  return 0;
21551}
21552_ACEOF
21553rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21554if { (eval echo "$as_me:21554: \"$ac_link\"") >&5
21555  (eval $ac_link) 2>&5
21556  ac_status=$?
21557  echo "$as_me:21557: \$? = $ac_status" >&5
21558  (exit "$ac_status"); } &&
21559         { ac_try='test -s "conftest$ac_exeext"'
21560  { (eval echo "$as_me:21560: \"$ac_try\"") >&5
21561  (eval $ac_try) 2>&5
21562  ac_status=$?
21563  echo "$as_me:21563: \$? = $ac_status" >&5
21564  (exit "$ac_status"); }; }; then
21565  ac_cv_lib_gen_compile=yes
21566else
21567  echo "$as_me: failed program was:" >&5
21568cat "conftest.$ac_ext" >&5
21569ac_cv_lib_gen_compile=no
21570fi
21571rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21572LIBS=$ac_check_lib_save_LIBS
21573fi
21574echo "$as_me:21574: result: $ac_cv_lib_gen_compile" >&5
21575echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
21576if test "$ac_cv_lib_gen_compile" = yes; then
21577
21578cf_add_libs="$LIBS"
21579# reverse order
21580cf_add_0lib=
21581for cf_add_1lib in -lgen; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
21582# filter duplicates
21583for cf_add_1lib in $cf_add_0lib; do
21584	for cf_add_2lib in $cf_add_libs; do
21585		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
21586			cf_add_1lib=
21587			break
21588		fi
21589	done
21590	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
21591done
21592LIBS="$cf_add_libs"
21593
21594				cf_regex_func=compile
21595fi
21596
21597fi
21598
21599fi
21600
21601if test "$cf_regex_func" = no ; then
21602	{ echo "$as_me:21602: WARNING: cannot find regular expression library" >&5
21603echo "$as_me: WARNING: cannot find regular expression library" >&2;}
21604fi
21605
21606echo "$as_me:21606: checking for regular-expression headers" >&5
21607echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
21608if test "${cf_cv_regex_hdrs+set}" = set; then
21609  echo $ECHO_N "(cached) $ECHO_C" >&6
21610else
21611
21612cf_cv_regex_hdrs=no
21613case "$cf_regex_func" in
21614(compile)
21615	for cf_regex_hdr in regexp.h regexpr.h
21616	do
21617		cat >"conftest.$ac_ext" <<_ACEOF
21618#line 21618 "configure"
21619#include "confdefs.h"
21620#include <$cf_regex_hdr>
21621int
21622main (void)
21623{
21624
21625			char *p = compile("", "", "", 0);
21626			int x = step("", "");
21627			(void)p;
21628			(void)x;
21629
21630  ;
21631  return 0;
21632}
21633_ACEOF
21634rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21635if { (eval echo "$as_me:21635: \"$ac_link\"") >&5
21636  (eval $ac_link) 2>&5
21637  ac_status=$?
21638  echo "$as_me:21638: \$? = $ac_status" >&5
21639  (exit "$ac_status"); } &&
21640         { ac_try='test -s "conftest$ac_exeext"'
21641  { (eval echo "$as_me:21641: \"$ac_try\"") >&5
21642  (eval $ac_try) 2>&5
21643  ac_status=$?
21644  echo "$as_me:21644: \$? = $ac_status" >&5
21645  (exit "$ac_status"); }; }; then
21646
21647			cf_cv_regex_hdrs=$cf_regex_hdr
21648			break
21649
21650else
21651  echo "$as_me: failed program was:" >&5
21652cat "conftest.$ac_ext" >&5
21653fi
21654rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21655	done
21656	;;
21657(*)
21658	for cf_regex_hdr in regex.h
21659	do
21660		cat >"conftest.$ac_ext" <<_ACEOF
21661#line 21661 "configure"
21662#include "confdefs.h"
21663#include <sys/types.h>
21664#include <$cf_regex_hdr>
21665int
21666main (void)
21667{
21668
21669			regex_t *p = 0;
21670			int x = regcomp(p, "", 0);
21671			int y = regexec(p, "", 0, 0, 0);
21672			(void)x;
21673			(void)y;
21674			regfree(p);
21675
21676  ;
21677  return 0;
21678}
21679_ACEOF
21680rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21681if { (eval echo "$as_me:21681: \"$ac_link\"") >&5
21682  (eval $ac_link) 2>&5
21683  ac_status=$?
21684  echo "$as_me:21684: \$? = $ac_status" >&5
21685  (exit "$ac_status"); } &&
21686         { ac_try='test -s "conftest$ac_exeext"'
21687  { (eval echo "$as_me:21687: \"$ac_try\"") >&5
21688  (eval $ac_try) 2>&5
21689  ac_status=$?
21690  echo "$as_me:21690: \$? = $ac_status" >&5
21691  (exit "$ac_status"); }; }; then
21692
21693			cf_cv_regex_hdrs=$cf_regex_hdr
21694			break
21695
21696else
21697  echo "$as_me: failed program was:" >&5
21698cat "conftest.$ac_ext" >&5
21699fi
21700rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21701	done
21702	;;
21703esac
21704
21705fi
21706echo "$as_me:21706: result: $cf_cv_regex_hdrs" >&5
21707echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
21708
21709case "$cf_cv_regex_hdrs" in
21710	(no)		{ echo "$as_me:21710: WARNING: no regular expression header found" >&5
21711echo "$as_me: WARNING: no regular expression header found" >&2;} ;;
21712	(regex.h)
21713cat >>confdefs.h <<\EOF
21714#define HAVE_REGEX_H_FUNCS 1
21715EOF
21716 ;;
21717	(regexp.h)
21718cat >>confdefs.h <<\EOF
21719#define HAVE_REGEXP_H_FUNCS 1
21720EOF
21721 ;;
21722	(regexpr.h)
21723cat >>confdefs.h <<\EOF
21724#define HAVE_REGEXPR_H_FUNCS 1
21725EOF
21726 ;;
21727esac
21728
21729			if test "X$cf_cv_regex_hdrs" != "Xregex.h" ; then
21730				{ { echo "$as_me:21730: error: Only POSIX, PCRE, or PCRE2 regular expressions are supported" >&5
21731echo "$as_me: error: Only POSIX, PCRE, or PCRE2 regular expressions are supported" >&2;}
21732   { (exit 1); exit 1; }; }
21733			fi
21734		fi
21735	fi
21736
21737cat >>confdefs.h <<\EOF
21738#define OPT_SELECT_REGEX 1
21739EOF
21740
21741fi
21742
21743echo "$as_me:21743: checking if you want support for right-scrollbar" >&5
21744echo $ECHO_N "checking if you want support for right-scrollbar... $ECHO_C" >&6
21745
21746# Check whether --enable-rightbar or --disable-rightbar was given.
21747if test "${enable_rightbar+set}" = set; then
21748  enableval="$enable_rightbar"
21749  test "$enableval" != no && enableval=yes
21750	if test "$enableval" != "yes" ; then
21751    enable_rightbar=no
21752	else
21753		enable_rightbar=yes
21754	fi
21755else
21756  enableval=yes
21757	enable_rightbar=yes
21758
21759fi;
21760echo "$as_me:21760: result: $enable_rightbar" >&5
21761echo "${ECHO_T}$enable_rightbar" >&6
21762if test "$enable_rightbar" = yes ; then
21763
21764cat >>confdefs.h <<\EOF
21765#define SCROLLBAR_RIGHT 1
21766EOF
21767
21768fi
21769
21770echo "$as_me:21770: checking if you want check for redundant name-change" >&5
21771echo $ECHO_N "checking if you want check for redundant name-change... $ECHO_C" >&6
21772
21773# Check whether --enable-samename or --disable-samename was given.
21774if test "${enable_samename+set}" = set; then
21775  enableval="$enable_samename"
21776  test "$enableval" != no && enableval=yes
21777	if test "$enableval" != "yes" ; then
21778    enable_samename=no
21779	else
21780		enable_samename=yes
21781	fi
21782else
21783  enableval=yes
21784	enable_samename=yes
21785
21786fi;
21787echo "$as_me:21787: result: $enable_samename" >&5
21788echo "${ECHO_T}$enable_samename" >&6
21789test "$enable_samename" = no &&
21790cat >>confdefs.h <<\EOF
21791#define OPT_SAME_NAME 0
21792EOF
21793
21794echo "$as_me:21794: checking if you want support for selection-actions" >&5
21795echo $ECHO_N "checking if you want support for selection-actions... $ECHO_C" >&6
21796
21797# Check whether --enable-selection-ops or --disable-selection-ops was given.
21798if test "${enable_selection_ops+set}" = set; then
21799  enableval="$enable_selection_ops"
21800  test "$enableval" != no && enableval=yes
21801	if test "$enableval" != "yes" ; then
21802    enable_selection_ops=no
21803	else
21804		enable_selection_ops=yes
21805	fi
21806else
21807  enableval=yes
21808	enable_selection_ops=yes
21809
21810fi;
21811echo "$as_me:21811: result: $enable_selection_ops" >&5
21812echo "${ECHO_T}$enable_selection_ops" >&6
21813test "$enable_selection_ops" = no &&
21814cat >>confdefs.h <<\EOF
21815#define OPT_SELECTION_OPS 0
21816EOF
21817
21818echo "$as_me:21818: checking if you want support for session management" >&5
21819echo $ECHO_N "checking if you want support for session management... $ECHO_C" >&6
21820
21821# Check whether --enable-session-mgt or --disable-session-mgt was given.
21822if test "${enable_session_mgt+set}" = set; then
21823  enableval="$enable_session_mgt"
21824  test "$enableval" != no && enableval=yes
21825	if test "$enableval" != "yes" ; then
21826    enable_session_mgt=no
21827	else
21828		enable_session_mgt=yes
21829	fi
21830else
21831  enableval=yes
21832	enable_session_mgt=yes
21833
21834fi;
21835echo "$as_me:21835: result: $enable_session_mgt" >&5
21836echo "${ECHO_T}$enable_session_mgt" >&6
21837test "$enable_session_mgt" = no &&
21838cat >>confdefs.h <<\EOF
21839#define OPT_SESSION_MGT 0
21840EOF
21841
21842echo "$as_me:21842: checking if you want to use termcap function-keys" >&5
21843echo $ECHO_N "checking if you want to use termcap function-keys... $ECHO_C" >&6
21844
21845# Check whether --enable-tcap-fkeys or --disable-tcap-fkeys was given.
21846if test "${enable_tcap_fkeys+set}" = set; then
21847  enableval="$enable_tcap_fkeys"
21848  test "$enableval" != no && enableval=yes
21849	if test "$enableval" != "yes" ; then
21850    enable_tcap_fkeys=no
21851	else
21852		enable_tcap_fkeys=yes
21853	fi
21854else
21855  enableval=yes
21856	enable_tcap_fkeys=yes
21857
21858fi;
21859echo "$as_me:21859: result: $enable_tcap_fkeys" >&5
21860echo "${ECHO_T}$enable_tcap_fkeys" >&6
21861test "$enable_tcap_fkeys" = yes &&
21862cat >>confdefs.h <<\EOF
21863#define OPT_TCAP_FKEYS 1
21864EOF
21865
21866echo "$as_me:21866: checking if you want to use termcap-query/report" >&5
21867echo $ECHO_N "checking if you want to use termcap-query/report... $ECHO_C" >&6
21868
21869# Check whether --enable-tcap-query or --disable-tcap-query was given.
21870if test "${enable_tcap_query+set}" = set; then
21871  enableval="$enable_tcap_query"
21872  test "$enableval" != no && enableval=yes
21873	if test "$enableval" != "yes" ; then
21874    enable_tcap_query=no
21875	else
21876		enable_tcap_query=yes
21877	fi
21878else
21879  enableval=yes
21880	enable_tcap_query=yes
21881
21882fi;
21883echo "$as_me:21883: result: $enable_tcap_query" >&5
21884echo "${ECHO_T}$enable_tcap_query" >&6
21885test "$enable_tcap_query" = yes &&
21886cat >>confdefs.h <<\EOF
21887#define OPT_TCAP_QUERY 1
21888EOF
21889
21890echo "$as_me:21890: checking if you want support for tek4014" >&5
21891echo $ECHO_N "checking if you want support for tek4014... $ECHO_C" >&6
21892
21893# Check whether --enable-tek4014 or --disable-tek4014 was given.
21894if test "${enable_tek4014+set}" = set; then
21895  enableval="$enable_tek4014"
21896  test "$enableval" != no && enableval=yes
21897	if test "$enableval" != "yes" ; then
21898    enable_tek4014=no
21899	else
21900		enable_tek4014=yes
21901	fi
21902else
21903  enableval=yes
21904	enable_tek4014=yes
21905
21906fi;
21907echo "$as_me:21907: result: $enable_tek4014" >&5
21908echo "${ECHO_T}$enable_tek4014" >&6
21909if test "$enable_tek4014" = no ; then
21910
21911cat >>confdefs.h <<\EOF
21912#define OPT_TEK4014 0
21913EOF
21914
21915else
21916	EXTRAHDRS="$EXTRAHDRS Tekparse.h"
21917	EXTRASRCS="$EXTRASRCS TekPrsTbl.c Tekproc.c"
21918	EXTRAOBJS="$EXTRAOBJS TekPrsTbl.o Tekproc.o"
21919fi
21920
21921echo "$as_me:21921: checking if you want pulldown menus with a toolbar" >&5
21922echo $ECHO_N "checking if you want pulldown menus with a toolbar... $ECHO_C" >&6
21923
21924# Check whether --enable-toolbar or --disable-toolbar was given.
21925if test "${enable_toolbar+set}" = set; then
21926  enableval="$enable_toolbar"
21927  test "$enableval" != yes && enableval=no
21928	if test "$enableval" != "no" ; then
21929    enable_toolbar=yes
21930	else
21931		enable_toolbar=no
21932	fi
21933else
21934  enableval=no
21935	enable_toolbar=no
21936
21937fi;
21938echo "$as_me:21938: result: $enable_toolbar" >&5
21939echo "${ECHO_T}$enable_toolbar" >&6
21940if test "$enable_toolbar" = yes ; then
21941
21942cat >>confdefs.h <<\EOF
21943#define OPT_TOOLBAR 1
21944EOF
21945
21946fi
21947
21948echo "$as_me:21948: checking if you want VT52 emulation" >&5
21949echo $ECHO_N "checking if you want VT52 emulation... $ECHO_C" >&6
21950
21951# Check whether --enable-vt52 or --disable-vt52 was given.
21952if test "${enable_vt52+set}" = set; then
21953  enableval="$enable_vt52"
21954  test "$enableval" != no && enableval=yes
21955	if test "$enableval" != "yes" ; then
21956    enable_vt52=no
21957	else
21958		enable_vt52=yes
21959	fi
21960else
21961  enableval=yes
21962	enable_vt52=yes
21963
21964fi;
21965echo "$as_me:21965: result: $enable_vt52" >&5
21966echo "${ECHO_T}$enable_vt52" >&6
21967test "$enable_vt52" = no &&
21968cat >>confdefs.h <<\EOF
21969#define OPT_VT52_MODE 0
21970EOF
21971
21972echo "$as_me:21972: checking if you want wide-attribute support" >&5
21973echo $ECHO_N "checking if you want wide-attribute support... $ECHO_C" >&6
21974
21975# Check whether --enable-wide-attrs or --disable-wide-attrs was given.
21976if test "${enable_wide_attrs+set}" = set; then
21977  enableval="$enable_wide_attrs"
21978  test "$enableval" != no && enableval=yes
21979	if test "$enableval" != "yes" ; then
21980    enable_wattr=no
21981	else
21982		enable_wattr=yes
21983	fi
21984else
21985  enableval=yes
21986	enable_wattr=yes
21987
21988fi;
21989echo "$as_me:21989: result: $enable_wattr" >&5
21990echo "${ECHO_T}$enable_wattr" >&6
21991
21992if test x$enable_wattr = xno && test x$enable_direct_color = xyes ; then
21993	{ echo "$as_me:21993: WARNING: overriding wide-attributes to support direct color" >&5
21994echo "$as_me: WARNING: overriding wide-attributes to support direct color" >&2;}
21995	enable_wattr=yes
21996fi
21997
21998echo "$as_me:21998: checking if you want wide-character support" >&5
21999echo $ECHO_N "checking if you want wide-character support... $ECHO_C" >&6
22000
22001# Check whether --enable-wide-chars or --disable-wide-chars was given.
22002if test "${enable_wide_chars+set}" = set; then
22003  enableval="$enable_wide_chars"
22004  test "$enableval" != no && enableval=yes
22005	if test "$enableval" != "yes" ; then
22006    enable_wchar=no
22007	else
22008		enable_wchar=yes
22009	fi
22010else
22011  enableval=yes
22012	enable_wchar=yes
22013
22014fi;
22015echo "$as_me:22015: result: $enable_wchar" >&5
22016echo "${ECHO_T}$enable_wchar" >&6
22017test "x$enable_wattr" = xno &&
22018cat >>confdefs.h <<\EOF
22019#define OPT_WIDE_ATTRS 0
22020EOF
22021
22022echo "$as_me:22022: checking if you want only 16-bit character support" >&5
22023echo $ECHO_N "checking if you want only 16-bit character support... $ECHO_C" >&6
22024
22025# Check whether --enable-16bit-chars or --disable-16bit-chars was given.
22026if test "${enable_16bit_chars+set}" = set; then
22027  enableval="$enable_16bit_chars"
22028  test "$enableval" != yes && enableval=no
22029	if test "$enableval" != "no" ; then
22030    enable_16bit_chars=yes
22031	else
22032		enable_16bit_chars=no
22033	fi
22034else
22035  enableval=no
22036	enable_16bit_chars=no
22037
22038fi;
22039echo "$as_me:22039: result: $enable_16bit_chars" >&5
22040echo "${ECHO_T}$enable_16bit_chars" >&6
22041
22042if test "$enable_16bit_chars" = yes ; then
22043
22044cat >>confdefs.h <<\EOF
22045#define OPT_WIDER_ICHAR 0
22046EOF
22047
22048	enable_wchar=yes
22049fi
22050
22051if test "$enable_wchar" = yes ; then
22052
22053echo "$as_me:22053: checking if you want to use mini-luit/Latin9 built-in support" >&5
22054echo $ECHO_N "checking if you want to use mini-luit/Latin9 built-in support... $ECHO_C" >&6
22055
22056# Check whether --enable-mini-luit or --disable-mini-luit was given.
22057if test "${enable_mini_luit+set}" = set; then
22058  enableval="$enable_mini_luit"
22059  test "$enableval" != yes && enableval=no
22060	if test "$enableval" != "no" ; then
22061    enable_mini_luit=yes
22062	else
22063		enable_mini_luit=no
22064	fi
22065else
22066  enableval=no
22067	enable_mini_luit=no
22068
22069fi;
22070echo "$as_me:22070: result: $enable_mini_luit" >&5
22071echo "${ECHO_T}$enable_mini_luit" >&6
22072if test "$enable_mini_luit" = yes ; then
22073
22074cat >>confdefs.h <<\EOF
22075#define OPT_MINI_LUIT 1
22076EOF
22077
22078fi
22079
22080echo "$as_me:22080: checking if you want to use luit" >&5
22081echo $ECHO_N "checking if you want to use luit... $ECHO_C" >&6
22082
22083# Check whether --enable-luit or --disable-luit was given.
22084if test "${enable_luit+set}" = set; then
22085  enableval="$enable_luit"
22086  test "$enableval" != no && enableval=yes
22087	if test "$enableval" != "yes" ; then
22088    enable_luit=no
22089	else
22090		enable_luit=yes
22091	fi
22092else
22093  enableval=yes
22094	enable_luit=yes
22095
22096fi;
22097echo "$as_me:22097: result: $enable_luit" >&5
22098echo "${ECHO_T}$enable_luit" >&6
22099if test "$enable_luit" = yes ; then
22100
22101cat >>confdefs.h <<\EOF
22102#define OPT_LUIT_PROG 1
22103EOF
22104
22105test -z "$LUIT" && LUIT="xterm-filter"
22106for ac_prog in $LUIT xterm-filter bluit luit
22107do
22108  # Extract the first word of "$ac_prog", so it can be a program name with args.
22109set dummy $ac_prog; ac_word=$2
22110echo "$as_me:22110: checking for $ac_word" >&5
22111echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22112if test "${ac_cv_path_LUIT+set}" = set; then
22113  echo $ECHO_N "(cached) $ECHO_C" >&6
22114else
22115  case $LUIT in
22116  [\\/]* | ?:[\\/]*)
22117  ac_cv_path_LUIT="$LUIT" # Let the user override the test with a path.
22118  ;;
22119  *)
22120  ac_save_IFS=$IFS; IFS=$ac_path_separator
22121ac_dummy="$PATH"
22122for ac_dir in $ac_dummy; do
22123  IFS=$ac_save_IFS
22124  test -z "$ac_dir" && ac_dir=.
22125  if $as_executable_p "$ac_dir/$ac_word"; then
22126   ac_cv_path_LUIT="$ac_dir/$ac_word"
22127   echo "$as_me:22127: found $ac_dir/$ac_word" >&5
22128   break
22129fi
22130done
22131
22132  ;;
22133esac
22134fi
22135LUIT=$ac_cv_path_LUIT
22136
22137if test -n "$LUIT"; then
22138  echo "$as_me:22138: result: $LUIT" >&5
22139echo "${ECHO_T}$LUIT" >&6
22140else
22141  echo "$as_me:22141: result: no" >&5
22142echo "${ECHO_T}no" >&6
22143fi
22144
22145  test -n "$LUIT" && break
22146done
22147test -n "$LUIT" || LUIT="$LUIT"
22148
22149cf_path_prog=""
22150cf_path_args=""
22151IFS="${IFS:- 	}"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
22152for cf_temp in $ac_cv_path_LUIT
22153do
22154	if test -z "$cf_path_prog" ; then
22155		if test "$with_full_paths" = yes ; then
22156
22157if test "x$prefix" != xNONE; then
22158	cf_path_syntax="$prefix"
22159else
22160	cf_path_syntax="$ac_default_prefix"
22161fi
22162
22163case ".$cf_temp" in
22164(.\$\(*\)*|.\'*\'*)
22165	;;
22166(..|./*|.\\*)
22167	;;
22168(.[a-zA-Z]:[\\/]*) # OS/2 EMX
22169	;;
22170(.\$\{*prefix\}*|.\$\{*dir\}*)
22171	eval cf_temp="$cf_temp"
22172	case ".$cf_temp" in
22173	(.NONE/*)
22174		cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
22175		;;
22176	esac
22177	;;
22178(.no|.NONE/*)
22179	cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
22180	;;
22181(*)
22182	break
22183	;;
22184esac
22185
22186			cf_path_prog="$cf_temp"
22187		else
22188			cf_path_prog="`basename "$cf_temp"`"
22189		fi
22190	elif test -z "$cf_path_args" ; then
22191		cf_path_args="$cf_temp"
22192	else
22193		cf_path_args="$cf_path_args $cf_temp"
22194	fi
22195done
22196IFS="$cf_save_ifs"
22197
22198if test -n "$cf_path_prog" ; then
22199
22200echo "${as_me:-configure}:22200: testing defining path for ${cf_path_prog} ..." 1>&5
22201
22202cat >>confdefs.h <<EOF
22203#define LUIT_PATH "$cf_path_prog"
22204EOF
22205
22206	test -n "$cf_path_args" &&
22207cat >>confdefs.h <<EOF
22208#define LUIT_ARGS "$cf_path_args"
22209EOF
22210
22211fi
22212
22213fi
22214
22215cat >>confdefs.h <<\EOF
22216#define OPT_WIDE_CHARS 1
22217EOF
22218
22219	EXTRAHDRS="$EXTRAHDRS charclass.h precompose.h wcwidth.h"
22220	EXTRASRCS="$EXTRASRCS charclass.c precompose.c wcwidth.c"
22221	EXTRAOBJS="$EXTRAOBJS charclass.o precompose.o wcwidth.o"
22222fi
22223
22224echo "$as_me:22224: checking if you want dynamic-abbreviation support" >&5
22225echo $ECHO_N "checking if you want dynamic-abbreviation support... $ECHO_C" >&6
22226
22227# Check whether --enable-dabbrev or --disable-dabbrev was given.
22228if test "${enable_dabbrev+set}" = set; then
22229  enableval="$enable_dabbrev"
22230  test "$enableval" != yes && enableval=no
22231	if test "$enableval" != "no" ; then
22232    enable_dabbrev=yes
22233	else
22234		enable_dabbrev=no
22235	fi
22236else
22237  enableval=no
22238	enable_dabbrev=no
22239
22240fi;
22241echo "$as_me:22241: result: $enable_dabbrev" >&5
22242echo "${ECHO_T}$enable_dabbrev" >&6
22243if test "$enable_dabbrev" = yes ; then
22244
22245cat >>confdefs.h <<\EOF
22246#define OPT_DABBREV 1
22247EOF
22248
22249fi
22250
22251echo "$as_me:22251: checking if you want DECterm Locator support" >&5
22252echo $ECHO_N "checking if you want DECterm Locator support... $ECHO_C" >&6
22253
22254# Check whether --enable-dec-locator or --disable-dec-locator was given.
22255if test "${enable_dec_locator+set}" = set; then
22256  enableval="$enable_dec_locator"
22257  test "$enableval" != yes && enableval=no
22258	if test "$enableval" != "no" ; then
22259    enable_dec_locator=yes
22260	else
22261		enable_dec_locator=no
22262	fi
22263else
22264  enableval=no
22265	enable_dec_locator=no
22266
22267fi;
22268echo "$as_me:22268: result: $enable_dec_locator" >&5
22269echo "${ECHO_T}$enable_dec_locator" >&6
22270if test "$enable_dec_locator" = yes ; then
22271
22272cat >>confdefs.h <<\EOF
22273#define OPT_DEC_LOCATOR 1
22274EOF
22275
22276fi
22277
22278echo "$as_me:22278: checking if you want XHTML and SVG screen dump support" >&5
22279echo $ECHO_N "checking if you want XHTML and SVG screen dump support... $ECHO_C" >&6
22280
22281# Check whether --enable-screen-dumps or --disable-screen-dumps was given.
22282if test "${enable_screen_dumps+set}" = set; then
22283  enableval="$enable_screen_dumps"
22284  test "$enableval" != no && enableval=yes
22285	if test "$enableval" != "yes" ; then
22286    enable_screen_dumps=no
22287	else
22288		enable_screen_dumps=yes
22289	fi
22290else
22291  enableval=yes
22292	enable_screen_dumps=yes
22293
22294fi;
22295echo "$as_me:22295: result: $enable_screen_dumps" >&5
22296echo "${ECHO_T}$enable_screen_dumps" >&6
22297if test "$enable_screen_dumps" = yes ; then
22298	EXTRASRCS="$EXTRASRCS html.c svg.c"
22299	EXTRAOBJS="$EXTRAOBJS html.o svg.o"
22300else
22301
22302cat >>confdefs.h <<\EOF
22303#define OPT_SCREEN_DUMPS 0
22304EOF
22305
22306fi
22307
22308echo "$as_me:22308: checking if you want ReGIS graphics support" >&5
22309echo $ECHO_N "checking if you want ReGIS graphics support... $ECHO_C" >&6
22310
22311# Check whether --enable-regis-graphics or --disable-regis-graphics was given.
22312if test "${enable_regis_graphics+set}" = set; then
22313  enableval="$enable_regis_graphics"
22314  test "$enableval" != yes && enableval=no
22315	if test "$enableval" != "no" ; then
22316    enable_regis_graphics=yes
22317	else
22318		enable_regis_graphics=no
22319	fi
22320else
22321  enableval=no
22322	enable_regis_graphics=no
22323
22324fi;
22325echo "$as_me:22325: result: $enable_regis_graphics" >&5
22326echo "${ECHO_T}$enable_regis_graphics" >&6
22327if test "$enable_regis_graphics" = yes ; then
22328
22329cat >>confdefs.h <<\EOF
22330#define OPT_REGIS_GRAPHICS 1
22331EOF
22332
22333	EXTRAHDRS="$EXTRAHDRS graphics_regis.h"
22334	EXTRASRCS="$EXTRASRCS graphics_regis.c"
22335	EXTRAOBJS="$EXTRAOBJS graphics_regis.o"
22336
22337echo "$as_me:22337: checking if -lm needed for math functions" >&5
22338echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
22339if test "${cf_cv_need_libm+set}" = set; then
22340  echo $ECHO_N "(cached) $ECHO_C" >&6
22341else
22342
22343	cat >"conftest.$ac_ext" <<_ACEOF
22344#line 22344 "configure"
22345#include "confdefs.h"
22346
22347	#include <stdio.h>
22348	#include <stdlib.h>
22349	#include <math.h>
22350
22351int
22352main (void)
22353{
22354double x = rand(); printf("result = %g\\n", sin(x))
22355  ;
22356  return 0;
22357}
22358_ACEOF
22359rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22360if { (eval echo "$as_me:22360: \"$ac_link\"") >&5
22361  (eval $ac_link) 2>&5
22362  ac_status=$?
22363  echo "$as_me:22363: \$? = $ac_status" >&5
22364  (exit "$ac_status"); } &&
22365         { ac_try='test -s "conftest$ac_exeext"'
22366  { (eval echo "$as_me:22366: \"$ac_try\"") >&5
22367  (eval $ac_try) 2>&5
22368  ac_status=$?
22369  echo "$as_me:22369: \$? = $ac_status" >&5
22370  (exit "$ac_status"); }; }; then
22371  cf_cv_need_libm=no
22372else
22373  echo "$as_me: failed program was:" >&5
22374cat "conftest.$ac_ext" >&5
22375cf_cv_need_libm=yes
22376fi
22377rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22378fi
22379echo "$as_me:22379: result: $cf_cv_need_libm" >&5
22380echo "${ECHO_T}$cf_cv_need_libm" >&6
22381if test "$cf_cv_need_libm" = yes
22382then
22383
22384cf_add_libs="$LIBS"
22385# reverse order
22386cf_add_0lib=
22387for cf_add_1lib in -lm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
22388# filter duplicates
22389for cf_add_1lib in $cf_add_0lib; do
22390	for cf_add_2lib in $cf_add_libs; do
22391		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
22392			cf_add_1lib=
22393			break
22394		fi
22395	done
22396	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
22397done
22398LIBS="$cf_add_libs"
22399
22400fi
22401
22402fi
22403
22404echo "$as_me:22404: checking if you want sixel graphics support" >&5
22405echo $ECHO_N "checking if you want sixel graphics support... $ECHO_C" >&6
22406
22407# Check whether --enable-sixel-graphics or --disable-sixel-graphics was given.
22408if test "${enable_sixel_graphics+set}" = set; then
22409  enableval="$enable_sixel_graphics"
22410  test "$enableval" != no && enableval=yes
22411	if test "$enableval" != "yes" ; then
22412    enable_sixel_graphics=no
22413	else
22414		enable_sixel_graphics=yes
22415	fi
22416else
22417  enableval=yes
22418	enable_sixel_graphics=yes
22419
22420fi;
22421echo "$as_me:22421: result: $enable_sixel_graphics" >&5
22422echo "${ECHO_T}$enable_sixel_graphics" >&6
22423if test "$enable_sixel_graphics" = yes ; then
22424
22425cat >>confdefs.h <<\EOF
22426#define OPT_SIXEL_GRAPHICS 1
22427EOF
22428
22429	EXTRAHDRS="$EXTRAHDRS graphics_sixel.h"
22430	EXTRASRCS="$EXTRASRCS graphics_sixel.c"
22431	EXTRAOBJS="$EXTRAOBJS graphics_sixel.o"
22432fi
22433
22434if test "$enable_regis_graphics" = yes || test "$enable_sixel_graphics" = yes ; then
22435
22436cat >>confdefs.h <<\EOF
22437#define OPT_GRAPHICS 1
22438EOF
22439
22440	EXTRAHDRS="$EXTRAHDRS graphics.h"
22441	EXTRASRCS="$EXTRASRCS graphics.c"
22442	EXTRAOBJS="$EXTRAOBJS graphics.o"
22443fi
22444
22445echo "$as_me:22445: checking if you want sixel screen dump support" >&5
22446echo $ECHO_N "checking if you want sixel screen dump support... $ECHO_C" >&6
22447
22448# Check whether --enable-print-graphics or --disable-print-graphics was given.
22449if test "${enable_print_graphics+set}" = set; then
22450  enableval="$enable_print_graphics"
22451  test "$enableval" != no && enableval=yes
22452	if test "$enableval" != "yes" ; then
22453    enable_print_graphics=no
22454	else
22455		enable_print_graphics=$enable_regis_graphics
22456	fi
22457else
22458  enableval=yes
22459	enable_print_graphics=$enable_regis_graphics
22460
22461fi;
22462echo "$as_me:22462: result: $enable_print_graphics" >&5
22463echo "${ECHO_T}$enable_print_graphics" >&6
22464if test "$enable_print_graphics" = yes ; then
22465
22466cat >>confdefs.h <<\EOF
22467#define OPT_PRINT_GRAPHICS 1
22468EOF
22469
22470fi
22471
22472echo "$as_me:22472: checking if you want VT420 rectangle support" >&5
22473echo $ECHO_N "checking if you want VT420 rectangle support... $ECHO_C" >&6
22474
22475# Check whether --enable-rectangles or --disable-rectangles was given.
22476if test "${enable_rectangles+set}" = set; then
22477  enableval="$enable_rectangles"
22478  test "$enableval" != no && enableval=yes
22479	if test "$enableval" != "yes" ; then
22480    enable_rectangles=no
22481	else
22482		enable_rectangles=yes
22483	fi
22484else
22485  enableval=yes
22486	enable_rectangles=yes
22487
22488fi;
22489echo "$as_me:22489: result: $enable_rectangles" >&5
22490echo "${ECHO_T}$enable_rectangles" >&6
22491if test "$enable_rectangles" = yes ; then
22492
22493cat >>confdefs.h <<\EOF
22494#define OPT_DEC_RECTOPS 1
22495EOF
22496
22497fi
22498
22499echo "$as_me:22499: checking if you want -ziconbeep option" >&5
22500echo $ECHO_N "checking if you want -ziconbeep option... $ECHO_C" >&6
22501
22502# Check whether --enable-ziconbeep or --disable-ziconbeep was given.
22503if test "${enable_ziconbeep+set}" = set; then
22504  enableval="$enable_ziconbeep"
22505  test "$enableval" != no && enableval=yes
22506	if test "$enableval" != "yes" ; then
22507    enable_ziconbeep=no
22508	else
22509		enable_ziconbeep=yes
22510	fi
22511else
22512  enableval=yes
22513	enable_ziconbeep=yes
22514
22515fi;
22516echo "$as_me:22516: result: $enable_ziconbeep" >&5
22517echo "${ECHO_T}$enable_ziconbeep" >&6
22518test "$enable_ziconbeep" = no &&
22519cat >>confdefs.h <<\EOF
22520#define OPT_ZICONBEEP 0
22521EOF
22522
22523###############################################################################
22524
22525echo "$as_me:22525: checking if you want debugging traces" >&5
22526echo $ECHO_N "checking if you want debugging traces... $ECHO_C" >&6
22527
22528# Check whether --enable-trace or --disable-trace was given.
22529if test "${enable_trace+set}" = set; then
22530  enableval="$enable_trace"
22531  test "$enableval" != yes && enableval=no
22532	if test "$enableval" != "no" ; then
22533    enable_trace=yes
22534	else
22535		enable_trace=no
22536	fi
22537else
22538  enableval=no
22539	enable_trace=no
22540
22541fi;
22542echo "$as_me:22542: result: $enable_trace" >&5
22543echo "${ECHO_T}$enable_trace" >&6
22544if test "$enable_trace" = yes ; then
22545
22546cat >>confdefs.h <<\EOF
22547#define OPT_TRACE 1
22548EOF
22549
22550	EXTRASRCS="$EXTRASRCS trace.c"
22551	EXTRAOBJS="$EXTRAOBJS trace.o"
22552fi
22553
22554echo "$as_me:22554: checking if you want to use dmalloc for testing" >&5
22555echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
22556
22557# Check whether --with-dmalloc or --without-dmalloc was given.
22558if test "${with_dmalloc+set}" = set; then
22559  withval="$with_dmalloc"
22560
22561cat >>confdefs.h <<EOF
22562#define USE_DMALLOC 1
22563EOF
22564
22565	: "${with_cflags:=-g}"
22566	: "${enable_leaks:=no}"
22567	 with_dmalloc=yes
22568else
22569  with_dmalloc=
22570fi;
22571echo "$as_me:22571: result: ${with_dmalloc:-no}" >&5
22572echo "${ECHO_T}${with_dmalloc:-no}" >&6
22573
22574case ".$with_cflags" in
22575(.*-g*)
22576	case .$CFLAGS in
22577	(.*-g*)
22578		;;
22579	(*)
22580
22581cf_fix_cppflags=no
22582cf_new_cflags=
22583cf_new_cppflags=
22584cf_new_extra_cppflags=
22585
22586for cf_add_cflags in -g
22587do
22588case "$cf_fix_cppflags" in
22589(no)
22590	case "$cf_add_cflags" in
22591	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
22592		case "$cf_add_cflags" in
22593		(-D*)
22594			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
22595
22596			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
22597				&& test -z "${cf_tst_cflags}" \
22598				&& cf_fix_cppflags=yes
22599
22600			if test "$cf_fix_cppflags" = yes ; 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			elif test "${cf_tst_cflags}" = "\"'" ; then
22607
22608	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
22609	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
22610
22611				continue
22612			fi
22613			;;
22614		esac
22615		case "$CPPFLAGS" in
22616		(*$cf_add_cflags)
22617			;;
22618		(*)
22619			case "$cf_add_cflags" in
22620			(-D*)
22621				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
22622
22623CPPFLAGS=`echo "$CPPFLAGS" | \
22624	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
22625		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
22626
22627				;;
22628			esac
22629
22630	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
22631	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
22632
22633			;;
22634		esac
22635		;;
22636	(*)
22637
22638	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
22639	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
22640
22641		;;
22642	esac
22643	;;
22644(yes)
22645
22646	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
22647	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
22648
22649	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
22650
22651	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
22652		&& test -z "${cf_tst_cflags}" \
22653		&& cf_fix_cppflags=no
22654	;;
22655esac
22656done
22657
22658if test -n "$cf_new_cflags" ; then
22659
22660	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
22661	CFLAGS="${CFLAGS}$cf_new_cflags"
22662
22663fi
22664
22665if test -n "$cf_new_cppflags" ; then
22666
22667	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
22668	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
22669
22670fi
22671
22672if test -n "$cf_new_extra_cppflags" ; then
22673
22674	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
22675	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
22676
22677fi
22678
22679		;;
22680	esac
22681	;;
22682esac
22683
22684if test "$with_dmalloc" = yes ; then
22685	echo "$as_me:22685: checking for dmalloc.h" >&5
22686echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
22687if test "${ac_cv_header_dmalloc_h+set}" = set; then
22688  echo $ECHO_N "(cached) $ECHO_C" >&6
22689else
22690  cat >"conftest.$ac_ext" <<_ACEOF
22691#line 22691 "configure"
22692#include "confdefs.h"
22693#include <dmalloc.h>
22694_ACEOF
22695if { (eval echo "$as_me:22695: \"$ac_cpp "conftest.$ac_ext"\"") >&5
22696  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
22697  ac_status=$?
22698  $EGREP -v '^ *\+' conftest.er1 >conftest.err
22699  rm -f conftest.er1
22700  cat conftest.err >&5
22701  echo "$as_me:22701: \$? = $ac_status" >&5
22702  (exit "$ac_status"); } >/dev/null; then
22703  if test -s conftest.err; then
22704    ac_cpp_err=$ac_c_preproc_warn_flag
22705  else
22706    ac_cpp_err=
22707  fi
22708else
22709  ac_cpp_err=yes
22710fi
22711if test -z "$ac_cpp_err"; then
22712  ac_cv_header_dmalloc_h=yes
22713else
22714  echo "$as_me: failed program was:" >&5
22715  cat "conftest.$ac_ext" >&5
22716  ac_cv_header_dmalloc_h=no
22717fi
22718rm -f conftest.err "conftest.$ac_ext"
22719fi
22720echo "$as_me:22720: result: $ac_cv_header_dmalloc_h" >&5
22721echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
22722if test "$ac_cv_header_dmalloc_h" = yes; then
22723
22724echo "$as_me:22724: checking for dmalloc_debug in -ldmalloc" >&5
22725echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
22726if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
22727  echo $ECHO_N "(cached) $ECHO_C" >&6
22728else
22729  ac_check_lib_save_LIBS=$LIBS
22730LIBS="-ldmalloc  $LIBS"
22731cat >"conftest.$ac_ext" <<_ACEOF
22732#line 22732 "configure"
22733#include "confdefs.h"
22734
22735/* Override any gcc2 internal prototype to avoid an error.  */
22736#ifdef __cplusplus
22737extern "C"
22738#endif
22739/* We use char because int might match the return type of a gcc2
22740   builtin and then its argument prototype would still apply.  */
22741char dmalloc_debug ();
22742int
22743main (void)
22744{
22745dmalloc_debug ();
22746  ;
22747  return 0;
22748}
22749_ACEOF
22750rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22751if { (eval echo "$as_me:22751: \"$ac_link\"") >&5
22752  (eval $ac_link) 2>&5
22753  ac_status=$?
22754  echo "$as_me:22754: \$? = $ac_status" >&5
22755  (exit "$ac_status"); } &&
22756         { ac_try='test -s "conftest$ac_exeext"'
22757  { (eval echo "$as_me:22757: \"$ac_try\"") >&5
22758  (eval $ac_try) 2>&5
22759  ac_status=$?
22760  echo "$as_me:22760: \$? = $ac_status" >&5
22761  (exit "$ac_status"); }; }; then
22762  ac_cv_lib_dmalloc_dmalloc_debug=yes
22763else
22764  echo "$as_me: failed program was:" >&5
22765cat "conftest.$ac_ext" >&5
22766ac_cv_lib_dmalloc_dmalloc_debug=no
22767fi
22768rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22769LIBS=$ac_check_lib_save_LIBS
22770fi
22771echo "$as_me:22771: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
22772echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
22773if test "$ac_cv_lib_dmalloc_dmalloc_debug" = yes; then
22774  cat >>confdefs.h <<EOF
22775#define HAVE_LIBDMALLOC 1
22776EOF
22777
22778  LIBS="-ldmalloc $LIBS"
22779
22780fi
22781
22782fi
22783
22784fi
22785
22786echo "$as_me:22786: checking if you want to use dbmalloc for testing" >&5
22787echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
22788
22789# Check whether --with-dbmalloc or --without-dbmalloc was given.
22790if test "${with_dbmalloc+set}" = set; then
22791  withval="$with_dbmalloc"
22792
22793cat >>confdefs.h <<EOF
22794#define USE_DBMALLOC 1
22795EOF
22796
22797	: "${with_cflags:=-g}"
22798	: "${enable_leaks:=no}"
22799	 with_dbmalloc=yes
22800else
22801  with_dbmalloc=
22802fi;
22803echo "$as_me:22803: result: ${with_dbmalloc:-no}" >&5
22804echo "${ECHO_T}${with_dbmalloc:-no}" >&6
22805
22806case ".$with_cflags" in
22807(.*-g*)
22808	case .$CFLAGS in
22809	(.*-g*)
22810		;;
22811	(*)
22812
22813cf_fix_cppflags=no
22814cf_new_cflags=
22815cf_new_cppflags=
22816cf_new_extra_cppflags=
22817
22818for cf_add_cflags in -g
22819do
22820case "$cf_fix_cppflags" in
22821(no)
22822	case "$cf_add_cflags" in
22823	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
22824		case "$cf_add_cflags" in
22825		(-D*)
22826			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
22827
22828			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
22829				&& test -z "${cf_tst_cflags}" \
22830				&& cf_fix_cppflags=yes
22831
22832			if test "$cf_fix_cppflags" = yes ; 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			elif test "${cf_tst_cflags}" = "\"'" ; then
22839
22840	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
22841	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
22842
22843				continue
22844			fi
22845			;;
22846		esac
22847		case "$CPPFLAGS" in
22848		(*$cf_add_cflags)
22849			;;
22850		(*)
22851			case "$cf_add_cflags" in
22852			(-D*)
22853				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
22854
22855CPPFLAGS=`echo "$CPPFLAGS" | \
22856	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
22857		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
22858
22859				;;
22860			esac
22861
22862	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
22863	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
22864
22865			;;
22866		esac
22867		;;
22868	(*)
22869
22870	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
22871	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
22872
22873		;;
22874	esac
22875	;;
22876(yes)
22877
22878	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
22879	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
22880
22881	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
22882
22883	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
22884		&& test -z "${cf_tst_cflags}" \
22885		&& cf_fix_cppflags=no
22886	;;
22887esac
22888done
22889
22890if test -n "$cf_new_cflags" ; then
22891
22892	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
22893	CFLAGS="${CFLAGS}$cf_new_cflags"
22894
22895fi
22896
22897if test -n "$cf_new_cppflags" ; then
22898
22899	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
22900	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
22901
22902fi
22903
22904if test -n "$cf_new_extra_cppflags" ; then
22905
22906	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
22907	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
22908
22909fi
22910
22911		;;
22912	esac
22913	;;
22914esac
22915
22916if test "$with_dbmalloc" = yes ; then
22917	echo "$as_me:22917: checking for dbmalloc.h" >&5
22918echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
22919if test "${ac_cv_header_dbmalloc_h+set}" = set; then
22920  echo $ECHO_N "(cached) $ECHO_C" >&6
22921else
22922  cat >"conftest.$ac_ext" <<_ACEOF
22923#line 22923 "configure"
22924#include "confdefs.h"
22925#include <dbmalloc.h>
22926_ACEOF
22927if { (eval echo "$as_me:22927: \"$ac_cpp "conftest.$ac_ext"\"") >&5
22928  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
22929  ac_status=$?
22930  $EGREP -v '^ *\+' conftest.er1 >conftest.err
22931  rm -f conftest.er1
22932  cat conftest.err >&5
22933  echo "$as_me:22933: \$? = $ac_status" >&5
22934  (exit "$ac_status"); } >/dev/null; then
22935  if test -s conftest.err; then
22936    ac_cpp_err=$ac_c_preproc_warn_flag
22937  else
22938    ac_cpp_err=
22939  fi
22940else
22941  ac_cpp_err=yes
22942fi
22943if test -z "$ac_cpp_err"; then
22944  ac_cv_header_dbmalloc_h=yes
22945else
22946  echo "$as_me: failed program was:" >&5
22947  cat "conftest.$ac_ext" >&5
22948  ac_cv_header_dbmalloc_h=no
22949fi
22950rm -f conftest.err "conftest.$ac_ext"
22951fi
22952echo "$as_me:22952: result: $ac_cv_header_dbmalloc_h" >&5
22953echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
22954if test "$ac_cv_header_dbmalloc_h" = yes; then
22955
22956echo "$as_me:22956: checking for debug_malloc in -ldbmalloc" >&5
22957echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
22958if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
22959  echo $ECHO_N "(cached) $ECHO_C" >&6
22960else
22961  ac_check_lib_save_LIBS=$LIBS
22962LIBS="-ldbmalloc  $LIBS"
22963cat >"conftest.$ac_ext" <<_ACEOF
22964#line 22964 "configure"
22965#include "confdefs.h"
22966
22967/* Override any gcc2 internal prototype to avoid an error.  */
22968#ifdef __cplusplus
22969extern "C"
22970#endif
22971/* We use char because int might match the return type of a gcc2
22972   builtin and then its argument prototype would still apply.  */
22973char debug_malloc ();
22974int
22975main (void)
22976{
22977debug_malloc ();
22978  ;
22979  return 0;
22980}
22981_ACEOF
22982rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22983if { (eval echo "$as_me:22983: \"$ac_link\"") >&5
22984  (eval $ac_link) 2>&5
22985  ac_status=$?
22986  echo "$as_me:22986: \$? = $ac_status" >&5
22987  (exit "$ac_status"); } &&
22988         { ac_try='test -s "conftest$ac_exeext"'
22989  { (eval echo "$as_me:22989: \"$ac_try\"") >&5
22990  (eval $ac_try) 2>&5
22991  ac_status=$?
22992  echo "$as_me:22992: \$? = $ac_status" >&5
22993  (exit "$ac_status"); }; }; then
22994  ac_cv_lib_dbmalloc_debug_malloc=yes
22995else
22996  echo "$as_me: failed program was:" >&5
22997cat "conftest.$ac_ext" >&5
22998ac_cv_lib_dbmalloc_debug_malloc=no
22999fi
23000rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23001LIBS=$ac_check_lib_save_LIBS
23002fi
23003echo "$as_me:23003: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
23004echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
23005if test "$ac_cv_lib_dbmalloc_debug_malloc" = yes; then
23006  cat >>confdefs.h <<EOF
23007#define HAVE_LIBDBMALLOC 1
23008EOF
23009
23010  LIBS="-ldbmalloc $LIBS"
23011
23012fi
23013
23014fi
23015
23016fi
23017
23018echo "$as_me:23018: checking if you want to use valgrind for testing" >&5
23019echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
23020
23021# Check whether --with-valgrind or --without-valgrind was given.
23022if test "${with_valgrind+set}" = set; then
23023  withval="$with_valgrind"
23024
23025cat >>confdefs.h <<EOF
23026#define USE_VALGRIND 1
23027EOF
23028
23029	: "${with_cflags:=-g}"
23030	: "${enable_leaks:=no}"
23031	 with_valgrind=yes
23032else
23033  with_valgrind=
23034fi;
23035echo "$as_me:23035: result: ${with_valgrind:-no}" >&5
23036echo "${ECHO_T}${with_valgrind:-no}" >&6
23037
23038case ".$with_cflags" in
23039(.*-g*)
23040	case .$CFLAGS in
23041	(.*-g*)
23042		;;
23043	(*)
23044
23045cf_fix_cppflags=no
23046cf_new_cflags=
23047cf_new_cppflags=
23048cf_new_extra_cppflags=
23049
23050for cf_add_cflags in -g
23051do
23052case "$cf_fix_cppflags" in
23053(no)
23054	case "$cf_add_cflags" in
23055	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
23056		case "$cf_add_cflags" in
23057		(-D*)
23058			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
23059
23060			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
23061				&& test -z "${cf_tst_cflags}" \
23062				&& cf_fix_cppflags=yes
23063
23064			if test "$cf_fix_cppflags" = yes ; 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			elif test "${cf_tst_cflags}" = "\"'" ; then
23071
23072	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
23073	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
23074
23075				continue
23076			fi
23077			;;
23078		esac
23079		case "$CPPFLAGS" in
23080		(*$cf_add_cflags)
23081			;;
23082		(*)
23083			case "$cf_add_cflags" in
23084			(-D*)
23085				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
23086
23087CPPFLAGS=`echo "$CPPFLAGS" | \
23088	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
23089		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
23090
23091				;;
23092			esac
23093
23094	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
23095	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
23096
23097			;;
23098		esac
23099		;;
23100	(*)
23101
23102	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
23103	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
23104
23105		;;
23106	esac
23107	;;
23108(yes)
23109
23110	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
23111	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
23112
23113	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
23114
23115	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
23116		&& test -z "${cf_tst_cflags}" \
23117		&& cf_fix_cppflags=no
23118	;;
23119esac
23120done
23121
23122if test -n "$cf_new_cflags" ; then
23123
23124	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
23125	CFLAGS="${CFLAGS}$cf_new_cflags"
23126
23127fi
23128
23129if test -n "$cf_new_cppflags" ; then
23130
23131	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
23132	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
23133
23134fi
23135
23136if test -n "$cf_new_extra_cppflags" ; then
23137
23138	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
23139	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
23140
23141fi
23142
23143		;;
23144	esac
23145	;;
23146esac
23147
23148echo "$as_me:23148: checking if you want to perform memory-leak testing" >&5
23149echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
23150
23151# Check whether --enable-leaks or --disable-leaks was given.
23152if test "${enable_leaks+set}" = set; then
23153  enableval="$enable_leaks"
23154  enable_leaks=$enableval
23155else
23156  enable_leaks=yes
23157fi;
23158if test "x$enable_leaks" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
23159echo "$as_me:23159: result: $with_no_leaks" >&5
23160echo "${ECHO_T}$with_no_leaks" >&6
23161
23162if test "$enable_leaks" = no ; then
23163
23164cat >>confdefs.h <<\EOF
23165#define NO_LEAKS 1
23166EOF
23167
23168cat >>confdefs.h <<\EOF
23169#define YY_NO_LEAKS 1
23170EOF
23171
23172fi
23173
23174echo "$as_me:23174: checking if you want to see long compiling messages" >&5
23175echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
23176
23177# Check whether --enable-echo or --disable-echo was given.
23178if test "${enable_echo+set}" = set; then
23179  enableval="$enable_echo"
23180  test "$enableval" != no && enableval=yes
23181	if test "$enableval" != "yes" ; then
23182
23183	ECHO_LT='--silent'
23184	ECHO_LD='@echo linking $@;'
23185	RULE_CC='@echo compiling $<'
23186	SHOW_CC='@echo compiling $@'
23187	ECHO_CC='@'
23188
23189	else
23190
23191	ECHO_LT=''
23192	ECHO_LD=''
23193	RULE_CC=''
23194	SHOW_CC=''
23195	ECHO_CC=''
23196
23197	fi
23198else
23199  enableval=yes
23200
23201	ECHO_LT=''
23202	ECHO_LD=''
23203	RULE_CC=''
23204	SHOW_CC=''
23205	ECHO_CC=''
23206
23207fi;
23208echo "$as_me:23208: result: $enableval" >&5
23209echo "${ECHO_T}$enableval" >&6
23210
23211echo "$as_me:23211: checking if you want magic cookie emulation" >&5
23212echo $ECHO_N "checking if you want magic cookie emulation... $ECHO_C" >&6
23213
23214# Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
23215if test "${enable_xmc_glitch+set}" = set; then
23216  enableval="$enable_xmc_glitch"
23217  test "$enableval" != yes && enableval=no
23218	if test "$enableval" != "no" ; then
23219    enable_xmc=yes
23220	else
23221		enable_xmc=no
23222	fi
23223else
23224  enableval=no
23225	enable_xmc=no
23226
23227fi;
23228echo "$as_me:23228: result: $enable_xmc" >&5
23229echo "${ECHO_T}$enable_xmc" >&6
23230if test "$enable_xmc" = yes ; then
23231
23232cat >>confdefs.h <<\EOF
23233#define OPT_XMC_GLITCH 1
23234EOF
23235
23236	EXTRASRCS="$EXTRASRCS testxmc.c"
23237	EXTRAOBJS="$EXTRAOBJS testxmc.o"
23238fi
23239
23240for ac_func in tigetstr
23241do
23242as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23243echo "$as_me:23243: checking for $ac_func" >&5
23244echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
23245if eval "test \"\${$as_ac_var+set}\" = set"; then
23246  echo $ECHO_N "(cached) $ECHO_C" >&6
23247else
23248  cat >"conftest.$ac_ext" <<_ACEOF
23249#line 23249 "configure"
23250#include "confdefs.h"
23251#define $ac_func autoconf_temporary
23252#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
23253#undef $ac_func
23254
23255#ifdef __cplusplus
23256extern "C"
23257#endif
23258
23259/* We use char because int might match the return type of a gcc2
23260   builtin and then its argument prototype would still apply.  */
23261char $ac_func (void);
23262
23263int
23264main (void)
23265{
23266
23267/* The GNU C library defines stubs for functions which it implements
23268    to always fail with ENOSYS.  Some functions are actually named
23269    something starting with __ and the normal name is an alias.  */
23270#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23271#error found stub for $ac_func
23272#endif
23273
23274	return $ac_func ();
23275  ;
23276  return 0;
23277}
23278_ACEOF
23279rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23280if { (eval echo "$as_me:23280: \"$ac_link\"") >&5
23281  (eval $ac_link) 2>&5
23282  ac_status=$?
23283  echo "$as_me:23283: \$? = $ac_status" >&5
23284  (exit "$ac_status"); } &&
23285         { ac_try='test -s "conftest$ac_exeext"'
23286  { (eval echo "$as_me:23286: \"$ac_try\"") >&5
23287  (eval $ac_try) 2>&5
23288  ac_status=$?
23289  echo "$as_me:23289: \$? = $ac_status" >&5
23290  (exit "$ac_status"); }; }; then
23291  eval "$as_ac_var=yes"
23292else
23293  echo "$as_me: failed program was:" >&5
23294cat "conftest.$ac_ext" >&5
23295eval "$as_ac_var=no"
23296fi
23297rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23298fi
23299echo "$as_me:23299: result: `eval echo '${'"$as_ac_var"'}'`" >&5
23300echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
23301if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
23302  cat >>confdefs.h <<EOF
23303#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
23304EOF
23305
23306fi
23307done
23308
23309if test -n "$cf_cv_lib_part_tgetent"; then
23310
23311for ac_func in use_extended_names
23312do
23313as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23314echo "$as_me:23314: checking for $ac_func" >&5
23315echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
23316if eval "test \"\${$as_ac_var+set}\" = set"; then
23317  echo $ECHO_N "(cached) $ECHO_C" >&6
23318else
23319  cat >"conftest.$ac_ext" <<_ACEOF
23320#line 23320 "configure"
23321#include "confdefs.h"
23322#define $ac_func autoconf_temporary
23323#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
23324#undef $ac_func
23325
23326#ifdef __cplusplus
23327extern "C"
23328#endif
23329
23330/* We use char because int might match the return type of a gcc2
23331   builtin and then its argument prototype would still apply.  */
23332char $ac_func (void);
23333
23334int
23335main (void)
23336{
23337
23338/* The GNU C library defines stubs for functions which it implements
23339    to always fail with ENOSYS.  Some functions are actually named
23340    something starting with __ and the normal name is an alias.  */
23341#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23342#error found stub for $ac_func
23343#endif
23344
23345	return $ac_func ();
23346  ;
23347  return 0;
23348}
23349_ACEOF
23350rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23351if { (eval echo "$as_me:23351: \"$ac_link\"") >&5
23352  (eval $ac_link) 2>&5
23353  ac_status=$?
23354  echo "$as_me:23354: \$? = $ac_status" >&5
23355  (exit "$ac_status"); } &&
23356         { ac_try='test -s "conftest$ac_exeext"'
23357  { (eval echo "$as_me:23357: \"$ac_try\"") >&5
23358  (eval $ac_try) 2>&5
23359  ac_status=$?
23360  echo "$as_me:23360: \$? = $ac_status" >&5
23361  (exit "$ac_status"); }; }; then
23362  eval "$as_ac_var=yes"
23363else
23364  echo "$as_me: failed program was:" >&5
23365cat "conftest.$ac_ext" >&5
23366eval "$as_ac_var=no"
23367fi
23368rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23369fi
23370echo "$as_me:23370: result: `eval echo '${'"$as_ac_var"'}'`" >&5
23371echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
23372if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
23373  cat >>confdefs.h <<EOF
23374#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
23375EOF
23376
23377fi
23378done
23379
23380fi
23381
23382echo "$as_me:23382: checking if you want to use C11 _Noreturn feature" >&5
23383echo $ECHO_N "checking if you want to use C11 _Noreturn feature... $ECHO_C" >&6
23384
23385# Check whether --enable-stdnoreturn or --disable-stdnoreturn was given.
23386if test "${enable_stdnoreturn+set}" = set; then
23387  enableval="$enable_stdnoreturn"
23388  test "$enableval" != yes && enableval=no
23389	if test "$enableval" != "no" ; then
23390    enable_stdnoreturn=yes
23391	else
23392		enable_stdnoreturn=no
23393	fi
23394else
23395  enableval=no
23396	enable_stdnoreturn=no
23397
23398fi;
23399echo "$as_me:23399: result: $enable_stdnoreturn" >&5
23400echo "${ECHO_T}$enable_stdnoreturn" >&6
23401
23402if test $enable_stdnoreturn = yes; then
23403echo "$as_me:23403: checking for C11 _Noreturn feature" >&5
23404echo $ECHO_N "checking for C11 _Noreturn feature... $ECHO_C" >&6
23405if test "${cf_cv_c11_noreturn+set}" = set; then
23406  echo $ECHO_N "(cached) $ECHO_C" >&6
23407else
23408  cat >"conftest.$ac_ext" <<_ACEOF
23409#line 23409 "configure"
23410#include "confdefs.h"
23411
23412#include <stdio.h>
23413#include <stdlib.h>
23414#include <stdnoreturn.h>
23415static _Noreturn void giveup(void) { exit(0); }
23416
23417int
23418main (void)
23419{
23420if (feof(stdin)) giveup()
23421  ;
23422  return 0;
23423}
23424_ACEOF
23425rm -f "conftest.$ac_objext"
23426if { (eval echo "$as_me:23426: \"$ac_compile\"") >&5
23427  (eval $ac_compile) 2>&5
23428  ac_status=$?
23429  echo "$as_me:23429: \$? = $ac_status" >&5
23430  (exit "$ac_status"); } &&
23431         { ac_try='test -s "conftest.$ac_objext"'
23432  { (eval echo "$as_me:23432: \"$ac_try\"") >&5
23433  (eval $ac_try) 2>&5
23434  ac_status=$?
23435  echo "$as_me:23435: \$? = $ac_status" >&5
23436  (exit "$ac_status"); }; }; then
23437  cf_cv_c11_noreturn=yes
23438else
23439  echo "$as_me: failed program was:" >&5
23440cat "conftest.$ac_ext" >&5
23441cf_cv_c11_noreturn=no
23442fi
23443rm -f "conftest.$ac_objext" "conftest.$ac_ext"
23444
23445fi
23446echo "$as_me:23446: result: $cf_cv_c11_noreturn" >&5
23447echo "${ECHO_T}$cf_cv_c11_noreturn" >&6
23448else
23449	cf_cv_c11_noreturn=no,
23450fi
23451
23452if test "$cf_cv_c11_noreturn" = yes; then
23453
23454cat >>confdefs.h <<\EOF
23455#define HAVE_STDNORETURN_H 1
23456EOF
23457
23458cat >>confdefs.h <<EOF
23459#define STDC_NORETURN _Noreturn
23460EOF
23461
23462	HAVE_STDNORETURN_H=1
23463else
23464	HAVE_STDNORETURN_H=0
23465fi
23466
23467if test "$GCC" = yes || test "$GXX" = yes
23468then
23469
23470if test "$GCC" = yes || test "$GXX" = yes
23471then
23472	case $CFLAGS in
23473	(*-Werror=*)
23474		test -n "$verbose" && echo "	repairing CFLAGS: $CFLAGS" 1>&6
23475
23476echo "${as_me:-configure}:23476: testing repairing CFLAGS: $CFLAGS ..." 1>&5
23477
23478		cf_temp_flags=
23479		for cf_temp_scan in $CFLAGS
23480		do
23481			case "x$cf_temp_scan" in
23482			(x-Werror=*)
23483
23484	test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
23485	EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
23486
23487				;;
23488			(*)
23489
23490	test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
23491	cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
23492
23493				;;
23494			esac
23495		done
23496		CFLAGS="$cf_temp_flags"
23497		test -n "$verbose" && echo "	... fixed $CFLAGS" 1>&6
23498
23499echo "${as_me:-configure}:23499: testing ... fixed $CFLAGS ..." 1>&5
23500
23501		test -n "$verbose" && echo "	... extra $EXTRA_CFLAGS" 1>&6
23502
23503echo "${as_me:-configure}:23503: testing ... extra $EXTRA_CFLAGS ..." 1>&5
23504
23505		;;
23506	esac
23507fi
23508
23509if test "$GCC" = yes || test "$GXX" = yes
23510then
23511	case $CPPFLAGS in
23512	(*-Werror=*)
23513		test -n "$verbose" && echo "	repairing CPPFLAGS: $CPPFLAGS" 1>&6
23514
23515echo "${as_me:-configure}:23515: testing repairing CPPFLAGS: $CPPFLAGS ..." 1>&5
23516
23517		cf_temp_flags=
23518		for cf_temp_scan in $CPPFLAGS
23519		do
23520			case "x$cf_temp_scan" in
23521			(x-Werror=*)
23522
23523	test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
23524	EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
23525
23526				;;
23527			(*)
23528
23529	test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
23530	cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
23531
23532				;;
23533			esac
23534		done
23535		CPPFLAGS="$cf_temp_flags"
23536		test -n "$verbose" && echo "	... fixed $CPPFLAGS" 1>&6
23537
23538echo "${as_me:-configure}:23538: testing ... fixed $CPPFLAGS ..." 1>&5
23539
23540		test -n "$verbose" && echo "	... extra $EXTRA_CFLAGS" 1>&6
23541
23542echo "${as_me:-configure}:23542: testing ... extra $EXTRA_CFLAGS ..." 1>&5
23543
23544		;;
23545	esac
23546fi
23547
23548if test "$GCC" = yes || test "$GXX" = yes
23549then
23550	case $LDFLAGS in
23551	(*-Werror=*)
23552		test -n "$verbose" && echo "	repairing LDFLAGS: $LDFLAGS" 1>&6
23553
23554echo "${as_me:-configure}:23554: testing repairing LDFLAGS: $LDFLAGS ..." 1>&5
23555
23556		cf_temp_flags=
23557		for cf_temp_scan in $LDFLAGS
23558		do
23559			case "x$cf_temp_scan" in
23560			(x-Werror=*)
23561
23562	test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
23563	EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
23564
23565				;;
23566			(*)
23567
23568	test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
23569	cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
23570
23571				;;
23572			esac
23573		done
23574		LDFLAGS="$cf_temp_flags"
23575		test -n "$verbose" && echo "	... fixed $LDFLAGS" 1>&6
23576
23577echo "${as_me:-configure}:23577: testing ... fixed $LDFLAGS ..." 1>&5
23578
23579		test -n "$verbose" && echo "	... extra $EXTRA_CFLAGS" 1>&6
23580
23581echo "${as_me:-configure}:23581: testing ... extra $EXTRA_CFLAGS ..." 1>&5
23582
23583		;;
23584	esac
23585fi
23586
23587echo "$as_me:23587: checking if you want to turn on gcc warnings" >&5
23588echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6
23589
23590# Check whether --enable-warnings or --disable-warnings was given.
23591if test "${enable_warnings+set}" = set; then
23592  enableval="$enable_warnings"
23593  test "$enableval" != yes && enableval=no
23594	if test "$enableval" != "no" ; then
23595    enable_warnings=yes
23596	else
23597		enable_warnings=no
23598	fi
23599else
23600  enableval=no
23601	enable_warnings=no
23602
23603fi;
23604echo "$as_me:23604: result: $enable_warnings" >&5
23605echo "${ECHO_T}$enable_warnings" >&6
23606if test "$enable_warnings" = "yes"
23607then
23608
23609if test "$GCC" = yes || test "$GXX" = yes
23610then
23611cat > conftest.i <<EOF
23612#ifndef GCC_PRINTF
23613#define GCC_PRINTF 0
23614#endif
23615#ifndef GCC_SCANF
23616#define GCC_SCANF 0
23617#endif
23618#ifndef GCC_NORETURN
23619#define GCC_NORETURN /* nothing */
23620#endif
23621#ifndef GCC_UNUSED
23622#define GCC_UNUSED /* nothing */
23623#endif
23624EOF
23625if test "$GCC" = yes
23626then
23627	{ echo "$as_me:23627: checking for $CC __attribute__ directives..." >&5
23628echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
23629cat > "conftest.$ac_ext" <<EOF
23630#line 23630 "${as_me:-configure}"
23631#include "confdefs.h"
23632#include "conftest.h"
23633#include "conftest.i"
23634#if	GCC_PRINTF
23635#define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
23636#else
23637#define GCC_PRINTFLIKE(fmt,var) /*nothing*/
23638#endif
23639#if	GCC_SCANF
23640#define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
23641#else
23642#define GCC_SCANFLIKE(fmt,var)  /*nothing*/
23643#endif
23644extern void wow(char *,...) GCC_SCANFLIKE(1,2);
23645extern GCC_NORETURN void oops(char *,...) GCC_PRINTFLIKE(1,2);
23646extern GCC_NORETURN void foo(void);
23647int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { (void)argc; (void)argv; return 0; }
23648EOF
23649	cf_printf_attribute=no
23650	cf_scanf_attribute=no
23651	for cf_attribute in scanf printf unused noreturn
23652	do
23653
23654cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
23655
23656		cf_directive="__attribute__(($cf_attribute))"
23657		echo "checking for $CC $cf_directive" 1>&5
23658
23659		case "$cf_attribute" in
23660		(printf)
23661			cf_printf_attribute=yes
23662			cat >conftest.h <<EOF
23663#define GCC_$cf_ATTRIBUTE 1
23664EOF
23665			;;
23666		(scanf)
23667			cf_scanf_attribute=yes
23668			cat >conftest.h <<EOF
23669#define GCC_$cf_ATTRIBUTE 1
23670EOF
23671			;;
23672		(*)
23673			cat >conftest.h <<EOF
23674#define GCC_$cf_ATTRIBUTE $cf_directive
23675EOF
23676			;;
23677		esac
23678
23679		if { (eval echo "$as_me:23679: \"$ac_compile\"") >&5
23680  (eval $ac_compile) 2>&5
23681  ac_status=$?
23682  echo "$as_me:23682: \$? = $ac_status" >&5
23683  (exit "$ac_status"); }; then
23684			test -n "$verbose" && echo "$as_me:23684: result: ... $cf_attribute" >&5
23685echo "${ECHO_T}... $cf_attribute" >&6
23686			cat conftest.h >>confdefs.h
23687			case "$cf_attribute" in
23688			(noreturn)
23689
23690cat >>confdefs.h <<EOF
23691#define GCC_NORETURN $cf_directive
23692EOF
23693
23694				;;
23695			(printf)
23696				cf_value='/* nothing */'
23697				if test "$cf_printf_attribute" != no ; then
23698					cf_value='__attribute__((format(printf,fmt,var)))'
23699
23700cat >>confdefs.h <<\EOF
23701#define GCC_PRINTF 1
23702EOF
23703
23704				fi
23705
23706cat >>confdefs.h <<EOF
23707#define GCC_PRINTFLIKE(fmt,var) $cf_value
23708EOF
23709
23710				;;
23711			(scanf)
23712				cf_value='/* nothing */'
23713				if test "$cf_scanf_attribute" != no ; then
23714					cf_value='__attribute__((format(scanf,fmt,var)))'
23715
23716cat >>confdefs.h <<\EOF
23717#define GCC_SCANF 1
23718EOF
23719
23720				fi
23721
23722cat >>confdefs.h <<EOF
23723#define GCC_SCANFLIKE(fmt,var) $cf_value
23724EOF
23725
23726				;;
23727			(unused)
23728
23729cat >>confdefs.h <<EOF
23730#define GCC_UNUSED $cf_directive
23731EOF
23732
23733				;;
23734			esac
23735		fi
23736	done
23737else
23738	${FGREP-fgrep} define conftest.i >>confdefs.h
23739fi
23740rm -rf ./conftest*
23741fi
23742
23743if test "x$have_x" = xyes; then
23744
23745cf_save_LIBS_CF_CONST_X_STRING="$LIBS"
23746cf_save_CFLAGS_CF_CONST_X_STRING="$CFLAGS"
23747cf_save_CPPFLAGS_CF_CONST_X_STRING="$CPPFLAGS"
23748LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
23749for cf_X_CFLAGS in $X_CFLAGS
23750do
23751	case "x$cf_X_CFLAGS" in
23752	x-[IUD]*)
23753		CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
23754		;;
23755	*)
23756		CFLAGS="$CFLAGS $cf_X_CFLAGS"
23757		;;
23758	esac
23759done
23760
23761cat >"conftest.$ac_ext" <<_ACEOF
23762#line 23762 "configure"
23763#include "confdefs.h"
23764
23765#include <stdlib.h>
23766#include <X11/Intrinsic.h>
23767
23768int
23769main (void)
23770{
23771String foo = malloc(1); free((void*)foo)
23772  ;
23773  return 0;
23774}
23775_ACEOF
23776rm -f "conftest.$ac_objext"
23777if { (eval echo "$as_me:23777: \"$ac_compile\"") >&5
23778  (eval $ac_compile) 2>&5
23779  ac_status=$?
23780  echo "$as_me:23780: \$? = $ac_status" >&5
23781  (exit "$ac_status"); } &&
23782         { ac_try='test -s "conftest.$ac_objext"'
23783  { (eval echo "$as_me:23783: \"$ac_try\"") >&5
23784  (eval $ac_try) 2>&5
23785  ac_status=$?
23786  echo "$as_me:23786: \$? = $ac_status" >&5
23787  (exit "$ac_status"); }; }; then
23788
23789echo "$as_me:23789: checking for X11/Xt const-feature" >&5
23790echo $ECHO_N "checking for X11/Xt const-feature... $ECHO_C" >&6
23791if test "${cf_cv_const_x_string+set}" = set; then
23792  echo $ECHO_N "(cached) $ECHO_C" >&6
23793else
23794
23795	cat >"conftest.$ac_ext" <<_ACEOF
23796#line 23796 "configure"
23797#include "confdefs.h"
23798
23799#define _CONST_X_STRING	/* X11R7.8 (perhaps) */
23800#undef  XTSTRINGDEFINES	/* X11R5 and later */
23801#include <stdlib.h>
23802#include <X11/Intrinsic.h>
23803
23804int
23805main (void)
23806{
23807String foo = malloc(1); *foo = 0
23808  ;
23809  return 0;
23810}
23811_ACEOF
23812rm -f "conftest.$ac_objext"
23813if { (eval echo "$as_me:23813: \"$ac_compile\"") >&5
23814  (eval $ac_compile) 2>&5
23815  ac_status=$?
23816  echo "$as_me:23816: \$? = $ac_status" >&5
23817  (exit "$ac_status"); } &&
23818         { ac_try='test -s "conftest.$ac_objext"'
23819  { (eval echo "$as_me:23819: \"$ac_try\"") >&5
23820  (eval $ac_try) 2>&5
23821  ac_status=$?
23822  echo "$as_me:23822: \$? = $ac_status" >&5
23823  (exit "$ac_status"); }; }; then
23824
23825			cf_cv_const_x_string=no
23826
23827else
23828  echo "$as_me: failed program was:" >&5
23829cat "conftest.$ac_ext" >&5
23830
23831			cf_cv_const_x_string=yes
23832
23833fi
23834rm -f "conftest.$ac_objext" "conftest.$ac_ext"
23835
23836fi
23837echo "$as_me:23837: result: $cf_cv_const_x_string" >&5
23838echo "${ECHO_T}$cf_cv_const_x_string" >&6
23839
23840LIBS="$cf_save_LIBS_CF_CONST_X_STRING"
23841CFLAGS="$cf_save_CFLAGS_CF_CONST_X_STRING"
23842CPPFLAGS="$cf_save_CPPFLAGS_CF_CONST_X_STRING"
23843
23844case "$cf_cv_const_x_string" in
23845(no)
23846
23847	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
23848	CPPFLAGS="${CPPFLAGS}-DXTSTRINGDEFINES"
23849
23850	;;
23851(*)
23852
23853	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
23854	CPPFLAGS="${CPPFLAGS}-D_CONST_X_STRING"
23855
23856	;;
23857esac
23858
23859else
23860  echo "$as_me: failed program was:" >&5
23861cat "conftest.$ac_ext" >&5
23862fi
23863rm -f "conftest.$ac_objext" "conftest.$ac_ext"
23864 fi
23865cat > "conftest.$ac_ext" <<EOF
23866#line 23866 "${as_me:-configure}"
23867int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
23868EOF
23869if test "$INTEL_COMPILER" = yes
23870then
23871# The "-wdXXX" options suppress warnings:
23872# remark #1419: external declaration in primary source file
23873# remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
23874# remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
23875# remark #193: zero used for undefined preprocessing identifier
23876# remark #593: variable "curs_sb_left_arrow" was set but never used
23877# remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
23878# remark #869: parameter "tw" was never referenced
23879# remark #981: operands are evaluated in unspecified order
23880# warning #279: controlling expression is constant
23881
23882	{ echo "$as_me:23882: checking for $CC warning options..." >&5
23883echo "$as_me: checking for $CC warning options..." >&6;}
23884	cf_save_CFLAGS="$CFLAGS"
23885	EXTRA_CFLAGS="$EXTRA_CFLAGS -Wall"
23886	for cf_opt in \
23887		wd1419 \
23888		wd1683 \
23889		wd1684 \
23890		wd193 \
23891		wd593 \
23892		wd279 \
23893		wd810 \
23894		wd869 \
23895		wd981
23896	do
23897		CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
23898		if { (eval echo "$as_me:23898: \"$ac_compile\"") >&5
23899  (eval $ac_compile) 2>&5
23900  ac_status=$?
23901  echo "$as_me:23901: \$? = $ac_status" >&5
23902  (exit "$ac_status"); }; then
23903			test -n "$verbose" && echo "$as_me:23903: result: ... -$cf_opt" >&5
23904echo "${ECHO_T}... -$cf_opt" >&6
23905			EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
23906		fi
23907	done
23908	CFLAGS="$cf_save_CFLAGS"
23909elif test "$GCC" = yes && test "$GCC_VERSION" != "unknown"
23910then
23911	{ echo "$as_me:23911: checking for $CC warning options..." >&5
23912echo "$as_me: checking for $CC warning options..." >&6;}
23913	cf_save_CFLAGS="$CFLAGS"
23914	cf_warn_CONST=""
23915	test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
23916	cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
23917	test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
23918	for cf_opt in W Wall \
23919		Wbad-function-cast \
23920		Wcast-align \
23921		Wcast-qual \
23922		Wdeclaration-after-statement \
23923		Wextra \
23924		Winline \
23925		Wmissing-declarations \
23926		Wmissing-prototypes \
23927		Wnested-externs \
23928		Wpointer-arith \
23929		Wshadow \
23930		Wstrict-prototypes \
23931		Wundef Wno-inline $cf_gcc_warnings $cf_warn_CONST Wdeclaration-after-statement Wextra Wno-unknown-pragmas Wswitch-enum Wno-cast-qual
23932	do
23933		CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
23934		if { (eval echo "$as_me:23934: \"$ac_compile\"") >&5
23935  (eval $ac_compile) 2>&5
23936  ac_status=$?
23937  echo "$as_me:23937: \$? = $ac_status" >&5
23938  (exit "$ac_status"); }; then
23939			test -n "$verbose" && echo "$as_me:23939: result: ... -$cf_opt" >&5
23940echo "${ECHO_T}... -$cf_opt" >&6
23941			case "$cf_opt" in
23942			(Winline)
23943				case "$GCC_VERSION" in
23944				([34].*)
23945					test -n "$verbose" && echo "	feature is broken in gcc $GCC_VERSION" 1>&6
23946
23947echo "${as_me:-configure}:23947: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
23948
23949					continue;;
23950				esac
23951				;;
23952			(Wpointer-arith)
23953				case "$GCC_VERSION" in
23954				([12].*)
23955					test -n "$verbose" && echo "	feature is broken in gcc $GCC_VERSION" 1>&6
23956
23957echo "${as_me:-configure}:23957: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
23958
23959					continue;;
23960				esac
23961				;;
23962			esac
23963			EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
23964		fi
23965	done
23966	CFLAGS="$cf_save_CFLAGS"
23967fi
23968rm -rf ./conftest*
23969
23970fi
23971
23972fi
23973
23974test "$disable_setuid" = yes &&
23975cat >>confdefs.h <<\EOF
23976#define DISABLE_SETUID 1
23977EOF
23978
23979test "$disable_setgid" = yes &&
23980cat >>confdefs.h <<\EOF
23981#define DISABLE_SETGID 1
23982EOF
23983
23984if test $disable_setuid = yes ; then
23985	MAY_SETUID="#"
23986	NOT_SETUID=
23987elif test $disable_setgid = yes ; then
23988	MAY_SETUID="#"
23989	NOT_SETUID=
23990else
23991	MAY_SETUID=
23992	NOT_SETUID="#"
23993fi
23994
23995###	remove from CPPFLAGS the optional features we define in xtermcfg.h
23996###	or other conflicting symbols that may be defined via imake:
23997for cf_def in \
23998	__STDC__ \
23999	ALLOWLOGGING \
24000	ALLOWLOGFILEEXEC \
24001	OPT_LUIT_PROG \
24002	OPT_WIDE_CHARS \
24003	SCROLLBAR_RIGHT \
24004	USE_TTY_GROUP \
24005	USE_UTEMPTER \
24006	XRENDERFONT
24007do
24008	CPPFLAGS=`echo "$CPPFLAGS" | sed -e s/-D$cf_def//`
24009done
24010
24011echo "$as_me:24011: checking if filesystem supports mixed-case filenames" >&5
24012echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
24013if test "${cf_cv_mixedcase+set}" = set; then
24014  echo $ECHO_N "(cached) $ECHO_C" >&6
24015else
24016
24017if test "$cross_compiling" = yes ; then
24018	case "$target_alias" in
24019	(*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*|darwin*)
24020		cf_cv_mixedcase=no
24021		;;
24022	(*)
24023		cf_cv_mixedcase=yes
24024		;;
24025	esac
24026else
24027	rm -f conftest CONFTEST
24028	echo test >conftest
24029	if test -f CONFTEST ; then
24030		cf_cv_mixedcase=no
24031	else
24032		cf_cv_mixedcase=yes
24033	fi
24034	rm -f conftest CONFTEST
24035fi
24036
24037fi
24038echo "$as_me:24038: result: $cf_cv_mixedcase" >&5
24039echo "${ECHO_T}$cf_cv_mixedcase" >&6
24040test "$cf_cv_mixedcase" = yes &&
24041cat >>confdefs.h <<\EOF
24042#define MIXEDCASE_FILENAMES 1
24043EOF
24044
24045for ac_prog in exctags ctags
24046do
24047  # Extract the first word of "$ac_prog", so it can be a program name with args.
24048set dummy $ac_prog; ac_word=$2
24049echo "$as_me:24049: checking for $ac_word" >&5
24050echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
24051if test "${ac_cv_prog_CTAGS+set}" = set; then
24052  echo $ECHO_N "(cached) $ECHO_C" >&6
24053else
24054  if test -n "$CTAGS"; then
24055  ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
24056else
24057  ac_save_IFS=$IFS; IFS=$ac_path_separator
24058ac_dummy="$PATH"
24059for ac_dir in $ac_dummy; do
24060  IFS=$ac_save_IFS
24061  test -z "$ac_dir" && ac_dir=.
24062  $as_executable_p "$ac_dir/$ac_word" || continue
24063ac_cv_prog_CTAGS="$ac_prog"
24064echo "$as_me:24064: found $ac_dir/$ac_word" >&5
24065break
24066done
24067
24068fi
24069fi
24070CTAGS=$ac_cv_prog_CTAGS
24071if test -n "$CTAGS"; then
24072  echo "$as_me:24072: result: $CTAGS" >&5
24073echo "${ECHO_T}$CTAGS" >&6
24074else
24075  echo "$as_me:24075: result: no" >&5
24076echo "${ECHO_T}no" >&6
24077fi
24078
24079  test -n "$CTAGS" && break
24080done
24081
24082for ac_prog in exetags etags
24083do
24084  # Extract the first word of "$ac_prog", so it can be a program name with args.
24085set dummy $ac_prog; ac_word=$2
24086echo "$as_me:24086: checking for $ac_word" >&5
24087echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
24088if test "${ac_cv_prog_ETAGS+set}" = set; then
24089  echo $ECHO_N "(cached) $ECHO_C" >&6
24090else
24091  if test -n "$ETAGS"; then
24092  ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
24093else
24094  ac_save_IFS=$IFS; IFS=$ac_path_separator
24095ac_dummy="$PATH"
24096for ac_dir in $ac_dummy; do
24097  IFS=$ac_save_IFS
24098  test -z "$ac_dir" && ac_dir=.
24099  $as_executable_p "$ac_dir/$ac_word" || continue
24100ac_cv_prog_ETAGS="$ac_prog"
24101echo "$as_me:24101: found $ac_dir/$ac_word" >&5
24102break
24103done
24104
24105fi
24106fi
24107ETAGS=$ac_cv_prog_ETAGS
24108if test -n "$ETAGS"; then
24109  echo "$as_me:24109: result: $ETAGS" >&5
24110echo "${ECHO_T}$ETAGS" >&6
24111else
24112  echo "$as_me:24112: result: no" >&5
24113echo "${ECHO_T}no" >&6
24114fi
24115
24116  test -n "$ETAGS" && break
24117done
24118
24119# Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
24120set dummy ${CTAGS:-ctags}; ac_word=$2
24121echo "$as_me:24121: checking for $ac_word" >&5
24122echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
24123if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
24124  echo $ECHO_N "(cached) $ECHO_C" >&6
24125else
24126  if test -n "$MAKE_LOWER_TAGS"; then
24127  ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
24128else
24129  ac_save_IFS=$IFS; IFS=$ac_path_separator
24130ac_dummy="$PATH"
24131for ac_dir in $ac_dummy; do
24132  IFS=$ac_save_IFS
24133  test -z "$ac_dir" && ac_dir=.
24134  $as_executable_p "$ac_dir/$ac_word" || continue
24135ac_cv_prog_MAKE_LOWER_TAGS="yes"
24136echo "$as_me:24136: found $ac_dir/$ac_word" >&5
24137break
24138done
24139
24140  test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
24141fi
24142fi
24143MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
24144if test -n "$MAKE_LOWER_TAGS"; then
24145  echo "$as_me:24145: result: $MAKE_LOWER_TAGS" >&5
24146echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
24147else
24148  echo "$as_me:24148: result: no" >&5
24149echo "${ECHO_T}no" >&6
24150fi
24151
24152if test "$cf_cv_mixedcase" = yes ; then
24153	# Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
24154set dummy ${ETAGS:-etags}; ac_word=$2
24155echo "$as_me:24155: checking for $ac_word" >&5
24156echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
24157if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
24158  echo $ECHO_N "(cached) $ECHO_C" >&6
24159else
24160  if test -n "$MAKE_UPPER_TAGS"; then
24161  ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
24162else
24163  ac_save_IFS=$IFS; IFS=$ac_path_separator
24164ac_dummy="$PATH"
24165for ac_dir in $ac_dummy; do
24166  IFS=$ac_save_IFS
24167  test -z "$ac_dir" && ac_dir=.
24168  $as_executable_p "$ac_dir/$ac_word" || continue
24169ac_cv_prog_MAKE_UPPER_TAGS="yes"
24170echo "$as_me:24170: found $ac_dir/$ac_word" >&5
24171break
24172done
24173
24174  test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
24175fi
24176fi
24177MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
24178if test -n "$MAKE_UPPER_TAGS"; then
24179  echo "$as_me:24179: result: $MAKE_UPPER_TAGS" >&5
24180echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
24181else
24182  echo "$as_me:24182: result: no" >&5
24183echo "${ECHO_T}no" >&6
24184fi
24185
24186else
24187	MAKE_UPPER_TAGS=no
24188fi
24189
24190if test "$MAKE_UPPER_TAGS" = yes ; then
24191	MAKE_UPPER_TAGS=
24192else
24193	MAKE_UPPER_TAGS="#"
24194fi
24195
24196if test "$MAKE_LOWER_TAGS" = yes ; then
24197	MAKE_LOWER_TAGS=
24198else
24199	MAKE_LOWER_TAGS="#"
24200fi
24201
24202LD_RPATH_OPT=
24203if test "x$cf_cv_enable_rpath" != xno
24204then
24205	echo "$as_me:24205: checking for an rpath option" >&5
24206echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
24207	case "$cf_cv_system_name" in
24208	(irix*)
24209		if test "$GCC" = yes; then
24210			LD_RPATH_OPT="-Wl,-rpath,"
24211		else
24212			LD_RPATH_OPT="-rpath "
24213		fi
24214		;;
24215	(linux*|gnu*|k*bsd*-gnu|freebsd*)
24216		LD_RPATH_OPT="-Wl,-rpath,"
24217		;;
24218	(openbsd[2-9].*|mirbsd*)
24219		LD_RPATH_OPT="-Wl,-rpath,"
24220		;;
24221	(dragonfly*)
24222		LD_RPATH_OPT="-rpath "
24223		;;
24224	(netbsd*)
24225		LD_RPATH_OPT="-Wl,-rpath,"
24226		;;
24227	(osf*|mls+*)
24228		LD_RPATH_OPT="-rpath "
24229		;;
24230	(solaris2*)
24231		LD_RPATH_OPT="-R"
24232		;;
24233	(*)
24234		;;
24235	esac
24236	echo "$as_me:24236: result: $LD_RPATH_OPT" >&5
24237echo "${ECHO_T}$LD_RPATH_OPT" >&6
24238
24239	case "x$LD_RPATH_OPT" in
24240	(x-R*)
24241		echo "$as_me:24241: checking if we need a space after rpath option" >&5
24242echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
24243		cf_save_LIBS="$LIBS"
24244
24245cf_add_libs="$LIBS"
24246# reverse order
24247cf_add_0lib=
24248for cf_add_1lib in ${LD_RPATH_OPT}$libdir; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24249# filter duplicates
24250for cf_add_1lib in $cf_add_0lib; do
24251	for cf_add_2lib in $cf_add_libs; do
24252		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24253			cf_add_1lib=
24254			break
24255		fi
24256	done
24257	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24258done
24259LIBS="$cf_add_libs"
24260
24261		cat >"conftest.$ac_ext" <<_ACEOF
24262#line 24262 "configure"
24263#include "confdefs.h"
24264
24265int
24266main (void)
24267{
24268
24269  ;
24270  return 0;
24271}
24272_ACEOF
24273rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24274if { (eval echo "$as_me:24274: \"$ac_link\"") >&5
24275  (eval $ac_link) 2>&5
24276  ac_status=$?
24277  echo "$as_me:24277: \$? = $ac_status" >&5
24278  (exit "$ac_status"); } &&
24279         { ac_try='test -s "conftest$ac_exeext"'
24280  { (eval echo "$as_me:24280: \"$ac_try\"") >&5
24281  (eval $ac_try) 2>&5
24282  ac_status=$?
24283  echo "$as_me:24283: \$? = $ac_status" >&5
24284  (exit "$ac_status"); }; }; then
24285  cf_rpath_space=no
24286else
24287  echo "$as_me: failed program was:" >&5
24288cat "conftest.$ac_ext" >&5
24289cf_rpath_space=yes
24290fi
24291rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24292		LIBS="$cf_save_LIBS"
24293		echo "$as_me:24293: result: $cf_rpath_space" >&5
24294echo "${ECHO_T}$cf_rpath_space" >&6
24295		test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
24296		;;
24297	esac
24298fi
24299
24300echo "$as_me:24300: checking if rpath-hack should be disabled" >&5
24301echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
24302
24303# Check whether --enable-rpath-hack or --disable-rpath-hack was given.
24304if test "${enable_rpath_hack+set}" = set; then
24305  enableval="$enable_rpath_hack"
24306  test "$enableval" != no && enableval=yes
24307	if test "$enableval" != "yes" ; then
24308    enable_rpath_hack=no
24309	else
24310		enable_rpath_hack=yes
24311	fi
24312else
24313  enableval=yes
24314	enable_rpath_hack=yes
24315
24316fi;
24317if test "x$enable_rpath_hack" = xno; then cf_disable_rpath_hack=yes; else cf_disable_rpath_hack=no; fi
24318echo "$as_me:24318: result: $cf_disable_rpath_hack" >&5
24319echo "${ECHO_T}$cf_disable_rpath_hack" >&6
24320
24321if test "$enable_rpath_hack" = yes ; then
24322
24323echo "$as_me:24323: checking for updated LDFLAGS" >&5
24324echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
24325if test -n "$LD_RPATH_OPT" ; then
24326	echo "$as_me:24326: result: maybe" >&5
24327echo "${ECHO_T}maybe" >&6
24328
24329	for ac_prog in ldd
24330do
24331  # Extract the first word of "$ac_prog", so it can be a program name with args.
24332set dummy $ac_prog; ac_word=$2
24333echo "$as_me:24333: checking for $ac_word" >&5
24334echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
24335if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
24336  echo $ECHO_N "(cached) $ECHO_C" >&6
24337else
24338  if test -n "$cf_ldd_prog"; then
24339  ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
24340else
24341  ac_save_IFS=$IFS; IFS=$ac_path_separator
24342ac_dummy="$PATH"
24343for ac_dir in $ac_dummy; do
24344  IFS=$ac_save_IFS
24345  test -z "$ac_dir" && ac_dir=.
24346  $as_executable_p "$ac_dir/$ac_word" || continue
24347ac_cv_prog_cf_ldd_prog="$ac_prog"
24348echo "$as_me:24348: found $ac_dir/$ac_word" >&5
24349break
24350done
24351
24352fi
24353fi
24354cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
24355if test -n "$cf_ldd_prog"; then
24356  echo "$as_me:24356: result: $cf_ldd_prog" >&5
24357echo "${ECHO_T}$cf_ldd_prog" >&6
24358else
24359  echo "$as_me:24359: result: no" >&5
24360echo "${ECHO_T}no" >&6
24361fi
24362
24363  test -n "$cf_ldd_prog" && break
24364done
24365test -n "$cf_ldd_prog" || cf_ldd_prog="no"
24366
24367	cf_rpath_list="/usr/lib /lib"
24368	if test "$cf_ldd_prog" != no
24369	then
24370		cf_rpath_oops=
24371
24372cat >"conftest.$ac_ext" <<_ACEOF
24373#line 24373 "configure"
24374#include "confdefs.h"
24375#include <stdio.h>
24376int
24377main (void)
24378{
24379printf("Hello");
24380  ;
24381  return 0;
24382}
24383_ACEOF
24384rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24385if { (eval echo "$as_me:24385: \"$ac_link\"") >&5
24386  (eval $ac_link) 2>&5
24387  ac_status=$?
24388  echo "$as_me:24388: \$? = $ac_status" >&5
24389  (exit "$ac_status"); } &&
24390         { ac_try='test -s "conftest$ac_exeext"'
24391  { (eval echo "$as_me:24391: \"$ac_try\"") >&5
24392  (eval $ac_try) 2>&5
24393  ac_status=$?
24394  echo "$as_me:24394: \$? = $ac_status" >&5
24395  (exit "$ac_status"); }; }; then
24396  cf_rpath_oops=`"$cf_ldd_prog" "conftest$ac_exeext" | ${FGREP-fgrep} ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
24397		 cf_rpath_list=`"$cf_ldd_prog" "conftest$ac_exeext" | ${FGREP-fgrep} / | sed -e 's%^.*[ 	]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
24398else
24399  echo "$as_me: failed program was:" >&5
24400cat "conftest.$ac_ext" >&5
24401fi
24402rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24403
24404		# If we passed the link-test, but get a "not found" on a given library,
24405		# this could be due to inept reconfiguration of gcc to make it only
24406		# partly honor /usr/local/lib (or whatever).  Sometimes this behavior
24407		# is intentional, e.g., installing gcc in /usr/bin and suppressing the
24408		# /usr/local libraries.
24409		if test -n "$cf_rpath_oops"
24410		then
24411			for cf_rpath_src in $cf_rpath_oops
24412			do
24413				for cf_rpath_dir in \
24414					/usr/local \
24415					/usr/pkg \
24416					/opt/sfw
24417				do
24418					if test -f "$cf_rpath_dir/lib/$cf_rpath_src"
24419					then
24420						test -n "$verbose" && echo "	...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
24421
24422echo "${as_me:-configure}:24422: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
24423
24424						LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
24425						break
24426					fi
24427				done
24428			done
24429		fi
24430	fi
24431
24432	test -n "$verbose" && echo "	...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
24433
24434echo "${as_me:-configure}:24434: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
24435
24436test -n "$verbose" && echo "	...checking LDFLAGS $LDFLAGS" 1>&6
24437
24438echo "${as_me:-configure}:24438: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
24439
24440cf_rpath_dst=
24441for cf_rpath_src in $LDFLAGS
24442do
24443	case "$cf_rpath_src" in
24444	(-L*)
24445
24446		# check if this refers to a directory which we will ignore
24447		cf_rpath_skip=no
24448		if test -n "$cf_rpath_list"
24449		then
24450			for cf_rpath_item in $cf_rpath_list
24451			do
24452				if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
24453				then
24454					cf_rpath_skip=yes
24455					break
24456				fi
24457			done
24458		fi
24459
24460		if test "$cf_rpath_skip" = no
24461		then
24462			# transform the option
24463			if test "$LD_RPATH_OPT" = "-R " ; then
24464				cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
24465			else
24466				cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
24467			fi
24468
24469			# if we have not already added this, add it now
24470			cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
24471			if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
24472			then
24473				test -n "$verbose" && echo "	...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
24474
24475echo "${as_me:-configure}:24475: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
24476
24477				EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
24478			fi
24479		fi
24480		;;
24481	esac
24482	cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
24483done
24484LDFLAGS=$cf_rpath_dst
24485
24486test -n "$verbose" && echo "	...checked LDFLAGS $LDFLAGS" 1>&6
24487
24488echo "${as_me:-configure}:24488: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
24489
24490test -n "$verbose" && echo "	...checking LIBS $LIBS" 1>&6
24491
24492echo "${as_me:-configure}:24492: testing ...checking LIBS $LIBS ..." 1>&5
24493
24494cf_rpath_dst=
24495for cf_rpath_src in $LIBS
24496do
24497	case "$cf_rpath_src" in
24498	(-L*)
24499
24500		# check if this refers to a directory which we will ignore
24501		cf_rpath_skip=no
24502		if test -n "$cf_rpath_list"
24503		then
24504			for cf_rpath_item in $cf_rpath_list
24505			do
24506				if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
24507				then
24508					cf_rpath_skip=yes
24509					break
24510				fi
24511			done
24512		fi
24513
24514		if test "$cf_rpath_skip" = no
24515		then
24516			# transform the option
24517			if test "$LD_RPATH_OPT" = "-R " ; then
24518				cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
24519			else
24520				cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
24521			fi
24522
24523			# if we have not already added this, add it now
24524			cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
24525			if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
24526			then
24527				test -n "$verbose" && echo "	...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
24528
24529echo "${as_me:-configure}:24529: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
24530
24531				EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
24532			fi
24533		fi
24534		;;
24535	esac
24536	cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
24537done
24538LIBS=$cf_rpath_dst
24539
24540test -n "$verbose" && echo "	...checked LIBS $LIBS" 1>&6
24541
24542echo "${as_me:-configure}:24542: testing ...checked LIBS $LIBS ..." 1>&5
24543
24544	test -n "$verbose" && echo "	...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
24545
24546echo "${as_me:-configure}:24546: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
24547
24548else
24549	echo "$as_me:24549: result: no" >&5
24550echo "${ECHO_T}no" >&6
24551fi
24552
24553fi
24554
24555# Force plink.sh to not trim pcre's libraries, which have the same symbol
24556# names as the system regexp.
24557if test "$with_pcre" != no
24558then
24559	LIBS=`echo "$LIBS" | sed -e 's/-lpcre/-kpcre/g'`
24560fi
24561
24562###	output xtermcfg.h, etc
24563ac_config_files="$ac_config_files Makefile df-install minstall:minstall.in"
24564
24565cat >confcache <<\_ACEOF
24566# This file is a shell script that caches the results of configure
24567# tests run on this system so they can be shared between configure
24568# scripts and configure runs, see configure's option --config-cache.
24569# It is not useful on other systems.  If it contains results you don't
24570# want to keep, you may remove or edit it.
24571#
24572# config.status only pays attention to the cache file if you give it
24573# the --recheck option to rerun configure.
24574#
24575# `ac_cv_env_foo' variables (set or unset) will be overriden when
24576# loading this file, other *unset* `ac_cv_foo' will be assigned the
24577# following values.
24578
24579_ACEOF
24580
24581# The following way of writing the cache mishandles newlines in values,
24582# but we know of no workaround that is simple, portable, and efficient.
24583# So, don't put newlines in cache variables' values.
24584# Ultrix sh set writes to stderr and can't be redirected directly,
24585# and sets the high bit in the cache file unless we assign to the vars.
24586{
24587  (set) 2>&1 |
24588    case `(ac_space=' '; set | grep ac_space) 2>&1` in
24589    *ac_space=\ *)
24590      # `set' does not quote correctly, so add quotes (double-quote
24591      # substitution turns \\\\ into \\, and sed turns \\ into \).
24592      sed -n \
24593        "s/'/'\\\\''/g;
24594    	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
24595      ;;
24596    *)
24597      # `set' quotes correctly as required by POSIX, so do not add quotes.
24598      sed -n \
24599        "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
24600      ;;
24601    esac;
24602} |
24603  sed '
24604     t clear
24605     : clear
24606     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
24607     t end
24608     /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
24609     : end' >>confcache
24610if cmp -s $cache_file confcache; then :; else
24611  if test -w $cache_file; then
24612    test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
24613    cat confcache >$cache_file
24614  else
24615    echo "not updating unwritable cache $cache_file"
24616  fi
24617fi
24618rm -f confcache
24619
24620test "x$prefix" = xNONE && prefix=$ac_default_prefix
24621# Let make expand exec_prefix.
24622test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
24623
24624# VPATH may cause trouble with some makes, so we remove $(srcdir),
24625# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
24626# trailing colons and then remove the whole line if VPATH becomes empty
24627# (actually we leave an empty line to preserve line numbers).
24628if test "x$srcdir" = x.; then
24629  ac_vpsub='/^[ 	]*VPATH[ 	]*=/{
24630s/:*\$(srcdir):*/:/;
24631s/:*\${srcdir}:*/:/;
24632s/:*@srcdir@:*/:/;
24633s/^\([^=]*=[ 	]*\):*/\1/;
24634s/:*$//;
24635s/^[^=]*=[ 	]*$//;
24636}'
24637fi
24638
24639DEFS=-DHAVE_CONFIG_H
24640
24641: "${CONFIG_STATUS=./config.status}"
24642ac_clean_files_save=$ac_clean_files
24643ac_clean_files="$ac_clean_files $CONFIG_STATUS"
24644{ echo "$as_me:24644: creating $CONFIG_STATUS" >&5
24645echo "$as_me: creating $CONFIG_STATUS" >&6;}
24646cat >"$CONFIG_STATUS" <<_ACEOF
24647#! $SHELL
24648# Generated automatically by configure.
24649# Run this file to recreate the current configuration.
24650# Compiler output produced by configure, useful for debugging
24651# configure, is in config.log if it exists.
24652
24653debug=false
24654SHELL=\${CONFIG_SHELL-$SHELL}
24655ac_cs_invocation="\$0 \$@"
24656
24657CLICOLOR_FORCE= GREP_OPTIONS=
24658unset CLICOLOR_FORCE GREP_OPTIONS
24659_ACEOF
24660
24661cat >>"$CONFIG_STATUS" <<\_ACEOF
24662# Be Bourne compatible
24663if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
24664  emulate sh
24665  NULLCMD=:
24666elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
24667  set -o posix
24668fi
24669
24670# Name of the executable.
24671as_me=`echo "$0" |sed 's,.*[\\/],,'`
24672
24673if expr a : '\(a\)' >/dev/null 2>&1; then
24674  as_expr=expr
24675else
24676  as_expr=false
24677fi
24678
24679rm -f conf$$ conf$$.exe conf$$.file
24680echo >conf$$.file
24681if ln -s conf$$.file conf$$ 2>/dev/null; then
24682  # We could just check for DJGPP; but this test a) works b) is more generic
24683  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
24684  if test -f conf$$.exe; then
24685    # Don't use ln at all; we don't have any links
24686    as_ln_s='cp -p'
24687  else
24688    as_ln_s='ln -s'
24689  fi
24690elif ln conf$$.file conf$$ 2>/dev/null; then
24691  as_ln_s=ln
24692else
24693  as_ln_s='cp -p'
24694fi
24695rm -f conf$$ conf$$.exe conf$$.file
24696
24697as_executable_p="test -f"
24698
24699# Support unset when possible.
24700if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
24701  as_unset="unset"
24702else
24703  as_unset="false"
24704fi
24705
24706# NLS nuisances.
24707$as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
24708$as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
24709$as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
24710$as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
24711$as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
24712$as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
24713$as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
24714$as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
24715
24716# IFS
24717# We need space, tab and new line, in precisely that order.
24718as_nl='
24719'
24720IFS=" 	$as_nl"
24721
24722# CDPATH.
24723$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
24724
24725exec 6>&1
24726
24727_ACEOF
24728
24729# Files that config.status was made for.
24730if test -n "$ac_config_files"; then
24731  echo "config_files=\"$ac_config_files\"" >>"$CONFIG_STATUS"
24732fi
24733
24734if test -n "$ac_config_headers"; then
24735  echo "config_headers=\"$ac_config_headers\"" >>"$CONFIG_STATUS"
24736fi
24737
24738if test -n "$ac_config_links"; then
24739  echo "config_links=\"$ac_config_links\"" >>"$CONFIG_STATUS"
24740fi
24741
24742if test -n "$ac_config_commands"; then
24743  echo "config_commands=\"$ac_config_commands\"" >>"$CONFIG_STATUS"
24744fi
24745
24746cat >>"$CONFIG_STATUS" <<\EOF
24747
24748ac_cs_usage="\
24749\`$as_me' instantiates files from templates according to the
24750current configuration.
24751
24752Usage: $0 [OPTIONS] [FILE]...
24753
24754  -h, --help       print this help, then exit
24755  -V, --version    print version number, then exit
24756  -d, --debug      don't remove temporary files
24757      --recheck    update $as_me by reconfiguring in the same conditions
24758  --file=FILE[:TEMPLATE]
24759                   instantiate the configuration file FILE
24760  --header=FILE[:TEMPLATE]
24761                   instantiate the configuration header FILE
24762
24763Configuration files:
24764$config_files
24765
24766Configuration headers:
24767$config_headers
24768
24769Report bugs to <dickey@invisible-island.net>."
24770EOF
24771
24772cat >>"$CONFIG_STATUS" <<EOF
24773ac_cs_version="\\
24774config.status
24775configured by $0, generated by GNU Autoconf 2.52.20210509,
24776  with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
24777
24778Copyright 2003-2020,2021	Thomas E. Dickey
24779Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
24780Free Software Foundation, Inc.
24781This config.status script is free software; the Free Software Foundation
24782gives unlimited permission to copy, distribute and modify it."
24783srcdir="$srcdir"
24784INSTALL="$INSTALL"
24785EOF
24786
24787cat >>"$CONFIG_STATUS" <<\EOF
24788# If no file are specified by the user, then we need to provide default
24789# value.  By we need to know if files were specified by the user.
24790ac_need_defaults=:
24791while test $# != 0
24792do
24793  case $1 in
24794  --*=*)
24795    ac_option=`expr "x$1" : 'x\([^=]*\)='`
24796    ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
24797    shift
24798    set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
24799    shift
24800    ;;
24801  -*);;
24802  *) # This is not an option, so the user has probably given explicit
24803     # arguments.
24804     ac_need_defaults=false;;
24805  esac
24806
24807  case $1 in
24808  # Handling of the options.
24809EOF
24810cat >>"$CONFIG_STATUS" <<EOF
24811  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
24812    echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
24813    exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
24814EOF
24815cat >>"$CONFIG_STATUS" <<\EOF
24816  --version | --vers* | -V )
24817    echo "$ac_cs_version"; exit 0 ;;
24818  --he | --h)
24819    # Conflict between --help and --header
24820    { { echo "$as_me:24820: error: ambiguous option: $1
24821Try \`$0 --help' for more information." >&5
24822echo "$as_me: error: ambiguous option: $1
24823Try \`$0 --help' for more information." >&2;}
24824   { (exit 1); exit 1; }; };;
24825  --help | --hel | -h )
24826    echo "$ac_cs_usage"; exit 0 ;;
24827  --debug | --d* | -d )
24828    debug=: ;;
24829  --file | --fil | --fi | --f )
24830    shift
24831    CONFIG_FILES="$CONFIG_FILES $1"
24832    ac_need_defaults=false;;
24833  --header | --heade | --head | --hea )
24834    shift
24835    CONFIG_HEADERS="$CONFIG_HEADERS $1"
24836    ac_need_defaults=false;;
24837
24838  # This is an error.
24839  -*) { { echo "$as_me:24839: error: unrecognized option: $1
24840Try \`$0 --help' for more information." >&5
24841echo "$as_me: error: unrecognized option: $1
24842Try \`$0 --help' for more information." >&2;}
24843   { (exit 1); exit 1; }; } ;;
24844
24845  *) ac_config_targets="$ac_config_targets $1" ;;
24846
24847  esac
24848  shift
24849done
24850
24851exec 5>>config.log
24852cat >&5 << _ACEOF
24853
24854## ----------------------- ##
24855## Running config.status.  ##
24856## ----------------------- ##
24857
24858This file was extended by $as_me 2.52.20210509, executed with
24859  CONFIG_FILES    = $CONFIG_FILES
24860  CONFIG_HEADERS  = $CONFIG_HEADERS
24861  CONFIG_LINKS    = $CONFIG_LINKS
24862  CONFIG_COMMANDS = $CONFIG_COMMANDS
24863  > "$ac_cs_invocation"
24864on `(hostname || uname -n) 2>/dev/null | sed 1q`
24865
24866_ACEOF
24867EOF
24868
24869cat >>"$CONFIG_STATUS" <<\EOF
24870for ac_config_target in $ac_config_targets
24871do
24872  case "$ac_config_target" in
24873  # Handling of arguments.
24874  "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
24875  "df-install" ) CONFIG_FILES="$CONFIG_FILES df-install" ;;
24876  "minstall" ) CONFIG_FILES="$CONFIG_FILES minstall:minstall.in" ;;
24877  "xtermcfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS xtermcfg.h:xtermcfg.hin" ;;
24878  *) { { echo "$as_me:24878: error: invalid argument: $ac_config_target" >&5
24879echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
24880   { (exit 1); exit 1; }; };;
24881  esac
24882done
24883
24884# If the user did not use the arguments to specify the items to instantiate,
24885# then the envvar interface is used.  Set only those that are not.
24886# We use the long form for the default assignment because of an extremely
24887# bizarre bug on SunOS 4.1.3.
24888if "$ac_need_defaults"; then
24889  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
24890  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
24891fi
24892
24893# Create a temporary directory, and hook for its removal unless debugging.
24894$debug ||
24895{
24896  trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
24897  trap '{ (exit 1); exit 1; }' 1 2 13 15
24898}
24899
24900# Create a (secure) tmp directory for tmp files.
24901: ${TMPDIR=/tmp}
24902{
24903  tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
24904  test -n "$tmp" && test -d "$tmp"
24905}  ||
24906{
24907  tmp=$TMPDIR/cs$$-$RANDOM
24908  (umask 077 && mkdir $tmp)
24909} ||
24910{
24911   echo "$me: cannot create a temporary directory in $TMPDIR" >&2
24912   { (exit 1); exit 1; }
24913}
24914
24915EOF
24916
24917cat >>"$CONFIG_STATUS" <<EOF
24918
24919#
24920# CONFIG_FILES section.
24921#
24922
24923# No need to generate the scripts if there are no CONFIG_FILES.
24924# This happens for instance when ./config.status config.h
24925if test -n "\$CONFIG_FILES"; then
24926  # Protect against being on the right side of a sed subst in config.status.
24927  sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
24928   s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
24929s,@SHELL@,$SHELL,;t t
24930s,@exec_prefix@,$exec_prefix,;t t
24931s,@prefix@,$prefix,;t t
24932s,@program_transform_name@,$program_transform_name,;t t
24933s,@bindir@,$bindir,;t t
24934s,@sbindir@,$sbindir,;t t
24935s,@libexecdir@,$libexecdir,;t t
24936s,@datarootdir@,$datarootdir,;t t
24937s,@datadir@,$datadir,;t t
24938s,@sysconfdir@,$sysconfdir,;t t
24939s,@sharedstatedir@,$sharedstatedir,;t t
24940s,@localstatedir@,$localstatedir,;t t
24941s,@runstatedir@,$runstatedir,;t t
24942s,@libdir@,$libdir,;t t
24943s,@includedir@,$includedir,;t t
24944s,@oldincludedir@,$oldincludedir,;t t
24945s,@infodir@,$infodir,;t t
24946s,@mandir@,$mandir,;t t
24947s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
24948s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
24949s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
24950s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
24951s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
24952s,@build_alias@,$build_alias,;t t
24953s,@host_alias@,$host_alias,;t t
24954s,@target_alias@,$target_alias,;t t
24955s,@ECHO_C@,$ECHO_C,;t t
24956s,@ECHO_N@,$ECHO_N,;t t
24957s,@ECHO_T@,$ECHO_T,;t t
24958s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
24959s,@DEFS@,$DEFS,;t t
24960s,@LIBS@,$LIBS,;t t
24961s,@build@,$build,;t t
24962s,@build_cpu@,$build_cpu,;t t
24963s,@build_vendor@,$build_vendor,;t t
24964s,@build_os@,$build_os,;t t
24965s,@host@,$host,;t t
24966s,@host_cpu@,$host_cpu,;t t
24967s,@host_vendor@,$host_vendor,;t t
24968s,@host_os@,$host_os,;t t
24969s,@CC@,$CC,;t t
24970s,@CFLAGS@,$CFLAGS,;t t
24971s,@LDFLAGS@,$LDFLAGS,;t t
24972s,@CPPFLAGS@,$CPPFLAGS,;t t
24973s,@ac_ct_CC@,$ac_ct_CC,;t t
24974s,@EXEEXT@,$EXEEXT,;t t
24975s,@OBJEXT@,$OBJEXT,;t t
24976s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
24977s,@CPP@,$CPP,;t t
24978s,@GREP@,$GREP,;t t
24979s,@EGREP@,$EGREP,;t t
24980s,@AWK@,$AWK,;t t
24981s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
24982s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
24983s,@INSTALL_DATA@,$INSTALL_DATA,;t t
24984s,@LN_S@,$LN_S,;t t
24985s,@LINT@,$LINT,;t t
24986s,@LINT_OPTS@,$LINT_OPTS,;t t
24987s,@APP_CLASS@,$APP_CLASS,;t t
24988s,@APPSDIR@,$APPSDIR,;t t
24989s,@no_appsdir@,$no_appsdir,;t t
24990s,@ICON_NAME@,$ICON_NAME,;t t
24991s,@ICON_SYMLINK@,$ICON_SYMLINK,;t t
24992s,@PIXMAPDIR@,$PIXMAPDIR,;t t
24993s,@no_pixmapdir@,$no_pixmapdir,;t t
24994s,@ICONDIR@,$ICONDIR,;t t
24995s,@no_icondir@,$no_icondir,;t t
24996s,@ICON_FORMAT@,$ICON_FORMAT,;t t
24997s,@ICON_THEME@,$ICON_THEME,;t t
24998s,@ICON_LIST@,$ICON_LIST,;t t
24999s,@desktop_utils@,$desktop_utils,;t t
25000s,@DESKTOP_FLAGS@,$DESKTOP_FLAGS,;t t
25001s,@DESKTOP_CATEGORY@,$DESKTOP_CATEGORY,;t t
25002s,@XTERM_PATH@,$XTERM_PATH,;t t
25003s,@XTERM_SYMLINK@,$XTERM_SYMLINK,;t t
25004s,@SINSTALL_OPTS@,$SINSTALL_OPTS,;t t
25005s,@X_CFLAGS@,$X_CFLAGS,;t t
25006s,@X_PRE_LIBS@,$X_PRE_LIBS,;t t
25007s,@X_LIBS@,$X_LIBS,;t t
25008s,@X_EXTRA_LIBS@,$X_EXTRA_LIBS,;t t
25009s,@PKG_CONFIG@,$PKG_CONFIG,;t t
25010s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
25011s,@ICON_SUFFIX@,$ICON_SUFFIX,;t t
25012s,@IMAKE@,$IMAKE,;t t
25013s,@IMAKE_CFLAGS@,$IMAKE_CFLAGS,;t t
25014s,@IMAKE_LOADFLAGS@,$IMAKE_LOADFLAGS,;t t
25015s,@GROFF_PATH@,$GROFF_PATH,;t t
25016s,@NROFF_PATH@,$NROFF_PATH,;t t
25017s,@TBL_PATH@,$TBL_PATH,;t t
25018s,@GROFF_NOTE@,$GROFF_NOTE,;t t
25019s,@NROFF_NOTE@,$NROFF_NOTE,;t t
25020s,@FGREP@,$FGREP,;t t
25021s,@cf_man2html@,$cf_man2html,;t t
25022s,@MAN2HTML_NOTE@,$MAN2HTML_NOTE,;t t
25023s,@MAN2HTML_PATH@,$MAN2HTML_PATH,;t t
25024s,@MAN2HTML_TEMP@,$MAN2HTML_TEMP,;t t
25025s,@default_termid@,$default_termid,;t t
25026s,@default_TERM@,$default_TERM,;t t
25027s,@backarrow_is_bs@,$backarrow_is_bs,;t t
25028s,@backarrow_is_erase@,$backarrow_is_erase,;t t
25029s,@delete_is_del@,$delete_is_del,;t t
25030s,@initial_erase@,$initial_erase,;t t
25031s,@alt_sends_esc@,$alt_sends_esc,;t t
25032s,@meta_sends_esc@,$meta_sends_esc,;t t
25033s,@cf_tic_prog@,$cf_tic_prog,;t t
25034s,@no_ticprog@,$no_ticprog,;t t
25035s,@TERMINFO_DIR@,$TERMINFO_DIR,;t t
25036s,@SET_TERMINFO@,$SET_TERMINFO,;t t
25037s,@double_buffer@,$double_buffer,;t t
25038s,@FREETYPE_CONFIG@,$FREETYPE_CONFIG,;t t
25039s,@FREETYPE_OLD_CONFIG@,$FREETYPE_OLD_CONFIG,;t t
25040s,@FREETYPE_XFT_CONFIG@,$FREETYPE_XFT_CONFIG,;t t
25041s,@HAVE_TYPE_FCCHAR32@,$HAVE_TYPE_FCCHAR32,;t t
25042s,@HAVE_TYPE_XFTCHARSPEC@,$HAVE_TYPE_XFTCHARSPEC,;t t
25043s,@LUIT@,$LUIT,;t t
25044s,@ECHO_LT@,$ECHO_LT,;t t
25045s,@ECHO_LD@,$ECHO_LD,;t t
25046s,@RULE_CC@,$RULE_CC,;t t
25047s,@SHOW_CC@,$SHOW_CC,;t t
25048s,@ECHO_CC@,$ECHO_CC,;t t
25049s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
25050s,@HAVE_STDNORETURN_H@,$HAVE_STDNORETURN_H,;t t
25051s,@STDC_NORETURN@,$STDC_NORETURN,;t t
25052s,@CHARPROC_DEPS@,$CHARPROC_DEPS,;t t
25053s,@EXTRAHDRS@,$EXTRAHDRS,;t t
25054s,@EXTRASRCS@,$EXTRASRCS,;t t
25055s,@EXTRAOBJS@,$EXTRAOBJS,;t t
25056s,@MAY_SETUID@,$MAY_SETUID,;t t
25057s,@NOT_SETUID@,$NOT_SETUID,;t t
25058s,@CTAGS@,$CTAGS,;t t
25059s,@ETAGS@,$ETAGS,;t t
25060s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
25061s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
25062s,@cf_ldd_prog@,$cf_ldd_prog,;t t
25063s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
25064CEOF
25065
25066EOF
25067
25068  cat >>"$CONFIG_STATUS" <<\EOF
25069  # Split the substitutions into bite-sized pieces for seds with
25070  # small command number limits, like on Digital OSF/1 and HP-UX.
25071  ac_max_sed_lines=48
25072  ac_sed_frag=1 # Number of current file.
25073  ac_beg=1 # First line for current file.
25074  ac_end=$ac_max_sed_lines # Line after last line for current file.
25075  ac_more_lines=:
25076  ac_sed_cmds=
25077  while "$ac_more_lines"; do
25078    if test "$ac_beg" -gt 1; then
25079      sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
25080    else
25081      sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
25082    fi
25083    if test ! -s $tmp/subs.frag; then
25084      ac_more_lines=false
25085    else
25086      # The purpose of the label and of the branching condition is to
25087      # speed up the sed processing (if there are no `@' at all, there
25088      # is no need to browse any of the substitutions).
25089      # These are the two extra sed commands mentioned above.
25090      (echo ':t
25091  /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
25092      # It is possible to make a multiline substitution using escaped newlines.
25093      # Ensure that we do not split the substitution between script fragments.
25094      ac_BEG=$ac_end
25095      ac_END=`expr "$ac_end" + "$ac_max_sed_lines"`
25096      sed "1,${ac_BEG}d; ${ac_END}p; q" $tmp/subs.sed >$tmp/subs.next
25097      if test -s $tmp/subs.next; then
25098        grep '^s,@[^@,][^@,]*@,.*\\$' $tmp/subs.next >$tmp/subs.edit
25099        if test ! -s $tmp/subs.edit; then
25100          grep "^s,@[^@,][^@,]*@,.*,;t t$" $tmp/subs.next >$tmp/subs.edit
25101          if test ! -s $tmp/subs.edit; then
25102            if test "$ac_beg" -gt 1; then
25103              ac_end=`expr "$ac_end" - 1`
25104              continue
25105            fi
25106          fi
25107        fi
25108      fi
25109
25110      if test -z "$ac_sed_cmds"; then
25111        ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
25112      else
25113        ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
25114      fi
25115      ac_sed_frag=`expr "$ac_sed_frag" + 1`
25116      ac_beg=$ac_end
25117      ac_end=`expr "$ac_end" + "$ac_max_sed_lines"`
25118    fi
25119  done
25120  if test -z "$ac_sed_cmds"; then
25121    ac_sed_cmds=cat
25122  fi
25123fi # test -n "$CONFIG_FILES"
25124
25125EOF
25126cat >>"$CONFIG_STATUS" <<\EOF
25127for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
25128  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
25129  case "$ac_file" in
25130  - | *:- | *:-:* ) # input from stdin
25131        cat >$tmp/stdin
25132        ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
25133        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
25134  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
25135        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
25136  * )   ac_file_in=$ac_file.in ;;
25137  esac
25138
25139  # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
25140  ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
25141         X"$ac_file" : 'X\(//\)[^/]' \| \
25142         X"$ac_file" : 'X\(//\)$' \| \
25143         X"$ac_file" : 'X\(/\)' \| \
25144         .     : '\(.\)' 2>/dev/null ||
25145echo X"$ac_file" |
25146    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
25147  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
25148  	  /^X\(\/\/\)$/{ s//\1/; q; }
25149  	  /^X\(\/\).*/{ s//\1/; q; }
25150  	  s/.*/./; q'`
25151  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
25152    { case "$ac_dir" in
25153  [\\/]* | ?:[\\/]* ) as_incr_dir=;;
25154  *)                      as_incr_dir=.;;
25155esac
25156as_dummy="$ac_dir"
25157for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
25158  case $as_mkdir_dir in
25159    # Skip DOS drivespec
25160    ?:) as_incr_dir=$as_mkdir_dir ;;
25161    *)
25162      as_incr_dir=$as_incr_dir/$as_mkdir_dir
25163      test -d "$as_incr_dir" || mkdir "$as_incr_dir"
25164    ;;
25165  esac
25166done; }
25167
25168    ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
25169    # A "../" for each directory in $ac_dir_suffix.
25170    ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
25171  else
25172    ac_dir_suffix= ac_dots=
25173  fi
25174
25175  case "$srcdir" in
25176  .)  ac_srcdir=.
25177      if test -z "$ac_dots"; then
25178         ac_top_srcdir=.
25179      else
25180         ac_top_srcdir=`echo "$ac_dots" | sed 's,/$,,'`
25181      fi ;;
25182  [\\/]* | ?:[\\/]* )
25183      ac_srcdir="$srcdir$ac_dir_suffix";
25184      ac_top_srcdir="$srcdir" ;;
25185  *) # Relative path.
25186    ac_srcdir="$ac_dots$srcdir$ac_dir_suffix"
25187    ac_top_srcdir="$ac_dots$srcdir" ;;
25188  esac
25189
25190  case $INSTALL in
25191  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
25192  *) ac_INSTALL=$ac_dots$INSTALL ;;
25193  esac
25194
25195  if test x"$ac_file" != x-; then
25196    { echo "$as_me:25196: creating $ac_file" >&5
25197echo "$as_me: creating $ac_file" >&6;}
25198    rm -f "$ac_file"
25199  fi
25200  # Let's still pretend it is `configure' which instantiates (i.e., don't
25201  # use $as_me), people would be surprised to read:
25202  #    /* config.h.  Generated automatically by config.status.  */
25203  configure_input="Generated automatically from `echo $ac_file_in |
25204                                                 sed 's,.*/,,'` by configure."
25205
25206  # First look for the input files in the build tree, otherwise in the
25207  # src tree.
25208  ac_file_inputs=`IFS=:
25209    for f in $ac_file_in; do
25210      case $f in
25211      -) echo $tmp/stdin ;;
25212      [\\/$]*)
25213         # Absolute (can't be DOS-style, as IFS=:)
25214         test -f "$f" || { { echo "$as_me:25214: error: cannot find input file: $f" >&5
25215echo "$as_me: error: cannot find input file: $f" >&2;}
25216   { (exit 1); exit 1; }; }
25217         echo $f;;
25218      *) # Relative
25219         if test -f "$f"; then
25220           # Build tree
25221           echo $f
25222         elif test -f "$srcdir/$f"; then
25223           # Source tree
25224           echo "$srcdir/$f"
25225         else
25226           # /dev/null tree
25227           { { echo "$as_me:25227: error: cannot find input file: $f" >&5
25228echo "$as_me: error: cannot find input file: $f" >&2;}
25229   { (exit 1); exit 1; }; }
25230         fi;;
25231      esac
25232    done` || { (exit 1); exit 1; }
25233EOF
25234cat >>"$CONFIG_STATUS" <<\EOF
25235  ac_warn_datarootdir=no
25236  if test x"$ac_file" != x-; then
25237    for ac_item in $ac_file_inputs
25238    do
25239      ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' "$ac_item"`
25240      if test -n "$ac_seen"; then
25241        ac_used=`grep '@datarootdir@' "$ac_item"`
25242        if test -z "$ac_used"; then
25243          { echo "$as_me:25243: WARNING: datarootdir was used implicitly but not set:
25244$ac_seen" >&5
25245echo "$as_me: WARNING: datarootdir was used implicitly but not set:
25246$ac_seen" >&2;}
25247          ac_warn_datarootdir=yes
25248        fi
25249      fi
25250      ac_seen=`grep '${datarootdir}' "$ac_item"`
25251      if test -n "$ac_seen"; then
25252        { echo "$as_me:25252: WARNING: datarootdir was used explicitly but not set:
25253$ac_seen" >&5
25254echo "$as_me: WARNING: datarootdir was used explicitly but not set:
25255$ac_seen" >&2;}
25256        ac_warn_datarootdir=yes
25257      fi
25258    done
25259  fi
25260
25261if test "x$ac_warn_datarootdir" = xyes; then
25262  ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
25263fi
25264
25265EOF
25266cat >>"$CONFIG_STATUS" <<EOF
25267  sed "$ac_vpsub
25268$extrasub
25269EOF
25270cat >>"$CONFIG_STATUS" <<\EOF
25271:t
25272/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
25273s,@configure_input@,$configure_input,;t t
25274s,@srcdir@,$ac_srcdir,;t t
25275s,@top_srcdir@,$ac_top_srcdir,;t t
25276s,@INSTALL@,$ac_INSTALL,;t t
25277" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
25278  rm -f $tmp/stdin
25279  if test x"$ac_file" != x-; then
25280    cp "$tmp/out" "$ac_file"
25281
25282    for ac_name in prefix exec_prefix datarootdir
25283    do
25284        ac_seen=`${FGREP-fgrep} -n '${'$ac_name'[:=].*}' "$ac_file"`
25285        if test -n "$ac_seen"; then
25286            ac_init=`${EGREP-egrep} '[ 	]*'$ac_name'[ 	]*=' "$ac_file"`
25287            if test -z "$ac_init"; then
25288              ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
25289              { echo "$as_me:25289: WARNING: Variable $ac_name is used but was not set:
25290$ac_seen" >&5
25291echo "$as_me: WARNING: Variable $ac_name is used but was not set:
25292$ac_seen" >&2;}
25293            fi
25294        fi
25295    done
25296    ${EGREP-egrep} -n '@[a-z_][a-z_0-9]+@' "$ac_file" >$tmp/out
25297    ${EGREP-egrep} -n '@[A-Z_][A-Z_0-9]+@' "$ac_file" >>$tmp/out
25298    if test -s $tmp/out; then
25299      ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
25300      { echo "$as_me:25300: WARNING: Some variables may not be substituted:
25301$ac_seen" >&5
25302echo "$as_me: WARNING: Some variables may not be substituted:
25303$ac_seen" >&2;}
25304    fi
25305  else
25306    cat $tmp/out
25307  fi
25308  rm -f $tmp/out
25309
25310done
25311EOF
25312cat >>"$CONFIG_STATUS" <<\EOF
25313
25314#
25315# CONFIG_HEADER section.
25316#
25317
25318# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
25319# NAME is the cpp macro being defined and VALUE is the value it is being given.
25320#
25321# ac_d sets the value in "#define NAME VALUE" lines.
25322ac_dA='s,^\([ 	]*\)#\([ 	]*define[ 	][ 	]*\)'
25323ac_dB='[ 	].*$,\1#\2'
25324ac_dC=' '
25325ac_dD=',;t'
25326# ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
25327ac_iA='s,^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
25328ac_iB='\([ 	]\),\1#\2define\3'
25329ac_iC=' '
25330ac_iD='\4,;t'
25331# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
25332ac_uA='s,^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
25333ac_uB='$,\1#\2define\3'
25334ac_uC=' '
25335ac_uD=',;t'
25336
25337for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
25338  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
25339  case "$ac_file" in
25340  - | *:- | *:-:* ) # input from stdin
25341        cat >$tmp/stdin
25342        ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
25343        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
25344  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
25345        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
25346  * )   ac_file_in=$ac_file.in ;;
25347  esac
25348
25349  test x"$ac_file" != x- && { echo "$as_me:25349: creating $ac_file" >&5
25350echo "$as_me: creating $ac_file" >&6;}
25351
25352  # First look for the input files in the build tree, otherwise in the
25353  # src tree.
25354  ac_file_inputs=`IFS=:
25355    for f in $ac_file_in; do
25356      case $f in
25357      -) echo $tmp/stdin ;;
25358      [\\/$]*)
25359         # Absolute (can't be DOS-style, as IFS=:)
25360         test -f "$f" || { { echo "$as_me:25360: error: cannot find input file: $f" >&5
25361echo "$as_me: error: cannot find input file: $f" >&2;}
25362   { (exit 1); exit 1; }; }
25363         echo $f;;
25364      *) # Relative
25365         if test -f "$f"; then
25366           # Build tree
25367           echo $f
25368         elif test -f "$srcdir/$f"; then
25369           # Source tree
25370           echo "$srcdir/$f"
25371         else
25372           # /dev/null tree
25373           { { echo "$as_me:25373: error: cannot find input file: $f" >&5
25374echo "$as_me: error: cannot find input file: $f" >&2;}
25375   { (exit 1); exit 1; }; }
25376         fi;;
25377      esac
25378    done` || { (exit 1); exit 1; }
25379  # Remove the trailing spaces.
25380  sed 's/[ 	]*$//' $ac_file_inputs >$tmp/in
25381
25382EOF
25383
25384# Transform confdefs.h into two sed scripts, `conftest.defines' and
25385# `conftest.undefs', that substitutes the proper values into
25386# config.h.in to produce config.h.  The first handles `#define'
25387# templates, and the second `#undef' templates.
25388# And first: Protect against being on the right side of a sed subst in
25389# config.status.  Protect against being in an unquoted here document
25390# in config.status.
25391rm -f conftest.defines conftest.undefs
25392# Using a here document instead of a string reduces the quoting nightmare.
25393# Putting comments in sed scripts is not portable.
25394#
25395# `end' is used to avoid that the second main sed command (meant for
25396# 0-ary CPP macros) applies to n-ary macro definitions.
25397# See the Autoconf documentation for `clear'.
25398cat >confdef2sed.sed <<\EOF
25399s/[\\&,]/\\&/g
25400s,[\\$`],\\&,g
25401t clear
25402: clear
25403s,^[ 	]*#[ 	]*define[ 	][ 	]*\(\([^ 	(][^ 	(]*\)([^)]*)\)[ 	]*\(.*\)$,${ac_dA}\2${ac_dB}\1${ac_dC}\3${ac_dD},gp
25404t end
25405s,^[ 	]*#[ 	]*define[ 	][ 	]*\([^ 	][^ 	]*\)[ 	]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
25406: end
25407EOF
25408# If some macros were called several times there might be several times
25409# the same #defines, which is useless.  Nevertheless, we may not want to
25410# sort them, since we want the *last* AC-DEFINE to be honored.
25411uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
25412sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
25413sed 's/ac_d/ac_i/g' conftest.defines >>conftest.undefs
25414rm -f confdef2sed.sed
25415
25416# This sed command replaces #undef with comments.  This is necessary, for
25417# example, in the case of _POSIX_SOURCE, which is predefined and required
25418# on some systems where configure will not decide to define it.
25419cat >>conftest.undefs <<\EOF
25420s,^[ 	]*#[ 	]*undef[ 	][ 	]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
25421EOF
25422
25423# Break up conftest.defines because some shells have a limit on the size
25424# of here documents, and old seds have small limits too (100 cmds).
25425echo '  # Handle all the #define templates only if necessary.' >>"$CONFIG_STATUS"
25426echo '  if egrep "^[ 	]*#[ 	]*define" $tmp/in >/dev/null; then' >>"$CONFIG_STATUS"
25427echo '  # If there are no defines, we may have an empty if/fi' >>"$CONFIG_STATUS"
25428echo '  :' >>"$CONFIG_STATUS"
25429rm -f conftest.tail
25430while grep . conftest.defines >/dev/null
25431do
25432  # Write a limited-size here document to $tmp/defines.sed.
25433  echo '  cat >$tmp/defines.sed <<CEOF' >>"$CONFIG_STATUS"
25434  # Speed up: don't consider the non `#define' lines.
25435  echo '/^[ 	]*#[ 	]*define/!b' >>"$CONFIG_STATUS"
25436  # Work around the forget-to-reset-the-flag bug.
25437  echo 't clr' >>"$CONFIG_STATUS"
25438  echo ': clr' >>"$CONFIG_STATUS"
25439  sed "${ac_max_here_lines}q" conftest.defines >>"$CONFIG_STATUS"
25440  echo 'CEOF
25441  sed -f $tmp/defines.sed $tmp/in >$tmp/out
25442  rm -f $tmp/in
25443  mv $tmp/out $tmp/in
25444' >>"$CONFIG_STATUS"
25445  sed "1,${ac_max_here_lines}d" conftest.defines >conftest.tail
25446  rm -f conftest.defines
25447  mv conftest.tail conftest.defines
25448done
25449rm -f conftest.defines
25450echo '  fi # egrep' >>"$CONFIG_STATUS"
25451echo >>"$CONFIG_STATUS"
25452
25453# Break up conftest.undefs because some shells have a limit on the size
25454# of here documents, and old seds have small limits too (100 cmds).
25455echo '  # Handle all the #undef templates' >>"$CONFIG_STATUS"
25456rm -f conftest.tail
25457while grep . conftest.undefs >/dev/null
25458do
25459  # Write a limited-size here document to $tmp/undefs.sed.
25460  echo '  cat >$tmp/undefs.sed <<CEOF' >>"$CONFIG_STATUS"
25461  # Speed up: don't consider the non `#undef'
25462  echo '/^[ 	]*#[ 	]*undef/!b' >>"$CONFIG_STATUS"
25463  # Work around the forget-to-reset-the-flag bug.
25464  echo 't clr' >>"$CONFIG_STATUS"
25465  echo ': clr' >>"$CONFIG_STATUS"
25466  sed "${ac_max_here_lines}q" conftest.undefs >>"$CONFIG_STATUS"
25467  echo 'CEOF
25468  sed -f $tmp/undefs.sed $tmp/in >$tmp/out
25469  rm -f $tmp/in
25470  mv $tmp/out $tmp/in
25471' >>"$CONFIG_STATUS"
25472  sed "1,${ac_max_here_lines}d" conftest.undefs >conftest.tail
25473  rm -f conftest.undefs
25474  mv conftest.tail conftest.undefs
25475done
25476rm -f conftest.undefs
25477
25478cat >>"$CONFIG_STATUS" <<\EOF
25479  # Let's still pretend it is `configure' which instantiates (i.e., don't
25480  # use $as_me), people would be surprised to read:
25481  #    /* config.h.  Generated automatically by config.status.  */
25482  if test x"$ac_file" = x-; then
25483    echo "/* Generated automatically by configure.  */" >$tmp/config.h
25484  else
25485    echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
25486  fi
25487  cat $tmp/in >>$tmp/config.h
25488  rm -f $tmp/in
25489  if test x"$ac_file" != x-; then
25490    if cmp -s "$ac_file" "$tmp/config.h" 2>/dev/null; then
25491      { echo "$as_me:25491: $ac_file is unchanged" >&5
25492echo "$as_me: $ac_file is unchanged" >&6;}
25493    else
25494      ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
25495         X"$ac_file" : 'X\(//\)[^/]' \| \
25496         X"$ac_file" : 'X\(//\)$' \| \
25497         X"$ac_file" : 'X\(/\)' \| \
25498         .     : '\(.\)' 2>/dev/null ||
25499echo X"$ac_file" |
25500    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
25501  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
25502  	  /^X\(\/\/\)$/{ s//\1/; q; }
25503  	  /^X\(\/\).*/{ s//\1/; q; }
25504  	  s/.*/./; q'`
25505      if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
25506        { case "$ac_dir" in
25507  [\\/]* | ?:[\\/]* ) as_incr_dir=;;
25508  *)                      as_incr_dir=.;;
25509esac
25510as_dummy="$ac_dir"
25511for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
25512  case $as_mkdir_dir in
25513    # Skip DOS drivespec
25514    ?:) as_incr_dir=$as_mkdir_dir ;;
25515    *)
25516      as_incr_dir=$as_incr_dir/$as_mkdir_dir
25517      test -d "$as_incr_dir" || mkdir "$as_incr_dir"
25518    ;;
25519  esac
25520done; }
25521
25522      fi
25523      rm -f "$ac_file"
25524      mv "$tmp/config.h" "$ac_file"
25525    fi
25526  else
25527    cat $tmp/config.h
25528    rm -f $tmp/config.h
25529  fi
25530done
25531EOF
25532
25533cat >>"$CONFIG_STATUS" <<\EOF
25534
25535{ (exit 0); exit 0; }
25536EOF
25537chmod +x "$CONFIG_STATUS"
25538ac_clean_files=$ac_clean_files_save
25539
25540# configure is writing to config.log, and then calls config.status.
25541# config.status does its own redirection, appending to config.log.
25542# Unfortunately, on DOS this fails, as config.log is still kept open
25543# by configure, so config.status won't be able to write to it; its
25544# output is simply discarded.  So we exec the FD to /dev/null,
25545# effectively closing config.log, so it can be properly (re)opened and
25546# appended to by config.status.  When coming back to configure, we
25547# need to make the FD available again.
25548if test "$no_create" != yes; then
25549  ac_cs_success=:
25550  exec 5>/dev/null
25551  $SHELL "$CONFIG_STATUS" || ac_cs_success=false
25552  exec 5>>config.log
25553  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
25554  # would make configure fail if this is the last instruction.
25555  "$ac_cs_success" || { (exit 1); exit 1; }
25556fi
25557
25558